pxt-core 7.4.13 → 7.4.17
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/buildengine.js +1 -1
- package/built/cli.js +29 -6
- package/built/gdb.js +1 -1
- package/built/nodeutil.d.ts +1 -1
- package/built/nodeutil.js +2 -2
- package/built/pxt.js +30 -6
- package/built/pxtblockly.js +5 -2
- package/built/pxtblocks.d.ts +1 -0
- package/built/pxtblocks.js +5 -2
- package/built/pxteditor.d.ts +6 -1
- package/built/pxteditor.js +5 -0
- package/built/pxtlib.js +1 -0
- package/built/target.js +1 -1
- package/built/web/main.js +1 -1
- package/built/web/pxtapp.js +1 -1
- package/built/web/pxtasseteditor.js +1 -1
- package/built/web/pxtblockly.js +1 -1
- package/built/web/pxtblocks.js +1 -1
- package/built/web/pxteditor.js +1 -1
- package/built/web/pxtembed.js +2 -2
- package/built/web/pxtlib.js +1 -1
- package/built/web/pxtworker.js +1 -1
- package/built/web/react-common-skillmap.css +13 -1
- package/built/web/rtlreact-common-skillmap.css +13 -1
- package/built/web/rtlsemantic.css +14 -2
- package/built/web/semantic.css +14 -2
- package/built/web/skillmap/css/main.cc257f3c.chunk.css +1 -0
- package/built/web/skillmap/js/2.261d5eab.chunk.js +2 -0
- package/built/web/skillmap/js/main.7c45ef9f.chunk.js +1 -0
- package/package.json +4 -3
- package/react-common/components/controls/Button.tsx +85 -0
- package/react-common/components/controls/Checkbox.tsx +47 -0
- package/react-common/components/controls/FocusTrap.tsx +92 -0
- package/react-common/components/controls/Input.tsx +117 -0
- package/react-common/components/controls/List.tsx +28 -0
- package/react-common/components/controls/MenuBar.tsx +94 -0
- package/react-common/components/controls/MenuDropdown.tsx +108 -0
- package/react-common/components/controls/Modal.tsx +108 -0
- package/react-common/components/profile/Profile.tsx +1 -1
- package/react-common/components/profile/UserPane.tsx +12 -8
- package/react-common/components/util.tsx +35 -0
- package/react-common/styles/controls/Button.less +192 -0
- package/react-common/styles/controls/Checkbox.less +24 -0
- package/react-common/styles/controls/Icon.less +11 -0
- package/react-common/styles/controls/Input.less +113 -0
- package/react-common/styles/controls/List.less +12 -0
- package/react-common/styles/controls/MenuDropdown.less +54 -0
- package/react-common/styles/controls/Modal.less +134 -0
- package/react-common/styles/controls/Spinner.less +24 -0
- package/react-common/styles/profile/profile.less +32 -0
- package/react-common/styles/react-common-skillmap.less +1 -1
- package/react-common/styles/react-common-variables.less +67 -0
- package/react-common/styles/react-common.less +13 -1
- package/theme/asset-editor.less +13 -29
- package/webapp/public/skillmap.html +2 -2
- package/built/web/skillmap/css/main.96b1b3f1.chunk.css +0 -1
- package/built/web/skillmap/js/2.7dd06a3a.chunk.js +0 -2
- package/built/web/skillmap/js/main.b96caef3.chunk.js +0 -1
- package/react-common/components/Checkbox.tsx +0 -25
package/built/buildengine.js
CHANGED
|
@@ -138,7 +138,7 @@ function setThisBuild(b) {
|
|
|
138
138
|
exports.setThisBuild = setThisBuild;
|
|
139
139
|
function patchYottaHexInfo(extInfo) {
|
|
140
140
|
let buildEngine = exports.thisBuild;
|
|
141
|
-
let hexPath = buildEngine.buildPath + "/build/" + pxt.appTarget.compileService.yottaTarget
|
|
141
|
+
let hexPath = buildEngine.buildPath + "/build/" + pxt.appTarget.compileService.yottaTarget.split("@")[0]
|
|
142
142
|
+ "/source/" + pxt.appTarget.compileService.yottaBinary;
|
|
143
143
|
return {
|
|
144
144
|
hex: fs.readFileSync(hexPath, "utf8").split(/\r?\n/)
|
package/built/cli.js
CHANGED
|
@@ -765,7 +765,7 @@ function uploadToGitRepoAsync(opts, uplReqs) {
|
|
|
765
765
|
if (U.startsWith(label, tid + "/"))
|
|
766
766
|
label = label.slice(tid.length + 1);
|
|
767
767
|
if (!/^v\d/.test(label)) {
|
|
768
|
-
console.log(
|
|
768
|
+
console.log(`label "${label}" is not a version; skipping release upload`);
|
|
769
769
|
return Promise.resolve();
|
|
770
770
|
}
|
|
771
771
|
let repoUrl = process.env["PXT_RELEASE_REPO"];
|
|
@@ -1743,7 +1743,9 @@ async function buildSemanticUIAsync(parsed) {
|
|
|
1743
1743
|
"theme/foo/bar",
|
|
1744
1744
|
"theme",
|
|
1745
1745
|
"node_modules/pxt-core/react-common/styles",
|
|
1746
|
-
"react-common/styles"
|
|
1746
|
+
"react-common/styles",
|
|
1747
|
+
"node_modules/@fortawesome",
|
|
1748
|
+
"node_modules/pxt-core/node_modules/@fortawesome" // for locally linked dev environment
|
|
1747
1749
|
].join(":");
|
|
1748
1750
|
// Build semantic css
|
|
1749
1751
|
await nodeutil.spawnAsync({
|
|
@@ -1789,6 +1791,14 @@ async function buildSemanticUIAsync(parsed) {
|
|
|
1789
1791
|
"--include-path=" + lessIncludePaths
|
|
1790
1792
|
]
|
|
1791
1793
|
});
|
|
1794
|
+
let fontAwesomeSource = "node_modules/@fortawesome/fontawesome-free/webfonts/";
|
|
1795
|
+
if (!fs.existsSync(fontAwesomeSource)) {
|
|
1796
|
+
fontAwesomeSource = "node_modules/pxt-core/" + fontAwesomeSource;
|
|
1797
|
+
}
|
|
1798
|
+
let skillmapCss = await readFileAsync(`built/web/react-common-skillmap.css`, "utf8");
|
|
1799
|
+
skillmapCss = await linkFontAsync("fa-solid-900", skillmapCss, fontAwesomeSource, "\\.\\.\\/webfonts\\/");
|
|
1800
|
+
skillmapCss = await linkFontAsync("fa-regular-400", skillmapCss, fontAwesomeSource, "\\.\\.\\/webfonts\\/");
|
|
1801
|
+
await writeFileAsync(`built/web/react-common-skillmap.css`, skillmapCss, "utf8");
|
|
1792
1802
|
// Run postcss with autoprefixer and rtlcss
|
|
1793
1803
|
pxt.debug("running postcss");
|
|
1794
1804
|
const postcss = require('postcss');
|
|
@@ -1818,13 +1828,19 @@ async function buildSemanticUIAsync(parsed) {
|
|
|
1818
1828
|
.process(processed.css, { from: `built/web/${cssFile}`, to: `built/web/rtl${cssFile}` });
|
|
1819
1829
|
await writeFileAsync(`built/web/rtl${cssFile}`, processedRtl.css, "utf8");
|
|
1820
1830
|
}
|
|
1831
|
+
if (!isPxtCore) {
|
|
1832
|
+
// This is just to support the local skillmap serve for development
|
|
1833
|
+
nodeutil.cp("built/web/react-common-skillmap.css", "node_modules/pxt-core/skillmap/public/blb");
|
|
1834
|
+
nodeutil.cp("built/web/semantic.css", "node_modules/pxt-core/skillmap/public/blb");
|
|
1835
|
+
}
|
|
1821
1836
|
}
|
|
1822
|
-
async function linkFontAsync(font, semCss) {
|
|
1823
|
-
const fontFile = await readFileAsync(
|
|
1837
|
+
async function linkFontAsync(font, semCss, sourceDir = "node_modules/semantic-ui-less/themes/default/assets/fonts/", refDir = "fonts\\/") {
|
|
1838
|
+
const fontFile = await readFileAsync(sourceDir + font + ".woff");
|
|
1824
1839
|
const url = "url(data:application/font-woff;charset=utf-8;base64,"
|
|
1825
1840
|
+ fontFile.toString("base64") + ") format('woff')";
|
|
1826
|
-
const r = new RegExp(`src:.*url\\("
|
|
1827
|
-
semCss = semCss.replace('src: url("
|
|
1841
|
+
const r = new RegExp(`src:.*url\\((?:"|')${refDir + font}\\.woff.*`, "g");
|
|
1842
|
+
semCss = semCss.replace('src: url("' + refDir + font + '.eot");', "")
|
|
1843
|
+
.replace('src: url(' + refDir + font + '.eot);', "")
|
|
1828
1844
|
.replace(r, "src: " + url + ";");
|
|
1829
1845
|
return semCss;
|
|
1830
1846
|
}
|
|
@@ -1837,6 +1853,7 @@ function buildWebStringsAsync() {
|
|
|
1837
1853
|
function buildSkillMapAsync(parsed) {
|
|
1838
1854
|
// local serve
|
|
1839
1855
|
const skillmapRoot = "node_modules/pxt-core/skillmap";
|
|
1856
|
+
const reactScriptsConfigRoot = `${skillmapRoot}/node_modules/react-scripts/config`;
|
|
1840
1857
|
const docsPath = parsed.flags["docs"];
|
|
1841
1858
|
return rimrafAsync(`${skillmapRoot}/public/blb`, {})
|
|
1842
1859
|
.then(() => rimrafAsync(`${skillmapRoot}/build/assets`, {}))
|
|
@@ -1852,6 +1869,12 @@ function buildSkillMapAsync(parsed) {
|
|
|
1852
1869
|
nodeutil.cp("node_modules/pxt-core/built/web/react-common-skillmap.css", `${skillmapRoot}/public/blb`);
|
|
1853
1870
|
// copy 'assets' over from docs/static
|
|
1854
1871
|
nodeutil.cpR("docs/static/skillmap/assets", `${skillmapRoot}/public/assets`);
|
|
1872
|
+
// copy default react-scripts webpack config into a webpack.config.base file if necessary
|
|
1873
|
+
if (!fs.existsSync(`${reactScriptsConfigRoot}/webpack.config.base.js`)) {
|
|
1874
|
+
nodeutil.cp(`${reactScriptsConfigRoot}/webpack.config.js`, reactScriptsConfigRoot, "webpack.config.base.js");
|
|
1875
|
+
}
|
|
1876
|
+
// wrap the config in our webpack.config.override for build customization
|
|
1877
|
+
nodeutil.cp(`${skillmapRoot}/webpack.config.override.js`, reactScriptsConfigRoot, "webpack.config.js");
|
|
1855
1878
|
if (docsPath) {
|
|
1856
1879
|
// copy docs over from specified path
|
|
1857
1880
|
nodeutil.cpR(`docs/${docsPath}`, `${skillmapRoot}/public/docs/${docsPath}`);
|
package/built/gdb.js
CHANGED
|
@@ -215,7 +215,7 @@ function codalBin() {
|
|
|
215
215
|
return be.buildPath + "/" + be.outputPath;
|
|
216
216
|
if (cs.codalBinary)
|
|
217
217
|
return be.buildPath + "/build/" + cs.codalBinary;
|
|
218
|
-
return be.buildPath + "/build/" + cs.yottaTarget + "/source/" + cs.yottaBinary.replace(/\.hex$/, "").replace(/-combined$/, "");
|
|
218
|
+
return be.buildPath + "/build/" + (cs.yottaTarget.split("@")[0]) + "/source/" + cs.yottaBinary.replace(/\.hex$/, "").replace(/-combined$/, "");
|
|
219
219
|
}
|
|
220
220
|
let cachedMap = "";
|
|
221
221
|
let addrCache;
|
package/built/nodeutil.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export declare function getPxtTarget(): pxt.TargetBundle;
|
|
|
42
42
|
export declare function pathToPtr(path: string): string;
|
|
43
43
|
export declare function mkdirP(thePath: string): void;
|
|
44
44
|
export declare function cpR(src: string, dst: string, maxDepth?: number): void;
|
|
45
|
-
export declare function cp(srcFile: string, destDirectory: string): void;
|
|
45
|
+
export declare function cp(srcFile: string, destDirectory: string, destName?: string): void;
|
|
46
46
|
export declare function allFiles(top: string, maxDepth?: number, allowMissing?: boolean, includeDirs?: boolean, ignoredFileMarker?: string): string[];
|
|
47
47
|
export declare function existsDirSync(name: string): boolean;
|
|
48
48
|
export declare function writeFileSync(p: string, data: any, options?: {
|
package/built/nodeutil.js
CHANGED
|
@@ -328,9 +328,9 @@ function cpR(src, dst, maxDepth = 8) {
|
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
exports.cpR = cpR;
|
|
331
|
-
function cp(srcFile, destDirectory) {
|
|
331
|
+
function cp(srcFile, destDirectory, destName) {
|
|
332
332
|
mkdirP(destDirectory);
|
|
333
|
-
let dest = path.resolve(destDirectory, path.basename(srcFile));
|
|
333
|
+
let dest = path.resolve(destDirectory, destName || path.basename(srcFile));
|
|
334
334
|
let buf = fs.readFileSync(path.resolve(srcFile));
|
|
335
335
|
fs.writeFileSync(dest, buf);
|
|
336
336
|
}
|
package/built/pxt.js
CHANGED
|
@@ -99899,6 +99899,7 @@ var ts;
|
|
|
99899
99899
|
"bn": { englishName: "Bengali", localizedName: "বাংলা" },
|
|
99900
99900
|
"ca": { englishName: "Catalan", localizedName: "Català" },
|
|
99901
99901
|
"cs": { englishName: "Czech", localizedName: "Čeština" },
|
|
99902
|
+
"cy": { englishName: "Welsh", localizedName: "Cymraeg" },
|
|
99902
99903
|
"da": { englishName: "Danish", localizedName: "Dansk" },
|
|
99903
99904
|
"de": { englishName: "German", localizedName: "Deutsch" },
|
|
99904
99905
|
"el": { englishName: "Greek", localizedName: "Ελληνικά" },
|
|
@@ -156715,7 +156716,7 @@ function uploadToGitRepoAsync(opts, uplReqs) {
|
|
|
156715
156716
|
if (U.startsWith(label, tid + "/"))
|
|
156716
156717
|
label = label.slice(tid.length + 1);
|
|
156717
156718
|
if (!/^v\d/.test(label)) {
|
|
156718
|
-
console.log(
|
|
156719
|
+
console.log(`label "${label}" is not a version; skipping release upload`);
|
|
156719
156720
|
return Promise.resolve();
|
|
156720
156721
|
}
|
|
156721
156722
|
let repoUrl = process.env["PXT_RELEASE_REPO"];
|
|
@@ -157693,7 +157694,9 @@ async function buildSemanticUIAsync(parsed) {
|
|
|
157693
157694
|
"theme/foo/bar",
|
|
157694
157695
|
"theme",
|
|
157695
157696
|
"node_modules/pxt-core/react-common/styles",
|
|
157696
|
-
"react-common/styles"
|
|
157697
|
+
"react-common/styles",
|
|
157698
|
+
"node_modules/@fortawesome",
|
|
157699
|
+
"node_modules/pxt-core/node_modules/@fortawesome" // for locally linked dev environment
|
|
157697
157700
|
].join(":");
|
|
157698
157701
|
// Build semantic css
|
|
157699
157702
|
await nodeutil.spawnAsync({
|
|
@@ -157739,6 +157742,14 @@ async function buildSemanticUIAsync(parsed) {
|
|
|
157739
157742
|
"--include-path=" + lessIncludePaths
|
|
157740
157743
|
]
|
|
157741
157744
|
});
|
|
157745
|
+
let fontAwesomeSource = "node_modules/@fortawesome/fontawesome-free/webfonts/";
|
|
157746
|
+
if (!fs.existsSync(fontAwesomeSource)) {
|
|
157747
|
+
fontAwesomeSource = "node_modules/pxt-core/" + fontAwesomeSource;
|
|
157748
|
+
}
|
|
157749
|
+
let skillmapCss = await readFileAsync(`built/web/react-common-skillmap.css`, "utf8");
|
|
157750
|
+
skillmapCss = await linkFontAsync("fa-solid-900", skillmapCss, fontAwesomeSource, "\\.\\.\\/webfonts\\/");
|
|
157751
|
+
skillmapCss = await linkFontAsync("fa-regular-400", skillmapCss, fontAwesomeSource, "\\.\\.\\/webfonts\\/");
|
|
157752
|
+
await writeFileAsync(`built/web/react-common-skillmap.css`, skillmapCss, "utf8");
|
|
157742
157753
|
// Run postcss with autoprefixer and rtlcss
|
|
157743
157754
|
pxt.debug("running postcss");
|
|
157744
157755
|
const postcss = require('postcss');
|
|
@@ -157768,13 +157779,19 @@ async function buildSemanticUIAsync(parsed) {
|
|
|
157768
157779
|
.process(processed.css, { from: `built/web/${cssFile}`, to: `built/web/rtl${cssFile}` });
|
|
157769
157780
|
await writeFileAsync(`built/web/rtl${cssFile}`, processedRtl.css, "utf8");
|
|
157770
157781
|
}
|
|
157782
|
+
if (!isPxtCore) {
|
|
157783
|
+
// This is just to support the local skillmap serve for development
|
|
157784
|
+
nodeutil.cp("built/web/react-common-skillmap.css", "node_modules/pxt-core/skillmap/public/blb");
|
|
157785
|
+
nodeutil.cp("built/web/semantic.css", "node_modules/pxt-core/skillmap/public/blb");
|
|
157786
|
+
}
|
|
157771
157787
|
}
|
|
157772
|
-
async function linkFontAsync(font, semCss) {
|
|
157773
|
-
const fontFile = await readFileAsync(
|
|
157788
|
+
async function linkFontAsync(font, semCss, sourceDir = "node_modules/semantic-ui-less/themes/default/assets/fonts/", refDir = "fonts\\/") {
|
|
157789
|
+
const fontFile = await readFileAsync(sourceDir + font + ".woff");
|
|
157774
157790
|
const url = "url(data:application/font-woff;charset=utf-8;base64,"
|
|
157775
157791
|
+ fontFile.toString("base64") + ") format('woff')";
|
|
157776
|
-
const r = new RegExp(`src:.*url\\("
|
|
157777
|
-
semCss = semCss.replace('src: url("
|
|
157792
|
+
const r = new RegExp(`src:.*url\\((?:"|')${refDir + font}\\.woff.*`, "g");
|
|
157793
|
+
semCss = semCss.replace('src: url("' + refDir + font + '.eot");', "")
|
|
157794
|
+
.replace('src: url(' + refDir + font + '.eot);', "")
|
|
157778
157795
|
.replace(r, "src: " + url + ";");
|
|
157779
157796
|
return semCss;
|
|
157780
157797
|
}
|
|
@@ -157787,6 +157804,7 @@ function buildWebStringsAsync() {
|
|
|
157787
157804
|
function buildSkillMapAsync(parsed) {
|
|
157788
157805
|
// local serve
|
|
157789
157806
|
const skillmapRoot = "node_modules/pxt-core/skillmap";
|
|
157807
|
+
const reactScriptsConfigRoot = `${skillmapRoot}/node_modules/react-scripts/config`;
|
|
157790
157808
|
const docsPath = parsed.flags["docs"];
|
|
157791
157809
|
return rimrafAsync(`${skillmapRoot}/public/blb`, {})
|
|
157792
157810
|
.then(() => rimrafAsync(`${skillmapRoot}/build/assets`, {}))
|
|
@@ -157802,6 +157820,12 @@ function buildSkillMapAsync(parsed) {
|
|
|
157802
157820
|
nodeutil.cp("node_modules/pxt-core/built/web/react-common-skillmap.css", `${skillmapRoot}/public/blb`);
|
|
157803
157821
|
// copy 'assets' over from docs/static
|
|
157804
157822
|
nodeutil.cpR("docs/static/skillmap/assets", `${skillmapRoot}/public/assets`);
|
|
157823
|
+
// copy default react-scripts webpack config into a webpack.config.base file if necessary
|
|
157824
|
+
if (!fs.existsSync(`${reactScriptsConfigRoot}/webpack.config.base.js`)) {
|
|
157825
|
+
nodeutil.cp(`${reactScriptsConfigRoot}/webpack.config.js`, reactScriptsConfigRoot, "webpack.config.base.js");
|
|
157826
|
+
}
|
|
157827
|
+
// wrap the config in our webpack.config.override for build customization
|
|
157828
|
+
nodeutil.cp(`${skillmapRoot}/webpack.config.override.js`, reactScriptsConfigRoot, "webpack.config.js");
|
|
157805
157829
|
if (docsPath) {
|
|
157806
157830
|
// copy docs over from specified path
|
|
157807
157831
|
nodeutil.cpR(`docs/${docsPath}`, `${skillmapRoot}/public/docs/${docsPath}`);
|
package/built/pxtblockly.js
CHANGED
|
@@ -6952,7 +6952,7 @@ var pxt;
|
|
|
6952
6952
|
layout.serializeSvgString = serializeSvgString;
|
|
6953
6953
|
function cleanUpBlocklySvg(svg) {
|
|
6954
6954
|
pxt.BrowserUtils.removeClass(svg, "blocklySvg");
|
|
6955
|
-
pxt.BrowserUtils.addClass(svg, "blocklyPreview pxt-renderer");
|
|
6955
|
+
pxt.BrowserUtils.addClass(svg, "blocklyPreview pxt-renderer classic-theme");
|
|
6956
6956
|
// Remove background elements
|
|
6957
6957
|
pxt.U.toArray(svg.querySelectorAll('.blocklyMainBackground,.blocklyScrollbarBackground'))
|
|
6958
6958
|
.forEach(el => { if (el)
|
|
@@ -13085,7 +13085,6 @@ var pxtblockly;
|
|
|
13085
13085
|
}
|
|
13086
13086
|
initView() {
|
|
13087
13087
|
super.initView();
|
|
13088
|
-
this.initVariables();
|
|
13089
13088
|
}
|
|
13090
13089
|
onItemSelected_(menu, menuItem) {
|
|
13091
13090
|
const value = menuItem.getValue();
|
|
@@ -13103,6 +13102,10 @@ var pxtblockly;
|
|
|
13103
13102
|
this.getOptions();
|
|
13104
13103
|
return super.doClassValidation_(value);
|
|
13105
13104
|
}
|
|
13105
|
+
getOptions(opt_useCache) {
|
|
13106
|
+
this.initVariables();
|
|
13107
|
+
return super.getOptions(opt_useCache);
|
|
13108
|
+
}
|
|
13106
13109
|
initVariables() {
|
|
13107
13110
|
if (this.sourceBlock_ && this.sourceBlock_.workspace) {
|
|
13108
13111
|
const ws = this.sourceBlock_.workspace;
|
package/built/pxtblocks.d.ts
CHANGED
|
@@ -776,6 +776,7 @@ declare namespace pxtblockly {
|
|
|
776
776
|
initView(): void;
|
|
777
777
|
onItemSelected_(menu: Blockly.Menu, menuItem: Blockly.MenuItem): void;
|
|
778
778
|
doClassValidation_(value: any): string;
|
|
779
|
+
getOptions(opt_useCache?: boolean): any[][];
|
|
779
780
|
private initVariables;
|
|
780
781
|
}
|
|
781
782
|
}
|
package/built/pxtblocks.js
CHANGED
|
@@ -3328,7 +3328,7 @@ var pxt;
|
|
|
3328
3328
|
layout.serializeSvgString = serializeSvgString;
|
|
3329
3329
|
function cleanUpBlocklySvg(svg) {
|
|
3330
3330
|
pxt.BrowserUtils.removeClass(svg, "blocklySvg");
|
|
3331
|
-
pxt.BrowserUtils.addClass(svg, "blocklyPreview pxt-renderer");
|
|
3331
|
+
pxt.BrowserUtils.addClass(svg, "blocklyPreview pxt-renderer classic-theme");
|
|
3332
3332
|
// Remove background elements
|
|
3333
3333
|
pxt.U.toArray(svg.querySelectorAll('.blocklyMainBackground,.blocklyScrollbarBackground'))
|
|
3334
3334
|
.forEach(el => { if (el)
|
|
@@ -9461,7 +9461,6 @@ var pxtblockly;
|
|
|
9461
9461
|
}
|
|
9462
9462
|
initView() {
|
|
9463
9463
|
super.initView();
|
|
9464
|
-
this.initVariables();
|
|
9465
9464
|
}
|
|
9466
9465
|
onItemSelected_(menu, menuItem) {
|
|
9467
9466
|
const value = menuItem.getValue();
|
|
@@ -9479,6 +9478,10 @@ var pxtblockly;
|
|
|
9479
9478
|
this.getOptions();
|
|
9480
9479
|
return super.doClassValidation_(value);
|
|
9481
9480
|
}
|
|
9481
|
+
getOptions(opt_useCache) {
|
|
9482
|
+
this.initVariables();
|
|
9483
|
+
return super.getOptions(opt_useCache);
|
|
9484
|
+
}
|
|
9482
9485
|
initVariables() {
|
|
9483
9486
|
if (this.sourceBlock_ && this.sourceBlock_.workspace) {
|
|
9484
9487
|
const ws = this.sourceBlock_.workspace;
|
package/built/pxteditor.d.ts
CHANGED
|
@@ -283,6 +283,7 @@ declare namespace pxt.editor {
|
|
|
283
283
|
renderBlocksAsync(req: EditorMessageRenderBlocksRequest): Promise<EditorMessageRenderBlocksResponse>;
|
|
284
284
|
renderPythonAsync(req: EditorMessageRenderPythonRequest): Promise<EditorMessageRenderPythonResponse>;
|
|
285
285
|
toggleHighContrast(): void;
|
|
286
|
+
setHighContrast(on: boolean): void;
|
|
286
287
|
toggleGreenScreen(): void;
|
|
287
288
|
toggleAccessibleBlocks(): void;
|
|
288
289
|
setAccessibleBlocks(enabled: boolean): void;
|
|
@@ -531,7 +532,7 @@ declare namespace pxt.editor {
|
|
|
531
532
|
/**
|
|
532
533
|
* Request action
|
|
533
534
|
*/
|
|
534
|
-
action: "switchblocks" | "switchjavascript" | "startsimulator" | "restartsimulator" | "stopsimulator" | "hidesimulator" | "showsimulator" | "closeflyout" | "newproject" | "importproject" | "importtutorial" | "openheader" | "proxytosim" | "undo" | "redo" | "renderblocks" | "renderpython" | "setscale" | "startactivity" | "saveproject" | "unloadproject" | "shareproject" | "savelocalprojectstocloud" | "projectcloudstatus" | "requestprojectcloudstatus" | "convertcloudprojectstolocal" | "setlanguagerestriction" | "toggletrace" | "togglehighcontrast" | "togglegreenscreen" | "settracestate" | "setsimulatorfullscreen" | "print" | "pair" | "workspacesync" | "workspacereset" | "workspacesave" | "workspaceloaded" | "workspaceevent" | "workspacediagnostics" | "event" | "simevent" | "info" | "tutorialevent" | ExtInitializeType | ExtDataStreamType | ExtUserCodeType | ExtReadCodeType | ExtWriteCodeType;
|
|
535
|
+
action: "switchblocks" | "switchjavascript" | "startsimulator" | "restartsimulator" | "stopsimulator" | "hidesimulator" | "showsimulator" | "closeflyout" | "newproject" | "importproject" | "importtutorial" | "openheader" | "proxytosim" | "undo" | "redo" | "renderblocks" | "renderpython" | "setscale" | "startactivity" | "saveproject" | "unloadproject" | "shareproject" | "savelocalprojectstocloud" | "projectcloudstatus" | "requestprojectcloudstatus" | "convertcloudprojectstolocal" | "setlanguagerestriction" | "toggletrace" | "togglehighcontrast" | "sethighcontrast" | "togglegreenscreen" | "settracestate" | "setsimulatorfullscreen" | "print" | "pair" | "workspacesync" | "workspacereset" | "workspacesave" | "workspaceloaded" | "workspaceevent" | "workspacediagnostics" | "event" | "simevent" | "info" | "tutorialevent" | ExtInitializeType | ExtDataStreamType | ExtUserCodeType | ExtReadCodeType | ExtWriteCodeType;
|
|
535
536
|
}
|
|
536
537
|
/**
|
|
537
538
|
* Request sent by the editor when a tick/error/expection is registered
|
|
@@ -708,6 +709,10 @@ declare namespace pxt.editor {
|
|
|
708
709
|
action: "setsimulatorfullscreen";
|
|
709
710
|
enabled: boolean;
|
|
710
711
|
}
|
|
712
|
+
interface EditorMessageSetHighContrastRequest extends EditorMessageRequest {
|
|
713
|
+
action: "sethighcontrast";
|
|
714
|
+
on: boolean;
|
|
715
|
+
}
|
|
711
716
|
interface EditorMessageStartActivity extends EditorMessageRequest {
|
|
712
717
|
action: "startactivity";
|
|
713
718
|
activityType: "tutorial" | "example" | "recipe";
|
package/built/pxteditor.js
CHANGED
|
@@ -231,6 +231,11 @@ var pxt;
|
|
|
231
231
|
return Promise.resolve()
|
|
232
232
|
.then(() => projectView.toggleHighContrast());
|
|
233
233
|
}
|
|
234
|
+
case "sethighcontrast": {
|
|
235
|
+
const hcmsg = data;
|
|
236
|
+
return Promise.resolve()
|
|
237
|
+
.then(() => projectView.setHighContrast(hcmsg.on));
|
|
238
|
+
}
|
|
234
239
|
case "togglegreenscreen": {
|
|
235
240
|
return Promise.resolve()
|
|
236
241
|
.then(() => projectView.toggleGreenScreen());
|
package/built/pxtlib.js
CHANGED
|
@@ -2213,6 +2213,7 @@ var ts;
|
|
|
2213
2213
|
"bn": { englishName: "Bengali", localizedName: "বাংলা" },
|
|
2214
2214
|
"ca": { englishName: "Catalan", localizedName: "Català" },
|
|
2215
2215
|
"cs": { englishName: "Czech", localizedName: "Čeština" },
|
|
2216
|
+
"cy": { englishName: "Welsh", localizedName: "Cymraeg" },
|
|
2216
2217
|
"da": { englishName: "Danish", localizedName: "Dansk" },
|
|
2217
2218
|
"de": { englishName: "German", localizedName: "Deutsch" },
|
|
2218
2219
|
"el": { englishName: "Greek", localizedName: "Ελληνικά" },
|