pxt-core 8.4.2 → 8.4.4
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/backendutils.js +1 -0
- package/built/cli.js +83 -75
- package/built/pxt.js +1279 -180
- package/built/pxtblockly.js +323 -40
- package/built/pxtblocks.d.ts +30 -7
- package/built/pxtblocks.js +324 -41
- package/built/pxtlib.d.ts +91 -5
- package/built/pxtlib.js +1173 -98
- package/built/pxtrunner.d.ts +1 -0
- package/built/pxtrunner.js +2 -1
- package/built/pxtsim.d.ts +1 -0
- package/built/pxtsim.js +23 -7
- package/built/server.js +4 -0
- package/built/target.js +1 -1
- package/built/web/main.js +1 -1
- package/built/web/multiplayer/css/main.1b9969ea.css +4 -0
- package/built/web/multiplayer/js/main.9f7f3192.js +2 -0
- package/built/web/pxtapp.js +1 -1
- package/built/web/pxtasseteditor.js +1 -1
- package/built/web/pxtblockly.js +1 -1
- package/built/web/pxtblocks.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 +2 -2
- package/built/web/react-common-authcode.css +4 -6993
- package/built/web/react-common-multiplayer.css +13 -0
- package/built/web/react-common-skillmap.css +1 -1
- package/built/web/rtlreact-common-authcode.css +13 -0
- package/built/web/rtlreact-common-multiplayer.css +13 -0
- 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.a6cf40e1.chunk.js +1 -0
- package/common-docs/identity/sign-in.md +17 -3
- package/common-docs/static/music-editor/apple.png +0 -0
- package/common-docs/static/music-editor/burger.png +0 -0
- package/common-docs/static/music-editor/cake.png +0 -0
- package/common-docs/static/music-editor/car.png +0 -0
- package/common-docs/static/music-editor/cat.png +0 -0
- package/common-docs/static/music-editor/cherry.png +0 -0
- package/common-docs/static/music-editor/clam.png +0 -0
- package/common-docs/static/music-editor/computer.png +0 -0
- package/common-docs/static/music-editor/crab.png +0 -0
- package/common-docs/static/music-editor/dog.png +0 -0
- package/common-docs/static/music-editor/duck.png +0 -0
- package/common-docs/static/music-editor/egg.png +0 -0
- package/common-docs/static/music-editor/explosion.png +0 -0
- package/common-docs/static/music-editor/fish.png +0 -0
- package/common-docs/static/music-editor/ice-cream.png +0 -0
- package/common-docs/static/music-editor/lemon.png +0 -0
- package/common-docs/static/music-editor/metronomeWorker.js +35 -0
- package/common-docs/static/music-editor/snake.png +0 -0
- package/common-docs/static/music-editor/star.png +0 -0
- package/common-docs/static/music-editor/strawberry.png +0 -0
- package/common-docs/static/music-editor/taco.png +0 -0
- package/common-docs/static/music-editor/treble-clef.svg +1 -0
- package/package.json +4 -2
- package/react-common/components/controls/Input.tsx +7 -3
- package/react-common/styles/controls/Button.less +9 -0
- package/react-common/styles/react-common-authcode-core.less +1 -1
- package/react-common/styles/react-common-authcode.less +1 -1
- package/react-common/styles/react-common-multiplayer-core.less +10 -0
- package/react-common/styles/react-common-multiplayer.less +12 -0
- package/theme/highcontrast.less +6 -0
- package/theme/music-editor/EditControls.less +22 -0
- package/theme/music-editor/MusicEditor.less +25 -0
- package/theme/music-editor/Note.less +16 -0
- package/theme/music-editor/NoteGroup.less +7 -0
- package/theme/music-editor/PlaybackControls.less +55 -0
- package/theme/music-editor/ScrollableWorkspace.less +3 -0
- package/theme/music-editor/Staff.less +31 -0
- package/theme/music-editor/Track.less +0 -0
- package/theme/music-editor/TrackSelector.less +48 -0
- package/theme/music-editor/Workspace.less +3 -0
- package/theme/pxt.less +1 -0
- package/theme/tutorial-sidebar.less +3 -0
- package/webapp/public/multiplayer.html +1 -0
- package/webapp/public/run.html +13 -2
- package/webapp/public/skillmap.html +1 -1
- package/built/web/skillmap/js/main.6eec9e0f.chunk.js +0 -1
package/built/pxtrunner.d.ts
CHANGED
package/built/pxtrunner.js
CHANGED
|
@@ -1764,7 +1764,8 @@ var pxt;
|
|
|
1764
1764
|
light: simOptions.light,
|
|
1765
1765
|
single: simOptions.single,
|
|
1766
1766
|
hideSimButtons: simOptions.hideSimButtons,
|
|
1767
|
-
autofocus: simOptions.autofocus
|
|
1767
|
+
autofocus: simOptions.autofocus,
|
|
1768
|
+
queryParameters: simOptions.additionalQueryParameters,
|
|
1768
1769
|
};
|
|
1769
1770
|
if (pxt.appTarget.simulator && !simOptions.fullScreen)
|
|
1770
1771
|
runOptions.aspectRatio = parts.length && pxt.appTarget.simulator.partsAspectRatio
|
package/built/pxtsim.d.ts
CHANGED
package/built/pxtsim.js
CHANGED
|
@@ -6223,8 +6223,8 @@ var pxsim;
|
|
|
6223
6223
|
if (parentWindow) {
|
|
6224
6224
|
// if message comes from parent already, don't echo
|
|
6225
6225
|
if (source !== parentWindow) {
|
|
6226
|
-
|
|
6227
|
-
parentWindow.postMessage(msg,
|
|
6226
|
+
// posting sim messages to parent frame; no origin restriction.
|
|
6227
|
+
parentWindow.postMessage(msg, "*");
|
|
6228
6228
|
}
|
|
6229
6229
|
}
|
|
6230
6230
|
if (!this.options.nestedEditorSim && !(broadcastmsg === null || broadcastmsg === void 0 ? void 0 : broadcastmsg.toParentIFrameOnly)) {
|
|
@@ -6315,7 +6315,7 @@ var pxsim;
|
|
|
6315
6315
|
}
|
|
6316
6316
|
}
|
|
6317
6317
|
createFrame(url) {
|
|
6318
|
-
var _a, _b;
|
|
6318
|
+
var _a, _b, _c;
|
|
6319
6319
|
const wrapper = document.createElement("div");
|
|
6320
6320
|
wrapper.className = `simframe ui embed`;
|
|
6321
6321
|
const frame = document.createElement('iframe');
|
|
@@ -6331,12 +6331,23 @@ var pxsim;
|
|
|
6331
6331
|
urlObject.searchParams.append("hideSimButtons", "1");
|
|
6332
6332
|
furl = urlObject.toString();
|
|
6333
6333
|
}
|
|
6334
|
+
if ((_b = this._runOptions) === null || _b === void 0 ? void 0 : _b.queryParameters) {
|
|
6335
|
+
const urlObject = new URL(furl);
|
|
6336
|
+
const parameters = this._runOptions.queryParameters.split("&");
|
|
6337
|
+
for (const param of parameters) {
|
|
6338
|
+
const [a, b] = param.split(/[:=]/);
|
|
6339
|
+
if (a && b) {
|
|
6340
|
+
urlObject.searchParams.set(a, b);
|
|
6341
|
+
}
|
|
6342
|
+
}
|
|
6343
|
+
furl = urlObject.toString();
|
|
6344
|
+
}
|
|
6334
6345
|
furl += '#' + frame.id;
|
|
6335
6346
|
frame.src = furl;
|
|
6336
6347
|
frame.frameBorder = "0";
|
|
6337
6348
|
frame.dataset['runid'] = this.runId;
|
|
6338
6349
|
frame.dataset['origin'] = new URL(furl).origin || "*";
|
|
6339
|
-
if ((
|
|
6350
|
+
if ((_c = this._runOptions) === null || _c === void 0 ? void 0 : _c.autofocus)
|
|
6340
6351
|
frame.setAttribute("autofocus", "true");
|
|
6341
6352
|
wrapper.appendChild(frame);
|
|
6342
6353
|
const i = document.createElement("i");
|
|
@@ -7347,7 +7358,7 @@ var pxsim;
|
|
|
7347
7358
|
channel.gain.gain.value = 0;
|
|
7348
7359
|
channel.gain.gain.setValueAtTime(volume, context().currentTime);
|
|
7349
7360
|
channel.gain.connect(destination);
|
|
7350
|
-
if (channels.length >
|
|
7361
|
+
if (channels.length > 20)
|
|
7351
7362
|
channels[0].remove();
|
|
7352
7363
|
channels.push(channel);
|
|
7353
7364
|
const checkCancel = () => {
|
|
@@ -7417,7 +7428,7 @@ var pxsim;
|
|
|
7417
7428
|
let resolved = false;
|
|
7418
7429
|
let ctx = context();
|
|
7419
7430
|
let channel = new Channel();
|
|
7420
|
-
if (channels.length >
|
|
7431
|
+
if (channels.length > 20)
|
|
7421
7432
|
channels[0].remove();
|
|
7422
7433
|
channels.push(channel);
|
|
7423
7434
|
channel.gain = ctx.createGain();
|
|
@@ -7451,6 +7462,10 @@ var pxsim;
|
|
|
7451
7462
|
const endVolume = readUint16(instructions, i + 8);
|
|
7452
7463
|
const endFrequency = readUint16(instructions, i + 10);
|
|
7453
7464
|
totalDuration += duration;
|
|
7465
|
+
if (wave === 0) {
|
|
7466
|
+
currentTime += duration;
|
|
7467
|
+
continue;
|
|
7468
|
+
}
|
|
7454
7469
|
const isSquareWave = 11 <= wave && wave <= 15;
|
|
7455
7470
|
if (!oscillators[wave]) {
|
|
7456
7471
|
oscillators[wave] = getGenerator(wave, startFrequency);
|
|
@@ -7493,7 +7508,8 @@ var pxsim;
|
|
|
7493
7508
|
return;
|
|
7494
7509
|
}
|
|
7495
7510
|
const { frequency, volume } = findFrequencyAndVolumeAtTime((time - startTime) * 1000, instructions);
|
|
7496
|
-
onPull
|
|
7511
|
+
if (onPull)
|
|
7512
|
+
onPull(frequency, volume / 1024);
|
|
7497
7513
|
requestAnimationFrame(handleAnimationFrame);
|
|
7498
7514
|
};
|
|
7499
7515
|
requestAnimationFrame(handleAnimationFrame);
|
package/built/server.js
CHANGED
|
@@ -1050,6 +1050,10 @@ function serveAsync(options) {
|
|
|
1050
1050
|
sendFile(path.join(publicDir, 'authcode.html'));
|
|
1051
1051
|
return;
|
|
1052
1052
|
}
|
|
1053
|
+
if (pathname == "/--multiplayer") {
|
|
1054
|
+
sendFile(path.join(publicDir, 'multiplayer.html'));
|
|
1055
|
+
return;
|
|
1056
|
+
}
|
|
1053
1057
|
if (/\/-[-]*docs.*$/.test(pathname)) {
|
|
1054
1058
|
sendFile(path.join(publicDir, 'docs.html'));
|
|
1055
1059
|
return;
|