@adobe/data 0.4.5 → 0.4.6

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 (67) hide show
  1. package/dist/ecs/database/database-schema/create-database-schema-test.js +2 -2
  2. package/dist/ecs/database/database-schema/create-database-schema-test.js.map +1 -1
  3. package/dist/ecs/database/database-schema/create-database-schema.d.ts +1 -4
  4. package/dist/ecs/database/database-schema/create-database-schema.js +2 -2
  5. package/dist/ecs/database/database-schema/create-database-schema.js.map +1 -1
  6. package/dist/ecs/database/database-schema/create-store-schema-test.d.ts +1 -0
  7. package/dist/ecs/database/database-schema/create-store-schema-test.js +36 -0
  8. package/dist/ecs/database/database-schema/create-store-schema-test.js.map +1 -0
  9. package/dist/ecs/database/database-schema/create-store-schema.d.ts +9 -0
  10. package/dist/ecs/database/database-schema/create-store-schema.js +26 -0
  11. package/dist/ecs/database/database-schema/create-store-schema.js.map +1 -0
  12. package/dist/ecs/database/database-schema/database-schema.d.ts +2 -5
  13. package/dist/ecs/database/database-schema/index.d.ts +2 -2
  14. package/dist/ecs/database/database-schema/index.js +2 -2
  15. package/dist/ecs/database/database-schema/index.js.map +1 -1
  16. package/dist/ecs/database/database-schema/store-schema.d.ts +12 -0
  17. package/dist/ecs/database/database-schema/store-schema.js +23 -0
  18. package/dist/ecs/database/database-schema/store-schema.js.map +1 -0
  19. package/dist/ecs/database/database.d.ts +3 -3
  20. package/dist/ecs/database/index.d.ts +0 -1
  21. package/dist/ecs/database/index.js +0 -1
  22. package/dist/ecs/database/index.js.map +1 -1
  23. package/dist/ecs/database/store-schema/create-store-schema-test.d.ts +1 -0
  24. package/dist/ecs/database/store-schema/create-store-schema-test.js +36 -0
  25. package/dist/ecs/database/store-schema/create-store-schema-test.js.map +1 -0
  26. package/dist/ecs/database/store-schema/create-store-schema.d.ts +9 -0
  27. package/dist/ecs/database/store-schema/create-store-schema.js +26 -0
  28. package/dist/ecs/database/store-schema/create-store-schema.js.map +1 -0
  29. package/dist/ecs/database/store-schema/index.d.ts +2 -0
  30. package/dist/ecs/database/store-schema/index.js +24 -0
  31. package/dist/ecs/database/store-schema/index.js.map +1 -0
  32. package/dist/ecs/database/store-schema/store-schema.d.ts +12 -0
  33. package/dist/ecs/database/store-schema/store-schema.js +23 -0
  34. package/dist/ecs/database/store-schema/store-schema.js.map +1 -0
  35. package/dist/ecs/database/transactional-store/apply-operations.d.ts +2 -2
  36. package/dist/ecs/database/transactional-store/apply-operations.js.map +1 -1
  37. package/dist/ecs/database/transactional-store/create-test-transaction.d.ts +0 -1
  38. package/dist/ecs/database/transactional-store/create-test-transaction.js.map +1 -1
  39. package/dist/ecs/database/transactional-store/create-transactional-store.js +5 -6
  40. package/dist/ecs/database/transactional-store/create-transactional-store.js.map +1 -1
  41. package/dist/ecs/database/transactional-store/index.d.ts +0 -1
  42. package/dist/ecs/database/transactional-store/index.js +0 -1
  43. package/dist/ecs/database/transactional-store/index.js.map +1 -1
  44. package/dist/ecs/database/transactional-store/transactional-store.d.ts +1 -6
  45. package/dist/ecs/store/create-store.js.map +1 -1
  46. package/dist/ecs/store/index.d.ts +1 -0
  47. package/dist/ecs/store/index.js +1 -0
  48. package/dist/ecs/store/index.js.map +1 -1
  49. package/dist/ecs/store/store-schema/create-store-schema-test.d.ts +1 -0
  50. package/dist/ecs/store/store-schema/create-store-schema-test.js +36 -0
  51. package/dist/ecs/store/store-schema/create-store-schema-test.js.map +1 -0
  52. package/dist/ecs/store/store-schema/create-store-schema.d.ts +9 -0
  53. package/dist/ecs/store/store-schema/create-store-schema.js +26 -0
  54. package/dist/ecs/store/store-schema/create-store-schema.js.map +1 -0
  55. package/dist/ecs/store/store-schema/index.d.ts +2 -0
  56. package/dist/ecs/store/store-schema/index.js +24 -0
  57. package/dist/ecs/store/store-schema/index.js.map +1 -0
  58. package/dist/ecs/store/store-schema/store-schema.d.ts +12 -0
  59. package/dist/ecs/store/store-schema/store-schema.js +23 -0
  60. package/dist/ecs/store/store-schema/store-schema.js.map +1 -0
  61. package/dist/ecs/store/store.d.ts +6 -0
  62. package/dist/tsconfig.tsbuildinfo +1 -1
  63. package/dist/typed-buffer/structs/get-struct-layout.js +7 -10
  64. package/dist/typed-buffer/structs/get-struct-layout.js.map +1 -1
  65. package/dist/typed-buffer/structs/get-struct-layout.test.js +148 -11
  66. package/dist/typed-buffer/structs/get-struct-layout.test.js.map +1 -1
  67. package/package.json +1 -1
