pxt-core 10.3.4 → 10.3.6
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/cli.js +16 -5
- package/built/prepYotta.js +2 -2
- package/built/pxt.js +17 -5
- package/built/pxtblocks/fields/field_utils.d.ts +1 -0
- package/built/pxtblocks/plugins/comments/blockComment.d.ts +3 -0
- package/built/pxtblocks/plugins/comments/bubble.d.ts +1 -0
- package/built/pxtblocks/plugins/comments/textinput_bubble.d.ts +6 -0
- package/built/pxtlib.js +1 -0
- package/built/react-common/components/controls/Input.d.ts +1 -0
- package/built/target.js +1 -1
- package/built/tests/blocksrunner.js +165 -52
- package/built/tests/blockssetup.js +165 -52
- package/built/web/main.js +1 -1
- package/built/web/multiplayer/js/{main.06600d76.js → main.d7077ff8.js} +2 -2
- package/built/web/pxtapp.js +1 -1
- package/built/web/pxtasseteditor.js +1 -1
- package/built/web/pxtembed.js +1 -1
- package/built/web/pxtlib.js +1 -1
- package/built/web/pxtworker.js +1 -1
- package/built/web/runnerembed.js +1 -1
- package/built/web/skillmap/js/{main.c31cb548.js → main.14978cef.js} +2 -2
- package/built/web/teachertool/js/{main.78692989.js → main.a8296247.js} +2 -2
- package/common-docs/reference/text/char-at.md +1 -0
- package/common-docs/reference/text/char-code-at.md +33 -0
- package/common-docs/teachertool/catalog-shared.json +6 -6
- package/localtypings/pxtarget.d.ts +1 -0
- package/package.json +1 -1
- package/react-common/components/controls/Input.tsx +9 -4
- package/webapp/public/multiplayer.html +1 -1
- package/webapp/public/skillmap.html +1 -1
- package/webapp/public/teachertool.html +1 -1
package/built/cli.js
CHANGED
|
@@ -2682,6 +2682,7 @@ class SnippetHost {
|
|
|
2682
2682
|
class Host {
|
|
2683
2683
|
constructor() {
|
|
2684
2684
|
this.fileOverrides = {};
|
|
2685
|
+
this.queue = new pxt.Util.PromiseQueue();
|
|
2685
2686
|
}
|
|
2686
2687
|
resolve(module, filename) {
|
|
2687
2688
|
//pxt.debug(`resolving ${module.level}:${module.id} -- ${filename} in ${path.resolve(".")}`)
|
|
@@ -2813,9 +2814,19 @@ class Host {
|
|
|
2813
2814
|
if (useCompileServiceDocker) {
|
|
2814
2815
|
return build.compileWithLocalCompileService(extInfo);
|
|
2815
2816
|
}
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
.
|
|
2817
|
+
return this.queue.enqueue("getHexInfoAsync", async () => {
|
|
2818
|
+
const prevVariant = pxt.appTargetVariant;
|
|
2819
|
+
if (extInfo.appVariant && extInfo.appVariant !== prevVariant) {
|
|
2820
|
+
pxt.setAppTargetVariant(extInfo.appVariant, { temporary: true });
|
|
2821
|
+
}
|
|
2822
|
+
setBuildEngine();
|
|
2823
|
+
await build.buildHexAsync(build.thisBuild, mainPkg, extInfo, forceBuild);
|
|
2824
|
+
const res = build.thisBuild.patchHexInfo(extInfo);
|
|
2825
|
+
if (extInfo.appVariant && extInfo.appVariant !== prevVariant) {
|
|
2826
|
+
pxt.setAppTargetVariant(prevVariant);
|
|
2827
|
+
}
|
|
2828
|
+
return res;
|
|
2829
|
+
});
|
|
2819
2830
|
}
|
|
2820
2831
|
cacheStoreAsync(id, val) {
|
|
2821
2832
|
mkHomeDirs();
|
|
@@ -4396,7 +4407,7 @@ function buildCoreAsync(buildOpts) {
|
|
|
4396
4407
|
});
|
|
4397
4408
|
}
|
|
4398
4409
|
async function staticpkgAsync(parsed) {
|
|
4399
|
-
var _a, _b;
|
|
4410
|
+
var _a, _b, _c, _d;
|
|
4400
4411
|
const route = parsed.flags["route"] || "/";
|
|
4401
4412
|
const ghpages = parsed.flags["githubpages"];
|
|
4402
4413
|
const builtPackaged = parsed.flags["output"] || "built/packaged";
|
|
@@ -4418,7 +4429,7 @@ async function staticpkgAsync(parsed) {
|
|
|
4418
4429
|
if (locs) {
|
|
4419
4430
|
await internalGenDocsAsync(false, true);
|
|
4420
4431
|
if (locsSrc) {
|
|
4421
|
-
const languages = (_b = (_a = pxt.appTarget) === null || _a === void 0 ? void 0 : _a.appTheme) === null || _b === void 0 ? void 0 : _b.availableLocales.filter(langId => nodeutil.existsDirSync(path.join(locsSrc, langId)));
|
|
4432
|
+
const languages = (_d = (_c = (_b = (_a = pxt.appTarget) === null || _a === void 0 ? void 0 : _a.appTheme) === null || _b === void 0 ? void 0 : _b.availableLocales) === null || _c === void 0 ? void 0 : _c.filter(langId => nodeutil.existsDirSync(path.join(locsSrc, langId)))) !== null && _d !== void 0 ? _d : [];
|
|
4422
4433
|
await crowdin.buildAllTranslationsAsync(async (fileName) => {
|
|
4423
4434
|
const output = {};
|
|
4424
4435
|
for (const langId of languages) {
|
package/built/prepYotta.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
const os = require("os");
|
|
5
5
|
const path = require("path");
|
|
6
6
|
const fs = require("fs");
|
|
7
|
-
const token = process.env["
|
|
8
|
-
if (process.env["
|
|
7
|
+
const token = process.env["GITHUB_ACCESS_TOKEN"];
|
|
8
|
+
if (process.env["GITHUB_ACCESS_TOKEN"]) {
|
|
9
9
|
console.log("Writing .netrc and .yotta/config.json");
|
|
10
10
|
const home = os.homedir();
|
|
11
11
|
const yottaDir = path.join(home, ".yotta");
|
package/built/pxt.js
CHANGED
|
@@ -114004,6 +114004,7 @@ var pxt;
|
|
|
114004
114004
|
pxt.setAppTargetVariant(prevVariant, { temporary: true });
|
|
114005
114005
|
}
|
|
114006
114006
|
}
|
|
114007
|
+
einfo.appVariant = variant;
|
|
114007
114008
|
const inf = target.isNative ? await this.host().getHexInfoAsync(einfo) : null;
|
|
114008
114009
|
einfo = pxt.U.flatClone(einfo);
|
|
114009
114010
|
if (!target.keepCppFiles) {
|
|
@@ -163320,6 +163321,7 @@ class SnippetHost {
|
|
|
163320
163321
|
class Host {
|
|
163321
163322
|
constructor() {
|
|
163322
163323
|
this.fileOverrides = {};
|
|
163324
|
+
this.queue = new pxt.Util.PromiseQueue();
|
|
163323
163325
|
}
|
|
163324
163326
|
resolve(module, filename) {
|
|
163325
163327
|
//pxt.debug(`resolving ${module.level}:${module.id} -- ${filename} in ${path.resolve(".")}`)
|
|
@@ -163451,9 +163453,19 @@ class Host {
|
|
|
163451
163453
|
if (useCompileServiceDocker) {
|
|
163452
163454
|
return build.compileWithLocalCompileService(extInfo);
|
|
163453
163455
|
}
|
|
163454
|
-
|
|
163455
|
-
|
|
163456
|
-
.
|
|
163456
|
+
return this.queue.enqueue("getHexInfoAsync", async () => {
|
|
163457
|
+
const prevVariant = pxt.appTargetVariant;
|
|
163458
|
+
if (extInfo.appVariant && extInfo.appVariant !== prevVariant) {
|
|
163459
|
+
pxt.setAppTargetVariant(extInfo.appVariant, { temporary: true });
|
|
163460
|
+
}
|
|
163461
|
+
setBuildEngine();
|
|
163462
|
+
await build.buildHexAsync(build.thisBuild, mainPkg, extInfo, forceBuild);
|
|
163463
|
+
const res = build.thisBuild.patchHexInfo(extInfo);
|
|
163464
|
+
if (extInfo.appVariant && extInfo.appVariant !== prevVariant) {
|
|
163465
|
+
pxt.setAppTargetVariant(prevVariant);
|
|
163466
|
+
}
|
|
163467
|
+
return res;
|
|
163468
|
+
});
|
|
163457
163469
|
}
|
|
163458
163470
|
cacheStoreAsync(id, val) {
|
|
163459
163471
|
mkHomeDirs();
|
|
@@ -165034,7 +165046,7 @@ function buildCoreAsync(buildOpts) {
|
|
|
165034
165046
|
});
|
|
165035
165047
|
}
|
|
165036
165048
|
async function staticpkgAsync(parsed) {
|
|
165037
|
-
var _a, _b;
|
|
165049
|
+
var _a, _b, _c, _d;
|
|
165038
165050
|
const route = parsed.flags["route"] || "/";
|
|
165039
165051
|
const ghpages = parsed.flags["githubpages"];
|
|
165040
165052
|
const builtPackaged = parsed.flags["output"] || "built/packaged";
|
|
@@ -165056,7 +165068,7 @@ async function staticpkgAsync(parsed) {
|
|
|
165056
165068
|
if (locs) {
|
|
165057
165069
|
await internalGenDocsAsync(false, true);
|
|
165058
165070
|
if (locsSrc) {
|
|
165059
|
-
const languages = (_b = (_a = pxt.appTarget) === null || _a === void 0 ? void 0 : _a.appTheme) === null || _b === void 0 ? void 0 : _b.availableLocales.filter(langId => nodeutil.existsDirSync(path.join(locsSrc, langId)));
|
|
165071
|
+
const languages = (_d = (_c = (_b = (_a = pxt.appTarget) === null || _a === void 0 ? void 0 : _a.appTheme) === null || _b === void 0 ? void 0 : _b.availableLocales) === null || _c === void 0 ? void 0 : _c.filter(langId => nodeutil.existsDirSync(path.join(locsSrc, langId)))) !== null && _d !== void 0 ? _d : [];
|
|
165060
165072
|
await crowdin.buildAllTranslationsAsync(async (fileName) => {
|
|
165061
165073
|
const output = {};
|
|
165062
165074
|
for (const langId of languages) {
|
|
@@ -62,3 +62,4 @@ export declare function getBlockData(block: Blockly.Block): PXTBlockData;
|
|
|
62
62
|
export declare function setBlockData(block: Blockly.Block, data: PXTBlockData): void;
|
|
63
63
|
export declare function setBlockDataForField(block: Blockly.Block, field: string, data: string): void;
|
|
64
64
|
export declare function getBlockDataForField(block: Blockly.Block, field: string): string;
|
|
65
|
+
export declare function deleteBlockDataForField(block: Blockly.Block, field: string): void;
|
|
@@ -68,6 +68,7 @@ export declare class CommentIcon extends Blockly.icons.Icon {
|
|
|
68
68
|
* input bubble.
|
|
69
69
|
*/
|
|
70
70
|
onSizeChange(): void;
|
|
71
|
+
onPositionChange(): void;
|
|
71
72
|
bubbleIsVisible(): boolean;
|
|
72
73
|
setBubbleVisible(visible: boolean): Promise<void>;
|
|
73
74
|
/**
|
|
@@ -89,6 +90,8 @@ export declare class CommentIcon extends Blockly.icons.Icon {
|
|
|
89
90
|
* I.E. the block that owns this icon.
|
|
90
91
|
*/
|
|
91
92
|
private getBubbleOwnerRect;
|
|
93
|
+
private getSavedOffsetData;
|
|
94
|
+
private clearSavedOffsetData;
|
|
92
95
|
}
|
|
93
96
|
/** The save state format for a comment icon. */
|
|
94
97
|
export interface CommentState {
|
|
@@ -65,6 +65,7 @@ export declare abstract class Bubble implements Blockly.IDeletable {
|
|
|
65
65
|
setAnchorLocation(anchor: Blockly.utils.Coordinate, relayout?: boolean): void;
|
|
66
66
|
/** Sets the position of this bubble relative to its anchor. */
|
|
67
67
|
setPositionRelativeToAnchor(left: number, top: number): void;
|
|
68
|
+
getPositionRelativeToAnchor(): Blockly.utils.Coordinate;
|
|
68
69
|
/** @returns the size of this bubble. */
|
|
69
70
|
protected getSize(): Blockly.utils.Size;
|
|
70
71
|
/**
|
|
@@ -29,6 +29,8 @@ export declare class TextInputBubble extends Bubble {
|
|
|
29
29
|
private textChangeListeners;
|
|
30
30
|
/** Functions listening for changes to the size of this bubble. */
|
|
31
31
|
private sizeChangeListeners;
|
|
32
|
+
/** Functions listening for changes to the position of this bubble. */
|
|
33
|
+
private positionChangeListeners;
|
|
32
34
|
/** The text of this bubble. */
|
|
33
35
|
private text;
|
|
34
36
|
/** The default size of this bubble, including borders. */
|
|
@@ -45,12 +47,14 @@ export declare class TextInputBubble extends Bubble {
|
|
|
45
47
|
constructor(workspace: Blockly.WorkspaceSvg, anchor: Blockly.utils.Coordinate, ownerRect?: Blockly.utils.Rect, readOnly?: boolean);
|
|
46
48
|
/** @returns the text of this bubble. */
|
|
47
49
|
getText(): string;
|
|
50
|
+
moveTo(x: number, y: number): void;
|
|
48
51
|
/** Sets the text of this bubble. Calls change listeners. */
|
|
49
52
|
setText(text: string): void;
|
|
50
53
|
/** Adds a change listener to be notified when this bubble's text changes. */
|
|
51
54
|
addTextChangeListener(listener: () => void): void;
|
|
52
55
|
/** Adds a change listener to be notified when this bubble's size changes. */
|
|
53
56
|
addSizeChangeListener(listener: () => void): void;
|
|
57
|
+
addPositionChangeListener(listener: () => void): void;
|
|
54
58
|
/** Creates the editor UI for this bubble. */
|
|
55
59
|
private createEditor;
|
|
56
60
|
/** Binds events to the text area element. */
|
|
@@ -83,4 +87,6 @@ export declare class TextInputBubble extends Bubble {
|
|
|
83
87
|
private onTextChange;
|
|
84
88
|
/** Handles a size change event for the text area. Calls event listeners. */
|
|
85
89
|
private onSizeChange;
|
|
90
|
+
/** Handles a position change event for the text area. Calls event listeners. */
|
|
91
|
+
private onPositionChange;
|
|
86
92
|
}
|
package/built/pxtlib.js
CHANGED
|
@@ -16318,6 +16318,7 @@ var pxt;
|
|
|
16318
16318
|
pxt.setAppTargetVariant(prevVariant, { temporary: true });
|
|
16319
16319
|
}
|
|
16320
16320
|
}
|
|
16321
|
+
einfo.appVariant = variant;
|
|
16321
16322
|
const inf = target.isNative ? await this.host().getHexInfoAsync(einfo) : null;
|
|
16322
16323
|
einfo = pxt.U.flatClone(einfo);
|
|
16323
16324
|
if (!target.keepCppFiles) {
|
|
@@ -18,6 +18,7 @@ export interface InputProps extends ControlProps {
|
|
|
18
18
|
handleInputRef?: React.RefObject<HTMLInputElement> | ((ref: HTMLInputElement) => void);
|
|
19
19
|
preserveValueOnBlur?: boolean;
|
|
20
20
|
options?: pxt.Map<string>;
|
|
21
|
+
filter?: string;
|
|
21
22
|
onChange?: (newValue: string) => void;
|
|
22
23
|
onEnterKey?: (value: string) => void;
|
|
23
24
|
onIconClick?: (value: string) => void;
|