pxt-core 8.6.2 → 8.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/built/pxt.js +10 -10
  2. package/built/pxteditor.d.ts +1 -1
  3. package/built/pxteditor.js +4 -4
  4. package/built/pxtlib.js +10 -10
  5. package/built/target.js +1 -1
  6. package/built/web/main.js +1 -1
  7. package/built/web/pxtapp.js +1 -1
  8. package/built/web/pxtasseteditor.js +1 -1
  9. package/built/web/pxteditor.js +1 -1
  10. package/built/web/pxtembed.js +2 -2
  11. package/built/web/pxtlib.js +1 -1
  12. package/built/web/pxtworker.js +1 -1
  13. package/built/web/react-common-authcode.css +1 -1
  14. package/built/web/react-common-multiplayer.css +1 -1
  15. package/built/web/react-common-skillmap.css +1 -1
  16. package/built/web/rtlreact-common-authcode.css +1 -1
  17. package/built/web/rtlreact-common-multiplayer.css +1 -1
  18. package/built/web/rtlreact-common-skillmap.css +1 -1
  19. package/built/web/rtlsemantic.css +1 -1
  20. package/built/web/semantic.css +1 -1
  21. package/built/web/serviceworker.js +1 -1
  22. package/built/web/skillmap/js/{main.a715c76c.js → main.2dfa3448.js} +2 -2
  23. package/package.json +1 -1
  24. package/react-common/components/palette/ColorPickerField.tsx +2 -2
  25. package/react-common/components/share/Share.tsx +3 -3
  26. package/react-common/components/share/ShareInfo.tsx +18 -6
  27. package/react-common/styles/palette/ColorPickerField.less +3 -0
  28. package/webapp/public/index.html +23 -1
  29. package/webapp/public/music-editor/apple.png +0 -0
  30. package/webapp/public/music-editor/bass-clef.svg +10 -0
  31. package/webapp/public/music-editor/burger.png +0 -0
  32. package/webapp/public/music-editor/cake.png +0 -0
  33. package/webapp/public/music-editor/car.png +0 -0
  34. package/webapp/public/music-editor/cat.png +0 -0
  35. package/webapp/public/music-editor/cherry.png +0 -0
  36. package/webapp/public/music-editor/clam.png +0 -0
  37. package/webapp/public/music-editor/computer.png +0 -0
  38. package/webapp/public/music-editor/crab.png +0 -0
  39. package/webapp/public/music-editor/dog.png +0 -0
  40. package/webapp/public/music-editor/duck.png +0 -0
  41. package/webapp/public/music-editor/egg.png +0 -0
  42. package/webapp/public/music-editor/explosion.png +0 -0
  43. package/webapp/public/music-editor/fish.png +0 -0
  44. package/webapp/public/music-editor/ice-cream.png +0 -0
  45. package/webapp/public/music-editor/lemon.png +0 -0
  46. package/webapp/public/music-editor/snake.png +0 -0
  47. package/webapp/public/music-editor/star.png +0 -0
  48. package/webapp/public/music-editor/strawberry.png +0 -0
  49. package/webapp/public/music-editor/taco.png +0 -0
  50. package/webapp/public/music-editor/treble-clef.svg +1 -0
  51. package/webapp/public/skillmap.html +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pxt-core",
3
- "version": "8.6.2",
3
+ "version": "8.6.4",
4
4
  "description": "Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors",
