@warp-drive/core 5.6.0-alpha.11

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 (337) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/LICENSE.md +23 -0
  3. package/README.md +70 -0
  4. package/addon-main.cjs +5 -0
  5. package/cjs-dist/addon-shim.cjs +1 -0
  6. package/cjs-dist/cjs-set-config.cjs +1 -0
  7. package/declarations/build-config/babel-macros.d.ts +2 -0
  8. package/declarations/build-config/babel-macros.d.ts.map +1 -0
  9. package/declarations/build-config/canary-features.d.ts +2 -0
  10. package/declarations/build-config/canary-features.d.ts.map +1 -0
  11. package/declarations/build-config/debugging.d.ts +2 -0
  12. package/declarations/build-config/debugging.d.ts.map +1 -0
  13. package/declarations/build-config/deprecations.d.ts +2 -0
  14. package/declarations/build-config/deprecations.d.ts.map +1 -0
  15. package/declarations/build-config/env.d.ts +2 -0
  16. package/declarations/build-config/env.d.ts.map +1 -0
  17. package/declarations/build-config/macros.d.ts +2 -0
  18. package/declarations/build-config/macros.d.ts.map +1 -0
  19. package/declarations/build-config.d.ts +2 -0
  20. package/declarations/build-config.d.ts.map +1 -0
  21. package/declarations/configure.d.ts +8 -0
  22. package/declarations/configure.d.ts.map +1 -0
  23. package/declarations/graph/-private/-diff.d.ts +33 -0
  24. package/declarations/graph/-private/-diff.d.ts.map +1 -0
  25. package/declarations/graph/-private/-edge-definition.d.ts +149 -0
  26. package/declarations/graph/-private/-edge-definition.d.ts.map +1 -0
  27. package/declarations/graph/-private/-state.d.ts +10 -0
  28. package/declarations/graph/-private/-state.d.ts.map +1 -0
  29. package/declarations/graph/-private/-utils.d.ts +26 -0
  30. package/declarations/graph/-private/-utils.d.ts.map +1 -0
  31. package/declarations/graph/-private/coerce-id.d.ts +5 -0
  32. package/declarations/graph/-private/coerce-id.d.ts.map +1 -0
  33. package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +7 -0
  34. package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts.map +1 -0
  35. package/declarations/graph/-private/edges/collection.d.ts +40 -0
  36. package/declarations/graph/-private/edges/collection.d.ts.map +1 -0
  37. package/declarations/graph/-private/edges/implicit.d.ts +14 -0
  38. package/declarations/graph/-private/edges/implicit.d.ts.map +1 -0
  39. package/declarations/graph/-private/edges/resource.d.ts +25 -0
  40. package/declarations/graph/-private/edges/resource.d.ts.map +1 -0
  41. package/declarations/graph/-private/graph.d.ts +55 -0
  42. package/declarations/graph/-private/graph.d.ts.map +1 -0
  43. package/declarations/graph/-private/normalize-link.d.ts +3 -0
  44. package/declarations/graph/-private/normalize-link.d.ts.map +1 -0
  45. package/declarations/graph/-private/operations/add-to-related-records.d.ts +5 -0
  46. package/declarations/graph/-private/operations/add-to-related-records.d.ts.map +1 -0
  47. package/declarations/graph/-private/operations/merge-identifier.d.ts +4 -0
  48. package/declarations/graph/-private/operations/merge-identifier.d.ts.map +1 -0
  49. package/declarations/graph/-private/operations/remove-from-related-records.d.ts +5 -0
  50. package/declarations/graph/-private/operations/remove-from-related-records.d.ts.map +1 -0
  51. package/declarations/graph/-private/operations/replace-related-record.d.ts +4 -0
  52. package/declarations/graph/-private/operations/replace-related-record.d.ts.map +1 -0
  53. package/declarations/graph/-private/operations/replace-related-records.d.ts +8 -0
  54. package/declarations/graph/-private/operations/replace-related-records.d.ts.map +1 -0
  55. package/declarations/graph/-private/operations/update-relationship.d.ts +11 -0
  56. package/declarations/graph/-private/operations/update-relationship.d.ts.map +1 -0
  57. package/declarations/graph/-private.d.ts +14 -0
  58. package/declarations/graph/-private.d.ts.map +1 -0
  59. package/declarations/index.d.ts +15 -0
  60. package/declarations/index.d.ts.map +1 -0
  61. package/declarations/reactive/-private/document.d.ts +147 -0
  62. package/declarations/reactive/-private/document.d.ts.map +1 -0
  63. package/declarations/reactive/-private/fields/compute.d.ts +40 -0
  64. package/declarations/reactive/-private/fields/compute.d.ts.map +1 -0
  65. package/declarations/reactive/-private/fields/managed-array.d.ts +23 -0
  66. package/declarations/reactive/-private/fields/managed-array.d.ts.map +1 -0
  67. package/declarations/reactive/-private/fields/managed-object.d.ts +21 -0
  68. package/declarations/reactive/-private/fields/managed-object.d.ts.map +1 -0
  69. package/declarations/reactive/-private/fields/many-array-manager.d.ts +20 -0
  70. package/declarations/reactive/-private/fields/many-array-manager.d.ts.map +1 -0
  71. package/declarations/reactive/-private/hooks.d.ts +6 -0
  72. package/declarations/reactive/-private/hooks.d.ts.map +1 -0
  73. package/declarations/reactive/-private/record.d.ts +61 -0
  74. package/declarations/reactive/-private/record.d.ts.map +1 -0
  75. package/declarations/reactive/-private/schema.d.ts +180 -0
  76. package/declarations/reactive/-private/schema.d.ts.map +1 -0
  77. package/declarations/reactive/-private/symbols.d.ts +11 -0
  78. package/declarations/reactive/-private/symbols.d.ts.map +1 -0
  79. package/declarations/reactive/-private.d.ts +2 -0
  80. package/declarations/reactive/-private.d.ts.map +1 -0
  81. package/declarations/reactive.d.ts +5 -0
  82. package/declarations/reactive.d.ts.map +1 -0
  83. package/declarations/request/-private/context.d.ts +42 -0
  84. package/declarations/request/-private/context.d.ts.map +1 -0
  85. package/declarations/request/-private/debug.d.ts +5 -0
  86. package/declarations/request/-private/debug.d.ts.map +1 -0
  87. package/declarations/request/-private/fetch.d.ts +40 -0
  88. package/declarations/request/-private/fetch.d.ts.map +1 -0
  89. package/declarations/request/-private/future.d.ts +8 -0
  90. package/declarations/request/-private/future.d.ts.map +1 -0
  91. package/declarations/request/-private/manager.d.ts +160 -0
  92. package/declarations/request/-private/manager.d.ts.map +1 -0
  93. package/declarations/request/-private/promise-cache.d.ts +20 -0
  94. package/declarations/request/-private/promise-cache.d.ts.map +1 -0
  95. package/declarations/request/-private/types.d.ts +236 -0
  96. package/declarations/request/-private/types.d.ts.map +1 -0
  97. package/declarations/request/-private/utils.d.ts +16 -0
  98. package/declarations/request/-private/utils.d.ts.map +1 -0
  99. package/declarations/request.d.ts +6 -0
  100. package/declarations/request.d.ts.map +1 -0
  101. package/declarations/store/-private/cache-handler/handler.d.ts +57 -0
  102. package/declarations/store/-private/cache-handler/handler.d.ts.map +1 -0
  103. package/declarations/store/-private/cache-handler/types.d.ts +99 -0
  104. package/declarations/store/-private/cache-handler/types.d.ts.map +1 -0
  105. package/declarations/store/-private/cache-handler/utils.d.ts +32 -0
  106. package/declarations/store/-private/cache-handler/utils.d.ts.map +1 -0
  107. package/declarations/store/-private/caches/cache-utils.d.ts +9 -0
  108. package/declarations/store/-private/caches/cache-utils.d.ts.map +1 -0
  109. package/declarations/store/-private/caches/identifier-cache.d.ts +316 -0
  110. package/declarations/store/-private/caches/identifier-cache.d.ts.map +1 -0
  111. package/declarations/store/-private/caches/instance-cache.d.ts +65 -0
  112. package/declarations/store/-private/caches/instance-cache.d.ts.map +1 -0
  113. package/declarations/store/-private/caches/resource-utils.d.ts +10 -0
  114. package/declarations/store/-private/caches/resource-utils.d.ts.map +1 -0
  115. package/declarations/store/-private/debug/utils.d.ts +7 -0
  116. package/declarations/store/-private/debug/utils.d.ts.map +1 -0
  117. package/declarations/store/-private/default-cache-policy.d.ts +383 -0
  118. package/declarations/store/-private/default-cache-policy.d.ts.map +1 -0
  119. package/declarations/store/-private/legacy-model-support/record-reference.d.ts +164 -0
  120. package/declarations/store/-private/legacy-model-support/record-reference.d.ts.map +1 -0
  121. package/declarations/store/-private/legacy-model-support/shim-model-class.d.ts +17 -0
  122. package/declarations/store/-private/legacy-model-support/shim-model-class.d.ts.map +1 -0
  123. package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +26 -0
  124. package/declarations/store/-private/managers/cache-capabilities-manager.d.ts.map +1 -0
  125. package/declarations/store/-private/managers/cache-manager.d.ts +428 -0
  126. package/declarations/store/-private/managers/cache-manager.d.ts.map +1 -0
  127. package/declarations/store/-private/managers/notification-manager.d.ts +93 -0
  128. package/declarations/store/-private/managers/notification-manager.d.ts.map +1 -0
  129. package/declarations/store/-private/managers/record-array-manager.d.ts +98 -0
  130. package/declarations/store/-private/managers/record-array-manager.d.ts.map +1 -0
  131. package/declarations/store/-private/network/request-cache.d.ts +104 -0
  132. package/declarations/store/-private/network/request-cache.d.ts.map +1 -0
  133. package/declarations/store/-private/new-core-tmp/promise-state.d.ts +255 -0
  134. package/declarations/store/-private/new-core-tmp/promise-state.d.ts.map +1 -0
  135. package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +93 -0
  136. package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts.map +1 -0
  137. package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +170 -0
  138. package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts.map +1 -0
  139. package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +30 -0
  140. package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts.map +1 -0
  141. package/declarations/store/-private/new-core-tmp/request-state.d.ts +255 -0
  142. package/declarations/store/-private/new-core-tmp/request-state.d.ts.map +1 -0
  143. package/declarations/store/-private/record-arrays/identifier-array.d.ts +141 -0
  144. package/declarations/store/-private/record-arrays/identifier-array.d.ts.map +1 -0
  145. package/declarations/store/-private/record-arrays/many-array.d.ts +199 -0
  146. package/declarations/store/-private/record-arrays/many-array.d.ts.map +1 -0
  147. package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +116 -0
  148. package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts.map +1 -0
  149. package/declarations/store/-private/store-service.d.ts +1597 -0
  150. package/declarations/store/-private/store-service.d.ts.map +1 -0
  151. package/declarations/store/-private/store-service.type-test.d.ts +2 -0
  152. package/declarations/store/-private/store-service.type-test.d.ts.map +1 -0
  153. package/declarations/store/-private/utils/coerce-id.d.ts +5 -0
  154. package/declarations/store/-private/utils/coerce-id.d.ts.map +1 -0
  155. package/declarations/store/-private/utils/construct-resource.d.ts +7 -0
  156. package/declarations/store/-private/utils/construct-resource.d.ts.map +1 -0
  157. package/declarations/store/-private/utils/is-non-empty-string.d.ts +2 -0
  158. package/declarations/store/-private/utils/is-non-empty-string.d.ts.map +1 -0
  159. package/declarations/store/-private/utils/normalize-model-name.d.ts +2 -0
  160. package/declarations/store/-private/utils/normalize-model-name.d.ts.map +1 -0
  161. package/declarations/store/-private/utils/uuid-polyfill.d.ts +2 -0
  162. package/declarations/store/-private/utils/uuid-polyfill.d.ts.map +1 -0
  163. package/declarations/store/-private.d.ts +27 -0
  164. package/declarations/store/-private.d.ts.map +1 -0
  165. package/declarations/store/-types/q/cache-capabilities-manager.d.ts +100 -0
  166. package/declarations/store/-types/q/cache-capabilities-manager.d.ts.map +1 -0
  167. package/declarations/store/-types/q/ds-model.d.ts +22 -0
  168. package/declarations/store/-types/q/ds-model.d.ts.map +1 -0
  169. package/declarations/store/-types/q/identifier.d.ts +21 -0
  170. package/declarations/store/-types/q/identifier.d.ts.map +1 -0
  171. package/declarations/store/-types/q/promise-proxies.d.ts +2 -0
  172. package/declarations/store/-types/q/promise-proxies.d.ts.map +1 -0
  173. package/declarations/store/-types/q/record-data-json-api.d.ts +31 -0
  174. package/declarations/store/-types/q/record-data-json-api.d.ts.map +1 -0
  175. package/declarations/store/-types/q/record-instance.d.ts +24 -0
  176. package/declarations/store/-types/q/record-instance.d.ts.map +1 -0
  177. package/declarations/store/-types/q/schema-service.d.ts +331 -0
  178. package/declarations/store/-types/q/schema-service.d.ts.map +1 -0
  179. package/declarations/store/-types/q/store.d.ts +35 -0
  180. package/declarations/store/-types/q/store.d.ts.map +1 -0
  181. package/declarations/store.d.ts +2 -0
  182. package/declarations/store.d.ts.map +1 -0
  183. package/declarations/types/-private.d.ts +14 -0
  184. package/declarations/types/-private.d.ts.map +1 -0
  185. package/declarations/types/cache/aliases.d.ts +2 -0
  186. package/declarations/types/cache/aliases.d.ts.map +1 -0
  187. package/declarations/types/cache/change.d.ts +7 -0
  188. package/declarations/types/cache/change.d.ts.map +1 -0
  189. package/declarations/types/cache/mutations.d.ts +39 -0
  190. package/declarations/types/cache/mutations.d.ts.map +1 -0
  191. package/declarations/types/cache/operations.d.ts +72 -0
  192. package/declarations/types/cache/operations.d.ts.map +1 -0
  193. package/declarations/types/cache/relationship.d.ts +14 -0
  194. package/declarations/types/cache/relationship.d.ts.map +1 -0
  195. package/declarations/types/cache.d.ts +492 -0
  196. package/declarations/types/cache.d.ts.map +1 -0
  197. package/declarations/types/graph.d.ts +48 -0
  198. package/declarations/types/graph.d.ts.map +1 -0
  199. package/declarations/types/identifier.d.ts +111 -0
  200. package/declarations/types/identifier.d.ts.map +1 -0
  201. package/declarations/types/json/raw.d.ts +7 -0
  202. package/declarations/types/json/raw.d.ts.map +1 -0
  203. package/declarations/types/params.d.ts +10 -0
  204. package/declarations/types/params.d.ts.map +1 -0
  205. package/declarations/types/record.d.ts +96 -0
  206. package/declarations/types/record.d.ts.map +1 -0
  207. package/declarations/types/record.type-test.d.ts +2 -0
  208. package/declarations/types/record.type-test.d.ts.map +1 -0
  209. package/declarations/types/request.d.ts +308 -0
  210. package/declarations/types/request.d.ts.map +1 -0
  211. package/declarations/types/request.type-test.d.ts +2 -0
  212. package/declarations/types/request.type-test.d.ts.map +1 -0
  213. package/declarations/types/runtime.d.ts +15 -0
  214. package/declarations/types/runtime.d.ts.map +1 -0
  215. package/declarations/types/schema/concepts.d.ts +17 -0
  216. package/declarations/types/schema/concepts.d.ts.map +1 -0
  217. package/declarations/types/schema/fields.d.ts +1674 -0
  218. package/declarations/types/schema/fields.d.ts.map +1 -0
  219. package/declarations/types/schema/fields.type-test.d.ts +2 -0
  220. package/declarations/types/schema/fields.type-test.d.ts.map +1 -0
  221. package/declarations/types/spec/document.d.ts +31 -0
  222. package/declarations/types/spec/document.d.ts.map +1 -0
  223. package/declarations/types/spec/error.d.ts +19 -0
  224. package/declarations/types/spec/error.d.ts.map +1 -0
  225. package/declarations/types/spec/json-api-raw.d.ts +142 -0
  226. package/declarations/types/spec/json-api-raw.d.ts.map +1 -0
  227. package/declarations/types/symbols.d.ts +79 -0
  228. package/declarations/types/symbols.d.ts.map +1 -0
  229. package/declarations/types/utils.d.ts +5 -0
  230. package/declarations/types/utils.d.ts.map +1 -0
  231. package/declarations/types.d.ts +12 -0
  232. package/declarations/types.d.ts.map +1 -0
  233. package/declarations/utils/string.d.ts +45 -0
  234. package/declarations/utils/string.d.ts.map +1 -0
  235. package/dist/build-config/babel-macros.js +1 -0
  236. package/dist/build-config/babel-macros.js.map +1 -0
  237. package/dist/build-config/canary-features.js +1 -0
  238. package/dist/build-config/canary-features.js.map +1 -0
  239. package/dist/build-config/debugging.js +1 -0
  240. package/dist/build-config/debugging.js.map +1 -0
  241. package/dist/build-config/deprecations.js +1 -0
  242. package/dist/build-config/deprecations.js.map +1 -0
  243. package/dist/build-config/env.js +1 -0
  244. package/dist/build-config/env.js.map +1 -0
  245. package/dist/build-config/macros.js +1 -0
  246. package/dist/build-config/macros.js.map +1 -0
  247. package/dist/build-config.js +1 -0
  248. package/dist/build-config.js.map +1 -0
  249. package/dist/configure-Bz49BEZQ.js +145 -0
  250. package/dist/configure-Bz49BEZQ.js.map +1 -0
  251. package/dist/configure.js +1 -0
  252. package/dist/configure.js.map +1 -0
  253. package/dist/context-DE5sFezZ.js +636 -0
  254. package/dist/context-DE5sFezZ.js.map +1 -0
  255. package/dist/graph/-private.js +3364 -0
  256. package/dist/graph/-private.js.map +1 -0
  257. package/dist/handler-DYUefHNU.js +339 -0
  258. package/dist/handler-DYUefHNU.js.map +1 -0
  259. package/dist/index.js +382 -0
  260. package/dist/index.js.map +1 -0
  261. package/dist/reactive/-private.js +1 -0
  262. package/dist/reactive/-private.js.map +1 -0
  263. package/dist/reactive.js +1802 -0
  264. package/dist/reactive.js.map +1 -0
  265. package/dist/request-state-Bv5CY_H0.js +7358 -0
  266. package/dist/request-state-Bv5CY_H0.js.map +1 -0
  267. package/dist/request.js +1 -0
  268. package/dist/request.js.map +1 -0
  269. package/dist/store/-private.js +3 -0
  270. package/dist/store/-private.js.map +1 -0
  271. package/dist/store.js +545 -0
  272. package/dist/store.js.map +1 -0
  273. package/dist/symbols-DyqeYQTe.js +44 -0
  274. package/dist/symbols-DyqeYQTe.js.map +1 -0
  275. package/dist/types/-private.js +79 -0
  276. package/dist/types/-private.js.map +1 -0
  277. package/dist/types/cache/aliases.js +0 -0
  278. package/dist/types/cache/aliases.js.map +1 -0
  279. package/dist/types/cache/change.js +0 -0
  280. package/dist/types/cache/change.js.map +1 -0
  281. package/dist/types/cache/mutations.js +0 -0
  282. package/dist/types/cache/mutations.js.map +1 -0
  283. package/dist/types/cache/operations.js +0 -0
  284. package/dist/types/cache/operations.js.map +1 -0
  285. package/dist/types/cache/relationship.js +0 -0
  286. package/dist/types/cache/relationship.js.map +1 -0
  287. package/dist/types/cache.js +0 -0
  288. package/dist/types/cache.js.map +1 -0
  289. package/dist/types/graph.js +0 -0
  290. package/dist/types/graph.js.map +1 -0
  291. package/dist/types/identifier.js +89 -0
  292. package/dist/types/identifier.js.map +1 -0
  293. package/dist/types/json/raw.js +0 -0
  294. package/dist/types/json/raw.js.map +1 -0
  295. package/dist/types/params.js +0 -0
  296. package/dist/types/params.js.map +1 -0
  297. package/dist/types/record.js +64 -0
  298. package/dist/types/record.js.map +1 -0
  299. package/dist/types/request.js +33 -0
  300. package/dist/types/request.js.map +1 -0
  301. package/dist/types/runtime.js +34 -0
  302. package/dist/types/runtime.js.map +1 -0
  303. package/dist/types/schema/concepts.js +0 -0
  304. package/dist/types/schema/concepts.js.map +1 -0
  305. package/dist/types/schema/fields.js +470 -0
  306. package/dist/types/schema/fields.js.map +1 -0
  307. package/dist/types/schema/fields.type-test.js +0 -0
  308. package/dist/types/schema/fields.type-test.js.map +1 -0
  309. package/dist/types/spec/document.js +0 -0
  310. package/dist/types/spec/document.js.map +1 -0
  311. package/dist/types/spec/error.js +0 -0
  312. package/dist/types/spec/error.js.map +1 -0
  313. package/dist/types/spec/json-api-raw.js +0 -0
  314. package/dist/types/spec/json-api-raw.js.map +1 -0
  315. package/dist/types/symbols.js +84 -0
  316. package/dist/types/symbols.js.map +1 -0
  317. package/dist/types/utils.js +0 -0
  318. package/dist/types/utils.js.map +1 -0
  319. package/dist/types.js +0 -0
  320. package/dist/types.js.map +1 -0
  321. package/dist/utils/string.js +92 -0
  322. package/dist/utils/string.js.map +1 -0
  323. package/logos/NCC-1701-a-blue.svg +4 -0
  324. package/logos/NCC-1701-a-gold.svg +4 -0
  325. package/logos/NCC-1701-a-gold_100.svg +1 -0
  326. package/logos/NCC-1701-a-gold_base-64.txt +1 -0
  327. package/logos/NCC-1701-a.svg +4 -0
  328. package/logos/README.md +4 -0
  329. package/logos/docs-badge.svg +2 -0
  330. package/logos/ember-data-logo-dark.svg +12 -0
  331. package/logos/ember-data-logo-light.svg +12 -0
  332. package/logos/github-header.svg +444 -0
  333. package/logos/social1.png +0 -0
  334. package/logos/social2.png +0 -0
  335. package/logos/warp-drive-logo-dark.svg +4 -0
  336. package/logos/warp-drive-logo-gold.svg +4 -0
  337. package/package.json +70 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.d.ts","sourceRoot":"","sources":["../../../src/types/schema/fields.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAElE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;OAIG;IACH,IAAI,EAAE,OAAO,CAAC;IAEd;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,IAAI,EAAE,IAAI,CAAC;IAEX;;;;OAIG;IACH,OAAO,EACH,YAAY,GACZ,WAAW,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AAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,cAAc,GAAG,YAAY,GAAG,MAAM,IAAI,cAAc,CAEhG;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,cAAc,GAAG,YAAY,GAAG,MAAM,IAAI,oBAAoB,CAE5G;AAED,MAAM,MAAM,WAAW,GACnB,oBAAoB,GACpB,oBAAoB,GACpB,kBAAkB,GAClB,uBAAuB,GACvB,qBAAqB,CAAC;AAC1B,MAAM,MAAM,uBAAuB,GAC/B,oBAAoB,GACpB,kBAAkB,GAClB,uBAAuB,GACvB,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=fields.type-test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fields.type-test.d.ts","sourceRoot":"","sources":["../../../src/types/schema/fields.type-test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,31 @@
