pxt-core 7.5.31 → 7.5.34

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.
@@ -49,8 +49,7 @@ declare namespace pxt {
49
49
  // list of trusted custom editor extension urls
50
50
  // that can bypass consent and send/receive messages
51
51
  approvedEditorExtensionUrls?: string[];
52
- extensionsToIgnore?: string[]; // List of extensions to ignore when allowing for deletion
53
- categories?: ExtensionCategory[];
52
+ extensionsToolboxDisallowDelete?: string[]; // List of extensions to ignore when allowing for deletion in toolbox
54
53
  }
55
54
 
56
55
  interface RepoData {
@@ -58,11 +57,6 @@ declare namespace pxt {
58
57
  tags?: string[]
59
58
  }
60
59
 
61
- interface ExtensionCategory {
62
- name: string;
63
- extensions: string[];
64
- }
65
-
66
60
  interface ShareConfig {
67
61
  approved?: string[];
68
62
  }
@@ -389,6 +383,7 @@ declare namespace pxt {
389
383
  hideNewProjectButton?: boolean; // do not show the "new project" button in home page
390
384
  saveInMenu?: boolean; // move save icon under gearwheel menu
391
385
  lockedEditor?: boolean; // remove default home navigation links from the editor
386
+ hideReplaceMyCode?: boolean; // hides the "replace my code" button for tutorials with templates in their markdown
392
387
  fileNameExclusiveFilter?: string; // anything that does not match this regex is removed from the filename,
393
388
  copyrightText?: string; // footer text for any copyright text to be included at the bottom of the home screen and about page
394
389
  appFlashingTroubleshoot?: string; // Path to the doc about troubleshooting UWP app flashing failures, e.g. /device/windows-app/troubleshoot
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pxt-core",
3
- "version": "7.5.31",
3
+ "version": "7.5.34",
4
4
  "description": "Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors",
5
5
  "keywords": [
6
6
  "TypeScript",
@@ -79,6 +79,7 @@ export const DraggableGraph = (props: DraggableGraphProps) => {
79
79
  refs.forEach((ref, index) => {
80
80
  ref.onpointerdown = ev => {
81
81
  if (dragIndex !== -1) return;
82
+ ev.preventDefault();
82
83
  const coord = clientCoord(ev);
83
84
  const svg = screenToSVGCoord(ref.ownerSVGElement, coord);
84
85
  setDragIndex(index);
@@ -87,6 +88,7 @@ export const DraggableGraph = (props: DraggableGraphProps) => {
87
88
 
88
89
  ref.onpointermove = ev => {
89
90
  if (dragIndex !== index) return;
91
+ ev.preventDefault();
90
92
  const coord = clientCoord(ev);
91
93
  const svg = screenToSVGCoord(ref.ownerSVGElement, coord);
92
94
  throttledSetDragValue(index, svgCoordToValue(svg));
@@ -111,7 +113,7 @@ export const DraggableGraph = (props: DraggableGraphProps) => {
111
113
  }, [dragIndex, onPointChange])
112
114
 
113
115
  const getValue = (index: number) => {
114
- return points[index];
116
+ return Math.min(Math.max(points[index], min), max);
115
117
  }
116
118
 
117
119
  const handleRectAnimateRef = (ref: SVGAnimateElement) => {
@@ -131,7 +133,7 @@ export const DraggableGraph = (props: DraggableGraphProps) => {
131
133
  aria-hidden={ariaHidden}
132
134
  aria-describedby={ariaDescribedBy}
133
135
  role={role}>
134
- <svg viewBox={`0 0 ${width} ${height}`} xmlns="http://www.w3.org/2000/svg">
136
+ <svg className="draggable-graph-svg" viewBox={`0 0 ${width} ${height}`} xmlns="http://www.w3.org/2000/svg">
135
137
  <defs>
136
138
  <filter id="dropshadow">
137
139
  <feGaussianBlur in="SourceAlpha" stdDeviation="3" />
@@ -13,4 +13,8 @@
13
13
 
14
14
  .draggable-graph-surface {
15
15
  cursor: pointer;
16
+ }
17
+
18
+ .draggable-graph-svg {
19
+ touch-action: none;
16
20
  }
@@ -418,6 +418,13 @@
418
418
  }
419
419
  }
420
420
 
421
+ #root.headless.tabTutorial.hideMenuBar {
422
+ #editorSidebar {
423
+ top: 0;
424
+ height: 100%;
425
+ }
426
+ }
427
+
421
428
  /*******************************
422
429
  Keymap
423
430
  *******************************/
@@ -106,6 +106,7 @@
106
106
  var localToken = /local_token(?:[:=])([^&?]+)/i.exec(window.location.href);
107
107
  var hex = !!/hex(?:[:=])1/i.exec(window.location.href);
108
108
  var footer = !/nofooter(?:[:=])1/i.exec(window.location.href);
109
+ var hideSimButtons = !!/hidesimbuttons(?:[:=])1/i.exec(window.location.href);
109
110
  var debugSim = !!/debugSim(?:[:=])1/i.exec(window.location.href);
110
111
  var sims = document.getElementById('simulators');
111
112
  var highContrast = !!/hc(?:[:=])1/i.exec(window.location.href);
@@ -180,6 +181,7 @@
180
181
  code: files["main.ts"],
181
182
  assets: JSON.stringify(files),
182
183
  dependencies: Object.keys(deps).map(v => v + "=" + deps[v]),
184
+ hideSimButtons: hideSimButtons,
183
185
  highContrast: highContrast,
184
186
  light: light,
185
187
  fullScreen: fullScreen,
@@ -239,7 +241,8 @@
239
241
  fullScreen: fullScreen,
240
242
  dependencies: deps ? decodeURIComponent(deps[1]).split(",") : undefined,
241
243
  builtJsInfo: builtSimJs,
242
- single: single
244
+ single: single,
245
+ hideSimButtons: hideSimButtons
243
246
  };
244
247
  console.log('simulating script')
245
248
  pxt.runner.simulateAsync(sims, options).then(function() {