5
5
  "keywords": [
6
6
  "TypeScript",
@@ -45,7 +45,7 @@ export const ColorPickerField = (props: ColorPickerFieldProps) => {
45
45
  <input className="color-input" type="color" value={currentColor || color} onBlur={onBlur} onChange={onColorPickerChanged} />
46
46
  <Input initialValue={currentColor || color.toUpperCase()} onChange={onTextInputChanged} />
47
47
  </div>
48
- <Button className="circle-button" title={lf("Move color up")} leftIcon="fas fa-arrow-up" onClick={() => onMoveColor(true)} />
49
- <Button className="circle-button" title={lf("Move color down")} leftIcon="fas fa-arrow-down" onClick={() => onMoveColor(false)} />
48
+ <Button className="circle-button" title={lf("Move color up")} leftIcon="fas fa-arrow-up" onClick={() => onMoveColor(true)} disabled={index === 1}/>
49
+ <Button className="circle-button" title={lf("Move color down")} leftIcon="fas fa-arrow-down" onClick={() => onMoveColor(false)} disabled={index === 15}/>
50
50
  </div>
51
51
  }
@@ -23,7 +23,7 @@ export interface ShareProps {
23
23
  hasProjectBeenPersistentShared?: boolean;
24
24
  anonymousShareByDefault?: boolean;
25
25
  isMultiplayerGame?: boolean; // Arcade: Does the game being shared have multiplayer enabled?
26
- forMultiplayer?: boolean; // Arcade: Was the share dialog opened specifically for hosting a multiplayer game?
26
+ kind?: "multiplayer" | "vscode" | "share"; // Arcade: Was the share dialog opened specifically for hosting a multiplayer game?
27
27
  setAnonymousSharePreference?: (anonymousByDefault: boolean) => void;
28
28
  simRecorder: SimRecorder;
29
29
  publishAsync: (name: string, screenshotUri?: string, forceAnonymous?: boolean) => Promise<ShareData>;
@@ -41,7 +41,7 @@ export const Share = (props: ShareProps) => {
41
41
  anonymousShareByDefault,
42
42
  setAnonymousSharePreference,
43
43
  isMultiplayerGame,
44
- forMultiplayer,
44
+ kind,
45
45
  onClose
46
46
  } = props;
47
47
 
@@ -52,7 +52,7 @@ export const Share = (props: ShareProps) => {
52
52
  simRecorder={simRecorder}
53
53
  publishAsync={publishAsync}
54
54
  isMultiplayerGame={isMultiplayerGame}
55
- forMultiplayer={forMultiplayer}
55
+ kind={kind}
56
56
  hasProjectBeenPersistentShared={hasProjectBeenPersistentShared}
57
57
  anonymousShareByDefault={anonymousShareByDefault}
58
58
  setAnonymousSharePreference={setAnonymousSharePreference}
@@ -13,6 +13,7 @@ import { SimRecorder } from "./ThumbnailRecorder";
13
13
  import { MultiplayerConfirmation } from "./MultiplayerConfirmation";
14
14
  import { addGameToKioskAsync } from "./Kiosk";
15
15
  import { pushNotificationMessage } from "../Notification";
16
+ import { classList } from "../util";
16
17
 
17
18
  export interface ShareInfoProps {
18
19
  projectName: string;
@@ -23,7 +24,7 @@ export interface ShareInfoProps {
23
24
  simRecorder: SimRecorder;
24
25
  publishAsync: (name: string, screenshotUri?: string, forceAnonymous?: boolean) => Promise<ShareData>;
25
26
  isMultiplayerGame?: boolean; // Arcade: Does the game being shared have multiplayer enabled?
26
- forMultiplayer?: boolean; // Arcade: Was the share dialog opened specifically for hosting a multiplayer game?
27
+ kind?: "multiplayer" | "vscode" | "share"; // Arcade: Was the share dialog opened specifically for hosting a multiplayer game?
27
28
  anonymousShareByDefault?: boolean;
28
29
  setAnonymousSharePreference?: (anonymousByDefault: boolean) => void;
29
30
  onClose: () => void;
@@ -41,7 +42,7 @@ export const ShareInfo = (props: ShareInfoProps) => {
41
42
  anonymousShareByDefault,
42
43
  setAnonymousSharePreference,
43
44
  isMultiplayerGame,
44
- forMultiplayer,
45
+ kind,
45
46
  onClose,
46
47
  } = props;
47
48
  const [ name, setName ] = React.useState(projectName);
@@ -236,7 +237,7 @@ export const ShareInfo = (props: ShareInfoProps) => {
236
237
  if (!publishedShareData?.error) setShareState("publish");
237
238
  else setShareState("share")
238
239
 
239
- if (forMultiplayer) {
240
+ if (kind === "multiplayer") {
240
241
  // If we're in the "for multiplayer" context, we want to close the share dialog after launching the multiplayer session.
241
242
  onClose();
242
243
  }
@@ -350,18 +351,29 @@ export const ShareInfo = (props: ShareInfoProps) => {
350
351
  <div className="project-share-publish-actions">
351
352
  {shareState === "share" &&
352
353
  <>
353
- {pxt.appTarget?.appTheme?.multiplayer && (isMultiplayerGame || forMultiplayer) &&
354
- <Button className={(forMultiplayer ? "primary share-publish-button share-host-button" : "primary inverted text-only share-publish-button share-host-button")}
354
+ {pxt.appTarget?.appTheme?.multiplayer && (isMultiplayerGame || kind === "multiplayer") &&
355
+ <Button className={
356
+ classList(
357
+ "primary share-host-button",
358
+ kind === "share" && "primary inverted text-only",
359
+ kind === "multiplayer" && "share-publish-button"
360
+ )
361
+ }
355
362
  title={lf("Host a multiplayer game")}
356
363
  label={lf("Host a multiplayer game")}
357
364
  leftIcon={"xicon multiplayer"}
358
365
  onClick={handleMultiplayerShareClick} />
359
366
  }
360
- {!forMultiplayer && <Button className="primary share-publish-button"
367
+ {kind === "share" && <Button className="primary share-publish-button"
361
368
  title={lf("Share Project")}
362
369
  label={lf("Share Project")}
363
370
  onClick={handlePublishClick} />
364
371
  }
372
+ {kind === "vscode" && <Button className="primary share-publish-button"
373
+ title={lf("Open in VS Code")}
374
+ label={lf("Open in VS Code")}
375
+ onClick={handlePublishClick} />
376
+ }
365
377
  </>
366
378
  }
367
379
  { shareState === "publishing" &&
@@ -3,6 +3,9 @@
3
3
  grid-template-columns: 0.5fr 8fr 1fr 1fr;
4
4
  align-items: center;
5
5
  padding: 0.1rem 0rem;
6
+ i.fas {
7
+ margin: 0;
8
+ }
6
9
  }
7
10
 
8
11
  .common-color-inputs {
@@ -107,7 +107,29 @@
107
107
  "rtlblockly.css": "/blb/rtlblockly.css",
108
108
  "gifjs/gif.js": "/blb/gifjs/gif.js",
109
109
  "qrcode/qrcode.min.js": "/blb/qrcode/qrcode.min.js",
110
- "zip.js/zip.min.js": "/blb/zip.js/zip.min.js"
110
+ "zip.js/zip.min.js": "/blb/zip.js/zip.min.js",
111
+ "music-editor/apple.png": "/blb/music-editor/apple.png",
112
+ "music-editor/burger.png": "/blb/music-editor/burger.png",
113
+ "music-editor/cake.png": "/blb/music-editor/cake.png",
114
+ "music-editor/car.png": "/blb/music-editor/car.png",
115
+ "music-editor/cat.png": "/blb/music-editor/cat.png",
116
+ "music-editor/cherry.png": "/blb/music-editor/cherry.png",
117
+ "music-editor/clam.png": "/blb/music-editor/clam.png",
118
+ "music-editor/computer.png": "/blb/music-editor/computer.png",
119
+ "music-editor/crab.png": "/blb/music-editor/crab.png",
120
+ "music-editor/dog.png": "/blb/music-editor/dog.png",
121
+ "music-editor/duck.png": "/blb/music-editor/duck.png",
122
+ "music-editor/egg.png": "/blb/music-editor/egg.png",
123
+ "music-editor/explosion.png": "/blb/music-editor/explosion.png",
124
+ "music-editor/fish.png": "/blb/music-editor/fish.png",
125
+ "music-editor/ice-cream.png": "/blb/music-editor/ice-cream.png",
126
+ "music-editor/lemon.png": "/blb/music-editor/lemon.png",
127
+ "music-editor/snake.png": "/blb/music-editor/snake.png",
128
+ "music-editor/star.png": "/blb/music-editor/star.png",
129
+ "music-editor/strawberry.png": "/blb/music-editor/strawberry.png",
130
+ "music-editor/taco.png": "/blb/music-editor/taco.png",
131
+ "music-editor/bass-clef.svg": "/blb/music-editor/bass-clef.svg",
132
+ "music-editor/treble-clef.svg": "/blb/music-editor/treble-clef.svg",
111
133
  }
112
134
  </script>
113
135
  </body>
@@ -0,0 +1,10 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="112mm" height="132mm" style="shape-rendering:geometricPrecision;text-rendering:geometricPrecision;image-rendering:optimizeQuality;fill-rule:evenodd" viewBox="0 0 8268 11692" id="svg2">
2
+ <defs id="defs4">
3
+ <style type="text/css" id="style6">
4
+ .str0{stroke:#131516;stroke-width:42}.fil0{fill:none}
5
+ </style>
6
+ </defs>
7
+ <g id="Layer 1" transform="matrix(4.58848 0 0 4.57504 -4898.431 -28736.72)">
8
+ <path d="M1239 8245c158-107 276-188 352-244 76-55 156-124 238-206s151-175 207-278c44-76 82-164 113-264 31-99 47-195 50-286 0-85-11-166-34-242-22-77-60-140-114-191-54-50-124-75-211-75-84 0-163 17-237 50-73 34-125 88-154 164 0 7-4 16-10 29 2 16 10 28 25 37s28 13 40 13c6 0 23-3 49-9 27-6 49-10 67-10 53 0 100 19 143 56 42 37 63 82 63 135 0 38-11 74-32 107s-50 60-87 79c-37 20-78 29-122 29-80 0-148-24-204-73-55-50-83-113-83-192 0-101 31-188 92-262 62-74 140-129 236-166 95-38 191-56 289-56 107 0 209 27 304 82 96 54 171 129 227 222 56 94 85 194 85 302 0 192-64 370-192 535s-286 308-475 430c-126 83-330 195-611 336l-14-52zm1389-1547c0-36 13-66 39-90 25-25 56-37 93-37 32 0 62 14 89 41 27 26 40 57 40 91 0 36-14 67-40 92-28 24-59 36-94 36-37 0-67-12-91-39-24-26-36-57-36-94zm0 524c0-36 13-67 37-91 25-25 56-37 95-37 32 0 61 13 89 40 26 27 40 56 40 88 0 39-13 70-38 95-26 25-56 38-91 38-39 0-70-13-95-37-24-24-37-56-37-96z" id="path19" style="fill:#131516;stroke:#131516;stroke-width:3"/>
9
+ </g>
10
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="110mm" height="216mm" style="shape-rendering:geometricPrecision;text-rendering:geometricPrecision;image-rendering:optimizeQuality;fill-rule:evenodd" viewBox="0 0 8268 11692" id="svg2"><defs id="defs4"><style type="text/css" id="style6">.str1{stroke:#131516;stroke-width:42}.fil1{fill:none}</style></defs><g id="Layer 1" transform="matrix(3.81735 0 0 3.8081 -3380.452 -23251.63)"><path d="M2002 7851c-61 17-116 55-167 113-51 59-76 124-76 194 0 44 15 94 44 147 29 54 73 93 130 118 19 4 28 14 28 28 0 5-7 10-24 14-91-23-166-72-224-145-58-74-88-158-90-254 3-103 34-199 93-287 60-89 137-152 231-189l-69-355c-154 128-279 261-376 401-97 139-147 290-151 453 2 73 17 144 45 212 28 69 70 131 126 188 113 113 260 172 439 178 61-4 126-15 196-33l-155-783zm72-10 156 769c154-62 231-197 231-403-9-69-29-131-63-186-33-56-77-100-133-132s-119-48-191-48zm-205-1040c33-20 71-55 112-104 41-48 81-105 119-169 39-65 70-131 93-198 23-66 34-129 34-187 0-25-2-50-7-72-4-36-15-64-34-83-19-18-43-28-73-28-60 0-114 37-162 111-37 64-68 140-90 226-23 87-36 173-38 260 5 99 21 180 46 244zm-63 58c-45-162-70-327-75-495 1-108 12-209 33-303 20-94 49-175 87-245 37-70 80-123 128-159 43-32 74-49 91-49 13 0 24 5 34 14s23 24 39 44c119 169 179 373 179 611 0 113-15 223-45 333-29 109-72 213-129 310-58 98-126 183-205 256l81 394c44-5 74-9 91-9 76 0 144 16 207 48s117 75 161 130c44 54 78 116 102 186 23 70 36 143 36 219 0 118-31 226-93 323s-155 168-280 214c8 49 22 120 43 211 20 92 35 165 45 219s14 106 14 157c0 79-19 149-57 211-39 62-91 110-157 144-65 34-137 51-215 51-110 0-206-31-288-92-82-62-126-145-130-251 3-47 14-91 34-133s47-76 82-102c34-27 75-41 122-44 39 0 76 11 111 32 34 22 62 51 83 88 20 37 31 78 31 122 0 59-20 109-60 150s-91 62-152 62h-23c39 60 103 91 192 91 45 0 91-10 137-28 47-19 86-44 119-76s55-66 64-102c17-41 25-98 25-169 0-48-5-96-14-144-9-47-23-110-42-188-19-77-33-137-41-178-60 15-122 23-187 23-109 0-212-22-309-67s-182-107-256-187c-73-80-130-170-171-272-40-101-61-207-62-317 4-102 23-200 59-292 36-93 82-181 139-263s116-157 177-224c62-66 143-151 245-254z" id="path9" style="fill:#131516;stroke:#131516;stroke-width:3"/></g></svg>
@@ -7,7 +7,7 @@
7
7
  <link rel="stylesheet" data-rtl="/blb/rtlsemantic.css" href="/blb/semantic.css">
8
8
  <link rel="stylesheet" href="/blb/icons.css">
9
9
  <link rel="stylesheet" href="/blb/react-common-skillmap.css">
10
- <script defer="defer" src="/blb/skillmap/js/main.a715c76c.js"></script><link href="/blb/skillmap/css/main.06a18ee8.css" rel="stylesheet"></head>
10
+ <script defer="defer" src="/blb/skillmap/js/main.2dfa3448.js"></script><link href="/blb/skillmap/css/main.06a18ee8.css" rel="stylesheet"></head>
11
11
  <body>
12
12
  <noscript>You need to enable JavaScript to run this app.</noscript>
13
13