@oasys/oecs 0.5.1 → 0.5.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.
@@ -0,0 +1 @@
1
+ "use strict";const p=require("./kernel-sw7ScKWu.cjs");function k(g=Object.is){const i=new Map,[t,h]=p.signal(0);let l=0;const a=(s,n)=>s!==void 0&&n!==void 0?g(s,n):s===n;return{get(s){const n=i.get(s);if(n!==void 0)return n[0]();t()},set(s,n){n===void 0&&console.warn("reactiveMap.set(key, undefined): undefined is the absent sentinel — get(key) cannot distinguish it from an unset key; use delete(key) to remove.");const o=i.get(s);o!==void 0?o[1](n):(i.set(s,p.signal(n,a)),h(++l))},delete(s){const n=i.get(s);return n===void 0?!1:(i.delete(s),p.batch(()=>{n[1](void 0),h(++l)}),!0)},has(s){return t(),i.has(s)},size(){return t(),i.size},keys(){return t(),[...i.keys()]}}}function O(g,i={}){const t={},h={},l=Object.keys(g),a=new Set(l);for(const n of l){const[o,b]=p.signal(g[n],i[n]);t[n]=o,h[n]=b}return[new Proxy({},{get:(n,o)=>a.has(o)?t[o]():Reflect.get(n,o),has:(n,o)=>a.has(o),ownKeys:()=>l,getOwnPropertyDescriptor:(n,o)=>a.has(o)?{get:()=>t[o](),enumerable:!0,configurable:!0}:void 0,set:(n,o)=>{throw new TypeError(`reactiveStruct proxy is read-only: use set.${String(o)}(value) — the setters tuple returned alongside the proxy`)}}),h]}const y=Symbol("reactiveArray.absent");function S(g=[],i=Object.is){const t=[],[h,l]=p.signal(0);let a=0;const s=(e,r)=>e!==y&&r!==y?i(e,r):e===r,n=e=>p.signal(e,s),o=e=>p.untrack(t[e][0]);for(const e of g)t.push(n(e));function b(e){p.batch(()=>{const r=t.length,f=e.length,d=f<r?f:r;for(let c=0;c<d;c++)t[c][1](e[c]);if(f>r){for(let c=r;c<f;c++)t.push(n(e[c]));l(++a)}else if(f<r){const c=t.splice(f);for(let v=0;v<c.length;v++)c[v][1](y);l(++a)}})}return{get(e){if(e>=0&&e<t.length){const r=t[e][0]();if(r!==y)return r}h()},length(){return h(),t.length},snapshot(){h();const e=new Array(t.length);for(let r=0;r<t.length;r++)e[r]=t[r][0]();return e},set(e,r){e>=0&&e<t.length?t[e][1](r):console.warn(`reactiveArray.set(${e}): index out of range [0, ${t.length}); ignored. Use push / splice / reconcile to change length.`)},push(e){t.push(n(e)),l(++a)},pop(){const e=t.length;if(e===0)return;const r=o(e-1),[f]=t.splice(e-1);return p.batch(()=>{f[1](y),l(++a)}),r},splice(e,r,...f){const d=t.length,c=e<0?Math.max(d+e,0):Math.min(e,d),v=r===void 0?d-c:Math.max(0,Math.min(r,d-c)),w=[];for(let u=0;u<v;u++)w.push(o(c+u));const m=[];for(let u=0;u<c;u++)m.push(o(u));for(let u=0;u<f.length;u++)m.push(f[u]);for(let u=c+v;u<d;u++)m.push(o(u));return b(m),w},reconcile(e){b(e)}}}function j(g,i){if(Object.is(g,i))return!0;const t=g,h=i,l=Object.keys(t);if(l.length!==Object.keys(h).length)return!1;for(let a=0;a<l.length;a++){const s=l[a];if(!Object.prototype.hasOwnProperty.call(h,s)||!Object.is(t[s],h[s]))return!1}return!0}exports.reactiveArray=S;exports.reactiveMap=k;exports.reactiveStruct=O;exports.shallow=j;
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./shared-BymrGTyR.cjs");exports.DEFAULT_SAB_ALLOCATOR=a.DEFAULT_SAB_ALLOCATOR;exports.SabUnavailableError=a.SabUnavailableError;exports.growableSabAllocator=a.growableSabAllocator;exports.wasmMemoryAllocator=a.wasmMemoryAllocator;
@@ -0,0 +1,7 @@
1
+ import { D as r, a as l, g as A, w as s } from "./shared-BU1Cd40h.js";
2
+ export {
3
+ r as DEFAULT_SAB_ALLOCATOR,
4
+ l as SabUnavailableError,
5
+ A as growableSabAllocator,
6
+ s as wasmMemoryAllocator
7
+ };
@@ -6,5 +6,5 @@
6
6
  * `jsr.json` by `src/__tests__/version_sync.test.ts` — bump all three
7
7
  * together.
8
8
  */
9
- export declare const VERSION = "0.5.1";
9
+ export declare const VERSION = "0.5.2";
10
10
  //# sourceMappingURL=version.d.ts.map
package/dist/version.d.ts CHANGED
@@ -6,5 +6,5 @@
6
6
  * `jsr.json` by `src/__tests__/version_sync.test.ts` — bump all three
