@ember-data-mirror/store 5.5.0-alpha.19 → 5.5.0-alpha.21
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.
- package/dist/-private.js +2 -1
- package/dist/-private.js.map +1 -1
- package/dist/configure-BfLLW6GY.js +161 -0
- package/dist/configure-BfLLW6GY.js.map +1 -0
- package/dist/configure.js +1 -0
- package/dist/configure.js.map +1 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/{many-array-CE2Jr4mQ.js → request-state-BrADgFy5.js} +870 -92
- package/dist/request-state-BrADgFy5.js.map +1 -0
- package/package.json +19 -11
- package/unstable-preview-types/-private/document.d.ts.map +1 -1
- package/unstable-preview-types/-private/legacy-model-support/record-reference.d.ts.map +1 -1
- package/unstable-preview-types/-private/managers/notification-manager.d.ts.map +1 -1
- package/unstable-preview-types/-private/managers/record-array-manager.d.ts.map +1 -1
- package/unstable-preview-types/-private/network/request-cache.d.ts +8 -8
- package/unstable-preview-types/-private/network/request-cache.d.ts.map +1 -1
- package/unstable-preview-types/-private/new-core-tmp/promise-state.d.ts +289 -0
- package/unstable-preview-types/-private/new-core-tmp/promise-state.d.ts.map +1 -0
- package/unstable-preview-types/-private/new-core-tmp/reactivity/configure.d.ts +92 -0
- package/unstable-preview-types/-private/new-core-tmp/reactivity/configure.d.ts.map +1 -0
- package/unstable-preview-types/-private/new-core-tmp/reactivity/internal.d.ts +172 -0
- package/unstable-preview-types/-private/new-core-tmp/reactivity/internal.d.ts.map +1 -0
- package/unstable-preview-types/-private/new-core-tmp/reactivity/signal.d.ts +32 -0
- package/unstable-preview-types/-private/new-core-tmp/reactivity/signal.d.ts.map +1 -0
- package/unstable-preview-types/-private/new-core-tmp/request-state.d.ts +276 -0
- package/unstable-preview-types/-private/new-core-tmp/request-state.d.ts.map +1 -0
- package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts +4 -9
- package/unstable-preview-types/-private/record-arrays/identifier-array.d.ts.map +1 -1
- package/unstable-preview-types/-private/record-arrays/many-array.d.ts +2 -2
- package/unstable-preview-types/-private/record-arrays/many-array.d.ts.map +1 -1
- package/unstable-preview-types/-private.d.ts +7 -2
- package/unstable-preview-types/-private.d.ts.map +1 -1
- package/unstable-preview-types/configure.d.ts +21 -0
- package/unstable-preview-types/configure.d.ts.map +1 -0
- package/unstable-preview-types/index.d.ts +6 -0
- package/unstable-preview-types/index.d.ts.map +1 -1
- package/dist/many-array-CE2Jr4mQ.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ember-data-mirror/store",
|
|
3
|
-
"version": "5.5.0-alpha.
|
|
3
|
+
"version": "5.5.0-alpha.21",
|
|
4
4
|
"description": "The core of EmberData. Provides the Store service which coordinates the cache with the network and presentation layers.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon"
|
|
@@ -33,26 +33,34 @@
|
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@embroider/macros": "^1.16.12",
|
|
36
|
-
"@warp-drive-mirror/build-config": "5.5.0-alpha.
|
|
36
|
+
"@warp-drive-mirror/build-config": "5.5.0-alpha.21"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"ember-source": "3.28.12 || ^4.0.4 || ^5.0.0 || ^6.0.0",
|
|
40
|
-
"@ember-data-mirror/request": "5.5.0-alpha.
|
|
41
|
-
"@ember-data-mirror/request-utils": "5.5.0-alpha.
|
|
42
|
-
"@
|
|
43
|
-
"@
|
|
40
|
+
"@ember-data-mirror/request": "5.5.0-alpha.21",
|
|
41
|
+
"@ember-data-mirror/request-utils": "5.5.0-alpha.21",
|
|
42
|
+
"@warp-drive-mirror/core-types": "5.5.0-alpha.21",
|
|
43
|
+
"@ember-data-mirror/tracking": "5.5.0-alpha.21"
|
|
44
|
+
},
|
|
45
|
+
"peerDependenciesMeta": {
|
|
46
|
+
"@ember-data-mirror/tracking": {
|
|
47
|
+
"optional": true
|
|
48
|
+
},
|
|
49
|
+
"ember-source": {
|
|
50
|
+
"optional": true
|
|
51
|
+
}
|
|
44
52
|
},
|
|
45
53
|
"devDependencies": {
|
|
46
54
|
"@babel/core": "^7.26.10",
|
|
47
55
|
"@babel/plugin-transform-typescript": "^7.27.0",
|
|
48
56
|
"@babel/preset-env": "^7.26.9",
|
|
49
57
|
"@babel/preset-typescript": "^7.27.0",
|
|
50
|
-
"@ember-data-mirror/request": "5.5.0-alpha.
|
|
51
|
-
"@ember-data-mirror/request-utils": "5.5.0-alpha.
|
|
52
|
-
"@ember-data-mirror/tracking": "5.5.0-alpha.19",
|
|
58
|
+
"@ember-data-mirror/request": "5.5.0-alpha.21",
|
|
59
|
+
"@ember-data-mirror/request-utils": "5.5.0-alpha.21",
|
|
53
60
|
"@glimmer/component": "^2.0.0",
|
|
54
|
-
"@warp-drive-mirror/core-types": "5.5.0-alpha.
|
|
55
|
-
"@warp-drive/internal-config": "5.5.0-alpha.
|
|
61
|
+
"@warp-drive-mirror/core-types": "5.5.0-alpha.21",
|
|
62
|
+
"@warp-drive/internal-config": "5.5.0-alpha.21",
|
|
63
|
+
"@ember-data-mirror/tracking": "5.5.0-alpha.21",
|
|
56
64
|
"decorator-transforms": "^2.3.0",
|
|
57
65
|
"ember-source": "~6.3.0",
|
|
58
66
|
"expect-type": "^1.2.1",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/-private/document.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"document.d.ts","sourceRoot":"","sources":["../../src/-private/document.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AACxF,OAAO,KAAK,EAAkC,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC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IACH,IAAI,CAAC,OAAO,GAAE,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAIrG;;;;;;;;;OASG;IACH,KAAK,CAAC,OAAO,GAAE,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAItG;;;;;;;;;OASG;IACH,IAAI,CAAC,OAAO,GAAE,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAIrG;;;;;;;;;;;;OAYG;IACH,MAAM,IAAI,MAAM;CAiBjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-reference.d.ts","sourceRoot":"","sources":["../../../src/-private/legacy-model-support/record-reference.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"record-reference.d.ts","sourceRoot":"","sources":["../../../src/-private/legacy-model-support/record-reference.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAChF;;EAEE;AACF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAEvF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAG3E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;EAEE;AAEF;;;;;;EAME;AACF,MAAM,CAAC,OAAO,OAAO,eAAe;IAC1B,KAAK,EAAE,KAAK,CAAC;IAErB,QAAQ,EAAG,MAAM,CAAC;IAClB,aAAa,EAAE,sBAAsB,CAAC;IAE9B,IAAI,EAAE,MAAM,CAAC;gBAET,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,sBAAsB;IAa5D,OAAO;IAIP,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;;;;;;;;;;;;;;MAiBE;IACF,EAAE;IAMF;;;;;;;;;;;;;;;;;MAiBE;IACF,UAAU,IAAI,sBAAsB;IAIpC;;;;;;;;;;;;;;;;MAgBE;IACF,UAAU,IAAI,UAAU;IAIxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAsCE;IACF,IAAI,CAAC,eAAe,EAAE,sBAAsB,GAAG,OAAO,CAAC,sBAAsB,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAO9G;;;;;;;;;;;;;;;;MAgBE;IACF,KAAK,IAAI,oBAAoB,GAAG,IAAI;IAIpC;;;;;;;;;;;;;;;;MAgBE;IACF,IAAI;IAQJ;;;;;;;;;;;;;;;;MAgBE;IACF,MAAM;CAOP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notification-manager.d.ts","sourceRoot":"","sources":["../../../src/-private/managers/notification-manager.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"notification-manager.d.ts","sourceRoot":"","sources":["../../../src/-private/managers/notification-manager.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,wBAAwB,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAK1G,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AACvE,MAAM,MAAM,sBAAsB,GAAG,aAAa,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAQ/F,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,e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AAgB;IAC/F,SAAS,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,yBAAyB,GAAG,gBAAgB;IACxF,SAAS,CAAC,UAAU,EAAE,UAAU,GAAG,wBAAwB,EAAE,QAAQ,EAAE,yBAAyB,GAAG,gBAAgB;IA4BnH;;;;;;OAMG;IACH,WAAW,CAAC,KAAK,EAAE,gBAAgB;IAMnC;;;;;;;;;OASG;IACH,MAAM,CAAC,UAAU,EAAE,sBAAsB,EAAE,KAAK,EAAE,YAAY,GAAG,eAAe,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO;IACxG,MAAM,CAAC,UAAU,EAAE,sBAAsB,EAAE,KAAK,EAAE,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO;IACpG,MAAM,CAAC,UAAU,EAAE,sBAAsB,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO;IAC1E,MAAM,CAAC,UAAU,EAAE,wBAAwB,EAAE,KAAK,EAAE,sBAAsB,GAAG,OAAO;IAmEpF,YAAY,CAAC,EAAE,EAAE,MAAM,IAAI;IAI3B,eAAe,IAAI,OAAO;IAkB1B,MAAM;IAiBN,kBAAkB,CAAC,UAAU,EAAE,sBAAsB,EAAE,KAAK,EAAE,YAAY,GAAG,eAAe,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO;IACpH,kBAAkB,CAAC,UAAU,EAAE,sBAAsB,EAAE,KAAK,EAAE,QAAQ,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO;IAChH,kBAAkB,CAAC,UAAU,EAAE,sBAAsB,GAAG,wBAAwB,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO;IAyCjH,OAAO;CAIR"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record-array-manager.d.ts","sourceRoot":"","sources":["../../../src/-private/managers/record-array-manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"record-array-manager.d.ts","sourceRo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AE,sBAAsB,GAAG,IAAI;IAgB3D,KAAK,CAAC,OAAO,UAAO;IAUpB,OAAO;CAOR;AA4BD,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,GAAG,CAAC,sBAAsB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC,EACzD,KAAK,EAAE,UAAU,EACjB,UAAU,EAAE,sBAAsB,QAMnC"}
|
|
@@ -20,7 +20,7 @@ declare module '@ember-data-mirror/store/-private/network/request-cache' {
|
|
|
20
20
|
options?: Record<string, unknown>;
|
|
21
21
|
}
|
|
22
22
|
export type RequestStates = 'pending' | 'fulfilled' | 'rejected';
|
|
23
|
-
export interface
|
|
23
|
+
export interface RequestCacheRequestState {
|
|
24
24
|
state: RequestStates;
|
|
25
25
|
type: 'query' | 'mutation';
|
|
26
26
|
request: Request;
|
|
@@ -29,11 +29,11 @@ declare module '@ember-data-mirror/store/-private/network/request-cache' {
|
|
|
29
29
|
export interface Response {
|
|
30
30
|
data: unknown;
|
|
31
31
|
}
|
|
32
|
-
interface InternalRequest extends
|
|
32
|
+
interface InternalRequest extends RequestCacheRequestState {
|
|
33
33
|
[Touching]: StableRecordIdentifier[];
|
|
34
34
|
[RequestPromise]?: Promise<unknown>;
|
|
35
35
|
}
|
|
36
|
-
export type RequestSubscription = (requestState:
|
|
36
|
+
export type RequestSubscription = (requestState: RequestCacheRequestState) => void;
|
|
37
37
|
/**
|
|
38
38
|
* The RequestStateService is used to track the state of requests
|
|
39
39
|
* for fetching or updating known resource identifies that are inflight.
|
|
@@ -82,7 +82,7 @@ declare module '@ember-data-mirror/store/-private/network/request-cache' {
|
|
|
82
82
|
* @method subscribeForRecord
|
|
83
83
|
* @public
|
|
84
84
|
* @param {StableRecordIdentifier} identifier
|
|
85
|
-
* @param {(state:
|
|
85
|
+
* @param {(state: RequestCacheRequestState) => void} callback
|
|
86
86
|
*/
|
|
87
87
|
subscribeForRecord(identifier: StableRecordIdentifier, callback: RequestSubscription): void;
|
|
88
88
|
/**
|
|
@@ -91,18 +91,18 @@ declare module '@ember-data-mirror/store/-private/network/request-cache' {
|
|
|
91
91
|
* @method getPendingRequestsForRecord
|
|
92
92
|
* @public
|
|
93
93
|
* @param {StableRecordIdentifier} identifier
|
|
94
|
-
* @return {
|
|
94
|
+
* @return {RequestCacheRequestState[]} an array of request states for any pending requests for the given identifier
|
|
95
95
|
*/
|
|
96
|
-
getPendingRequestsForRecord(identifier: StableRecordIdentifier):
|
|
96
|
+
getPendingRequestsForRecord(identifier: StableRecordIdentifier): RequestCacheRequestState[];
|
|
97
97
|
/**
|
|
98
98
|
* Retrieve the last completed request for a given resource identity.
|
|
99
99
|
*
|
|
100
100
|
* @method getLastRequestForRecord
|
|
101
101
|
* @public
|
|
102
102
|
* @param {StableRecordIdentifier} identifier
|
|
103
|
-
* @return {
|
|
103
|
+
* @return {RequestCacheRequestState | null} the state of the most recent request for the given identifier
|
|
104
104
|
*/
|
|
105
|
-
getLastRequestForRecord(identifier: StableRecordIdentifier):
|
|
105
|
+
getLastRequestForRecord(identifier: StableRecordIdentifier): RequestCacheRequestState | null;
|
|
106
106
|
}
|
|
107
107
|
export {};
|
|
108
108
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-cache.d.ts","sourceRoot":"","sources":["../../../src/-private/network/request-cache.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAEhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAE9C,QAAA,MAAM,QAAQ,gCAAiD,CAAC;AAChE,eAAO,MAAM,cAAc,sCAAsD,CAAC;AAGlF,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACvC,gBAAgB,EAAE,sBAAsB,CAAC;CAC1C;AAED,MAAM,W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E,sBAAsB,EAAE,QAAQ,EAAE,mBAAmB;IASpF;;;;;;;OAOG;IACH,2BAA2B,CAAC,UAAU,EAAE,sBAAsB,GAAG,wBAAwB,EAAE;IAI3F;;;;;;;OAOG;IACH,uBAAuB,CAAC,UAAU,EAAE,sBAAsB,GAAG,wBAAwB,GAAG,IAAI;CAO7F"}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
declare module '@ember-data-mirror/store/-private/new-core-tmp/promise-state' {
|
|
2
|
+
import type { Awaitable } from '@ember-data-mirror/request';
|
|
3
|
+
/**
|
|
4
|
+
* The state of a promise in the "pending"
|
|
5
|
+
* state. This is the default initial state.
|
|
6
|
+
*
|
|
7
|
+
* @typedoc
|
|
8
|
+
*/
|
|
9
|
+
export interface PendingPromise {
|
|
10
|
+
/**
|
|
11
|
+
* The status of the promise.
|
|
12
|
+
*
|
|
13
|
+
* @typedoc
|
|
14
|
+
*/
|
|
15
|
+
status: 'pending';
|
|
16
|
+
/**
|
|
17
|
+
* Whether the promise is pending.
|
|
18
|
+
*
|
|
19
|
+
* @typedoc
|
|
20
|
+
*/
|
|
21
|
+
isPending: true;
|
|
22
|
+
/**
|
|
23
|
+
* Whether the promise is pending.
|
|
24
|
+
*
|
|
25
|
+
* @deprecated use `isPending` instead
|
|
26
|
+
* @typedoc
|
|
27
|
+
*/
|
|
28
|
+
isLoading: true;
|
|
29
|
+
/**
|
|
30
|
+
* Whether the promise has resolved
|
|
31
|
+
* successfully.
|
|
32
|
+
*
|
|
33
|
+
* @typedoc
|
|
34
|
+
*/
|
|
35
|
+
isSuccess: false;
|
|
36
|
+
/**
|
|
37
|
+
* Whether the promise has rejected
|
|
38
|
+
* with an error.
|
|
39
|
+
*
|
|
40
|
+
* @typedoc
|
|
41
|
+
*/
|
|
42
|
+
isError: false;
|
|
43
|
+
/**
|
|
44
|
+
* Once the promise has resolved, this will
|
|
45
|
+
* be the value the promise resolved to.
|
|
46
|
+
*
|
|
47
|
+
* @typedoc
|
|
48
|
+
*/
|
|
49
|
+
value: null;
|
|
50
|
+
/**
|
|
51
|
+
* Once the promise has resolved, this will
|
|
52
|
+
* be the value the promise resolved to.
|
|
53
|
+
*
|
|
54
|
+
* @deprecated use `value` instead
|
|
55
|
+
* @typedoc
|
|
56
|
+
*/
|
|
57
|
+
result: null;
|
|
58
|
+
/**
|
|
59
|
+
* Once the promise has rejected, this will
|
|
60
|
+
* be the error the promise rejected with.
|
|
61
|
+
*
|
|
62
|
+
*
|
|
63
|
+
* @deprecated use `reason` instead
|
|
64
|
+
* @typedoc
|
|
65
|
+
*/
|
|
66
|
+
error: null;
|
|
67
|
+
/**
|
|
68
|
+
* Once the promise has rejected, this will
|
|
69
|
+
* be the error the promise rejected with.
|
|
70
|
+
*
|
|
71
|
+
* @typedoc
|
|
72
|
+
*/
|
|
73
|
+
reason: null;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* The state of a promise in the "fulfilled" state.
|
|
77
|
+
* This is the state of a promise that has resolved
|
|
78
|
+
* successfully.
|
|
79
|
+
*
|
|
80
|
+
* @typedoc
|
|
81
|
+
*/
|
|
82
|
+
export interface ResolvedPromise<T> {
|
|
83
|
+
/**
|
|
84
|
+
* The status of the promise.
|
|
85
|
+
*
|
|
86
|
+
* @typedoc
|
|
87
|
+
*/
|
|
88
|
+
status: 'fulfilled';
|
|
89
|
+
/**
|
|
90
|
+
* Whether the promise is pending.
|
|
91
|
+
*
|
|
92
|
+
* @typedoc
|
|
93
|
+
*/
|
|
94
|
+
isPending: false;
|
|
95
|
+
/**
|
|
96
|
+
* Whether the promise is pending.
|
|
97
|
+
*
|
|
98
|
+
* @deprecated use `isPending` instead
|
|
99
|
+
* @typedoc
|
|
100
|
+
*/
|
|
101
|
+
isLoading: false;
|
|
102
|
+
/**
|
|
103
|
+
* Whether the promise has resolved
|
|
104
|
+
* successfully.
|
|
105
|
+
*
|
|
106
|
+
* @typedoc
|
|
107
|
+
*/
|
|
108
|
+
isSuccess: true;
|
|
109
|
+
/**
|
|
110
|
+
* Whether the promise has rejected
|
|
111
|
+
* with an error.
|
|
112
|
+
*
|
|
113
|
+
* @typedoc
|
|
114
|
+
*/
|
|
115
|
+
isError: false;
|
|
116
|
+
/**
|
|
117
|
+
* Once the promise has resolved, this will
|
|
118
|
+
* be the value the promise resolved to.
|
|
119
|
+
*
|
|
120
|
+
* @typedoc
|
|
121
|
+
*/
|
|
122
|
+
value: T;
|
|
123
|
+
/**
|
|
124
|
+
* Once the promise has resolved, this will
|
|
125
|
+
* be the value the promise resolved to.
|
|
126
|
+
*
|
|
127
|
+
* @deprecated use `value` instead
|
|
128
|
+
* @typedoc
|
|
129
|
+
*/
|
|
130
|
+
result: T;
|
|
131
|
+
/**
|
|
132
|
+
* Once the promise has rejected, this will
|
|
133
|
+
* be the error the promise rejected with.
|
|
134
|
+
*
|
|
135
|
+
*
|
|
136
|
+
* @deprecated use `reason` instead
|
|
137
|
+
* @typedoc
|
|
138
|
+
*/
|
|
139
|
+
error: null;
|
|
140
|
+
/**
|
|
141
|
+
* Once the promise has rejected, this will
|
|
142
|
+
* be the error the promise rejected with.
|
|
143
|
+
*
|
|
144
|
+
* @typedoc
|
|
145
|
+
*/
|
|
146
|
+
reason: null;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* The state of a promise in the "rejected" state.
|
|
150
|
+
* This is the state of a promise that has rejected
|
|
151
|
+
* with an error.
|
|
152
|
+
*
|
|
153
|
+
* @typedoc
|
|
154
|
+
*/
|
|
155
|
+
export interface RejectedPromise<E> {
|
|
156
|
+
/**
|
|
157
|
+
* The status of the promise.
|
|
158
|
+
*
|
|
159
|
+
* @typedoc
|
|
160
|
+
*/
|
|
161
|
+
status: 'rejected';
|
|
162
|
+
/**
|
|
163
|
+
* Whether the promise is pending.
|
|
164
|
+
*
|
|
165
|
+
* @typedoc
|
|
166
|
+
*/
|
|
167
|
+
isPending: false;
|
|
168
|
+
/**
|
|
169
|
+
* Whether the promise is pending.
|
|
170
|
+
*
|
|
171
|
+
* @deprecated use `isPending` instead
|
|
172
|
+
* @typedoc
|
|
173
|
+
*/
|
|
174
|
+
isLoading: false;
|
|
175
|
+
/**
|
|
176
|
+
* Whether the promise has resolved
|
|
177
|
+
* successfully.
|
|
178
|
+
*
|
|
179
|
+
* @typedoc
|
|
180
|
+
*/
|
|
181
|
+
isSuccess: false;
|
|
182
|
+
/**
|
|
183
|
+
* Whether the promise has rejected
|
|
184
|
+
* with an error.
|
|
185
|
+
*
|
|
186
|
+
* @typedoc
|
|
187
|
+
*/
|
|
188
|
+
isError: true;
|
|
189
|
+
/**
|
|
190
|
+
* Once the promise has resolved, this will
|
|
191
|
+
* be the value the promise resolved to.
|
|
192
|
+
*
|
|
193
|
+
* @typedoc
|
|
194
|
+
*/
|
|
195
|
+
value: null;
|
|
196
|
+
/**
|
|
197
|
+
* Once the promise has resolved, this will
|
|
198
|
+
* be the value the promise resolved to.
|
|
199
|
+
*
|
|
200
|
+
* @deprecated use `value` instead
|
|
201
|
+
* @typedoc
|
|
202
|
+
*/
|
|
203
|
+
result: null;
|
|
204
|
+
/**
|
|
205
|
+
* Once the promise has rejected, this will
|
|
206
|
+
* be the error the promise rejected with.
|
|
207
|
+
*
|
|
208
|
+
*
|
|
209
|
+
* @deprecated use `reason` instead
|
|
210
|
+
* @typedoc
|
|
211
|
+
*/
|
|
212
|
+
error: E;
|
|
213
|
+
/**
|
|
214
|
+
* Once the promise has rejected, this will
|
|
215
|
+
* be the error the promise rejected with.
|
|
216
|
+
*
|
|
217
|
+
* @typedoc
|
|
218
|
+
*/
|
|
219
|
+
reason: E;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* The state of a promise. This is the type that is returned
|
|
223
|
+
* from `getPromiseState`.
|
|
224
|
+
*
|
|
225
|
+
* See also:
|
|
226
|
+
* - {@link PendingPromise}
|
|
227
|
+
* - {@link ResolvedPromise}
|
|
228
|
+
* - {@link RejectedPromise}
|
|
229
|
+
*
|
|
230
|
+
* @typedoc
|
|
231
|
+
*/
|
|
232
|
+
export type PromiseState<T = unknown, E = unknown> = PendingPromise | ResolvedPromise<T> | RejectedPromise<E>;
|
|
233
|
+
export function createPromiseState<T, E>(promise: Promise<T> | Awaitable<T, E>): Readonly<PromiseState<T, E>>;
|
|
234
|
+
/**
|
|
235
|
+
* Returns a reactive state-machine for the provided promise or awaitable.
|
|
236
|
+
*
|
|
237
|
+
* Repeat calls to `getPromiseState` with the same promise will return the same state object
|
|
238
|
+
* making is safe and easy to use in templates and JavaScript code to produce reactive
|
|
239
|
+
* behaviors around promises.
|
|
240
|
+
*
|
|
241
|
+
* `getPromiseState` can be used in both JavaScript and Template contexts.
|
|
242
|
+
*
|
|
243
|
+
* ```ts
|
|
244
|
+
* import { getPromiseState } from '@warp-drive-mirror/ember';
|
|
245
|
+
*
|
|
246
|
+
* const state = getPromiseState(promise);
|
|
247
|
+
* ```
|
|
248
|
+
*
|
|
249
|
+
* For instance, we could write a getter on a component that updates whenever
|
|
250
|
+
* the promise state advances or the promise changes, by combining the function
|
|
251
|
+
* with the use of `@cached`
|
|
252
|
+
*
|
|
253
|
+
* ```ts
|
|
254
|
+
* class Component {
|
|
255
|
+
* @cached
|
|
256
|
+
* get title() {
|
|
257
|
+
* const state = getPromiseState(this.args.request);
|
|
258
|
+
* if (state.isPending) {
|
|
259
|
+
* return 'loading...';
|
|
260
|
+
* }
|
|
261
|
+
* if (state.isError) { return null; }
|
|
262
|
+
* return state.result.title;
|
|
263
|
+
* }
|
|
264
|
+
* }
|
|
265
|
+
* ```
|
|
266
|
+
*
|
|
267
|
+
* Or in a template as a helper:
|
|
268
|
+
*
|
|
269
|
+
* ```gjs
|
|
270
|
+
* import { getPromiseState } from '@warp-drive-mirror/ember';
|
|
271
|
+
*
|
|
272
|
+
* <template>
|
|
273
|
+
* {{#let (getPromiseState @request) as |state|}}
|
|
274
|
+
* {{#if state.isPending}} <Spinner />
|
|
275
|
+
* {{else if state.isError}} <ErrorForm @error={{state.error}} />
|
|
276
|
+
* {{else}}
|
|
277
|
+
* <h1>{{state.result.title}}</h1>
|
|
278
|
+
* {{/if}}
|
|
279
|
+
* {{/let}}
|
|
280
|
+
* </template>
|
|
281
|
+
* ```
|
|
282
|
+
*
|
|
283
|
+
* If looking to use in a template, consider also the `<Await />` component.
|
|
284
|
+
*
|
|
285
|
+
* @typedoc
|
|
286
|
+
*/
|
|
287
|
+
export function getPromiseState<T = unknown, E = unknown>(promise: Promise<T> | Awaitable<T, E>): Readonly<PromiseState<T, E>>;
|
|
288
|
+
}
|
|
289
|
+
//# sourceMappingURL=promise-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"promise-state.d.ts","sourceRoot":"","sources":["../../../src/-private/new-core-tmp/promise-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAOrD;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,MAAM,EAAE,SAAS,CAAC;IAElB;;;;OAIG;IACH,SAAS,EAAE,IAAI,CAAC;IAEhB;;;;;OAKG;IACH,SAAS,EAAE,IAAI,CAAC;IAEhB;;;;;OAKG;IACH,SAAS,EAAE,KAAK,CAAC;IAEjB;;;;;OAKG;IACH,OAAO,EAAE,KAAK,CAAC;IAEf;;;;;OAKG;IACH,KAAK,EAAE,IAAI,CAAC;IACZ;;;;;;OAMG;IACH,MAAM,EAAE,IAAI,CAAC;IAEb;;;;;;;OAOG;IACH,KAAK,EAAE,IAAI,CAAC;IAEZ;;;;;OAKG;IACH,MAAM,EAAE,IAAI,CAAC;CACd;AAED;;;;;;GAMG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC;;;;OAIG;IACH,MAAM,EAAE,WAAW,CAAC;IAEpB;;;;OAIG;IACH,SAAS,EAAE,KAAK,CAAC;IAEjB;;;;;OAKG;IACH,SAAS,EAAE,KAAK,CAAC;IACjB;;;;;OAKG;IACH,SAAS,EAAE,I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,OAAO,EACtD,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC,QAAQ,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAU9B"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
declare module '@ember-data-mirror/store/-private/new-core-tmp/reactivity/configure' {
|
|
2
|
+
export const ARRAY_SIGNAL: "___(unique) Symbol(#[])";
|
|
3
|
+
export const OBJECT_SIGNAL: "___(unique) Symbol(#{})";
|
|
4
|
+
/**
|
|
5
|
+
* Requirements:
|
|
6
|
+
*
|
|
7
|
+
* Signal:
|
|
8
|
+
*
|
|
9
|
+
* - signal: a way of creating a reference that we can dirty when we desire to notify
|
|
10
|
+
* - @signal: a way of creating an accessor on an object that subscribes to a signal on access
|
|
11
|
+
* and notifies the signal on set, or of upgrading a descriptor to be such an accessor
|
|
12
|
+
* - defineSignal: a way of creating a signal on an object
|
|
13
|
+
* - notifySignal: a way of notifying the underlying signal that it has been dirtied
|
|
14
|
+
* - peekSignal: a way of inspecting the signal without notifying it
|
|
15
|
+
*
|
|
16
|
+
* - gate: a memoized getter function that re-runs when on access if its signal is dirty
|
|
17
|
+
* conceptually, a gate is a tightly coupled signal and memo
|
|
18
|
+
* - @gate: a way of creating a gate on an object or upgrading a descriptor with a getter
|
|
19
|
+
* to be a gate
|
|
20
|
+
* - defineGate: a way of creating a gate on an object
|
|
21
|
+
* - notifySignal: a way of notifying the signal for a gate that it has been dirtied
|
|
22
|
+
*
|
|
23
|
+
* - memo:
|
|
24
|
+
* - @memo: a way of creating a memoized getter on an object or upgrading a descriptor with a getter
|
|
25
|
+
* to be a memo
|
|
26
|
+
* - defineMemo: a way of creating a memo on an object
|
|
27
|
+
*
|
|
28
|
+
* - signalStore: storage bucket for signals associated to an object
|
|
29
|
+
* - withSignalStore: a way of pre-creating a signal store on an object
|
|
30
|
+
*
|
|
31
|
+
*
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* An Opaque type that represents a framework specific or TC39 signal.
|
|
36
|
+
*
|
|
37
|
+
* It may be an array of signals or a single signal.
|
|
38
|
+
*
|
|
39
|
+
* @internal
|
|
40
|
+
*/
|
|
41
|
+
export type SignalRef = unknown;
|
|
42
|
+
/**
|
|
43
|
+
* The hooks which MUST be configured in order to use this library,
|
|
44
|
+
* either for framework specfic signals or TC39 signals.
|
|
45
|
+
*
|
|
46
|
+
* Support for multiple frameworks simultaneously can be done via
|
|
47
|
+
* this abstraction by returning multiple signals from the `createSignal`
|
|
48
|
+
* method, and consuming the correct one via the correct framework via
|
|
49
|
+
* the `consumeSignal` and `notifySignal` methods.
|
|
50
|
+
*
|
|
51
|
+
* @typedoc
|
|
52
|
+
*/
|
|
53
|
+
export interface SignalHooks<T = SignalRef> {
|
|
54
|
+
createSignal: (obj: object, key: string | symbol) => T;
|
|
55
|
+
consumeSignal: (signal: T) => void;
|
|
56
|
+
notifySignal: (signal: T) => void;
|
|
57
|
+
createMemo: <F>(obj: object, key: string | symbol, fn: () => F) => () => F;
|
|
58
|
+
willSyncFlushWatchers: () => boolean;
|
|
59
|
+
}
|
|
60
|
+
export interface HooksOptions {
|
|
61
|
+
wellknown: {
|
|
62
|
+
Array: symbol | string;
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* The public API for configuring the signal hooks.
|
|
67
|
+
*
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
export function setupSignals<T>(buildConfig: (options: HooksOptions) => SignalHooks<T>): void;
|
|
71
|
+
/**
|
|
72
|
+
* Internal method for consuming the configured `createSignal` hook
|
|
73
|
+
*
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
export function createSignal(obj: object, key: string | symbol): SignalRef;
|
|
77
|
+
/**
|
|
78
|
+
* Internal method for consuming the configured `consumeSignal` hook
|
|
79
|
+
*
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
export function consumeSignal(signal: SignalRef): void;
|
|
83
|
+
/**
|
|
84
|
+
* Internal method for consuming the configured `notifySignal` hook
|
|
85
|
+
*
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
export function notifySignal(signal: SignalRef): void;
|
|
89
|
+
export function createMemo<T>(object: object, key: string | symbol, fn: () => T): () => T;
|
|
90
|
+
export function willSyncFlushWatchers(): boolean;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=configure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure.d.ts","sourceRoot":"","sources":["../../../../src/-private/new-core-tmp/reactivity/configure.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY,2BAAuC,CAAC;AACjE,eAAO,MAAM,aAAa,2BAAuC,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,CAAC;AAChC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,GAAG,SAAS;IACxC,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,KAAK,CAAC,CAAC;IACvD,aAAa,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IACnC,YAAY,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IAClC,UAAU,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC,CAAC;IAC3E,qBAAqB,EAAE,MAAM,OAAO,CAAC;CACtC;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE;QACT,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;KACxB,CAAC;CACH;AAED;;;;GAIG;AACH,wBA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