@warp-drive/core 5.8.0-alpha.40 → 5.8.0-alpha.41
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/declarations/configure.d.ts +1 -1
- package/declarations/reactive/-private/default-mode.d.ts +1 -1
- package/declarations/reactive/-private/fields/extension.d.ts +1 -1
- package/declarations/reactive/-private/fields/managed-array.d.ts +2 -2
- package/declarations/reactive/-private/fields/managed-object.d.ts +1 -1
- package/declarations/reactive.d.ts +2 -3
- package/declarations/signals/-leaked.d.ts +2 -0
- package/declarations/signals/-private.d.ts +6 -0
- package/declarations/{store/-private/new-core-tmp → signals}/promise-state.d.ts +1 -1
- package/declarations/{store/-private/new-core-tmp → signals}/request-state.d.ts +5 -5
- package/declarations/{store/-private/new-core-tmp → signals}/request-subscription.d.ts +4 -4
- package/declarations/store/-private/cache-handler/types.d.ts +2 -16
- package/declarations/store/-private/managers/cache-manager.d.ts +1 -14
- package/declarations/store/-private/record-arrays/legacy-many-array.d.ts +1 -1
- package/declarations/store/-private/record-arrays/resource-array.d.ts +1 -1
- package/declarations/store/-private.d.ts +0 -5
- package/declarations/store/deprecated/-private.d.ts +1 -1
- package/declarations/types/schema/fields.d.ts +4 -4
- package/dist/configure-DPUFCemT.js +1940 -0
- package/dist/configure.js +2 -1
- package/dist/{request-oqoLC9rz.js → future-BKkJJkj7.js} +1 -48
- package/dist/graph/-private.js +3 -2
- package/dist/{index-BKcD4JZK.js → index-CQP2NSqg.js} +58 -1826
- package/dist/index.js +5 -5
- package/dist/reactive/-private.js +1 -1
- package/dist/reactive.js +4 -129
- package/dist/request.js +49 -1
- package/dist/signals/-leaked.js +1 -0
- package/dist/store/-private.js +1 -2
- package/dist/types/-private.js +1 -1
- package/dist/unpkg/dev/-leaked-Co0EI6Go.js +1939 -0
- package/dist/unpkg/dev/configure.js +1 -1
- package/dist/unpkg/dev/{request-CA9K0gXq.js → future-DFfOzSoe.js} +1 -48
- package/dist/unpkg/dev/graph/-private.js +3 -2
- package/dist/unpkg/dev/{index-DqhXrNZ_.js → index-CepUPZlc.js} +57 -1825
- package/dist/unpkg/dev/index.js +4 -4
- package/dist/unpkg/dev/reactive/-private.js +1 -1
- package/dist/unpkg/dev/reactive.js +3 -127
- package/dist/unpkg/dev/request.js +49 -1
- package/dist/unpkg/dev/signals/-leaked.js +1 -0
- package/dist/unpkg/dev/store/-private.js +2 -3
- package/dist/unpkg/dev/types/-private.js +1 -1
- package/dist/unpkg/dev-deprecated/-leaked-DjMeRqdU.js +1939 -0
- package/dist/unpkg/dev-deprecated/configure.js +1 -1
- package/dist/unpkg/dev-deprecated/{request-CA9K0gXq.js → future-DFfOzSoe.js} +1 -48
- package/dist/unpkg/dev-deprecated/graph/-private.js +3 -2
- package/dist/unpkg/dev-deprecated/{index-BBlq5is_.js → index-C_EEmn_3.js} +56 -1824
- package/dist/unpkg/dev-deprecated/index.js +2 -2
- package/dist/unpkg/dev-deprecated/reactive.js +2 -126
- package/dist/unpkg/dev-deprecated/request.js +49 -1
- package/dist/unpkg/dev-deprecated/signals/-leaked.js +1 -0
- package/dist/unpkg/dev-deprecated/store/-private.js +1 -2
- package/dist/unpkg/dev-deprecated/types/-private.js +1 -1
- package/dist/unpkg/prod/-leaked-DUONXQDB.js +1676 -0
- package/dist/unpkg/prod/{-private-3C1OkYtZ.js → -private-sql1_mdx.js} +1 -1
- package/dist/unpkg/prod/configure.js +2 -1
- package/dist/unpkg/prod/graph/-private.js +3 -2
- package/dist/unpkg/prod/{handler-LAyD1Y5l.js → handler-EU_8ncB2.js} +2 -2
- package/dist/unpkg/prod/index.js +7 -5
- package/dist/unpkg/prod/promise-cache-DIT8Ypjq.js +19 -0
- package/dist/unpkg/prod/reactive/-private.js +1 -1
- package/dist/unpkg/prod/reactive.js +26 -123
- package/dist/unpkg/prod/{request-CN2LxbYX.js → request-BrJSCG6r.js} +3 -19
- package/dist/unpkg/prod/request.js +2 -1
- package/dist/unpkg/prod/{promise-state-ipG60SdD.js → schema-BSkHyoWz.js} +53 -1572
- package/dist/unpkg/prod/signals/-leaked.js +1 -0
- package/dist/unpkg/prod/store/-private.js +3 -4
- package/dist/unpkg/prod/types/-private.js +1 -1
- package/dist/unpkg/prod-deprecated/-leaked-DRNv9VIX.js +1676 -0
- package/dist/unpkg/prod-deprecated/configure.js +2 -1
- package/dist/unpkg/prod-deprecated/graph/-private.js +3 -2
- package/dist/unpkg/prod-deprecated/{handler-D639oFvl.js → handler-CCIu4sQ3.js} +1 -1
- package/dist/unpkg/prod-deprecated/{hooks-DGvi9teJ.js → hooks-Dv4Np0MY.js} +1 -1
- package/dist/unpkg/prod-deprecated/index.js +7 -5
- package/dist/unpkg/prod-deprecated/promise-cache-DIT8Ypjq.js +19 -0
- package/dist/unpkg/prod-deprecated/reactive.js +4 -125
- package/dist/unpkg/prod-deprecated/{request-CN2LxbYX.js → request-BrJSCG6r.js} +3 -19
- package/dist/unpkg/prod-deprecated/request.js +2 -1
- package/dist/unpkg/prod-deprecated/{promise-state-CYvoIPna.js → schema-CJcjHv0E.js} +52 -1571
- package/dist/unpkg/prod-deprecated/signals/-leaked.js +1 -0
- package/dist/unpkg/prod-deprecated/store/-private.js +2 -3
- package/dist/unpkg/prod-deprecated/types/-private.js +1 -1
- package/package.json +3 -3
- package/declarations/store/-private/new-core-tmp/expensive-subscription.d.ts +0 -24
- package/dist/configure-C3x8YXzL.js +0 -181
- package/dist/unpkg/dev/configure-BC66sfNO.js +0 -183
- package/dist/unpkg/dev-deprecated/configure-BC66sfNO.js +0 -183
- package/dist/unpkg/prod/configure-C0C1LpG6.js +0 -158
- package/dist/unpkg/prod/hooks-BfiqDg3O.js +0 -26
- package/dist/unpkg/prod-deprecated/configure-BQ8CpIcW.js +0 -158
- /package/declarations/{store/-private/new-core-tmp → signals}/reactivity/configure.d.ts +0 -0
- /package/declarations/{store/-private/new-core-tmp → signals}/reactivity/internal.d.ts +0 -0
- /package/declarations/{store/-private/new-core-tmp → signals}/reactivity/signal.d.ts +0 -0
- /package/dist/{unpkg/dev/-private-3C1OkYtZ.js → symbols-3C1OkYtZ.js} +0 -0
- /package/dist/{symbols-sql1_mdx.js → unpkg/dev/-private-sql1_mdx.js} +0 -0
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { peekTransient, getOrSetGlobal, setTransient } from './types/-private.js';
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4
|
-
|
|
5
|
-
const ARRAY_SIGNAL = getOrSetGlobal('#[]', Symbol('#[]'));
|
|
6
|
-
const OBJECT_SIGNAL = getOrSetGlobal('#{}', Symbol('#{}'));
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Requirements:
|
|
10
|
-
*
|
|
11
|
-
* Signal:
|
|
12
|
-
*
|
|
13
|
-
* - signal: a way of creating a reference that we can dirty when we desire to notify
|
|
14
|
-
* - @signal: a way of creating an accessor on an object that subscribes to a signal on access
|
|
15
|
-
* and notifies the signal on set, or of upgrading a descriptor to be such an accessor
|
|
16
|
-
* - defineSignal: a way of creating a signal on an object
|
|
17
|
-
* - notifySignal: a way of notifying the underlying signal that it has been dirtied
|
|
18
|
-
* - peekSignal: a way of inspecting the signal without notifying it
|
|
19
|
-
*
|
|
20
|
-
* - gate: a memoized getter function that re-runs when on access if its signal is dirty
|
|
21
|
-
* conceptually, a gate is a tightly coupled signal and memo
|
|
22
|
-
* - @gate: a way of creating a gate on an object or upgrading a descriptor with a getter
|
|
23
|
-
* to be a gate
|
|
24
|
-
* - defineGate: a way of creating a gate on an object
|
|
25
|
-
* - notifySignal: a way of notifying the signal for a gate that it has been dirtied
|
|
26
|
-
*
|
|
27
|
-
* - memo:
|
|
28
|
-
* - @memo: a way of creating a memoized getter on an object or upgrading a descriptor with a getter
|
|
29
|
-
* to be a memo
|
|
30
|
-
* - defineMemo: a way of creating a memo on an object
|
|
31
|
-
*
|
|
32
|
-
* - signalStore: storage bucket for signals associated to an object
|
|
33
|
-
* - withSignalStore: a way of pre-creating a signal store on an object
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* @internal
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* An Opaque type that represents a framework specific or TC39 signal.
|
|
41
|
-
*
|
|
42
|
-
* It may be an array of signals or a single signal.
|
|
43
|
-
*
|
|
44
|
-
* @private
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* The hooks which MUST be configured in order to use reactive arrays,
|
|
49
|
-
* resources and documents with framework specfic signals or TC39 signals.
|
|
50
|
-
*
|
|
51
|
-
* Support for multiple frameworks simultaneously can be done via
|
|
52
|
-
* this abstraction by returning multiple signals from the `createSignal`
|
|
53
|
-
* method, and consuming the correct one via the correct framework via
|
|
54
|
-
* the `consumeSignal` and `notifySignal` methods.
|
|
55
|
-
*
|
|
56
|
-
* Unlike many signals implementations, WarpDrive does not wrap values as
|
|
57
|
-
* signals directly, but instead uses signals to alert the reactive layer
|
|
58
|
-
* to changes in the underlying cache. E.g. a signal is associated to a value,
|
|
59
|
-
* but does not serve as the cache for that value directly. We refer to this as
|
|
60
|
-
* a "gate", the pattern has also been called "side-signals".
|
|
61
|
-
*
|
|
62
|
-
* A no-op implementation is allowed, though it may lead to performance issues
|
|
63
|
-
* in locations that use createMemo as no memoization would be done. This is
|
|
64
|
-
* typically desirable only when integrating with a framework that does its own
|
|
65
|
-
* memoization and does not integrate with any signals-like primitive. For these
|
|
66
|
-
* scenarios you may also be interested in integrating with the {@link NotificationManager}
|
|
67
|
-
* more directly.
|
|
68
|
-
*
|
|
69
|
-
* @public
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Contains information a {@link SignalHooks} implementation may want
|
|
74
|
-
* to use, such as the specialized key used for the signal
|
|
75
|
-
* representing an array's contents / length.
|
|
76
|
-
*
|
|
77
|
-
* ```ts
|
|
78
|
-
* interface HooksOptions {
|
|
79
|
-
* wellknown: {
|
|
80
|
-
* Array: symbol | string;
|
|
81
|
-
* }
|
|
82
|
-
* }
|
|
83
|
-
* ```
|
|
84
|
-
*
|
|
85
|
-
* @public
|
|
86
|
-
*/
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Configures the signals implementation to use. Supports multiple
|
|
90
|
-
* implementations simultaneously.
|
|
91
|
-
*
|
|
92
|
-
* See {@link HooksOptions} for the options passed to the provided function
|
|
93
|
-
* when called.
|
|
94
|
-
*
|
|
95
|
-
* See {@link SignalHooks} for the implementation the callback function should
|
|
96
|
-
* return.
|
|
97
|
-
*
|
|
98
|
-
* @public
|
|
99
|
-
* @param buildConfig - a function that takes options and returns a configuration object
|
|
100
|
-
*/
|
|
101
|
-
function setupSignals(buildConfig) {
|
|
102
|
-
// We want to assert this but can't because too many package manager
|
|
103
|
-
// and bundler bugs exist that cause this to be called multiple times
|
|
104
|
-
// for what should be a single call.
|
|
105
|
-
// assert(`Cannot override configured signal hooks`, peekTransient('signalHooks') === null);
|
|
106
|
-
const hooks = buildConfig({
|
|
107
|
-
wellknown: {
|
|
108
|
-
Array: ARRAY_SIGNAL
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
setTransient('signalHooks', hooks);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Internal method for consuming the configured `createSignal` hook
|
|
116
|
-
*
|
|
117
|
-
* @private
|
|
118
|
-
*/
|
|
119
|
-
function createSignal(obj, key) {
|
|
120
|
-
const signalHooks = peekTransient('signalHooks');
|
|
121
|
-
return signalHooks.createSignal(obj, key);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Internal method for consuming the configured `consumeSignal` hook
|
|
126
|
-
*
|
|
127
|
-
* @private
|
|
128
|
-
*/
|
|
129
|
-
function consumeSignal(signal) {
|
|
130
|
-
const signalHooks = peekTransient('signalHooks');
|
|
131
|
-
return signalHooks.consumeSignal(signal);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Internal method for consuming the configured `notifySignal` hook
|
|
136
|
-
*
|
|
137
|
-
* @private
|
|
138
|
-
*/
|
|
139
|
-
function notifySignal(signal) {
|
|
140
|
-
const signalHooks = peekTransient('signalHooks');
|
|
141
|
-
return signalHooks.notifySignal(signal);
|
|
142
|
-
}
|
|
143
|
-
function createMemo(object, key, fn) {
|
|
144
|
-
const signalHooks = peekTransient('signalHooks');
|
|
145
|
-
return signalHooks.createMemo(object, key, fn);
|
|
146
|
-
}
|
|
147
|
-
function willSyncFlushWatchers() {
|
|
148
|
-
const signalHooks = peekTransient('signalHooks');
|
|
149
|
-
return signalHooks.willSyncFlushWatchers();
|
|
150
|
-
}
|
|
151
|
-
function waitFor(promise) {
|
|
152
|
-
const signalHooks = peekTransient('signalHooks');
|
|
153
|
-
if (signalHooks?.waitFor) {
|
|
154
|
-
return signalHooks.waitFor(promise);
|
|
155
|
-
}
|
|
156
|
-
return promise;
|
|
157
|
-
}
|
|
158
|
-
export { ARRAY_SIGNAL as A, OBJECT_SIGNAL as O, willSyncFlushWatchers as a, consumeSignal as b, createSignal as c, createMemo as d, notifySignal as n, setupSignals as s, waitFor as w };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { R as ReactiveResource } from "./promise-state-ipG60SdD.js";
|
|
2
|
-
import { D as Destroy } from "./-private-3C1OkYtZ.js";
|
|
3
|
-
function instantiateRecord(store, identifier, createArgs) {
|
|
4
|
-
const schema = store.schema;
|
|
5
|
-
const resourceSchema = schema.resource(identifier);
|
|
6
|
-
const legacy = resourceSchema?.legacy ?? false;
|
|
7
|
-
const editable = legacy;
|
|
8
|
-
const record = new ReactiveResource({
|
|
9
|
-
store,
|
|
10
|
-
resourceKey: identifier,
|
|
11
|
-
modeName: legacy ? 'legacy' : 'polaris',
|
|
12
|
-
legacy: legacy,
|
|
13
|
-
editable: editable,
|
|
14
|
-
path: null,
|
|
15
|
-
field: null,
|
|
16
|
-
value: null
|
|
17
|
-
});
|
|
18
|
-
if (createArgs && editable) {
|
|
19
|
-
Object.assign(record, createArgs);
|
|
20
|
-
}
|
|
21
|
-
return record;
|
|
22
|
-
}
|
|
23
|
-
function teardownRecord(record) {
|
|
24
|
-
record[Destroy]();
|
|
25
|
-
}
|
|
26
|
-
export { instantiateRecord as i, teardownRecord as t };
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import { peekTransient, getOrSetGlobal, setTransient } from './types/-private.js';
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
4
|
-
|
|
5
|
-
const ARRAY_SIGNAL = getOrSetGlobal('#[]', Symbol('#[]'));
|
|
6
|
-
const OBJECT_SIGNAL = getOrSetGlobal('#{}', Symbol('#{}'));
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Requirements:
|
|
10
|
-
*
|
|
11
|
-
* Signal:
|
|
12
|
-
*
|
|
13
|
-
* - signal: a way of creating a reference that we can dirty when we desire to notify
|
|
14
|
-
* - @signal: a way of creating an accessor on an object that subscribes to a signal on access
|
|
15
|
-
* and notifies the signal on set, or of upgrading a descriptor to be such an accessor
|
|
16
|
-
* - defineSignal: a way of creating a signal on an object
|
|
17
|
-
* - notifySignal: a way of notifying the underlying signal that it has been dirtied
|
|
18
|
-
* - peekSignal: a way of inspecting the signal without notifying it
|
|
19
|
-
*
|
|
20
|
-
* - gate: a memoized getter function that re-runs when on access if its signal is dirty
|
|
21
|
-
* conceptually, a gate is a tightly coupled signal and memo
|
|
22
|
-
* - @gate: a way of creating a gate on an object or upgrading a descriptor with a getter
|
|
23
|
-
* to be a gate
|
|
24
|
-
* - defineGate: a way of creating a gate on an object
|
|
25
|
-
* - notifySignal: a way of notifying the signal for a gate that it has been dirtied
|
|
26
|
-
*
|
|
27
|
-
* - memo:
|
|
28
|
-
* - @memo: a way of creating a memoized getter on an object or upgrading a descriptor with a getter
|
|
29
|
-
* to be a memo
|
|
30
|
-
* - defineMemo: a way of creating a memo on an object
|
|
31
|
-
*
|
|
32
|
-
* - signalStore: storage bucket for signals associated to an object
|
|
33
|
-
* - withSignalStore: a way of pre-creating a signal store on an object
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* @internal
|
|
37
|
-
*/
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* An Opaque type that represents a framework specific or TC39 signal.
|
|
41
|
-
*
|
|
42
|
-
* It may be an array of signals or a single signal.
|
|
43
|
-
*
|
|
44
|
-
* @private
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* The hooks which MUST be configured in order to use reactive arrays,
|
|
49
|
-
* resources and documents with framework specfic signals or TC39 signals.
|
|
50
|
-
*
|
|
51
|
-
* Support for multiple frameworks simultaneously can be done via
|
|
52
|
-
* this abstraction by returning multiple signals from the `createSignal`
|
|
53
|
-
* method, and consuming the correct one via the correct framework via
|
|
54
|
-
* the `consumeSignal` and `notifySignal` methods.
|
|
55
|
-
*
|
|
56
|
-
* Unlike many signals implementations, WarpDrive does not wrap values as
|
|
57
|
-
* signals directly, but instead uses signals to alert the reactive layer
|
|
58
|
-
* to changes in the underlying cache. E.g. a signal is associated to a value,
|
|
59
|
-
* but does not serve as the cache for that value directly. We refer to this as
|
|
60
|
-
* a "gate", the pattern has also been called "side-signals".
|
|
61
|
-
*
|
|
62
|
-
* A no-op implementation is allowed, though it may lead to performance issues
|
|
63
|
-
* in locations that use createMemo as no memoization would be done. This is
|
|
64
|
-
* typically desirable only when integrating with a framework that does its own
|
|
65
|
-
* memoization and does not integrate with any signals-like primitive. For these
|
|
66
|
-
* scenarios you may also be interested in integrating with the {@link NotificationManager}
|
|
67
|
-
* more directly.
|
|
68
|
-
*
|
|
69
|
-
* @public
|
|
70
|
-
*/
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Contains information a {@link SignalHooks} implementation may want
|
|
74
|
-
* to use, such as the specialized key used for the signal
|
|
75
|
-
* representing an array's contents / length.
|
|
76
|
-
*
|
|
77
|
-
* ```ts
|
|
78
|
-
* interface HooksOptions {
|
|
79
|
-
* wellknown: {
|
|
80
|
-
* Array: symbol | string;
|
|
81
|
-
* }
|
|
82
|
-
* }
|
|
83
|
-
* ```
|
|
84
|
-
*
|
|
85
|
-
* @public
|
|
86
|
-
*/
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Configures the signals implementation to use. Supports multiple
|
|
90
|
-
* implementations simultaneously.
|
|
91
|
-
*
|
|
92
|
-
* See {@link HooksOptions} for the options passed to the provided function
|
|
93
|
-
* when called.
|
|
94
|
-
*
|
|
95
|
-
* See {@link SignalHooks} for the implementation the callback function should
|
|
96
|
-
* return.
|
|
97
|
-
*
|
|
98
|
-
* @public
|
|
99
|
-
* @param buildConfig - a function that takes options and returns a configuration object
|
|
100
|
-
*/
|
|
101
|
-
function setupSignals(buildConfig) {
|
|
102
|
-
// We want to assert this but can't because too many package manager
|
|
103
|
-
// and bundler bugs exist that cause this to be called multiple times
|
|
104
|
-
// for what should be a single call.
|
|
105
|
-
// assert(`Cannot override configured signal hooks`, peekTransient('signalHooks') === null);
|
|
106
|
-
const hooks = buildConfig({
|
|
107
|
-
wellknown: {
|
|
108
|
-
Array: ARRAY_SIGNAL
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
setTransient('signalHooks', hooks);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/**
|
|
115
|
-
* Internal method for consuming the configured `createSignal` hook
|
|
116
|
-
*
|
|
117
|
-
* @private
|
|
118
|
-
*/
|
|
119
|
-
function createSignal(obj, key) {
|
|
120
|
-
const signalHooks = peekTransient('signalHooks');
|
|
121
|
-
return signalHooks.createSignal(obj, key);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/**
|
|
125
|
-
* Internal method for consuming the configured `consumeSignal` hook
|
|
126
|
-
*
|
|
127
|
-
* @private
|
|
128
|
-
*/
|
|
129
|
-
function consumeSignal(signal) {
|
|
130
|
-
const signalHooks = peekTransient('signalHooks');
|
|
131
|
-
return signalHooks.consumeSignal(signal);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Internal method for consuming the configured `notifySignal` hook
|
|
136
|
-
*
|
|
137
|
-
* @private
|
|
138
|
-
*/
|
|
139
|
-
function notifySignal(signal) {
|
|
140
|
-
const signalHooks = peekTransient('signalHooks');
|
|
141
|
-
return signalHooks.notifySignal(signal);
|
|
142
|
-
}
|
|
143
|
-
function createMemo(object, key, fn) {
|
|
144
|
-
const signalHooks = peekTransient('signalHooks');
|
|
145
|
-
return signalHooks.createMemo(object, key, fn);
|
|
146
|
-
}
|
|
147
|
-
function willSyncFlushWatchers() {
|
|
148
|
-
const signalHooks = peekTransient('signalHooks');
|
|
149
|
-
return signalHooks.willSyncFlushWatchers();
|
|
150
|
-
}
|
|
151
|
-
function waitFor(promise) {
|
|
152
|
-
const signalHooks = peekTransient('signalHooks');
|
|
153
|
-
if (signalHooks?.waitFor) {
|
|
154
|
-
return signalHooks.waitFor(promise);
|
|
155
|
-
}
|
|
156
|
-
return promise;
|
|
157
|
-
}
|
|
158
|
-
export { ARRAY_SIGNAL as A, OBJECT_SIGNAL as O, consumeSignal as a, createMemo as b, createSignal as c, willSyncFlushWatchers as d, notifySignal as n, setupSignals as s, waitFor as w };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|