@adobe/data 0.7.3 → 0.8.0

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 (488) hide show
  1. package/dist/blob/blob-handle.d.ts +2 -2
  2. package/dist/blob/blob-meta.d.ts +2 -2
  3. package/dist/cache/blob-store.d.ts +2 -2
  4. package/dist/cache/data-cache.d.ts +1 -1
  5. package/dist/cache/functions/memoize.d.ts +1 -3
  6. package/dist/cache/functions/memoize.js +1 -3
  7. package/dist/cache/functions/memoize.js.map +1 -1
  8. package/dist/cache/managed-array.d.ts +2 -2
  9. package/dist/cache/managed-array.js.map +1 -1
  10. package/dist/cache/memory-allocator.d.ts +1 -1
  11. package/dist/cache/memory-allocator.js +2 -2
  12. package/dist/cache/memory-allocator.js.map +1 -1
  13. package/dist/ecs/archetype/create-archetype.d.ts +2 -2
  14. package/dist/ecs/archetype/create-archetype.js.map +1 -1
  15. package/dist/ecs/archetype/create-archetype.test.js +9 -9
  16. package/dist/ecs/archetype/create-archetype.test.js.map +1 -1
  17. package/dist/ecs/archetype/delete-row.test.js +4 -4
  18. package/dist/ecs/archetype/delete-row.test.js.map +1 -1
  19. package/dist/ecs/component-schemas.d.ts +1 -1
  20. package/dist/ecs/database/create-database.test.js +136 -6
  21. package/dist/ecs/database/create-database.test.js.map +1 -1
  22. package/dist/ecs/database/database-schema/create-database-schema.d.ts +1 -1
  23. package/dist/ecs/database/database-schema/database-schema.d.ts +1 -1
  24. package/dist/ecs/database/database.d.ts +2 -1
  25. package/dist/ecs/database/index.d.ts +1 -1
  26. package/dist/ecs/database/index.js +0 -1
  27. package/dist/ecs/database/index.js.map +1 -1
  28. package/dist/ecs/database/observe-dependent-value.js +3 -3
  29. package/dist/ecs/database/observe-dependent-value.js.map +1 -1
  30. package/dist/ecs/database/observe-select-entities.d.ts +2 -2
  31. package/dist/ecs/database/observe-select-entities.js +2 -2
  32. package/dist/ecs/database/observe-select-entities.js.map +1 -1
  33. package/dist/ecs/database/observe-select-entities.performance.test.js +6 -6
  34. package/dist/ecs/database/observe-select-entities.performance.test.js.map +1 -1
  35. package/dist/ecs/database/observe-select-entities.test.js +6 -6
  36. package/dist/ecs/database/observe-select-entities.test.js.map +1 -1
  37. package/dist/ecs/database/observed/create-observed-database.js +10 -2
  38. package/dist/ecs/database/observed/create-observed-database.js.map +1 -1
  39. package/dist/ecs/database/reconciling/create-reconciling-database.d.ts +8 -1
  40. package/dist/ecs/database/reconciling/create-reconciling-database.js +50 -19
  41. package/dist/ecs/database/reconciling/create-reconciling-database.js.map +1 -1
  42. package/dist/ecs/database/reconciling/create-reconciling-database.test.js +297 -0
  43. package/dist/ecs/database/reconciling/create-reconciling-database.test.js.map +1 -1
  44. package/dist/ecs/database/transactional-store/coalesce-transactions.d.ts +5 -1
  45. package/dist/ecs/database/transactional-store/coalesce-transactions.js +17 -28
  46. package/dist/ecs/database/transactional-store/coalesce-transactions.js.map +1 -1
  47. package/dist/ecs/database/transactional-store/coalesce-transactions.test.js +84 -7
  48. package/dist/ecs/database/transactional-store/coalesce-transactions.test.js.map +1 -1
  49. package/dist/ecs/database/transactional-store/create-transactional-store.js +7 -2
  50. package/dist/ecs/database/transactional-store/create-transactional-store.js.map +1 -1
  51. package/dist/ecs/database/transactional-store/create-transactional-store.test.js +11 -9
  52. package/dist/ecs/database/transactional-store/create-transactional-store.test.js.map +1 -1
  53. package/dist/ecs/entity-location-table/create-entity-location-table.js +13 -1
  54. package/dist/ecs/entity-location-table/create-entity-location-table.js.map +1 -1
  55. package/dist/ecs/entity-location-table/create-entity-location-table.test.js +1 -2
  56. package/dist/ecs/entity-location-table/create-entity-location-table.test.js.map +1 -1
  57. package/dist/ecs/entity-location-table/entity-location.d.ts +2 -2
  58. package/dist/ecs/entity-location-table/entity-location.js +3 -3
  59. package/dist/ecs/entity-location-table/entity-location.js.map +1 -1
  60. package/dist/ecs/entity.d.ts +2 -2
  61. package/dist/ecs/entity.js +2 -2
  62. package/dist/ecs/entity.js.map +1 -1
  63. package/dist/ecs/index.d.ts +5 -2
  64. package/dist/ecs/index.js +3 -2
  65. package/dist/ecs/index.js.map +1 -1
  66. package/dist/ecs/resource-schemas.d.ts +1 -1
  67. package/dist/ecs/store/core/core.d.ts +14 -13
  68. package/dist/ecs/store/core/create-core.d.ts +2 -2
  69. package/dist/ecs/store/core/create-core.js +19 -13
  70. package/dist/ecs/store/core/create-core.js.map +1 -1
  71. package/dist/ecs/store/core/create-core.test.js +54 -6
  72. package/dist/ecs/store/core/create-core.test.js.map +1 -1
  73. package/dist/ecs/store/core/select-entities.d.ts +2 -1
  74. package/dist/ecs/store/core/select-entities.js.map +1 -1
  75. package/dist/ecs/store/core/select-entities.test.js +3 -3
  76. package/dist/ecs/store/core/select-entities.test.js.map +1 -1
  77. package/dist/ecs/store/create-store.d.ts +2 -2
  78. package/dist/ecs/store/create-store.js.map +1 -1
  79. package/dist/ecs/store/create-store.test.js +8 -8
  80. package/dist/ecs/store/create-store.test.js.map +1 -1
  81. package/dist/ecs/store/index.d.ts +2 -0
  82. package/dist/ecs/store/store.d.ts +10 -9
  83. package/dist/ecs/store/store.js.map +1 -1
  84. package/dist/ecs/undo-redo-service/create-undo-redo-service.js +5 -7
  85. package/dist/ecs/undo-redo-service/create-undo-redo-service.js.map +1 -1
  86. package/dist/ecs/undo-redo-service/create-undo-redo-service.test.js +27 -27
  87. package/dist/ecs/undo-redo-service/create-undo-redo-service.test.js.map +1 -1
  88. package/dist/ecs/undo-redo-service/undo-redo-service.d.ts +1 -1
  89. package/dist/index.d.ts +2 -2
  90. package/dist/is-data.d.ts +3 -4
  91. package/dist/lit/hooks/use-drag-observe.d.ts +2 -1
  92. package/dist/lit/hooks/use-drag-observe.js +2 -2
  93. package/dist/lit/hooks/use-drag-observe.js.map +1 -1
  94. package/dist/lit/hooks/use-drag-transaction.js +3 -3
  95. package/dist/lit/hooks/use-drag-transaction.js.map +1 -1
  96. package/dist/lit/hooks/use-draggable.d.ts +1 -1
  97. package/dist/lit/hooks/use-draggable.js +1 -1
  98. package/dist/lit/hooks/use-draggable.js.map +1 -1
  99. package/dist/lit/hooks/use-observable-values.d.ts +1 -2
  100. package/dist/lit/hooks/use-observable-values.js +2 -2
  101. package/dist/lit/hooks/use-observable-values.js.map +1 -1
  102. package/dist/lit/index.d.ts +1 -0
  103. package/dist/math/aabb/center.d.ts +3 -0
  104. package/dist/math/aabb/center.js +6 -0
  105. package/dist/math/aabb/center.js.map +1 -0
  106. package/dist/math/aabb/face/aabb-face.test.d.ts +1 -0
  107. package/dist/math/aabb/face/aabb-face.test.js +55 -0
  108. package/dist/math/aabb/face/aabb-face.test.js.map +1 -0
  109. package/dist/math/aabb/face/functions.d.ts +47 -0
  110. package/dist/math/aabb/face/functions.js +148 -0
  111. package/dist/math/aabb/face/functions.js.map +1 -0
  112. package/dist/math/aabb/face/index.d.ts +4 -0
  113. package/dist/math/aabb/face/index.js +23 -0
  114. package/dist/math/aabb/face/index.js.map +1 -0
  115. package/dist/math/aabb/face/public.d.ts +2 -0
  116. package/dist/math/aabb/face/public.js +24 -0
  117. package/dist/math/aabb/face/public.js.map +1 -0
  118. package/dist/math/aabb/face/schema.d.ts +5 -0
  119. package/dist/math/aabb/face/schema.js +27 -0
  120. package/dist/math/aabb/face/schema.js.map +1 -0
  121. package/dist/math/aabb/index.d.ts +4 -0
  122. package/dist/math/aabb/index.js +23 -0
  123. package/dist/math/aabb/index.js.map +1 -0
  124. package/dist/math/aabb/layout.d.ts +1 -0
  125. package/dist/math/aabb/layout.js +25 -0
  126. package/dist/math/aabb/layout.js.map +1 -0
  127. package/dist/math/aabb/line-intersection.d.ts +10 -0
  128. package/dist/math/aabb/line-intersection.js +42 -0
  129. package/dist/math/aabb/line-intersection.js.map +1 -0
  130. package/dist/math/aabb/line-intersection.test.js +1 -1
  131. package/dist/math/aabb/line-intersection.test.js.map +1 -1
  132. package/dist/math/aabb/public.d.ts +6 -0
  133. package/dist/math/aabb/public.js +28 -0
  134. package/dist/math/aabb/public.js.map +1 -0
  135. package/dist/math/aabb/schema.d.ts +33 -0
  136. package/dist/math/aabb/schema.js +36 -0
  137. package/dist/math/aabb/schema.js.map +1 -0
  138. package/dist/math/aabb/unit.d.ts +5 -0
  139. package/dist/math/aabb/unit.js +8 -0
  140. package/dist/math/aabb/unit.js.map +1 -0
  141. package/dist/math/f32/index.d.ts +4 -0
  142. package/dist/math/f32/index.js +23 -0
  143. package/dist/math/f32/index.js.map +1 -0
  144. package/dist/math/f32/public.d.ts +1 -0
  145. package/dist/math/f32/public.js +23 -0
  146. package/dist/math/f32/public.js.map +1 -0
  147. package/dist/math/f32/schema.d.ts +5 -0
  148. package/dist/math/f32/schema.js +27 -0
  149. package/dist/math/f32/schema.js.map +1 -0
  150. package/dist/math/f64/index.d.ts +4 -0
  151. package/dist/math/f64/index.js +2 -0
  152. package/dist/math/f64/index.js.map +1 -0
  153. package/dist/math/f64/public.d.ts +1 -0
  154. package/dist/math/f64/public.js +23 -0
  155. package/dist/math/f64/public.js.map +1 -0
  156. package/dist/math/f64/schema.d.ts +5 -0
  157. package/dist/math/f64/schema.js +6 -0
  158. package/dist/math/f64/schema.js.map +1 -0
  159. package/dist/math/i32/index.d.ts +4 -0
  160. package/dist/math/i32/index.js +23 -0
  161. package/dist/math/i32/index.js.map +1 -0
  162. package/dist/math/i32/public.d.ts +1 -0
  163. package/dist/math/i32/public.js +23 -0
  164. package/dist/math/i32/public.js.map +1 -0
  165. package/dist/math/i32/schema.d.ts +6 -0
  166. package/dist/math/i32/schema.js +28 -0
  167. package/dist/math/i32/schema.js.map +1 -0
  168. package/dist/math/index.d.ts +14 -13
  169. package/dist/math/index.js +14 -13
  170. package/dist/math/index.js.map +1 -1
  171. package/dist/math/line2/functions.d.ts +5 -0
  172. package/dist/math/line2/functions.js +61 -0
  173. package/dist/math/line2/functions.js.map +1 -0
  174. package/dist/math/line2/index.d.ts +4 -0
  175. package/dist/math/line2/index.js +23 -0
  176. package/dist/math/line2/index.js.map +1 -0
  177. package/dist/math/line2/layout.d.ts +1 -0
  178. package/dist/math/line2/layout.js +25 -0
  179. package/dist/math/line2/layout.js.map +1 -0
  180. package/dist/math/line2/public.d.ts +3 -0
  181. package/dist/math/line2/public.js +25 -0
  182. package/dist/math/line2/public.js.map +1 -0
  183. package/dist/math/line2/schema.d.ts +33 -0
  184. package/dist/math/line2/schema.js +37 -0
  185. package/dist/math/line2/schema.js.map +1 -0
  186. package/dist/math/line3/functions.d.ts +17 -0
  187. package/dist/math/line3/functions.js +70 -0
  188. package/dist/math/line3/functions.js.map +1 -0
  189. package/dist/math/line3/index.d.ts +4 -0
  190. package/dist/math/line3/index.js +23 -0
  191. package/dist/math/line3/index.js.map +1 -0
  192. package/dist/math/line3/layout.d.ts +1 -0
  193. package/dist/math/line3/layout.js +25 -0
  194. package/dist/math/line3/layout.js.map +1 -0
  195. package/dist/math/line3/public.d.ts +3 -0
  196. package/dist/math/line3/public.js +25 -0
  197. package/dist/math/line3/public.js.map +1 -0
  198. package/dist/math/line3/schema.d.ts +33 -0
  199. package/dist/math/line3/schema.js +37 -0
  200. package/dist/math/line3/schema.js.map +1 -0
  201. package/dist/math/mat4x4/functions.d.ts +23 -0
  202. package/dist/math/mat4x4/functions.js +236 -0
  203. package/dist/math/mat4x4/functions.js.map +1 -0
  204. package/dist/math/mat4x4/index.d.ts +26 -0
  205. package/dist/math/mat4x4/index.js +45 -0
  206. package/dist/math/mat4x4/index.js.map +1 -0
  207. package/dist/math/mat4x4/layout.d.ts +1 -0
  208. package/dist/math/mat4x4/layout.js +25 -0
  209. package/dist/math/mat4x4/layout.js.map +1 -0
  210. package/dist/math/mat4x4/public.d.ts +3 -0
  211. package/dist/math/mat4x4/public.js +25 -0
  212. package/dist/math/mat4x4/public.js.map +1 -0
  213. package/dist/math/mat4x4/schema.d.ts +11 -0
  214. package/dist/math/mat4x4/schema.js +30 -0
  215. package/dist/math/mat4x4/schema.js.map +1 -0
  216. package/dist/math/plane/functions.d.ts +16 -0
  217. package/dist/math/plane/functions.js +55 -0
  218. package/dist/math/plane/functions.js.map +1 -0
  219. package/dist/math/plane/index.d.ts +4 -0
  220. package/dist/math/plane/index.js +23 -0
  221. package/dist/math/plane/index.js.map +1 -0
  222. package/dist/math/plane/layout.d.ts +1 -0
  223. package/dist/math/plane/layout.js +25 -0
  224. package/dist/math/plane/layout.js.map +1 -0
  225. package/dist/math/plane/public.d.ts +3 -0
  226. package/dist/math/plane/public.js +25 -0
  227. package/dist/math/plane/public.js.map +1 -0
  228. package/dist/math/plane/schema.d.ts +24 -0
  229. package/dist/math/plane/schema.js +34 -0
  230. package/dist/math/plane/schema.js.map +1 -0
  231. package/dist/math/quat/constants/functions.d.ts +43 -0
  232. package/dist/math/quat/constants/functions.js +258 -0
  233. package/dist/math/quat/constants/functions.js.map +1 -0
  234. package/dist/math/quat/functions.d.ts +43 -0
  235. package/dist/math/quat/functions.js +258 -0
  236. package/dist/math/quat/functions.js.map +1 -0
  237. package/dist/math/quat/index.d.ts +4 -0
  238. package/dist/math/quat/index.js +23 -0
  239. package/dist/math/quat/index.js.map +1 -0
  240. package/dist/math/quat/layout.d.ts +1 -0
  241. package/dist/math/quat/layout.js +25 -0
  242. package/dist/math/quat/layout.js.map +1 -0
  243. package/dist/math/quat/public.d.ts +3 -0
  244. package/dist/math/quat/public.js +25 -0
  245. package/dist/math/quat/public.js.map +1 -0
  246. package/dist/math/quat/schema.d.ts +11 -0
  247. package/dist/math/quat/schema.js +30 -0
  248. package/dist/math/quat/schema.js.map +1 -0
  249. package/dist/math/u32/index.d.ts +4 -0
  250. package/dist/math/u32/index.js +23 -0
  251. package/dist/math/u32/index.js.map +1 -0
  252. package/dist/math/u32/public.d.ts +1 -0
  253. package/dist/math/u32/public.js +23 -0
  254. package/dist/math/u32/public.js.map +1 -0
  255. package/dist/math/u32/schema.d.ts +6 -0
  256. package/dist/math/u32/schema.js +28 -0
  257. package/dist/math/u32/schema.js.map +1 -0
  258. package/dist/math/vec2/functions.d.ts +48 -0
  259. package/dist/math/vec2/functions.js +104 -0
  260. package/dist/math/vec2/functions.js.map +1 -0
  261. package/dist/math/vec2/index.d.ts +4 -0
  262. package/dist/math/vec2/index.js +23 -0
  263. package/dist/math/vec2/index.js.map +1 -0
  264. package/dist/math/vec2/layout.d.ts +1 -0
  265. package/dist/math/vec2/layout.js +25 -0
  266. package/dist/math/vec2/layout.js.map +1 -0
  267. package/dist/math/vec2/public.d.ts +3 -0
  268. package/dist/math/vec2/public.js +25 -0
  269. package/dist/math/vec2/public.js.map +1 -0
  270. package/dist/math/vec2/schema.d.ts +11 -0
  271. package/dist/math/vec2/schema.js +30 -0
  272. package/dist/math/vec2/schema.js.map +1 -0
  273. package/dist/math/vec3/functions.d.ts +59 -0
  274. package/dist/math/vec3/functions.js +159 -0
  275. package/dist/math/vec3/functions.js.map +1 -0
  276. package/dist/math/vec3/index.d.ts +4 -0
  277. package/dist/math/vec3/index.js +23 -0
  278. package/dist/math/vec3/index.js.map +1 -0
  279. package/dist/math/vec3/layout.d.ts +1 -0
  280. package/dist/math/vec3/layout.js +25 -0
  281. package/dist/math/vec3/layout.js.map +1 -0
  282. package/dist/math/vec3/public.d.ts +3 -0
  283. package/dist/math/vec3/public.js +25 -0
  284. package/dist/math/vec3/public.js.map +1 -0
  285. package/dist/math/vec3/schema.d.ts +11 -0
  286. package/dist/math/vec3/schema.js +30 -0
  287. package/dist/math/vec3/schema.js.map +1 -0
  288. package/dist/math/vec4/functions.d.ts +49 -0
  289. package/dist/math/vec4/functions.js +150 -0
  290. package/dist/math/vec4/functions.js.map +1 -0
  291. package/dist/math/vec4/index.d.ts +4 -0
  292. package/dist/math/vec4/index.js +23 -0
  293. package/dist/math/vec4/index.js.map +1 -0
  294. package/dist/math/vec4/layout.d.ts +1 -0
  295. package/dist/math/vec4/layout.js +25 -0
  296. package/dist/math/vec4/layout.js.map +1 -0
  297. package/dist/math/vec4/public.d.ts +3 -0
  298. package/dist/math/vec4/public.js +25 -0
  299. package/dist/math/vec4/public.js.map +1 -0
  300. package/dist/math/vec4/schema.d.ts +11 -0
  301. package/dist/math/vec4/schema.js +30 -0
  302. package/dist/math/vec4/schema.js.map +1 -0
  303. package/dist/mutable.d.ts +3 -4
  304. package/dist/observe/create-event.d.ts +10 -0
  305. package/dist/observe/create-event.js +22 -0
  306. package/dist/observe/create-event.js.map +1 -0
  307. package/dist/observe/create-persisted-state.d.ts +1 -1
  308. package/dist/observe/create-persisted-state.js +2 -2
  309. package/dist/observe/create-persisted-state.js.map +1 -1
  310. package/dist/observe/create-query-state.d.ts +2 -3
  311. package/dist/observe/create-query-state.js +2 -2
  312. package/dist/observe/create-query-state.js.map +1 -1
  313. package/dist/observe/create-state.d.ts +7 -0
  314. package/dist/observe/create-state.js +27 -0
  315. package/dist/observe/create-state.js.map +1 -0
  316. package/dist/observe/from-array.d.ts +1 -1
  317. package/dist/observe/from-constant.d.ts +1 -1
  318. package/dist/observe/from-element-id.d.ts +1 -1
  319. package/dist/observe/from-element-properties-and-events.d.ts +1 -1
  320. package/dist/observe/from-element-property.d.ts +1 -1
  321. package/dist/observe/from-promise-with-error.d.ts +1 -1
  322. package/dist/observe/from-promise.d.ts +1 -1
  323. package/dist/observe/from-properties.d.ts +1 -1
  324. package/dist/observe/index.d.ts +16 -30
  325. package/dist/observe/index.js +1 -32
  326. package/dist/observe/index.js.map +1 -1
  327. package/dist/observe/observe.test.js +4 -4
  328. package/dist/observe/observe.test.js.map +1 -1
  329. package/dist/observe/public.d.ts +28 -0
  330. package/dist/observe/public.js +50 -0
  331. package/dist/observe/public.js.map +1 -0
  332. package/dist/observe/to-async-generator.d.ts +1 -1
  333. package/dist/observe/to-promise.d.ts +2 -2
  334. package/dist/observe/to-promise.js +1 -1
  335. package/dist/observe/to-properties.d.ts +1 -1
  336. package/dist/observe/with-async-map.d.ts +1 -1
  337. package/dist/observe/with-batch.d.ts +1 -1
  338. package/dist/observe/with-batch.test.js +5 -5
  339. package/dist/observe/with-batch.test.js.map +1 -1
  340. package/dist/observe/with-cache.d.ts +1 -1
  341. package/dist/observe/with-copy.d.ts +1 -1
  342. package/dist/observe/with-deduplicate-data.d.ts +1 -1
  343. package/dist/observe/with-deduplicate.d.ts +1 -1
  344. package/dist/observe/with-default.d.ts +1 -1
  345. package/dist/observe/with-filter.d.ts +1 -1
  346. package/dist/observe/with-lazy.d.ts +1 -1
  347. package/dist/observe/with-lazy.test.js +3 -3
  348. package/dist/observe/with-lazy.test.js.map +1 -1
  349. package/dist/observe/with-map-data.d.ts +1 -1
  350. package/dist/observe/with-map.d.ts +1 -1
  351. package/dist/observe/with-optional.d.ts +1 -1
  352. package/dist/observe/with-unwrap.d.ts +1 -1
  353. package/dist/old-ecs/action-ecs/action-ecs.js +2 -2
  354. package/dist/old-ecs/action-ecs/action-ecs.js.map +1 -1
  355. package/dist/old-ecs/action-ecs/action-ecs.test.js +3 -3
  356. package/dist/old-ecs/action-ecs/action-ecs.test.js.map +1 -1
  357. package/dist/old-ecs/action-ecs/action-types.d.ts +4 -4
  358. package/dist/old-ecs/core-ecs/core-ecs-serialization.test.js +3 -3
  359. package/dist/old-ecs/core-ecs/core-ecs-serialization.test.js.map +1 -1
  360. package/dist/old-ecs/core-ecs/core-ecs-types.d.ts +3 -3
  361. package/dist/old-ecs/core-ecs/core-ecs.js +2 -2
  362. package/dist/old-ecs/core-ecs/core-ecs.js.map +1 -1
  363. package/dist/old-ecs/core-ecs/core-ecs.test.js +2 -2
  364. package/dist/old-ecs/core-ecs/core-ecs.test.js.map +1 -1
  365. package/dist/old-ecs/ecs/ecs-types.d.ts +3 -3
  366. package/dist/old-ecs/ecs/ecs.test.js +3 -3
  367. package/dist/old-ecs/ecs/ecs.test.js.map +1 -1
  368. package/dist/old-ecs/entity.d.ts +2 -2
  369. package/dist/old-ecs/entity.js +2 -2
  370. package/dist/old-ecs/entity.js.map +1 -1
  371. package/dist/old-ecs/transaction-ecs/transaction-types.d.ts +4 -4
  372. package/dist/perftest/ecs-perf.js +11 -11
  373. package/dist/perftest/ecs-perf.js.map +1 -1
  374. package/dist/samples/todo/elements/todo-toolbar/todo-toolbar.js +3 -3
  375. package/dist/samples/todo/elements/todo-toolbar/todo-toolbar.js.map +1 -1
  376. package/dist/samples/todo/services/dependent-state-service/create-dependent-state-service.d.ts +3 -3
  377. package/dist/samples/todo/services/dependent-state-service/dependent-state/all-todos.d.ts +1 -1
  378. package/dist/samples/todo/services/dependent-state-service/dependent-state/complete-todos.d.ts +1 -1
  379. package/dist/samples/todo/services/dependent-state-service/dependent-state/incomplete-todos.d.ts +1 -1
  380. package/dist/samples/todo/services/state-service/create-todo-database.d.ts +2 -2
  381. package/dist/samples/todo/services/state-service/create-todo-store.d.ts +2 -2
  382. package/dist/samples/todo/services/state-service/create-todo-store.js +5 -4
  383. package/dist/samples/todo/services/state-service/create-todo-store.js.map +1 -1
  384. package/dist/schema/FromSchemas.d.ts +4 -0
  385. package/dist/schema/FromSchemas.js +2 -0
  386. package/dist/schema/FromSchemas.js.map +1 -0
  387. package/dist/schema/boolean/index.d.ts +4 -0
  388. package/dist/schema/boolean/index.js +23 -0
  389. package/dist/schema/boolean/index.js.map +1 -0
  390. package/dist/schema/boolean/public.d.ts +1 -0
  391. package/dist/schema/boolean/public.js +23 -0
  392. package/dist/schema/boolean/public.js.map +1 -0
  393. package/dist/schema/boolean/schema.d.ts +3 -0
  394. package/dist/schema/boolean/schema.js +4 -0
  395. package/dist/schema/boolean/schema.js.map +1 -0
  396. package/dist/schema/from-schemas.d.ts +5 -0
  397. package/dist/schema/from-schemas.js +2 -0
  398. package/dist/schema/from-schemas.js.map +1 -0
  399. package/dist/schema/index.d.ts +9 -8
  400. package/dist/schema/index.js +6 -7
  401. package/dist/schema/index.js.map +1 -1
  402. package/dist/schema/public.d.ts +4 -0
  403. package/dist/schema/public.js +26 -0
  404. package/dist/schema/public.js.map +1 -0
  405. package/dist/schema/schema copy.d.ts +147 -0
  406. package/dist/schema/schema copy.js +34 -0
  407. package/dist/schema/schema copy.js.map +1 -0
  408. package/dist/schema/schema.d.ts +2 -80
  409. package/dist/schema/schema.js +0 -10
  410. package/dist/schema/schema.js.map +1 -1
  411. package/dist/schema/time/index.d.ts +4 -0
  412. package/dist/schema/time/index.js +23 -0
  413. package/dist/schema/time/index.js.map +1 -0
  414. package/dist/schema/time/public.d.ts +1 -0
  415. package/dist/schema/time/public.js +23 -0
  416. package/dist/schema/time/public.js.map +1 -0
  417. package/dist/schema/time/schema.d.ts +5 -0
  418. package/dist/schema/time/schema.js +24 -0
  419. package/dist/schema/time/schema.js.map +1 -0
  420. package/dist/schema/to-type.d.ts +77 -0
  421. package/dist/schema/to-type.js +33 -0
  422. package/dist/schema/to-type.js.map +1 -0
  423. package/dist/schema/to-vertex-buffer-layout.d.ts +2 -2
  424. package/dist/schema/to-vertex-buffer-layout.js +28 -14
  425. package/dist/schema/to-vertex-buffer-layout.js.map +1 -1
  426. package/dist/schema/to-vertex-buffer-layout.test.js +18 -18
  427. package/dist/schema/to-vertex-buffer-layout.test.js.map +1 -1
  428. package/dist/schema/true/index.d.ts +4 -0
  429. package/dist/schema/true/index.js +23 -0
  430. package/dist/schema/true/index.js.map +1 -0
  431. package/dist/schema/true/public.d.ts +1 -0
  432. package/dist/schema/true/public.js +23 -0
  433. package/dist/schema/true/public.js.map +1 -0
  434. package/dist/schema/true/schema.d.ts +5 -0
  435. package/dist/schema/true/schema.js +2 -0
  436. package/dist/schema/true/schema.js.map +1 -0
  437. package/dist/schema/type.d.ts +76 -0
  438. package/dist/schema/type.js +33 -0
  439. package/dist/schema/type.js.map +1 -0
  440. package/dist/schema/validation/with-validation.d.ts +2 -2
  441. package/dist/schema/validation/with-validation.js.map +1 -1
  442. package/dist/schema/validation/with-validation.test.js.map +1 -1
  443. package/dist/service/add-observable-actions.d.ts +5 -5
  444. package/dist/service/add-observable-actions.js +2 -2
  445. package/dist/service/add-observable-actions.js.map +1 -1
  446. package/dist/service/index.d.ts +1 -1
  447. package/dist/service/index.js.map +1 -1
  448. package/dist/service/progressive-result.d.ts +2 -3
  449. package/dist/table/add-row.d.ts +2 -2
  450. package/dist/table/add-row.js +2 -2
  451. package/dist/table/create-table.d.ts +2 -2
  452. package/dist/table/create-table.js.map +1 -1
  453. package/dist/table/delete-row.d.ts +2 -2
  454. package/dist/table/delete-row.js +2 -2
  455. package/dist/table/row-index.d.ts +2 -2
  456. package/dist/table/row-index.js +2 -2
  457. package/dist/table/row-index.js.map +1 -1
  458. package/dist/table/table-compact.test.js +9 -9
  459. package/dist/table/table-compact.test.js.map +1 -1
  460. package/dist/table/update-row.d.ts +4 -3
  461. package/dist/table/update-row.js +4 -3
  462. package/dist/table/update-row.js.map +1 -1
  463. package/dist/tsconfig.tsbuildinfo +1 -1
  464. package/dist/typed-buffer/create-array-buffer.d.ts +2 -2
  465. package/dist/typed-buffer/create-const-buffer.d.ts +1 -1
  466. package/dist/typed-buffer/create-number-buffer.d.ts +1 -1
  467. package/dist/typed-buffer/create-number-buffer.js +4 -4
  468. package/dist/typed-buffer/create-number-buffer.js.map +1 -1
  469. package/dist/typed-buffer/create-number-buffer.test.js +2 -2
  470. package/dist/typed-buffer/create-number-buffer.test.js.map +1 -1
  471. package/dist/typed-buffer/create-struct-buffer.d.ts +3 -3
  472. package/dist/typed-buffer/create-struct-buffer.js.map +1 -1
  473. package/dist/typed-buffer/create-struct-buffer.test.js +10 -10
  474. package/dist/typed-buffer/create-struct-buffer.test.js.map +1 -1
  475. package/dist/typed-buffer/create-typed-buffer.d.ts +3 -3
  476. package/dist/typed-buffer/create-typed-buffer.js.map +1 -1
  477. package/dist/typed-buffer/index.d.ts +1 -0
  478. package/dist/typed-buffer/structs/assert-struct.d.ts +1 -1
  479. package/dist/typed-buffer/structs/get-struct-layout.d.ts +1 -1
  480. package/dist/typed-buffer/structs/get-struct-layout.js +4 -4
  481. package/dist/typed-buffer/structs/get-struct-layout.js.map +1 -1
  482. package/dist/typed-buffer/structs/get-struct-layout.test.js +12 -12
  483. package/dist/typed-buffer/structs/get-struct-layout.test.js.map +1 -1
  484. package/dist/typed-buffer/structs/struct-layout.d.ts +1 -1
  485. package/dist/typed-buffer/typed-buffer.d.ts +1 -1
  486. package/dist/types/index.d.ts +1 -0
  487. package/dist/types/types.d.ts +1 -2
  488. package/package.json +1 -1
