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.
Files changed (39) hide show
  1. package/built/pxt.js +9 -6
  2. package/built/pxtblockly.js +1359 -1448
  3. package/built/pxtblocks.d.ts +4 -4
  4. package/built/pxtblocks.js +35 -80
  5. package/built/pxtlib.d.ts +6 -1
  6. package/built/pxtlib.js +9 -6
  7. package/built/target.js +1 -1
  8. package/built/web/blockly.css +1 -1
  9. package/built/web/main.js +1 -1
  10. package/built/web/pxtapp.js +1 -1
  11. package/built/web/pxtasseteditor.js +1 -1
  12. package/built/web/pxtblockly.js +1 -1
  13. package/built/web/pxtblocks.js +1 -1
  14. package/built/web/pxtembed.js +1 -1
  15. package/built/web/pxtlib.js +1 -1
  16. package/built/web/pxtworker.js +1 -1
  17. package/built/web/react-common.css +10 -5
  18. package/built/web/rtlblockly.css +1 -1
  19. package/built/web/rtlsemantic.css +2 -2
  20. package/built/web/semantic.css +2 -2
  21. package/built/web/skillmap/css/main.96b1b3f1.chunk.css +1 -0
  22. package/built/web/skillmap/js/2.7dd06a3a.chunk.js +2 -0
  23. package/built/web/skillmap/js/main.bdd63c80.chunk.js +1 -0
  24. package/localtypings/blockly.d.ts +12268 -7535
  25. package/localtypings/pxtarget.d.ts +1 -0
  26. package/package.json +2 -2
  27. package/theme/blockly-core.less +22 -13
  28. package/theme/melodyeditor.less +2 -2
  29. package/theme/print.less +1 -1
  30. package/theme/pxt.less +0 -1
  31. package/theme/toolbox.less +1 -0
  32. package/webapp/public/blockly/blockly_compressed.js +1269 -1286
  33. package/webapp/public/blockly/blocks_compressed.js +47 -65
  34. package/webapp/public/blockly/msg/js/en.js +8 -17
  35. package/webapp/public/blockly/msg/json/en.json +6 -15
  36. package/webapp/public/skillmap.html +2 -2
  37. package/built/web/skillmap/css/main.ad6de34e.chunk.css +0 -1
  38. package/built/web/skillmap/js/2.c64f6be2.chunk.js +0 -2
  39. 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
  }