Skip to content

Commit baa6d2b

Browse files
committedApr 19, 2023
Can show import URLs for extensions
1 parent 7380946 commit baa6d2b

File tree

6 files changed

+271
-195
lines changed

6 files changed

+271
-195
lines changed
 

‎LICENSE.md

+164-164
Large diffs are not rendered by default.

‎package.json

+1
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"remark-math": "^5.1.1",
7474
"remark-parse": "^10.0.1",
7575
"remark-rehype": "^10.1.0",
76+
"sass": "^1.62.0",
7677
"unified": "^10.1.2"
7778
},
7879
"devDependencies": {

‎src/components/AwesomeArcadeExtensionList/extension.tsx

+41-24
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,56 @@ import React from "react";
33

44
export function AwesomeArcadeExtension({
55
ext,
6+
showImportURL,
67
pad,
78
}: {
89
ext: Extension;
10+
showImportURL?: boolean | undefined;
911
pad?: boolean | undefined;
1012
}): JSX.Element {
1113
return (
1214
<div className={`card ${pad ? "mb-2" : ""}`}>
13-
<div className="card-body">
14-
<h5 className="card-title">{ext.title}</h5>
15-
<h6 className="card-subtitle mb-2 text-body-secondary">
16-
Made by{" "}
15+
<h5 className="card-title">{ext.title}</h5>
16+
<h6 className="card-subtitle mb-2 text-body-secondary">
17+
Made by{" "}
18+
<a
19+
href={`https://github.com/${ext.author}`}
20+
target="_blank"
21+
rel="noopener noreferer"
22+
>
23+
{ext.author}
24+
</a>
25+
</h6>
26+
{showImportURL == undefined || showImportURL ? (
27+
<>
28+
Import this extension with the URL:
29+
<blockquote className="border-start border-secondary border-2 ps-2 mt-1 mb-2">
30+
<a href={ext.url} target="_blank" rel="noopener noreferer">
31+
{ext.url}
32+
</a>
33+
</blockquote>
34+
</>
35+
) : (
36+
<></>
37+
)}
38+
<div
39+
className="card-text"
40+
dangerouslySetInnerHTML={{ __html: ext.description }}
41+
/>
42+
{ext.links.map((link: Link) => {
43+
return (
1744
<a
18-
href={`https://github.com/${ext.author}`}
45+
href={link.url}
46+
key={link.url}
47+
className="card-link"
1948
target="_blank"
2049
rel="noopener noreferer"
2150
>
22-
{ext.author}
51+
{link.label != undefined ? link.label : link.url}
2352
</a>
24-
</h6>
25-
<div
26-
className="card-text"
27-
dangerouslySetInnerHTML={{ __html: ext.description }}
28-
/>
29-
{ext.links.map((link: Link) => {
30-
return (
31-
<a
32-
href={link.url}
33-
key={link.url}
34-
className="card-link"
35-
target="_blank"
36-
rel="noopener noreferer"
37-
>
38-
{link.label != undefined ? link.label : link.url}
39-
</a>
40-
);
41-
})}
53+
);
54+
})}
55+
<div className="card-body">
4256
{ext.forks != undefined && ext.forks.length > 0 ? (
4357
<AwesomeArcadeExtensionGroup
4458
description={
@@ -63,11 +77,13 @@ export function AwesomeArcadeExtensionGroup({
6377
title,
6478
description,
6579
exts,
80+
showImportURL,
6681
pad,
6782
}: {
6883
title?: JSX.Element | undefined;
6984
description?: JSX.Element | undefined;
7085
exts: Extension[];
86+
showImportURL?: boolean | undefined;
7187
pad?: boolean | undefined;
7288
}): JSX.Element {
7389
return (
@@ -79,6 +95,7 @@ export function AwesomeArcadeExtensionGroup({
7995
<AwesomeArcadeExtension
8096
key={ext.repo}
8197
ext={ext}
98+
showImportURL={showImportURL}
8299
pad={i < exts.length - 1}
83100
/>
84101
);

‎src/components/AwesomeArcadeExtensionList/list.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ export default function AwesomeArcadeExtensionList({
2727
</p>
2828
}
2929
exts={list.builtIn}
30+
showImportURL={false}
3031
/>
3132
<AwesomeArcadeExtensionGroup
3233
title={<h2>Not built-in extensions</h2>}

‎src/pages/index.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export function Home({ appProps, list }: HomeProps): JSX.Element {
5353
Please note that this website is not developed, affiliated, or endorsed
5454
by Microsoft, the owner of MakeCode Arcade.
5555
</p>
56+
<p>Click anywhere in the box to copy the link to your clipboard!</p>
5657
<div>
5758
<AwesomeArcadeExtensionList list={list} />
5859
</div>

‎yarn.lock

+63-7
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,14 @@ ansi-styles@^6.0.0:
424424
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5"
425425
integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==
426426

427+
anymatch@~3.1.2:
428+
version "3.1.3"
429+
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.3.tgz#790c58b19ba1720a84205b57c618d5ad8524973e"
430+
integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==
431+
dependencies:
432+
normalize-path "^3.0.0"
433+
picomatch "^2.0.4"
434+
427435
argparse@^2.0.1:
428436
version "2.0.1"
429437
resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38"
@@ -533,6 +541,11 @@ balanced-match@^1.0.0:
533541
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
534542
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
535543

544+
binary-extensions@^2.0.0:
545+
version "2.2.0"
546+
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
547+
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
548+
536549
bootstrap-icons@^1.10.4:
537550
version "1.10.4"
538551
resolved "https://registry.yarnpkg.com/bootstrap-icons/-/bootstrap-icons-1.10.4.tgz#97f991eeb215ba8b63474b5fc508be599f2f7931"
@@ -551,7 +564,7 @@ brace-expansion@^1.1.7:
551564
balanced-match "^1.0.0"
552565
concat-map "0.0.1"
553566

554-
braces@^3.0.2:
567+
braces@^3.0.2, braces@~3.0.2:
555568
version "3.0.2"
556569
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
557570
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
@@ -616,6 +629,21 @@ character-entities@^2.0.0:
616629
resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-2.0.2.tgz#2d09c2e72cd9523076ccb21157dff66ad43fcc22"
617630
integrity sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==
618631

632+
"chokidar@>=3.0.0 <4.0.0":
633+
version "3.5.3"
634+
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
635+
integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
636+
dependencies:
637+
anymatch "~3.1.2"
638+
braces "~3.0.2"
639+
glob-parent "~5.1.2"
640+
is-binary-path "~2.1.0"
641+
is-glob "~4.0.1"
642+
normalize-path "~3.0.0"
643+
readdirp "~3.6.0"
644+
optionalDependencies:
645+
fsevents "~2.3.2"
646+
619647
clean-stack@^2.0.0:
620648
version "2.2.0"
621649
resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b"
@@ -1310,7 +1338,7 @@ fs.realpath@^1.0.0:
13101338
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
13111339
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
13121340

1313-
fsevents@^2.3.2:
1341+
fsevents@^2.3.2, fsevents@~2.3.2:
13141342
version "2.3.2"
13151343
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
13161344
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
@@ -1362,7 +1390,7 @@ get-tsconfig@^4.5.0:
13621390
resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.5.0.tgz#6d52d1c7b299bd3ee9cd7638561653399ac77b0f"
13631391
integrity sha512-MjhiaIWCJ1sAU4pIQ5i5OfOuHHxVo1oYeNsWTON7jxYkod8pHocXeh+SSbmu5OZZZK73B6cbJ2XADzXehLyovQ==
13641392

1365-
glob-parent@^5.1.2:
1393+
glob-parent@^5.1.2, glob-parent@~5.1.2:
13661394
version "5.1.2"
13671395
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
13681396
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
@@ -1656,6 +1684,11 @@ ignore@^5.2.0:
16561684
resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324"
16571685
integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==
16581686

1687+
immutable@^4.0.0:
1688+
version "4.3.0"
1689+
resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.3.0.tgz#eb1738f14ffb39fd068b1dbe1296117484dd34be"
1690+
integrity sha512-0AOCmOip+xgJwEVTQj1EfiDDOkPmuyllDuTuEX+DDXUgapLAsBIfkg3sxCYyCEA8mQqZrrxPUGjcOQ2JS3WLkg==
1691+
16591692
import-fresh@^3.0.0, import-fresh@^3.2.1:
16601693
version "3.3.0"
16611694
resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b"
@@ -1720,6 +1753,13 @@ is-bigint@^1.0.1:
17201753
dependencies:
17211754
has-bigints "^1.0.1"
17221755

1756+
is-binary-path@~2.1.0:
1757+
version "2.1.0"
1758+
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
1759+
integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
1760+
dependencies:
1761+
binary-extensions "^2.0.0"
1762+
17231763
is-boolean-object@^1.1.0:
17241764
version "1.1.2"
17251765
resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719"
@@ -1772,7 +1812,7 @@ is-fullwidth-code-point@^4.0.0:
17721812
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz#fae3167c729e7463f8461ce512b080a49268aa88"
17731813
integrity sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==
17741814

1775-
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3:
1815+
is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1:
17761816
version "4.0.3"
17771817
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
17781818
integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
@@ -2674,7 +2714,7 @@ nextjs-progressbar@^0.0.16:
26742714
nprogress "^0.2.0"
26752715
prop-types "^15.8.1"
26762716

2677-
normalize-path@^3.0.0:
2717+
normalize-path@^3.0.0, normalize-path@~3.0.0:
26782718
version "3.0.0"
26792719
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
26802720
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
@@ -2893,7 +2933,7 @@ picocolors@^1.0.0:
28932933
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
28942934
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
28952935

2896-
picomatch@^2.3.1:
2936+
picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1:
28972937
version "2.3.1"
28982938
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
28992939
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
@@ -2988,6 +3028,13 @@ react@18.2.0:
29883028
dependencies:
29893029
loose-envify "^1.1.0"
29903030

3031+
readdirp@~3.6.0:
3032+
version "3.6.0"
3033+
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
3034+
integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
3035+
dependencies:
3036+
picomatch "^2.2.1"
3037+
29913038
regenerator-runtime@^0.13.11:
29923039
version "0.13.11"
29933040
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz#f6dca3e7ceec20590d07ada785636a90cdca17f9"
@@ -3176,6 +3223,15 @@ safe-regex-test@^1.0.0:
31763223
resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
31773224
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
31783225

3226+
sass@^1.62.0:
3227+
version "1.62.0"
3228+
resolved "https://registry.yarnpkg.com/sass/-/sass-1.62.0.tgz#3686b2195b93295d20765135e562366b33ece37d"
3229+
integrity sha512-Q4USplo4pLYgCi+XlipZCWUQz5pkg/ruSSgJ0WRDSb/+3z9tXUOkQ7QPYn4XrhZKYAK4HlpaQecRwKLJX6+DBg==
3230+
dependencies:
3231+
chokidar ">=3.0.0 <4.0.0"
3232+
immutable "^4.0.0"
3233+
source-map-js ">=0.6.2 <2.0.0"
3234+
31793235
saxes@^6.0.0:
31803236
version "6.0.0"
31813237
resolved "https://registry.yarnpkg.com/saxes/-/saxes-6.0.0.tgz#fe5b4a4768df4f14a201b1ba6a65c1f3d9988cc5"
@@ -3264,7 +3320,7 @@ slice-ansi@^5.0.0:
32643320
ansi-styles "^6.0.0"
32653321
is-fullwidth-code-point "^4.0.0"
32663322

3267-
source-map-js@^1.0.2:
3323+
"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2:
32683324
version "1.0.2"
32693325
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
32703326
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==

1 commit comments

Comments
 (1)
Please sign in to comment.