pxt-core 7.2.20 → 7.2.24
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/backendutils.js +4 -0
- package/built/cli.js +12 -5
- package/built/pxt.js +24 -5
- package/built/pxtlib.d.ts +2 -0
- package/built/pxtlib.js +12 -0
- package/built/target.js +1 -1
- package/built/web/icons.css +29 -26
- package/built/web/icons.html +1 -0
- package/built/web/main.js +1 -1
- 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/rtlsemantic.css +2 -2
- package/built/web/semantic.css +2 -2
- package/built/web/skillmap/css/{main.51d4190c.chunk.css → main.0db0a463.chunk.css} +1 -1
- package/package.json +1 -1
- package/theme/common.less +3 -2
- package/theme/home.less +6 -6
- package/theme/themes/pxt/modules/modal.overrides +27 -55
- package/theme/tutorial-sidebar.less +10 -6
- package/webapp/public/skillmap.html +1 -1
package/built/backendutils.js
CHANGED
|
@@ -716,6 +716,10 @@ var pxt;
|
|
|
716
716
|
// remove tutorial macros
|
|
717
717
|
if (text)
|
|
718
718
|
text = text.replace(/@(fullscreen|unplugged|showdialog|showhint)/gi, '');
|
|
719
|
+
text = text.trim();
|
|
720
|
+
// remove brackets for hiding step title
|
|
721
|
+
if (text.match(/^\{([\s\S]+)\}$/))
|
|
722
|
+
text = text.substr(1, text.length - 2);
|
|
719
723
|
return `<h${level} id="${this.options.headerPrefix}${id}">${text}</h${level}>`;
|
|
720
724
|
};
|
|
721
725
|
}
|
package/built/cli.js
CHANGED
|
@@ -1733,12 +1733,19 @@ function buildSemanticUIAsync(parsed) {
|
|
|
1733
1733
|
cmd: "node",
|
|
1734
1734
|
args: [lessCPath, "theme/style.less", "built/web/semantic.css", "--include-path=node_modules/semantic-ui-less:node_modules/pxt-core/theme:theme/foo/bar"]
|
|
1735
1735
|
}).then(() => {
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1736
|
+
function linkFont(font, semCss) {
|
|
1737
|
+
const fontFile = fs.readFileSync("node_modules/semantic-ui-less/themes/default/assets/fonts/" + font + ".woff");
|
|
1738
|
+
const url = "url(data:application/font-woff;charset=utf-8;base64,"
|
|
1739
|
+
+ fontFile.toString("base64") + ") format('woff')";
|
|
1740
|
+
const r = new RegExp(`src:.*url\\("fonts\/${font}\\.woff.*`, "g");
|
|
1741
|
+
semCss = semCss.replace('src: url("fonts/' + font + '.eot");', "")
|
|
1742
|
+
.replace(r, "src: " + url + ";");
|
|
1743
|
+
return semCss;
|
|
1744
|
+
}
|
|
1739
1745
|
let semCss = fs.readFileSync('built/web/semantic.css', "utf8");
|
|
1740
|
-
semCss =
|
|
1741
|
-
|
|
1746
|
+
semCss = linkFont("icons", semCss);
|
|
1747
|
+
semCss = linkFont("outline-icons", semCss);
|
|
1748
|
+
semCss = linkFont("brand-icons", semCss);
|
|
1742
1749
|
return semCss;
|
|
1743
1750
|
}).then((semCss) => {
|
|
1744
1751
|
// Append icons.css to semantic.css (custom pxt icons)
|
package/built/pxt.js
CHANGED
|
@@ -102186,6 +102186,14 @@ var pxt;
|
|
|
102186
102186
|
}
|
|
102187
102187
|
}
|
|
102188
102188
|
BrowserUtils.isSkillmapEditor = isSkillmapEditor;
|
|
102189
|
+
function isTabletSize() {
|
|
102190
|
+
return (window === null || window === void 0 ? void 0 : window.innerWidth) < pxt.BREAKPOINT_TABLET;
|
|
102191
|
+
}
|
|
102192
|
+
BrowserUtils.isTabletSize = isTabletSize;
|
|
102193
|
+
function isComputerSize() {
|
|
102194
|
+
return (window === null || window === void 0 ? void 0 : window.innerWidth) >= pxt.BREAKPOINT_TABLET;
|
|
102195
|
+
}
|
|
102196
|
+
BrowserUtils.isComputerSize = isComputerSize;
|
|
102189
102197
|
function noSharedLocalStorage() {
|
|
102190
102198
|
try {
|
|
102191
102199
|
return /nosharedlocalstorage/i.test(window.location.href);
|
|
@@ -106258,6 +106266,10 @@ var pxt;
|
|
|
106258
106266
|
// remove tutorial macros
|
|
106259
106267
|
if (text)
|
|
106260
106268
|
text = text.replace(/@(fullscreen|unplugged|showdialog|showhint)/gi, '');
|
|
106269
|
+
text = text.trim();
|
|
106270
|
+
// remove brackets for hiding step title
|
|
106271
|
+
if (text.match(/^\{([\s\S]+)\}$/))
|
|
106272
|
+
text = text.substr(1, text.length - 2);
|
|
106261
106273
|
return `<h${level} id="${this.options.headerPrefix}${id}">${text}</h${level}>`;
|
|
106262
106274
|
};
|
|
106263
106275
|
}
|
|
@@ -157471,12 +157483,19 @@ function buildSemanticUIAsync(parsed) {
|
|
|
157471
157483
|
cmd: "node",
|
|
157472
157484
|
args: [lessCPath, "theme/style.less", "built/web/semantic.css", "--include-path=node_modules/semantic-ui-less:node_modules/pxt-core/theme:theme/foo/bar"]
|
|
157473
157485
|
}).then(() => {
|
|
157474
|
-
|
|
157475
|
-
|
|
157476
|
-
|
|
157486
|
+
function linkFont(font, semCss) {
|
|
157487
|
+
const fontFile = fs.readFileSync("node_modules/semantic-ui-less/themes/default/assets/fonts/" + font + ".woff");
|
|
157488
|
+
const url = "url(data:application/font-woff;charset=utf-8;base64,"
|
|
157489
|
+
+ fontFile.toString("base64") + ") format('woff')";
|
|
157490
|
+
const r = new RegExp(`src:.*url\\("fonts\/${font}\\.woff.*`, "g");
|
|
157491
|
+
semCss = semCss.replace('src: url("fonts/' + font + '.eot");', "")
|
|
157492
|
+
.replace(r, "src: " + url + ";");
|
|
157493
|
+
return semCss;
|
|
157494
|
+
}
|
|
157477
157495
|
let semCss = fs.readFileSync('built/web/semantic.css', "utf8");
|
|
157478
|
-
semCss =
|
|
157479
|
-
|
|
157496
|
+
semCss = linkFont("icons", semCss);
|
|
157497
|
+
semCss = linkFont("outline-icons", semCss);
|
|
157498
|
+
semCss = linkFont("brand-icons", semCss);
|
|
157480
157499
|
return semCss;
|
|
157481
157500
|
}).then((semCss) => {
|
|
157482
157501
|
// Append icons.css to semantic.css (custom pxt icons)
|
package/built/pxtlib.d.ts
CHANGED
|
@@ -693,6 +693,8 @@ declare namespace pxt.BrowserUtils {
|
|
|
693
693
|
export function isLocalHost(ignoreFlags?: boolean): boolean;
|
|
694
694
|
export function isLocalHostDev(): boolean;
|
|
695
695
|
export function isSkillmapEditor(): boolean;
|
|
696
|
+
export function isTabletSize(): boolean;
|
|
697
|
+
export function isComputerSize(): boolean;
|
|
696
698
|
export function noSharedLocalStorage(): boolean;
|
|
697
699
|
export function useOldTutorialLayout(): boolean;
|
|
698
700
|
export function hasPointerEvents(): boolean;
|
package/built/pxtlib.js
CHANGED
|
@@ -4500,6 +4500,14 @@ var pxt;
|
|
|
4500
4500
|
}
|
|
4501
4501
|
}
|
|
4502
4502
|
BrowserUtils.isSkillmapEditor = isSkillmapEditor;
|
|
4503
|
+
function isTabletSize() {
|
|
4504
|
+
return (window === null || window === void 0 ? void 0 : window.innerWidth) < pxt.BREAKPOINT_TABLET;
|
|
4505
|
+
}
|
|
4506
|
+
BrowserUtils.isTabletSize = isTabletSize;
|
|
4507
|
+
function isComputerSize() {
|
|
4508
|
+
return (window === null || window === void 0 ? void 0 : window.innerWidth) >= pxt.BREAKPOINT_TABLET;
|
|
4509
|
+
}
|
|
4510
|
+
BrowserUtils.isComputerSize = isComputerSize;
|
|
4503
4511
|
function noSharedLocalStorage() {
|
|
4504
4512
|
try {
|
|
4505
4513
|
return /nosharedlocalstorage/i.test(window.location.href);
|
|
@@ -8572,6 +8580,10 @@ var pxt;
|
|
|
8572
8580
|
// remove tutorial macros
|
|
8573
8581
|
if (text)
|
|
8574
8582
|
text = text.replace(/@(fullscreen|unplugged|showdialog|showhint)/gi, '');
|
|
8583
|
+
text = text.trim();
|
|
8584
|
+
// remove brackets for hiding step title
|
|
8585
|
+
if (text.match(/^\{([\s\S]+)\}$/))
|
|
8586
|
+
text = text.substr(1, text.length - 2);
|
|
8575
8587
|
return `<h${level} id="${this.options.headerPrefix}${id}">${text}</h${level}>`;
|
|
8576
8588
|
};
|
|
8577
8589
|
}
|