@adobe/data 0.5.2 → 0.5.4

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 (378) 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/lit/elements/application-element.d.ts +9 -0
  17. package/dist/lit/elements/application-element.js +62 -0
  18. package/dist/lit/elements/application-element.js.map +1 -0
  19. package/dist/lit/elements/service-application.js +4 -1
  20. package/dist/lit/elements/service-application.js.map +1 -1
  21. package/dist/lit/functions/index.d.ts +1 -0
  22. package/dist/{ecs/action-ecs → lit/functions}/index.js +1 -1
  23. package/dist/lit/functions/index.js.map +1 -0
  24. package/dist/lit/functions/iterate-self-and-ancestors.d.ts +1 -0
  25. package/dist/{core/functions/array-equals.js → lit/functions/iterate-self-and-ancestors.js} +20 -10
  26. package/dist/lit/functions/iterate-self-and-ancestors.js.map +1 -0
  27. package/dist/lit/hooks/attach-decorator.d.ts +4 -0
  28. package/dist/{service/sequential-action.js → lit/hooks/attach-decorator.js} +20 -19
  29. package/dist/lit/hooks/attach-decorator.js.map +1 -0
  30. package/dist/lit/hooks/index.d.ts +1 -0
  31. package/dist/lit/hooks/index.js +1 -0
  32. package/dist/lit/hooks/index.js.map +1 -1
  33. package/dist/lit/hooks/use-drag-observe.d.ts +22 -0
  34. package/dist/{ecs/entity-location-table/register-entity-location-table-codec.js → lit/hooks/use-drag-observe.js} +30 -17
  35. package/dist/lit/hooks/use-drag-observe.js.map +1 -0
  36. package/dist/lit/hooks/use-drag-transaction.d.ts +8 -0
  37. package/dist/lit/hooks/use-drag-transaction.js +56 -0
  38. package/dist/lit/hooks/use-drag-transaction.js.map +1 -0
  39. package/dist/lit/hooks/use-draggable.d.ts +16 -0
  40. package/dist/lit/hooks/use-draggable.js +122 -0
  41. package/dist/lit/hooks/use-draggable.js.map +1 -0
  42. package/dist/schema/schema.d.ts +8 -12
  43. package/dist/schema/schema.js.map +1 -1
  44. package/dist/service/disposable.d.ts +4 -0
  45. package/dist/{core/functions/is-async-generator.js → service/disposable.js} +3 -3
  46. package/dist/service/disposable.js.map +1 -0
  47. package/dist/service/is-service.js +1 -2
  48. package/dist/service/is-service.js.map +1 -1
  49. package/dist/service/progressive-result.d.ts +7 -11
  50. package/dist/service/progressive-result.js +0 -6
  51. package/dist/service/progressive-result.js.map +1 -1
  52. package/dist/service/service.d.ts +11 -1
  53. package/dist/service/to-frontend-service.d.ts +12 -0
  54. package/dist/service/to-frontend-service.js +5 -0
  55. package/dist/service/to-frontend-service.js.map +1 -0
  56. package/dist/services/add-observable-actions.d.ts +29 -0
  57. package/dist/services/add-observable-actions.js +108 -0
  58. package/dist/services/add-observable-actions.js.map +1 -0
  59. package/dist/services/index.d.ts +4 -0
  60. package/dist/{core → services}/index.js +3 -3
  61. package/dist/services/index.js.map +1 -0
  62. package/dist/services/is-service.d.ts +2 -0
  63. package/dist/{cache/functions/omit.js → services/is-service.js} +3 -7
  64. package/dist/services/is-service.js.map +1 -0
  65. package/dist/services/progressive-result.d.ts +96 -0
  66. package/dist/services/progressive-result.js +99 -0
  67. package/dist/services/progressive-result.js.map +1 -0
  68. package/dist/services/service.d.ts +4 -0
  69. package/dist/{cache/functions/types.js → services/service.js} +1 -1
  70. package/dist/services/service.js.map +1 -0
  71. package/dist/tsconfig.tsbuildinfo +1 -1
  72. package/dist/types/index.d.ts +1 -0
  73. package/dist/types/index.js +1 -0
  74. package/dist/types/index.js.map +1 -1
  75. package/dist/types/replace.d.ts +7 -0
  76. package/dist/types/replace.js +5 -0
  77. package/dist/types/replace.js.map +1 -0
  78. package/package.json +8 -1
  79. package/dist/README.md +0 -310
  80. package/dist/cache/functions/bind-functions.d.ts +0 -6
  81. package/dist/cache/functions/bind-functions.js +0 -33
  82. package/dist/cache/functions/bind-functions.js.map +0 -1
  83. package/dist/cache/functions/hashing/arrayBufferToHex.d.ts +0 -1
  84. package/dist/cache/functions/hashing/arrayBufferToHex.js +0 -27
  85. package/dist/cache/functions/hashing/arrayBufferToHex.js.map +0 -1
  86. package/dist/cache/functions/omit.d.ts +0 -1
  87. package/dist/cache/functions/omit.js.map +0 -1
  88. package/dist/cache/functions/types.d.ts +0 -1
  89. package/dist/cache/functions/types.js.map +0 -1
  90. package/dist/core/data.d.ts +0 -22
  91. package/dist/core/data.js +0 -52
  92. package/dist/core/data.js.map +0 -1
  93. package/dist/core/data.test.d.ts +0 -1
  94. package/dist/core/data.test.js +0 -48
  95. package/dist/core/data.test.js.map +0 -1
  96. package/dist/core/functions/array-equals.d.ts +0 -1
  97. package/dist/core/functions/array-equals.js.map +0 -1
  98. package/dist/core/functions/deep-merge.d.ts +0 -32
  99. package/dist/core/functions/deep-merge.js +0 -54
  100. package/dist/core/functions/deep-merge.js.map +0 -1
  101. package/dist/core/functions/deep-merge.test.d.ts +0 -1
  102. package/dist/core/functions/deep-merge.test.js +0 -94
  103. package/dist/core/functions/deep-merge.test.js.map +0 -1
  104. package/dist/core/functions/index.d.ts +0 -3
  105. package/dist/core/functions/index.js +0 -25
  106. package/dist/core/functions/index.js.map +0 -1
  107. package/dist/core/functions/is-async-generator.d.ts +0 -1
  108. package/dist/core/functions/is-async-generator.js.map +0 -1
  109. package/dist/core/functions/is-promise.d.ts +0 -1
  110. package/dist/core/functions/is-promise.js +0 -26
  111. package/dist/core/functions/is-promise.js.map +0 -1
  112. package/dist/core/functions/with-validation.d.ts +0 -5
  113. package/dist/core/functions/with-validation.js +0 -38
  114. package/dist/core/functions/with-validation.js.map +0 -1
  115. package/dist/core/functions/with-validation.test.d.ts +0 -1
  116. package/dist/core/functions/with-validation.test.js +0 -96
  117. package/dist/core/functions/with-validation.test.js.map +0 -1
  118. package/dist/core/index.d.ts +0 -3
  119. package/dist/core/index.js.map +0 -1
  120. package/dist/core/schema/dynamic/dynamic-schema.d.ts +0 -27
  121. package/dist/core/schema/dynamic/dynamic-schema.js +0 -2
  122. package/dist/core/schema/dynamic/dynamic-schema.js.map +0 -1
  123. package/dist/core/schema/dynamic/enumerate-patches.d.ts +0 -9
  124. package/dist/core/schema/dynamic/enumerate-patches.js +0 -50
  125. package/dist/core/schema/dynamic/enumerate-patches.js.map +0 -1
  126. package/dist/core/schema/dynamic/enumerate-patches.test.d.ts +0 -134
  127. package/dist/core/schema/dynamic/enumerate-patches.test.js +0 -209
  128. package/dist/core/schema/dynamic/enumerate-patches.test.js.map +0 -1
  129. package/dist/core/schema/dynamic/get-dynamic-schema.d.ts +0 -5
  130. package/dist/core/schema/dynamic/get-dynamic-schema.js +0 -26
  131. package/dist/core/schema/dynamic/get-dynamic-schema.js.map +0 -1
  132. package/dist/core/schema/dynamic/get-dynamic-schema.test.d.ts +0 -1
  133. package/dist/core/schema/dynamic/get-dynamic-schema.test.js +0 -94
  134. package/dist/core/schema/dynamic/get-dynamic-schema.test.js.map +0 -1
  135. package/dist/core/schema/dynamic/index.d.ts +0 -1
  136. package/dist/core/schema/dynamic/index.js +0 -2
  137. package/dist/core/schema/dynamic/index.js.map +0 -1
  138. package/dist/core/schema/dynamic/schema-path-value-path.d.ts +0 -5
  139. package/dist/core/schema/dynamic/schema-path-value-path.js +0 -12
  140. package/dist/core/schema/dynamic/schema-path-value-path.js.map +0 -1
  141. package/dist/core/schema/dynamic-schema.d.ts +0 -27
  142. package/dist/core/schema/dynamic-schema.js +0 -2
  143. package/dist/core/schema/dynamic-schema.js.map +0 -1
  144. package/dist/core/schema/index.d.ts +0 -4
  145. package/dist/core/schema/index.js +0 -26
  146. package/dist/core/schema/index.js.map +0 -1
  147. package/dist/core/schema/schema.d.ts +0 -122
  148. package/dist/core/schema/schema.js +0 -34
  149. package/dist/core/schema/schema.js.map +0 -1
  150. package/dist/core/schema/schemas.d.ts +0 -45
  151. package/dist/core/schema/schemas.js +0 -39
  152. package/dist/core/schema/schemas.js.map +0 -1
  153. package/dist/core/schema/ui-schema.d.ts +0 -25
  154. package/dist/core/schema/ui-schema.js +0 -2
  155. package/dist/core/schema/ui-schema.js.map +0 -1
  156. package/dist/core/schema/validation/is-valid.d.ts +0 -2
  157. package/dist/core/schema/validation/is-valid.js +0 -14
  158. package/dist/core/schema/validation/is-valid.js.map +0 -1
  159. package/dist/core/schema/validation/is-valid.test.d.ts +0 -1
  160. package/dist/core/schema/validation/is-valid.test.js +0 -40
  161. package/dist/core/schema/validation/is-valid.test.js.map +0 -1
  162. package/dist/core/schema/validation/validate.d.ts +0 -2
  163. package/dist/core/schema/validation/validate.js +0 -38
  164. package/dist/core/schema/validation/validate.js.map +0 -1
  165. package/dist/core/schema/validation/validate.test.d.ts +0 -1
  166. package/dist/core/schema/validation/validate.test.js +0 -106
  167. package/dist/core/schema/validation/validate.test.js.map +0 -1
  168. package/dist/core/schema/validation/with-validation.d.ts +0 -5
  169. package/dist/core/schema/validation/with-validation.js +0 -16
  170. package/dist/core/schema/validation/with-validation.js.map +0 -1
  171. package/dist/core/schema/validation/with-validation.test.d.ts +0 -1
  172. package/dist/core/schema/validation/with-validation.test.js +0 -96
  173. package/dist/core/schema/validation/with-validation.test.js.map +0 -1
  174. package/dist/core/schema.d.ts +0 -86
  175. package/dist/core/schema.js +0 -33
  176. package/dist/core/schema.js.map +0 -1
  177. package/dist/core/schema.test.d.ts +0 -1
  178. package/dist/core/schema.test.js +0 -16
  179. package/dist/core/schema.test.js.map +0 -1
  180. package/dist/core/schemas.d.ts +0 -45
  181. package/dist/core/schemas.js +0 -39
  182. package/dist/core/schemas.js.map +0 -1
  183. package/dist/ecs/action-ecs/action-ecs.d.ts +0 -19
  184. package/dist/ecs/action-ecs/action-ecs.js +0 -203
  185. package/dist/ecs/action-ecs/action-ecs.js.map +0 -1
  186. package/dist/ecs/action-ecs/action-ecs.test.d.ts +0 -1
  187. package/dist/ecs/action-ecs/action-ecs.test.js +0 -362
  188. package/dist/ecs/action-ecs/action-ecs.test.js.map +0 -1
  189. package/dist/ecs/action-ecs/action-types.d.ts +0 -106
  190. package/dist/ecs/action-ecs/action-types.js +0 -19
  191. package/dist/ecs/action-ecs/action-types.js.map +0 -1
  192. package/dist/ecs/action-ecs/index.d.ts +0 -2
  193. package/dist/ecs/action-ecs/index.js.map +0 -1
  194. package/dist/ecs/core-ecs/core-ecs-serialization.test.d.ts +0 -1
  195. package/dist/ecs/core-ecs/core-ecs-serialization.test.js +0 -230
  196. package/dist/ecs/core-ecs/core-ecs-serialization.test.js.map +0 -1
  197. package/dist/ecs/core-ecs/core-ecs-types.d.ts +0 -141
  198. package/dist/ecs/core-ecs/core-ecs-types.js +0 -23
  199. package/dist/ecs/core-ecs/core-ecs-types.js.map +0 -1
  200. package/dist/ecs/core-ecs/core-ecs.d.ts +0 -7
  201. package/dist/ecs/core-ecs/core-ecs.js +0 -492
  202. package/dist/ecs/core-ecs/core-ecs.js.map +0 -1
  203. package/dist/ecs/core-ecs/core-ecs.test.d.ts +0 -1
  204. package/dist/ecs/core-ecs/core-ecs.test.js +0 -425
  205. package/dist/ecs/core-ecs/core-ecs.test.js.map +0 -1
  206. package/dist/ecs/core-ecs/index.d.ts +0 -1
  207. package/dist/ecs/core-ecs/index.js +0 -2
  208. package/dist/ecs/core-ecs/index.js.map +0 -1
  209. package/dist/ecs/database/database-schema/create-database-schema-test.d.ts +0 -1
  210. package/dist/ecs/database/database-schema/create-database-schema-test.js +0 -42
  211. package/dist/ecs/database/database-schema/create-database-schema-test.js.map +0 -1
  212. package/dist/ecs/database/database-schema/create-database-schema.d.ts +0 -12
  213. package/dist/ecs/database/database-schema/create-database-schema.js +0 -26
  214. package/dist/ecs/database/database-schema/create-database-schema.js.map +0 -1
  215. package/dist/ecs/database/database-schema/database-schema.d.ts +0 -15
  216. package/dist/ecs/database/database-schema/database-schema.js +0 -23
  217. package/dist/ecs/database/database-schema/database-schema.js.map +0 -1
  218. package/dist/ecs/database/database-schema/index.d.ts +0 -2
  219. package/dist/ecs/database/database-schema/index.js +0 -24
  220. package/dist/ecs/database/database-schema/index.js.map +0 -1
  221. package/dist/ecs/database/register-database-codec.d.ts +0 -1
  222. package/dist/ecs/database/register-database-codec.js +0 -35
  223. package/dist/ecs/database/register-database-codec.js.map +0 -1
  224. package/dist/ecs/database/register-database-codecs.d.ts +0 -1
  225. package/dist/ecs/database/register-database-codecs.js +0 -35
  226. package/dist/ecs/database/register-database-codecs.js.map +0 -1
  227. package/dist/ecs/database/register-store-codec.d.ts +0 -1
  228. package/dist/ecs/database/register-store-codec.js +0 -35
  229. package/dist/ecs/database/register-store-codec.js.map +0 -1
  230. package/dist/ecs/database/register-typed-buffer-codecs.d.ts +0 -1
  231. package/dist/ecs/database/register-typed-buffer-codecs.js +0 -80
  232. package/dist/ecs/database/register-typed-buffer-codecs.js.map +0 -1
  233. package/dist/ecs/database/transactional-store/apply-write-operations.d.ts +0 -7
  234. package/dist/ecs/database/transactional-store/apply-write-operations.js +0 -20
  235. package/dist/ecs/database/transactional-store/apply-write-operations.js.map +0 -1
  236. package/dist/ecs/database/transactional-store/applyWriteOperations.d.ts +0 -7
  237. package/dist/ecs/database/transactional-store/applyWriteOperations.js +0 -20
  238. package/dist/ecs/database/transactional-store/applyWriteOperations.js.map +0 -1
  239. package/dist/ecs/database/transactional-store/create-test-transaction.d.ts +0 -7
  240. package/dist/ecs/database/transactional-store/create-test-transaction.js +0 -7
  241. package/dist/ecs/database/transactional-store/create-test-transaction.js.map +0 -1
  242. package/dist/ecs/database/transactional-store/patch.d.ts +0 -3
  243. package/dist/ecs/database/transactional-store/patch.js +0 -7
  244. package/dist/ecs/database/transactional-store/patch.js.map +0 -1
  245. package/dist/ecs/database/transactional-store/undoable.d.ts +0 -13
  246. package/dist/ecs/database/transactional-store/undoable.js +0 -23
  247. package/dist/ecs/database/transactional-store/undoable.js.map +0 -1
  248. package/dist/ecs/database/transactional-store/with-undoable.d.ts +0 -10
  249. package/dist/ecs/database/transactional-store/with-undoable.js +0 -13
  250. package/dist/ecs/database/transactional-store/with-undoable.js.map +0 -1
  251. package/dist/ecs/database/with-undoable.d.ts +0 -10
  252. package/dist/ecs/database/with-undoable.js +0 -13
  253. package/dist/ecs/database/with-undoable.js.map +0 -1
  254. package/dist/ecs/ecs/ecs-types.d.ts +0 -132
  255. package/dist/ecs/ecs/ecs-types.js +0 -23
  256. package/dist/ecs/ecs/ecs-types.js.map +0 -1
  257. package/dist/ecs/ecs/ecs-where-functions.d.ts +0 -6
  258. package/dist/ecs/ecs/ecs-where-functions.js +0 -91
  259. package/dist/ecs/ecs/ecs-where-functions.js.map +0 -1
  260. package/dist/ecs/ecs/ecs.d.ts +0 -13
  261. package/dist/ecs/ecs/ecs.js +0 -177
  262. package/dist/ecs/ecs/ecs.js.map +0 -1
  263. package/dist/ecs/ecs/ecs.test.d.ts +0 -1
  264. package/dist/ecs/ecs/ecs.test.js +0 -399
  265. package/dist/ecs/ecs/ecs.test.js.map +0 -1
  266. package/dist/ecs/ecs/index.d.ts +0 -3
  267. package/dist/ecs/ecs/index.js +0 -3
  268. package/dist/ecs/ecs/index.js.map +0 -1
  269. package/dist/ecs/entity-location-table/register-database-codec.d.ts +0 -1
  270. package/dist/ecs/entity-location-table/register-database-codec.js +0 -35
  271. package/dist/ecs/entity-location-table/register-database-codec.js.map +0 -1
  272. package/dist/ecs/entity-location-table/register-entity-location-table-codec.d.ts +0 -1
  273. package/dist/ecs/entity-location-table/register-entity-location-table-codec.js.map +0 -1
  274. package/dist/ecs/entity-location-table/register-entity-location-table-codec.test.d.ts +0 -1
  275. package/dist/ecs/entity-location-table/register-entity-location-table-codec.test.js +0 -70
  276. package/dist/ecs/entity-location-table/register-entity-location-table-codec.test.js.map +0 -1
  277. package/dist/ecs/persistence-service/create-persistence-service.d.ts +0 -6
  278. package/dist/ecs/persistence-service/create-persistence-service.js +0 -24
  279. package/dist/ecs/persistence-service/create-persistence-service.js.map +0 -1
  280. package/dist/ecs/persistence-service/create-session-persistence-service.d.ts +0 -8
  281. package/dist/ecs/persistence-service/create-session-persistence-service.js +0 -49
  282. package/dist/ecs/persistence-service/create-session-persistence-service.js.map +0 -1
  283. package/dist/ecs/persistence-service/persistence-service copy.d.ts +0 -5
  284. package/dist/ecs/persistence-service/persistence-service copy.js +0 -2
  285. package/dist/ecs/persistence-service/persistence-service copy.js.map +0 -1
  286. package/dist/ecs/persistence-service/to-blob-refs.d.ts +0 -2
  287. package/dist/ecs/persistence-service/to-blob-refs.js +0 -3
  288. package/dist/ecs/persistence-service/to-blob-refs.js.map +0 -1
  289. package/dist/ecs/persistence-service/undo-redo-service.d.ts +0 -11
  290. package/dist/ecs/persistence-service/undo-redo-service.js +0 -23
  291. package/dist/ecs/persistence-service/undo-redo-service.js.map +0 -1
  292. package/dist/ecs/store/core/register-core-codec.d.ts +0 -1
  293. package/dist/ecs/store/core/register-core-codec.js +0 -45
  294. package/dist/ecs/store/core/register-core-codec.js.map +0 -1
  295. package/dist/ecs/store/core/register-core-codec.test.d.ts +0 -1
  296. package/dist/ecs/store/core/register-core-codec.test.js +0 -136
  297. package/dist/ecs/store/core/register-core-codec.test.js.map +0 -1
  298. package/dist/ecs/store/query.d.ts +0 -47
  299. package/dist/ecs/store/query.js +0 -2
  300. package/dist/ecs/store/query.js.map +0 -1
  301. package/dist/ecs/store/register-core-codec.d.ts +0 -1
  302. package/dist/ecs/store/register-core-codec.js +0 -38
  303. package/dist/ecs/store/register-core-codec.js.map +0 -1
  304. package/dist/ecs/store/register-store-codec.d.ts +0 -1
  305. package/dist/ecs/store/register-store-codec.js +0 -38
  306. package/dist/ecs/store/register-store-codec.js.map +0 -1
  307. package/dist/ecs/store/restore-store.d.ts +0 -12
  308. package/dist/ecs/store/restore-store.js +0 -91
  309. package/dist/ecs/store/restore-store.js.map +0 -1
  310. package/dist/ecs/store/select-options.d.ts +0 -1
  311. package/dist/ecs/store/select-options.js +0 -16
  312. package/dist/ecs/store/select-options.js.map +0 -1
  313. package/dist/ecs/store/select.d.ts +0 -44
  314. package/dist/ecs/store/select.js +0 -2
  315. package/dist/ecs/store/select.js.map +0 -1
  316. package/dist/ecs/transaction-ecs/index.d.ts +0 -2
  317. package/dist/ecs/transaction-ecs/index.js +0 -24
  318. package/dist/ecs/transaction-ecs/index.js.map +0 -1
  319. package/dist/ecs/transaction-ecs/transaction-ecs.d.ts +0 -11
  320. package/dist/ecs/transaction-ecs/transaction-ecs.js +0 -184
  321. package/dist/ecs/transaction-ecs/transaction-ecs.js.map +0 -1
  322. package/dist/ecs/transaction-ecs/transaction-ecs.test.d.ts +0 -1
  323. package/dist/ecs/transaction-ecs/transaction-ecs.test.js +0 -599
  324. package/dist/ecs/transaction-ecs/transaction-ecs.test.js.map +0 -1
  325. package/dist/ecs/transaction-ecs/transaction-types.d.ts +0 -135
  326. package/dist/ecs/transaction-ecs/transaction-types.js +0 -2
  327. package/dist/ecs/transaction-ecs/transaction-types.js.map +0 -1
  328. package/dist/ecs/transaction-ecs/transactions.d.ts +0 -5
  329. package/dist/ecs/transaction-ecs/transactions.js +0 -158
  330. package/dist/ecs/transaction-ecs/transactions.js.map +0 -1
  331. package/dist/ecs/undo-redo/create-undo-redo-actions.d.ts +0 -10
  332. package/dist/ecs/undo-redo/create-undo-redo-actions.js +0 -69
  333. package/dist/ecs/undo-redo/create-undo-redo-actions.js.map +0 -1
  334. package/dist/ecs/undo-redo/create-undo-redo-actions.test.d.ts +0 -1
  335. package/dist/ecs/undo-redo/create-undo-redo-actions.test.js +0 -295
  336. package/dist/ecs/undo-redo/create-undo-redo-actions.test.js.map +0 -1
  337. package/dist/ecs/undo-redo/do.d.ts +0 -3
  338. package/dist/ecs/undo-redo/do.js +0 -3
  339. package/dist/ecs/undo-redo/do.js.map +0 -1
  340. package/dist/ecs/undo-redo/index.d.ts +0 -1
  341. package/dist/ecs/undo-redo/index.js +0 -23
  342. package/dist/ecs/undo-redo/index.js.map +0 -1
  343. package/dist/functions/serialization/deserialize.d.ts +0 -1
  344. package/dist/functions/serialization/deserialize.js +0 -2
  345. package/dist/functions/serialization/deserialize.js.map +0 -1
  346. package/dist/functions/serialization/register-typed-array-codecs copy.d.ts +0 -1
  347. package/dist/functions/serialization/register-typed-array-codecs copy.js +0 -13
  348. package/dist/functions/serialization/register-typed-array-codecs copy.js.map +0 -1
  349. package/dist/functions/serialization/serialize-to-blobs copy.d.ts +0 -8
  350. package/dist/functions/serialization/serialize-to-blobs copy.js +0 -21
  351. package/dist/functions/serialization/serialize-to-blobs copy.js.map +0 -1
  352. package/dist/internal/typed-array/typed-array-constructer.d.ts +0 -7
  353. package/dist/internal/typed-array/typed-array-constructer.js +0 -2
  354. package/dist/internal/typed-array/typed-array-constructer.js.map +0 -1
  355. package/dist/internal/typed-array/typed-array.d.ts +0 -1
  356. package/dist/internal/typed-array/typed-array.js +0 -23
  357. package/dist/internal/typed-array/typed-array.js.map +0 -1
  358. package/dist/observe/with-map copy.d.ts +0 -5
  359. package/dist/observe/with-map copy.js +0 -14
  360. package/dist/observe/with-map copy.js.map +0 -1
  361. package/dist/package.json +0 -129
  362. package/dist/schema/f32 copy.d.ts +0 -6
  363. package/dist/schema/f32 copy.js +0 -6
  364. package/dist/schema/f32 copy.js.map +0 -1
  365. package/dist/schemas/index.d.ts +0 -1
  366. package/dist/schemas/index.js +0 -23
  367. package/dist/schemas/index.js.map +0 -1
  368. package/dist/schemas/schemas.d.ts +0 -45
  369. package/dist/schemas/schemas.js +0 -39
  370. package/dist/schemas/schemas.js.map +0 -1
  371. package/dist/service/sequential-action.d.ts +0 -18
  372. package/dist/service/sequential-action.js.map +0 -1
  373. package/dist/table/ensure-capacity copy.d.ts +0 -2
  374. package/dist/table/ensure-capacity copy.js +0 -15
  375. package/dist/table/ensure-capacity copy.js.map +0 -1
  376. package/dist/table/filter-rows.d.ts +0 -2
  377. package/dist/table/filter-rows.js +0 -15
  378. package/dist/table/filter-rows.js.map +0 -1