@@ -0,0 +1,30 @@
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 { F32 } from "../f32/index.js";
23
+ export const schema = {
24
+ type: 'array',
25
+ items: F32.schema,
26
+ minItems: 3,
27
+ maxItems: 3,
28
+ default: [0, 0, 0],
29
+ };
30
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/math/vec3/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAGtC,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,GAAG,CAAC,MAAM;IACjB,QAAQ,EAAE,CAAC;IACX,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;CACK,CAAC"}
@@ -0,0 +1,49 @@
1
+ import type { Vec4 } from "./index.js";
2
+ export declare const abs: ([x, y, z, w]: Vec4) => Vec4;
3
+ export declare const ceil: ([x, y, z, w]: Vec4) => Vec4;
4
+ export declare const floor: ([x, y, z, w]: Vec4) => Vec4;
5
+ export declare const round: ([x, y, z, w]: Vec4) => Vec4;
6
+ export declare const trunc: ([x, y, z, w]: Vec4) => Vec4;
7
+ export declare const min: ([x1, y1, z1, w1]: Vec4, [x2, y2, z2, w2]: Vec4) => Vec4;
8
+ export declare const max: ([x1, y1, z1, w1]: Vec4, [x2, y2, z2, w2]: Vec4) => Vec4;
9
+ export declare const clamp: (v: Vec4, minVec: Vec4, maxVec: Vec4) => Vec4;
10
+ export declare const mix: ([x1, y1, z1, w1]: Vec4, [x2, y2, z2, w2]: Vec4, t: number) => Vec4;
11
+ export declare const step: ([edge1, edge2, edge3, edge4]: Vec4, [x, y, z, w]: Vec4) => Vec4;
12
+ export declare const smoothstep: ([e0x, e0y, e0z, e0w]: Vec4, [e1x, e1y, e1z, e1w]: Vec4, [x, y, z, w]: Vec4) => Vec4;
13
+ export declare const length: ([x, y, z, w]: Vec4) => number;
14
+ export declare const distance: (a: Vec4, b: Vec4) => number;
15
+ export declare const dot: ([x1, y1, z1, w1]: Vec4, [x2, y2, z2, w2]: Vec4) => number;
16
+ export declare const normalize: (v: Vec4) => Vec4;
17
+ export declare const faceforward: (n: Vec4, i: Vec4, nref: Vec4) => Vec4;
18
+ export declare const reflect: (i: Vec4, n: Vec4) => Vec4;
19
+ export declare const refract: (i: Vec4, n: Vec4, eta: number) => Vec4;
20
+ export declare const sin: ([x, y, z, w]: Vec4) => Vec4;
21
+ export declare const cos: ([x, y, z, w]: Vec4) => Vec4;
22
+ export declare const tan: ([x, y, z, w]: Vec4) => Vec4;
23
+ export declare const asin: ([x, y, z, w]: Vec4) => Vec4;
24
+ export declare const acos: ([x, y, z, w]: Vec4) => Vec4;
25
+ export declare const atan: ([x, y, z, w]: Vec4) => Vec4;
26
+ export declare const sinh: ([x, y, z, w]: Vec4) => Vec4;
27
+ export declare const cosh: ([x, y, z, w]: Vec4) => Vec4;
28
+ export declare const tanh: ([x, y, z, w]: Vec4) => Vec4;
29
+ export declare const asinh: ([x, y, z, w]: Vec4) => Vec4;
30
+ export declare const acosh: ([x, y, z, w]: Vec4) => Vec4;
31
+ export declare const atanh: ([x, y, z, w]: Vec4) => Vec4;
32
+ export declare const sign: ([x, y, z, w]: Vec4) => Vec4;
33
+ export declare const fract: ([x, y, z, w]: Vec4) => Vec4;
34
+ export declare const mod: ([x, y, z, w]: Vec4, m: number) => Vec4;
35
+ export declare const modf: ([x, y, z, w]: Vec4) => {
36
+ fract: Vec4;
37
+ whole: Vec4;
38
+ };
39
+ export declare const pow: ([x1, y1, z1, w1]: Vec4, [x2, y2, z2, w2]: Vec4) => Vec4;
40
+ export declare const exp: ([x, y, z, w]: Vec4) => Vec4;
41
+ export declare const exp2: ([x, y, z, w]: Vec4) => Vec4;
42
+ export declare const log: ([x, y, z, w]: Vec4) => Vec4;
43
+ export declare const log2: ([x, y, z, w]: Vec4) => Vec4;
44
+ export declare const sqrt: ([x, y, z, w]: Vec4) => Vec4;
45
+ export declare const add: ([x1, y1, z1, w1]: Vec4, [x2, y2, z2, w2]: Vec4) => Vec4;
46
+ export declare const subtract: ([x1, y1, z1, w1]: Vec4, [x2, y2, z2, w2]: Vec4) => Vec4;
47
+ export declare const multiply: ([x1, y1, z1, w1]: Vec4, [x2, y2, z2, w2]: Vec4) => Vec4;
48
+ export declare const scale: ([x, y, z, w]: Vec4, s: number) => Vec4;
49
+ export declare const negate: ([x, y, z, w]: Vec4) => Vec4;
@@ -0,0 +1,150 @@
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
+ // Mathematical Operations
23
+ export const abs = ([x, y, z, w]) => [Math.abs(x), Math.abs(y), Math.abs(z), Math.abs(w)];
24
+ export const ceil = ([x, y, z, w]) => [Math.ceil(x), Math.ceil(y), Math.ceil(z), Math.ceil(w)];
25
+ export const floor = ([x, y, z, w]) => [Math.floor(x), Math.floor(y), Math.floor(z), Math.floor(w)];
26
+ export const round = ([x, y, z, w]) => [Math.round(x), Math.round(y), Math.round(z), Math.round(w)];
27
+ export const trunc = ([x, y, z, w]) => [Math.trunc(x), Math.trunc(y), Math.trunc(z), Math.trunc(w)];
28
+ export const min = ([x1, y1, z1, w1], [x2, y2, z2, w2]) => [
29
+ Math.min(x1, x2),
30
+ Math.min(y1, y2),
31
+ Math.min(z1, z2),
32
+ Math.min(w1, w2)
33
+ ];
34
+ export const max = ([x1, y1, z1, w1], [x2, y2, z2, w2]) => [
35
+ Math.max(x1, x2),
36
+ Math.max(y1, y2),
37
+ Math.max(z1, z2),
38
+ Math.max(w1, w2)
39
+ ];
40
+ export const clamp = (v, minVec, maxVec) => min(max(v, minVec), maxVec);
41
+ export const mix = ([x1, y1, z1, w1], [x2, y2, z2, w2], t) => [
42
+ x1 * (1 - t) + x2 * t,
43
+ y1 * (1 - t) + y2 * t,
44
+ z1 * (1 - t) + z2 * t,
45
+ w1 * (1 - t) + w2 * t
46
+ ];
47
+ export const step = ([edge1, edge2, edge3, edge4], [x, y, z, w]) => [
48
+ x < edge1 ? 0 : 1,
49
+ y < edge2 ? 0 : 1,
50
+ z < edge3 ? 0 : 1,
51
+ w < edge4 ? 0 : 1
52
+ ];
53
+ export const smoothstep = ([e0x, e0y, e0z, e0w], [e1x, e1y, e1z, e1w], [x, y, z, w]) => {
54
+ const tx = Math.max(0, Math.min(1, (x - e0x) / (e1x - e0x)));
55
+ const ty = Math.max(0, Math.min(1, (y - e0y) / (e1y - e0y)));
56
+ const tz = Math.max(0, Math.min(1, (z - e0z) / (e1z - e0z)));
57
+ const tw = Math.max(0, Math.min(1, (w - e0w) / (e1w - e0w)));
58
+ return [
59
+ tx * tx * (3 - 2 * tx),
60
+ ty * ty * (3 - 2 * ty),
61
+ tz * tz * (3 - 2 * tz),
62
+ tw * tw * (3 - 2 * tw)
63
+ ];
64
+ };
65
+ // Geometric Functions
66
+ export const length = ([x, y, z, w]) => Math.sqrt(x * x + y * y + z * z + w * w);
67
+ export const distance = (a, b) => length(subtract(b, a));
68
+ export const dot = ([x1, y1, z1, w1], [x2, y2, z2, w2]) => x1 * x2 + y1 * y2 + z1 * z2 + w1 * w2;
69
+ export const normalize = (v) => {
70
+ const len = length(v);
71
+ return len === 0 ? [0, 0, 0, 0] : scale(v, 1 / len);
72
+ };
73
+ export const faceforward = (n, i, nref) => dot(nref, i) < 0 ? n : negate(n);
74
+ export const reflect = (i, n) => {
75
+ const dot2 = dot(n, i) * 2;
76
+ return subtract(i, scale(n, dot2));
77
+ };
78
+ export const refract = (i, n, eta) => {
79
+ const dotProduct = dot(n, i);
80
+ const k = 1.0 - eta * eta * (1.0 - dotProduct * dotProduct);
81
+ if (k < 0.0) {
82
+ return [0, 0, 0, 0];
83
+ }
84
+ const scaleFactor = eta * dotProduct + Math.sqrt(k);
85
+ return subtract(scale(i, eta), scale(n, scaleFactor));
86
+ };
87
+ // Trigonometric Functions
88
+ export const sin = ([x, y, z, w]) => [Math.sin(x), Math.sin(y), Math.sin(z), Math.sin(w)];
89
+ export const cos = ([x, y, z, w]) => [Math.cos(x), Math.cos(y), Math.cos(z), Math.cos(w)];
90
+ export const tan = ([x, y, z, w]) => [Math.tan(x), Math.tan(y), Math.tan(z), Math.tan(w)];
91
+ export const asin = ([x, y, z, w]) => [Math.asin(x), Math.asin(y), Math.asin(z), Math.asin(w)];
92
+ export const acos = ([x, y, z, w]) => [Math.acos(x), Math.acos(y), Math.acos(z), Math.acos(w)];
93
+ export const atan = ([x, y, z, w]) => [Math.atan(x), Math.atan(y), Math.atan(z), Math.atan(w)];
94
+ export const sinh = ([x, y, z, w]) => [Math.sinh(x), Math.sinh(y), Math.sinh(z), Math.sinh(w)];
95
+ export const cosh = ([x, y, z, w]) => [Math.cosh(x), Math.cosh(y), Math.cosh(z), Math.cosh(w)];
96
+ export const tanh = ([x, y, z, w]) => [Math.tanh(x), Math.tanh(y), Math.tanh(z), Math.tanh(w)];
97
+ export const asinh = ([x, y, z, w]) => [Math.asinh(x), Math.asinh(y), Math.asinh(z), Math.asinh(w)];
98
+ export const acosh = ([x, y, z, w]) => [Math.acosh(x), Math.acosh(y), Math.acosh(z), Math.acosh(w)];
99
+ export const atanh = ([x, y, z, w]) => [Math.atanh(x), Math.atanh(y), Math.atanh(z), Math.atanh(w)];
100
+ // Common Functions
101
+ export const sign = ([x, y, z, w]) => [Math.sign(x), Math.sign(y), Math.sign(z), Math.sign(w)];
102
+ export const fract = ([x, y, z, w]) => [
103
+ x - Math.floor(x),
104
+ y - Math.floor(y),
105
+ z - Math.floor(z),
106
+ w - Math.floor(w)
107
+ ];
108
+ export const mod = ([x, y, z, w], m) => [
109
+ ((x % m) + m) % m,
110
+ ((y % m) + m) % m,
111
+ ((z % m) + m) % m,
112
+ ((w % m) + m) % m
113
+ ];
114
+ export const modf = ([x, y, z, w]) => ({
115
+ whole: [Math.trunc(x), Math.trunc(y), Math.trunc(z), Math.trunc(w)],
116
+ fract: [x - Math.trunc(x), y - Math.trunc(y), z - Math.trunc(z), w - Math.trunc(w)]
117
+ });
118
+ export const pow = ([x1, y1, z1, w1], [x2, y2, z2, w2]) => [
119
+ Math.pow(x1, x2),
120
+ Math.pow(y1, y2),
121
+ Math.pow(z1, z2),
122
+ Math.pow(w1, w2)
123
+ ];
124
+ export const exp = ([x, y, z, w]) => [Math.exp(x), Math.exp(y), Math.exp(z), Math.exp(w)];
125
+ export const exp2 = ([x, y, z, w]) => [Math.pow(2, x), Math.pow(2, y), Math.pow(2, z), Math.pow(2, w)];
126
+ export const log = ([x, y, z, w]) => [Math.log(x), Math.log(y), Math.log(z), Math.log(w)];
127
+ export const log2 = ([x, y, z, w]) => [Math.log2(x), Math.log2(y), Math.log2(z), Math.log2(w)];
128
+ export const sqrt = ([x, y, z, w]) => [Math.sqrt(x), Math.sqrt(y), Math.sqrt(z), Math.sqrt(w)];
129
+ // Helper functions needed by some of the above
130
+ export const add = ([x1, y1, z1, w1], [x2, y2, z2, w2]) => [
131
+ x1 + x2,
132
+ y1 + y2,
133
+ z1 + z2,
134
+ w1 + w2
135
+ ];
136
+ export const subtract = ([x1, y1, z1, w1], [x2, y2, z2, w2]) => [
137
+ x1 - x2,
138
+ y1 - y2,
139
+ z1 - z2,
140
+ w1 - w2
141
+ ];
142
+ export const multiply = ([x1, y1, z1, w1], [x2, y2, z2, w2]) => [
143
+ x1 * x2,
144
+ y1 * y2,
145
+ z1 * z2,
146
+ w1 * w2
147
+ ];
148
+ export const scale = ([x, y, z, w], s) => [x * s, y * s, z * s, w * s];
149
+ export const negate = ([x, y, z, w]) => [-x, -y, -z, -w];
150
+ //# sourceMappingURL=functions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functions.js","sourceRoot":"","sources":["../../../src/math/vec4/functions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAIX,0BAA0B;AAC1B,MAAM,CAAC,MAAM,GAAG,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAO,EAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACtG,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAO,EAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3G,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAO,EAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AAChH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,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G,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAO,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAO,EAAQ,EAAE,CAAC;IAC9E,EAAE,GAAG,EAAE;IACP,EAAE,GAAG,EAAE;IACP,EAAE,GAAG,EAAE;IACP,EAAE,GAAG,EAAE;CACV,CAAC;AACF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAO,EAAE,CAAS,EAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AAC3F,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAO,EAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Schema } from "../../schema/index.js";
2
+ import { schema } from "./schema.js";
3
+ export type Vec4 = Schema.ToType<typeof schema>;
4
+ export * as Vec4 from "./public.js";
@@ -0,0 +1,23 @@
1
+ /*MIT License
2
+
3
+ © Copyright 2025 Adobe. All rights reserved.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.*/
22
+ export * as Vec4 from "./public.js";
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/math/vec4/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAOX,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ export declare const layout: import("../../typed-buffer/index.js").StructLayout;
@@ -0,0 +1,25 @@
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 { getStructLayout } from "../../typed-buffer/index.js";
23
+ import { schema } from "./schema.js";
24
+ export const layout = getStructLayout(schema);
25
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sourceRoot":"","sources":["../../../src/math/vec4/layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from "./functions.js";
2
+ export * from "./layout.js";
3
+ export * from "./schema.js";
@@ -0,0 +1,25 @@
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 * from "./functions.js";
23
+ export * from "./layout.js";
24
+ export * from "./schema.js";
25
+ //# sourceMappingURL=public.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public.js","sourceRoot":"","sources":["../../../src/math/vec4/public.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const schema: {
2
+ readonly type: "array";
3
+ readonly items: {
4
+ readonly type: "number";
5
+ readonly precision: 1;
6
+ readonly default: number;
7
+ };
8
+ readonly minItems: 4;
9
+ readonly maxItems: 4;
10
+ readonly default: readonly [0, 0, 0, 0];
11
+ };
@@ -0,0 +1,30 @@
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 { F32 } from "../f32/index.js";
23
+ export const schema = {
24
+ type: 'array',
25
+ items: F32.schema,
26
+ minItems: 4,
27
+ maxItems: 4,
28
+ default: [0, 0, 0, 0],
29
+ };
30
+ //# sourceMappingURL=schema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/math/vec4/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAEX,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAGtC,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,GAAG,CAAC,MAAM;IACjB,QAAQ,EAAE,CAAC;IACX,QAAQ,EAAE,CAAC;IACX,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;CACE,CAAC"}
package/dist/mutable.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  export type Mutable<T> = T extends readonly (infer U)[] ? U[] extends T ? MutableArray<T> : MutableTuple<T> : T extends object ? T extends Function | Date | RegExp | Error | Promise<any> ? T : MutableObject<T> : T;
2
- type MutableObject<T> = {
2
+ export type MutableObject<T> = {
3
3
  -readonly [P in keyof T]: Mutable<T[P]>;
4
4
  };
5
- type MutableArray<T extends readonly any[]> = T[number][] & MutableObject<T>;
6
- type MutableTuple<T extends readonly any[]> = {
5
+ export type MutableArray<T extends readonly any[]> = T[number][] & MutableObject<T>;
6
+ export type MutableTuple<T extends readonly any[]> = {
7
7
  -readonly [K in keyof T]: Mutable<T[K]>;
8
8
  };
9
- export {};
@@ -0,0 +1,10 @@
1
+ import { Observe } from "./index.js";
2
+ /**
3
+ * Creates a new observe function that will serve as an event stream and a notify function
4
+ * which can be used to notify all observers of a new value.
5
+ * Note that Observers will only see values when notify is called.
6
+ */
7
+ export declare function createEvent<T>(): [
8
+ Observe<T>,
9
+ (value: T) => void
10
+ ];
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Creates a new observe function that will serve as an event stream and a notify function
3
+ * which can be used to notify all observers of a new value.
4
+ * Note that Observers will only see values when notify is called.
5
+ */
6
+ export function createEvent() {
7
+ const observers = new Set();
8
+ return [
9
+ (observer) => {
10
+ observers.add(observer);
11
+ return () => {
12
+ observers.delete(observer);
13
+ };
14
+ },
15
+ (value) => {
16
+ for (const observer of observers) {
17
+ observer(value);
18
+ }
19
+ },
20
+ ];
21
+ }
22
+ //# sourceMappingURL=create-event.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-event.js","sourceRoot":"","sources":["../../src/observe/create-event.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,MAAM,UAAU,WAAW;IAIzB,MAAM,SAAS,GAAG,IAAI,GAAG,EAAa,CAAC;IACvC,OAAO;QACL,CAAC,QAAQ,EAAE,EAAE;YACX,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACxB,OAAO,GAAG,EAAE;gBACV,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC7B,CAAC,CAAC;QACJ,CAAC;QACD,CAAC,KAAK,EAAE,EAAE;YACR,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;gBACjC,QAAQ,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { Data } from "../index.js";
2
- import { Observe } from "./types.js";
2
+ import { Observe } from "./index.js";
3
3
  /**
4
4
  * Creates a simple state observable that also returns a function to update the value.
5
5
  * The state is persisted to the provided storage.
@@ -1,4 +1,4 @@
1
- import { createObservableState } from "./create-observable-state.js";
1
+ import { createState } from "./create-state.js";
2
2
  /**
3
3
  * Creates a simple state observable that also returns a function to update the value.
4
4
  * The state is persisted to the provided storage.
@@ -20,7 +20,7 @@ export function createPersistedState(key, initialValue, storage = localStorage)
20
20
  }
21
21
  }
22
22
  // Create observable state with either stored or initial value
23
- const [observable, setValue] = createObservableState(storedValue ?? initialValue);
23
+ const [observable, setValue] = createState(storedValue ?? initialValue);
24
24
  // Wrap setValue to persist changes to storage
25
25
  const setValueAndStore = (value) => {
26
26
  setValue(value);
@@ -1 +1 @@
1
- {"version":3,"file":"create-persisted-state.js","sourceRoot":"","sources":["../../src/observe/create-persisted-state.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAGrE;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAClC,GAAW,EACX,YAAgB,EAChB,OAAO,GAAG,YAAY;IAEtB,yCAAyC;IACzC,IAAI,WAA0B,CAAC;IAC/B,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACxC,IAAI,UAAU,EAAE,CAAC;QACf,IAAI,CAAC;YACH,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAM,CAAC;QAC5C,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,IAAI,CAAC,qCAAqC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAED,8DAA8D;IAC9D,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,GAAG,qBAAqB,CAAC,WAAW,IAAI,YAAY,CAAC,CAAC;IAElF,8CAA8C;IAC9C,MAAM,gBAAgB,GAAG,CAAC,KAAQ,EAAE,EAAE;QACpC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChB,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAC;IAEF,OAAO,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;AACxC,CAAC"}
1
+ {"version":3,"file":"create-persisted-state.js","sourceRoot":"","sources":["../../src/observe/create-persisted-state.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD;;;;;;;GAOG;AACH,MAAM,UAAU,oBAAoB,CAClC,GAAW,EACX,YAAgB,EAChB,OAAO,GAAG,YAAY;IAEtB,yCAAyC;IACzC,IAAI,WAA0B,CAAC;IAC/B,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACxC,IAAI,UAAU,EAAE,CAAC;QACf,IAAI,CAAC;YACH,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAM,CAAC;QAC5C,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,OAAO,CAAC,IAAI,CAAC,qCAAqC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAED,8DAA8D;IAC9D,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,GAAG,WAAW,CAAC,WAAW,IAAI,YAAY,CAAC,CAAC;IAExE,8CAA8C;IAC9C,MAAM,gBAAgB,GAAG,CAAC,KAAQ,EAAE,EAAE;QACpC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAChB,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAC;IAEF,OAAO,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;AACxC,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { Data } from "../data.js";
2
- import { Observe } from "./types.js";
3
- type SetValue<T> = (value: T) => void;
2
+ import { Observe } from "./index.js";
3
+ export type SetValue<T> = (value: T) => void;
4
4
  /**
5
5
  * Creates an observable state that syncs with URL query parameters.
6
6
  * @param key - The query parameter key to use
@@ -13,4 +13,3 @@ export declare const createQueryState: <T extends Data>(key: string, initialValu
13
13
  deserialize?: (value: string) => T;
14
14
  replaceState?: boolean;
15
15
  }) => [Observe<T>, SetValue<T>];
16
- export {};
@@ -19,7 +19,7 @@ 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 { createObservableState } from "./create-observable-state.js";
22
+ import { createState } from "./create-state.js";
23
23
  /**
24
24
  * Creates an observable state that syncs with URL query parameters.
25
25
  * @param key - The query parameter key to use
@@ -34,7 +34,7 @@ export const createQueryState = (key, initialValue, options = {}) => {
34
34
  const urlValue = urlParams.get(key);
35
35
  const initial = urlValue ? deserialize(urlValue) : initialValue;
36
36
  // Create the observable state
37
- const [observe, setValue] = createObservableState(initial);
37
+ const [observe, setValue] = createState(initial);
38
38
  // Create a wrapped setValue that updates both state and URL
39
39
  const setQueryValue = (newValue) => {
40
40
  setValue(newValue);
@@ -1 +1 @@
1
- {"version":3,"file":"create-query-state.js","sourceRoot":"","sources":["../../src/observe/create-query-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;WAoBW;AAGX,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AAKrE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC5B,GAAW,EACX,YAAe,EACf,UAII,EAAE,EACmB,EAAE;IAC3B,MAAM,EACF,SAAS,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EACpC,WAAW,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAClC,YAAY,GAAG,KAAK,EACvB,GAAG,OAAO,CAAC;IAEZ,0CAA0C;IAC1C,MAAM,SAAS,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CA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+ import { Observe } from "./index.js";
2
+ /**
3
+ * Creates a simple state observe function and a setValue function to update the value.
4
+ * When observed, the current state if any will be immediately and synchronously sent to the observer callback.
5
+ * @param initialValue The initial value of the state.
6
+ */
7
+ export declare function createState<T>(initialValue?: T): [Observe<T>, (value: T) => void];
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Creates a simple state observe function and a setValue function to update the value.
3
+ * When observed, the current state if any will be immediately and synchronously sent to the observer callback.
4
+ * @param initialValue The initial value of the state.
5
+ */
6
+ export function createState(initialValue) {
7
+ let value = initialValue;
8
+ const observers = new Set();
9
+ return [
10
+ (observer) => {
11
+ observers.add(observer);
12
+ if (value !== undefined) {
13
+ observer(value);
14
+ }
15
+ return () => {
16
+ observers.delete(observer);
17
+ };
18
+ },
19
+ (newValue) => {
20
+ value = newValue;
21
+ for (const observer of observers) {
22
+ observer(newValue);
23
+ }
24
+ },
25
+ ];
26
+ }
27
+ //# sourceMappingURL=create-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-state.js","sourceRoot":"","sources":["../../src/observe/create-state.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,MAAM,UAAU,WAAW,CACzB,YAAgB;IAEhB,IAAI,KAAK,GAAkB,YAAY,CAAC;IACxC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAa,CAAC;IACvC,OAAO;QACL,CAAC,QAAQ,EAAE,EAAE;YACX,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACxB,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACxB,QAAQ,CAAC,KAAK,CAAC,CAAC;YAClB,CAAC;YACD,OAAO,GAAG,EAAE;gBACV,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC7B,CAAC,CAAC;QACJ,CAAC;QACD,CAAC,QAAQ,EAAE,EAAE;YACX,KAAK,GAAG,QAAQ,CAAC;YACjB,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;gBACjC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACrB,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Observe } from "./types.js";
1
+ import { Observe } from "./index.js";
2
2
  /**
3
3
  * Given an array of observe functions, returns a single observe function that will yield an array of each value.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { Observe } from "./types.js";
1
+ import { Observe } from "./index.js";
2
2
  /**
3
3
  * Converts a constant value into an Observe<T> function.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { Observe } from "./types.js";
1
+ import { Observe } from "./index.js";
2
2
  /**
3
3
  * Uses DOM MutationObserver to watch for the addition or removal of an element with a specific id.
4
4
  * @param id The id of the element to watch for.
@@ -1,2 +1,2 @@
1
- import { Observe } from "./types.js";
1
+ import { Observe } from "./index.js";
2
2
  export declare function fromElementPropertyAndEvents<T extends HTMLElement, K extends keyof T, E extends keyof HTMLElementEventMap>(element: T, property: K, events: E[]): Observe<T[K]>;
@@ -1,4 +1,4 @@
1
- import { Observe } from "./types.js";
1
+ import { Observe } from "./index.js";
2
2
  /**
3
3
  * Returns an observable that will notify observers when the element property changes.
4
4
  * If there are any events provided, then the observer will be notified when the event is triggered.
@@ -1,4 +1,4 @@
1
- import { Observe } from "./types.js";
1
+ import { Observe } from "./index.js";
2
2
  /**
3
3
  * Creates a new Observer that will notify observers exactly once when the promise is resolved.
4
4
  * In the event of an error, the observer will be notified with the error.