pxt-core 8.2.12 → 8.2.14

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/buildengine.js +3 -3
  2. package/built/cli.js +5 -5
  3. package/built/gdb.js +4 -4
  4. package/built/nodeutil.d.ts +1 -0
  5. package/built/pxt.js +366 -364
  6. package/built/pxtblockly.js +35 -35
  7. package/built/pxtblocks.js +35 -35
  8. package/built/pxtcompiler.js +162 -160
  9. package/built/pxteditor.d.ts +15 -3
  10. package/built/pxteditor.js +6 -6
  11. package/built/pxtlib.d.ts +2 -1
  12. package/built/pxtlib.js +162 -161
  13. package/built/pxtpy.js +34 -35
  14. package/built/pxtsim.d.ts +5 -5
  15. package/built/pxtsim.js +3 -3
  16. package/built/server.js +5 -5
  17. package/built/storage.js +4 -4
  18. package/built/target.js +1 -1
  19. package/built/web/main.js +1 -1
  20. package/built/web/pxtapp.js +1 -1
  21. package/built/web/pxtasseteditor.js +1 -1
  22. package/built/web/pxtcompiler.js +1 -1
  23. package/built/web/pxteditor.js +1 -1
  24. package/built/web/pxtembed.js +2 -2
  25. package/built/web/pxtlib.js +1 -1
  26. package/built/web/pxtpy.js +1 -1
  27. package/built/web/pxtsim.js +1 -1
  28. package/built/web/pxtworker.js +1 -1
  29. package/built/web/rtlsemantic.css +1 -1
  30. package/built/web/semantic.css +1 -1
  31. package/built/web/skillmap/js/2.960f04a5.chunk.js +2 -0
  32. package/built/web/skillmap/js/main.44b2383f.chunk.js +1 -0
  33. package/common-docs/static/logo/social-buttons/google-classroom.png +0 -0
  34. package/common-docs/static/logo/social-buttons/microsoft-teams.png +0 -0
  35. package/docfiles/pxtweb/tsconfig.json +2 -1
  36. package/localtypings/dom.d.ts +3 -0
  37. package/localtypings/react.d.ts +1 -1
  38. package/package.json +6 -6
  39. package/react-common/components/controls/Modal.tsx +2 -2
  40. package/react-common/components/share/ShareInfo.tsx +1 -1
  41. package/react-common/tsconfig.json +3 -2
  42. package/theme/common.less +5 -3
  43. package/theme/highcontrast.less +3 -0
  44. package/theme/toolbox.less +25 -0
  45. package/theme/tutorial-sidebar.less +171 -115
  46. package/webapp/public/skillmap.html +1 -1
  47. package/built/web/skillmap/js/2.26325281.chunk.js +0 -2
  48. package/built/web/skillmap/js/main.d94a2bd9.chunk.js +0 -1
@@ -174,6 +174,17 @@ declare namespace pxt.editor {
174
174
  initials?: string;
175
175
  photo?: string;
176
176
  }
177
+ interface ShareData {
178
+ url: string;
179
+ embed: {
180
+ code?: string;
181
+ editor?: string;
182
+ simulator?: string;
183
+ url?: string;
184
+ };
185
+ qr?: string;
186
+ error?: any;
187
+ }
177
188
  type Activity = "tutorial" | "recipe" | "example";
