@adobe/data 0.5.1 → 0.5.3

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 (353) hide show
  1. package/dist/blob/blob-handle.d.ts +29 -0
  2. package/dist/blob/blob-handle.js +11 -0
  3. package/dist/blob/blob-handle.js.map +1 -0
  4. package/dist/blob/blob-meta.d.ts +23 -0
  5. package/dist/blob/blob-meta.js +12 -0
  6. package/dist/blob/blob-meta.js.map +1 -0
  7. package/dist/blob/download-handle.d.ts +4 -0
  8. package/dist/blob/download-handle.js +2 -0
  9. package/dist/blob/download-handle.js.map +1 -0
  10. package/dist/blob/index.d.ts +4 -0
  11. package/dist/blob/index.js +5 -0
  12. package/dist/blob/index.js.map +1 -0
  13. package/dist/blob/upload-handle.d.ts +4 -0
  14. package/dist/blob/upload-handle.js +2 -0
  15. package/dist/blob/upload-handle.js.map +1 -0
  16. package/dist/ecs/store/create-store.test.js +13 -0
  17. package/dist/ecs/store/create-store.test.js.map +1 -1
  18. package/dist/schema/schema.d.ts +8 -12
  19. package/dist/schema/schema.js.map +1 -1
  20. package/dist/service/is-service.js +1 -2
  21. package/dist/service/is-service.js.map +1 -1
  22. package/dist/service/progressive-result.d.ts +5 -6
  23. package/dist/service/progressive-result.js.map +1 -1
  24. package/dist/services/add-observable-actions.d.ts +29 -0
  25. package/dist/services/add-observable-actions.js +108 -0
  26. package/dist/services/add-observable-actions.js.map +1 -0
  27. package/dist/services/index.d.ts +4 -0
  28. package/dist/{core → services}/index.js +3 -3
  29. package/dist/services/index.js.map +1 -0
  30. package/dist/services/is-service.d.ts +2 -0
  31. package/dist/{cache/functions/omit.js → services/is-service.js} +3 -7
  32. package/dist/services/is-service.js.map +1 -0
  33. package/dist/services/progressive-result.d.ts +96 -0
  34. package/dist/services/progressive-result.js +99 -0
  35. package/dist/services/progressive-result.js.map +1 -0
  36. package/dist/services/service.d.ts +4 -0
  37. package/dist/{cache/functions/types.js → services/service.js} +1 -1
  38. package/dist/services/service.js.map +1 -0
  39. package/dist/tsconfig.tsbuildinfo +1 -1
  40. package/dist/typed-buffer/structs/get-struct-layout.js +3 -3
  41. package/dist/typed-buffer/structs/get-struct-layout.js.map +1 -1
  42. package/dist/types/index.d.ts +1 -0
  43. package/dist/types/index.js +1 -0
  44. package/dist/types/index.js.map +1 -1
  45. package/dist/types/replace.d.ts +7 -0
  46. package/dist/types/replace.js +5 -0
  47. package/dist/types/replace.js.map +1 -0
  48. package/package.json +8 -1
  49. package/dist/README.md +0 -310
  50. package/dist/cache/functions/bind-functions.d.ts +0 -6
  51. package/dist/cache/functions/bind-functions.js +0 -33
  52. package/dist/cache/functions/bind-functions.js.map +0 -1
  53. package/dist/cache/functions/hashing/arrayBufferToHex.d.ts +0 -1
  54. package/dist/cache/functions/hashing/arrayBufferToHex.js +0 -27
  55. package/dist/cache/functions/hashing/arrayBufferToHex.js.map +0 -1
  56. package/dist/cache/functions/omit.d.ts +0 -1
  57. package/dist/cache/functions/omit.js.map +0 -1
  58. package/dist/cache/functions/types.d.ts +0 -1
  59. package/dist/cache/functions/types.js.map +0 -1
  60. package/dist/core/data.d.ts +0 -22
  61. package/dist/core/data.js +0 -52
  62. package/dist/core/data.js.map +0 -1
  63. package/dist/core/data.test.d.ts +0 -1
  64. package/dist/core/data.test.js +0 -48
  65. package/dist/core/data.test.js.map +0 -1
  66. package/dist/core/functions/array-equals.d.ts +0 -1
  67. package/dist/core/functions/array-equals.js +0 -34
  68. package/dist/core/functions/array-equals.js.map +0 -1
  69. package/dist/core/functions/deep-merge.d.ts +0 -32
  70. package/dist/core/functions/deep-merge.js +0 -54
  71. package/dist/core/functions/deep-merge.js.map +0 -1
  72. package/dist/core/functions/deep-merge.test.d.ts +0 -1
  73. package/dist/core/functions/deep-merge.test.js +0 -94
  74. package/dist/core/functions/deep-merge.test.js.map +0 -1
  75. package/dist/core/functions/index.d.ts +0 -3
  76. package/dist/core/functions/index.js +0 -25
  77. package/dist/core/functions/index.js.map +0 -1
  78. package/dist/core/functions/is-async-generator.d.ts +0 -1
  79. package/dist/core/functions/is-async-generator.js +0 -25
  80. package/dist/core/functions/is-async-generator.js.map +0 -1
  81. package/dist/core/functions/is-promise.d.ts +0 -1
  82. package/dist/core/functions/is-promise.js +0 -26
  83. package/dist/core/functions/is-promise.js.map +0 -1
  84. package/dist/core/functions/with-validation.d.ts +0 -5
  85. package/dist/core/functions/with-validation.js +0 -38
  86. package/dist/core/functions/with-validation.js.map +0 -1
  87. package/dist/core/functions/with-validation.test.d.ts +0 -1
  88. package/dist/core/functions/with-validation.test.js +0 -96
  89. package/dist/core/functions/with-validation.test.js.map +0 -1
  90. package/dist/core/index.d.ts +0 -3
  91. package/dist/core/index.js.map +0 -1
  92. package/dist/core/schema/dynamic/dynamic-schema.d.ts +0 -27
  93. package/dist/core/schema/dynamic/dynamic-schema.js +0 -2
  94. package/dist/core/schema/dynamic/dynamic-schema.js.map +0 -1
  95. package/dist/core/schema/dynamic/enumerate-patches.d.ts +0 -9
  96. package/dist/core/schema/dynamic/enumerate-patches.js +0 -50
  97. package/dist/core/schema/dynamic/enumerate-patches.js.map +0 -1
  98. package/dist/core/schema/dynamic/enumerate-patches.test.d.ts +0 -134
  99. package/dist/core/schema/dynamic/enumerate-patches.test.js +0 -209
  100. package/dist/core/schema/dynamic/enumerate-patches.test.js.map +0 -1
  101. package/dist/core/schema/dynamic/get-dynamic-schema.d.ts +0 -5
  102. package/dist/core/schema/dynamic/get-dynamic-schema.js +0 -26
  103. package/dist/core/schema/dynamic/get-dynamic-schema.js.map +0 -1
  104. package/dist/core/schema/dynamic/get-dynamic-schema.test.d.ts +0 -1
  105. package/dist/core/schema/dynamic/get-dynamic-schema.test.js +0 -94
  106. package/dist/core/schema/dynamic/get-dynamic-schema.test.js.map +0 -1
  107. package/dist/core/schema/dynamic/index.d.ts +0 -1
  108. package/dist/core/schema/dynamic/index.js +0 -2
  109. package/dist/core/schema/dynamic/index.js.map +0 -1
  110. package/dist/core/schema/dynamic/schema-path-value-path.d.ts +0 -5
  111. package/dist/core/schema/dynamic/schema-path-value-path.js +0 -12
  112. package/dist/core/schema/dynamic/schema-path-value-path.js.map +0 -1
  113. package/dist/core/schema/dynamic-schema.d.ts +0 -27
  114. package/dist/core/schema/dynamic-schema.js +0 -2
  115. package/dist/core/schema/dynamic-schema.js.map +0 -1
  116. package/dist/core/schema/index.d.ts +0 -4
  117. package/dist/core/schema/index.js +0 -26
  118. package/dist/core/schema/index.js.map +0 -1
  119. package/dist/core/schema/schema.d.ts +0 -122
  120. package/dist/core/schema/schema.js +0 -34
  121. package/dist/core/schema/schema.js.map +0 -1
  122. package/dist/core/schema/schemas.d.ts +0 -45
  123. package/dist/core/schema/schemas.js +0 -39
  124. package/dist/core/schema/schemas.js.map +0 -1
  125. package/dist/core/schema/ui-schema.d.ts +0 -25
  126. package/dist/core/schema/ui-schema.js +0 -2
  127. package/dist/core/schema/ui-schema.js.map +0 -1
  128. package/dist/core/schema/validation/is-valid.d.ts +0 -2
  129. package/dist/core/schema/validation/is-valid.js +0 -14
  130. package/dist/core/schema/validation/is-valid.js.map +0 -1
  131. package/dist/core/schema/validation/is-valid.test.d.ts +0 -1
  132. package/dist/core/schema/validation/is-valid.test.js +0 -40
  133. package/dist/core/schema/validation/is-valid.test.js.map +0 -1
  134. package/dist/core/schema/validation/validate.d.ts +0 -2
  135. package/dist/core/schema/validation/validate.js +0 -38
  136. package/dist/core/schema/validation/validate.js.map +0 -1
  137. package/dist/core/schema/validation/validate.test.d.ts +0 -1
  138. package/dist/core/schema/validation/validate.test.js +0 -106
  139. package/dist/core/schema/validation/validate.test.js.map +0 -1
  140. package/dist/core/schema/validation/with-validation.d.ts +0 -5
  141. package/dist/core/schema/validation/with-validation.js +0 -16
  142. package/dist/core/schema/validation/with-validation.js.map +0 -1
  143. package/dist/core/schema/validation/with-validation.test.d.ts +0 -1
  144. package/dist/core/schema/validation/with-validation.test.js +0 -96
  145. package/dist/core/schema/validation/with-validation.test.js.map +0 -1
  146. package/dist/core/schema.d.ts +0 -86
  147. package/dist/core/schema.js +0 -33
  148. package/dist/core/schema.js.map +0 -1
  149. package/dist/core/schema.test.d.ts +0 -1
  150. package/dist/core/schema.test.js +0 -16
  151. package/dist/core/schema.test.js.map +0 -1
  152. package/dist/core/schemas.d.ts +0 -45
  153. package/dist/core/schemas.js +0 -39
  154. package/dist/core/schemas.js.map +0 -1
  155. package/dist/ecs/action-ecs/action-ecs.d.ts +0 -19
  156. package/dist/ecs/action-ecs/action-ecs.js +0 -203
  157. package/dist/ecs/action-ecs/action-ecs.js.map +0 -1
  158. package/dist/ecs/action-ecs/action-ecs.test.d.ts +0 -1
  159. package/dist/ecs/action-ecs/action-ecs.test.js +0 -362
  160. package/dist/ecs/action-ecs/action-ecs.test.js.map +0 -1
  161. package/dist/ecs/action-ecs/action-types.d.ts +0 -106
  162. package/dist/ecs/action-ecs/action-types.js +0 -19
  163. package/dist/ecs/action-ecs/action-types.js.map +0 -1
  164. package/dist/ecs/action-ecs/index.d.ts +0 -2
  165. package/dist/ecs/action-ecs/index.js +0 -23
  166. package/dist/ecs/action-ecs/index.js.map +0 -1
  167. package/dist/ecs/core-ecs/core-ecs-serialization.test.d.ts +0 -1
  168. package/dist/ecs/core-ecs/core-ecs-serialization.test.js +0 -230
  169. package/dist/ecs/core-ecs/core-ecs-serialization.test.js.map +0 -1
  170. package/dist/ecs/core-ecs/core-ecs-types.d.ts +0 -141
  171. package/dist/ecs/core-ecs/core-ecs-types.js +0 -23
  172. package/dist/ecs/core-ecs/core-ecs-types.js.map +0 -1
  173. package/dist/ecs/core-ecs/core-ecs.d.ts +0 -7
  174. package/dist/ecs/core-ecs/core-ecs.js +0 -492
  175. package/dist/ecs/core-ecs/core-ecs.js.map +0 -1
  176. package/dist/ecs/core-ecs/core-ecs.test.d.ts +0 -1
  177. package/dist/ecs/core-ecs/core-ecs.test.js +0 -425
  178. package/dist/ecs/core-ecs/core-ecs.test.js.map +0 -1
  179. package/dist/ecs/core-ecs/index.d.ts +0 -1
  180. package/dist/ecs/core-ecs/index.js +0 -2
  181. package/dist/ecs/core-ecs/index.js.map +0 -1
  182. package/dist/ecs/database/database-schema/create-database-schema-test.d.ts +0 -1
  183. package/dist/ecs/database/database-schema/create-database-schema-test.js +0 -42
  184. package/dist/ecs/database/database-schema/create-database-schema-test.js.map +0 -1
  185. package/dist/ecs/database/database-schema/create-database-schema.d.ts +0 -12
  186. package/dist/ecs/database/database-schema/create-database-schema.js +0 -26
  187. package/dist/ecs/database/database-schema/create-database-schema.js.map +0 -1
  188. package/dist/ecs/database/database-schema/database-schema.d.ts +0 -15
  189. package/dist/ecs/database/database-schema/database-schema.js +0 -23
  190. package/dist/ecs/database/database-schema/database-schema.js.map +0 -1
  191. package/dist/ecs/database/database-schema/index.d.ts +0 -2
  192. package/dist/ecs/database/database-schema/index.js +0 -24
  193. package/dist/ecs/database/database-schema/index.js.map +0 -1
  194. package/dist/ecs/database/register-database-codec.d.ts +0 -1
  195. package/dist/ecs/database/register-database-codec.js +0 -35
  196. package/dist/ecs/database/register-database-codec.js.map +0 -1
  197. package/dist/ecs/database/register-database-codecs.d.ts +0 -1
  198. package/dist/ecs/database/register-database-codecs.js +0 -35
  199. package/dist/ecs/database/register-database-codecs.js.map +0 -1
  200. package/dist/ecs/database/register-store-codec.d.ts +0 -1
  201. package/dist/ecs/database/register-store-codec.js +0 -35
  202. package/dist/ecs/database/register-store-codec.js.map +0 -1
  203. package/dist/ecs/database/register-typed-buffer-codecs.d.ts +0 -1
  204. package/dist/ecs/database/register-typed-buffer-codecs.js +0 -80
  205. package/dist/ecs/database/register-typed-buffer-codecs.js.map +0 -1
  206. package/dist/ecs/database/transactional-store/apply-write-operations.d.ts +0 -7
  207. package/dist/ecs/database/transactional-store/apply-write-operations.js +0 -20
  208. package/dist/ecs/database/transactional-store/apply-write-operations.js.map +0 -1
  209. package/dist/ecs/database/transactional-store/applyWriteOperations.d.ts +0 -7
  210. package/dist/ecs/database/transactional-store/applyWriteOperations.js +0 -20
  211. package/dist/ecs/database/transactional-store/applyWriteOperations.js.map +0 -1
  212. package/dist/ecs/database/transactional-store/create-test-transaction.d.ts +0 -7
  213. package/dist/ecs/database/transactional-store/create-test-transaction.js +0 -7
  214. package/dist/ecs/database/transactional-store/create-test-transaction.js.map +0 -1
  215. package/dist/ecs/database/transactional-store/patch.d.ts +0 -3
  216. package/dist/ecs/database/transactional-store/patch.js +0 -7
  217. package/dist/ecs/database/transactional-store/patch.js.map +0 -1
  218. package/dist/ecs/database/transactional-store/undoable.d.ts +0 -13
  219. package/dist/ecs/database/transactional-store/undoable.js +0 -23
  220. package/dist/ecs/database/transactional-store/undoable.js.map +0 -1
  221. package/dist/ecs/database/transactional-store/with-undoable.d.ts +0 -10
  222. package/dist/ecs/database/transactional-store/with-undoable.js +0 -13
  223. package/dist/ecs/database/transactional-store/with-undoable.js.map +0 -1
  224. package/dist/ecs/database/with-undoable.d.ts +0 -10
  225. package/dist/ecs/database/with-undoable.js +0 -13
  226. package/dist/ecs/database/with-undoable.js.map +0 -1
  227. package/dist/ecs/ecs/ecs-types.d.ts +0 -132
  228. package/dist/ecs/ecs/ecs-types.js +0 -23
  229. package/dist/ecs/ecs/ecs-types.js.map +0 -1
  230. package/dist/ecs/ecs/ecs-where-functions.d.ts +0 -6
  231. package/dist/ecs/ecs/ecs-where-functions.js +0 -91
  232. package/dist/ecs/ecs/ecs-where-functions.js.map +0 -1
  233. package/dist/ecs/ecs/ecs.d.ts +0 -13
  234. package/dist/ecs/ecs/ecs.js +0 -177
  235. package/dist/ecs/ecs/ecs.js.map +0 -1
  236. package/dist/ecs/ecs/ecs.test.d.ts +0 -1
  237. package/dist/ecs/ecs/ecs.test.js +0 -399
  238. package/dist/ecs/ecs/ecs.test.js.map +0 -1
  239. package/dist/ecs/ecs/index.d.ts +0 -3
  240. package/dist/ecs/ecs/index.js +0 -3
  241. package/dist/ecs/ecs/index.js.map +0 -1
  242. package/dist/ecs/entity-location-table/register-database-codec.d.ts +0 -1
  243. package/dist/ecs/entity-location-table/register-database-codec.js +0 -35
  244. package/dist/ecs/entity-location-table/register-database-codec.js.map +0 -1
  245. package/dist/ecs/entity-location-table/register-entity-location-table-codec.d.ts +0 -1
  246. package/dist/ecs/entity-location-table/register-entity-location-table-codec.js +0 -42
  247. package/dist/ecs/entity-location-table/register-entity-location-table-codec.js.map +0 -1
  248. package/dist/ecs/entity-location-table/register-entity-location-table-codec.test.d.ts +0 -1
  249. package/dist/ecs/entity-location-table/register-entity-location-table-codec.test.js +0 -70
  250. package/dist/ecs/entity-location-table/register-entity-location-table-codec.test.js.map +0 -1
  251. package/dist/ecs/persistence-service/create-persistence-service.d.ts +0 -6
  252. package/dist/ecs/persistence-service/create-persistence-service.js +0 -24
  253. package/dist/ecs/persistence-service/create-persistence-service.js.map +0 -1
  254. package/dist/ecs/persistence-service/create-session-persistence-service.d.ts +0 -8
  255. package/dist/ecs/persistence-service/create-session-persistence-service.js +0 -49
  256. package/dist/ecs/persistence-service/create-session-persistence-service.js.map +0 -1
  257. package/dist/ecs/persistence-service/persistence-service copy.d.ts +0 -5
  258. package/dist/ecs/persistence-service/persistence-service copy.js +0 -2
  259. package/dist/ecs/persistence-service/persistence-service copy.js.map +0 -1
  260. package/dist/ecs/persistence-service/to-blob-refs.d.ts +0 -2
  261. package/dist/ecs/persistence-service/to-blob-refs.js +0 -3
  262. package/dist/ecs/persistence-service/to-blob-refs.js.map +0 -1
  263. package/dist/ecs/persistence-service/undo-redo-service.d.ts +0 -11
  264. package/dist/ecs/persistence-service/undo-redo-service.js +0 -23
  265. package/dist/ecs/persistence-service/undo-redo-service.js.map +0 -1
  266. package/dist/ecs/store/core/register-core-codec.d.ts +0 -1
  267. package/dist/ecs/store/core/register-core-codec.js +0 -45
  268. package/dist/ecs/store/core/register-core-codec.js.map +0 -1
  269. package/dist/ecs/store/core/register-core-codec.test.d.ts +0 -1
  270. package/dist/ecs/store/core/register-core-codec.test.js +0 -136
  271. package/dist/ecs/store/core/register-core-codec.test.js.map +0 -1
  272. package/dist/ecs/store/query.d.ts +0 -47
  273. package/dist/ecs/store/query.js +0 -2
  274. package/dist/ecs/store/query.js.map +0 -1
  275. package/dist/ecs/store/register-core-codec.d.ts +0 -1
  276. package/dist/ecs/store/register-core-codec.js +0 -38
  277. package/dist/ecs/store/register-core-codec.js.map +0 -1
  278. package/dist/ecs/store/register-store-codec.d.ts +0 -1
  279. package/dist/ecs/store/register-store-codec.js +0 -38
  280. package/dist/ecs/store/register-store-codec.js.map +0 -1
  281. package/dist/ecs/store/restore-store.d.ts +0 -12
  282. package/dist/ecs/store/restore-store.js +0 -91
  283. package/dist/ecs/store/restore-store.js.map +0 -1
  284. package/dist/ecs/store/select-options.d.ts +0 -1
  285. package/dist/ecs/store/select-options.js +0 -16
  286. package/dist/ecs/store/select-options.js.map +0 -1
  287. package/dist/ecs/store/select.d.ts +0 -44
  288. package/dist/ecs/store/select.js +0 -2
  289. package/dist/ecs/store/select.js.map +0 -1
  290. package/dist/ecs/transaction-ecs/index.d.ts +0 -2
  291. package/dist/ecs/transaction-ecs/index.js +0 -24
  292. package/dist/ecs/transaction-ecs/index.js.map +0 -1
  293. package/dist/ecs/transaction-ecs/transaction-ecs.d.ts +0 -11
  294. package/dist/ecs/transaction-ecs/transaction-ecs.js +0 -184
  295. package/dist/ecs/transaction-ecs/transaction-ecs.js.map +0 -1
  296. package/dist/ecs/transaction-ecs/transaction-ecs.test.d.ts +0 -1
  297. package/dist/ecs/transaction-ecs/transaction-ecs.test.js +0 -599
  298. package/dist/ecs/transaction-ecs/transaction-ecs.test.js.map +0 -1
  299. package/dist/ecs/transaction-ecs/transaction-types.d.ts +0 -135
  300. package/dist/ecs/transaction-ecs/transaction-types.js +0 -2
  301. package/dist/ecs/transaction-ecs/transaction-types.js.map +0 -1
  302. package/dist/ecs/transaction-ecs/transactions.d.ts +0 -5
  303. package/dist/ecs/transaction-ecs/transactions.js +0 -158
  304. package/dist/ecs/transaction-ecs/transactions.js.map +0 -1
  305. package/dist/ecs/undo-redo/create-undo-redo-actions.d.ts +0 -10
  306. package/dist/ecs/undo-redo/create-undo-redo-actions.js +0 -69
  307. package/dist/ecs/undo-redo/create-undo-redo-actions.js.map +0 -1
  308. package/dist/ecs/undo-redo/create-undo-redo-actions.test.d.ts +0 -1
  309. package/dist/ecs/undo-redo/create-undo-redo-actions.test.js +0 -295
  310. package/dist/ecs/undo-redo/create-undo-redo-actions.test.js.map +0 -1
  311. package/dist/ecs/undo-redo/do.d.ts +0 -3
  312. package/dist/ecs/undo-redo/do.js +0 -3
  313. package/dist/ecs/undo-redo/do.js.map +0 -1
  314. package/dist/ecs/undo-redo/index.d.ts +0 -1
  315. package/dist/ecs/undo-redo/index.js +0 -23
  316. package/dist/ecs/undo-redo/index.js.map +0 -1
  317. package/dist/functions/serialization/deserialize.d.ts +0 -1
  318. package/dist/functions/serialization/deserialize.js +0 -2
  319. package/dist/functions/serialization/deserialize.js.map +0 -1
  320. package/dist/functions/serialization/register-typed-array-codecs copy.d.ts +0 -1
  321. package/dist/functions/serialization/register-typed-array-codecs copy.js +0 -13
  322. package/dist/functions/serialization/register-typed-array-codecs copy.js.map +0 -1
  323. package/dist/functions/serialization/serialize-to-blobs copy.d.ts +0 -8
  324. package/dist/functions/serialization/serialize-to-blobs copy.js +0 -21
  325. package/dist/functions/serialization/serialize-to-blobs copy.js.map +0 -1
  326. package/dist/internal/typed-array/typed-array-constructer.d.ts +0 -7
  327. package/dist/internal/typed-array/typed-array-constructer.js +0 -2
  328. package/dist/internal/typed-array/typed-array-constructer.js.map +0 -1
  329. package/dist/internal/typed-array/typed-array.d.ts +0 -1
  330. package/dist/internal/typed-array/typed-array.js +0 -23
  331. package/dist/internal/typed-array/typed-array.js.map +0 -1
  332. package/dist/observe/with-map copy.d.ts +0 -5
  333. package/dist/observe/with-map copy.js +0 -14
  334. package/dist/observe/with-map copy.js.map +0 -1
  335. package/dist/package.json +0 -129
  336. package/dist/schema/f32 copy.d.ts +0 -6
  337. package/dist/schema/f32 copy.js +0 -6
  338. package/dist/schema/f32 copy.js.map +0 -1
  339. package/dist/schemas/index.d.ts +0 -1
  340. package/dist/schemas/index.js +0 -23
  341. package/dist/schemas/index.js.map +0 -1
  342. package/dist/schemas/schemas.d.ts +0 -45
  343. package/dist/schemas/schemas.js +0 -39
  344. package/dist/schemas/schemas.js.map +0 -1
  345. package/dist/service/sequential-action.d.ts +0 -18
  346. package/dist/service/sequential-action.js +0 -45
  347. package/dist/service/sequential-action.js.map +0 -1
  348. package/dist/table/ensure-capacity copy.d.ts +0 -2
  349. package/dist/table/ensure-capacity copy.js +0 -15
  350. package/dist/table/ensure-capacity copy.js.map +0 -1
  351. package/dist/table/filter-rows.d.ts +0 -2
  352. package/dist/table/filter-rows.js +0 -15
  353. package/dist/table/filter-rows.js.map +0 -1