1
+ import type { StableExistingRecordIdentifier } from '../identifier.ts';
2
+ import type { ApiError } from './error.ts';
3
+ import type { Links, Meta, PaginationLinks } from './json-api-raw.ts';
4
+ export interface ResourceMetaDocument {
5
+ lid?: string;
6
+ meta: Meta;
7
+ links?: Links | PaginationLinks;
8
+ }
9
+ export interface SingleResourceDataDocument<T = StableExistingRecordIdentifier, R = StableExistingRecordIdentifier> {
10
+ lid?: string;
11
+ links?: Links | PaginationLinks;
12
+ meta?: Meta;
13
+ data: T | null;
14
+ included?: R[];
15
+ }
16
+ export interface CollectionResourceDataDocument<T = StableExistingRecordIdentifier> {
17
+ lid?: string;
18
+ links?: Links | PaginationLinks;
19
+ meta?: Meta;
20
+ data: T[];
21
+ included?: T[];
22
+ }
23
+ export type ResourceDataDocument<T = StableExistingRecordIdentifier> = SingleResourceDataDocument<T> | CollectionResourceDataDocument<T>;
24
+ export interface ResourceErrorDocument {
25
+ lid?: string;
26
+ links?: Links | PaginationLinks;
27
+ meta?: Meta;
28
+ errors: ApiError[];
29
+ }
30
+ export type ResourceDocument<T = StableExistingRecordIdentifier> = ResourceMetaDocument | SingleResourceDataDocument<T> | CollectionResourceDataDocument<T> | ResourceErrorDocument;
31
+ //# sourceMappingURL=document.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../../src/types/spec/document.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEtE,MAAM,WAAW,oBAAoB;IAEnC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,CAAC,EAAE,KAAK,GAAG,eAAe,CAAC;CACjC;AAED,MAAM,WAAW,0BAA0B,CAAC,CAAC,GAAG,8BAA8B,EAAE,CAAC,GAAG,8BAA8B;IAEhH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,GAAG,eAAe,CAAC;IAChC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,8BAA8B,CAAC,CAAC,GAAG,8BAA8B;IAEhF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,GAAG,eAAe,CAAC;IAChC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;CAChB;AAED,MAAM,MAAM,oBAAoB,CAAC,CAAC,GAAG,8BAA8B,IAC/D,0BAA0B,CAAC,CAAC,CAAC,GAC7B,8BAA8B,CAAC,CAAC,CAAC,CAAC;AAEtC,MAAM,WAAW,qBAAqB;IAEpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,KAAK,GAAG,eAAe,CAAC;IAChC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,MAAM,EAAE,QAAQ,EAAE,CAAC;CACpB;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,GAAG,8BAA8B,IAC3D,oBAAoB,GACpB,0BAA0B,CAAC,CAAC,CAAC,GAC7B,8BAA8B,CAAC,CAAC,CAAC,GACjC,qBAAqB,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { Link, Meta } from './json-api-raw.ts';
2
+ export interface ApiError {
3
+ id?: string;
4
+ title?: string;
5
+ detail?: string;
6
+ links?: {
7
+ about?: Link;
8
+ type?: Link;
9
+ };
10
+ status?: string;
11
+ code?: string;
12
+ source?: {
13
+ pointer: string;
14
+ parameter?: string;
15
+ header?: string;
16
+ };
17
+ meta?: Meta;
18
+ }
19
+ //# sourceMappingURL=error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/types/spec/error.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,WAAW,QAAQ;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE;QACN,KAAK,CAAC,EAAE,IAAI,CAAC;QACb,IAAI,CAAC,EAAE,IAAI,CAAC;KACb,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE;QACP,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,IAAI,CAAC,EAAE,IAAI,CAAC;CACb"}
@@ -0,0 +1,142 @@
1
+ import type { ArrayValue, ObjectValue } from '../json/raw.ts';
2
+ export type Meta = ObjectValue;
3
+ export type LinkObject = {
4
+ href: string;
5
+ meta?: Meta;
6
+ };
7
+ export type Link = string | LinkObject;
8
+ export interface Links {
9
+ related?: Link | null;
10
+ self?: Link | null;
11
+ }
12
+ export interface PaginationLinks extends Links {
13
+ first?: Link | null;
14
+ last?: Link | null;
15
+ prev?: Link | null;
16
+ next?: Link | null;
17
+ }
18
+ /**
19
+ * Serves as a reference to a `Resource` but does not contain
20
+ * any data itself.
21
+ *
22
+ * Used to establish relationship linkages between `Resources` and
23
+ * to address data that may not be available synchronously.
24
+ *
25
+ * [JSON:API Spec](https://jsonapi.org/format/#document-resource-identifier-objects)
26
+ * @internal
27
+ */
28
+ export interface ExistingResourceIdentifierObject<T extends string = string> {
29
+ id: string;
30
+ type: T;
31
+ /**
32
+ * While not officially part of the `JSON:API` spec,
33
+ * `ember-data` allows the use of `lid` as a local
34
+ * identifier for a `Resource`.
35
+ *
36
+ * @recommended It is best to include the lid used when creating
37
+ * a new resource if this is the response to a new resource creation,
38
+ * also recommended if this resource type uses secondary indexes.
39
+ *
40
+ * Once a `ResourceIdentifierObject` has been seen by the cache, `lid`
41
+ * should always be present. Only when inbound from the an `API` response
42
+ * is `lid` considered optional.
43
+ *
44
+ * [Identifiers RFC](https://github.com/emberjs/rfcs/blob/main/text/0403-ember-data-identifiers.md#ember-data--identifiers)
45
+ * @internal
46
+ */
47
+ lid?: string;
48
+ /**
49
+ * While valid in the `JSON:API` spec,
50
+ * `ember-data` ignores `meta` on `ResourceIdentifierObjects`
51
+ *
52
+ * @ignored this property goes un-utilized and will be lost
53
+ * @internal
54
+ */
55
+ meta?: Meta;
56
+ }
57
+ /**
58
+ * Serves as a reference to a resource created on the client
59
+ * but not yet persisted.
60
+ *
61
+ * @internal
62
+ */
63
+ export interface NewResourceIdentifierObject<T extends string = string> {
64
+ /**
65
+ * Resources newly created on the client _may_
66
+ * not have an `id` available to them prior
67
+ * to completion of their first successful `save`.
68
+ *
69
+ * `id` will be `null` in this case.
70
+ *
71
+ * @internal
72
+ */
73
+ id: string | null;
74
+ type: T;
75
+ /**
76
+ * Resources newly created on the client _will always_
77
+ * have an `lid` assigned immediately and available.
78
+ * @internal
79
+ */
80
+ lid: string;
81
+ }
82
+ export interface ResourceIdentifier {
83
+ lid: string;
84
+ }
85
+ export type ResourceIdentifierObject<T extends string = string> = ResourceIdentifier | ExistingResourceIdentifierObject<T> | NewResourceIdentifierObject<T>;
86
+ export interface SingleResourceRelationship<T = ExistingResourceIdentifierObject | NewResourceIdentifierObject> {
87
+ data?: T | null;
88
+ meta?: Meta;
89
+ links?: Links;
90
+ }
91
+ export interface CollectionResourceRelationship<T = ExistingResourceIdentifierObject | NewResourceIdentifierObject> {
92
+ data?: T[];
93
+ meta?: Meta;
94
+ links?: PaginationLinks;
95
+ }
96
+ export type InnerRelationshipDocument<T = ExistingResourceIdentifierObject | NewResourceIdentifierObject> = SingleResourceRelationship<T> | CollectionResourceRelationship<T>;
97
+ export type ResourceRelationshipsObject<T = ExistingResourceIdentifierObject | NewResourceIdentifierObject> = Record<string, InnerRelationshipDocument<T>>;
98
+ /**
99
+ * Contains the data for an existing resource in JSON:API format
100
+ * @internal
101
+ */
102
+ export interface ExistingResourceObject<T extends string = string> extends ExistingResourceIdentifierObject<T> {
103
+ meta?: Meta;
104
+ attributes?: ObjectValue;
105
+ relationships?: ResourceRelationshipsObject<ExistingResourceIdentifierObject>;
106
+ links?: Links;
107
+ }
108
+ export type NewResourceObject<T extends string = string> = NewResourceIdentifierObject<T> & {
109
+ meta?: Meta;
110
+ attributes?: ObjectValue;
111
+ relationships?: ResourceRelationshipsObject;
112
+ links?: Links;
113
+ };
114
+ export type ResourceObject<T extends string = string> = ExistingResourceObject<T> | NewResourceObject<T>;
115
+ type Document = {
116
+ lid?: string;
117
+ meta?: Meta;
118
+ included?: ExistingResourceObject[];
119
+ jsonapi?: ObjectValue;
120
+ links?: Links | PaginationLinks;
121
+ errors?: ArrayValue;
122
+ };
123
+ export type EmptyResourceDocument = Document & {
124
+ data: null;
125
+ };
126
+ export type SingleResourceDocument<T extends string = string> = Document & {
127
+ data: ExistingResourceObject<T>;
128
+ };
129
+ export type CollectionResourceDocument<T extends string = string> = Document & {
130
+ data: ExistingResourceObject<T>[];
131
+ };
132
+ /**
133
+ * A (RAW) JSON:API Formatted Document.
134
+ *
135
+ * These documents should follow the JSON:API spec but do not
136
+ * have the same level of guarantees as their `spec` counterparts.
137
+ *
138
+ * @internal
139
+ */
140
+ export type JsonApiDocument<T extends string = string> = EmptyResourceDocument | SingleResourceDocument<T> | CollectionResourceDocument<T>;
141
+ export {};
142
+ //# sourceMappingURL=json-api-raw.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-api-raw.d.ts","sourceRoot":"","sources":["../../../src/types/spec/json-api-raw.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE9D,MAAM,MAAM,IAAI,GAAG,WAAW,CAAC;AAC/B,MAAM,MAAM,UAAU,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,IAAI,CAAA;CAAE,CAAC;AACvD,MAAM,MAAM,IAAI,GAAG,MAAM,GAAG,UAAU,CAAC;AACvC,MAAM,WAAW,KAAK;IACpB,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACtB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;CACpB;AACD,MAAM,WAAW,eAAgB,SAAQ,KAAK;IAC5C,KAAK,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,IAAI,CAAC,EAAE,IAA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,MAAM,MAAM,sBAAsB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,QAAQ,GAAG;IACzE,IAAI,EAAE,sBAAsB,CAAC,CAAC,CAAC,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,0BAA0B,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,QAAQ,GAAG;IAC7E,IAAI,EAAE,sBAAsB,CAAC,CAAC,CAAC,EAAE,CAAC;CACnC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IACjD,qBAAqB,GACrB,sBAAsB,CAAC,CAAC,CAAC,GACzB,0BAA0B,CAAC,CAAC,CAAC,CAAC"}
@@ -0,0 +1,79 @@
1
+ export declare const RecordStore: '___(unique) Symbol(Store)';
2
+ /**
3
+ * Symbol for the name of a resource, transformation
4
+ * or derivation.
5
+ *
6
+ * ### With Resources
7
+ *
8
+ * This is an optional feature that can be used by
9
+ * record implementations to provide a typescript
10
+ * hint for the type of the resource.
11
+ *
12
+ * When used, EmberData/WarpDrive APIs can
13
+ * take advantage of this to provide better type
14
+ * safety and intellisense.
15
+ *
16
+ * ### With Derivations
17
+ *
18
+ * Required for derivations registered with
19
+ * `store.registerDerivation(derivation)`.
20
+ *
21
+ * ```ts
22
+ * function concat(record: object, options: ObjectValue | null, prop: string): string {}
23
+ * concat[Name] = 'concat';
24
+ * ```
25
+ *
26
+ * ### With Transforms
27
+ *
28
+ * Required for new-style transformations registered
29
+ * with `store.registerTransform(transform)`.
30
+ *
31
+ * For legacy transforms, if not used,
32
+ * `attr<Transform>('name')` will allow any string name.
33
+ * `attr('name')` will always allow any string name.
34
+ *
35
+ * If used, `attr<Transform>('name')` will enforce
36
+ * that the name is the same as the transform name.
37
+ *
38
+ * @type {Symbol}
39
+ */
40
+ export declare const Type: '___(unique) Symbol($type)';
41
+ /**
42
+ * Symbol for the type of a resource.
43
+ *
44
+ * This is an optional feature that can be used by
45
+ * record implementations to provide a typescript
46
+ * hint for the type of the resource.
47
+ *
48
+ * When used, EmberData/WarpDrive APIs can
49
+ * take advantage of this to provide better type
50
+ * safety and intellisense.
51
+ *
52
+ * @type {Symbol}
53
+ */
54
+ export declare const ResourceType: '___(unique) Symbol($type)';
55
+ /**
56
+ * Symbol for the name of a transform.
57
+ *
58
+ * This is an optional feature that can be used by
59
+ * transform implementations to provide a typescript
60
+ * hint for the name of the transform.
61
+ *
62
+ * If not used, `attr<Transform>('name')` will
63
+ * allow any string name. `attr('name')` will always
64
+ * allow any string name.
65
+ *
66
+ * If used, `attr<Transform>('name')` will enforce
67
+ * that the name is the same as the transform name.
68
+ *
69
+ * @type {Symbol}
70
+ */
71
+ export declare const TransformName: '___(unique) Symbol($type)';
72
+ /**
73
+ * Symbol for use by builders to indicate the return type
74
+ * generic to use for store.request()
75
+ *
76
+ * @type {Symbol}
77
+ */
78
+ export declare const RequestSignature: '___(unique) Symbol(RequestSignature)';
79
+ //# sourceMappingURL=symbols.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../../src/types/symbols.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,EAAE,2BAAsE,CAAC;AAEjG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,IAAI,EAAE,2BAAsE,CAAC;AAE1F;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,YAAY,EAAE,2BAAkC,CAAC;AAE9D;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,aAAa,EAAE,2BAAkC,CAAC;AAE/D;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,EAAE,sCAG9B,CAAC"}
@@ -0,0 +1,5 @@
1
+ export type WithPartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
2
+ export type Mutable<T> = {
3
+ -readonly [P in keyof T]: T[P];
4
+ };
5
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/types/utils.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;AAEjF,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI;IAAE,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This package provides core types, type-utilities, symbols
3
+ * and constants used across the WarpDrive ecosystem.
4
+ *
5
+ * @module
6
+ */
7
+ export type { StableRecordIdentifier, ResourceKey } from './types/identifier.ts';
8
+ export type { CacheCapabilitiesManager } from './store/-types/q/cache-capabilities-manager.ts';
9
+ export type { ModelSchema } from './store/-types/q/ds-model.ts';
10
+ export type { SchemaService } from './store/-types/q/schema-service.ts';
11
+ export type { BaseFinderOptions, FindRecordOptions, LegacyResourceQuery, QueryOptions, FindAllOptions, } from './store/-types/q/store.ts';
12
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EAAE,sBAAsB,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEjF,YAAY,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAC/F,YAAY,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAChE,YAAY,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACxE,YAAY,EACV,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,YAAY,EACZ,cAAc,GACf,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * An LRUCache implementation with upsert semantics.
3
+ *
4
+ * This implementation is *not* generic, but focuses on
5
+ * performance tuning for the string transformation cases
6
+ * where the key maps to the value very simply.
7
+ *
8
+ * It takes a work function that should generate a new value
9
+ * for a given key when called. It will be called when the key
10
+ * is not found in the cache.
11
+ *
12
+ * It keeps track of the number of hits, misses, and ejections
13
+ * in DEBUG envs, which is useful for tuning the cache size.
14
+ *
15
+ * This is an internal utility class for use by this module
16
+ * and by `@warp-drive/utilities/string`. It is not intended
17
+ * for use outside of these modules at this time.
18
+ *
19
+ * @internal
20
+ */
21
+ export declare class LRUCache<T, V> {
22
+ size: number;
23
+ state: Map<T, V>;
24
+ doWork: (k: T) => V;
25
+ _hits: number;
26
+ _misses: number;
27
+ _ejected: number;
28
+ constructor(doWork: (k: T) => V, size?: number);
29
+ get(key: T): V;
30
+ set(key: T, value: V): void;
31
+ clear(): void;
32
+ }
33
+ export declare const STRING_DASHERIZE_CACHE: LRUCache<string, string>;
34
+ /**
35
+ * This is an internal utility function that converts a string
36
+ * to a dasherized format. Library consumers should use the
37
+ * re-exported version from `@warp-drive/utilities/string` instead.
38
+ *
39
+ * This version is only in this location to support a deprecated
40
+ * behavior in the core package and will be removed in a future.
41
+ *
42
+ * @internal
43
+ */
44
+ export declare function dasherize(str: string): string;
45
+ //# sourceMappingURL=string.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"string.d.ts","sourceRoot":"","sources":["../../src/utils/string.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,QAAQ,CAAC,CAAC,EAAE,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACjB,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;IAGpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;gBAEb,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,IAAI,CAAC,EAAE,MAAM;IAY9C,GAAG,CAAC,GAAG,EAAE,CAAC;IAmBV,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC;IAapB,KAAK;CAQN;AAID,eAAO,MAAM,sBAAsB,0BAElC,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAE7C"}
@@ -0,0 +1 @@
1
+ export { macros } from '@warp-drive/build-config/babel-macros';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"babel-macros.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from '@warp-drive/build-config/canary-features';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"canary-features.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from '@warp-drive/build-config/debugging';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"debugging.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from '@warp-drive/build-config/deprecations';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deprecations.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export { DEBUG, IS_CI, IS_RECORDING, PRODUCTION, SHOULD_RECORD, TESTING } from '@warp-drive/build-config/env';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export { assert } from '@warp-drive/build-config/macros';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"macros.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export { setConfig } from '@warp-drive/build-config';
@@ -0,0 +1 @@
1
+ {"version":3,"file":"build-config.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,145 @@
1
+ import { getOrSetGlobal, peekTransient, setTransient } from "./types/-private.js";
2
+ import { macroCondition, getGlobalConfig } from '@embroider/macros';
3
+ const ARRAY_SIGNAL = getOrSetGlobal('#[]', Symbol('#[]'));
4
+ const OBJECT_SIGNAL = getOrSetGlobal('#{}', Symbol('#{}'));
5
+
6
+ /**
7
+ * Requirements:
8
+ *
9
+ * Signal:
10
+ *
11
+ * - signal: a way of creating a reference that we can dirty when we desire to notify
12
+ * - @signal: a way of creating an accessor on an object that subscribes to a signal on access
13
+ * and notifies the signal on set, or of upgrading a descriptor to be such an accessor
14
+ * - defineSignal: a way of creating a signal on an object
15
+ * - notifySignal: a way of notifying the underlying signal that it has been dirtied
16
+ * - peekSignal: a way of inspecting the signal without notifying it
17
+ *
18
+ * - gate: a memoized getter function that re-runs when on access if its signal is dirty
19
+ * conceptually, a gate is a tightly coupled signal and memo
20
+ * - @gate: a way of creating a gate on an object or upgrading a descriptor with a getter
21
+ * to be a gate
22
+ * - defineGate: a way of creating a gate on an object
23
+ * - notifySignal: a way of notifying the signal for a gate that it has been dirtied
24
+ *
25
+ * - memo:
26
+ * - @memo: a way of creating a memoized getter on an object or upgrading a descriptor with a getter
27
+ * to be a memo
28
+ * - defineMemo: a way of creating a memo on an object
29
+ *
30
+ * - signalStore: storage bucket for signals associated to an object
31
+ * - withSignalStore: a way of pre-creating a signal store on an object
32
+ *
33
+ *
34
+ * @internal
35
+ */
36
+
37
+ /**
38
+ * An Opaque type that represents a framework specific or TC39 signal.
39
+ *
40
+ * It may be an array of signals or a single signal.
41
+ *
42
+ * @internal
43
+ */
44
+
45
+ /**
46
+ * The hooks which MUST be configured in order to use this library,
47
+ * either for framework specfic signals or TC39 signals.
48
+ *
49
+ * Support for multiple frameworks simultaneously can be done via
50
+ * this abstraction by returning multiple signals from the `createSignal`
51
+ * method, and consuming the correct one via the correct framework via
52
+ * the `consumeSignal` and `notifySignal` methods.
53
+ *
54
+ */
55
+
56
+ /**
57
+ * Configures the signals implementation to use. Supports multiple
58
+ * implementations simultaneously.
59
+ *
60
+ * @public
61
+ * @param buildConfig - a function that takes options and returns a configuration object
62
+ */
63
+ function setupSignals(buildConfig) {
64
+ // We want to assert this but can't because too many package manager
65
+ // and bundler bugs exist that cause this to be called multiple times
66
+ // for what should be a single call.
67
+ // assert(`Cannot override configured signal hooks`, peekTransient('signalHooks') === null);
68
+ const hooks = buildConfig({
69
+ wellknown: {
70
+ Array: ARRAY_SIGNAL
71
+ }
72
+ });
73
+ setTransient('signalHooks', hooks);
74
+ }
75
+
76
+ /**
77
+ * Internal method for consuming the configured `createSignal` hook
78
+ *
79
+ * @internal
80
+ */
81
+ function createSignal(obj, key) {
82
+ const signalHooks = peekTransient('signalHooks');
83
+ macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
84
+ if (!test) {
85
+ throw new Error(`Signal hooks not configured`);
86
+ }
87
+ })(signalHooks) : {};
88
+ return signalHooks.createSignal(obj, key);
89
+ }
90
+
91
+ /**
92
+ * Internal method for consuming the configured `consumeSignal` hook
93
+ *
94
+ * @internal
95
+ */
96
+ function consumeSignal(signal) {
97
+ const signalHooks = peekTransient('signalHooks');
98
+ macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
99
+ if (!test) {
100
+ throw new Error(`Signal hooks not configured`);
101
+ }
102
+ })(signalHooks) : {};
103
+ return signalHooks.consumeSignal(signal);
104
+ }
105
+
106
+ /**
107
+ * Internal method for consuming the configured `notifySignal` hook
108
+ *
109
+ * @internal
110
+ */
111
+ function notifySignal(signal) {
112
+ const signalHooks = peekTransient('signalHooks');
113
+ macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
114
+ if (!test) {
115
+ throw new Error(`Signal hooks not configured`);
116
+ }
117
+ })(signalHooks) : {};
118
+ return signalHooks.notifySignal(signal);
119
+ }
120
+ function createMemo(object, key, fn) {
121
+ const signalHooks = peekTransient('signalHooks');
122
+ macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
123
+ if (!test) {
124
+ throw new Error(`Signal hooks not configured`);
125
+ }
126
+ })(signalHooks) : {};
127
+ return signalHooks.createMemo(object, key, fn);
128
+ }
129
+ function willSyncFlushWatchers() {
130
+ const signalHooks = peekTransient('signalHooks');
131
+ macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
132
+ if (!test) {
133
+ throw new Error(`Signal hooks not configured`);
134
+ }
135
+ })(signalHooks) : {};
136
+ return signalHooks.willSyncFlushWatchers();
137
+ }
138
+ function waitFor(promise) {
139
+ const signalHooks = peekTransient('signalHooks');
140
+ if (signalHooks?.waitFor) {
141
+ return signalHooks.waitFor(promise);
142
+ }
143
+ return promise;
144
+ }
145
+ export { ARRAY_SIGNAL as A, OBJECT_SIGNAL as O, createSignal as a, consumeSignal as b, createMemo as c, willSyncFlushWatchers as d, notifySignal as n, setupSignals as s, waitFor as w };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configure-Bz49BEZQ.js","sources":["../src/store/-private/new-core-tmp/reactivity/configure.ts"],"sourcesContent":["import { assert } from '@warp-drive/core/build-config/macros';\n\nimport { getOrSetGlobal, peekTransient, setTransient } from '../../../../types/-private.ts';\n\nexport const ARRAY_SIGNAL = getOrSetGlobal('#[]', Symbol('#[]'));\nexport const OBJECT_SIGNAL = getOrSetGlobal('#{}', Symbol('#{}'));\n\n/**\n * Requirements:\n *\n * Signal:\n *\n * - signal: a way of creating a reference that we can dirty when we desire to notify\n * - @signal: a way of creating an accessor on an object that subscribes to a signal on access\n * and notifies the signal on set, or of upgrading a descriptor to be such an accessor\n * - defineSignal: a way of creating a signal on an object\n * - notifySignal: a way of notifying the underlying signal that it has been dirtied\n * - peekSignal: a way of inspecting the signal without notifying it\n *\n * - gate: a memoized getter function that re-runs when on access if its signal is dirty\n * conceptually, a gate is a tightly coupled signal and memo\n * - @gate: a way of creating a gate on an object or upgrading a descriptor with a getter\n * to be a gate\n * - defineGate: a way of creating a gate on an object\n * - notifySignal: a way of notifying the signal for a gate that it has been dirtied\n *\n * - memo:\n * - @memo: a way of creating a memoized getter on an object or upgrading a descriptor with a getter\n * to be a memo\n * - defineMemo: a way of creating a memo on an object\n *\n * - signalStore: storage bucket for signals associated to an object\n * - withSignalStore: a way of pre-creating a signal store on an object\n *\n *\n * @internal\n */\n\n/**\n * An Opaque type that represents a framework specific or TC39 signal.\n *\n * It may be an array of signals or a single signal.\n *\n * @internal\n */\nexport type SignalRef = unknown;\n/**\n * The hooks which MUST be configured in order to use this library,\n * either for framework specfic signals or TC39 signals.\n *\n * Support for multiple frameworks simultaneously can be done via\n * this abstraction by returning multiple signals from the `createSignal`\n * method, and consuming the correct one via the correct framework via\n * the `consumeSignal` and `notifySignal` methods.\n *\n */\nexport interface SignalHooks<T = SignalRef> {\n createSignal: (obj: object, key: string | symbol) => T;\n consumeSignal: (signal: T) => void;\n notifySignal: (signal: T) => void;\n createMemo: <F>(obj: object, key: string | symbol, fn: () => F) => () => F;\n willSyncFlushWatchers: () => boolean;\n waitFor?: <K>(promise: Promise<K>) => Promise<K>;\n}\n\nexport interface HooksOptions {\n wellknown: {\n Array: symbol | string;\n };\n}\n\n/**\n * Configures the signals implementation to use. Supports multiple\n * implementations simultaneously.\n *\n * @public\n * @param buildConfig - a function that takes options and returns a configuration object\n */\nexport function setupSignals<T>(buildConfig: (options: HooksOptions) => SignalHooks<T>) {\n // We want to assert this but can't because too many package manager\n // and bundler bugs exist that cause this to be called multiple times\n // for what should be a single call.\n // assert(`Cannot override configured signal hooks`, peekTransient('signalHooks') === null);\n const hooks = buildConfig({\n wellknown: {\n Array: ARRAY_SIGNAL,\n },\n });\n setTransient('signalHooks', hooks);\n}\n\n/**\n * Internal method for consuming the configured `createSignal` hook\n *\n * @internal\n */\nexport function createSignal(obj: object, key: string | symbol): SignalRef {\n const signalHooks: SignalHooks | null = peekTransient('signalHooks');\n assert(`Signal hooks not configured`, signalHooks);\n return signalHooks.createSignal(obj, key);\n}\n\n/**\n * Internal method for consuming the configured `consumeSignal` hook\n *\n * @internal\n */\nexport function consumeSignal(signal: SignalRef) {\n const signalHooks: SignalHooks | null = peekTransient('signalHooks');\n\n assert(`Signal hooks not configured`, signalHooks);\n return signalHooks.consumeSignal(signal);\n}\n\n/**\n * Internal method for consuming the configured `notifySignal` hook\n *\n * @internal\n */\nexport function notifySignal(signal: SignalRef) {\n const signalHooks: SignalHooks | null = peekTransient('signalHooks');\n assert(`Signal hooks not configured`, signalHooks);\n return signalHooks.notifySignal(signal);\n}\n\nexport function createMemo<T>(object: object, key: string | symbol, fn: () => T): () => T {\n const signalHooks: SignalHooks | null = peekTransient('signalHooks');\n assert(`Signal hooks not configured`, signalHooks);\n return signalHooks.createMemo(object, key, fn);\n}\n\nexport function willSyncFlushWatchers(): boolean {\n const signalHooks: SignalHooks | null = peekTransient('signalHooks');\n assert(`Signal hooks not configured`, signalHooks);\n return signalHooks.willSyncFlushWatchers();\n}\n\nexport function waitFor<K>(promise: Promise<K>): Promise<K> {\n const signalHooks: SignalHooks | null = peekTransient('signalHooks');\n\n if (signalHooks?.waitFor) {\n return signalHooks.waitFor(promise);\n }\n return promise;\n}\n"],"names":["ARRAY_SIGNAL","getOrSetGlobal","Symbol","OBJECT_SIGNAL","setupSignals","buildConfig","hooks","wellknown","Array","setTransient","createSignal","obj","key","signalHooks","peekTransient","macroCondition","getGlobalConfig","WarpDrive","env","DEBUG","test","Error","consumeSignal","signal","notifySignal","createMemo","object","fn","willSyncFlushWatchers","waitFor","promise"],"mappings":";;;AAIO,MAAMA,YAAY,GAAGC,cAAc,CAAC,KAAK,EAAEC,MAAM,CAAC,KAAK,CAAC;AACxD,MAAMC,aAAa,GAAGF,cAAc,CAAC,KAAK,EAAEC,MAAM,CAAC,KAAK,CAAC;;AAEhE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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,WAAW,CAAA,GAAA,EAAA;AACjD,EAAA,OAAOA,WAAW,CAACe,qBAAqB,EAAE;AAC5C;AAEO,SAASC,OAAOA,CAAIC,OAAmB,EAAc;AAC1D,EAAA,MAAMjB,WAA+B,GAAGC,aAAa,CAAC,aAAa,CAAC;EAEpE,IAAID,WAAW,EAAEgB,OAAO,EAAE;AACxB,IAAA,OAAOhB,WAAW,CAACgB,OAAO,CAACC,OAAO,CAAC;AACrC;AACA,EAAA,OAAOA,OAAO;AAChB;;;;"}
@@ -0,0 +1 @@
1
+ export { s as setupSignals } from "./configure-Bz49BEZQ.js";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configure.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}