pxt-core 7.5.32 → 7.5.35
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 +5 -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/built/web/skillmap/js/{main.d734c596.chunk.js → main.9d7e815e.chunk.js} +1 -1
- package/localtypings/pxtarget.d.ts +1 -0
- package/package.json +1 -1
- package/react-common/components/controls/DraggableGraph.tsx +4 -2
- package/react-common/components/controls/Input.tsx +1 -1
- package/react-common/components/controls/Modal.tsx +4 -3
- package/react-common/styles/controls/Button.less +1 -0
- package/react-common/styles/controls/DraggableGraph.less +4 -0
- package/react-common/styles/controls/Input.less +1 -0
- package/theme/common.less +38 -14
- package/theme/tutorial-sidebar.less +7 -0
- package/webapp/public/run.html +4 -1
- package/webapp/public/skillmap.html +1 -1
|
@@ -383,6 +383,7 @@ declare namespace pxt {
|
|
|
383
383
|
hideNewProjectButton?: boolean; // do not show the "new project" button in home page
|
|
384
384
|
saveInMenu?: boolean; // move save icon under gearwheel menu
|
|
385
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
|
|
386
387
|
fileNameExclusiveFilter?: string; // anything that does not match this regex is removed from the filename,
|
|
387
388
|
copyrightText?: string; // footer text for any copyright text to be included at the bottom of the home screen and about page
|
|
388
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" />
|
|
@@ -101,7 +101,7 @@ export const Input = (props: InputProps) => {
|
|
|
101
101
|
aria-hidden={ariaHidden}
|
|
102
102
|
type={type || "text"}
|
|
103
103
|
placeholder={placeholder}
|
|
104
|
-
value={value
|
|
104
|
+
value={value !== undefined ? value : (initialValue || "")}
|
|
105
105
|
readOnly={!!readOnly}
|
|
106
106
|
onClick={clickHandler}
|
|
107
107
|
onChange={changeHandler}
|
|
@@ -81,10 +81,11 @@ export const Modal = (props: ModalProps) => {
|
|
|
81
81
|
{fullscreen && helpUrl &&
|
|
82
82
|
<div className="common-modal-help">
|
|
83
83
|
<Button
|
|
84
|
-
className=
|
|
84
|
+
className="menu-button"
|
|
85
85
|
title={lf("Help on {0} dialog", title)}
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
href={props.helpUrl}
|
|
87
|
+
onClick={() => {}}
|
|
88
|
+
rightIcon="fas fa-question"
|
|
88
89
|
/>
|
|
89
90
|
</div>
|
|
90
91
|
}
|
package/theme/common.less
CHANGED
|
@@ -908,7 +908,7 @@ Field editors
|
|
|
908
908
|
.fullscreen.extensions-browser > {
|
|
909
909
|
.common-modal > {
|
|
910
910
|
.common-modal-header {
|
|
911
|
-
height:
|
|
911
|
+
height: @mainMenuHeight;
|
|
912
912
|
background-color: @blue;
|
|
913
913
|
z-index: 202;
|
|
914
914
|
display: flex;
|
|
@@ -937,6 +937,13 @@ Field editors
|
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
939
|
}
|
|
940
|
+
|
|
941
|
+
@media @tabletAndBelow {
|
|
942
|
+
.fullscreen.extensions-browser > .common-modal > .common-modal-header {
|
|
943
|
+
height: @mobileMenuHeight;
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
|
|
940
947
|
@media @mobileAndBelow {
|
|
941
948
|
.extensions-browser {
|
|
942
949
|
.common-modal > .common-modal-header > .common-modal-back {
|
|
@@ -959,17 +966,32 @@ Field editors
|
|
|
959
966
|
display: flex;
|
|
960
967
|
justify-content: center;
|
|
961
968
|
flex-wrap: wrap;
|
|
962
|
-
gap:
|
|
969
|
+
gap: 1rem;
|
|
970
|
+
padding-top: 2rem;
|
|
971
|
+
padding-bottom: 2rem;
|
|
963
972
|
background-color: #E5E5E5;
|
|
964
|
-
padding-top: 1rem;
|
|
965
973
|
|
|
966
|
-
.
|
|
967
|
-
width:
|
|
968
|
-
|
|
969
|
-
|
|
974
|
+
.common-input-wrapper {
|
|
975
|
+
width: 70%;
|
|
976
|
+
|
|
977
|
+
.common-input-group {
|
|
978
|
+
height: 3rem;
|
|
979
|
+
border-radius: 500rem;
|
|
980
|
+
padding: 0.7rem 1rem;
|
|
970
981
|
|
|
971
|
-
|
|
972
|
-
|
|
982
|
+
& > i.fas.fa-search {
|
|
983
|
+
position: relative;
|
|
984
|
+
margin-top: 0.1rem;
|
|
985
|
+
right: 0;
|
|
986
|
+
bottom: 0;
|
|
987
|
+
|
|
988
|
+
opacity: .5;
|
|
989
|
+
transition: opacity 0.3s ease;
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
|
|
993
|
+
&:focus-within .common-input-group > i.fas.fa-search {
|
|
994
|
+
opacity: 1;
|
|
973
995
|
}
|
|
974
996
|
}
|
|
975
997
|
}
|
|
@@ -1025,9 +1047,7 @@ Field editors
|
|
|
1025
1047
|
|
|
1026
1048
|
.extension-tags {
|
|
1027
1049
|
display: flex;
|
|
1028
|
-
|
|
1029
|
-
column-gap: 2rem;
|
|
1030
|
-
row-gap: 1rem;
|
|
1050
|
+
gap: 1rem;
|
|
1031
1051
|
width: 80%;
|
|
1032
1052
|
justify-content: center;
|
|
1033
1053
|
flex-wrap: wrap;
|
|
@@ -1061,9 +1081,13 @@ Field editors
|
|
|
1061
1081
|
.tab-header {
|
|
1062
1082
|
width: 100%;
|
|
1063
1083
|
|
|
1084
|
+
.common-button {
|
|
1085
|
+
border: 2px solid @white;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1064
1088
|
.common-button.selected {
|
|
1065
|
-
|
|
1066
|
-
|
|
1089
|
+
border-bottom: 2px solid @blue;
|
|
1090
|
+
font-weight: 600;
|
|
1067
1091
|
}
|
|
1068
1092
|
}
|
|
1069
1093
|
|
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() {
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
<!-- end usabilla live embed code -->
|
|
29
29
|
|
|
30
30
|
<!-- @include thin-footer.html -->
|
|
31
|
-
<script>!function(e){function r(r){for(var n,l,i=r[0],a=r[1],p=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var a=t[i];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this.webpackJsonpskillsmap=this.webpackJsonpskillsmap||[],a=i.push.bind(i);i.push=r,i=i.slice();for(var p=0;p<i.length;p++)r(i[p]);var f=a;t()}([])</script><script src="/blb/skillmap/js/2.26b9a6f6.chunk.js"></script><script src="/blb/skillmap/js/main.
|
|
31
|
+
<script>!function(e){function r(r){for(var n,l,i=r[0],a=r[1],p=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var a=t[i];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this.webpackJsonpskillsmap=this.webpackJsonpskillsmap||[],a=i.push.bind(i);i.push=r,i=i.slice();for(var p=0;p<i.length;p++)r(i[p]);var f=a;t()}([])</script><script src="/blb/skillmap/js/2.26b9a6f6.chunk.js"></script><script src="/blb/skillmap/js/main.9d7e815e.chunk.js"></script></body>
|
|
32
32
|
</html>
|