@@ -0,0 +1,29 @@
1
+ import { FromSchema } from "../schema/schema.js";
2
+ export declare const BlobHandleSchema: {
3
+ readonly type: "object";
4
+ readonly properties: {
5
+ readonly handle: {
6
+ readonly type: "string";
7
+ };
8
+ readonly expires: {
9
+ readonly type: "string";
10
+ };
11
+ readonly type: {
12
+ readonly type: "string";
13
+ };
14
+ readonly size: {
15
+ readonly type: "number";
16
+ };
17
+ readonly width: {
18
+ readonly type: "number";
19
+ };
20
+ readonly height: {
21
+ readonly type: "number";
22
+ };
23
+ readonly duration: {
24
+ readonly type: "number";
25
+ };
26
+ };
27
+ readonly required: readonly ["type", "size", "handle"];
28
+ };
29
+ export type BlobHandle = FromSchema<typeof BlobHandleSchema>;
@@ -0,0 +1,11 @@
1
+ import { BlobMetaSchema } from "./blob-meta.js";
2
+ export const BlobHandleSchema = {
3
+ type: 'object',
4
+ properties: {
5
+ ...BlobMetaSchema.properties,
6
+ handle: { type: 'string' },
7
+ expires: { type: 'string' },
8
+ },
9
+ required: [...BlobMetaSchema.required, 'handle'],
10
+ };
11
+ //# sourceMappingURL=blob-handle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blob-handle.js","sourceRoot":"","sources":["../../src/blob/blob-handle.ts"],"names":[],"mappings":"AACA,OAAO,EAAY,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAI1D,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,GAAG,cAAc,CAAC,UAAU;QAC5B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC1B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC9B;IACD,QAAQ,EAAE,CAAC,GAAG,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC;CACzB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { FromSchema } from "../schema/schema.js";
2
+ export declare const BlobMetaSchema: {
3
+ readonly type: "object";
4
+ readonly properties: {
5
+ readonly type: {
6
+ readonly type: "string";
7
+ };
8
+ readonly size: {
9
+ readonly type: "number";
10
+ };
11
+ readonly width: {
12
+ readonly type: "number";
13
+ };
14
+ readonly height: {
15
+ readonly type: "number";
16
+ };
17
+ readonly duration: {
18
+ readonly type: "number";
19
+ };
20
+ };
21
+ readonly required: readonly ["type", "size"];
22
+ };
23
+ export type BlobMeta = FromSchema<typeof BlobMetaSchema>;
@@ -0,0 +1,12 @@
1
+ export const BlobMetaSchema = {
2
+ type: 'object',
3
+ properties: {
4
+ type: { type: 'string' },
5
+ size: { type: 'number' },
6
+ width: { type: 'number' },
7
+ height: { type: 'number' },
8
+ duration: { type: 'number' },
9
+ },
10
+ required: ['type', 'size'],
11
+ };
12
+ //# sourceMappingURL=blob-meta.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blob-meta.js","sourceRoot":"","sources":["../../src/blob/blob-meta.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACxB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACxB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QACzB,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC1B,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;KAC/B;IACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;CACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { BlobHandle } from "./blob-handle.js";
2
+ export type DownloadHandle = BlobHandle & {
3
+ download: true;
4
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=download-handle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"download-handle.js","sourceRoot":"","sources":["../../src/blob/download-handle.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from "./blob-handle.js";
2
+ export * from "./blob-meta.js";
3
+ export * from "./download-handle.js";
4
+ export * from "./upload-handle.js";
@@ -0,0 +1,5 @@
1
+ export * from "./blob-handle.js";
2
+ export * from "./blob-meta.js";
3
+ export * from "./download-handle.js";
4
+ export * from "./upload-handle.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/blob/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { BlobHandle } from "./blob-handle.js";
2
+ export type UploadHandle = BlobHandle & {
3
+ upload: true;
4
+ };
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=upload-handle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"upload-handle.js","sourceRoot":"","sources":["../../src/blob/upload-handle.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
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
+ }
@@ -0,0 +1,62 @@
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.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"application-element.js","sourceRoot":"","sources":["../../../src/lit/elements/application-element.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;IAED,MAAM;QACJ,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"}
@@ -29,6 +29,7 @@ import { html, LitElement } from "lit";
29
29
  import { property } from "lit/decorators.js";
30
30
  import { provide } from "@lit/context";
31
31
  import { serviceContext } from "./service-context.js";
32
+ import { isDisposable } from "../../service/disposable.js";
32
33
  export class ServiceApplication extends LitElement {
33
34
  async updated(changedProperties) {
34
35
  super.updated(changedProperties);
@@ -36,7 +37,9 @@ export class ServiceApplication extends LitElement {
36
37
  }
37
38
  disconnectedCallback() {
38
39
  super.disconnectedCallback();
39
- this.service?.dispose?.();
40
+ if (isDisposable(this.service)) {
41
+ this.service.dispose();
42
+ }
40
43
  this.service = null;
41
44
  }
42
45
  render() {
@@ -1 +1 @@
1
- {"version":3,"file":"service-application.js","sourceRoot":"","sources":["../../../src/lit/elements/service-application.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;;;;;;;AAEX,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAGtD,MAAM,OAAgB,kBAAsC,SAAQ,UAAU;IAQjE,KAAK,CAAC,OAAO,CAAC,iBAAiC;QACpD,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACjC,IAAI,CAAC,OAAO,KAAK,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;IAChD,CAAC;IAEQ,oBAAoB;QACzB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,IAAW,CAAC;IAC/B,CAAC;IAEQ,MAAM;QACX,OAAO,IAAI,CAAA;;SAEV,CAAC;IACN,CAAC;CACJ;AApBa;IAFT,OAAO,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDACL"}
1
+ {"version":3,"file":"service-application.js","sourceRoot":"","sources":["../../../src/lit/elements/service-application.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;;;;;;;AAEX,OAAO,EAAE,IAAI,EAAE,UAAU,EAAkB,MAAM,KAAK,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAE3D,MAAM,OAAgB,kBAAsC,SAAQ,UAAU;IAQjE,KAAK,CAAC,OAAO,CAAC,iBAAiC;QACpD,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACjC,IAAI,CAAC,OAAO,KAAK,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;IAChD,CAAC;IAEQ,oBAAoB;QACzB,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,IAAI,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YAC7B,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;QAC3B,CAAC;QACD,IAAI,CAAC,OAAO,GAAG,IAAW,CAAC;IAC/B,CAAC;IAEQ,MAAM;QACX,OAAO,IAAI,CAAA;;SAEV,CAAC;IACN,CAAC;CACJ;AAtBa;IAFT,OAAO,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,CAAC;IACpC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;mDACL"}
@@ -0,0 +1 @@
1
+ export * from "./iterate-self-and-ancestors.js";
@@ -19,5 +19,5 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.*/
22
- export * from "./action-ecs.js";
22
+ export * from "./iterate-self-and-ancestors.js";
23
23
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lit/functions/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,cAAc,iCAAiC,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function iterateSelfAndAncestors(element: Element): IterableIterator<Element>;
@@ -19,16 +19,26 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.*/
22
- export function arrayEquals(a, b) {
23
- const length = a.length;
24
- if (length !== b.length) {
25
- return false;
26
- }
27
- for (let i = 0; i < length; i++) {
28
- if (a[i] !== b[i]) {
29
- return false;
22
+ export function* iterateSelfAndAncestors(element) {
23
+ let current = element;
24
+ while (current) {
25
+ yield current;
26
+ if (current instanceof HTMLSlotElement && current.assignedSlot) {
27
+ // Move to the slot's parent if the current element is assigned to a slot
28
+ current = current.assignedSlot;
29
+ }
30
+ else if (current.parentNode instanceof Element) {
31
+ // Move up to the parent node if it is an element
32
+ current = current.parentNode;
33
+ }
34
+ else if (current.getRootNode().host) {
35
+ // Move to the host element if we're at a shadow root
36
+ current = current.getRootNode().host;
37
+ }
38
+ else {
39
+ // If no more ancestors, stop the iteration
40
+ current = null;
30
41
  }
31
42
  }
32
- return true;
33
43
  }
34
- //# sourceMappingURL=array-equals.js.map
44
+ //# sourceMappingURL=iterate-self-and-ancestors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iterate-self-and-ancestors.js","sourceRoot":"","sources":["../../../src/lit/functions/iterate-self-and-ancestors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,MAAM,SAAS,CAAC,CAAC,uBAAuB,CAAC,OAAgB;IACrD,IAAI,OAAO,GAAmB,OAAO,CAAC;IAEtC,OAAO,OAAO,EAAE,CAAC;QACb,MAAM,OAAO,CAAC;QAEd,IAAI,OAAO,YAAY,eAAe,IAAI,OAAO,CAAC,YAAY,EAAE,CAAC;YAC7D,yEAAyE;YACzE,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC;QACnC,CAAC;aAAM,IAAI,OAAO,CAAC,UAAU,YAAY,OAAO,EAAE,CAAC;YAC/C,iDAAiD;YACjD,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC;QACjC,CAAC;aAAM,IAAK,OAAO,CAAC,WAAW,EAAiB,CAAC,IAAI,EAAE,CAAC;YACpD,qDAAqD;YACrD,OAAO,GAAI,OAAO,CAAC,WAAW,EAAiB,CAAC,IAAI,CAAC;QACzD,CAAC;aAAM,CAAC;YACJ,2CAA2C;YAC3C,OAAO,GAAG,IAAI,CAAC;QACnB,CAAC;IACL,CAAC;AACL,CAAC"}
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Attacheds a decorator to a method on an object and reassigns the resulting value back to the object.
3
+ */
4
+ export declare function attachDecorator<T, K extends keyof T>(obj: T, property: K, decorator: (target: any, propertyKey: string, descriptor: TypedPropertyDescriptor<T[K]>) => PropertyDescriptor): void;
@@ -20,26 +20,27 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.*/
22
22
  /**
23
- * Executes a sequential action using an async iterable iterator that provides the arguments.
24
- * @param action - The action to execute.
25
- * @param argProvider - An async iterable iterator of arguments to pass to the action.
23
+ * Attacheds a decorator to a method on an object and reassigns the resulting value back to the object.
26
24
  */
27
- export async function executeSequentialAction(action, argProvider) {
28
- let sequence;
29
- try {
30
- // get the next arguments from the arg provider
31
- for await (const arg of argProvider) {
32
- // then write them into the multiframe transaction (persisting this set of updates into database)
33
- sequence = (sequence?.update ?? action)(arg);
25
+ export function attachDecorator(obj, property,
26
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any -- This is a generic type
27
+ decorator) {
28
+ // Get the descriptor of the property
29
+ let descriptor = Object.getOwnPropertyDescriptor(obj, property);
30
+ if (!descriptor) {
31
+ if (!obj[property]) {
32
+ throw new Error(`Property ${property.toString()} does not exist on object`);
34
33
  }
35
- // everything succeeded, finalize this transaction.
36
- sequence?.commit();
37
- }
38
- catch (e) {
39
- // cancel the sequence
40
- sequence?.cancel();
41
- // allow the async iterable iterator to finalize and close any open resources
42
- argProvider.throw?.(e);
34
+ descriptor = {
35
+ value: obj[property],
36
+ writable: true,
37
+ enumerable: true,
38
+ configurable: true,
39
+ };
43
40
  }
41
+ // Apply the decorator to the descriptor
42
+ const decoratedDescriptor = decorator(obj, String(property), descriptor);
43
+ // Reassign the decorated method back to the object
44
+ obj[property] = decoratedDescriptor.value;
44
45
  }
45
- //# sourceMappingURL=sequential-action.js.map
46
+ //# sourceMappingURL=attach-decorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attach-decorator.js","sourceRoot":"","sources":["../../../src/lit/hooks/attach-decorator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX;;GAEG;AACH,MAAM,UAAU,eAAe,CAC3B,GAAM,EACN,QAAW;AACX,wFAAwF;AACxF,SAA8G;IAE9G,qCAAqC;IACrC,IAAI,UAAU,GAAG,MAAM,CAAC,wBAAwB,CAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;IAEhE,IAAI,CAAC,UAAU,EAAE,CAAC;QACd,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC;YACjB,MAAM,IAAI,KAAK,CAAC,YAAY,QAAQ,CAAC,QAAQ,EAAE,2BAA2B,CAAC,CAAC;QAChF,CAAC;QACD,UAAU,GAAG;YACT,KAAK,EAAE,GAAG,CAAC,QAAQ,CAAC;YACpB,QAAQ,EAAE,IAAI;YACd,UAAU,EAAE,IAAI;YAChB,YAAY,EAAE,IAAI;SACrB,CAAC;IACN,CAAC;IAED,wCAAwC;IACxC,MAAM,mBAAmB,GAAG,SAAS,CAAC,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,EAAE,UAAU,CAAC,CAAC;IAEzE,mDAAmD;IACnD,GAAG,CAAC,QAAQ,CAAC,GAAG,mBAAmB,CAAC,KAAK,CAAC;AAC9C,CAAC"}
@@ -11,3 +11,4 @@ export * from "./use-window-event.js";
11
11
  export * from "./use-resize-observer.js";
12
12
  export * from "./use-element.js";
13
13
  export * from "./with-hooks.js";
14
+ export * from "./attach-decorator.js";
@@ -32,4 +32,5 @@ export * from "./use-window-event.js";
32
32
  export * from "./use-resize-observer.js";
33
33
  export * from "./use-element.js";
34
34
  export * from "./with-hooks.js";
35
+ export * from "./attach-decorator.js";
35
36
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lit/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lit/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { DraggableProps, Vector2 } from './use-draggable.js';
2
+ export type DragObserveProps = Pick<DraggableProps, 'minDragDistance' | 'dragCursor' | 'addPlaceholder' | 'stopPropagation'>;
3
+ export type DragStart = {
4
+ readonly type: 'start' | 'cancel';
5
+ };
6
+ export type DragMove = {
7
+ readonly type: 'move';
8
+ readonly delta: Vector2;
9
+ readonly position: Vector2;
10
+ };
11
+ export type DragEnd = {
12
+ readonly type: 'end';
13
+ readonly position: Vector2;
14
+ };
15
+ export type DragState = DragStart | DragMove | DragEnd;
16
+ /**
17
+ * This hook creates a drag observe function that can be used to observe the drag state of an element.
18
+ * This is normally not used directly, but rather through the `useDragTransaction` hook.
19
+ * @param props
20
+ * @returns
21
+ */
22
+ export declare function useDragObserve(props: DragObserveProps, dependencies: unknown[]): import("@adobe/data/observe").Observe<DragState>;
@@ -19,24 +19,37 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
21
  SOFTWARE.*/
22
- import { registerCodec } from "../../functions/serialization/codec.js";
23
- import { restoreEntityLocationTable } from "./create-entity-location-table.js";
24
- function isEntityLocationTable(value) {
25
- return value !== null && typeof value === "object" && "create" in value && "update" in value && "delete" in value && "locate" in value && "serialize" in value;
26
- }
27
- export function registerEntityLocationTableCodec() {
28
- registerCodec({
29
- name: "entity-location-table",
30
- predicate: isEntityLocationTable,
31
- serialize: (data) => {
32
- return data.serialize();
22
+ import { useDraggable } from './use-draggable.js';
23
+ import { useElement } from './use-element.js';
24
+ import { createObservableEvent } from '@adobe/data/observe';
25
+ /**
26
+ * This hook creates a drag observe function that can be used to observe the drag state of an element.
27
+ * This is normally not used directly, but rather through the `useDragTransaction` hook.
28
+ * @param props
29
+ * @returns
30
+ */
31
+ export function useDragObserve(props, dependencies) {
32
+ const [dragState, setDragState] = createObservableEvent();
33
+ const element = useElement();
34
+ useDraggable(element, () => ({
35
+ ...props,
36
+ onDragStart: _e => {
37
+ setDragState({ type: 'start' });
33
38
  },
34
- deserialize: ({ json, binary }) => {
35
- return restoreEntityLocationTable({
36
- json: json ?? {},
37
- binary: binary ?? []
39
+ onDrag: (_e, position, delta) => {
40
+ setDragState({
41
+ type: 'move',
42
+ position,
43
+ delta,
38
44
  });
39
45
  },
40
- });
46
+ onDragEnd: (_e, position) => {
47
+ setDragState({ type: 'end', position });
48
+ },
49
+ onDragCancel: () => {
50
+ setDragState({ type: 'cancel' });
51
+ },
52
+ }), dependencies);
53
+ return dragState;
41
54
  }
42
- //# sourceMappingURL=register-entity-location-table-codec.js.map
55
+ //# sourceMappingURL=use-drag-observe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-drag-observe.js","sourceRoot":"","sources":["../../../src/lit/hooks/use-drag-observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAA2B,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAoB5D;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAAuB,EAAE,YAAuB;IAC3E,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,qBAAqB,EAAa,CAAC;IACrE,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,YAAY,CAAC,OAAO,EAChB,GAAG,EAAE,CAAC,CAAC;QACH,GAAG,KAAK;QACR,WAAW,EAAE,EAAE,CAAC,EAAE;YACd,YAAY,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QACpC,CAAC;QACD,MAAM,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE;YAC5B,YAAY,CAAC;gBACT,IAAI,EAAE,MAAM;gBACZ,QAAQ;gBACR,KAAK;aACR,CAAC,CAAC;QACP,CAAC;QACD,SAAS,EAAE,CAAC,EAAE,EAAE,QAAQ,EAAE,EAAE;YACxB,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;QAC5C,CAAC;QACD,YAAY,EAAE,GAAG,EAAE;YACf,YAAY,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;QACrC,CAAC;KACJ,CAAC,EACF,YAAY,CACf,CAAC;IACF,OAAO,SAAS,CAAC;AACrB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { DragEnd, DragMove, DragObserveProps } from './use-drag-observe.js';
2
+ import { AsyncArgsProvider } from '@adobe/data/ecs';
3
+ export type DragTransactionProps<T> = DragObserveProps & {
4
+ transaction: (asyncArgs: AsyncArgsProvider<T>) => void;
5
+ update: (drag: DragMove) => T;
6
+ finish: (drag: DragEnd) => T;
7
+ };
8
+ export declare function useDragTransaction<T>(propsFactory: () => DragTransactionProps<T>, dependencies: unknown[]): void;
@@ -0,0 +1,56 @@
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 { useDragObserve } from './use-drag-observe.js';
23
+ import { useEffect } from "./use-effect.js";
24
+ import { toAsyncGenerator, withFilter } from '@adobe/data/observe';
25
+ export function useDragTransaction(propsFactory, dependencies) {
26
+ const props = propsFactory();
27
+ const { transaction, update, finish } = props;
28
+ const dragObserve = useDragObserve(props, dependencies);
29
+ const startDragTransaction = () => {
30
+ let done = false;
31
+ // we start the transaction by calling it with an async generator that will yield the args asynchronously
32
+ transaction(
33
+ // we create the async generator by mapping the dragObserve state changes to transaction args
34
+ () => toAsyncGenerator(
35
+ // this uses the withMap function and the provided update and finish functions
36
+ // any type 'start' will just be ignored and filtered out
37
+ withFilter(dragObserve, value => {
38
+ if (value.type === 'end') {
39
+ done = true;
40
+ return finish(value);
41
+ }
42
+ if (value.type === 'move') {
43
+ return update(value);
44
+ }
45
+ }), _value => done));
46
+ };
47
+ // now we will observe the drag state and start a new transaction whenever a drag starts
48
+ useEffect(() => {
49
+ return dragObserve(value => {
50
+ if (value.type === 'start') {
51
+ startDragTransaction();
52
+ }
53
+ });
54
+ }, dependencies);
55
+ }
56
+ //# sourceMappingURL=use-drag-transaction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-drag-transaction.js","sourceRoot":"","sources":["../../../src/lit/hooks/use-drag-transaction.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAuC,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAQnE,MAAM,UAAU,kBAAkB,CAAI,YAA2C,EAAE,YAAuB;IACtG,MAAM,KAAK,GAAG,YAAY,EAAE,CAAC;IAC7B,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IAC9C,MAAM,WAAW,GAAG,cAAc,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IACxD,MAAM,oBAAoB,GAAG,GAAG,EAAE;QAC9B,IAAI,IAAI,GAAG,KAAK,CAAC;QACjB,yGAAyG;QACzG,WAAW;QACP,6FAA6F;QAC7F,GAAG,EAAE,CACD,gBAAgB;QACZ,8EAA8E;QAC9E,yDAAyD;QACzD,UAAU,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE;YAC5B,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;gBACvB,IAAI,GAAG,IAAI,CAAC;gBACZ,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC;YACD,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;gBACxB,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;YACzB,CAAC;QACL,CAAC,CAAC,EACF,MAAM,CAAC,EAAE,CAAC,IAAI,CACjB,CACR,CAAC;IACN,CAAC,CAAC;IACF,wFAAwF;IACxF,SAAS,CAAC,GAAG,EAAE;QACX,OAAO,WAAW,CAAC,KAAK,CAAC,EAAE;YACvB,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO,EAAE,CAAC;gBACzB,oBAAoB,EAAE,CAAC;YAC3B,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC,EAAE,YAAY,CAAC,CAAC;AACrB,CAAC"}
@@ -0,0 +1,16 @@
1
+ export type Vector2 = readonly [number, number];
2
+ export interface DraggableProps {
3
+ onDragStart: (e: PointerEvent) => Vector2 | void;
4
+ onDrag: (e: PointerEvent, newPosition: Vector2, delta: Vector2) => void;
5
+ onDragEnd?: (e: PointerEvent, newPosition: Vector2) => void;
6
+ /**
7
+ * Called if this hook is destroyed before the drag is completed.
8
+ */
9
+ onDragCancel?: () => void;
10
+ initialDownPosition?: Vector2;
11
+ minDragDistance?: number;
12
+ dragCursor?: string;
13
+ addPlaceholder?: boolean;
14
+ stopPropagation?: boolean;
15
+ }
16
+ export declare function useDraggable(element: HTMLElement, propsFunction: () => DraggableProps, dependencies: unknown[]): void;