@@ -20,9 +20,9 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.*/
22
22
  import { TrueSchema } from "../../../schema/true.js";
23
- import { createDatabaseSchema } from "./create-database-schema.js";
23
+ import { createStoreSchema } from "./create-store-schema.js";
24
24
  // just a compile time test which is why we're using -test.ts extension instead of .test.ts
25
- createDatabaseSchema({
25
+ createStoreSchema({
26
26
  velocity: { type: "number" },
27
27
  particle: TrueSchema,
28
28
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"create-database-schema-test.js","sourceRoot":"","sources":["../../../../src/ecs/database/database-schema/create-database-schema-test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAEnE,2FAA2F;AAE3F,oBAAoB,CAChB;IACI,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC5B,QAAQ,EAAE,UAAU;CACvB,EACD;IACI,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;IAC7C,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;CAC9C,EACD;IACI,GAAG,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;IAC7B,mBAAmB;IACnB,GAAG,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,0DAA0D;CAC5F,EACD;IACI,gBAAgB,EAAE,CAAC,CAAC,EAAE,QAAgB,EAAE,EAAE;QACtC,CAAC,CAAC,SAAS,CAAC,aAAa,GAAG,QAAQ,CAAC;QACrC,mBAAmB;QACnB,CAAC,CAAC,SAAS,CAAC,cAAc,GAAG,QAAQ,CAAC;IAC1C,CAAC;CACJ,CACJ,CAAA"}
1
+ {"version":3,"file":"create-database-schema-test.js","sourceRoot":"","sources":["../../../../src/ecs/database/database-schema/create-database-schema-test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,2FAA2F;AAE3F,iBAAiB,CACb;IACI,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC5B,QAAQ,EAAE,UAAU;CACvB,EACD;IACI,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;IAC7C,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;CAC9C,EACD;IACI,GAAG,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;IAC7B,mBAAmB;IACnB,GAAG,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,0DAA0D;CAC5F,EACD;IACI,gBAAgB,EAAE,CAAC,CAAC,EAAE,QAAgB,EAAE,EAAE;QACtC,CAAC,CAAC,SAAS,CAAC,aAAa,GAAG,QAAQ,CAAC;QACrC,mBAAmB;QACnB,CAAC,CAAC,SAAS,CAAC,cAAc,GAAG,QAAQ,CAAC;IAC1C,CAAC;CACJ,CACJ,CAAA"}
@@ -1,12 +1,9 @@
1
- import { FromSchemas } from "../../../schema/schema.js";
2
1
  import { StringKeyof } from "../../../types/types.js";
3
2
  import { ComponentSchemas } from "../../component-schemas.js";
4
3
  import { ResourceSchemas } from "../../resource-schemas.js";
5
4
  import { ArchetypeComponents } from "../../store/archetype-components.js";
6
- import { TransactionDeclaration } from "../database.js";
7
- export declare function createDatabaseSchema<const CS extends ComponentSchemas, const RS extends ResourceSchemas, const A extends ArchetypeComponents<StringKeyof<CS>>, const TD extends Record<string, TransactionDeclaration<FromSchemas<CS>, FromSchemas<RS>, A>>>(components: CS, resources: RS, archetypes: A, transactions: TD): {
5
+ export declare function createStoreSchema<const CS extends ComponentSchemas, const RS extends ResourceSchemas, const A extends ArchetypeComponents<StringKeyof<CS>>>(components: CS, resources: RS, archetypes: A): {
8
6
  components: CS;
9
7
  resources: RS;
10
8
  archetypes: A;
11
- transactions: TD;
12
9
  };
@@ -19,8 +19,8 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.*/
22
- export function createDatabaseSchema(components, resources, archetypes, transactions) {
23
- return { components, resources, archetypes, transactions };
22
+ export function createStoreSchema(components, resources, archetypes) {
23
+ return { components, resources, archetypes };
24
24
  }
25
25
  ;
26
26
  //# sourceMappingURL=create-database-schema.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"create-database-schema.js","sourceRoot":"","sources":["../../../../src/ecs/database/database-schema/create-database-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAUX,MAAM,UAAU,oBAAoB,CAMhC,UAAc,EACd,SAAa,EACb,UAAa,EACb,YAAgB;IAEhB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,YAAY,EAA0C,CAAC;AACvG,CAAC;AAAA,CAAC"}
1
+ {"version":3,"file":"create-database-schema.js","sourceRoot":"","sources":["../../../../src/ecs/database/database-schema/create-database-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAQX,MAAM,UAAU,iBAAiB,CAK7B,UAAc,EACd,SAAa,EACb,UAAa;IAEb,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAmC,CAAC;AAClF,CAAC;AAAA,CAAC"}
@@ -0,0 +1,36 @@
1
+ /*MIT License
2
+
3
+ © Copyright 2025 Adobe. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.*/
22
+ import { TrueSchema } from "../../../schema/true.js";
23
+ import { createStoreSchema } from "./create-store-schema.js";
24
+ // just a compile time test which is why we're using -test.ts extension instead of .test.ts
25
+ createStoreSchema({
26
+ velocity: { type: "number" },
27
+ particle: TrueSchema,
28
+ }, {
29
+ mousePosition: { type: "number", default: 0 },
30
+ fooPosition: { type: "number", default: 0 },
31
+ }, {
32
+ bar: ["particle", "velocity"],
33
+ // @ts-expect-error
34
+ foo: ["particle", "velocity2"] // should throw error because velocity2 is not a component
35
+ });
36
+ //# sourceMappingURL=create-store-schema-test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-store-schema-test.js","sourceRoot":"","sources":["../../../../src/ecs/database/database-schema/create-store-schema-test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,2FAA2F;AAE3F,iBAAiB,CACb;IACI,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC5B,QAAQ,EAAE,UAAU;CACvB,EACD;IACI,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;IAC7C,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;CAC9C,EACD;IACI,GAAG,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;IAC7B,mBAAmB;IACnB,GAAG,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,0DAA0D;CAC5F,CACJ,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { StringKeyof } from "../../../types/types.js";
2
+ import { ComponentSchemas } from "../../component-schemas.js";
3
+ import { ResourceSchemas } from "../../resource-schemas.js";
4
+ import { ArchetypeComponents } from "../../store/archetype-components.js";
5
+ export declare function createStoreSchema<const CS extends ComponentSchemas, const RS extends ResourceSchemas, const A extends ArchetypeComponents<StringKeyof<CS>>>(components: CS, resources: RS, archetypes: A): {
6
+ components: CS;
7
+ resources: RS;
8
+ archetypes: A;
9
+ };
@@ -0,0 +1,26 @@
1
+ /*MIT License
2
+
3
+ © Copyright 2025 Adobe. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.*/
22
+ export function createStoreSchema(components, resources, archetypes) {
23
+ return { components, resources, archetypes };
24
+ }
25
+ ;
26
+ //# sourceMappingURL=create-store-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-store-schema.js","sourceRoot":"","sources":["../../../../src/ecs/database/database-schema/create-store-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAQX,MAAM,UAAU,iBAAiB,CAK7B,UAAc,EACd,SAAa,EACb,UAAa;IAEb,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAmC,CAAC;AAClF,CAAC;AAAA,CAAC"}
@@ -1,15 +1,12 @@
1
1
  import { FromSchemas } from "@adobe/data/schema";
2
- import { Database, ToTransactionFunctions, TransactionDeclaration } from "../database.js";
3
2
  import { ComponentSchemas } from "../../component-schemas.js";
4
3
  import { ResourceSchemas } from "../../resource-schemas.js";
5
4
  import { Store } from "../../store/store.js";
6
5
  import { ArchetypeComponents } from "../../store/archetype-components.js";
7
6
  import { StringKeyof } from "../../../types/types.js";
8
- export type DatabaseSchema<CS extends ComponentSchemas, RS extends ResourceSchemas, A extends ArchetypeComponents<StringKeyof<CS>>, TD extends Record<string, TransactionDeclaration<FromSchemas<CS>, FromSchemas<RS>, A>>> = {
7
+ export type StoreSchema<CS extends ComponentSchemas, RS extends ResourceSchemas, A extends ArchetypeComponents<StringKeyof<CS>>> = {
9
8
  readonly components: CS;
10
9
  readonly resources: RS;
11
10
  readonly archetypes: A;
12
- readonly transactions: TD;
13
11
  };
14
- export type DatabaseFromSchema<T> = T extends DatabaseSchema<infer CS, infer RS, infer A, infer TD> ? Database<FromSchemas<CS>, FromSchemas<RS>, A, ToTransactionFunctions<TD>> : never;
15
- export type StoreFromSchema<T> = T extends DatabaseSchema<infer CS, infer RS, infer A, infer TD> ? Store<FromSchemas<CS>, FromSchemas<RS>, A> : never;
12
+ export type StoreFromSchema<T> = T extends StoreSchema<infer CS, infer RS, infer A> ? Store<FromSchemas<CS>, FromSchemas<RS>, A> : never;
@@ -1,2 +1,2 @@
1
- export { createDatabaseSchema } from "./create-database-schema.js";
2
- export * from "./database-schema.js";
1
+ export { createStoreSchema } from "./create-store-schema.js";
2
+ export * from "./store-schema.js";
@@ -19,6 +19,6 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.*/
22
- export { createDatabaseSchema } from "./create-database-schema.js";
23
- export * from "./database-schema.js";
22
+ export { createStoreSchema } from "./create-store-schema.js";
23
+ export * from "./store-schema.js";
24
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ecs/database/database-schema/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,cAAc,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ecs/database/database-schema/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { FromSchemas } from "@adobe/data/schema";
2
+ import { ComponentSchemas } from "../../component-schemas.js";
3
+ import { ResourceSchemas } from "../../resource-schemas.js";
4
+ import { Store } from "../../store/store.js";
5
+ import { ArchetypeComponents } from "../../store/archetype-components.js";
6
+ import { StringKeyof } from "../../../types/types.js";
7
+ export type StoreSchema<CS extends ComponentSchemas, RS extends ResourceSchemas, A extends ArchetypeComponents<StringKeyof<CS>>> = {
8
+ readonly components: CS;
9
+ readonly resources: RS;
10
+ readonly archetypes: A;
11
+ };
12
+ export type StoreFromSchema<T> = T extends StoreSchema<infer CS, infer RS, infer A> ? Store<FromSchemas<CS>, FromSchemas<RS>, A> : never;
@@ -0,0 +1,23 @@
1
+ /*MIT License
2
+
3
+ © Copyright 2025 Adobe. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.*/
22
+ export {};
23
+ //# sourceMappingURL=store-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-schema.js","sourceRoot":"","sources":["../../../../src/ecs/database/database-schema/store-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW"}
@@ -1,16 +1,16 @@
1
1
  import { Archetype, ArchetypeId, ReadonlyArchetype } from "../archetype/index.js";
2
2
  import { ResourceComponents } from "../store/resource-components.js";
3
- import { ReadonlyStore } from "../store/index.js";
3
+ import { ReadonlyStore, Store } from "../store/index.js";
4
4
  import { Entity } from "../entity.js";
5
5
  import { EntityReadValues } from "../store/core/index.js";
6
6
  import { Observe } from "../../observe/index.js";
7
- import { Transaction, TransactionResult } from "./transactional-store/index.js";
7
+ import { TransactionResult } from "./transactional-store/index.js";
8
8
  import { StringKeyof } from "../../types/types.js";
9
9
  import { Components } from "../store/components.js";
10
10
  import { ArchetypeComponents } from "../store/archetype-components.js";
11
11
  import { CoreComponents } from "../core-components.js";
12
12
  import { EntitySelectOptions } from "../store/entity-select-options.js";
13
- export type TransactionDeclaration<C extends Components, R extends ResourceComponents, A extends ArchetypeComponents<StringKeyof<C>>, Input extends any | void = any> = (t: Transaction<C, R, A>, input: Input) => void | Entity;
13
+ export type TransactionDeclaration<C extends Components, R extends ResourceComponents, A extends ArchetypeComponents<StringKeyof<C>>, Input extends any | void = any> = (t: Store<C, R, A>, input: Input) => void | Entity;
14
14
  export type TransactionDeclarations = object;
15
15
  export type AsyncArgsProvider<T> = () => Promise<T> | AsyncGenerator<T>;
16
16
  /**
@@ -1,5 +1,4 @@
1
1
  export * from "./create-database.js";
2
2
  export * from "./database.js";
3
3
  export * from "./observe-dependent-value.js";
4
- export * from "./database-schema/index.js";
5
4
  export * from "./transactional-store/index.js";
@@ -22,6 +22,5 @@ SOFTWARE.*/
22
22
  export * from "./create-database.js";
23
23
  export * from "./database.js";
24
24
  export * from "./observe-dependent-value.js";
25
- export * from "./database-schema/index.js";
26
25
  export * from "./transactional-store/index.js";
27
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ecs/database/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,gCAAgC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ecs/database/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC"}
@@ -0,0 +1,36 @@
1
+ /*MIT License
2
+
3
+ © Copyright 2025 Adobe. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.*/
22
+ import { TrueSchema } from "../../../schema/true.js";
23
+ import { createStoreSchema } from "./create-store-schema.js";
24
+ // just a compile time test which is why we're using -test.ts extension instead of .test.ts
25
+ createStoreSchema({
26
+ velocity: { type: "number" },
27
+ particle: TrueSchema,
28
+ }, {
29
+ mousePosition: { type: "number", default: 0 },
30
+ fooPosition: { type: "number", default: 0 },
31
+ }, {
32
+ bar: ["particle", "velocity"],
33
+ // @ts-expect-error
34
+ foo: ["particle", "velocity2"] // should throw error because velocity2 is not a component
35
+ });
36
+ //# sourceMappingURL=create-store-schema-test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-store-schema-test.js","sourceRoot":"","sources":["../../../../src/ecs/database/store-schema/create-store-schema-test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,2FAA2F;AAE3F,iBAAiB,CACb;IACI,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC5B,QAAQ,EAAE,UAAU;CACvB,EACD;IACI,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;IAC7C,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EAAE;CAC9C,EACD;IACI,GAAG,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;IAC7B,mBAAmB;IACnB,GAAG,EAAE,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC,0DAA0D;CAC5F,CACJ,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { StringKeyof } from "../../../types/types.js";
2
+ import { ComponentSchemas } from "../../component-schemas.js";
3
+ import { ResourceSchemas } from "../../resource-schemas.js";
4
+ import { ArchetypeComponents } from "../../store/archetype-components.js";
5
+ export declare function createStoreSchema<const CS extends ComponentSchemas, const RS extends ResourceSchemas, const A extends ArchetypeComponents<StringKeyof<CS>>>(components: CS, resources: RS, archetypes: A): {
6
+ components: CS;
7
+ resources: RS;
8
+ archetypes: A;
9
+ };
@@ -0,0 +1,26 @@
1
+ /*MIT License
2
+
3
+ © Copyright 2025 Adobe. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.*/
22
+ export function createStoreSchema(components, resources, archetypes) {
23
+ return { components, resources, archetypes };
24
+ }
25
+ ;
26
+ //# sourceMappingURL=create-store-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-store-schema.js","sourceRoot":"","sources":["../../../../src/ecs/database/store-schema/create-store-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAQX,MAAM,UAAU,iBAAiB,CAK7B,UAAc,EACd,SAAa,EACb,UAAa;IAEb,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAmC,CAAC;AAClF,CAAC;AAAA,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { createStoreSchema } from "./create-store-schema.js";
2
+ export * from "./store-schema.js";
@@ -0,0 +1,24 @@
1
+ /*MIT License
2
+
3
+ © Copyright 2025 Adobe. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.*/
22
+ export { createStoreSchema } from "./create-store-schema.js";
23
+ export * from "./store-schema.js";
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ecs/database/store-schema/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { FromSchemas } from "@adobe/data/schema";
2
+ import { ComponentSchemas } from "../../component-schemas.js";
3
+ import { ResourceSchemas } from "../../resource-schemas.js";
4
+ import { Store } from "../../store/store.js";
5
+ import { ArchetypeComponents } from "../../store/archetype-components.js";
6
+ import { StringKeyof } from "../../../types/types.js";
7
+ export type StoreSchema<CS extends ComponentSchemas, RS extends ResourceSchemas, A extends ArchetypeComponents<StringKeyof<CS>>> = {
8
+ readonly components: CS;
9
+ readonly resources: RS;
10
+ readonly archetypes: A;
11
+ };
12
+ export type StoreFromSchema<T> = T extends StoreSchema<infer CS, infer RS, infer A> ? Store<FromSchemas<CS>, FromSchemas<RS>, A> : never;
@@ -0,0 +1,23 @@
1
+ /*MIT License
2
+
3
+ © Copyright 2025 Adobe. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.*/
22
+ export {};
23
+ //# sourceMappingURL=store-schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"store-schema.js","sourceRoot":"","sources":["../../../../src/ecs/database/store-schema/store-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW"}
@@ -1,3 +1,3 @@
1
1
  import { Store } from "../../store/index.js";
2
- import { Transaction, TransactionWriteOperation } from "./transactional-store.js";
3
- export declare const applyOperations: (store: Transaction<any, any, any> | Store<any, any, any>, operations: TransactionWriteOperation<any>[]) => void;
2
+ import { TransactionWriteOperation } from "./transactional-store.js";
3
+ export declare const applyOperations: (store: Store<any, any, any>, operations: TransactionWriteOperation<any>[]) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"apply-operations.js","sourceRoot":"","sources":["../../../../src/ecs/database/transactional-store/apply-operations.ts"],"names":[],"mappings":"AAOA,yDAAyD;AACzD,MAAM,CAAC,MAAM,eAAe,GAAG,CAC3B,KAAwD,EACxD,UAA4C,EAC9C,EAAE;IACA,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACjC,QAAQ,SAAS,CAAC,IAAI,EAAE,CAAC;YACrB,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACZ,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAuB,CAAC;gBACtF,MAAM,SAAS,GAAG,KAAK,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;gBACxD,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,MAAa,CAAC,CAAC;gBAC1C,MAAM;YACV,CAAC;YACD,KAAK,QAAQ;gBACT,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;gBACjD,MAAM;YACV,KAAK,QAAQ;gBACT,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;gBAC/B,MAAM;QACd,CAAC;IACL,CAAC;AACL,CAAC,CAAA"}
1
+ {"version":3,"file":"apply-operations.js","sourceRoot":"","sources":["../../../../src/ecs/database/transactional-store/apply-operations.ts"],"names":[],"mappings":"AAIA,yDAAyD;AACzD,MAAM,CAAC,MAAM,eAAe,GAAG,CAC3B,KAA2B,EAC3B,UAA4C,EAC9C,EAAE;IACA,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACjC,QAAQ,SAAS,CAAC,IAAI,EAAE,CAAC;YACrB,KAAK,QAAQ,CAAC,CAAC,CAAC;gBACZ,MAAM,cAAc,GAAG,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAuB,CAAC;gBACtF,MAAM,SAAS,GAAG,KAAK,CAAC,eAAe,CAAC,cAAc,CAAC,CAAC;gBACxD,SAAS,CAAC,MAAM,CAAC,SAAS,CAAC,MAAa,CAAC,CAAC;gBAC1C,MAAM;YACV,CAAC;YACD,KAAK,QAAQ;gBACT,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;gBACjD,MAAM;YACV,KAAK,QAAQ;gBACT,KAAK,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;gBAC/B,MAAM;QACd,CAAC;IACL,CAAC;AACL,CAAC,CAAA"}
@@ -3,5 +3,4 @@ import { ArchetypeComponents } from "../../store/archetype-components.js";
3
3
  import { Components } from "../../store/components.js";
4
4
  import { ResourceComponents } from "../../store/resource-components.js";
5
5
  import { Store } from "../../store/store.js";
6
- import { Transaction } from "./transactional-store.js";
7
6
  export declare const createTestTransaction: <C extends Components = never, R extends ResourceComponents = never, A extends ArchetypeComponents<StringKeyof<C>> = never>(store: Store<C, R, A>) => Transaction<C, R, A>;
@@ -1 +1 @@
1
- {"version":3,"file":"create-test-transaction.js","sourceRoot":"","sources":["../../../../src/ecs/database/transactional-store/create-test-transaction.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAInC,KAAqB,EAAwB,EAAE;IAC7C,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;QACxB,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,IAAI;KACjB,CAAC,CAAC;AACP,CAAC,CAAA"}
1
+ {"version":3,"file":"create-test-transaction.js","sourceRoot":"","sources":["../../../../src/ecs/database/transactional-store/create-test-transaction.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAInC,KAAqB,EAAwB,EAAE;IAC7C,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE;QACxB,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE,IAAI;KACjB,CAAC,CAAC;AACP,CAAC,CAAA"}
@@ -121,13 +121,12 @@ export function createTransactionalStore(store) {
121
121
  },
122
122
  update: updateEntity,
123
123
  delete: deleteEntity,
124
- transient: false,
125
- undoable: null,
124
+ // transient: false as boolean,
125
+ undoable: undefined,
126
126
  };
127
127
  // Execute transaction function
128
128
  const execute = (transactionFunction, options) => {
129
- transactionStore.transient = options?.transient ?? false;
130
- transactionStore.undoable = null;
129
+ transactionStore.undoable = undefined;
131
130
  // Reset transaction state
132
131
  undoOperationsInReverseOrder = [];
133
132
  redoOperations = [];
@@ -140,8 +139,8 @@ export function createTransactionalStore(store) {
140
139
  // Return the transaction result
141
140
  const result = {
142
141
  value: value ?? undefined,
143
- transient: transactionStore.transient,
144
- undoable: transactionStore.undoable,
142
+ transient: options?.transient ?? false,
143
+ undoable: transactionStore.undoable ?? null,
145
144
  redo: [...redoOperations],
146
145
  undo: [...undoOperationsInReverseOrder.reverse()],
147
146
  changedEntities: new Map(changed.entities),
@@ -1 +1 @@
1
- {"version":3,"file":"create-transactional-store.js","sourceRoot":"","sources":["../../../../src/ecs/database/transactional-store/create-transactional-store.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,gEAAgE;AAChE,MAAM,MAAM,GAAY,cAAc,CAAC;AAEvC,MAAM,UAAU,wBAAwB,CAKpC,KAAqB;IAGrB,2DAA2D;IAC3D,IAAI,4BAA4B,GAAmC,EAAE,CAAC;IACtE,IAAI,cAAc,GAAmC,EAAE,CAAC;IACxD,MAAM,OAAO,GAAG;QACZ,QAAQ,EAAE,IAAI,GAAG,EAAwC;QACzD,UAAU,EAAE,IAAI,GAAG,EAAW;QAC9B,UAAU,EAAE,IAAI,GAAG,EAAe;KACrC,CAAC;IAEF,8CAA8C;IAC9C,MAAM,aAAa,GAAG,CAAC,SAAyB,EAAE,EAAE;QAChD,MAAM,EAAE,EAAE,EAAE,GAAG,SAAS,CAAC;QACzB,OAAO;YACH,GAAG,SAAS;YACZ,IAAI,QAAQ;gBACR,OAAO,SAAS,CAAC,QAAQ,CAAC;YAC9B,CAAC;YACD,MAAM,EAAE,CAAC,MAA6B,EAAE,EAAE;gBACtC,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBACxC,cAAc,CAAC,IAAI,CAAC;oBAChB,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,MAAM;iBACjB,CAAC,CAAC;gBACH,4BAA4B,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;gBAC9D,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBACrC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBAC3B,KAAK,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;oBACvB,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,GAAc,CAAC,CAAC;gBAC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AAC,MAAM,CAAC,CAAC;gBAC/B,MAAM;QACd,CAAC;IACL,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"create-transactional-store.js","sourceRoot":"","sources":["../../../../src/ecs/database/transactional-store/create-transactional-store.ts"],"names":[],"mappings":"AA8BA,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAG7D,gEAAgE;AAChE,MAAM,MAAM,GAAY,cAAc,CAAC;AAUvC,MAAM,UAAU,wBAAwB,CAKpC,KAAqB;IAGrB,2DAA2D;IAC3D,IAAI,4BAA4B,GAAmC,EAAE,CAAC;IACtE,IAAI,cAAc,GAAmC,EAAE,CAAC;IACxD,MAAM,OAAO,GAAG;QACZ,QAAQ,EAAE,IAAI,GAAG,EAAwC;QACzD,UAAU,EAAE,IAAI,GAAG,EAAW;QAC9B,UAAU,EAAE,IAAI,GAAG,EAAe;KACrC,CAAC;IAEF,8CAA8C;IAC9C,MAAM,aAAa,GAAG,CAAC,SAAyB,EAAE,EAAE;QAChD,MAAM,EAAE,EAAE,EAAE,GAAG,SAAS,CAAC;QACzB,OAAO;YACH,GAAG,SAAS;YACZ,IAAI,QAAQ;gBACR,OAAO,SAAS,CAAC,QAAQ,CAAC;YAC9B,CAAC;YACD,MAAM,EAAE,CAAC,MAA6B,EAAE,EAAE;gBACtC,MAAM,MAAM,GAAG,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBACxC,cAAc,CAAC,IAAI,CAAC;oBAChB,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,MAAM;iBACjB,CAAC,CAAC;gBACH,4BAA4B,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;gBAC9D,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBACrC,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;gBAC3B,KAAK,MAAM,GAAG,IA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AAK,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;gBAC/B,MAAM;QACd,CAAC;IACL,CAAC;AACL,CAAC"}
@@ -1,2 +1 @@
1
1
  export * from "./transactional-store.js";
2
- export * from "./create-test-transaction.js";
@@ -20,5 +20,4 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.*/
22
22
  export * from "./transactional-store.js";
23
- export * from "./create-test-transaction.js";
24
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ecs/database/transactional-store/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,cAAc,0BAA0B,CAAC;AACzC,cAAc,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ecs/database/transactional-store/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,cAAc,0BAA0B,CAAC"}
@@ -7,11 +7,6 @@ import { Components } from "../../store/components.js";
7
7
  import { StringKeyof } from "../../../types/types.js";
8
8
  import { ArchetypeComponents } from "../../store/archetype-components.js";
9
9
  import { Undoable } from "../undoable.js";
10
- export interface Transaction<C extends Components = never, R extends ResourceComponents = never, A extends ArchetypeComponents<StringKeyof<C>> = never> extends Store<C, R, A> {
11
- readonly transient: boolean;
12
- undoable: null | Undoable;
13
- }
14
- export type TransactionFromStore<S extends Store<any, any, any>> = S extends Store<infer C, infer R, infer A> ? Transaction<C, R, A> : never;
15
10
  export interface TransactionalStore<C extends Components = never, R extends ResourceComponents = never, A extends ArchetypeComponents<StringKeyof<C>> = never> extends ReadonlyStore<C, R, A> {
16
11
  /**
17
12
  * Execute a transaction on the store.
@@ -20,7 +15,7 @@ export interface TransactionalStore<C extends Components = never, R extends Reso
20
15
  * @param transactionFunction - A function that takes the store as an argument and performs some operations on it.
21
16
  * @returns A promise that resolves when the transaction is complete.
22
17
  */
23
- execute(transactionFunction: (t: Transaction<C, R, A>) => Entity | void, options?: {
18
+ execute(transactionFunction: (t: Store<C, R, A>) => Entity | void, options?: {
24
19
  transient?: boolean;
25
20
  }): TransactionResult<C>;
26
21
  transactionStore: Store<C, R, A>;
@@ -1 +1 @@
1
- {"version":3,"file":"create-store.js","sourceRoot":"","sources":["../../../src/ecs/store/create-store.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAMnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,MAAM,UAAU,WAAW,CAKvB,mBAAuB,EACvB,kBAAsB,EAAQ,EAC9B,0BAA6B,EAAO;IASpC,MAAM,SAAS,GAAG,EAAO,CAAC;IAE1B,MAAM,2BAA2B,GAA0C,EAAE,GAAG,mBAAmB,EAAE,CAAC;IACtG,iGAAiG;IACjG,KAAK,MAAM,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,EAAE,CAAC;QAC9C,MAAM,UAAU,GAAG,IAA0B,CAAC;QAC9C,2BAA2B,CAAC,UAAU,CAAC,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,IAAI,GAAG,UAAU,CAAC,2BAA2B,CAAuB,CAAC;IAE3E,0FAA0F;IAC1F,wEAAwE;IACxE,MAAM,wCAAwC,GAAG,GAAG,EAAE;QAClD,KAAK,MAAM,CAAC,IAAI,EAAE,cAAc,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;YACnE,MAAM,UAAU,GAAG,IAAsB,CAAC;YAC1C,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC;YAC3D,IAAI,SAAS,CAAC,QA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CAAC;IAEF,OAAO,KAAY,CAAC;AACxB,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export * from "./store.js";
2
2
  export * from "./create-store.js";
3
3
  export * from "./archetype-components.js";
4
+ export * from "./store-schema/index.js";
@@ -22,4 +22,5 @@ SOFTWARE.*/
22
22
  export * from "./store.js";
23
23
  export * from "./create-store.js";
24
24
  export * from "./archetype-components.js";
25
+ export * from "./store-schema/index.js";
25
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ecs/store/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AACX,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ecs/store/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AACX,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC"}