pxt-core 7.4.16 → 7.4.20

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 (54) hide show
  1. package/built/backendutils.js +5 -6
  2. package/built/buildengine.js +1 -1
  3. package/built/gdb.js +1 -1
  4. package/built/pxt.js +5 -6
  5. package/built/pxtblockly.js +29 -17
  6. package/built/pxtblocks.js +17 -5
  7. package/built/pxteditor.d.ts +7 -1
  8. package/built/pxteditor.js +5 -0
  9. package/built/pxtlib.js +5 -6
  10. package/built/target.js +1 -1
  11. package/built/web/main.js +1 -1
  12. package/built/web/pxtapp.js +1 -1
  13. package/built/web/pxtasseteditor.js +1 -1
  14. package/built/web/pxtblockly.js +2 -2
  15. package/built/web/pxtblocks.js +1 -1
  16. package/built/web/pxteditor.js +1 -1
  17. package/built/web/pxtembed.js +2 -2
  18. package/built/web/pxtlib.js +1 -1
  19. package/built/web/pxtworker.js +1 -1
  20. package/built/web/react-common-skillmap.css +1 -1
  21. package/built/web/rtlreact-common-skillmap.css +1 -1
  22. package/built/web/rtlsemantic.css +1 -1
  23. package/built/web/semantic.css +1 -1
  24. package/built/web/skillmap/css/main.4939cd1e.chunk.css +1 -0
  25. package/built/web/skillmap/js/2.f7cdfd75.chunk.js +2 -0
  26. package/built/web/skillmap/js/main.2a4cb15b.chunk.js +1 -0
  27. package/localtypings/pxtarget.d.ts +1 -0
  28. package/package.json +2 -2
  29. package/react-common/components/controls/Button.tsx +7 -3
  30. package/react-common/components/controls/FocusTrap.tsx +30 -4
  31. package/react-common/components/controls/MenuBar.tsx +8 -1
  32. package/react-common/components/controls/Modal.tsx +5 -2
  33. package/react-common/components/profile/BadgeInfo.tsx +9 -2
  34. package/react-common/components/profile/BadgeList.tsx +5 -5
  35. package/react-common/components/profile/Profile.tsx +5 -0
  36. package/react-common/components/profile/UserPane.tsx +1 -1
  37. package/react-common/components/types.d.ts +1 -0
  38. package/react-common/components/util.tsx +1 -0
  39. package/react-common/styles/controls/Button.less +16 -0
  40. package/react-common/styles/controls/Checkbox.less +11 -0
  41. package/react-common/styles/controls/Input.less +19 -1
  42. package/react-common/styles/controls/MenuDropdown.less +20 -1
  43. package/react-common/styles/controls/Modal.less +30 -1
  44. package/react-common/styles/profile/profile.less +20 -0
  45. package/react-common/styles/react-common-variables.less +11 -0
  46. package/theme/highcontrast.less +31 -9
  47. package/theme/tutorial-sidebar.less +97 -14
  48. package/theme/tutorial.less +16 -8
  49. package/webapp/public/blockly/blockly_compressed.js +6 -6
  50. package/webapp/public/blockly/blocks_compressed.js +6 -6
  51. package/webapp/public/skillmap.html +2 -2
  52. package/built/web/skillmap/css/main.51937f05.chunk.css +0 -1
  53. package/built/web/skillmap/js/2.261d5eab.chunk.js +0 -2
  54. package/built/web/skillmap/js/main.1f690147.chunk.js +0 -1
@@ -21,7 +21,7 @@ export const UserPane = (props: UserPaneProps) => {
21
21
  const emailLabel = <>
22
22
  {emailChecked === CheckboxStatus.Waiting ? <div className="common-spinner" /> : undefined}
23
23
  {lf("I would like to receive the MakeCode newsletter. ")}
24
- <a href="https://makecode.com/privacy" target="_blank" rel="noopener noreferrer">{lf("View Privacy Statement")}</a>
24
+ <a href="https://makecode.com/privacy" target="_blank" rel="noopener noreferrer" tabIndex={0}>{lf("View Privacy Statement")}</a>
25
25
  </>
26
26
 
27
27
  return <div className="profile-user-pane">
@@ -26,4 +26,5 @@ interface DialogOptions {
26
26
  confirmationText?: string; // Display a text input the user must type to confirm.
27
27
  confirmationCheckbox?: string; // Display a checkbox the user must check to confirm.
28
28
  confirmationGranted?: boolean;
29
+ onClose?: () => void;
29
30
  }
@@ -5,6 +5,7 @@ export interface ControlProps {
5
5
  className?: string;
6
6
  ariaLabel?: string;
7
7
  ariaHidden?: boolean;
8
+ ariaDescribedBy?: string;
8
9
  role?: string;
9
10
  }
10
11
 
@@ -176,3 +176,19 @@
176
176
  color: @buttonMenuTextColorInverted;
177
177
  }
