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.
- package/built/pxt.js +49 -26
- package/built/pxtblockly.js +4 -5
- package/built/pxtblocks.js +4 -5
- package/built/pxtcompiler.js +40 -25
- package/built/pxtlib.d.ts +1 -0
- package/built/pxtlib.js +8 -1
- package/built/pxtrunner.d.ts +1 -0
- package/built/pxtrunner.js +1 -0
- package/built/pxtsim.d.ts +1 -0
- package/built/pxtsim.js +1 -0
- package/built/target.js +1 -1
- package/built/web/main.js +1 -1
- package/built/web/pxtapp.js +1 -1
- package/built/web/pxtblockly.js +1 -1
- package/built/web/pxtblocks.js +1 -1
- package/built/web/pxtcompiler.js +1 -1
- package/built/web/pxtembed.js +2 -2
- package/built/web/pxtlib.js +1 -1
- package/built/web/pxtrunner.js +1 -1
- package/built/web/pxtsim.js +1 -1
- package/built/web/pxtworker.js +1 -1
- package/built/web/react-common-authcode.css +3 -0
- package/built/web/react-common-skillmap.css +1 -1
- package/built/web/rtlreact-common-skillmap.css +1 -1
- package/built/web/rtlsemantic.css +1 -1
- package/built/web/semantic.css +1 -1
- package/localtypings/pxtarget.d.ts +2 -7
- package/package.json +1 -1
- package/react-common/components/controls/DraggableGraph.tsx +4 -2
- package/react-common/styles/controls/DraggableGraph.less +4 -0
- package/theme/tutorial-sidebar.less +7 -0
- package/webapp/public/run.html +4 -1
|
@@ -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
|
-
|
|
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
|
@@ -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" />
|
package/webapp/public/run.html
CHANGED
|
@@ -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() {
|