@warp-drive/core 5.6.0-alpha.17 → 5.6.0-alpha.5

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 (219) hide show
  1. package/README.md +7 -8
  2. package/declarations/index.d.ts +3 -14
  3. package/declarations/index.d.ts.map +1 -0
  4. package/declarations/request/-private/context.d.ts +35 -34
  5. package/declarations/request/-private/context.d.ts.map +1 -0
  6. package/declarations/request/-private/debug.d.ts +3 -2
  7. package/declarations/request/-private/debug.d.ts.map +1 -0
  8. package/declarations/request/-private/fetch.d.ts +36 -24
  9. package/declarations/request/-private/fetch.d.ts.map +1 -0
  10. package/declarations/request/-private/future.d.ts +4 -3
  11. package/declarations/request/-private/future.d.ts.map +1 -0
  12. package/declarations/request/-private/manager.d.ts +132 -159
  13. package/declarations/request/-private/manager.d.ts.map +1 -0
  14. package/declarations/request/-private/promise-cache.d.ts +13 -21
  15. package/declarations/request/-private/promise-cache.d.ts.map +1 -0
  16. package/declarations/request/-private/types.d.ts +123 -124
  17. package/declarations/request/-private/types.d.ts.map +1 -0
  18. package/declarations/request/-private/utils.d.ts +9 -8
  19. package/declarations/request/-private/utils.d.ts.map +1 -0
  20. package/declarations/request.d.ts +433 -5
  21. package/declarations/request.d.ts.map +1 -0
  22. package/declarations/types/-private.d.ts +8 -16
  23. package/declarations/types/-private.d.ts.map +1 -0
  24. package/declarations/types/cache/aliases.d.ts +1 -11
  25. package/declarations/types/cache/aliases.d.ts.map +1 -0
  26. package/declarations/types/cache/change.d.ts +5 -4
  27. package/declarations/types/cache/change.d.ts.map +1 -0
  28. package/declarations/types/cache/mutations.d.ts +28 -51
  29. package/declarations/types/cache/mutations.d.ts.map +1 -0
  30. package/declarations/types/cache/operations.d.ts +47 -60
  31. package/declarations/types/cache/operations.d.ts.map +1 -0
  32. package/declarations/types/cache/relationship.d.ts +9 -11
  33. package/declarations/types/cache/relationship.d.ts.map +1 -0
  34. package/declarations/types/cache.d.ts +484 -495
  35. package/declarations/types/cache.d.ts.map +1 -0
  36. package/declarations/types/graph.d.ts +40 -31
  37. package/declarations/types/graph.d.ts.map +1 -0
  38. package/declarations/types/identifier.d.ts +82 -83
  39. package/declarations/types/identifier.d.ts.map +1 -0
  40. package/declarations/types/json/raw.d.ts +2 -1
  41. package/declarations/types/json/raw.d.ts.map +1 -0
  42. package/declarations/types/params.d.ts +5 -4
  43. package/declarations/types/params.d.ts.map +1 -0
  44. package/declarations/types/record.d.ts +76 -117
  45. package/declarations/types/record.d.ts.map +1 -0
  46. package/declarations/types/record.type-test.d.ts +2 -0
  47. package/declarations/types/record.type-test.d.ts.map +1 -0
  48. package/declarations/types/request.d.ts +266 -289
  49. package/declarations/types/request.d.ts.map +1 -0
  50. package/declarations/types/request.type-test.d.ts +2 -0
  51. package/declarations/types/request.type-test.d.ts.map +1 -0
  52. package/declarations/types/runtime.d.ts +9 -8
  53. package/declarations/types/runtime.d.ts.map +1 -0
  54. package/declarations/types/schema/concepts.d.ts +13 -19
  55. package/declarations/types/schema/concepts.d.ts.map +1 -0
  56. package/declarations/types/schema/fields.d.ts +1741 -1712
  57. package/declarations/types/schema/fields.d.ts.map +1 -0
  58. package/declarations/types/schema/fields.type-test.d.ts +1 -0
  59. package/declarations/types/schema/fields.type-test.d.ts.map +1 -0
  60. package/declarations/types/spec/document.d.ts +22 -28
  61. package/declarations/types/spec/document.d.ts.map +1 -0
  62. package/declarations/types/spec/error.d.ts +17 -16
  63. package/declarations/types/spec/error.d.ts.map +1 -0
  64. package/declarations/types/spec/json-api-raw.d.ts +102 -102
  65. package/declarations/types/spec/json-api-raw.d.ts.map +1 -0
  66. package/declarations/types/symbols.d.ts +75 -74
  67. package/declarations/types/symbols.d.ts.map +1 -0
  68. package/declarations/types/utils.d.ts +5 -5
  69. package/declarations/types/utils.d.ts.map +1 -0
  70. package/declarations/types.d.ts +7 -10
  71. package/declarations/types.d.ts.map +1 -0
  72. package/dist/{context-COmAnXUQ.js → context-DE5sFezZ.js} +2 -2
  73. package/dist/context-DE5sFezZ.js.map +1 -0
  74. package/dist/index.js +104 -37
  75. package/dist/index.js.map +1 -0
  76. package/dist/request.js +1 -1
  77. package/dist/request.js.map +1 -0
  78. package/dist/types/-private.js +3 -3
  79. package/dist/types/-private.js.map +1 -0
  80. package/dist/types/cache/aliases.js.map +1 -0
  81. package/dist/types/cache/change.js.map +1 -0
  82. package/dist/types/cache/mutations.js.map +1 -0
  83. package/dist/types/cache/operations.js.map +1 -0
  84. package/dist/types/cache/relationship.js.map +1 -0
  85. package/dist/types/cache.js.map +1 -0
  86. package/dist/types/graph.js.map +1 -0
  87. package/dist/types/identifier.js.map +1 -0
  88. package/dist/types/json/raw.js.map +1 -0
  89. package/dist/types/params.js.map +1 -0
  90. package/dist/types/record.js +1 -1
  91. package/dist/types/record.js.map +1 -0
  92. package/dist/types/request.js +2 -2
  93. package/dist/types/request.js.map +1 -0
  94. package/dist/types/runtime.js +1 -1
  95. package/dist/types/runtime.js.map +1 -0
  96. package/dist/types/schema/concepts.js.map +1 -0
  97. package/dist/types/schema/fields.js +41 -8
  98. package/dist/types/schema/fields.js.map +1 -0
  99. package/dist/types/schema/fields.type-test.js.map +1 -0
  100. package/dist/types/spec/document.js.map +1 -0
  101. package/dist/types/spec/error.js.map +1 -0
  102. package/dist/types/spec/json-api-raw.js.map +1 -0
  103. package/dist/types/symbols.js +3 -3
  104. package/dist/types/symbols.js.map +1 -0
  105. package/dist/types/utils.js.map +1 -0
  106. package/dist/types.js.map +1 -0
  107. package/package.json +8 -11
  108. package/cjs-dist/addon-shim.cjs +0 -1
  109. package/cjs-dist/cjs-set-config.cjs +0 -1
  110. package/declarations/build-config/babel-macros.d.ts +0 -1
  111. package/declarations/build-config/canary-features.d.ts +0 -1
  112. package/declarations/build-config/debugging.d.ts +0 -1
  113. package/declarations/build-config/deprecations.d.ts +0 -1
  114. package/declarations/build-config/env.d.ts +0 -1
  115. package/declarations/build-config/macros.d.ts +0 -1
  116. package/declarations/build-config.d.ts +0 -1
  117. package/declarations/configure.d.ts +0 -7
  118. package/declarations/graph/-private/-diff.d.ts +0 -32
  119. package/declarations/graph/-private/-edge-definition.d.ts +0 -148
  120. package/declarations/graph/-private/-state.d.ts +0 -96
  121. package/declarations/graph/-private/-utils.d.ts +0 -31
  122. package/declarations/graph/-private/coerce-id.d.ts +0 -10
  123. package/declarations/graph/-private/debug/assert-polymorphic-type.d.ts +0 -18
  124. package/declarations/graph/-private/edges/collection.d.ts +0 -39
  125. package/declarations/graph/-private/edges/implicit.d.ts +0 -43
  126. package/declarations/graph/-private/edges/resource.d.ts +0 -24
  127. package/declarations/graph/-private/graph.d.ts +0 -90
  128. package/declarations/graph/-private/normalize-link.d.ts +0 -8
  129. package/declarations/graph/-private/operations/add-to-related-records.d.ts +0 -4
  130. package/declarations/graph/-private/operations/merge-identifier.d.ts +0 -3
  131. package/declarations/graph/-private/operations/remove-from-related-records.d.ts +0 -4
  132. package/declarations/graph/-private/operations/replace-related-record.d.ts +0 -3
  133. package/declarations/graph/-private/operations/replace-related-records.d.ts +0 -62
  134. package/declarations/graph/-private/operations/update-relationship.d.ts +0 -13
  135. package/declarations/graph/-private.d.ts +0 -13
  136. package/declarations/reactive/-private/document.d.ts +0 -146
  137. package/declarations/reactive/-private/fields/compute.d.ts +0 -43
  138. package/declarations/reactive/-private/fields/extension.d.ts +0 -8
  139. package/declarations/reactive/-private/fields/managed-array.d.ts +0 -22
  140. package/declarations/reactive/-private/fields/managed-object.d.ts +0 -21
  141. package/declarations/reactive/-private/fields/many-array-manager.d.ts +0 -19
  142. package/declarations/reactive/-private/hooks.d.ts +0 -5
  143. package/declarations/reactive/-private/record.d.ts +0 -64
  144. package/declarations/reactive/-private/schema.d.ts +0 -271
  145. package/declarations/reactive/-private/symbols.d.ts +0 -36
  146. package/declarations/reactive/-private.d.ts +0 -1
  147. package/declarations/reactive.d.ts +0 -4
  148. package/declarations/store/-private/cache-handler/handler.d.ts +0 -62
  149. package/declarations/store/-private/cache-handler/types.d.ts +0 -98
  150. package/declarations/store/-private/cache-handler/utils.d.ts +0 -32
  151. package/declarations/store/-private/caches/cache-utils.d.ts +0 -12
  152. package/declarations/store/-private/caches/identifier-cache.d.ts +0 -304
  153. package/declarations/store/-private/caches/instance-cache.d.ts +0 -65
  154. package/declarations/store/-private/caches/resource-utils.d.ts +0 -9
  155. package/declarations/store/-private/debug/utils.d.ts +0 -6
  156. package/declarations/store/-private/default-cache-policy.d.ts +0 -384
  157. package/declarations/store/-private/legacy-model-support/record-reference.d.ts +0 -159
  158. package/declarations/store/-private/legacy-model-support/shim-model-class.d.ts +0 -17
  159. package/declarations/store/-private/managers/cache-capabilities-manager.d.ts +0 -25
  160. package/declarations/store/-private/managers/cache-manager.d.ts +0 -443
  161. package/declarations/store/-private/managers/notification-manager.d.ts +0 -98
  162. package/declarations/store/-private/managers/record-array-manager.d.ts +0 -97
  163. package/declarations/store/-private/network/request-cache.d.ts +0 -107
  164. package/declarations/store/-private/new-core-tmp/promise-state.d.ts +0 -263
  165. package/declarations/store/-private/new-core-tmp/reactivity/configure.d.ts +0 -176
  166. package/declarations/store/-private/new-core-tmp/reactivity/internal.d.ts +0 -169
  167. package/declarations/store/-private/new-core-tmp/reactivity/signal.d.ts +0 -35
  168. package/declarations/store/-private/new-core-tmp/request-state.d.ts +0 -277
  169. package/declarations/store/-private/new-core-tmp/request-subscription.d.ts +0 -261
  170. package/declarations/store/-private/record-arrays/identifier-array.d.ts +0 -147
  171. package/declarations/store/-private/record-arrays/many-array.d.ts +0 -197
  172. package/declarations/store/-private/record-arrays/native-proxy-type-fix.d.ts +0 -126
  173. package/declarations/store/-private/store-service.d.ts +0 -1605
  174. package/declarations/store/-private/utils/coerce-id.d.ts +0 -10
  175. package/declarations/store/-private/utils/construct-resource.d.ts +0 -6
  176. package/declarations/store/-private/utils/is-non-empty-string.d.ts +0 -1
  177. package/declarations/store/-private/utils/normalize-model-name.d.ts +0 -1
  178. package/declarations/store/-private/utils/uuid-polyfill.d.ts +0 -1
  179. package/declarations/store/-private.d.ts +0 -31
  180. package/declarations/store/-types/q/cache-capabilities-manager.d.ts +0 -99
  181. package/declarations/store/-types/q/ds-model.d.ts +0 -21
  182. package/declarations/store/-types/q/identifier.d.ts +0 -20
  183. package/declarations/store/-types/q/record-instance.d.ts +0 -23
  184. package/declarations/store/-types/q/schema-service.d.ts +0 -354
  185. package/declarations/store/-types/q/store.d.ts +0 -32
  186. package/declarations/store.d.ts +0 -1
  187. package/declarations/utils/string.d.ts +0 -48
  188. package/dist/build-config/babel-macros.js +0 -1
  189. package/dist/build-config/canary-features.js +0 -1
  190. package/dist/build-config/debugging.js +0 -1
  191. package/dist/build-config/deprecations.js +0 -1
  192. package/dist/build-config/env.js +0 -1
  193. package/dist/build-config/macros.js +0 -1
  194. package/dist/build-config.js +0 -1
  195. package/dist/configure-B48bFHOl.js +0 -181
  196. package/dist/configure.js +0 -1
  197. package/dist/graph/-private.js +0 -3372
  198. package/dist/handler-C2T-IyJK.js +0 -339
  199. package/dist/reactive/-private.js +0 -1
  200. package/dist/reactive.js +0 -1988
  201. package/dist/request-state-CjLph1LP.js +0 -8139
  202. package/dist/store/-private.js +0 -3
  203. package/dist/store.js +0 -545
  204. package/dist/symbols-SIstXMLI.js +0 -44
  205. package/dist/utils/string.js +0 -92
  206. package/logos/NCC-1701-a-blue.svg +0 -4
  207. package/logos/NCC-1701-a-gold.svg +0 -4
  208. package/logos/NCC-1701-a-gold_100.svg +0 -1
  209. package/logos/NCC-1701-a-gold_base-64.txt +0 -1
  210. package/logos/NCC-1701-a.svg +0 -4
  211. package/logos/README.md +0 -4
  212. package/logos/docs-badge.svg +0 -2
  213. package/logos/ember-data-logo-dark.svg +0 -12
  214. package/logos/ember-data-logo-light.svg +0 -12
  215. package/logos/github-header.svg +0 -444
  216. package/logos/social1.png +0 -0
  217. package/logos/social2.png +0 -0
  218. package/logos/warp-drive-logo-dark.svg +0 -4
  219. package/logos/warp-drive-logo-gold.svg +0 -4
