pxt-core 13.1.4 → 13.1.5
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 +17 -4
- package/built/pxt.js +17 -4
- package/built/react-common/components/controls/Modal.d.ts +1 -1
- package/built/target.js +1 -1
- package/built/targetlight.js +1 -1
- package/built/web/main.js +1 -1
- package/built/web/multiplayer/js/{main.58655f23.js → main.db72096c.js} +2 -2
- package/built/web/pxtasseteditor.js +20 -20
- 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.e779c5ca.js → main.a003cb90.js} +2 -2
- package/built/web/teachertool/js/{main.3e785c99.js → main.168add6b.js} +2 -2
- package/built/web/tutorialtool/js/{main.2801f080.js → main.16de6eb5.js} +2 -2
- package/package.json +1 -1
- package/react-common/components/controls/Modal.tsx +5 -14
- package/react-common/styles/controls/Modal.less +11 -4
- 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/cli.js
CHANGED
|
@@ -5582,6 +5582,19 @@ function readBlocksprjConfig() {
|
|
|
5582
5582
|
const config = nodeutil.readJson(configPath);
|
|
5583
5583
|
return config;
|
|
5584
5584
|
}
|
|
5585
|
+
function mergeCorePackage(corePackage, dependencies = {}) {
|
|
5586
|
+
for (const dep of Object.keys(dependencies)) {
|
|
5587
|
+
const verSpec = dependencies[dep];
|
|
5588
|
+
if (pxt.appTarget.bundledpkgs[dep] && (verSpec === "*" || verSpec.startsWith("file:"))) {
|
|
5589
|
+
const bundled = pxt.appTarget.bundledpkgs[dep];
|
|
5590
|
+
const config = pxt.U.jsonTryParse(bundled[pxt.CONFIG_NAME]);
|
|
5591
|
+
if (config === null || config === void 0 ? void 0 : config.core) {
|
|
5592
|
+
return dependencies;
|
|
5593
|
+
}
|
|
5594
|
+
}
|
|
5595
|
+
}
|
|
5596
|
+
return pxt.tutorial.mergeTutorialDependencies(corePackage.dependencies, dependencies);
|
|
5597
|
+
}
|
|
5585
5598
|
function checkFileSize(files) {
|
|
5586
5599
|
if (!pxt.appTarget.cloud)
|
|
5587
5600
|
return 0;
|
|
@@ -5826,7 +5839,7 @@ function internalCheckDocsAsync(compileSnippets, re, fix, pycheck) {
|
|
|
5826
5839
|
continue;
|
|
5827
5840
|
}
|
|
5828
5841
|
const tutorial = pxt.tutorial.parseTutorial(tutorialMd);
|
|
5829
|
-
const pkgs =
|
|
5842
|
+
const pkgs = mergeCorePackage(blocksprjConfig, pxt.gallery.parsePackagesFromMarkdown(tutorialMd) || {});
|
|
5830
5843
|
let extraFiles = null;
|
|
5831
5844
|
if (tutorial.jres) {
|
|
5832
5845
|
extraFiles = {
|
|
@@ -5877,7 +5890,7 @@ function internalCheckDocsAsync(compileSnippets, re, fix, pycheck) {
|
|
|
5877
5890
|
continue;
|
|
5878
5891
|
}
|
|
5879
5892
|
const prj = pxt.gallery.parseExampleMarkdown(card.name, exMd);
|
|
5880
|
-
const pkgs =
|
|
5893
|
+
const pkgs = mergeCorePackage(blocksprjConfig, prj.dependencies);
|
|
5881
5894
|
let extraFiles = undefined;
|
|
5882
5895
|
if (prj.filesOverride[pxt.TILEMAP_CODE] && prj.filesOverride[pxt.TILEMAP_JRES]) {
|
|
5883
5896
|
extraFiles = {
|
|
@@ -5962,7 +5975,7 @@ function internalCacheUsedBlocksAsync() {
|
|
|
5962
5975
|
}
|
|
5963
5976
|
const tutorial = pxt.tutorial.parseTutorial(md);
|
|
5964
5977
|
const tutorialDeps = pxt.gallery.parsePackagesFromMarkdown(md) || {};
|
|
5965
|
-
const pkgs =
|
|
5978
|
+
const pkgs = mergeCorePackage(blocksprjConfig, tutorialDeps);
|
|
5966
5979
|
tutorial.pkgs = pkgs;
|
|
5967
5980
|
tutorial.path = path;
|
|
5968
5981
|
const hash = pxt.BrowserUtils.getTutorialCodeHash(tutorial.code);
|
|
@@ -6098,7 +6111,7 @@ function getCodeSnippets(fileName, md, baseConfig) {
|
|
|
6098
6111
|
}
|
|
6099
6112
|
return acc;
|
|
6100
6113
|
}, {});
|
|
6101
|
-
const pkgs =
|
|
6114
|
+
const pkgs = mergeCorePackage(baseConfig, tutorialDeps);
|
|
6102
6115
|
const pkgName = fileName.replace(/\\/g, '-').replace(/.md$/i, '');
|
|
6103
6116
|
return codeSnippets.map((snip, i) => {
|
|
6104
6117
|
return {
|
package/built/pxt.js
CHANGED
|
@@ -169745,6 +169745,19 @@ function readBlocksprjConfig() {
|
|
|
169745
169745
|
const config = nodeutil.readJson(configPath);
|
|
169746
169746
|
return config;
|
|
169747
169747
|
}
|
|
169748
|
+
function mergeCorePackage(corePackage, dependencies = {}) {
|
|
169749
|
+
for (const dep of Object.keys(dependencies)) {
|
|
169750
|
+
const verSpec = dependencies[dep];
|
|
169751
|
+
if (pxt.appTarget.bundledpkgs[dep] && (verSpec === "*" || verSpec.startsWith("file:"))) {
|
|
169752
|
+
const bundled = pxt.appTarget.bundledpkgs[dep];
|
|
169753
|
+
const config = pxt.U.jsonTryParse(bundled[pxt.CONFIG_NAME]);
|
|
169754
|
+
if (config === null || config === void 0 ? void 0 : config.core) {
|
|
169755
|
+
return dependencies;
|
|
169756
|
+
}
|
|
169757
|
+
}
|
|
169758
|
+
}
|
|
169759
|
+
return pxt.tutorial.mergeTutorialDependencies(corePackage.dependencies, dependencies);
|
|
169760
|
+
}
|
|
169748
169761
|
function checkFileSize(files) {
|
|
169749
169762
|
if (!pxt.appTarget.cloud)
|
|
169750
169763
|
return 0;
|
|
@@ -169989,7 +170002,7 @@ function internalCheckDocsAsync(compileSnippets, re, fix, pycheck) {
|
|
|
169989
170002
|
continue;
|
|
169990
170003
|
}
|
|
169991
170004
|
const tutorial = pxt.tutorial.parseTutorial(tutorialMd);
|
|
169992
|
-
const pkgs =
|
|
170005
|
+
const pkgs = mergeCorePackage(blocksprjConfig, pxt.gallery.parsePackagesFromMarkdown(tutorialMd) || {});
|
|
169993
170006
|
let extraFiles = null;
|
|
169994
170007
|
if (tutorial.jres) {
|
|
169995
170008
|
extraFiles = {
|
|
@@ -170040,7 +170053,7 @@ function internalCheckDocsAsync(compileSnippets, re, fix, pycheck) {
|
|
|
170040
170053
|
continue;
|
|
170041
170054
|
}
|
|
170042
170055
|
const prj = pxt.gallery.parseExampleMarkdown(card.name, exMd);
|
|
170043
|
-
const pkgs =
|
|
170056
|
+
const pkgs = mergeCorePackage(blocksprjConfig, prj.dependencies);
|
|
170044
170057
|
let extraFiles = undefined;
|
|
170045
170058
|
if (prj.filesOverride[pxt.TILEMAP_CODE] && prj.filesOverride[pxt.TILEMAP_JRES]) {
|
|
170046
170059
|
extraFiles = {
|
|
@@ -170125,7 +170138,7 @@ function internalCacheUsedBlocksAsync() {
|
|
|
170125
170138
|
}
|
|
170126
170139
|
const tutorial = pxt.tutorial.parseTutorial(md);
|
|
170127
170140
|
const tutorialDeps = pxt.gallery.parsePackagesFromMarkdown(md) || {};
|
|
170128
|
-
const pkgs =
|
|
170141
|
+
const pkgs = mergeCorePackage(blocksprjConfig, tutorialDeps);
|
|
170129
170142
|
tutorial.pkgs = pkgs;
|
|
170130
170143
|
tutorial.path = path;
|
|
170131
170144
|
const hash = pxt.BrowserUtils.getTutorialCodeHash(tutorial.code);
|
|
@@ -170261,7 +170274,7 @@ function getCodeSnippets(fileName, md, baseConfig) {
|
|
|
170261
170274
|
}
|
|
170262
170275
|
return acc;
|
|
170263
170276
|
}, {});
|
|
170264
|
-
const pkgs =
|
|
170277
|
+
const pkgs = mergeCorePackage(baseConfig, tutorialDeps);
|
|
170265
170278
|
const pkgName = fileName.replace(/\\/g, '-').replace(/.md$/i, '');
|
|
170266
170279
|
return codeSnippets.map((snip, i) => {
|
|
170267
170280
|
return {
|
|
@@ -14,12 +14,12 @@ export interface ModalAction {
|
|
|
14
14
|
export interface ModalProps extends ContainerProps {
|
|
15
15
|
title: string;
|
|
16
16
|
leftIcon?: string;
|
|
17
|
-
helpUrl?: string;
|
|
18
17
|
ariaDescribedBy?: string;
|
|
19
18
|
actions?: ModalAction[];
|
|
20
19
|
onClose?: () => void;
|
|
21
20
|
fullscreen?: boolean;
|
|
22
21
|
parentElement?: Element;
|
|
23
22
|
hideDismissButton?: boolean;
|
|
23
|
+
rightHeader?: React.ReactNode;
|
|
24
24
|
}
|
|
25
25
|
export declare const Modal: (props: ModalProps) => React.ReactPortal;
|