pxt-common-packages 13.1.5 → 13.1.7

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.
Files changed (60) hide show
  1. package/built/common-sim.d.ts +0 -6
  2. package/built/common-sim.js +0 -23
  3. package/libs/accelerometer/built/debug/binary.js +8 -8
  4. package/libs/animation/legacy.ts +2 -0
  5. package/libs/azureiot/built/debug/binary.js +461 -461
  6. package/libs/color/built/debug/binary.js +8 -8
  7. package/libs/color-sensor/built/debug/binary.js +8 -8
  8. package/libs/controller/built/debug/binary.js +7348 -7348
  9. package/libs/controller---none/built/debug/binary.js +7328 -7328
  10. package/libs/core/_locales/core-jsdoc-strings.json +0 -13
  11. package/libs/core/_locales/core-strings.json +0 -2
  12. package/libs/core/pxt.json +0 -2
  13. package/libs/core/shims.d.ts +0 -30
  14. package/libs/core---samd/_locales/core---samd-jsdoc-strings.json +0 -13
  15. package/libs/core---samd/_locales/core---samd-strings.json +0 -2
  16. package/libs/core---samd/built/debug/binary.js +8 -8
  17. package/libs/core---samd/shims.d.ts +0 -30
  18. package/libs/datalogger/built/debug/binary.js +63 -63
  19. package/libs/edge-connector/built/debug/binary.js +8 -8
  20. package/libs/esp32/built/debug/binary.js +462 -462
  21. package/libs/game/animation.ts +3 -0
  22. package/libs/game/built/debug/binary.js +7267 -7267
  23. package/libs/game/controller.ts +2 -0
  24. package/libs/game/particleeffects.ts +1 -0
  25. package/libs/game/scenes.ts +1 -0
  26. package/libs/game/sprite.ts +2 -0
  27. package/libs/game/sprites.ts +1 -0
  28. package/libs/game/tilemap.ts +2 -0
  29. package/libs/gamepad/built/debug/binary.js +8 -8
  30. package/libs/keyboard/built/debug/binary.js +8 -8
  31. package/libs/lcd/built/debug/binary.js +8 -8
  32. package/libs/light/built/debug/binary.js +8 -8
  33. package/libs/light-spectrum-sensor/built/debug/binary.js +8 -8
  34. package/libs/lora/built/debug/binary.js +8 -8
  35. package/libs/matrix-keypad/built/debug/binary.js +8 -8
  36. package/libs/microphone/built/debug/binary.js +8 -8
  37. package/libs/mouse/built/debug/binary.js +8 -8
  38. package/libs/mqtt/built/debug/binary.js +176 -176
  39. package/libs/music/built/debug/binary.js +8 -8
  40. package/libs/net/built/debug/binary.js +176 -176
  41. package/libs/net-game/built/debug/binary.js +8984 -8984
  42. package/libs/palette/built/debug/binary.js +7266 -7266
  43. package/libs/pixel/built/debug/binary.js +8 -8
  44. package/libs/power/built/debug/binary.js +8 -8
  45. package/libs/proximity/built/debug/binary.js +8 -8
  46. package/libs/pulse/built/debug/binary.js +8 -8
  47. package/libs/radio/built/debug/binary.js +8 -8
  48. package/libs/radio-broadcast/built/debug/binary.js +8 -8
  49. package/libs/rotary-encoder/built/debug/binary.js +8 -8
  50. package/libs/screen/built/debug/binary.js +50 -50
  51. package/libs/servo/built/debug/binary.js +8 -8
  52. package/libs/sprite-scaling/built/debug/binary.js +7266 -7266
  53. package/libs/sprite-scaling/scaling.ts +4 -0
  54. package/libs/storyboard/built/debug/binary.js +7266 -7266
  55. package/libs/tests/built/debug/binary.js +15 -15
  56. package/libs/thermometer/built/debug/binary.js +8 -8
  57. package/package.json +1 -1
  58. package/libs/core/keyvaluestorage.cpp +0 -109
  59. package/libs/core/keyvaluestorage.ts +0 -43
  60. package/libs/core/sim/keyvaluestorage.ts +0 -15
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P26233(s) {
59
+ function _main___P26113(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,32 +66,32 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___26477 = (undefined);
70
- globals._pollEventQueue___26490 = (undefined);
71
- globals._tests___26677 = (undefined);
72
- globals._currentTest___26679 = (undefined);
73
- globals._runSetup___26681 = (undefined);
74
- globals._runTearDown___26683 = (undefined);
75
- globals._testSetUp___26685 = (undefined);
76
- globals._testTearDown___26687 = (undefined);
69
+ globals._intervals___26357 = (undefined);
70
+ globals._pollEventQueue___26370 = (undefined);
71
+ globals._tests___26551 = (undefined);
72
+ globals._currentTest___26553 = (undefined);
73
+ globals._runSetup___26555 = (undefined);
74
+ globals._runTearDown___26557 = (undefined);
75
+ globals._testSetUp___26559 = (undefined);
76
+ globals._testTearDown___26561 = (undefined);
77
77
  r0 = undefined;
78
78
  return leave(s, r0)
79
79
  default: oops()
80
80
  } } }