178
178
 
179
+ /****************************************************
180
+ * High Contrast *
181
+ ****************************************************/
182
+
183
+ .high-contrast, .hc {
184
+ .common-button {
185
+ color: @highContrastTextColor !important;
186
+ background: @highContrastBackgroundColor !important;
187
+ border-color: @highContrastTextColor !important;
188
+
189
+ &:hover, &:focus {
190
+ outline: @highContrastFocusOutline !important;
191
+ z-index: @highContrastFocusZIndex;
192
+ }
193
+ }
194
+ }
@@ -10,4 +10,15 @@
10
10
  .common-checkbox:focus-within {
11
11
  outline: @checkboxFocusOutline;
12
12
  border-radius: 0.2em;
13
+ }
14
+
15
+ /****************************************************
16
+ * High Contrast *
17
+ ****************************************************/
18
+
19
+ .high-contrast {
20
+ .common-checkbox:hover,
21
+ .common-checkbox:focus-within {
22
+ outline: @highContrastFocusOutline;
23
+ }
13
24
  }
@@ -92,4 +92,22 @@
92
92
  i {
93
93
  color: @inputTextColorDisabled;
94
94
  }
95
- }
95
+ }
96
+
97
+ /****************************************************
98
+ * High Contrast *
99
+ ****************************************************/
100
+
101
+ .high-contrast {
102
+ .common-input {
103
+ color: @highContrastTextColor;
104
+ border-color: @highContrastTextColor;
105
+ background-color: @highContrastBackgroundColor;
106
+ }
107
+
108
+ .common-input-group:focus::after,
109
+ .common-input-group:focus-within::after {
110
+ border-color: @highContrastHighlightColor;
111
+ }
112
+
113
+ }
@@ -10,7 +10,7 @@
10
10
  .common-menu-dropdown-pane {
11
11
  position: absolute;
12
12
  right: 0;
13
- width: 10rem;
13
+ width: 12rem;
14
14
 
15
15
  ul {
16
16
  list-style: none;
@@ -29,8 +29,27 @@
29
29
  text-align: left;
30
30
  width: 100%;
31
31
  margin: 0;
32
+ padding: 1rem;
32
33
  }
33
34
 
34
35
  .common-menu-dropdown-item.common-button:focus::after {
35
36
  outline: @buttonFocusOutlineInverted;
37
+ }
38
+
39
+ /****************************************************
40
+ * High Contrast *
41
+ ****************************************************/
42
+
43
+ .high-contrast {
44
+ .common-menu-dropdown-pane {
45
+ color: @highContrastTextColor;
46
+ background-color: @highContrastBackgroundColor;
47
+ border: 1px solid @highContrastTextColor;
48
+ }
49
+
50
+ .common-menu-dropdown-item:hover,
51
+ .common-menu-dropdown > .menu-button.expanded {
52
+ outline: @highContrastFocusOutline;
53
+ z-index: @highContrastFocusZIndex;
54
+ }
36
55
  }
@@ -8,7 +8,7 @@
8
8
  right: 0;
9
9
  bottom: 0;
10
10
  background-color: var(--modal-overlay-color);
11
- z-index: var(--modal-dimmer-zindex);
11
+ z-index: @modalDimmerZIndex;
12
12
  }
13
13
 
