pxt-core 11.3.28 → 11.3.30
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 +1 -0
- package/built/pxt.js +13 -10
- package/built/pxtlib.d.ts +7 -1
- package/built/pxtlib.js +12 -10
- package/built/pxtservices/editorDriver.d.ts +1 -1
- package/built/react-common/components/theming/themeManager.d.ts +1 -0
- package/built/target.js +1 -1
- package/built/targetlight.js +1 -0
- package/built/web/main.js +1 -1
- package/built/web/multiplayer/js/{main.14bf4008.js → main.43f770b8.js} +2 -2
- package/built/web/pxtapp.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/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 +2 -2
- package/built/web/runnerembed.js +1 -1
- package/built/web/semantic.css +2 -2
- package/built/web/skillmap/js/{main.33da70e1.js → main.101337d2.js} +2 -2
- package/built/web/teachertool/js/{main.5b7ec7b5.js → main.46c1da07.js} +2 -2
- package/built/web/tutorialtool/js/{main.ff6dd0bb.js → main.043a74c9.js} +2 -2
- package/localtypings/pxteditor.d.ts +4 -3
- package/package.json +1 -1
- package/react-common/components/controls/Card.tsx +22 -2
- package/react-common/components/theming/themeManager.ts +4 -0
- package/react-common/styles/theming/base-theme.less +1 -0
- package/theme/color-themes/high-contrast.json +1 -0
- package/theme/color-themes/overrides/high-contrast-overrides.css +4 -0
- package/theme/common.less +13 -0
- package/theme/highcontrast.less +7 -1
- package/theme/home.less +1 -1
- package/theme/semantic-ui-overrides.less +30 -24
- package/theme/themes/pxt/views/card.overrides +4 -4
- package/theme/tutorial-sidebar.less +3 -3
- package/theme/tutorial.less +1 -4
- package/webapp/public/asseteditor.html +1 -1
- 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
|
@@ -2325,6 +2325,7 @@ async function buildTargetCoreAsync(options = {}) {
|
|
|
2325
2325
|
delete targetlight.compile.compilerExtension;
|
|
2326
2326
|
const targetlightjson = nodeutil.stringify(targetlight);
|
|
2327
2327
|
nodeutil.writeFileSync("built/targetlight.json", targetlightjson);
|
|
2328
|
+
nodeutil.writeFileSync("built/targetlight.js", targetJsPrefix + targetlightjson);
|
|
2328
2329
|
nodeutil.writeFileSync("built/sim.webmanifest", nodeutil.stringify(webmanifest));
|
|
2329
2330
|
console.log("target.json built.");
|
|
2330
2331
|
}
|
package/built/pxt.js
CHANGED
|
@@ -97892,7 +97892,7 @@ var pxt;
|
|
|
97892
97892
|
auth.DEFAULT_USER_PREFERENCES = () => ({
|
|
97893
97893
|
language: pxt.appTarget.appTheme.defaultLocale,
|
|
97894
97894
|
highContrast: false,
|
|
97895
|
-
|
|
97895
|
+
colorThemeIds: {},
|
|
97896
97896
|
reader: "",
|
|
97897
97897
|
skillmap: { mapProgress: {}, completedTags: {} },
|
|
97898
97898
|
email: false
|
|
@@ -101536,14 +101536,16 @@ var pxt;
|
|
|
101536
101536
|
// patch cdn url locations
|
|
101537
101537
|
pxt.appTarget = replaceCdnUrlsInJsonBlob(pxt.appTarget);
|
|
101538
101538
|
// patch icons in bundled packages
|
|
101539
|
-
|
|
101540
|
-
|
|
101541
|
-
|
|
101542
|
-
|
|
101543
|
-
|
|
101544
|
-
|
|
101545
|
-
|
|
101546
|
-
|
|
101539
|
+
if (pxt.appTarget.bundledpkgs) {
|
|
101540
|
+
Object.keys(pxt.appTarget.bundledpkgs).forEach(pkgid => {
|
|
101541
|
+
const res = pxt.appTarget.bundledpkgs[pkgid];
|
|
101542
|
+
// path config before storing
|
|
101543
|
+
const config = JSON.parse(res[pxt.CONFIG_NAME]);
|
|
101544
|
+
if (config.icon)
|
|
101545
|
+
config.icon = pxt.BrowserUtils.patchCdn(config.icon);
|
|
101546
|
+
res[pxt.CONFIG_NAME] = pxt.Package.stringifyConfig(config);
|
|
101547
|
+
});
|
|
101548
|
+
}
|
|
101547
101549
|
// patch any pre-configured query url appTheme overrides
|
|
101548
101550
|
if (typeof window !== 'undefined') {
|
|
101549
101551
|
// Map<AppTarget>
|
|
@@ -112034,7 +112036,7 @@ var pxt;
|
|
|
112034
112036
|
currentSection.attributes[currentKey] = currentValue.trim();
|
|
112035
112037
|
}
|
|
112036
112038
|
}
|
|
112037
|
-
currentKey = keyMatch[1].toLowerCase();
|
|
112039
|
+
currentKey = keyMatch[1].trim().toLowerCase();
|
|
112038
112040
|
currentValue = keyMatch[2];
|
|
112039
112041
|
}
|
|
112040
112042
|
else if (currentKey) {
|
|
@@ -163594,6 +163596,7 @@ async function buildTargetCoreAsync(options = {}) {
|
|
|
163594
163596
|
delete targetlight.compile.compilerExtension;
|
|
163595
163597
|
const targetlightjson = nodeutil.stringify(targetlight);
|
|
163596
163598
|
nodeutil.writeFileSync("built/targetlight.json", targetlightjson);
|
|
163599
|
+
nodeutil.writeFileSync("built/targetlight.js", targetJsPrefix + targetlightjson);
|
|
163597
163600
|
nodeutil.writeFileSync("built/sim.webmanifest", nodeutil.stringify(webmanifest));
|
|
163598
163601
|
console.log("target.json built.");
|
|
163599
163602
|
}
|
package/built/pxtlib.d.ts
CHANGED
|
@@ -66,6 +66,12 @@ declare namespace pxt.auth {
|
|
|
66
66
|
type UserBadgeState = {
|
|
67
67
|
badges: Badge[];
|
|
68
68
|
};
|
|
69
|
+
/**
|
|
70
|
+
* Mapping of target id to preferred color theme id.
|
|
71
|
+
*/
|
|
72
|
+
type ColorThemeIdsState = {
|
|
73
|
+
[targetId: string]: string;
|
|
74
|
+
};
|
|
69
75
|
type SetPrefResult = {
|
|
70
76
|
success: boolean;
|
|
71
77
|
res: UserPreferences;
|
|
@@ -76,7 +82,7 @@ declare namespace pxt.auth {
|
|
|
76
82
|
type UserPreferences = {
|
|
77
83
|
language?: string;
|
|
78
84
|
highContrast?: boolean;
|
|
79
|
-
|
|
85
|
+
colorThemeIds?: ColorThemeIdsState;
|
|
80
86
|
reader?: string;
|
|
81
87
|
skillmap?: UserSkillmapState;
|
|
82
88
|
badges?: UserBadgeState;
|
package/built/pxtlib.js
CHANGED
|
@@ -206,7 +206,7 @@ var pxt;
|
|
|
206
206
|
auth.DEFAULT_USER_PREFERENCES = () => ({
|
|
207
207
|
language: pxt.appTarget.appTheme.defaultLocale,
|
|
208
208
|
highContrast: false,
|
|
209
|
-
|
|
209
|
+
colorThemeIds: {},
|
|
210
210
|
reader: "",
|
|
211
211
|
skillmap: { mapProgress: {}, completedTags: {} },
|
|
212
212
|
email: false
|
|
@@ -3850,14 +3850,16 @@ var pxt;
|
|
|
3850
3850
|
// patch cdn url locations
|
|
3851
3851
|
pxt.appTarget = replaceCdnUrlsInJsonBlob(pxt.appTarget);
|
|
3852
3852
|
// patch icons in bundled packages
|
|
3853
|
-
|
|
3854
|
-
|
|
3855
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3853
|
+
if (pxt.appTarget.bundledpkgs) {
|
|
3854
|
+
Object.keys(pxt.appTarget.bundledpkgs).forEach(pkgid => {
|
|
3855
|
+
const res = pxt.appTarget.bundledpkgs[pkgid];
|
|
3856
|
+
// path config before storing
|
|
3857
|
+
const config = JSON.parse(res[pxt.CONFIG_NAME]);
|
|
3858
|
+
if (config.icon)
|
|
3859
|
+
config.icon = pxt.BrowserUtils.patchCdn(config.icon);
|
|
3860
|
+
res[pxt.CONFIG_NAME] = pxt.Package.stringifyConfig(config);
|
|
3861
|
+
});
|
|
3862
|
+
}
|
|
3861
3863
|
// patch any pre-configured query url appTheme overrides
|
|
3862
3864
|
if (typeof window !== 'undefined') {
|
|
3863
3865
|
// Map<AppTarget>
|
|
@@ -14348,7 +14350,7 @@ var pxt;
|
|
|
14348
14350
|
currentSection.attributes[currentKey] = currentValue.trim();
|
|
14349
14351
|
}
|
|
14350
14352
|
}
|
|
14351
|
-
currentKey = keyMatch[1].toLowerCase();
|
|
14353
|
+
currentKey = keyMatch[1].trim().toLowerCase();
|
|
14352
14354
|
currentValue = keyMatch[2];
|
|
14353
14355
|
}
|
|
14354
14356
|
else if (currentKey) {
|
|
@@ -60,7 +60,7 @@ export declare class EditorDriver extends IframeDriver {
|
|
|
60
60
|
convertCloudProjectsToLocal(userId: string): Promise<void>;
|
|
61
61
|
requestProjectCloudStatus(headerIds: string[]): Promise<void>;
|
|
62
62
|
precacheTutorial(data: pxt.github.GHTutorialResponse): Promise<void>;
|
|
63
|
-
setColorTheme(colorThemeId: string): Promise<void>;
|
|
63
|
+
setColorTheme(colorThemeId: string, savePreference: boolean): Promise<void>;
|
|
64
64
|
addEventListener(event: typeof MessageSentEvent, handler: (ev: pxt.editor.EditorMessage) => void): void;
|
|
65
65
|
addEventListener(event: typeof MessageReceivedEvent, handler: (ev: pxt.editor.EditorMessage) => void): void;
|
|
66
66
|
addEventListener(event: "event", handler: (ev: pxt.editor.EditorMessageEventRequest) => void): void;
|
|
@@ -7,6 +7,7 @@ export declare class ThemeManager {
|
|
|
7
7
|
private constructor();
|
|
8
8
|
static getInstance(doc?: Document): ThemeManager;
|
|
9
9
|
getCurrentColorTheme(): Readonly<pxt.ColorThemeInfo>;
|
|
10
|
+
isKnownTheme(themeId: string): boolean;
|
|
10
11
|
getAllColorThemes(): pxt.ColorThemeInfo[];
|
|
11
12
|
isHighContrast(themeId: string): boolean;
|
|
12
13
|
private performHighContrastWorkaround;
|