pxt-core 10.0.21 → 10.0.23
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.
- package/built/pxt.js +12 -42
- package/built/pxtcompiler.d.ts +0 -1
- package/built/pxtcompiler.js +12 -42
- package/built/react-common/components/controls/Accordion/Accordion.d.ts +4 -0
- package/built/react-common/components/controls/Accordion/context.d.ts +11 -6
- package/built/react-common/components/util.d.ts +1 -0
- package/built/target.js +1 -1
- package/built/web/main.js +1 -1
- package/built/web/multiplayer/js/{main.0e73ac24.js → main.121cfaf0.js} +2 -2
- package/built/web/pxtasseteditor.js +1 -1
- package/built/web/pxtcompiler.js +1 -1
- package/built/web/pxtembed.js +1 -1
- package/built/web/pxtweb.js +1 -1
- package/built/web/pxtworker.js +1 -1
- package/built/web/react-common-authcode.css +1 -1
- package/built/web/react-common-multiplayer.css +1 -1
- package/built/web/react-common-skillmap.css +1 -1
- package/built/web/rtlreact-common-authcode.css +1 -1
- package/built/web/rtlreact-common-multiplayer.css +1 -1
- package/built/web/rtlreact-common-skillmap.css +1 -1
- package/built/web/rtlsemantic.css +1 -1
- package/built/web/semantic.css +1 -1
- package/built/web/skillmap/js/{main.f7e01730.js → main.e95746dc.js} +2 -2
- package/built/web/teachertool/css/main.00de32e9.css +1 -0
- package/built/web/teachertool/js/{main.dc513d1e.js → main.b94a6d6a.js} +2 -2
- package/built/web/tutorialtool/js/{main.c3bf42cf.js → main.03b71032.js} +2 -2
- package/common-docs/teachertool/catalog-shared.json +5 -0
- package/common-docs/teachertool/test/catalog-shared.json +1 -0
- package/docfiles/pxtweb/cookieCompliance.ts +15 -0
- package/package.json +1 -1
- package/react-common/components/controls/Accordion/Accordion.tsx +16 -7
- package/react-common/components/controls/Accordion/context.tsx +23 -16
- package/react-common/components/controls/EditorToggle.tsx +5 -1
- package/react-common/components/controls/FocusList.tsx +7 -38
- package/react-common/components/controls/FocusTrap.tsx +7 -7
- package/react-common/components/share/ShareInfo.tsx +8 -5
- package/react-common/components/util.tsx +21 -0
- package/react-common/styles/controls/Modal.less +3 -1
- package/react-common/styles/react-common-variables.less +1 -1
- package/react-common/styles/share/share.less +7 -0
- package/webapp/public/multiplayer.html +1 -1
- package/webapp/public/skillmap.html +1 -1
- package/webapp/public/teachertool.html +1 -1
- package/webapp/public/tutorialtool.html +1 -1
- package/built/web/teachertool/css/main.7ff56db5.css +0 -1
package/built/pxt.js
CHANGED
|
@@ -127118,13 +127118,8 @@ var ts;
|
|
|
127118
127118
|
CommentKind[CommentKind["SingleLine"] = 0] = "SingleLine";
|
|
127119
127119
|
CommentKind[CommentKind["MultiLine"] = 1] = "MultiLine";
|
|
127120
127120
|
})(CommentKind = decompiler.CommentKind || (decompiler.CommentKind = {}));
|
|
127121
|
-
decompiler.FILE_TOO_LARGE_CODE = 9266;
|
|
127122
127121
|
decompiler.DECOMPILER_ERROR = 9267;
|
|
127123
127122
|
const SK = ts.SyntaxKind;
|
|
127124
|
-
/**
|
|
127125
|
-
* Max number of blocks before we bail out of decompilation
|
|
127126
|
-
*/
|
|
127127
|
-
const MAX_BLOCKS = 1500;
|
|
127128
127123
|
const lowerCaseAlphabetStartCode = 97;
|
|
127129
127124
|
const lowerCaseAlphabetEndCode = 122;
|
|
127130
127125
|
// Bounds for decompilation of workspace comments
|
|
@@ -127409,31 +127404,18 @@ var ts;
|
|
|
127409
127404
|
}
|
|
127410
127405
|
}
|
|
127411
127406
|
catch (e) {
|
|
127412
|
-
|
|
127413
|
-
|
|
127414
|
-
|
|
127415
|
-
|
|
127416
|
-
|
|
127417
|
-
|
|
127418
|
-
|
|
127419
|
-
|
|
127420
|
-
|
|
127421
|
-
|
|
127422
|
-
|
|
127423
|
-
|
|
127424
|
-
// don't throw
|
|
127425
|
-
pxt.reportException(e);
|
|
127426
|
-
result.success = false;
|
|
127427
|
-
result.diagnostics = pxtc.patchUpDiagnostics([{
|
|
127428
|
-
file,
|
|
127429
|
-
start: file.getFullStart(),
|
|
127430
|
-
length: file.getFullWidth(),
|
|
127431
|
-
messageText: e.message,
|
|
127432
|
-
category: ts.DiagnosticCategory.Error,
|
|
127433
|
-
code: decompiler.DECOMPILER_ERROR
|
|
127434
|
-
}]);
|
|
127435
|
-
return result;
|
|
127436
|
-
}
|
|
127407
|
+
// don't throw
|
|
127408
|
+
pxt.reportException(e);
|
|
127409
|
+
result.success = false;
|
|
127410
|
+
result.diagnostics = pxtc.patchUpDiagnostics([{
|
|
127411
|
+
file,
|
|
127412
|
+
start: file.getFullStart(),
|
|
127413
|
+
length: file.getFullWidth(),
|
|
127414
|
+
messageText: e.message,
|
|
127415
|
+
category: ts.DiagnosticCategory.Error,
|
|
127416
|
+
code: decompiler.DECOMPILER_ERROR
|
|
127417
|
+
}]);
|
|
127418
|
+
return result;
|
|
127437
127419
|
}
|
|
127438
127420
|
if (n) {
|
|
127439
127421
|
emitStatementNode(n);
|
|
@@ -127541,14 +127523,6 @@ ${output}</xml>`;
|
|
|
127541
127523
|
return n.getText();
|
|
127542
127524
|
}
|
|
127543
127525
|
}
|
|
127544
|
-
function countBlock() {
|
|
127545
|
-
emittedBlocks++;
|
|
127546
|
-
if (emittedBlocks > MAX_BLOCKS) {
|
|
127547
|
-
let e = new Error(pxtc.Util.lf("Could not decompile because the script is too large"));
|
|
127548
|
-
e.programTooLarge = true;
|
|
127549
|
-
throw e;
|
|
127550
|
-
}
|
|
127551
|
-
}
|
|
127552
127526
|
// generated ids with the same entropy as blockly
|
|
127553
127527
|
function blocklyGenUid() {
|
|
127554
127528
|
const soup_ = '!#$%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
@@ -127719,16 +127693,12 @@ ${output}</xml>`;
|
|
|
127719
127693
|
const node = n;
|
|
127720
127694
|
const isShadow = shadow || node.isShadow;
|
|
127721
127695
|
const tag = isShadow ? "shadow" : "block";
|
|
127722
|
-
if (!isShadow) {
|
|
127723
|
-
countBlock();
|
|
127724
|
-
}
|
|
127725
127696
|
write(`<${tag} ${node.id ? `id="${node.id}" ` : ''}type="${pxtc.U.htmlEscape(node.type)}">`);
|
|
127726
127697
|
emitBlockNodeCore(node);
|
|
127727
127698
|
write(`</${tag}>`);
|
|
127728
127699
|
}
|
|
127729
127700
|
}
|
|
127730
127701
|
function openBlockTag(type, node) {
|
|
127731
|
-
countBlock();
|
|
127732
127702
|
const id = node && node.id;
|
|
127733
127703
|
write(`<block ${id ? `id="${node.id}" ` : ''}type="${pxtc.U.htmlEscape(type)}">`);
|
|
127734
127704
|
}
|
package/built/pxtcompiler.d.ts
CHANGED
|
@@ -236,7 +236,6 @@ declare namespace ts.pxtc.decompiler {
|
|
|
236
236
|
text: string;
|
|
237
237
|
}
|
|
238
238
|
export type Comment = MultiLineComment | SingleLineComment;
|
|
239
|
-
export const FILE_TOO_LARGE_CODE = 9266;
|
|
240
239
|
export const DECOMPILER_ERROR = 9267;
|
|
241
240
|
interface BlocklyNode {
|
|
242
241
|
kind: string;
|
package/built/pxtcompiler.js
CHANGED
|
@@ -4016,13 +4016,8 @@ var ts;
|
|
|
4016
4016
|
CommentKind[CommentKind["SingleLine"] = 0] = "SingleLine";
|
|
4017
4017
|
CommentKind[CommentKind["MultiLine"] = 1] = "MultiLine";
|
|
4018
4018
|
})(CommentKind = decompiler.CommentKind || (decompiler.CommentKind = {}));
|
|
4019
|
-
decompiler.FILE_TOO_LARGE_CODE = 9266;
|
|
4020
4019
|
decompiler.DECOMPILER_ERROR = 9267;
|
|
4021
4020
|
const SK = ts.SyntaxKind;
|
|
4022
|
-
/**
|
|
4023
|
-
* Max number of blocks before we bail out of decompilation
|
|
4024
|
-
*/
|
|
4025
|
-
const MAX_BLOCKS = 1500;
|
|
4026
4021
|
const lowerCaseAlphabetStartCode = 97;
|
|
4027
4022
|
const lowerCaseAlphabetEndCode = 122;
|
|
4028
4023
|
// Bounds for decompilation of workspace comments
|
|
@@ -4307,31 +4302,18 @@ var ts;
|
|
|
4307
4302
|
}
|
|
4308
4303
|
}
|
|
4309
4304
|
catch (e) {
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
// don't throw
|
|
4323
|
-
pxt.reportException(e);
|
|
4324
|
-
result.success = false;
|
|
4325
|
-
result.diagnostics = pxtc.patchUpDiagnostics([{
|
|
4326
|
-
file,
|
|
4327
|
-
start: file.getFullStart(),
|
|
4328
|
-
length: file.getFullWidth(),
|
|
4329
|
-
messageText: e.message,
|
|
4330
|
-
category: ts.DiagnosticCategory.Error,
|
|
4331
|
-
code: decompiler.DECOMPILER_ERROR
|
|
4332
|
-
}]);
|
|
4333
|
-
return result;
|
|
4334
|
-
}
|
|
4305
|
+
// don't throw
|
|
4306
|
+
pxt.reportException(e);
|
|
4307
|
+
result.success = false;
|
|
4308
|
+
result.diagnostics = pxtc.patchUpDiagnostics([{
|
|
4309
|
+
file,
|
|
4310
|
+
start: file.getFullStart(),
|
|
4311
|
+
length: file.getFullWidth(),
|
|
4312
|
+
messageText: e.message,
|
|
4313
|
+
category: ts.DiagnosticCategory.Error,
|
|
4314
|
+
code: decompiler.DECOMPILER_ERROR
|
|
4315
|
+
}]);
|
|
4316
|
+
return result;
|
|
4335
4317
|
}
|
|
4336
4318
|
if (n) {
|
|
4337
4319
|
emitStatementNode(n);
|
|
@@ -4439,14 +4421,6 @@ ${output}</xml>`;
|
|
|
4439
4421
|
return n.getText();
|
|
4440
4422
|
}
|
|
4441
4423
|
}
|
|
4442
|
-
function countBlock() {
|
|
4443
|
-
emittedBlocks++;
|
|
4444
|
-
if (emittedBlocks > MAX_BLOCKS) {
|
|
4445
|
-
let e = new Error(pxtc.Util.lf("Could not decompile because the script is too large"));
|
|
4446
|
-
e.programTooLarge = true;
|
|
4447
|
-
throw e;
|
|
4448
|
-
}
|
|
4449
|
-
}
|
|
4450
4424
|
// generated ids with the same entropy as blockly
|
|
4451
4425
|
function blocklyGenUid() {
|
|
4452
4426
|
const soup_ = '!#$%()*+,-./:;=?@[]^_`{|}~ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
|
|
@@ -4617,16 +4591,12 @@ ${output}</xml>`;
|
|
|
4617
4591
|
const node = n;
|
|
4618
4592
|
const isShadow = shadow || node.isShadow;
|
|
4619
4593
|
const tag = isShadow ? "shadow" : "block";
|
|
4620
|
-
if (!isShadow) {
|
|
4621
|
-
countBlock();
|
|
4622
|
-
}
|
|
4623
4594
|
write(`<${tag} ${node.id ? `id="${node.id}" ` : ''}type="${pxtc.U.htmlEscape(node.type)}">`);
|
|
4624
4595
|
emitBlockNodeCore(node);
|
|
4625
4596
|
write(`</${tag}>`);
|
|
4626
4597
|
}
|
|
4627
4598
|
}
|
|
4628
4599
|
function openBlockTag(type, node) {
|
|
4629
|
-
countBlock();
|
|
4630
4600
|
const id = node && node.id;
|
|
4631
4601
|
write(`<block ${id ? `id="${node.id}" ` : ''}type="${pxtc.U.htmlEscape(type)}">`);
|
|
4632
4602
|
}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { ContainerProps } from "../../util";
|
|
3
3
|
export interface AccordionProps extends ContainerProps {
|
|
4
|
+
multiExpand?: boolean;
|
|
5
|
+
defaultExpandedIds?: string[];
|
|
4
6
|
children?: React.ReactElement<AccordionItemProps>[] | React.ReactElement<AccordionItemProps>;
|
|
5
7
|
}
|
|
6
8
|
export interface AccordionItemProps extends ContainerProps {
|
|
7
9
|
children?: [React.ReactElement<AccordionHeaderProps>, React.ReactElement<AccordionPanelProps>];
|
|
8
10
|
noChevron?: boolean;
|
|
11
|
+
itemId?: string;
|
|
12
|
+
onExpandToggled?: (expanded: boolean) => void;
|
|
9
13
|
}
|
|
10
14
|
export interface AccordionHeaderProps extends ContainerProps {
|
|
11
15
|
}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
interface AccordionState {
|
|
3
|
-
|
|
3
|
+
multiExpand?: boolean;
|
|
4
|
+
expanded: string[];
|
|
4
5
|
}
|
|
5
|
-
export declare const AccordionProvider: ({ children }: React.PropsWithChildren<{
|
|
6
|
+
export declare const AccordionProvider: ({ multiExpand, defaultExpandedIds, children, }: React.PropsWithChildren<{
|
|
7
|
+
multiExpand?: boolean;
|
|
8
|
+
defaultExpandedIds?: string[];
|
|
9
|
+
}>) => JSX.Element;
|
|
6
10
|
declare type SetExpanded = {
|
|
7
11
|
type: "SET_EXPANDED";
|
|
8
12
|
id: string;
|
|
9
13
|
};
|
|
10
|
-
declare type
|
|
11
|
-
type: "
|
|
14
|
+
declare type RemoveExpanded = {
|
|
15
|
+
type: "REMOVE_EXPANDED";
|
|
16
|
+
id: string;
|
|
12
17
|
};
|
|
13
|
-
declare type Action = SetExpanded |
|
|
18
|
+
declare type Action = SetExpanded | RemoveExpanded;
|
|
14
19
|
export declare const setExpanded: (id: string) => SetExpanded;
|
|
15
|
-
export declare const
|
|
20
|
+
export declare const removeExpanded: (id: string) => RemoveExpanded;
|
|
16
21
|
export declare function useAccordionState(): AccordionState;
|
|
17
22
|
export declare function useAccordionDispatch(): (action: Action) => void;
|
|
18
23
|
export {};
|
|
@@ -24,3 +24,4 @@ export interface ClientCoordinates {
|
|
|
24
24
|
}
|
|
25
25
|
export declare function clientCoord(ev: PointerEvent | MouseEvent | TouchEvent): ClientCoordinates;
|
|
26
26
|
export declare function screenToSVGCoord(ref: SVGSVGElement, coord: ClientCoordinates): DOMPoint;
|
|
27
|
+
export declare function findNextFocusableElement(elements: HTMLElement[], focusedIndex: number, index: number, forward: boolean, isFocusable?: (e: HTMLElement) => boolean): HTMLElement;
|