@adobe/data 0.9.5 → 0.9.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 (240) hide show
  1. package/ecs/database/create-plugin-cryos-pattern.test.d.ts +3 -0
  2. package/ecs/database/create-plugin-cryos-pattern.test.js +83 -0
  3. package/ecs/database/create-plugin-cryos-pattern.test.js.map +1 -0
  4. package/ecs/database/create-plugin-graphics.test.d.ts +93 -0
  5. package/ecs/database/create-plugin-graphics.test.js +135 -0
  6. package/ecs/database/create-plugin-graphics.test.js.map +1 -0
  7. package/ecs/database/create-plugin-type.type-test.js +563 -0
  8. package/ecs/database/create-plugin-type.type-test.js.map +1 -0
  9. package/ecs/database/create-plugin-type.type.test.js +563 -0
  10. package/ecs/database/create-plugin-type.type.test.js.map +1 -0
  11. package/ecs/database/database.d.ts +6 -1
  12. package/ecs/database/database.js.map +1 -1
  13. package/ecs/database/experimental-action-types.js +275 -0
  14. package/ecs/database/experimental-action-types.js.map +1 -0
  15. package/ecs/database/from-plugin.type-test.js +180 -0
  16. package/ecs/database/from-plugin.type-test.js.map +1 -0
  17. package/ecs/database/plugin-types.js +5 -0
  18. package/ecs/database/plugin-types.js.map +1 -0
  19. package/ecs/database/type-investigation.test.js +54 -0
  20. package/ecs/database/type-investigation.test.js.map +1 -0
  21. package/ecs/store/core/create-core.test.js +21 -0
  22. package/ecs/store/core/create-core.test.js.map +1 -1
  23. package/package.json +1 -1
  24. package/tsconfig.tsbuildinfo +1 -1
  25. package/typed-buffer/create-array-buffer.js +10 -0
  26. package/typed-buffer/create-array-buffer.js.map +1 -1
  27. package/typed-buffer/create-array-buffer.test.js +50 -0
  28. package/typed-buffer/create-array-buffer.test.js.map +1 -1
  29. package/typed-buffer/create-const-buffer.js +3 -0
  30. package/typed-buffer/create-const-buffer.js.map +1 -1
  31. package/typed-buffer/create-const-buffer.test.js +24 -0
  32. package/typed-buffer/create-const-buffer.test.js.map +1 -1
  33. package/typed-buffer/create-number-buffer.js +4 -0
  34. package/typed-buffer/create-number-buffer.js.map +1 -1
  35. package/typed-buffer/create-number-buffer.test.js +38 -0
  36. package/typed-buffer/create-number-buffer.test.js.map +1 -1
  37. package/typed-buffer/create-struct-buffer.js +11 -0
  38. package/typed-buffer/create-struct-buffer.js.map +1 -1
  39. package/typed-buffer/create-struct-buffer.test.js +60 -0
  40. package/typed-buffer/create-struct-buffer.test.js.map +1 -1
  41. package/typed-buffer/typed-buffer.d.ts +2 -0
  42. package/typed-buffer/typed-buffer.js.map +1 -1
  43. package/assembly/package.json +0 -1
  44. package/blob/package.json +0 -1
  45. package/cache/package.json +0 -1
  46. package/debug-type-test.js +0 -12
  47. package/debug-type-test.js.map +0 -1
  48. package/ecs/database/archetype-type-safety-test.d.ts +0 -21
  49. package/ecs/database/archetype-type-safety-test.js +0 -36
  50. package/ecs/database/archetype-type-safety-test.js.map +0 -1
  51. package/ecs/database/create-database-schema-test.js +0 -150
  52. package/ecs/database/create-database-schema-test.js.map +0 -1
  53. package/ecs/database/create-plugin-v2.d.ts +0 -79
  54. package/ecs/database/create-plugin-v2.js +0 -68
  55. package/ecs/database/create-plugin-v2.js.map +0 -1
  56. package/ecs/database/create-plugin-v2.test.js +0 -362
  57. package/ecs/database/create-plugin-v2.test.js.map +0 -1
  58. package/ecs/database/create-plugin.OLD.d.ts +0 -138
  59. package/ecs/database/create-plugin.OLD.js +0 -59
  60. package/ecs/database/create-plugin.OLD.js.map +0 -1
  61. package/ecs/database/database-with-systems.test.js +0 -292
  62. package/ecs/database/database-with-systems.test.js.map +0 -1
  63. package/ecs/database/database.plugin.create.test.OLD.js +0 -601
  64. package/ecs/database/database.plugin.create.test.OLD.js.map +0 -1
  65. package/ecs/database/database.plugin.create.test.js +0 -321
  66. package/ecs/database/database.plugin.create.test.js.map +0 -1
  67. package/ecs/database/database.plugin.test.d.ts +0 -1
  68. package/ecs/database/database.plugin.test.js +0 -90
  69. package/ecs/database/database.plugin.test.js.map +0 -1
  70. package/ecs/database/database.test copy.d.ts +0 -1
  71. package/ecs/database/database.test copy.js +0 -199
  72. package/ecs/database/database.test copy.js.map +0 -1
  73. package/ecs/database/multi-param-inference-poc.test.d.ts +0 -1
  74. package/ecs/database/multi-param-inference-poc.test.js +0 -96
  75. package/ecs/database/multi-param-inference-poc.test.js.map +0 -1
  76. package/ecs/database/old-plugin-create-with-dependencies-array.d.ts +0 -61
  77. package/ecs/database/old-plugin-create-with-dependencies-array.js +0 -76
  78. package/ecs/database/old-plugin-create-with-dependencies-array.js.map +0 -1
  79. package/ecs/database/overload-inference-poc.test.d.ts +0 -1
  80. package/ecs/database/overload-inference-poc.test.js +0 -109
  81. package/ecs/database/overload-inference-poc.test.js.map +0 -1
  82. package/ecs/database/schedule-type-check-demo.d.ts +0 -10
  83. package/ecs/database/schedule-type-check-demo.js +0 -71
  84. package/ecs/database/schedule-type-check-demo.js.map +0 -1
  85. package/ecs/database/test-archetype-validation.d.ts +0 -9
  86. package/ecs/database/test-archetype-validation.js +0 -14
  87. package/ecs/database/test-archetype-validation.js.map +0 -1
  88. package/ecs/database/test-exactkeys.d.ts +0 -1
  89. package/ecs/database/test-exactkeys.js +0 -17
  90. package/ecs/database/test-exactkeys.js.map +0 -1
  91. package/ecs/database/transactional-store/coalesce-transactions.test.js +0 -433
  92. package/ecs/database/transactional-store/coalesce-transactions.test.js.map +0 -1
  93. package/ecs/database/type-inference-demo.d.ts +0 -75
  94. package/ecs/database/type-inference-demo.js +0 -73
  95. package/ecs/database/type-inference-demo.js.map +0 -1
  96. package/ecs/database/type-inference-poc.test.d.ts +0 -1
  97. package/ecs/database/type-inference-poc.test.js +0 -73
  98. package/ecs/database/type-inference-poc.test.js.map +0 -1
  99. package/ecs/package.json +0 -1
  100. package/ecs/plugins/scheduler/create-scheduler-plugin.d.ts +0 -8
  101. package/ecs/plugins/scheduler/create-scheduler-plugin.js +0 -54
  102. package/ecs/plugins/scheduler/create-scheduler-plugin.js.map +0 -1
  103. package/ecs/plugins/scheduler/create-scheduler-plugin.test.d.ts +0 -1
  104. package/ecs/plugins/scheduler/create-scheduler-plugin.test.js +0 -198
  105. package/ecs/plugins/scheduler/create-scheduler-plugin.test.js.map +0 -1
  106. package/ecs/plugins/scheduler/type-inference-test.d.ts +0 -1
  107. package/ecs/plugins/scheduler/type-inference-test.js +0 -2
  108. package/ecs/plugins/scheduler/type-inference-test.js.map +0 -1
  109. package/ecs/store/entity-functions.d.ts +0 -7
  110. package/ecs/store/entity-functions.js +0 -2
  111. package/ecs/store/entity-functions.js.map +0 -1
  112. package/ecs/store/functions.d.ts +0 -2
  113. package/ecs/store/functions.js +0 -2
  114. package/ecs/store/functions.js.map +0 -1
  115. package/ecs/system/system-declaration.d.ts +0 -7
  116. package/ecs/system/system-declaration.js +0 -23
  117. package/ecs/system/system-declaration.js.map +0 -1
  118. package/ecs/system/system-declarations.d.ts +0 -4
  119. package/ecs/system/system-declarations.js +0 -23
  120. package/ecs/system/system-declarations.js.map +0 -1
  121. package/ecs/system/system-factory/public/create copy.d.ts +0 -12
  122. package/ecs/system/system-factory/public/create copy.js +0 -8
  123. package/ecs/system/system-factory/public/create copy.js.map +0 -1
  124. package/ecs/system/system-factory/public/create.d.ts +0 -12
  125. package/ecs/system/system-factory/public/create.js +0 -8
  126. package/ecs/system/system-factory/public/create.js.map +0 -1
  127. package/ecs/system/system-factory/public/create.test.d.ts +0 -1
  128. package/ecs/system/system-factory/public/create.test.js +0 -42
  129. package/ecs/system/system-factory/public/create.test.js.map +0 -1
  130. package/ecs/system/system-factory/public/index.d.ts +0 -1
  131. package/ecs/system/system-factory/public/index.js +0 -2
  132. package/ecs/system/system-factory/public/index.js.map +0 -1
  133. package/ecs/system/system-factory/system-factory.d.ts +0 -17
  134. package/ecs/system/system-factory/system-factory.js +0 -23
  135. package/ecs/system/system-factory/system-factory.js.map +0 -1
  136. package/ecs/system/system-factory.d.ts +0 -9
  137. package/ecs/system/system-factory.js +0 -23
  138. package/ecs/system/system-factory.js.map +0 -1
  139. package/ecs/system/system-interface.d.ts +0 -5
  140. package/ecs/system/system-interface.js +0 -2
  141. package/ecs/system/system-interface.js.map +0 -1
  142. package/ecs/system/system.d.ts +0 -4
  143. package/ecs/system/system.js +0 -23
  144. package/ecs/system/system.js.map +0 -1
  145. package/ecs/system/systems-type.d.ts +0 -2
  146. package/ecs/system/systems-type.js +0 -2
  147. package/ecs/system/systems-type.js.map +0 -1
  148. package/ecs/system/systems.d.ts +0 -2
  149. package/ecs/system/systems.js +0 -23
  150. package/ecs/system/systems.js.map +0 -1
  151. package/ecs/system/world-schema/public/create.d.ts +0 -12
  152. package/ecs/system/world-schema/public/create.js +0 -8
  153. package/ecs/system/world-schema/public/create.js.map +0 -1
  154. package/ecs/system/world-schema/public/create.test.d.ts +0 -1
  155. package/ecs/system/world-schema/public/create.test.js +0 -42
  156. package/ecs/system/world-schema/public/create.test.js.map +0 -1
  157. package/ecs/system/world-schema/public/index.d.ts +0 -1
  158. package/ecs/system/world-schema/public/index.js +0 -2
  159. package/ecs/system/world-schema/public/index.js.map +0 -1
  160. package/ecs/system/world-schema/system-factory.d.ts +0 -17
  161. package/ecs/system/world-schema/system-factory.js +0 -23
  162. package/ecs/system/world-schema/system-factory.js.map +0 -1
  163. package/ecs/world/calculate-system-order.d.ts +0 -18
  164. package/ecs/world/calculate-system-order.js +0 -113
  165. package/ecs/world/calculate-system-order.js.map +0 -1
  166. package/ecs/world/calculate-system-order.test.d.ts +0 -1
  167. package/ecs/world/calculate-system-order.test.js +0 -168
  168. package/ecs/world/calculate-system-order.test.js.map +0 -1
  169. package/ecs/world/create-world-schema-test.d.ts +0 -1
  170. package/ecs/world/create-world-schema-test.js +0 -294
  171. package/ecs/world/create-world-schema-test.js.map +0 -1
  172. package/ecs/world/create-world-type-test.d.ts +0 -1
  173. package/ecs/world/create-world-type-test.js +0 -129
  174. package/ecs/world/create-world-type-test.js.map +0 -1
  175. package/ecs/world/create-world.d.ts +0 -19
  176. package/ecs/world/create-world.js +0 -80
  177. package/ecs/world/create-world.js.map +0 -1
  178. package/ecs/world/create-world.test.d.ts +0 -1
  179. package/ecs/world/create-world.test.js +0 -292
  180. package/ecs/world/create-world.test.js.map +0 -1
  181. package/ecs/world/public/world-schema/public/create.d.ts +0 -12
  182. package/ecs/world/public/world-schema/public/create.js +0 -8
  183. package/ecs/world/public/world-schema/public/create.js.map +0 -1
  184. package/ecs/world/public/world-schema/public/create.test.d.ts +0 -1
  185. package/ecs/world/public/world-schema/public/create.test.js +0 -42
  186. package/ecs/world/public/world-schema/public/create.test.js.map +0 -1
  187. package/ecs/world/public/world-schema/public/index.d.ts +0 -1
  188. package/ecs/world/public/world-schema/public/index.js +0 -2
  189. package/ecs/world/public/world-schema/public/index.js.map +0 -1
  190. package/ecs/world/public/world-schema/world-schema.d.ts +0 -17
  191. package/ecs/world/public/world-schema/world-schema.js +0 -23
  192. package/ecs/world/public/world-schema/world-schema.js.map +0 -1
  193. package/ecs/world/system-declaration.d.ts +0 -1
  194. package/ecs/world/system-declaration.js +0 -23
  195. package/ecs/world/system-declaration.js.map +0 -1
  196. package/ecs/world/system-schedule-typing-test.d.ts +0 -1
  197. package/ecs/world/system-schedule-typing-test.js +0 -83
  198. package/ecs/world/system-schedule-typing-test.js.map +0 -1
  199. package/ecs/world/world-schema/public/create.d.ts +0 -12
  200. package/ecs/world/world-schema/public/create.js +0 -10
  201. package/ecs/world/world-schema/public/create.js.map +0 -1
  202. package/ecs/world/world-schema/public/create.test.d.ts +0 -1
  203. package/ecs/world/world-schema/public/create.test.js +0 -41
  204. package/ecs/world/world-schema/public/create.test.js.map +0 -1
  205. package/ecs/world/world-schema/public/index.d.ts +0 -1
  206. package/ecs/world/world-schema/public/index.js +0 -2
  207. package/ecs/world/world-schema/public/index.js.map +0 -1
  208. package/ecs/world/world-schema/system-factory.d.ts +0 -17
  209. package/ecs/world/world-schema/system-factory.js +0 -23
  210. package/ecs/world/world-schema/system-factory.js.map +0 -1
  211. package/ecs/world/world-schema/world-schema.d.ts +0 -19
  212. package/ecs/world/world-schema/world-schema.js +0 -23
  213. package/ecs/world/world-schema/world-schema.js.map +0 -1
  214. package/ecs/world/world.d.ts +0 -86
  215. package/ecs/world/world.js +0 -81
  216. package/ecs/world/world.js.map +0 -1
  217. package/ecs/world/world.test.d.ts +0 -1
  218. package/ecs/world/world.test.js +0 -176
  219. package/ecs/world/world.test.js.map +0 -1
  220. package/functions/package.json +0 -1
  221. package/lit/elements/application-element copy.d.ts +0 -9
  222. package/lit/elements/application-element copy.js +0 -62
  223. package/lit/elements/application-element copy.js.map +0 -1
  224. package/lit/package.json +0 -1
  225. package/math/package.json +0 -1
  226. package/observe/package.json +0 -1
  227. package/old-ecs/package.json +0 -1
  228. package/perftest/package.json +0 -1
  229. package/samples/package.json +0 -1
  230. package/schema/package.json +0 -1
  231. package/service/package.json +0 -1
  232. package/table/package.json +0 -1
  233. package/typed-buffer/package.json +0 -1
  234. package/types/package.json +0 -1
  235. /package/{debug-type-test.d.ts → ecs/database/create-plugin-type.type-test.d.ts} +0 -0
  236. /package/ecs/database/{create-database-schema-test.d.ts → create-plugin-type.type.test.d.ts} +0 -0
  237. /package/ecs/database/{create-plugin-v2.test.d.ts → experimental-action-types.d.ts} +0 -0
  238. /package/ecs/database/{database-with-systems.test.d.ts → from-plugin.type-test.d.ts} +0 -0
  239. /package/ecs/database/{database.plugin.create.test.OLD.d.ts → plugin-types.d.ts} +0 -0
  240. /package/ecs/database/{database.plugin.create.test.d.ts → type-investigation.test.d.ts} +0 -0