7
7
  * together.
8
8
  */
9
- export declare const VERSION = "0.5.1";
9
+ export declare const VERSION = "0.5.2";
10
10
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,86 +1,112 @@
1
1
  {
2
2
  "name": "@oasys/oecs",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Archetype-based Entity Component System",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
8
8
  "import": {
9
9
  "types": "./dist/index.d.ts",
10
+ "development": "./dist/index.development.js",
10
11
  "default": "./dist/index.js"
11
12
  },
12
13
  "require": {
13
14
  "types": "./dist/index.d.cts",
15
+ "development": "./dist/index.development.cjs",
14
16
  "default": "./dist/index.cjs"
15
17
  }
16
18
  },
19
+ "./dev": {
20
+ "import": {
21
+ "types": "./dist/index.d.ts",
22
+ "default": "./dist/index.development.js"
23
+ },
24
+ "require": {
25
+ "types": "./dist/index.d.cts",
26
+ "default": "./dist/index.development.cjs"
27
+ }
28
+ },
17
29
  "./primitives": {
18
30
  "import": {
19
31
  "types": "./dist/primitives.d.ts",
32
+ "development": "./dist/primitives.development.js",
20
33
  "default": "./dist/primitives.js"
21
34
  },
22
35
  "require": {
23
36
  "types": "./dist/primitives.d.cts",
37
+ "development": "./dist/primitives.development.cjs",
24
38
  "default": "./dist/primitives.cjs"
25
39
  }
26
40
  },
27
41
  "./reactive": {
28
42
  "import": {
29
43
  "types": "./dist/reactive/index.d.ts",
44
+ "development": "./dist/reactive/index.development.js",
30
45
  "default": "./dist/reactive/index.js"
31
46
  },
32
47
  "require": {
33
48
  "types": "./dist/reactive/index.d.cts",
49
+ "development": "./dist/reactive/index.development.cjs",
34
50
  "default": "./dist/reactive/index.cjs"
35
51
  }
36
52
  },
37
53
  "./reactive-sync": {
38
54
  "import": {
39
55
  "types": "./dist/extensions/reactive/index.d.ts",
56
+ "development": "./dist/extensions/reactive/index.development.js",
40
57
  "default": "./dist/extensions/reactive/index.js"
41
58
  },
42
59
  "require": {
43
60
  "types": "./dist/extensions/reactive/index.d.cts",
61
+ "development": "./dist/extensions/reactive/index.development.cjs",
44
62
  "default": "./dist/extensions/reactive/index.cjs"
45
63
  }
46
64
  },
47
65
  "./editor": {
48
66
  "import": {
49
67
  "types": "./dist/extensions/editor/index.d.ts",
68
+ "development": "./dist/extensions/editor/index.development.js",
50
69
  "default": "./dist/extensions/editor/index.js"
51
70
  },
52
71
  "require": {
53
72
  "types": "./dist/extensions/editor/index.d.cts",
73
+ "development": "./dist/extensions/editor/index.development.cjs",
54
74
  "default": "./dist/extensions/editor/index.cjs"
55
75
  }
56
76
  },
57
77
  "./solid": {
58
78
  "import": {
59
79
  "types": "./dist/extensions/solid/index.d.ts",
80
+ "development": "./dist/extensions/solid/index.development.js",
60
81
  "default": "./dist/extensions/solid/index.js"
61
82
  },
62
83
  "require": {
63
84
  "types": "./dist/extensions/solid/index.d.cts",
85
+ "development": "./dist/extensions/solid/index.development.cjs",
64
86
  "default": "./dist/extensions/solid/index.cjs"
65
87
  }
66
88
  },
67
89
  "./shared": {
68
90
  "import": {
69
91
  "types": "./dist/shared.d.ts",
92
+ "development": "./dist/shared.development.js",
70
93
  "default": "./dist/shared.js"
71
94
  },
72
95
  "require": {
73
96
  "types": "./dist/shared.d.cts",
97
+ "development": "./dist/shared.development.cjs",
74
98
  "default": "./dist/shared.cjs"
75
99
  }
76
100
  },
77
101
  "./internal": {
78
102
  "import": {
79
103
  "types": "./dist/internal.d.ts",
104
+ "development": "./dist/internal.development.js",
80
105
  "default": "./dist/internal.js"
81
106
  },
82
107
  "require": {
83
108
  "types": "./dist/internal.d.cts",
109
+ "development": "./dist/internal.development.cjs",
84
110
  "default": "./dist/internal.cjs"
85
111
  }
86
112
  },
@@ -96,7 +122,7 @@
96
122
  "sideEffects": false,
97
123
  "scripts": {
98
124
  "dev": "vite",
99
- "build": "vite build && node scripts/postbuild.mjs",
125
+ "build": "node scripts/build.mjs && node scripts/postbuild.mjs",
100
126
  "test": "vitest",
101
127
  "bench": "vitest bench",
102
128
  "prepublishOnly": "pnpm build"
@@ -138,6 +164,9 @@
138
164
  },
139
165
  "typesVersions": {
140
166
  "*": {
167
+ "dev": [
168
+ "./dist/index.d.ts"
169
+ ],
141
170
  "primitives": [
142
171
  "./dist/primitives.d.ts"
143
172
  ],