@cubingcenter/scrambler 0.6.1 → 0.6.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"pair-tables.d.ts","sourceRoot":"","sources":["../../../../src/puzzles/cube3/solver/pair-tables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D,wBAAgB,mBAAmB,IAAI,eAAe,GAAG,SAAS,CAEjE;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAKhF;AAoBD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,eAAe,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAelF"}
1
+ {"version":3,"file":"pair-tables.d.ts","sourceRoot":"","sources":["../../../../src/puzzles/cube3/solver/pair-tables.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAI9D,wBAAgB,mBAAmB,IAAI,eAAe,GAAG,SAAS,CAEjE;AAED,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAKhF;AAwBD;;;GAGG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,eAAe,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAelF"}
@@ -29,18 +29,23 @@ export async function loadCube3PairTables() {
29
29
  return cached;
30
30
  }
31
31
  async function loadPairTables() {
32
- if (typeof self !== "undefined") {
32
+ try {
33
+ if (typeof self !== "undefined") {
34
+ const loader = await import(
35
+ /* webpackIgnore: true */
36
+ /* @vite-ignore */
37
+ "./pair-browser-loader.js");
38
+ return await loader.loadBrowserPairTables();
39
+ }
33
40
  const loader = await import(
34
41
  /* webpackIgnore: true */
35
42
  /* @vite-ignore */
36
- "./pair-browser-loader.js");
37
- return loader.loadBrowserPairTables();
43
+ "./pair-node-loader.js");
44
+ return loader.loadNodePairTables();
45
+ }
46
+ catch {
47
+ return undefined;
38
48
  }
39
- const loader = await import(
40
- /* webpackIgnore: true */
41
- /* @vite-ignore */
42
- "./pair-node-loader.js");
43
- return loader.loadNodePairTables();
44
49
  }
45
50
  /**
46
51
  * The pair distance of (cp, uep) — the exact distance to (cp==0 && uep==0)
@@ -67,18 +67,23 @@ async function loadCube3PairTables() {
67
67
  return cached;
68
68
  }
69
69
  async function loadPairTables() {
70
- if (typeof self !== "undefined") {
70
+ try {
71
+ if (typeof self !== "undefined") {
72
+ const loader = await Promise.resolve().then(() => __importStar(require(
73
+ /* webpackIgnore: true */
74
+ /* @vite-ignore */
75
+ "./pair-browser-loader.js")));
76
+ return await loader.loadBrowserPairTables();
77
+ }
71
78
  const loader = await Promise.resolve().then(() => __importStar(require(
72
79
  /* webpackIgnore: true */
73
80
  /* @vite-ignore */
74
- "./pair-browser-loader.js")));
75
- return loader.loadBrowserPairTables();
81
+ "./pair-node-loader.js")));
82
+ return loader.loadNodePairTables();
83
+ }
84
+ catch {
85
+ return undefined;
76
86
  }
77
- const loader = await Promise.resolve().then(() => __importStar(require(
78
- /* webpackIgnore: true */
79
- /* @vite-ignore */
80
- "./pair-node-loader.js")));
81
- return loader.loadNodePairTables();
82
87
  }
83
88
  /**
84
89
  * The pair distance of (cp, uep) — the exact distance to (cp==0 && uep==0)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cubingcenter/scrambler",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Extensible scramble generation toolkit for CubingCenter projects.",
5
5
  "type": "module",
6
6
  "license": "MIT",