@@ -1,8 +0,0 @@
1
- import { Database } from "../index.js";
2
- import { PersistenceService } from "./persistence-service.js";
3
- export declare const createStoragePersistenceService: (database: Database, options: {
4
- defaultFileId: string;
5
- autoSave: boolean;
6
- autoLoadOnStart: boolean;
7
- storage?: Storage;
8
- }) => Promise<PersistenceService>;
@@ -1,49 +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 { deserializeFromStorage, serializeToStorage } from "../../functions/serialization/serialize-to-storage.js";
23
- export const createStoragePersistenceService = async (database, options) => {
24
- const { defaultFileId, autoSave, autoLoadOnStart, storage = sessionStorage } = options;
25
- const service = {
26
- serviceName: "SessionPersistenceService",
27
- save: async (fileId = defaultFileId) => {
28
- await serializeToStorage(database.toData(), fileId, storage);
29
- },
30
- load: async (fileId = defaultFileId) => {
31
- const data = await deserializeFromStorage(fileId, storage);
32
- if (data) {
33
- database.fromData(data);
34
- }
35
- }
36
- };
37
- if (autoLoadOnStart) {
38
- await service.load();
39
- }
40
- if (autoSave) {
41
- database.observe.transactions(t => {
42
- if (!t.transient) {
43
- service.save();
44
- }
45
- });
46
- }
47
- return service;
48
- };
49
- //# sourceMappingURL=create-session-persistence-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"create-session-persistence-service.js","sourceRoot":"","sources":["../../../src/ecs/persistence-service/create-session-persistence-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uDAAuD,CAAC;AAInH,MAAM,CAAC,MAAM,+BAA+B,GAAG,KAAK,EAAE,QAAkB,EAAE,OAKzE,EAA+B,EAAE;IAC9B,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,eAAe,EAAE,OAAO,GAAG,cAAc,EAAE,GAAG,OAAO,CAAC;IACvF,MAAM,OAAO,GAAuB;QAChC,WAAW,EAAE,2BAA2B;QACxC,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,EAAE;YACnC,MAAM,kBAAkB,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;QACjE,CAAC;QACD,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,EAAE;YACnC,MAAM,IAAI,GAAG,MAAM,sBAAsB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC3D,IAAI,IAAI,EAAE,CAAC;gBACP,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC5B,CAAC;QACL,CAAC;KACJ,CAAA;IACD,IAAI,eAAe,EAAE,CAAC;QAClB,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;IACzB,CAAC;IACD,IAAI,QAAQ,EAAE,CAAC;QACX,QAAQ,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE;YAC9B,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC;gBACf,OAAO,CAAC,IAAI,EAAE,CAAC;YACnB,CAAC;QACL,CAAC,CAAC,CAAA;IACN,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- import { Service } from "../../service/service.js";
2
- export interface PersistenceService extends Service {
3
- save(fileId?: string): Promise<void>;
4
- load(fileId?: string): Promise<void>;
5
- }
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=persistence-service%20copy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"persistence-service copy.js","sourceRoot":"","sources":["../../../src/ecs/persistence-service/persistence-service copy.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import { Database } from "../database/database.js";
2
- export declare const toBlobRefs: (database: Database) => void;
@@ -1,3 +0,0 @@
1
- export const toBlobRefs = (database) => {
2
- };
3
- //# sourceMappingURL=to-blob-refs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"to-blob-refs.js","sourceRoot":"","sources":["../../../src/ecs/persistence-service/to-blob-refs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,QAAkB,EAAE,EAAE;AAEjD,CAAC,CAAA"}
@@ -1,11 +0,0 @@
1
- import { Observe } from "../../observe/types.js";
2
- import { TransactionResult } from "../database/transactional-store/transactional-store.js";
3
- import { Service } from "../../service/service.js";
4
- export interface UndoRedoService<C = unknown> extends Service {
5
- undoStack: Observe<TransactionResult<C>[]>;
6
- undoStackIndex: Observe<number>;
7
- undo: () => void;
8
- redo: () => void;
9
- undoEnabled: Observe<boolean>;
10
- redoEnabled: Observe<boolean>;
11
- }
@@ -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 {};
23
- //# sourceMappingURL=undo-redo-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"undo-redo-service.js","sourceRoot":"","sources":["../../../src/ecs/persistence-service/undo-redo-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW"}
@@ -1 +0,0 @@
1
- export declare function registerCoreCodec(): void;
@@ -1,45 +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 { registerCodec } from "../../../functions/serialization/codec.js";
23
- import { deserialize } from "../../../functions/serialization/deserialize.js";
24
- import { restoreCore } from "./create-core.js";
25
- function isCore(value) {
26
- return value !== null && typeof value === "object" && "__brand" in value && value.__brand === "core";
27
- }
28
- export function registerCoreCodec() {
29
- registerCodec({
30
- name: "core",
31
- predicate: isCore,
32
- serialize: (data) => {
33
- return data.serialize();
34
- },
35
- deserialize: ({ json, binary }) => {
36
- // Deserialize the Core's data to resolve nested encoded objects
37
- const deserializedData = deserialize({
38
- json: json ?? "{}",
39
- binary: binary ?? []
40
- });
41
- return restoreCore(deserializedData);
42
- },
43
- });
44
- }
45
- //# sourceMappingURL=register-core-codec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-core-codec.js","sourceRoot":"","sources":["../../../../src/ecs/store/core/register-core-codec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAkB,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1F,OAAO,EAAE,WAAW,EAAE,MAAM,iDAAiD,CAAC;AAE9E,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,SAAS,MAAM,CAAC,KAAc;IAC1B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,SAAS,IAAI,KAAK,IAAI,KAAK,CAAC,OAAO,KAAK,MAAM,CAAC;AACzG,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC7B,aAAa,CAAY;QACrB,IAAI,EAAE,MAAM;QACZ,SAAS,EAAE,MAAM;QACjB,SAAS,EAAE,CAAC,IAAe,EAAE,EAAE;YAC3B,OAAO,IAAI,CAAC,SAAS,EAAE,CAAC;QAC5B,CAAC;QACD,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAkB,EAAE,EAAE;YAC9C,gEAAgE;YAChE,MAAM,gBAAgB,GAAG,WAAW,CAAC;gBACjC,IAAI,EAAE,IAAI,IAAI,IAAI;gBAClB,MAAM,EAAE,MAAM,IAAI,EAAE;aACvB,CAAC,CAAC;YACH,OAAO,WAAW,CAAC,gBAAuB,CAAC,CAAC;QAChD,CAAC;KACJ,CAAC,CAAC;AACP,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,136 +0,0 @@
1
- import { describe, it, expect } from "vitest";
2
- import { createCore } from "./create-core.js";
3
- import { getCodec } from "../../../functions/serialization/codec.js";
4
- import { F32Schema } from "../../../schema/f32.js";
5
- // Test schemas
6
- const positionSchema = {
7
- type: "object",
8
- properties: {
9
- x: F32Schema,
10
- y: F32Schema,
11
- z: F32Schema,
12
- }
13
- };
14
- const healthSchema = {
15
- type: "object",
16
- properties: {
17
- current: F32Schema,
18
- max: F32Schema,
19
- }
20
- };
21
- describe("Core Codec", () => {
22
- it("should serialize and deserialize Core correctly", () => {
23
- // Create a core with components
24
- const core = createCore({
25
- position: positionSchema,
26
- health: healthSchema,
27
- });
28
- // Create some entities and archetypes
29
- const positionArchetype = core.ensureArchetype(["id", "position"]);
30
- const entity1 = positionArchetype.insert({ position: { x: 1, y: 2, z: 3 } });
31
- const healthArchetype = core.ensureArchetype(["id", "health"]);
32
- const entity2 = healthArchetype.insert({ health: { current: 100, max: 100 } });
33
- const fullArchetype = core.ensureArchetype(["id", "position", "health"]);
34
- const entity3 = fullArchetype.insert({
35
- position: { x: 0, y: 0, z: 0 },
36
- health: { current: 50, max: 100 }
37
- });
38
- // Update an entity
39
- core.update(entity1, { position: { x: 10, y: 20, z: 30 } });
40
- // Delete an entity
41
- core.delete(entity2);
42
- // Get the codec
43
- const codec = getCodec("core");
44
- expect(codec).not.toBeNull();
45
- // Verify predicate works
46
- expect(codec.predicate(core)).toBe(true);
47
- expect(codec.predicate({})).toBe(false);
48
- expect(codec.predicate(null)).toBe(false);
49
- // Serialize
50
- const serialized = codec.serialize(core);
51
- expect(serialized.json).toBeDefined();
52
- expect(serialized.binary).toBeDefined();
53
- expect(serialized.binary.length).toBeGreaterThan(0);
54
- // Deserialize
55
- const restored = codec.deserialize(serialized);
56
- expect(restored).toBeDefined();
57
- // Verify the restored core has the same behavior
58
- expect(restored.locate(entity1)).not.toBeNull(); // Updated entity
59
- expect(restored.locate(entity2)).toBeNull(); // Deleted entity
60
- expect(restored.locate(entity3)).not.toBeNull(); // Unchanged entity
61
- // Verify entity data is preserved
62
- const entity1Data = restored.read(entity1);
63
- expect(entity1Data?.position).toEqual({ x: 10, y: 20, z: 30 });
64
- const entity3Data = restored.read(entity3);
65
- expect(entity3Data?.position).toEqual({ x: 0, y: 0, z: 0 });
66
- expect(entity3Data?.health).toEqual({ current: 50, max: 100 });
67
- // Verify we can still create new entities
68
- const newArchetype = restored.ensureArchetype(["id", "position"]);
69
- const newEntity = newArchetype.insert({ position: { x: 100, y: 200, z: 300 } });
70
- expect(restored.locate(newEntity)).not.toBeNull();
71
- expect(restored.read(newEntity)?.position).toEqual({ x: 100, y: 200, z: 300 });
72
- });
73
- it("should handle empty core", () => {
74
- const core = createCore({});
75
- const codec = getCodec("core");
76
- const serialized = codec.serialize(core);
77
- const restored = codec.deserialize(serialized);
78
- // Verify we can create entities in the restored core
79
- const archetype = restored.ensureArchetype(["id"]);
80
- const entity = archetype.insert({});
81
- expect(restored.locate(entity)).not.toBeNull();
82
- expect(restored.read(entity)?.id).toBe(entity);
83
- });
84
- it("should preserve archetype functionality", () => {
85
- const core = createCore({
86
- position: positionSchema,
87
- health: healthSchema,
88
- });
89
- // Create multiple archetypes
90
- const positionArchetype = core.ensureArchetype(["id", "position"]);
91
- const healthArchetype = core.ensureArchetype(["id", "health"]);
92
- const fullArchetype = core.ensureArchetype(["id", "position", "health"]);
93
- // Create entities in each archetype
94
- const positionEntity = positionArchetype.insert({ position: { x: 1, y: 2, z: 3 } });
95
- const healthEntity = healthArchetype.insert({ health: { current: 100, max: 100 } });
96
- const fullEntity = fullArchetype.insert({
97
- position: { x: 0, y: 0, z: 0 },
98
- health: { current: 50, max: 100 }
99
- });
100
- const codec = getCodec("core");
101
- const serialized = codec.serialize(core);
102
- const restored = codec.deserialize(serialized);
103
- // Verify archetypes work correctly after restoration
104
- const restoredPositionArchetype = restored.ensureArchetype(["id", "position"]);
105
- const restoredHealthArchetype = restored.ensureArchetype(["id", "health"]);
106
- const restoredFullArchetype = restored.ensureArchetype(["id", "position", "health"]);
107
- // Verify entities are still accessible
108
- expect(restored.locate(positionEntity)).not.toBeNull();
109
- expect(restored.locate(healthEntity)).not.toBeNull();
110
- expect(restored.locate(fullEntity)).not.toBeNull();
111
- // Verify we can create new entities in each archetype
112
- const newPositionEntity = restoredPositionArchetype.insert({ position: { x: 10, y: 20, z: 30 } });
113
- const newHealthEntity = restoredHealthArchetype.insert({ health: { current: 75, max: 100 } });
114
- const newFullEntity = restoredFullArchetype.insert({
115
- position: { x: 5, y: 5, z: 5 },
116
- health: { current: 25, max: 100 }
117
- });
118
- expect(restored.locate(newPositionEntity)).not.toBeNull();
119
- expect(restored.locate(newHealthEntity)).not.toBeNull();
120
- expect(restored.locate(newFullEntity)).not.toBeNull();
121
- });
122
- it("should handle component schema preservation", () => {
123
- const core = createCore({
124
- position: positionSchema,
125
- health: healthSchema,
126
- });
127
- const codec = getCodec("core");
128
- const serialized = codec.serialize(core);
129
- const restored = codec.deserialize(serialized);
130
- // Verify component schemas are preserved
131
- expect(restored.componentSchemas.position).toEqual(positionSchema);
132
- expect(restored.componentSchemas.health).toEqual(healthSchema);
133
- expect(restored.componentSchemas.id).toBeDefined();
134
- });
135
- });
136
- //# sourceMappingURL=register-core-codec.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-core-codec.test.js","sourceRoot":"","sources":["../../../../src/ecs/store/core/register-core-codec.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,2CAA2C,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAGnD,eAAe;AACf,MAAM,cAAc,GAAG;IACnB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,CAAC,EAAE,SAAS;QACZ,CAAC,EAAE,SAAS;QACZ,CAAC,EAAE,SAAS;KACf;CACsB,CAAC;AAE5B,MAAM,YAAY,GAAG;IACjB,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,OAAO,EAAE,SAAS;QAClB,GAAG,EAAE,SAAS;KACjB;CACsB,CAAC;AAE5B,QAAQ,CAAC,YAAY,EAAE,GAAG,EAAE;IACxB,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACvD,gCAAgC;QAChC,MAA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,cAAc,CAAC,CAAC;QACnE,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC/D,MAAM,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;IACvD,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,47 +0,0 @@
1
- import { CoreComponents } from "../core-components.js";
2
- /**
3
- * Comparison operators for declarative where clauses
4
- */
5
- type ComparisonOperator = "==" | "!=" | "<" | ">" | ">=" | "<=";
6
- /**
7
- * Represents a comparison operation in a declarative where clause
8
- */
9
- type ComparisonOperation<T> = {
10
- [P in ComparisonOperator]?: T;
11
- };
12
- /**
13
- * Represents a condition that can be either a direct value, comparison operation, or nested conditions
14
- */
15
- type WhereCondition<T> = T extends object ? {
16
- [K in keyof T]?: WhereCondition<T[K]>;
17
- } | ComparisonOperation<T> : T | ComparisonOperation<T>;
18
- /**
19
- * Declarative where clause structure that allows for JSON-based filtering
20
- * Each key in the object represents a component field to filter on
21
- * The value can either be a direct value (equality check), a comparison operation, or nested conditions
22
- */
23
- export type WhereClause<T extends CoreComponents> = {
24
- [K in keyof T]?: WhereCondition<T[K]>;
25
- };
26
- type OrderClause<T extends CoreComponents> = {
27
- [K in keyof T]?: boolean;
28
- };
29
- export type Select<C extends CoreComponents, T extends CoreComponents> = {
30
- /**
31
- * Components that the entities must have.
32
- */
33
- components: (keyof T)[];
34
- /**
35
- * Components that the entities must not have.
36
- */
37
- without?: (keyof C)[];
38
- /**
39
- * Filter the results by the given condition using a declarative where clause.
40
- */
41
- where?: WhereClause<T>;
42
- /**
43
- * Order results by the given components ascending or descending.
44
- */
45
- order?: OrderClause<T>;
46
- };
47
- export {};
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=query.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"query.js","sourceRoot":"","sources":["../../../src/ecs/store/query.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export declare function registerCoreCodec(): void;
@@ -1,38 +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 { registerCodec } from "../../functions/serialization/codec.js";
23
- function isStore(value) {
24
- return value !== null && typeof value === "object" && "select" in value && "resources" in value && "archetypes" in value;
25
- }
26
- export function registerCoreCodec() {
27
- registerCodec({
28
- name: "store",
29
- predicate: isStore,
30
- serialize: (data) => {
31
- throw new Error("not yet implemented");
32
- },
33
- deserialize: ({ json, binary }) => {
34
- throw new Error("not implemented yet");
35
- },
36
- });
37
- }
38
- //# sourceMappingURL=register-core-codec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-core-codec.js","sourceRoot":"","sources":["../../../src/ecs/store/register-core-codec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAkB,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGvF,SAAS,OAAO,CAAC,KAAc;IAC3B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,QAAQ,IAAI,KAAK,IAAI,WAAW,IAAI,KAAK,IAAI,YAAY,IAAI,KAAK,CAAC;AAC7H,CAAC;AAED,MAAM,UAAU,iBAAiB;IAC7B,aAAa,CAAQ;QACjB,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,OAAO;QAClB,SAAS,EAAE,CAAC,IAAW,EAAE,EAAE;YACvB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC3C,CAAC;QACD,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAkB,EAAE,EAAE;YAC9C,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC3C,CAAC;KACJ,CAAC,CAAC;AACP,CAAC"}
@@ -1 +0,0 @@
1
- export declare function registerStoreCodec(): void;
@@ -1,38 +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 { registerCodec } from "../../functions/serialization/codec.js";
23
- function isStore(value) {
24
- return value !== null && typeof value === "object" && "select" in value && "resources" in value && "archetypes" in value;
25
- }
26
- export function registerStoreCodec() {
27
- registerCodec({
28
- name: "store",
29
- predicate: isStore,
30
- serialize: (data) => {
31
- throw new Error("not yet implemented");
32
- },
33
- deserialize: ({ json, binary }) => {
34
- throw new Error("not implemented yet");
35
- },
36
- });
37
- }
38
- //# sourceMappingURL=register-store-codec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"register-store-codec.js","sourceRoot":"","sources":["../../../src/ecs/store/register-store-codec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAkB,aAAa,EAAE,MAAM,wCAAwC,CAAC;AAGvF,SAAS,OAAO,CAAC,KAAc;IAC3B,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,QAAQ,IAAI,KAAK,IAAI,WAAW,IAAI,KAAK,IAAI,YAAY,IAAI,KAAK,CAAC;AAC7H,CAAC;AAED,MAAM,UAAU,kBAAkB;IAC9B,aAAa,CAAQ;QACjB,IAAI,EAAE,OAAO;QACb,SAAS,EAAE,OAAO;QAClB,SAAS,EAAE,CAAC,IAAW,EAAE,EAAE;YACvB,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC3C,CAAC;QACD,WAAW,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAkB,EAAE,EAAE;YAC9C,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;QAC3C,CAAC;KACJ,CAAC,CAAC;AACP,CAAC"}
@@ -1,12 +0,0 @@
1
- import { ComponentSchemas } from "../component-schemas.js";
2
- import { StringKeyof } from "../../types/types.js";
3
- import { Store } from "./store.js";
4
- import { FromSchema } from "../../schema/schema.js";
5
- import { ResourceSchemas } from "../resource-schemas.js";
6
- import { ArchetypeComponents } from "./archetype-components.js";
7
- import { SerializedData } from "../../functions/serialization/codec.js";
8
- export declare function restoreStore<NC extends ComponentSchemas, NR extends ResourceSchemas, A extends ArchetypeComponents<StringKeyof<NC>> = {}>(data: SerializedData): Store<{
9
- [K in StringKeyof<NC>]: FromSchema<NC[K]>;
10
- }, {
11
- -readonly [K in StringKeyof<NR>]: FromSchema<NR[K]>;
12
- }, A>;
@@ -1,91 +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 { createCore } from "./core/create-core.js";
23
- import { selectEntities } from "./core/select-entities.js";
24
- import { restoreEntityLocationTable } from "../entity-location-table/create-entity-location-table.js";
25
- export function restoreStore(data) {
26
- const { json, binary } = data;
27
- const { componentSchemas: newComponentSchemas, resourceSchemas, archetypeComponentNames, archetypes: serializedArchetypes, entityLocationTable: entityLocationTableData, } = json;
28
- const resources = {};
29
- const componentAndResourceSchemas = { ...newComponentSchemas };
30
- // Resources are stored in the core as components, so we need to add them to the componentSchemas
31
- for (const name of Object.keys(resourceSchemas)) {
32
- const resourceId = name;
33
- componentAndResourceSchemas[resourceId] = resourceSchemas[name];
34
- }
35
- const core = createCore(componentAndResourceSchemas);
36
- // Restore entity location table
37
- const entityLocationTable = restoreEntityLocationTable({
38
- json: entityLocationTableData,
39
- binary: binary?.slice(0, 1) ?? [],
40
- });
41
- // Restore archetypes
42
- let binaryIndex = 1;
43
- for (const serializedArchetype of serializedArchetypes) {
44
- const { id, components, rowCount, columns } = serializedArchetype;
45
- // Ensure the archetype exists
46
- const archetype = core.ensureArchetype(components);
47
- // Restore the table data
48
- if (binary && binary[binaryIndex]) {
49
- // For now, we'll need to access the internal table structure
50
- // This is a simplified approach - in a real implementation you'd need
51
- // to properly restore the typed buffers for each column
52
- const tableData = binary[binaryIndex];
53
- // TODO: Implement proper table restoration
54
- binaryIndex++;
55
- }
56
- }
57
- // Each resource will be stored as the only entity in an archetype of [id, <resourceName>]
58
- // The resource component we added above will contain the resource value
59
- for (const [name, resourceSchema] of Object.entries(resourceSchemas)) {
60
- const resourceId = name;
61
- const archetype = core.ensureArchetype(["id", resourceId]);
62
- archetype.insert({ [resourceId]: resourceSchema.default });
63
- const row = 0;
64
- Object.defineProperty(resources, name, {
65
- get: () => archetype.columns[resourceId].get(row),
66
- set: (value) => {
67
- archetype.columns[resourceId].set(row, value);
68
- },
69
- enumerable: true,
70
- });
71
- }
72
- const select = (include, options) => {
73
- return selectEntities(core, include, options);
74
- };
75
- const archetypes = Object.fromEntries(Object.entries(archetypeComponentNames).map(([name, componentNames]) => {
76
- const archetype = core.ensureArchetype(["id", ...componentNames]);
77
- return [name, archetype];
78
- }));
79
- const store = {
80
- ...core,
81
- resources,
82
- select,
83
- archetypes,
84
- serialize: () => {
85
- // This will be implemented in the createStore function
86
- throw new Error("Serialization not implemented for restored store");
87
- },
88
- };
89
- return store;
90
- }
91
- //# sourceMappingURL=restore-store.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"restore-store.js","sourceRoot":"","sources":["../../../src/ecs/store/restore-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAOX,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAMnD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AAoBtG,MAAM,UAAU,YAAY,CAKxB,IAAoB;IAMpB,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC9B,MAAM,EACF,gBAAgB,EAAE,mBAAmB,EACrC,eAAe,EACf,uBAAuB,EACvB,UAAU,EAAE,oBAAoB,EAChC,mBAAmB,EAAE,uBAAuB,GAC/C,GAAG,IAA4B,CAAC;IAKjC,MAAM,SAAS,GAAG,EAAO,CAAC;IAE1B,MAAM,2BAA2B,GAA0C,EAAE,GAAG,mBAAmB,EAA2C,CAAC;IAC/I,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,gCAAgC;IAChC,MAAM,mBAAmB,GAAG,0BAA0B,CAAC;QACnD,IAAI,EAAE,uBAAuB;QAC7B,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE;KACpC,CAAC,CAAC;IAEH,qBAAqB;IACrB,IAAI,WAAW,GAAG,CAAC,CAAC;IACpB,KAAK,MAAM,mBAAm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ACnE,EAAE;QACnB,OAAO,cAAc,CAAa,IAAI,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAC9D,CAAC,CAAA;IAED,MAAM,UAAU,GAAG,MAAM,CAAC,WAAW,CACjC,MAAM,CAAC,OAAO,CAAC,uBAAuB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,cAAc,CAAC,EAAE,EAAE;QACnE,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,GAAG,cAAqB,CAAC,CAAC,CAAC;QACzE,OAAO,CAAC,IAAI,EAAE,SAAS,CAAU,CAAC;IACtC,CAAC,CAAC,CACE,CAAC;IAET,MAAM,KAAK,GAAgB;QACvB,GAAG,IAAI;QACP,SAAS;QACT,MAAM;QACN,UAAU;QACV,SAAS,EAAE,GAAmB,EAAE;YAC5B,uDAAuD;YACvD,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;QACxE,CAAC;KACJ,CAAC;IAEF,OAAO,KAAY,CAAC;AACxB,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,16 +0,0 @@
1
- export {};
2
- // export type SelectOptions<C extends object, T extends object> = {
3
- // /**
4
- // * Components that the entities must not have.
5
- // */
6
- // without?: keyof C[];
7
- // /**
8
- // * Filter the results by the given condition using a declarative where clause.
9
- // */
10
- // where?: Filter<T>;
11
- // /**
12
- // * Order results by the given components ascending or descending.
13
- // */
14
- // order?: OrderClause<T>;
15
- // }
16
- //# sourceMappingURL=select-options.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"select-options.js","sourceRoot":"","sources":["../../../src/ecs/store/select-options.ts"],"names":[],"mappings":";AAIA,oEAAoE;AACpE,UAAU;AACV,qDAAqD;AACrD,UAAU;AACV,2BAA2B;AAC3B,UAAU;AACV,qFAAqF;AACrF,UAAU;AACV,yBAAyB;AACzB,UAAU;AACV,wEAAwE;AACxE,UAAU;AACV,8BAA8B;AAC9B,IAAI"}