pxt-microbit 7.1.36 → 7.1.37
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/block-tests.js +1 -1
- package/built/hexcache/{09c1ed868d7d8b474313e6abc88c7a9bede0ca376a507a97886137e8d91372e9.hex → 986702a417fa55a0e1b078a6d7403b3498bc795834f771651ebc340080a116d1.hex} +4766 -4766
- package/built/hexcache/{ba843ecd090c93546c91118ee212273e7b1e104915bfd9146cb18fa1a1c826a6.hex → d8cab56e73d9451077691022c34b835c5bbdbe6b561106a2812f7964c11125c7.hex} +4249 -4249
- package/built/sim.d.ts +1 -0
- package/built/sim.js +55 -11
- package/built/target.js +1 -1
- package/built/target.json +1 -1
- package/built/targetlight.js +1 -1
- package/built/targetlight.json +1 -1
- package/built/web/blockly.css +1 -1
- package/built/web/react-common-authcode.css +1 -1
- package/built/web/react-common-multiplayer.css +1 -1
- package/built/web/react-common-skillmap.css +1 -1
- package/built/web/rtlblockly.css +1 -1
- package/built/web/rtlreact-common-authcode.css +1 -1
- package/built/web/rtlreact-common-multiplayer.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/package.json +2 -2
- package/sim/public/simulator.html +6 -1
- /package/built/hexcache/{0ddbecb007986045d0daa6818b319bdc1d05397d2b57d117798c64695cdc9d23.hex → 3858c1af7a919520536cd0945353c09f5d6651f5364aac72bddd143022164eca.hex} +0 -0
- /package/built/hexcache/{01fcf2f97a9eaeefd82a2ddaa0ca451b2500ff47b8dc92db69fda37deeb1b910.hex → 8282abaaf754219aa67b07053567547dda2179a2888d75791d2cd9b66bf8e531.hex} +0 -0
package/built/sim.d.ts
CHANGED
|
@@ -891,6 +891,7 @@ declare namespace pxsim.visuals {
|
|
|
891
891
|
private attachABEvents;
|
|
892
892
|
attachButtonEvents(stateButton: Button, buttonOuter: SVGElement, elButton: SVGElement): void;
|
|
893
893
|
private attachAPlusBEvents;
|
|
894
|
+
private attachKeyboardEvents;
|
|
894
895
|
}
|
|
895
896
|
}
|
|
896
897
|
declare namespace pxsim {
|
package/built/sim.js
CHANGED
|
@@ -132,12 +132,12 @@ var pxsim;
|
|
|
132
132
|
highContrast: msg.highContrast
|
|
133
133
|
}), opts);
|
|
134
134
|
document.body.innerHTML = ""; // clear children
|
|
135
|
-
document.body.appendChild(this.view = this.viewHost.getView());
|
|
136
135
|
if (pxsim.shouldShowMute()) {
|
|
137
136
|
document.body.appendChild(pxsim.createMuteButton());
|
|
138
137
|
pxsim.AudioContextManager.mute(true);
|
|
139
138
|
pxsim.setParentMuteState("disabled");
|
|
140
139
|
}
|
|
140
|
+
document.body.appendChild(this.view = this.viewHost.getView());
|
|
141
141
|
if (msg.theme === "mbcodal") {
|
|
142
142
|
this.ensureHardwareVersion(2);
|
|
143
143
|
}
|
|
@@ -4088,17 +4088,26 @@ var pxsim;
|
|
|
4088
4088
|
outline: none;
|
|
4089
4089
|
}
|
|
4090
4090
|
*:focus .sim-button-outer,
|
|
4091
|
-
.sim-antenna-outer:focus,
|
|
4092
|
-
.sim-pin:focus,
|
|
4093
|
-
.sim-thermometer:focus,
|
|
4094
4091
|
.sim-shake:focus,
|
|
4095
|
-
.sim-
|
|
4096
|
-
|
|
4097
|
-
stroke
|
|
4092
|
+
.sim-thermometer:focus {
|
|
4093
|
+
outline: 5px solid white;
|
|
4094
|
+
stroke: black;
|
|
4095
|
+
stroke-width: 10px;
|
|
4096
|
+
paint-order: stroke;
|
|
4098
4097
|
}
|
|
4099
4098
|
.sim-button-outer.sim-button-group:focus > .sim-button {
|
|
4100
|
-
|
|
4101
|
-
stroke
|
|
4099
|
+
outline: 5px solid white;
|
|
4100
|
+
stroke: black;
|
|
4101
|
+
stroke-width: 5px;
|
|
4102
|
+
paint-order: stroke;
|
|
4103
|
+
}
|
|
4104
|
+
.sim-light-level-button:focus,
|
|
4105
|
+
.sim-antenna-outer:focus > .sim-antenna {
|
|
4106
|
+
outline: 5px solid white;
|
|
4107
|
+
}
|
|
4108
|
+
.sim-pin:focus {
|
|
4109
|
+
stroke: white;
|
|
4110
|
+
stroke-width: 5px !important;
|
|
4102
4111
|
}
|
|
4103
4112
|
.no-drag, .sim-text, .sim-text-small,
|
|
4104
4113
|
.sim-text-pin {
|
|
@@ -4595,12 +4604,40 @@ path.sim-board {
|
|
|
4595
4604
|
p.setAttribute("d", "m269.9,50.134647l0,0l-39.5,0l0,0c-14.1,0.1 -24.6,10.7 -24.6,24.8c0,13.9 10.4,24.4 24.3,24.7l0,0l39.6,0c14.2,0 40.36034,-22.97069 40.36034,-24.85394c0,-1.88326 -26.06034,-24.54606 -40.16034,-24.64606m-0.2,39l0,0l-39.3,0c-7.7,-0.1 -14,-6.4 -14,-14.2c0,-7.8 6.4,-14.2 14.2,-14.2l39.1,0c7.8,0 14.2,6.4 14.2,14.2c0,7.9 -6.4,14.2 -14.2,14.2l0,0l0,0z");
|
|
4596
4605
|
this.updateTheme();
|
|
4597
4606
|
let pt = this.element.createSVGPoint();
|
|
4598
|
-
pxsim.svg.buttonEvents(this.head,
|
|
4607
|
+
pxsim.svg.buttonEvents(this.head,
|
|
4608
|
+
// move
|
|
4609
|
+
(ev) => {
|
|
4599
4610
|
let cur = pxsim.svg.cursorPoint(pt, this.element, ev);
|
|
4600
4611
|
state.compassState.heading = Math.floor(Math.atan2(cur.y - yc, cur.x - xc) * 180 / Math.PI) + 90;
|
|
4601
4612
|
if (state.compassState.heading < 0)
|
|
4602
4613
|
state.compassState.heading += 360;
|
|
4603
4614
|
this.updateHeading();
|
|
4615
|
+
},
|
|
4616
|
+
// start
|
|
4617
|
+
ev => { },
|
|
4618
|
+
// stop
|
|
4619
|
+
ev => { },
|
|
4620
|
+
// keydown
|
|
4621
|
+
(ev) => {
|
|
4622
|
+
let charCode = (typeof ev.which == "number") ? ev.which : ev.keyCode;
|
|
4623
|
+
if (charCode === 40 || charCode === 37) { // Down/Left arrow
|
|
4624
|
+
ev.preventDefault();
|
|
4625
|
+
state.compassState.heading--;
|
|
4626
|
+
if (state.compassState.heading < 0)
|
|
4627
|
+
state.compassState.heading += 360;
|
|
4628
|
+
if (state.compassState.heading >= 360)
|
|
4629
|
+
state.compassState.heading %= 360;
|
|
4630
|
+
this.updateHeading();
|
|
4631
|
+
}
|
|
4632
|
+
else if (charCode === 38 || charCode === 39) { // Up/Right arrow
|
|
4633
|
+
ev.preventDefault();
|
|
4634
|
+
state.compassState.heading++;
|
|
4635
|
+
if (state.compassState.heading < 0)
|
|
4636
|
+
state.compassState.heading += 360;
|
|
4637
|
+
if (state.compassState.heading >= 360)
|
|
4638
|
+
state.compassState.heading %= 360;
|
|
4639
|
+
this.updateHeading();
|
|
4640
|
+
}
|
|
4604
4641
|
});
|
|
4605
4642
|
this.headInitialized = true;
|
|
4606
4643
|
}
|
|
@@ -4611,6 +4648,9 @@ path.sim-board {
|
|
|
4611
4648
|
if (this.props.runtime)
|
|
4612
4649
|
this.props.runtime.environmentGlobals[pxsim.localization.lf("heading")] = state.compassState.heading;
|
|
4613
4650
|
}
|
|
4651
|
+
// make sim head focusable when there is a compass
|
|
4652
|
+
this.headParts.setAttribute("class", "sim-button-outer sim-button-group");
|
|
4653
|
+
pxsim.accessibility.makeFocusable(this.headParts);
|
|
4614
4654
|
}
|
|
4615
4655
|
flashSystemLed() {
|
|
4616
4656
|
if (!this.systemLed)
|
|
@@ -5119,6 +5159,7 @@ path.sim-board {
|
|
|
5119
5159
|
this.attachPinsTouchEvents();
|
|
5120
5160
|
this.attachABEvents();
|
|
5121
5161
|
this.attachAPlusBEvents();
|
|
5162
|
+
this.attachKeyboardEvents();
|
|
5122
5163
|
}
|
|
5123
5164
|
attachIFrameEvents() {
|
|
5124
5165
|
pxsim.Runtime.messagePosted = (msg) => {
|
|
@@ -5364,6 +5405,9 @@ path.sim-board {
|
|
|
5364
5405
|
this.board.bus.queue(bpState.abBtn.id, 3 /* DAL.MICROBIT_BUTTON_EVT_CLICK */);
|
|
5365
5406
|
});
|
|
5366
5407
|
}
|
|
5408
|
+
attachKeyboardEvents() {
|
|
5409
|
+
pxsim.accessibility.postKeyboardEvent();
|
|
5410
|
+
}
|
|
5367
5411
|
}
|
|
5368
5412
|
visuals.MicrobitBoardSvg = MicrobitBoardSvg;
|
|
5369
5413
|
})(visuals = pxsim.visuals || (pxsim.visuals = {}));
|
|
@@ -5377,7 +5421,7 @@ var pxsim;
|
|
|
5377
5421
|
const el = document.createElement("div");
|
|
5378
5422
|
el.setAttribute("id", "safari-mute-button-outer");
|
|
5379
5423
|
el.innerHTML = `
|
|
5380
|
-
<button class="safari-mute-button">
|
|
5424
|
+
<button class="safari-mute-button" tabindex="1">
|
|
5381
5425
|
${icon}
|
|
5382
5426
|
</button>
|
|
5383
5427
|
`;
|