178
189
  interface IProjectView {
179
190
  state: IAppState;
@@ -242,9 +253,9 @@ declare namespace pxt.editor {
242
253
  clearUserPoke(): void;
243
254
  setHintSeen(step: number): void;
244
255
  setEditorOffset(): void;
245
- anonymousPublishAsync(screenshotUri?: string): Promise<string>;
246
- anonymousPublishHeaderByIdAsync(headerId: string): Promise<Cloud.JsonScript>;
247
- persistentPublishAsync(screenshotUri?: string): Promise<string>;
256
+ anonymousPublishHeaderByIdAsync(headerId: string, projectName?: string): Promise<ShareData>;
257
+ publishCurrentHeaderAsync(persistent: boolean, screenshotUri?: string): Promise<string>;
258
+ publishAsync(name: string, screenshotUri?: string, forceAnonymous?: boolean): Promise<pxt.editor.ShareData>;
248
259
  startStopSimulator(opts?: SimulatorStartOptions): void;
249
260
  stopSimulator(unload?: boolean, opts?: SimulatorStartOptions): void;
250
261
  restartSimulator(): void;
@@ -746,6 +757,7 @@ declare namespace pxt.editor {
746
757
  interface EditorShareRequest extends EditorMessageRequest {
747
758
  action: "shareproject";
748
759
  headerId: string;
760
+ projectName: string;
749
761
  }
750
762
  interface EditorShareResponse extends EditorMessageRequest {
751
763
  action: "shareproject";
@@ -259,7 +259,7 @@ var pxt;
259
259
  }
260
260
  case "shareproject": {
261
261
  const msg = data;
262
- return projectView.anonymousPublishHeaderByIdAsync(msg.headerId)
262
+ return projectView.anonymousPublishHeaderByIdAsync(msg.headerId, msg.projectName)
263
263
  .then(scriptInfo => {
264
264
  resp = scriptInfo;
265
265
  });
@@ -1146,13 +1146,13 @@ var pxt;
1146
1146
  const name = matchedName.trim();
1147
1147
  const project = pxt.react.getTilemapProject();
1148
1148
  this.isAsset = true;
1149
- const asset = project.lookupAssetByName("image" /* Image */, name);
1149
+ const asset = project.lookupAssetByName("image" /* pxt.AssetType.Image */, name);
1150
1150
  if (asset) {
1151
1151
  return asset;
1152
1152
  }
1153
1153
  else {
1154
1154
  const newAsset = project.createNewImage();
1155
- if (name && !project.isNameTaken("image" /* Image */, name) && pxt.validateAssetName(name)) {
1155
+ if (name && !project.isNameTaken("image" /* pxt.AssetType.Image */, name) && pxt.validateAssetName(name)) {
1156
1156
  newAsset.meta.displayName = name;
1157
1157
  }
1158
1158
  return newAsset;
@@ -1189,7 +1189,7 @@ var pxt;
1189
1189
  editor.MonacoSpriteEditor = MonacoSpriteEditor;
1190
1190
  function createFakeAsset(bitmap) {
1191
1191
  return {
1192
- type: "image" /* Image */,
1192
+ type: "image" /* pxt.AssetType.Image */,
1193
1193
  id: "",
1194
1194
  internalID: 0,
1195
1195
  bitmap: bitmap.data(),
@@ -1252,7 +1252,7 @@ var pxt;
1252
1252
  let id;
1253
1253
  if (name) {
1254
1254
  id = ts.pxtc.escapeIdentifier(name);
1255
- proj = project.getTilemap(id) || project.lookupAssetByName("tilemap" /* Tilemap */, name);
1255
+ proj = project.getTilemap(id) || project.lookupAssetByName("tilemap" /* AssetType.Tilemap */, name);
1256
1256
  }
1257
1257
  if (!proj) {
1258
1258
  let tileWidth = 16;
@@ -1320,7 +1320,7 @@ var pxt;
1320
1320
  editor.MonacoTilemapEditor = MonacoTilemapEditor;
1321
1321
  function createFakeAsset(data) {
1322
1322
  return {
1323
- type: "tilemap" /* Tilemap */,
1323
+ type: "tilemap" /* pxt.AssetType.Tilemap */,
1324
1324
  id: "",
1325
1325
  internalID: 0,
1326
1326
  meta: {},
package/built/pxtlib.d.ts CHANGED
@@ -2,6 +2,7 @@
2
2
  /// <reference path="../localtypings/pxtparts.d.ts" />
3
3
  /// <reference path="../localtypings/pxtarget.d.ts" />
4
4
  /// <reference path="../localtypings/projectheader.d.ts" />
5
+ /// <reference path="../localtypings/dom.d.ts" />
5
6
  /// <reference path="../localtypings/dompurify.d.ts" />
6
7
  /// <reference path="../pxtcompiler/ext-typescript/lib/typescriptServices.d.ts" />
7
8
  /// <reference types="marked" />
@@ -396,7 +397,7 @@ declare namespace ts.pxtc.Util {
396
397
  export function nowSeconds(): number;
397
398
  export function timeout(ms: number): Promise<void>;
398
399
  export let cpuUs: () => number;
399
- export function getMime(filename: string): "application/xml" | "image/svg+xml" | "text/html" | "text/plain" | "text/css" | "application/javascript" | "image/jpeg" | "image/png" | "image/x-icon" | "text/cache-manifest" | "application/manifest+json" | "application/json" | "application/vnd.ms-fontobject" | "font/ttf" | "application/font-woff" | "application/font-woff2" | "text/markdown" | "audio/m4a" | "audio/mp3" | "application/octet-stream";
400
+ export function getMime(filename: string): "text/plain" | "text/html" | "text/css" | "application/javascript" | "image/jpeg" | "image/png" | "image/x-icon" | "text/cache-manifest" | "application/manifest+json" | "application/json" | "image/svg+xml" | "application/vnd.ms-fontobject" | "font/ttf" | "application/font-woff" | "application/font-woff2" | "text/markdown" | "application/xml" | "audio/m4a" | "audio/mp3" | "application/octet-stream";
400
401
  export function randomUint32(): number;
401
402
  export function guidGen(): string;
402
403
  export function downloadLiveTranslationsAsync(lang: string, filename: string, branch?: string, etag?: string): Promise<pxt.Map<string>>;