pxt-core 7.3.17 → 7.3.21
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/pxt.js +9 -6
- package/built/pxtblockly.js +1359 -1448
- package/built/pxtblocks.d.ts +4 -4
- package/built/pxtblocks.js +35 -80
- package/built/pxtlib.d.ts +6 -1
- package/built/pxtlib.js +9 -6
- package/built/target.js +1 -1
- package/built/web/blockly.css +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/pxtembed.js +1 -1
- package/built/web/pxtlib.js +1 -1
- package/built/web/pxtworker.js +1 -1
- package/built/web/react-common.css +10 -5
- package/built/web/rtlblockly.css +1 -1
- package/built/web/rtlsemantic.css +2 -2
- package/built/web/semantic.css +2 -2
- package/built/web/skillmap/css/main.96b1b3f1.chunk.css +1 -0
- package/built/web/skillmap/js/2.7dd06a3a.chunk.js +2 -0
- package/built/web/skillmap/js/main.bdd63c80.chunk.js +1 -0
- package/localtypings/blockly.d.ts +12268 -7535
- package/localtypings/pxtarget.d.ts +1 -0
- package/package.json +2 -2
- package/theme/blockly-core.less +22 -13
- package/theme/melodyeditor.less +2 -2
- package/theme/print.less +1 -1
- package/theme/pxt.less +0 -1
- package/theme/toolbox.less +1 -0
- package/webapp/public/blockly/blockly_compressed.js +1269 -1286
- package/webapp/public/blockly/blocks_compressed.js +47 -65
- package/webapp/public/blockly/msg/js/en.js +8 -17
- package/webapp/public/blockly/msg/json/en.json +6 -15
- package/webapp/public/skillmap.html +2 -2
- package/built/web/skillmap/css/main.ad6de34e.chunk.css +0 -1
- package/built/web/skillmap/js/2.c64f6be2.chunk.js +0 -2
- package/built/web/skillmap/js/main.0fff4916.chunk.js +0 -1
package/built/pxt.js
CHANGED
|
@@ -97871,7 +97871,8 @@ var pxt;
|
|
|
97871
97871
|
highContrast: false,
|
|
97872
97872
|
language: pxt.appTarget.appTheme.defaultLocale,
|
|
97873
97873
|
reader: "",
|
|
97874
|
-
skillmap: { mapProgress: {}, completedTags: {} }
|
|
97874
|
+
skillmap: { mapProgress: {}, completedTags: {} },
|
|
97875
|
+
email: false
|
|
97875
97876
|
});
|
|
97876
97877
|
let _client;
|
|
97877
97878
|
function client() { return _client; }
|
|
@@ -98077,15 +98078,15 @@ var pxt;
|
|
|
98077
98078
|
async patchUserPreferencesAsync(ops, immediate = false) {
|
|
98078
98079
|
ops = Array.isArray(ops) ? ops : [ops];
|
|
98079
98080
|
ops = ops.filter(op => !!op);
|
|
98081
|
+
const curPref = await this.userPreferencesAsync();
|
|
98080
98082
|
if (!ops.length) {
|
|
98081
|
-
return;
|
|
98083
|
+
return { success: true, res: curPref };
|
|
98082
98084
|
}
|
|
98083
|
-
const curPref = await this.userPreferencesAsync();
|
|
98084
98085
|
ts.pxtc.jsonPatch.patchInPlace(curPref, ops);
|
|
98085
98086
|
await this.setUserPreferencesAsync(curPref);
|
|
98086
98087
|
// If we're not logged in, non-persistent local state is all we'll use
|
|
98087
98088
|
if (!await this.loggedInAsync()) {
|
|
98088
|
-
return;
|
|
98089
|
+
return { success: true, res: curPref };
|
|
98089
98090
|
}
|
|
98090
98091
|
// If the user is logged in, save to cloud, but debounce the api call as this can be called frequently from skillmaps
|
|
98091
98092
|
// Replace matching patches in the queue
|
|
@@ -98117,19 +98118,21 @@ var pxt;
|
|
|
98117
98118
|
else {
|
|
98118
98119
|
pxt.reportError("identity", "update preferences failed", result);
|
|
98119
98120
|
}
|
|
98121
|
+
return { success: result.success, res: result.resp };
|
|
98120
98122
|
};
|
|
98121
98123
|
if (immediate) {
|
|
98122
|
-
await savePrefs();
|
|
98124
|
+
return await savePrefs();
|
|
98123
98125
|
}
|
|
98124
98126
|
else {
|
|
98125
98127
|
if (!debouncePreferencesChangedStarted) {
|
|
98126
98128
|
debouncePreferencesChangedStarted = pxt.U.now();
|
|
98127
98129
|
}
|
|
98128
98130
|
if (PREFERENCES_DEBOUNCE_MAX_MS < pxt.U.now() - debouncePreferencesChangedStarted) {
|
|
98129
|
-
await savePrefs();
|
|
98131
|
+
return await savePrefs();
|
|
98130
98132
|
}
|
|
98131
98133
|
else {
|
|
98132
98134
|
debouncePreferencesChangedTimeout = setTimeout(savePrefs, PREFERENCES_DEBOUNCE_MS);
|
|
98135
|
+
return { success: false, res: undefined }; // This needs to be implemented correctly to return a promise with the debouncer
|
|
98133
98136
|
}
|
|
98134
98137
|
}
|
|
98135
98138
|
}
|