pxt-core 7.5.19 → 7.5.22

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 (48) hide show
  1. package/built/pxt.js +37 -0
  2. package/built/pxtcompiler.d.ts +1 -0
  3. package/built/pxtcompiler.js +21 -0
  4. package/built/pxteditor.d.ts +1 -0
  5. package/built/pxtlib.d.ts +17 -0
  6. package/built/pxtlib.js +16 -0
  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/pxtcompiler.js +1 -1
  13. package/built/web/pxtembed.js +1 -1
  14. package/built/web/pxtlib.js +1 -1
  15. package/built/web/pxtworker.js +1 -1
  16. package/built/web/react-common-authcode.css +168 -10
  17. package/built/web/react-common-skillmap.css +1 -1
  18. package/built/web/rtlblockly.css +1 -1
  19. package/built/web/rtlreact-common-skillmap.css +1 -1
  20. package/built/web/rtlsemantic.css +1 -1
  21. package/built/web/semantic.css +1 -1
  22. package/built/web/skillmap/css/main.c5811548.chunk.css +1 -0
  23. package/built/web/skillmap/js/2.26b9a6f6.chunk.js +2 -0
  24. package/built/web/skillmap/js/main.27185090.chunk.js +1 -0
  25. package/built/web/skillmap/js/{runtime-main.85a3c371.js → runtime-main.37bd2885.js} +0 -0
  26. package/localtypings/pxtarget.d.ts +16 -0
  27. package/localtypings/pxtpackage.d.ts +1 -0
  28. package/package.json +1 -1
  29. package/react-common/components/controls/Button.tsx +3 -0
  30. package/react-common/components/extensions/DeleteConfirmationModal.tsx +18 -0
  31. package/react-common/components/extensions/ExtensionCard.tsx +32 -0
  32. package/react-common/components/extensions/ImportModal.tsx +29 -0
  33. package/react-common/components/share/ShareInfo.tsx +98 -46
  34. package/react-common/components/share/SocialButton.tsx +1 -1
  35. package/react-common/styles/controls/Button.less +62 -14
  36. package/react-common/styles/controls/EditorToggle.less +3 -3
  37. package/react-common/styles/controls/Input.less +26 -0
  38. package/react-common/styles/extensions/ExtensionCard.less +56 -0
  39. package/react-common/styles/react-common-variables.less +15 -7
  40. package/react-common/styles/react-common.less +1 -0
  41. package/react-common/styles/share/share.less +56 -6
  42. package/theme/blockly-core.less +13 -0
  43. package/theme/common.less +152 -0
  44. package/theme/themes/pxt/globals/site.variables +7 -1
  45. package/webapp/public/skillmap.html +2 -2
  46. package/built/web/skillmap/css/main.73b22966.chunk.css +0 -1
  47. package/built/web/skillmap/js/2.3e47a285.chunk.js +0 -2
  48. package/built/web/skillmap/js/main.e30f6be4.chunk.js +0 -1
package/built/pxt.js CHANGED
@@ -102338,6 +102338,9 @@ var pxt;
102338
102338
  }
102339
102339
  BrowserUtils.noSharedLocalStorage = noSharedLocalStorage;
102340
102340
  function useOldTutorialLayout() {
102341
+ var _a, _b;
102342
+ if ((_b = (_a = pxt.appTarget) === null || _a === void 0 ? void 0 : _a.appTheme) === null || _b === void 0 ? void 0 : _b.legacyTutorial)
102343
+ return true;
102341
102344
  try {
102342
102345
  return (/tutorialview=old/.test(window.location.href));
102343
102346
  }
@@ -114289,6 +114292,19 @@ var ts;
114289
114292
  })(UF2 = pxtc.UF2 || (pxtc.UF2 = {}));
114290
114293
  })(pxtc = ts.pxtc || (ts.pxtc = {}));
114291
114294
  })(ts || (ts = {}));