14
14
  .common-modal-container.fullscreen {
@@ -102,4 +102,33 @@
102
102
  background-color: var(--body-background-color);
103
103
  padding: 1rem;
104
104
  max-height: unset;
105
+ }
106
+
107
+ /****************************************************
108
+ * High Contrast *
109
+ ****************************************************/
110
+
111
+ .high-contrast, .hc {
112
+ .common-modal-header,
113
+ .common-modal-body,
114
+ .common-modal-footer {
115
+ background-color: @highContrastBackgroundColor;
116
+ color: @highContrastTextColor;
117
+ border-color: @highContrastTextColor;
118
+
119
+ .common-modal-close .common-button .fas {
120
+ opacity: 1;
121
+ color: @highContrastTextColor;
122
+ }
123
+ }
124
+
125
+ .fullscreen > .common-modal > .common-modal-header,
126
+ .fullscreen > .common-modal > .common-modal-body {
127
+ background-color: @highContrastBackgroundColor;
128
+ color: @highContrastTextColor;
129
+ }
130
+
131
+ .common-modal {
132
+ border: 1px solid @highContrastTextColor;
133
+ }
105
134
  }
@@ -315,6 +315,26 @@
315
315
  }
316
316
  }
317
317
 
318
+ /****************************************************
319
+ * High Contrast *
320
+ ****************************************************/
321
+
322
+ .high-contrast {
323
+ .profile-badges .profile-badge,
324
+ .profile-badges-background .profile-badge,
325
+ .profile-badge-and-title,
326
+ .profile-initials-portrait,
327
+ .profile-badge-subtitle,
328
+ .profile-username {
329
+ color: @highContrastTextColor;
330
+ background-color: @highContrastBackgroundColor;
331
+ }
332
+
333
+ .profile-badge.clickable:hover {
334
+ outline: @highContrastFocusOutline;
335
+ }
336
+ }
337
+
318
338
  @media only screen and (max-width: 1200px) and (min-width: 992px) {
319
339
  .profile-badges, .profile-badges-background {
320
340
  background-size: 25%;
@@ -28,6 +28,7 @@
28
28
  @modalHeaderBackgroundColor: @modalBodyBackgroundColor;
29
29
  @modalFooterBackgroundColor: #f9fafb;
30
30
  @modalSeparatorBorder: 1px solid rgba(34, 36, 38, .15);
31
+ @modalDimmerZIndex: 1000;
31
32
 
32
33
 
33
34
  /****************************************************
@@ -55,3 +56,13 @@
55
56
  @inputBackgroundColorDisabled: @commonBackgroundDisabledColor;
56
57
  @inputButtonColor: rgb(0, 120, 212);
57
58
  @inputButtonColorHover: rgb(16, 110, 190);
59
+
60
+ /****************************************************
61
+ * High Contrast *
62
+ ****************************************************/
63
+
64
+ @highContrastTextColor: #ffffff;
65
+ @highContrastBackgroundColor: #000000;
66
+ @highContrastHighlightColor: #ffff00;
67
+ @highContrastFocusOutline: 2px solid @highContrastHighlightColor;
68
+ @highContrastFocusZIndex: 1;
@@ -11,6 +11,7 @@
11
11
 
12
12
  @selected: yellow;
13
13
  @disabled: #3ff23f;
14
+ @hyperlink: #807FFF;
14
15
 
15
16
  /* Messages */
16
17
  #msg .hc {
@@ -77,6 +78,10 @@
77
78
  text-decoration: underline;
78
79
  }
79
80
 
81
+ ul > li {
82
+ color: @HCtextColor;
83
+ }
84
+
80
85
  #tutorialcard .prevbutton,
81
86
  #tutorialcard .nextbutton {
82
87
  &:hover, &:focus {
@@ -498,7 +503,7 @@
498
503
  border-color: @HCtextColor;
499
504
  border-style: solid;
500
505
  }
501
- .actions {
506
+ .ui.grid.stackable .actions {
502
507
  .card-action {
503
508
  border: 2px solid @HCtextColor;
504
509
  .button.attached i {
@@ -509,6 +514,10 @@
509
514
  .card-action-title {
510
515
  color: @HCtextColor;
511
516
  }
517
+ .card-action:hover,
518
+ .card-action:focus-within {
519
+ border-color: @selected;
520
+ }
512
521
  }
513
522
  }
514
523
  }
@@ -666,7 +675,8 @@
666
675
  #assetEditor {
667
676
  .asset-editor-sidebar,
668
677
  .asset-editor-sidebar-preview,
669
- .asset-editor-preview {
678
+ .asset-editor-preview,
679
+ .asset-editor-sidebar-temp {
670
680
  color: @HCtextColor;
671
681
  background-color: @HCbackground;
672
682
  border-color: @HCtextColor;
@@ -682,7 +692,10 @@
682
692
  border-bottom: 1px solid @HCtextColor;
683
693
  }
684
694
 
685
- .asset-editor-button,
695
+ .common-button {
696
+ border: 1px solid;
697
+ }
698
+
686
699
  .asset-editor-card,
687
700
  .create-new {
688
701
  color: @HCtextColor;
@@ -695,10 +708,7 @@
695
708
  color: @HCbackground;
696
709
  }
697
710
 
698
- .delete-asset {
699
- border: 1px solid @red;
700
- }
701
-
711
+ .asset-editor-card.selected,
702
712
  .asset-editor-gallery-tab.selected,
703
713
  .asset-editor-button:hover,
704
714
  .create-new:hover {
@@ -716,7 +726,8 @@
716
726
 
717
727
  /* Hyperlinks */
718
728
  a {
719
- color: @HCtextColor !important;
729
+ color: @hyperlink !important;
730
+ text-decoration: underline !important;
720
731
  }
721
732
 
722
733
  #sidedocsbar {
@@ -809,7 +820,7 @@
809
820
  }
810
821
  }
811
822
 
812
- .tutorialhint {
823
+ .tutorialhint, .tutorial-hint .tutorial-callout {
813
824
  border-color: @HCtextColor;
814
825
  background-color: @HCbackground;
815
826
  color: @HCtextColor;
@@ -856,6 +867,17 @@
856
867
  border-color: @selected !important;
857
868
  }
858
869
 
870
+ .formatted-bullet {
871
+ background: linear-gradient(@HCtextColor, @HCtextColor) ~"no-repeat 45%/2px 100%";
872
+ i.icon, i.xicon {
873
+ color: @HCbackground;
874
+ background-color: @HCtextColor;
875
+ }
876
+ &:after {
877
+ border-color: @HCtextColor !important;
878
+ }
879
+ }
880
+
859
881
 
860
882
  /* Modals */
861
883
  .ui.modal {
@@ -4,6 +4,8 @@
4
4
 
5
5
  @tutorialPrimaryColor: @teal;
6
6
  @tutorialSecondaryColor: @blue;
7
+ @tutorialLinkColor: #0064BF;
8
+ @tutorialLinkHoverColor: #003C94;
7
9
 
8
10
  @tutorialTabletButtonColor: #f3f3f3;
9
11
  @tutorialTabletSimulatorButtonColor: rgba(0, 0, 0, 0.05);
@@ -66,6 +68,10 @@
66
68
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), @white);
67
69
  }
68
70
 
71
+ .tutorial-replace-code + .tutorial-scroll-gradient {
72
+ bottom: 9rem;
73
+ }
74
+
69
75
  .tutorial-container,
70
76
  .tutorial-controls {
71
77
  .ui.button, .ui.button:hover {
@@ -188,7 +194,7 @@
188
194
  Tutorial Hint
189
195
  *******************************/
190
196
 
191
- .tutorial-hint.ui.button {
197
+ .tutorial-hint .ui.button {
192
198
  height: 3.2rem;
193
199
  width: 3.2rem;
194
200
  margin: 0;
@@ -196,8 +202,8 @@
196
202
  font-size: @tutorialTitleFontSize;
197
203
  }
198
204
 
199
- .tutorial-hint.ui.button,
200
- .tutorial-hint.ui.button > i {
205
+ .tutorial-hint .ui.button,
206
+ .tutorial-hint .ui.button > i {
201
207
  display: flex;
202
208
  align-items: center;
203
209
  justify-content: center;
@@ -205,7 +211,7 @@
205
211
 
206
212
  // Overrides, largely using old tutorial hint CSS
207
213
  .tab-tutorial {
208
- .tutorialhint {
214
+ .tutorial-callout {
209
215
  position: fixed;
210
216
  top: unset;
211
217
  right: unset;
@@ -214,15 +220,32 @@
214
220
  max-width: 50%;
215
221
  }
216
222
 
217
- .tutorialhint:before {
223
+ .tutorial-callout:before {
218
224
  top: auto;
219
225
  left: 6.5rem;
220
226
  bottom: -2.5rem;
221
227
  transform: rotate(-90deg);
222
228
  }
229
+
230
+ .tutorial-callout-close.ui.button {
231
+ position: absolute;
232
+ right: 1rem;
233
+ padding: 0;
234
+ width: 1.5rem;
235
+ height: 1.5rem;
236
+ color: @white;
237
+ background-color: #000;
238
+ border-radius: 50%;
239
+
240
+ i.icon {
241
+ opacity: 1;
242
+ font-size: 1rem;
243
+ margin: 0 !important;
244
+ }
245
+ }
223
246
  }
224
247
 
225
- .tutorial-hint-mask {
248
+ .tutorial-callout-mask {
226
249
  position: fixed;
227
250
  top: 0;
228
251
  left: 0;
@@ -274,6 +297,41 @@
274
297
  border-bottom: 2px solid @tutorialPrimaryColor;
275
298
  }
276
299
 
300
+ /*******************************
301
+ Tutorial Replace Code
302
+ *******************************/
303
+ .tutorial-replace-code {
304
+ display: flex;
305
+ justify-content: center;
306
+ font-family: @segoeUIFont;
307
+
308
+ .tutorial-callout-button.ui.button {
309
+ padding: 0;
310
+ margin: 0 0 2rem;
311
+ color: @tutorialLinkColor;
312
+ background: none transparent;
313
+ font-family: @segoeUIFont;
314
+ font-weight: 500;
315
+ }
316
+
317
+ .tutorial-callout-button.ui.button:hover,
318
+ .tutorial-callout-button.ui.button:focus {
319
+ color: @tutorialLinkHoverColor;
320
+ }
321
+
322
+ .tutorial-callout {
323
+ bottom: 13.5rem;
324
+ padding: 1rem;
325
+ max-width: 32rem;
326
+ }
327
+
328
+ .tutorial-replace-code-actions {
329
+ display: flex;
330
+ justify-content: flex-end;
331
+ }
332
+ }
333
+
334
+
277
335
  /*******************************
278
336
  Simulator Tab
279
337
  *******************************/
@@ -419,6 +477,7 @@
419
477
  padding: 1rem;
420
478
  }
421
479
 
480
+ .tutorial-replace-code + .tutorial-scroll-gradient,
422
481
  .tutorial-scroll-gradient {
423
482
  width: calc(~'100% - 15rem');
424
483
  bottom: 0;
@@ -482,8 +541,6 @@
482
541
  flex-direction: column;
483
542
  align-items: center;
484
543
  justify-content: center;
485
- width: 4rem;
486
- height: unset;
487
544
  margin: 0;
488
545
  font-size: 1rem;
489
546
 
@@ -491,7 +548,6 @@
491
548
  display: flex;
492
549
  align-items: center;
493
550
  justify-content: center;
494
- margin-bottom: 0.5rem!important;
495
551
  font-size: 2rem;
496
552
  }
497
553
 
@@ -516,6 +572,10 @@
516
572
  }
517
573
  }
518
574
 
575
+ .tutorial-container > .ui.button i.icon {
576
+ margin-bottom: 0.5rem!important;
577
+ }
578
+
519
579
  /*******************************
520
580
  Tutorial Hint
521
581
  *******************************/
@@ -526,8 +586,7 @@
526
586
  margin: 0;
527
587
  }
528
588
 
529
- .tutorial-hint.ui.button {
530
- border-radius: 0.2rem;
589
+ .tutorial-hint .tutorial-callout-button.ui.button {
531
590
  color: @tutorialPrimaryColor;
532
591
  background: @tutorialSecondaryColor;
533
592
  margin: 1rem;
@@ -539,7 +598,7 @@
539
598
 
540
599
  // Overrides
541
600
  .tab-tutorial {
542
- .tutorialhint {
601
+ .tutorial-callout {
543
602
  top: 18.5rem;
544
603
  right: 1.6rem;
545
604
  bottom: unset;
@@ -547,7 +606,7 @@
547
606
  max-width: 80%;
548
607
  }
549
608
 
550
- .tutorialhint:before {
609
+ .tutorial-callout:before {
551
610
  top: -2.5rem;
552
611
  left: unset;
553
612
  bottom: auto;
@@ -556,6 +615,30 @@
556
615
  }
557
616
  }
558
617
 
618
+ /*******************************
619
+ Tutorial Replace Code
620
+ *******************************/
621
+
622
+ .tutorial-replace-code {
623
+ position: absolute;
624
+ right: 4.5rem;
625
+ bottom: -0.5rem;
626
+ width: 4rem;
627
+
628
+ .tutorial-callout {
629
+ top: 22.5rem;
630
+ max-width: 32rem;
631
+ }
632
+
633
+ .tutorial-replace-code-actions .ui.button {
634
+ width: unset;
635
+ }
636
+ }
637
+
638
+ .tutorial-replace-code + .tutorial-controls > .tutorial-hint {
639
+ width: 5rem;
640
+ }
641
+
559
642
 
560
643
  /*******************************
561
644
  Simulator Tab
@@ -639,7 +722,7 @@
639
722
  background-color: @tutorialPrimaryColor;
640
723
  }
641
724
 
642
- .tutorial-hint.ui.button {
725
+ .tutorial-hint .tutorial-callout-button.ui.button {
643
726
  flex-direction: row;
644
727
  width: 12rem;
645
728
  margin: 3.5rem 1rem 0;
@@ -169,7 +169,8 @@ body#docs.tutorial {
169
169
  }
170
170
 
171
171
  #tutorialcard .tutorialmessage .content p,
172
- .tutorialhint p {
172
+ .tutorialhint p,
173
+ .tutorial-callout p {
173
174
  line-height: 1.4em !important;
174
175
  color: @tutorialSegmentColor;
175
176
  }
@@ -222,13 +223,15 @@ body#docs.tutorial {
222
223
 
223
224
  @media only screen and (min-height: 400px) {
224
225
  .hintdialog .ui.segment .blocklyPreview,
225
- .tutorialhint .ui.segment .blocklyPreview {
226
+ .tutorialhint .ui.segment .blocklyPreview,
227
+ .tutorial-callout .ui.segment .blocklyPreview {
226
228
  max-height: 45vh;
227
229
  }
228
230
  }
229
231
 
230
232
  @media only screen and (max-height: 800px) {
231
- .tutorialhint img {
233
+ .tutorialhint img,
234
+ .tutorial-callout img {
232
235
  max-height: 30vh;
233
236
  }
234
237
  }
@@ -358,7 +361,8 @@ code.lang-filterblocks {
358
361
  }
359
362
  }
360
363
 
361
- .tutorialhint {
364
+ .tutorialhint,
365
+ .tutorial-callout {
362
366
  position: absolute;
363
367
  max-width: 100%;
364
368
  min-width: 300px;
@@ -372,7 +376,8 @@ code.lang-filterblocks {
372
376
  box-shadow: 0px 0px 8px 1px rgba(0, 0, 0, .3);
373
377
  }
374
378
 
375
- .tutorialhint:before {
379
+ .tutorialhint:before,
380
+ .tutorial-callout:before {
376
381
  content: ' ';
377
382
  position: absolute;
378
383
  width: 0;
@@ -385,16 +390,19 @@ code.lang-filterblocks {
385
390
  transform: rotateZ(-135deg);
386
391
  }
387
392
 
388
- .tutorialhint > div {
393
+ .tutorialhint > div,
394
+ .tutorial-callout > div {
389
395
  max-height: 60vh;
390
396
  overflow: auto;
391
397
  }
392
398
 
393
- .tutorialhint.hidden {
399
+ .tutorialhint.hidden,
400
+ .tutorial-callout.hidden {
394
401
  display: none;
395
402
  }
396
403
 
397
- .tutorialhint .lang-blocks .segment.raised {
404
+ .tutorialhint .lang-blocks .segment.raised,
405
+ .tutorial-callout .lang-blocks .segment.raised {
398
406
  border: none;
399
407
  background: none;
400
408
  box-shadow: none;