@@ -1,2 +0,0 @@
1
- export * from "./create.js";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/ecs/world/world-schema/public/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC"}
@@ -1,17 +0,0 @@
1
- import { FromSchemas } from "../../../schema/index.js";
2
- import { StringKeyof } from "../../../types/types.js";
3
- import { ArchetypeComponents, ComponentSchemas, Database, ResourceSchemas } from "../../index.js";
4
- import { ActionDeclarations, ToActionFunctions } from "../../store/action-functions.js";
5
- import { SystemDeclaration } from "../system-declaration.js";
6
- export * as SystemFactory from "./public/index.js";
7
- export type SystemDeclarations<S extends string> = {
8
- readonly [K in S]: SystemDeclaration<K>;
9
- };
10
- export type SystemFunctions<S extends string> = {
11
- readonly [K in S]: () => void;
12
- };
13
- export interface SystemFactory<C extends ComponentSchemas = never, R extends ResourceSchemas = never, A extends ArchetypeComponents<StringKeyof<C>> = never, T extends ActionDeclarations<FromSchemas<C>, FromSchemas<R>, A> = never, S extends string = never> {
14
- schema: Database.Schema<C, R, A, T>;
15
- systems: SystemDeclarations<S>;
16
- create(db: Database<FromSchemas<C>, FromSchemas<R>, A, ToActionFunctions<T>>): SystemFunctions<S>;
17
- }
@@ -1,23 +0,0 @@
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 * as SystemFactory from "./public/index.js";
23
- //# sourceMappingURL=system-factory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"system-factory.js","sourceRoot":"","sources":["../../../../src/ecs/world/world-schema/system-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAQX,OAAO,KAAK,aAAa,MAAM,mBAAmB,CAAC"}
@@ -1,19 +0,0 @@
1
- import { FromSchemas } from "../../../schema/index.js";
2
- import { StringKeyof } from "../../../types/types.js";
3
- import { ArchetypeComponents, ComponentSchemas, ResourceSchemas } from "../../index.js";
4
- import { ActionDeclarations } from "../../store/action-functions.js";
5
- import { SystemDeclaration } from "../system-declaration.js";
6
- export * as WorldSchema from "./public/index.js";
7
- export type SystemFunctions<S extends string> = {
8
- readonly [K in S]: () => void;
9
- };
10
- export type SystemNames = string;
11
- export interface WorldSchema<C extends ComponentSchemas = never, R extends ResourceSchemas = never, A extends ArchetypeComponents<StringKeyof<C>> = never, T extends ActionDeclarations<FromSchemas<C>, FromSchemas<R>, A> = never, S extends SystemNames = never> {
12
- components: C;
13
- resources: R;
14
- archetypes: A;
15
- transactions: T;
16
- systems: {
17
- readonly [K in S]: SystemDeclaration<K, C, R, A, T>;
18
- };
19
- }
@@ -1,23 +0,0 @@
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 * as WorldSchema from "./public/index.js";
23
- //# sourceMappingURL=world-schema.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"world-schema.js","sourceRoot":"","sources":["../../../../src/ecs/world/world-schema/world-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAQX,OAAO,KAAK,WAAW,MAAM,mBAAmB,CAAC"}
@@ -1,86 +0,0 @@
1
- import { FromSchemas } from "../../schema/index.js";
2
- import { IntersectTuple, NoInfer, StringKeyof } from "../../types/types.js";
3
- import { ArchetypeComponents, ComponentSchemas, Components, Database, OptionalComponents, ResourceComponents, ResourceSchemas } from "../index.js";
4
- import { ActionDeclarations, ActionFunctions, ToActionFunctions } from "../store/action-functions.js";
5
- type SystemFunction = () => void | Promise<void>;
6
- export interface World<C extends Components, R extends ResourceComponents, A extends ArchetypeComponents<StringKeyof<C & OptionalComponents>>, F extends ActionFunctions, SystemNames extends string> {
7
- readonly database: Database<C, R, A, F>;
8
- readonly system: {
9
- functions: {
10
- readonly [K in SystemNames]: SystemFunction;
11
- };
12
- order: SystemNames[][];
13
- };
14
- extend<S extends World.Schema<any, any, any, any, any>>(schema: S): World<C & (S extends World.Schema<infer XC, any, any, any, any> ? FromSchemas<XC> : never), R & (S extends World.Schema<any, infer XR, any, any, any> ? FromSchemas<XR> : never), A & (S extends World.Schema<any, any, infer XA, any, any> ? XA : never), F & (S extends World.Schema<any, any, any, infer XF, any> ? XF : never), SystemNames & (S extends World.Schema<any, any, any, any, infer XS> ? XS : never)>;
15
- }
16
- export declare namespace World {
17
- const create: any;
18
- interface Schema<C extends ComponentSchemas = any, R extends ResourceSchemas = any, A extends ArchetypeComponents<StringKeyof<C>> = any, T extends ActionDeclarations<FromSchemas<C>, FromSchemas<R>, A> = any, S extends string = any> {
19
- components: C;
20
- resources: R;
21
- archetypes: A;
22
- transactions: T;
23
- systems: {
24
- readonly [K in S]: {
25
- readonly create: (world: World<FromSchemas<C>, FromSchemas<R>, A, ToActionFunctions<T>, S>) => SystemFunction;
26
- readonly schedule?: {
27
- readonly before?: readonly NoInfer<Exclude<S, K>>[];
28
- readonly after?: readonly NoInfer<Exclude<S, K>>[];
29
- };
30
- };
31
- };
32
- }
33
- namespace Schema {
34
- type Intersect<T extends readonly Schema<any, any, any, any, any>[]> = World.Schema<{} & IntersectTuple<{
35
- [K in keyof T]: T[K] extends Schema<infer C, any, any, any, any> ? C : never;
36
- }>, {} & IntersectTuple<{
37
- [K in keyof T]: T[K] extends Schema<any, infer R, any, any, any> ? R : never;
38
- }>, {} & IntersectTuple<{
39
- [K in keyof T]: T[K] extends Schema<any, any, infer A, any, any> ? A : never;
40
- }>, {} & IntersectTuple<{
41
- [K in keyof T]: T[K] extends Schema<any, any, any, infer TD, any> ? TD : never;
42
- }>, Extract<{
43
- [K in keyof T]: T[K] extends Schema<any, any, any, any, infer S> ? S : never;
44
- }[number], string>>;
45
- /**
46
- * Creates a World schema with optional properties. All schema properties
47
- * (components, resources, archetypes, transactions, systems) are optional
48
- * and default to empty objects when not provided.
49
- *
50
- * @param schema - Partial world schema. Omit any properties you don't need.
51
- * @param dependencies - Optional array of schemas to merge with. Properties from
52
- * dependencies are merged with the schema, with schema properties
53
- * taking precedence.
54
- * @returns The merged schema with all properties from the schema and dependencies
55
- *
56
- * @example
57
- * ```typescript
58
- * // Minimal schema with only systems
59
- * const schema = World.Schema.create({
60
- * systems: {
61
- * renderSystem: {
62
- * create: (world) => () => {
63
- * // Access database
64
- * const entities = world.database.select(["position"]);
65
- * world.database.transactions.updatePositions();
66
- *
67
- * // Access other systems
68
- * world.system.functions.physicsSystem();
69
- *
70
- * // Check execution order
71
- * console.log(world.system.order);
72
- * }
73
- * }
74
- * }
75
- * });
76
- *
77
- * // Schema with dependencies
78
- * const extended = World.Schema.create({
79
- * components: { velocity: { type: "number" } }
80
- * }, [baseSchema]);
81
- * ```
82
- */
83
- function create<const C extends ComponentSchemas = {}, const R extends ResourceSchemas = {}, const A extends ArchetypeComponents<StringKeyof<C & Intersect<D>["components"]>> = {}, const T extends ActionDeclarations<FromSchemas<C & Intersect<D>["components"]>, FromSchemas<R & Intersect<D>["resources"]>, A> = {}, const S extends string = never, const D extends readonly World.Schema<any, any, any, any, any>[] = []>(schema: Partial<World.Schema<C, R, A, T, S>>, dependencies?: D): Intersect<[World.Schema<C, R, A, T, S>, ...D]>;
84
- }
85
- }
86
- export {};
@@ -1,81 +0,0 @@
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 { createWorld } from "./create-world.js";
23
- export var World;
24
- (function (World) {
25
- World.create = createWorld;
26
- let Schema;
27
- (function (Schema) {
28
- /**
29
- * Creates a World schema with optional properties. All schema properties
30
- * (components, resources, archetypes, transactions, systems) are optional
31
- * and default to empty objects when not provided.
32
- *
33
- * @param schema - Partial world schema. Omit any properties you don't need.
34
- * @param dependencies - Optional array of schemas to merge with. Properties from
35
- * dependencies are merged with the schema, with schema properties
36
- * taking precedence.
37
- * @returns The merged schema with all properties from the schema and dependencies
38
- *
39
- * @example
40
- * ```typescript
41
- * // Minimal schema with only systems
42
- * const schema = World.Schema.create({
43
- * systems: {
44
- * renderSystem: {
45
- * create: (world) => () => {
46
- * // Access database
47
- * const entities = world.database.select(["position"]);
48
- * world.database.transactions.updatePositions();
49
- *
50
- * // Access other systems
51
- * world.system.functions.physicsSystem();
52
- *
53
- * // Check execution order
54
- * console.log(world.system.order);
55
- * }
56
- * }
57
- * }
58
- * });
59
- *
60
- * // Schema with dependencies
61
- * const extended = World.Schema.create({
62
- * components: { velocity: { type: "number" } }
63
- * }, [baseSchema]);
64
- * ```
65
- */
66
- function create(schema, dependencies) {
67
- const { components = {}, resources = {}, archetypes = {}, transactions = {}, systems = {} } = schema;
68
- return (dependencies ?? []).reduce((acc, curr) => {
69
- return {
70
- components: { ...acc.components, ...curr.components },
71
- resources: { ...acc.resources, ...curr.resources },
72
- archetypes: { ...acc.archetypes, ...curr.archetypes },
73
- transactions: { ...acc.transactions, ...curr.transactions },
74
- systems: { ...acc.systems, ...curr.systems },
75
- };
76
- }, { components, resources, archetypes, transactions, systems });
77
- }
78
- Schema.create = create;
79
- })(Schema = World.Schema || (World.Schema = {}));
80
- })(World || (World = {}));
81
- //# sourceMappingURL=world.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"world.js","sourceRoot":"","sources":["../../../src/ecs/world/world.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAQX,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA2Bh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/*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 { describe, it, expect } from "vitest";
23
- import { World } from "./world.js";
24
- describe("World.Schema.create", () => {
25
- describe("partial schema creation", () => {
26
- it("should create a schema with all properties defaulting to empty objects when given empty schema", () => {
27
- const schema = World.Schema.create({});
28
- expect(schema.components).toEqual({});
29
- expect(schema.resources).toEqual({});
30
- expect(schema.archetypes).toEqual({});
31
- expect(schema.transactions).toEqual({});
32
- expect(schema.systems).toEqual({});
33
- });
34
- it("should create a schema with components and default empty objects for other properties when given only components", () => {
35
- const schema = World.Schema.create({
36
- components: {
37
- position: { type: "number" },
38
- velocity: { type: "number" }
39
- }
40
- });
41
- expect(schema.components).toHaveProperty("position");
42
- expect(schema.components).toHaveProperty("velocity");
43
- expect(Object.keys(schema.resources)).toHaveLength(0);
44
- expect(Object.keys(schema.archetypes)).toHaveLength(0);
45
- expect(Object.keys(schema.transactions)).toHaveLength(0);
46
- expect(Object.keys(schema.systems)).toHaveLength(0);
47
- });
48
- it("should create a schema with systems and default empty objects for other properties when given only systems", () => {
49
- const testSystem = () => () => { };
50
- const schema = World.Schema.create({
51
- systems: {
52
- renderSystem: {
53
- create: testSystem
54
- }
55
- }
56
- });
57
- expect(schema.systems).toHaveProperty("renderSystem");
58
- expect(schema.systems.renderSystem?.create).toBe(testSystem);
59
- expect(Object.keys(schema.components)).toHaveLength(0);
60
- expect(Object.keys(schema.resources)).toHaveLength(0);
61
- expect(Object.keys(schema.archetypes)).toHaveLength(0);
62
- expect(Object.keys(schema.transactions)).toHaveLength(0);
63
- });
64
- it("should create a schema with specified properties and defaults for omitted ones when given multiple partial properties", () => {
65
- const schema = World.Schema.create({
66
- components: {
67
- health: { type: "number" }
68
- },
69
- resources: {
70
- time: { default: 0 }
71
- },
72
- systems: {
73
- updateSystem: {
74
- create: (world) => () => { }
75
- }
76
- }
77
- });
78
- expect(schema.components).toHaveProperty("health");
79
- expect(schema.resources).toHaveProperty("time");
80
- expect(schema.systems).toHaveProperty("updateSystem");
81
- expect(Object.keys(schema.archetypes)).toHaveLength(0);
82
- expect(Object.keys(schema.transactions)).toHaveLength(0);
83
- });
84
- });
85
- describe("schema merging with dependencies", () => {
86
- it("should merge both schemas with all properties preserved when given partial schema with dependencies", () => {
87
- const baseSchema = World.Schema.create({
88
- components: {
89
- position: { type: "number" }
90
- },
91
- resources: {
92
- time: { default: 0 }
93
- }
94
- });
95
- const extendedSchema = World.Schema.create({
96
- components: {
97
- velocity: { type: "number" }
98
- }
99
- }, [baseSchema]);
100
- expect(extendedSchema.components).toHaveProperty("position");
101
- expect(extendedSchema.components).toHaveProperty("velocity");
102
- expect(extendedSchema.resources).toHaveProperty("time");
103
- expect(Object.keys(extendedSchema.components)).toHaveLength(2);
104
- expect(Object.keys(extendedSchema.resources)).toHaveLength(1);
105
- });
106
- it("should create a schema containing only the dependency properties when given empty schema with dependencies", () => {
107
- const baseSchema = World.Schema.create({
108
- components: {
109
- transform: { type: "number" }
110
- },
111
- systems: {
112
- baseSystem: {
113
- create: (world) => () => { }
114
- }
115
- }
116
- });
117
- const emptyExtension = World.Schema.create({}, [baseSchema]);
118
- expect(emptyExtension.components).toHaveProperty("transform");
119
- expect(emptyExtension.systems).toHaveProperty("baseSystem");
120
- expect(Object.keys(emptyExtension.components)).toHaveLength(1);
121
- expect(Object.keys(emptyExtension.systems)).toHaveLength(1);
122
- });
123
- it("should merge all schemas together with properties from all dependencies when given multiple dependencies", () => {
124
- const schemaA = World.Schema.create({
125
- components: { a: { type: "number" } }
126
- });
127
- const schemaB = World.Schema.create({
128
- components: { b: { type: "number" } }
129
- });
130
- const schemaC = World.Schema.create({
131
- components: { c: { type: "number" } }
132
- });
133
- const merged = World.Schema.create({
134
- components: { d: { type: "number" } }
135
- }, [schemaA, schemaB, schemaC]);
136
- expect(merged.components).toHaveProperty("a");
137
- expect(merged.components).toHaveProperty("b");
138
- expect(merged.components).toHaveProperty("c");
139
- expect(merged.components).toHaveProperty("d");
140
- expect(Object.keys(merged.components)).toHaveLength(4);
141
- });
142
- });
143
- describe("edge cases", () => {
144
- it("should create a valid schema with empty systems object when S = never (no systems type)", () => {
145
- const schema = World.Schema.create({
146
- components: {
147
- test: { type: "number" }
148
- }
149
- });
150
- expect(typeof schema.systems).toBe("object");
151
- expect(schema.systems).not.toBeNull();
152
- expect(Object.keys(schema.systems)).toHaveLength(0);
153
- expect(schema.components).toHaveProperty("test");
154
- });
155
- it("should merge schemas with dependencies taking precedence for overlapping properties", () => {
156
- const baseSchema = World.Schema.create({
157
- components: {
158
- position: { type: "number" },
159
- velocity: { type: "number" }
160
- }
161
- });
162
- const extendedSchema = World.Schema.create({
163
- components: {
164
- position: { type: "number" },
165
- mass: { type: "number" }
166
- }
167
- }, [baseSchema]);
168
- // All components should be present
169
- expect(extendedSchema.components).toHaveProperty("position");
170
- expect(extendedSchema.components).toHaveProperty("velocity");
171
- expect(extendedSchema.components).toHaveProperty("mass");
172
- expect(Object.keys(extendedSchema.components)).toHaveLength(3);
173
- });
174
- });
175
- });
176
- //# sourceMappingURL=world.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"world.test.js","sourceRoot":"","sources":["../../../src/ecs/world/world.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACjC,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACrC,EAAE,CAAC,gGAAgG,EAAE,GAAG,EAAE;YACtG,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;YAEvC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACtC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACrC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACtC,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;YACxC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,kHAAkH,EAAE,GAAG,EAAE;YACxH,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;gBAC/B,UAAU,EAAE;oBACR,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC5B,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iBAC/B;aACJ,CAAC,CAAC;YAEH,MAAM,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Q,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC5B,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iBAC/B;aACJ,CAAC,CAAC;YAEH,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC;gBACvC,UAAU,EAAE;oBACR,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iBAC3B;aACJ,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;YAEjB,mCAAmC;YACnC,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;YAC7D,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC;YAC7D,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;YACzD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC;QACnE,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"type":"module","main":"./index.js","types":"./index.d.ts","exports":{".": {"import":"./index.js","types":"./index.d.ts"}}}
@@ -1,9 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import { Service } from '../../service/index.js';
3
- export declare class ApplicationElement<MainService extends Service> extends LitElement {
4
- service: MainService;
5
- constructor();
6
- connectedCallback(): void;
7
- protected findAncestorService(): MainService | void;
8
- render(): void;
9
- }
@@ -1,62 +0,0 @@
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
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
23
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
24
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
25
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
26
- return c > 3 && r && Object.defineProperty(target, key, r), r;
27
- };
28
- import { LitElement } from 'lit';
29
- import { property } from 'lit/decorators.js';
30
- import { attachDecorator, withHooks } from '../hooks/index.js';
31
- import { iterateSelfAndAncestors } from '../functions/index.js';
32
- import { isService } from '../../service/index.js';
33
- export class ApplicationElement extends LitElement {
34
- constructor() {
35
- super();
36
- attachDecorator(this, 'render', withHooks);
37
- }
38
- connectedCallback() {
39
- super.connectedCallback();
40
- if (!this.service) {
41
- const service = this.findAncestorService();
42
- if (service) {
43
- this.service = service;
44
- }
45
- }
46
- }
47
- findAncestorService() {
48
- for (const element of iterateSelfAndAncestors(this)) {
49
- const { service } = element;
50
- if (isService(service)) {
51
- return service;
52
- }
53
- }
54
- }
55
- render() {
56
- throw new Error('render function must be overridden');
57
- }
58
- }
59
- __decorate([
60
- property({ type: Object, reflect: false })
61
- ], ApplicationElement.prototype, "service", void 0);
62
- //# sourceMappingURL=application-element%20copy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"application-element copy.js","sourceRoot":"","sources":["../../../src/lit/elements/application-element copy.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;;;;;;;AAEX,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAW,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,OAAO,kBAAgD,SAAQ,UAAU;IAI7E;QACE,KAAK,EAAE,CAAC;QACR,eAAe,CAAC,IAAI,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC7C,CAAC;IAED,iBAAiB;QACf,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAE1B,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,MAAM,OAAO,GAAG,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC3C,IAAI,OAAO,EAAE,CAAC;gBACZ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACzB,CAAC;QACH,CAAC;IACH,CAAC;IAES,mBAAmB;QAC3B,KAAK,MAAM,OAAO,IAAI,uBAAuB,CAAC,IAAI,CAAC,EAAE,CAAC;YACpD,MAAM,EAAE,OAAO,EAAE,GAAG,OAAmD,CAAC;YACxE,IAAI,SAAS,CAAC,OAAO,CAAC,EAAE,CAAC;gBACvB,OAAO,OAAO,CAAC;YACjB,CAAC;QACH,CAAC;IACH,CAAC;IAEe,MAAM;QACpB,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;IACxD,CAAC;CAEF;AA/BC;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;mDACrB"}
package/lit/package.json DELETED
@@ -1 +0,0 @@
1
- {"type":"module","main":"./index.js","types":"./index.d.ts","exports":{".": {"import":"./index.js","types":"./index.d.ts"}}}
package/math/package.json DELETED
@@ -1 +0,0 @@
1
- {"type":"module","main":"./index.js","types":"./index.d.ts","exports":{".": {"import":"./index.js","types":"./index.d.ts"}}}
@@ -1 +0,0 @@
1
- {"type":"module","main":"./index.js","types":"./index.d.ts","exports":{".": {"import":"./index.js","types":"./index.d.ts"}}}
@@ -1 +0,0 @@
1
- {"type":"module","main":"./index.js","types":"./index.d.ts","exports":{".": {"import":"./index.js","types":"./index.d.ts"}}}
@@ -1 +0,0 @@
1
- {"type":"module","main":"./index.js","types":"./index.d.ts","exports":{".": {"import":"./index.js","types":"./index.d.ts"}}}
@@ -1 +0,0 @@
1
- {"type":"module","main":"./index.js","types":"./index.d.ts","exports":{".": {"import":"./index.js","types":"./index.d.ts"}}}
@@ -1 +0,0 @@
1
- {"type":"module","main":"./index.js","types":"./index.d.ts","exports":{".": {"import":"./index.js","types":"./index.d.ts"}}}
@@ -1 +0,0 @@
1
- {"type":"module","main":"./index.js","types":"./index.d.ts","exports":{".": {"import":"./index.js","types":"./index.d.ts"}}}
@@ -1 +0,0 @@
1
- {"type":"module","main":"./index.js","types":"./index.d.ts","exports":{".": {"import":"./index.js","types":"./index.d.ts"}}}
@@ -1 +0,0 @@
1
- {"type":"module","main":"./index.js","types":"./index.d.ts","exports":{".": {"import":"./index.js","types":"./index.d.ts"}}}
@@ -1 +0,0 @@
1
- {"type":"module","main":"./index.js","types":"./index.d.ts","exports":{".": {"import":"./index.js","types":"./index.d.ts"}}}