81
- _main___P26233.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
82
- _main___P26233.continuations = [ ]
81
+ _main___P26113.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"targetoverrides.ts","functionName":"<main>","argumentNames":[]}
82
+ _main___P26113.continuations = [ ]
83
83
 
84
- function _main___P26233_mk(s) {
84
+ function _main___P26113_mk(s) {
85
85
  checkStack(s.depth);
86
86
  return {
87
- parent: s, fn: _main___P26233, depth: s.depth + 1,
87
+ parent: s, fn: _main___P26113, depth: s.depth + 1,
88
88
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
89
89
  } }
90
90
 
91
91
 
92
92
 
93
93
 
94
- const breakpoints = setupDebugger(1, ["_tests___26677","_currentTest___26679","_runSetup___26681","_runTearDown___26683","_testSetUp___26685","_testTearDown___26687"])
94
+ const breakpoints = setupDebugger(1, ["_tests___26551","_currentTest___26553","_runSetup___26555","_runTearDown___26557","_testSetUp___26559","_testTearDown___26561"])
95
95
 
96
- return _main___P26233
96
+ return _main___P26113
97
97
  })
@@ -56,7 +56,7 @@ const pxsim_pxtrt = pxsim.pxtrt;
56
56
  const pxsim_numops = pxsim.numops;
57
57
 
58
58
 
59
- function _main___P14370(s) {
59
+ function _main___P14306(s) {
60
60
  let r0 = s.r0, step = s.pc;
61
61
  s.pc = -1;
62
62
 
@@ -66,19 +66,19 @@ if (yieldSteps-- < 0 && maybeYield(s, step, r0) || runtime !== pxsim.runtime) re
66
66
  switch (step) {
67
67
  case 0:
68
68
 
69
- globals._intervals___14614 = (undefined);
70
- globals._pollEventQueue___14627 = (undefined);
69
+ globals._intervals___14550 = (undefined);
70
+ globals._pollEventQueue___14563 = (undefined);
71
71
  r0 = undefined;
72
72
  return leave(s, r0)
73
73
  default: oops()
74
74
  } } }
75
- _main___P14370.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"pxt_modules/base/ns.ts","functionName":"<main>","argumentNames":[]}
76
- _main___P14370.continuations = [ ]
75
+ _main___P14306.info = {"start":0,"length":0,"line":0,"column":0,"endLine":0,"endColumn":0,"fileName":"pxt_modules/base/ns.ts","functionName":"<main>","argumentNames":[]}
76
+ _main___P14306.continuations = [ ]
77
77
 
