pxt-core 13.1.8 → 13.1.10

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 CHANGED
@@ -112992,6 +112992,17 @@ var pxt;
112992
112992
  return out;
112993
112993
  }
112994
112994
  function decodeSongFromHex(hex) {
112995
+ let isBase64 = false;
112996
+ for (let i = 0; i < hex.length; i++) {
112997
+ const c = hex[i];
112998
+ if (!((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))) {
112999
+ isBase64 = true;
113000
+ break;
113001
+ }
113002
+ }
113003
+ if (isBase64) {
113004
+ return decodeSong(pxt.Util.stringToUint8Array(atob(hex)));
113005
+ }
112995
113006
  const bytes = pxt.U.fromHex(hex);
112996
113007
  return decodeSong(bytes);
112997
113008
  }
@@ -159468,10 +159479,11 @@ var pxsim;
159468
159479
  AudioSource.activeSources.push(this);
159469
159480
  }
159470
159481
  static stopAll() {
159471
- for (const source of AudioSource.activeSources) {
159482
+ const activeSources = AudioSource.activeSources;
159483
+ AudioSource.activeSources = [];
159484
+ for (const source of activeSources) {
159472
159485
  source.dispose();
159473
159486
  }
159474
- AudioSource.activeSources = [];
159475
159487
  }
159476
159488
  dispose() {
159477
159489
  if (this.isDisposed())
package/built/pxtlib.js CHANGED
@@ -15271,6 +15271,17 @@ var pxt;
15271
15271
  return out;
15272
15272
  }
15273
15273
  function decodeSongFromHex(hex) {
15274
+ let isBase64 = false;
15275
+ for (let i = 0; i < hex.length; i++) {
15276
+ const c = hex[i];
15277
+ if (!((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'))) {
15278
+ isBase64 = true;
15279
+ break;
15280
+ }
15281
+ }
15282
+ if (isBase64) {
15283
+ return decodeSong(pxt.Util.stringToUint8Array(atob(hex)));
15284
+ }
15274
15285
  const bytes = pxt.U.fromHex(hex);
15275
15286
  return decodeSong(bytes);
15276
15287
  }
package/built/pxtsim.js CHANGED
@@ -7960,10 +7960,11 @@ var pxsim;
7960
7960
  AudioSource.activeSources.push(this);
7961
7961
  }
7962
7962
  static stopAll() {
7963
- for (const source of AudioSource.activeSources) {
7963
+ const activeSources = AudioSource.activeSources;
7964
+ AudioSource.activeSources = [];
7965
+ for (const source of activeSources) {
7964
7966
  source.dispose();
7965
7967
  }
7966
- AudioSource.activeSources = [];
7967
7968
  }
7968
7969
  dispose() {
7969
7970
  if (this.isDisposed())
@@ -1,9 +1,10 @@
1
+ import * as React from "react";
1
2
  import { ContainerProps } from "../util";
2
3
  export interface CardProps extends ContainerProps {
3
4
  onClick?: () => void;
4
5
  tabIndex?: number;
5
6
  ariaLabelledBy?: string;
6
- label?: string;
7
+ label?: React.ReactNode;
7
8
  labelClass?: string;
8
9
  }
9
10
  export declare const Card: (props: CardProps) => JSX.Element;