@@ -1 +0,0 @@
1
- export * from '@warp-drive/build-config/deprecations';
@@ -1 +0,0 @@
1
- export { DEBUG, IS_CI, IS_RECORDING, PRODUCTION, SHOULD_RECORD, TESTING } from '@warp-drive/build-config/env';
@@ -1 +0,0 @@
1
- export { assert } from '@warp-drive/build-config/macros';
@@ -1 +0,0 @@
1
- export { setConfig } from '@warp-drive/build-config';
@@ -1,181 +0,0 @@
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 reactive arrays,
47
- * resources and documents with 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
- * Unlike many signals implementations, WarpDrive does not wrap values as
55
- * signals directly, but instead uses signals to alert the reactive layer
56
- * to changes in the underlying cache. E.g. a signal is associated to a value,
57
- * but does not serve as the cache for that value directly. We refer to this as
58
- * a "gate", the pattern has also been called "side-signals".
59
- *
60
- * A no-op implementation is allowed, though it may lead to performance issues
61
- * in locations that use createMemo as no memoization would be done. This is
62
- * typically desirable only when integrating with a framework that does its own
63
- * memoization and does not integrate with any signals-like primitive. For these
64
- * scenarios you may also be interested in integrating with the {@link NotificationManager}
65
- * more directly.
66
- *
67
- * @public
68
- */
69
-
70
- /**
71
- * Contains information a {@link SignalHooks} implementation may want
72
- * to use, such as the specialized key used for the signal
73
- * representing an array's contents / length.
74
- *
75
- * ```ts
76
- * interface HooksOptions {
77
- * wellknown: {
78
- * Array: symbol | string;
79
- * }
80
- * }
81
- * ```
82
- *
83
- * @public
84
- */
85
-
86
- /**
87
- * Configures the signals implementation to use. Supports multiple
88
- * implementations simultaneously.
89
- *
90
- * See {@link HooksOptions} for the options passed to the provided function
91
- * when called.
92
- *
93
- * See {@link SignalHooks} for the implementation the callback function should
94
- * return.
95
- *
96
- * @public
97
- * @param buildConfig - a function that takes options and returns a configuration object
98
- */
99
- function setupSignals(buildConfig) {
100
- // We want to assert this but can't because too many package manager
101
- // and bundler bugs exist that cause this to be called multiple times
102
- // for what should be a single call.
103
- // assert(`Cannot override configured signal hooks`, peekTransient('signalHooks') === null);
104
- const hooks = buildConfig({
105
- wellknown: {
106
- Array: ARRAY_SIGNAL
107
- }
108
- });
109
- setTransient('signalHooks', hooks);
110
- }
111
-
112
- /**
113
- * Internal method for consuming the configured `createSignal` hook
114
- *
115
- * @internal
116
- */
117
- function createSignal(obj, key) {
118
- const signalHooks = peekTransient('signalHooks');
119
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
120
- if (!test) {
121
- throw new Error(`Signal hooks not configured`);
122
- }
123
- })(signalHooks) : {};
124
- return signalHooks.createSignal(obj, key);
125
- }
126
-
127
- /**
128
- * Internal method for consuming the configured `consumeSignal` hook
129
- *
130
- * @internal
131
- */
132
- function consumeSignal(signal) {
133
- const signalHooks = peekTransient('signalHooks');
134
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
135
- if (!test) {
136
- throw new Error(`Signal hooks not configured`);
137
- }
138
- })(signalHooks) : {};
139
- return signalHooks.consumeSignal(signal);
140
- }
141
-
142
- /**
143
- * Internal method for consuming the configured `notifySignal` hook
144
- *
145
- * @internal
146
- */
147
- function notifySignal(signal) {
148
- const signalHooks = peekTransient('signalHooks');
149
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
150
- if (!test) {
151
- throw new Error(`Signal hooks not configured`);
152
- }
153
- })(signalHooks) : {};
154
- return signalHooks.notifySignal(signal);
155
- }
156
- function createMemo(object, key, fn) {
157
- const signalHooks = peekTransient('signalHooks');
158
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
159
- if (!test) {
160
- throw new Error(`Signal hooks not configured`);
161
- }
162
- })(signalHooks) : {};
163
- return signalHooks.createMemo(object, key, fn);
164
- }
165
- function willSyncFlushWatchers() {
166
- const signalHooks = peekTransient('signalHooks');
167
- macroCondition(getGlobalConfig().WarpDrive.env.DEBUG) ? (test => {
168
- if (!test) {
169
- throw new Error(`Signal hooks not configured`);
170
- }
171
- })(signalHooks) : {};
172
- return signalHooks.willSyncFlushWatchers();
173
- }
174
- function waitFor(promise) {
175
- const signalHooks = peekTransient('signalHooks');
176
- if (signalHooks?.waitFor) {
177
- return signalHooks.waitFor(promise);
178
- }
179
- return promise;
180
- }
181
- 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 };
package/dist/configure.js DELETED
@@ -1 +0,0 @@
1
- export { s as setupSignals } from "./configure-B48bFHOl.js";