114295
+ (function (ts) {
114296
+ var pxtc;
114297
+ (function (pxtc) {
114298
+ var service;
114299
+ (function (service) {
114300
+ let ExtensionType;
114301
+ (function (ExtensionType) {
114302
+ ExtensionType[ExtensionType["Bundled"] = 0] = "Bundled";
114303
+ ExtensionType[ExtensionType["Github"] = 1] = "Github";
114304
+ })(ExtensionType = service.ExtensionType || (service.ExtensionType = {}));
114305
+ })(service = pxtc.service || (pxtc.service = {}));
114306
+ })(pxtc = ts.pxtc || (ts.pxtc = {}));
114307
+ })(ts || (ts = {}));
114292
114308
  var pxt;
114293
114309
  (function (pxt) {
114294
114310
  var shell;
@@ -138708,6 +138724,7 @@ var ts;
138708
138724
  // don't export, fuse is internal only
138709
138725
  let lastFuse;
138710
138726
  let lastProjectFuse;
138727
+ let lastExtensionFuse;
138711
138728
  function fileDiags(fn) {
138712
138729
  if (!/\.ts$/.test(fn))
138713
138730
  return [];
@@ -139128,6 +139145,26 @@ var ts;
139128
139145
  const fns = lastFuse.search(search.term);
139129
139146
  return fns.slice(0, SEARCH_RESULT_COUNT);
139130
139147
  },
139148
+ extensionSearch: v => {
139149
+ const extensions = v.extensions.srcs;
139150
+ const searchFor = v.search.term;
139151
+ const fuseOptions = {
139152
+ shouldSort: true,
139153
+ threshold: 0.6,
139154
+ location: 0,
139155
+ distance: 100,
139156
+ maxPatternLength: 16,
139157
+ minMatchCharLength: 2,
139158
+ findAllMatches: false,
139159
+ caseSensitive: false,
139160
+ keys: [
139161
+ { name: 'name', weight: 1 }
139162
+ ]
139163
+ };
139164
+ lastExtensionFuse = new Fuse(extensions, fuseOptions);
139165
+ const found = lastExtensionFuse.search(searchFor);
139166
+ return found;
139167
+ },
139131
139168
  projectSearch: v => {
139132
139169
  const search = v.projectSearch;
139133
139170
  const searchSet = search.headers;
@@ -985,6 +985,7 @@ declare namespace ts.pxtc.service {
985
985
  snippet: (v: OpArg) => string;
986
986
  blocksInfo: (v: OpArg) => BlocksInfo;
987
987
  apiSearch: (v: OpArg) => SearchInfo[];
988
+ extensionSearch: (v: OpArg) => ExtensionMeta[];
988
989
  projectSearch: (v: OpArg) => ProjectSearchInfo[];
989
990
  projectSearchClear: () => void;
990
991
  }
@@ -17672,6 +17672,7 @@ var ts;
17672
17672
  // don't export, fuse is internal only
17673
17673
  let lastFuse;
17674
17674
  let lastProjectFuse;
17675
+ let lastExtensionFuse;
17675
17676
  function fileDiags(fn) {
17676
17677
  if (!/\.ts$/.test(fn))
17677
17678
  return [];
@@ -18092,6 +18093,26 @@ var ts;
18092
18093
  const fns = lastFuse.search(search.term);
18093
18094
  return fns.slice(0, SEARCH_RESULT_COUNT);
18094
18095
  },
18096
+ extensionSearch: v => {
18097
+ const extensions = v.extensions.srcs;
18098
+ const searchFor = v.search.term;
18099
+ const fuseOptions = {
18100
+ shouldSort: true,
18101
+ threshold: 0.6,
18102
+ location: 0,
18103
+ distance: 100,
18104
+ maxPatternLength: 16,
18105
+ minMatchCharLength: 2,
18106
+ findAllMatches: false,
18107
+ caseSensitive: false,
18108
+ keys: [
18109
+ { name: 'name', weight: 1 }
18110
+ ]
18111
+ };
18112
+ lastExtensionFuse = new Fuse(extensions, fuseOptions);
18113
+ const found = lastExtensionFuse.search(searchFor);
18114
+ return found;
18115
+ },
18095
18116
  projectSearch: v => {
18096
18117
  const search = v.projectSearch;
18097
18118
  const searchSet = search.headers;
@@ -88,6 +88,7 @@ declare namespace pxt.editor {
88
88
  deviceSerialActive?: boolean;
89
89
  errorListState?: ErrorListState;
90
90
  screenshoting?: boolean;
91
+ extensionsVisible?: boolean;
91
92
  }
92
93
  interface EditorState {
93
94
  filters?: pxt.editor.ProjectFilters;
package/built/pxtlib.d.ts CHANGED
@@ -2188,6 +2188,7 @@ declare namespace ts.pxtc.service {
2188
2188
  search?: SearchOptions;
2189
2189
  format?: FormatOptions;
2190
2190
  blocks?: BlocksOptions;
2191
+ extensions?: ExtensionsOptions;
2191
2192
  projectSearch?: ProjectSearchOptions;
2192
2193
  snippet?: SnippetOptions;
2193
2194
  runtime?: pxt.RuntimeOptions;
@@ -2207,6 +2208,19 @@ declare namespace ts.pxtc.service {
2207
2208
  input: string;
2208
2209
  pos: number;
2209
2210
  }
2211
+ enum ExtensionType {
2212
+ Bundled = 0,
2213
+ Github = 1
2214
+ }
2215
+ interface ExtensionMeta {
2216
+ name: string;
2217
+ fullName?: string;
2218
+ description?: string;
2219
+ imageUrl?: string;
2220
+ type?: ExtensionType;
2221
+ pkgConfig?: pxt.PackageConfig;
2222
+ repo?: pxt.github.GitRepo;
2223
+ }
2210
2224
  interface SearchInfo {
2211
2225
  id: string;
2212
2226
  name: string;
@@ -2230,6 +2244,9 @@ declare namespace ts.pxtc.service {
2230
2244
  interface BlocksOptions {
2231
2245
  bannedCategories?: string[];
2232
2246
  }
2247
+ interface ExtensionsOptions {
2248
+ srcs: ExtensionMeta[];
2249
+ }
2233
2250
  }
2234
2251
  declare namespace pxt.shell {
2235
2252
  enum EditorLayoutType {
package/built/pxtlib.js CHANGED
@@ -4652,6 +4652,9 @@ var pxt;
4652
4652
  }
4653
4653
  BrowserUtils.noSharedLocalStorage = noSharedLocalStorage;
4654
4654
  function useOldTutorialLayout() {
4655
+ var _a, _b;
4656
+ if ((_b = (_a = pxt.appTarget) === null || _a === void 0 ? void 0 : _a.appTheme) === null || _b === void 0 ? void 0 : _b.legacyTutorial)
4657
+ return true;
4655
4658
  try {
4656
4659
  return (/tutorialview=old/.test(window.location.href));
4657
4660
  }
@@ -16603,6 +16606,19 @@ var ts;
16603
16606
  })(UF2 = pxtc.UF2 || (pxtc.UF2 = {}));
16604
16607
  })(pxtc = ts.pxtc || (ts.pxtc = {}));
16605
16608
  })(ts || (ts = {}));
16609
+ (function (ts) {
16610
+ var pxtc;
16611
+ (function (pxtc) {
16612
+ var service;
16613
+ (function (service) {
16614
+ let ExtensionType;
16615
+ (function (ExtensionType) {
16616
+ ExtensionType[ExtensionType["Bundled"] = 0] = "Bundled";
16617
+ ExtensionType[ExtensionType["Github"] = 1] = "Github";
16618
+ })(ExtensionType = service.ExtensionType || (service.ExtensionType = {}));
16619
+ })(service = pxtc.service || (pxtc.service = {}));
16620
+ })(pxtc = ts.pxtc || (ts.pxtc = {}));
16621
+ })(ts || (ts = {}));
16606
16622
  var pxt;
16607
16623
  (function (pxt) {
16608
16624
  var shell;