78
- function _main___P14370_mk(s) {
78
+ function _main___P14306_mk(s) {
79
79
  checkStack(s.depth);
80
80
  return {
81
- parent: s, fn: _main___P14370, depth: s.depth + 1,
81
+ parent: s, fn: _main___P14306, depth: s.depth + 1,
82
82
  pc: 0, retval: undefined, r0: undefined, overwrittenPC: false, lambdaArgs: null,
83
83
  } }
84
84
 
@@ -87,5 +87,5 @@ function _main___P14370_mk(s) {
87
87
 
88
88
  const breakpoints = setupDebugger(1, [])
89
89
 
90
- return _main___P14370
90
+ return _main___P14306
91
91
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pxt-common-packages",
3
- "version": "13.1.5",
3
+ "version": "13.1.7",
4
4
  "description": "Microsoft MakeCode (PXT) common packages",
5
5
  "keywords": [
6
6
  "MakeCode",
@@ -1,109 +0,0 @@
1
- #include "pxt.h"
2
- #include "KeyValueStorage.h"
3
-
4
- namespace pxt {
5
-
6
- class WKeyValueStorage {
7
- #ifdef CODAL_NVMCONTROLLER
8
- CODAL_NVMCONTROLLER controller;
9
- #else
10
- NVMController controller;
11
- #endif
12
- KeyValueStorage storage;
13
- public:
14
-
15
- WKeyValueStorage()
16
- : controller()
17
- , storage(controller) {
18
- }
19
-
20
- bool isSupported() {
21
- #ifdef CODAL_NVMCONTROLLER
22
- return true;
23
- #else
24
- return false;
25
- #endif
26
- }
27
-
28
- int put(String key, Buffer data) {
29
- #ifdef CODAL_NVMCONTROLLER
30
- ManagedString mkey(key->getUTF8Data(), key->getUTF8Size());
31
- return storage.put(mkey, data->data, data->length);
32
- #else
33
- return -1;
34
- #endif
35
- }
36
-
37
- Buffer get(String key) {
38
- #ifdef CODAL_NVMCONTROLLER
39
- Buffer buf = NULL;
40
- ManagedString mkey(key->getUTF8Data(), key->getUTF8Size());
41
- auto entry = storage.get(mkey);
42
- if (entry) {
43
- buf = mkBuffer(entry->value, sizeof(entry->value));
44
- free(entry);
45
- }
46
- return buf;
47
- #else
48
- return NULL;
49
- #endif
50
- }
51
-
52
- void remove(String key) {
53
- #ifdef CODAL_NVMCONTROLLER
54
- ManagedString mkey(key->getUTF8Data(), key->getUTF8Size());
55
- storage.remove(mkey);
56
- #endif
57
- }
58
-
59
- void clear() {
60
- #ifdef CODAL_NVMCONTROLLER
61
- storage.wipe();
62
- #endif
63
- }
64
- };
65
- SINGLETON(WKeyValueStorage);
66
-
67
- }
68
-
69
- namespace configStorage {
70
- /**
71
- * Puts an entry in the device storage. Key may have up to 16 characters (bytes).
72
- * @param key the identifier (max 16 characters)
73
- * @param value the data (max 32 characters)
74
- */
75
- //%
76
- void setBuffer(String key, Buffer value) {
77
- auto kvm = pxt::getWKeyValueStorage();
78
- kvm->put(key, value);
79
- }
80
-
81
- /**
82
- * Gets an entry from the device storage. Key may have up to 16 characters (bytes).
83
- * @param key the identifier (max 16 characters)
84
- */
85
- //%
86
- Buffer getBuffer(String key) {
87
- auto kvm = pxt::getWKeyValueStorage();
88
- return kvm->get(key);
89
- }
90
-
91
- /**
92
- * Removes the key from local storage
93
- * @param key the identifier (max 16 characters)
94
- */
95
- //%
96
- void removeItem(String key) {
97
- auto kvm = pxt::getWKeyValueStorage();
98
- kvm->remove(key);
99
- }
100
-
101
- /**
102
- * Clears the local storage
103
- */
104
- //%
105
- void clear() {
106
- auto kvm = pxt::getWKeyValueStorage();
107
- kvm->clear();
108
- }
109
- }
@@ -1,43 +0,0 @@
1
- namespace configStorage {
2
- /**
3
- * Stores the value at the key entry
4
- * @param key identifier of the key (max 16 characters)
5
- * @param value identifier of the value (max 32 characters)
6
- */
7
- export function setItem(key: string, value: string) {
8
- if (value == null)
9
- configStorage.removeItem(key);
10
- else
11
- {
12
- let idx = 0;
13
- let buf = control.createBuffer(value.length + 1);
14
- buf[idx++] = value.length;
15
- let valBuf = control.createBufferFromUTF8(value);
16
-
17
- for (let i = 0; i < valBuf.length; i++)
18
- buf[idx++] = valBuf[i];
19
-
20
- configStorage.setBuffer(key, buf);
21
- }
22
- }
23
-
24
- /**
25
- * Retrieves the value at the key entry
26
- * @param key identifier of the key (max 16 characters)
27
- */
28
- export function getItem(key: string): string {
29
- const buf = configStorage.getBuffer(key);
30
-
31
- if (!buf)
32
- return undefined;
33
-
34
- let idx = 0;
35
- let count = buf[idx++];
36
- const retBuf = control.createBuffer(count);
37
-
38
- for (let i = 0; i < count; i++)
39
- retBuf[i] = buf[idx++];
40
-
41
- return retBuf.toString();
42
- }
43
- }
@@ -1,15 +0,0 @@
1
- namespace pxsim.configStorage {
2
- export function setBuffer(key: string, value: RefBuffer): void {
3
- // TODO
4
- }
5
- export function getBuffer(key: string): RefBuffer {
6
- // TODO
7
- return undefined;
8
- }
9
- export function removeItem(key: string): void {
10
- // TODO
11
- }
12
- export function clear(): void {
13
- // TODO
14
- }
15
- }