@warp-drive-mirror/react 5.9.0-beta.0 → 5.9.0-beta.1
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/index.d.ts +179 -6
- package/declarations/index.d.ts.map +1 -0
- package/declarations/install.d.ts +21 -3
- package/declarations/install.d.ts.map +1 -0
- package/dist/index.js +216 -251
- package/dist/index.js.map +1 -0
- package/dist/install.js +90 -94
- package/dist/install.js.map +1 -0
- package/dist/reactive-context-DNq02nr1.js +122 -0
- package/dist/reactive-context-DNq02nr1.js.map +1 -0
- package/dist/unpkg/dev/index.js +260 -299
- package/dist/unpkg/dev/index.js.map +1 -0
- package/dist/unpkg/dev/install.js +82 -92
- package/dist/unpkg/dev/install.js.map +1 -0
- package/dist/unpkg/dev/reactive-context-C9-Fc8qx.js +218 -0
- package/dist/unpkg/dev/reactive-context-C9-Fc8qx.js.map +1 -0
- package/dist/unpkg/dev-deprecated/index.js +260 -299
- package/dist/unpkg/dev-deprecated/index.js.map +1 -0
- package/dist/unpkg/dev-deprecated/install.js +82 -92
- package/dist/unpkg/dev-deprecated/install.js.map +1 -0
- package/dist/unpkg/dev-deprecated/reactive-context-DhpCE2Tv.js +218 -0
- package/dist/unpkg/dev-deprecated/reactive-context-DhpCE2Tv.js.map +1 -0
- package/dist/unpkg/prod/index.js +199 -226
- package/dist/unpkg/prod/index.js.map +1 -0
- package/dist/unpkg/prod/install.js +56 -48
- package/dist/unpkg/prod/install.js.map +1 -0
- package/dist/unpkg/prod/reactive-context-CvfXAZqb.js +92 -0
- package/dist/unpkg/prod/reactive-context-CvfXAZqb.js.map +1 -0
- package/dist/unpkg/prod-deprecated/index.js +199 -226
- package/dist/unpkg/prod-deprecated/index.js.map +1 -0
- package/dist/unpkg/prod-deprecated/install.js +56 -48
- package/dist/unpkg/prod-deprecated/install.js.map +1 -0
- package/dist/unpkg/prod-deprecated/reactive-context-CvfXAZqb.js +92 -0
- package/dist/unpkg/prod-deprecated/reactive-context-CvfXAZqb.js.map +1 -0
- package/package.json +14 -15
- package/declarations/-private/reactive-context.d.ts +0 -18
- package/declarations/-private/request.d.ts +0 -142
- package/declarations/-private/store-provider.d.ts +0 -19
- package/dist/reactive-context-ClTRYXie.js +0 -154
- package/dist/unpkg/dev/reactive-context-B815u0_c.js +0 -290
- package/dist/unpkg/dev-deprecated/reactive-context-DMgQ7YV_.js +0 -290
- package/dist/unpkg/prod/reactive-context-DKimDkR3.js +0 -110
- package/dist/unpkg/prod-deprecated/reactive-context-DKimDkR3.js +0 -110
|
@@ -1,102 +1,92 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Signal } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { n as WatcherContext, r as getGlobalConfig } from "./reactive-context-C9-Fc8qx.js";
|
|
2
|
+
import { Signal } from "signal-polyfill";
|
|
3
|
+
import { use } from "react";
|
|
4
|
+
import { setupSignals } from "@warp-drive-mirror/core/configure";
|
|
5
5
|
|
|
6
|
+
//#region src/install.ts
|
|
6
7
|
/**
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
* {@include ./install.md}
|
|
9
|
+
* @module
|
|
10
|
+
*/
|
|
11
11
|
function tryConsumeContext(signal) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if (getGlobalConfig().WarpDriveMirror.debug.LOG_REACT_SIGNAL_INTEGRATION || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REACT_SIGNAL_INTEGRATION) {
|
|
24
|
-
// eslint-disable-next-line no-console
|
|
25
|
-
console.log(`[WarpDrive] Consumed Context Signal`, signal, watcher);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
} catch {
|
|
29
|
-
// eslint-disable-next-line no-console
|
|
30
|
-
console.error = logError;
|
|
31
|
-
// if we are not in a React context, we will Error
|
|
32
|
-
// so we just ignore it.
|
|
33
|
-
{
|
|
34
|
-
if (getGlobalConfig().WarpDriveMirror.debug.LOG_REACT_SIGNAL_INTEGRATION || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REACT_SIGNAL_INTEGRATION) {
|
|
35
|
-
// eslint-disable-next-line no-console
|
|
36
|
-
console.log(`[WarpDrive] No Context Available To Consume Signal`, signal);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
12
|
+
const logError = console.error;
|
|
13
|
+
try {
|
|
14
|
+
console.error = () => {};
|
|
15
|
+
const watcher = use(WatcherContext);
|
|
16
|
+
console.error = logError;
|
|
17
|
+
watcher?.watcher.watch(signal);
|
|
18
|
+
if (getGlobalConfig().WarpDriveMirror.debug.LOG_REACT_SIGNAL_INTEGRATION || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REACT_SIGNAL_INTEGRATION) console.log(`[WarpDrive] Consumed Context Signal`, signal, watcher);
|
|
19
|
+
} catch {
|
|
20
|
+
console.error = logError;
|
|
21
|
+
if (getGlobalConfig().WarpDriveMirror.debug.LOG_REACT_SIGNAL_INTEGRATION || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REACT_SIGNAL_INTEGRATION) console.log(`[WarpDrive] No Context Available To Consume Signal`, signal);
|
|
22
|
+
}
|
|
40
23
|
}
|
|
41
24
|
let pending;
|
|
25
|
+
/**
|
|
26
|
+
* Resolves once all pending requests started via WarpDrive's React signal
|
|
27
|
+
* integration have settled. Only tracks requests while `TESTING` is enabled;
|
|
28
|
+
* a no-op otherwise.
|
|
29
|
+
*
|
|
30
|
+
* @public
|
|
31
|
+
*/
|
|
42
32
|
async function settled() {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
33
|
+
{
|
|
34
|
+
if (!pending || !pending.length) return;
|
|
35
|
+
const current = pending ?? [];
|
|
36
|
+
pending = [];
|
|
37
|
+
await Promise.allSettled(current);
|
|
38
|
+
await Promise.resolve();
|
|
39
|
+
await Promise.resolve();
|
|
40
|
+
await Promise.resolve();
|
|
41
|
+
return settled();
|
|
42
|
+
}
|
|
54
43
|
}
|
|
44
|
+
/**
|
|
45
|
+
* Builds the {@link SignalHooks} implementation backed by the
|
|
46
|
+
* [Signal Polyfill](https://github.com/proposal-signals/signal-polyfill),
|
|
47
|
+
* used to wire WarpDrive's reactivity primitives into React.
|
|
48
|
+
*
|
|
49
|
+
* @public
|
|
50
|
+
*/
|
|
55
51
|
function buildSignalConfig(options) {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
const newPromise = promise.finally(() => {
|
|
92
|
-
pending = pending.filter(p => p !== newPromise);
|
|
93
|
-
});
|
|
94
|
-
pending.push(newPromise);
|
|
95
|
-
return newPromise;
|
|
96
|
-
}
|
|
97
|
-
},
|
|
98
|
-
willSyncFlushWatchers: () => false
|
|
99
|
-
};
|
|
52
|
+
return {
|
|
53
|
+
createSignal: (obj, key) => new Signal.State({
|
|
54
|
+
obj,
|
|
55
|
+
key
|
|
56
|
+
}, { equals: () => false }),
|
|
57
|
+
notifySignal: (signal) => {
|
|
58
|
+
if (getGlobalConfig().WarpDriveMirror.debug.LOG_REACT_SIGNAL_INTEGRATION || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REACT_SIGNAL_INTEGRATION) {
|
|
59
|
+
if (Signal.subtle.hasSinks(signal)) console.log(`[WarpDrive] Notifying Signal`, signal);
|
|
60
|
+
else console.log(`[WarpDrive] Notified Signal That Has No Watcher`, signal);
|
|
61
|
+
}
|
|
62
|
+
signal.set(signal.get());
|
|
63
|
+
},
|
|
64
|
+
consumeSignal: (signal) => {
|
|
65
|
+
tryConsumeContext(signal);
|
|
66
|
+
signal.get();
|
|
67
|
+
},
|
|
68
|
+
createMemo: (object, key, fn) => {
|
|
69
|
+
const memo = new Signal.Computed(fn);
|
|
70
|
+
return () => {
|
|
71
|
+
tryConsumeContext(memo);
|
|
72
|
+
return memo.get();
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
waitFor: (promise) => {
|
|
76
|
+
{
|
|
77
|
+
pending = pending || [];
|
|
78
|
+
const newPromise = promise.finally(() => {
|
|
79
|
+
pending = pending.filter((p) => p !== newPromise);
|
|
80
|
+
});
|
|
81
|
+
pending.push(newPromise);
|
|
82
|
+
return newPromise;
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
willSyncFlushWatchers: () => false
|
|
86
|
+
};
|
|
100
87
|
}
|
|
101
88
|
setupSignals(buildSignalConfig);
|
|
102
|
-
|
|
89
|
+
|
|
90
|
+
//#endregion
|
|
91
|
+
export { buildSignalConfig, settled };
|
|
92
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.js","names":["use","Signal","setupSignals","WatcherContext","getGlobalConfig","getGlobalConfig0","tryConsumeContext","signal","logError","console","error","watcher","watch","WarpDrive","debug","LOG_REACT_SIGNAL_INTEGRATION","globalThis","getWarpDriveRuntimeConfig","log","pending","settled","length","current","Promise","allSettled","resolve","buildSignalConfig","options","createSignal","obj","key","State","equals","notifySignal","subtle","hasSinks","set","get","consumeSignal","createMemo","object","fn","memo","Computed","waitFor","promise","newPromise","finally","filter","p","push","willSyncFlushWatchers"],"sources":["../../../src/install.ts"],"sourcesContent":["/**\n * {@include ./install.md}\n * @module\n */\n\nimport { use } from 'react';\nimport { Signal } from 'signal-polyfill';\n\nimport { LOG_REACT_SIGNAL_INTEGRATION } from '@warp-drive-mirror/core/build-config/debugging';\nimport { DEBUG, TESTING } from '@warp-drive-mirror/core/build-config/env';\nimport { type HooksOptions, setupSignals, type SignalHooks } from '@warp-drive-mirror/core/configure';\n\nimport { WatcherContext } from './-private/reactive-context';\n\nfunction tryConsumeContext(signal: Signal.State<unknown> | Signal.Computed<unknown>): void {\n // eslint-disable-next-line no-console\n const logError = console.error;\n try {\n // eslint-disable-next-line no-console\n console.error = () => {};\n // ensure signals are watched by our closest watcher\n const watcher = use(WatcherContext);\n // eslint-disable-next-line no-console\n console.error = logError;\n watcher?.watcher.watch(signal);\n if (LOG_REACT_SIGNAL_INTEGRATION) {\n // eslint-disable-next-line no-console\n console.log(`[WarpDrive] Consumed Context Signal`, signal, watcher);\n }\n } catch {\n // eslint-disable-next-line no-console\n console.error = logError;\n // if we are not in a React context, we will Error\n // so we just ignore it.\n if (LOG_REACT_SIGNAL_INTEGRATION) {\n // eslint-disable-next-line no-console\n console.log(`[WarpDrive] No Context Available To Consume Signal`, signal);\n }\n }\n}\n\nlet pending: Promise<unknown>[];\n/**\n * Resolves once all pending requests started via WarpDrive's React signal\n * integration have settled. Only tracks requests while `TESTING` is enabled;\n * a no-op otherwise.\n *\n * @public\n */\nexport async function settled(): Promise<void> {\n if (TESTING) {\n // in testing mode we provide a test waiter integration\n if (!pending || !pending.length) return;\n const current = pending ?? [];\n pending = [];\n await Promise.allSettled(current);\n await Promise.resolve();\n await Promise.resolve();\n await Promise.resolve();\n\n return settled();\n }\n}\n\n/**\n * Builds the {@link SignalHooks} implementation backed by the\n * [Signal Polyfill](https://github.com/proposal-signals/signal-polyfill),\n * used to wire WarpDrive's reactivity primitives into React.\n *\n * @public\n */\nexport function buildSignalConfig(options: HooksOptions): SignalHooks {\n return {\n createSignal: (obj: object, key: string | symbol) =>\n new Signal.State(DEBUG ? { obj, key } : null, { equals: () => false }),\n\n notifySignal: (signal: Signal.State<unknown>) => {\n if (LOG_REACT_SIGNAL_INTEGRATION) {\n if (Signal.subtle.hasSinks(signal)) {\n // eslint-disable-next-line no-console\n console.log(`[WarpDrive] Notifying Signal`, signal);\n } else {\n // eslint-disable-next-line no-console\n console.log(`[WarpDrive] Notified Signal That Has No Watcher`, signal);\n }\n }\n signal.set(signal.get());\n },\n\n consumeSignal: (signal: Signal.State<unknown>) => {\n tryConsumeContext(signal);\n void signal.get();\n },\n\n createMemo: <F>(object: object, key: string | symbol, fn: () => F): (() => F) => {\n const memo = new Signal.Computed<F>(fn);\n return () => {\n tryConsumeContext(memo);\n\n return memo.get();\n };\n },\n\n waitFor: (promise) => {\n if (TESTING) {\n pending = pending || [];\n const newPromise = promise.finally(() => {\n pending = pending.filter((p) => p !== newPromise);\n });\n pending.push(newPromise);\n return newPromise;\n }\n return promise;\n },\n\n willSyncFlushWatchers: () => false,\n } as SignalHooks;\n}\n\nsetupSignals(buildSignalConfig);\n"],"mappings":";;;;;;;;;;AAcA,SAASM,kBAAkBC,QAAgE;CAEzF,MAAMC,WAAWC,QAAQC;CACzB,IAAI;EAEFD,QAAQC,cAAc,CAAC;EAEvB,MAAMC,UAAUX,IAAIG,cAAc;EAElCM,QAAQC,QAAQF;EAChBG,SAASA,QAAQC,MAAML,MAAM;EAAE,IAAAF,gBAAA,CAAA,CAAAQ,UAAAC,MAAAC,gCAAAC,WAAAC,0BAAA,CAAA,CAAAH,MAAAC,8BAG7BN,QAAQS,IAAI,uCAAuCX,QAAQI,OAAO;CAEtE,QAAQ;EAENF,QAAQC,QAAQF;EAEhB,IAAAH,gBAAA,CAAA,CAAAQ,UAAAC,MAAAC,gCAAAC,WAAAC,0BAAA,CAAA,CAAAH,MAAAC,8BAGEN,QAAQS,IAAI,sDAAsDX,MAA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/B;AACF;AAEAjD,aAAawB,iBAAiB"}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import { Signal } from "signal-polyfill";
|
|
2
|
+
import { createContext, useMemo, useSyncExternalStore } from "react";
|
|
3
|
+
import { jsxDEV } from "react/jsx-dev-runtime";
|
|
4
|
+
|
|
5
|
+
//#region ../../node_modules/.pnpm/@embroi_8c5bde00dfb478e637d05be822ff1428/node_modules/@embroider/macros/src/addon/runtime.js
|
|
6
|
+
function config(packageRoot) {
|
|
7
|
+
return runtimeConfig.packages[packageRoot];
|
|
8
|
+
}
|
|
9
|
+
function getGlobalConfig() {
|
|
10
|
+
return runtimeConfig.global;
|
|
11
|
+
}
|
|
12
|
+
const runtimeConfig = globalThis.__embroider_macros__runtime_config__ ||= {};
|
|
13
|
+
runtimeConfig.packages ||= {};
|
|
14
|
+
runtimeConfig.global ||= {};
|
|
15
|
+
const localConfig = initializeRuntimeMacrosConfig();
|
|
16
|
+
Object.assign(runtimeConfig.packages, localConfig.packages);
|
|
17
|
+
Object.assign(runtimeConfig.global, localConfig.global);
|
|
18
|
+
function initializeRuntimeMacrosConfig() {
|
|
19
|
+
return {
|
|
20
|
+
"packages": {},
|
|
21
|
+
"global": {
|
|
22
|
+
"@embroider/macros": { "isTesting": false },
|
|
23
|
+
"WarpDrive": {
|
|
24
|
+
"debug": {
|
|
25
|
+
"DEBUG_RELATIONSHIP_NOTIFICATIONS": false,
|
|
26
|
+
"LOG_CACHE": false,
|
|
27
|
+
"LOG_CACHE_POLICY": false,
|
|
28
|
+
"LOG_GRAPH": false,
|
|
29
|
+
"LOG_IDENTIFIERS": false,
|
|
30
|
+
"LOG_INSTANCE_CACHE": false,
|
|
31
|
+
"LOG_METRIC_COUNTS": false,
|
|
32
|
+
"LOG_MUTATIONS": false,
|
|
33
|
+
"LOG_NOTIFICATIONS": false,
|
|
34
|
+
"LOG_OPERATIONS": false,
|
|
35
|
+
"LOG_PAYLOADS": false,
|
|
36
|
+
"LOG_REACT_SIGNAL_INTEGRATION": false,
|
|
37
|
+
"LOG_REQUESTS": false,
|
|
38
|
+
"LOG_REQUEST_STATUS": false,
|
|
39
|
+
"__INTERNAL_LOG_NATIVE_MAP_SET_COUNTS": false
|
|
40
|
+
},
|
|
41
|
+
"polyfillUUID": false,
|
|
42
|
+
"includeDataAdapter": true,
|
|
43
|
+
"compatWith": "99.0",
|
|
44
|
+
"deprecations": {
|
|
45
|
+
"DEPRECATE_CATCH_ALL": false,
|
|
46
|
+
"DEPRECATE_COMPUTED_CHAINS": false,
|
|
47
|
+
"DEPRECATE_EMBER_INFLECTOR": false,
|
|
48
|
+
"DEPRECATE_LEGACY_IMPORTS": false,
|
|
49
|
+
"DEPRECATE_MANY_ARRAY_DUPLICATES": false,
|
|
50
|
+
"DEPRECATE_NON_STRICT_ID": false,
|
|
51
|
+
"DEPRECATE_NON_STRICT_TYPES": false,
|
|
52
|
+
"DEPRECATE_NON_UNIQUE_PAYLOADS": false,
|
|
53
|
+
"DEPRECATE_RELATIONSHIP_REMOTE_UPDATE_CLEARING_LOCAL_STATE": false,
|
|
54
|
+
"DEPRECATE_STORE_EXTENDS_EMBER_OBJECT": false,
|
|
55
|
+
"DEPRECATE_TRACKING_PACKAGE": false,
|
|
56
|
+
"DISABLE_7X_DEPRECATIONS": false,
|
|
57
|
+
"ENABLE_LEGACY_REQUEST_METHODS": false,
|
|
58
|
+
"ENABLE_LEGACY_SCHEMA_SERVICE": false
|
|
59
|
+
},
|
|
60
|
+
"features": {
|
|
61
|
+
"ENFORCE_STRICT_RESOURCE_FINALIZATION": false,
|
|
62
|
+
"JSON_API_CACHE_VALIDATION_ERRORS": false,
|
|
63
|
+
"SAMPLE_FEATURE_FLAG": false
|
|
64
|
+
},
|
|
65
|
+
"activeLogging": {
|
|
66
|
+
"DEBUG_RELATIONSHIP_NOTIFICATIONS": true,
|
|
67
|
+
"LOG_CACHE": true,
|
|
68
|
+
"LOG_CACHE_POLICY": true,
|
|
69
|
+
"LOG_GRAPH": true,
|
|
70
|
+
"LOG_IDENTIFIERS": true,
|
|
71
|
+
"LOG_INSTANCE_CACHE": true,
|
|
72
|
+
"LOG_METRIC_COUNTS": true,
|
|
73
|
+
"LOG_MUTATIONS": true,
|
|
74
|
+
"LOG_NOTIFICATIONS": true,
|
|
75
|
+
"LOG_OPERATIONS": true,
|
|
76
|
+
"LOG_PAYLOADS": true,
|
|
77
|
+
"LOG_REACT_SIGNAL_INTEGRATION": true,
|
|
78
|
+
"LOG_REQUESTS": true,
|
|
79
|
+
"LOG_REQUEST_STATUS": true,
|
|
80
|
+
"__INTERNAL_LOG_NATIVE_MAP_SET_COUNTS": true
|
|
81
|
+
},
|
|
82
|
+
"env": {
|
|
83
|
+
"TESTING": true,
|
|
84
|
+
"PRODUCTION": false,
|
|
85
|
+
"DEBUG": true,
|
|
86
|
+
"IS_RECORDING": false,
|
|
87
|
+
"IS_CI": true,
|
|
88
|
+
"SHOULD_RECORD": false
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function updaterMethods() {
|
|
95
|
+
return {
|
|
96
|
+
config,
|
|
97
|
+
getGlobalConfig,
|
|
98
|
+
setConfig(packageRoot, value) {
|
|
99
|
+
runtimeConfig.packages[packageRoot] = value;
|
|
100
|
+
},
|
|
101
|
+
setGlobalConfig(key, value) {
|
|
102
|
+
runtimeConfig.global[key] = value;
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
let updaters = typeof window !== "undefined" ? window._embroider_macros_runtime_config : void 0;
|
|
107
|
+
if (updaters) {
|
|
108
|
+
let methods = updaterMethods();
|
|
109
|
+
for (let updater of updaters) updater(methods);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/-private/reactive-context.tsx
|
|
114
|
+
var _jsxFileName = "/home/runner/work/warp-drive/warp-drive/warp-drive-packages/react/src/-private/reactive-context.tsx";
|
|
115
|
+
let nextFlush = null;
|
|
116
|
+
let watchers = [];
|
|
117
|
+
let watcherId = 0;
|
|
118
|
+
function clearWatcher(state) {
|
|
119
|
+
state.watcher.unwatch(...Signal.subtle.introspectSources(state.watcher));
|
|
120
|
+
}
|
|
121
|
+
function flush(state) {
|
|
122
|
+
state.pending = false;
|
|
123
|
+
if (state.destroyed) {
|
|
124
|
+
if (getGlobalConfig().WarpDriveMirror.debug.LOG_REACT_SIGNAL_INTEGRATION || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REACT_SIGNAL_INTEGRATION) console.log(`[WarpDrive] Detected Watcher Destroyed During Notify Flush, clearing signals`);
|
|
125
|
+
state.snapshot = null;
|
|
126
|
+
clearWatcher(state);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
if (getGlobalConfig().WarpDriveMirror.debug.LOG_REACT_SIGNAL_INTEGRATION || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REACT_SIGNAL_INTEGRATION) {
|
|
130
|
+
console.log(`[WarpDrive] Notifying React That WatcherContext:${state.watcherId} Has Updated`);
|
|
131
|
+
console.log("all signals", new Set(Signal.subtle.introspectSources(state.watcher)));
|
|
132
|
+
console.log("dirty signals", new Set(state.watcher.getPending()));
|
|
133
|
+
}
|
|
134
|
+
state.snapshot = { watcher: state.watcher };
|
|
135
|
+
if (state.notifyReact) state.notifyReact();
|
|
136
|
+
state.watcher.watch();
|
|
137
|
+
}
|
|
138
|
+
function _createWatcher() {
|
|
139
|
+
const id = watcherId++;
|
|
140
|
+
if (getGlobalConfig().WarpDriveMirror.debug.LOG_REACT_SIGNAL_INTEGRATION || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REACT_SIGNAL_INTEGRATION) console.log(`[WarpDrive] Creating a WatcherContext:${id}`);
|
|
141
|
+
const state = {
|
|
142
|
+
watcherId: id,
|
|
143
|
+
pending: false,
|
|
144
|
+
destroyed: false,
|
|
145
|
+
notifyReact: null,
|
|
146
|
+
watcher: null,
|
|
147
|
+
snapshot: null
|
|
148
|
+
};
|
|
149
|
+
state.watcher = new Signal.subtle.Watcher((...args) => {
|
|
150
|
+
if (getGlobalConfig().WarpDriveMirror.debug.LOG_REACT_SIGNAL_INTEGRATION || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REACT_SIGNAL_INTEGRATION) console.log(`watcher ${state.watcherId} notified`, args, state.watcher);
|
|
151
|
+
if (!state.pending && !state.destroyed) {
|
|
152
|
+
watchers.push(state);
|
|
153
|
+
state.pending = true;
|
|
154
|
+
if (!nextFlush) nextFlush = new Promise((resolve) => {
|
|
155
|
+
queueMicrotask(() => {
|
|
156
|
+
queueMicrotask(() => {
|
|
157
|
+
queueMicrotask(() => {
|
|
158
|
+
watchers.forEach(flush);
|
|
159
|
+
if (getGlobalConfig().WarpDriveMirror.debug.LOG_REACT_SIGNAL_INTEGRATION || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REACT_SIGNAL_INTEGRATION) console.log("Flushed watcher:", watchers.map((w) => w.watcherId));
|
|
160
|
+
watchers = [];
|
|
161
|
+
nextFlush = null;
|
|
162
|
+
resolve();
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
});
|
|
167
|
+
} else if (state.destroyed) {
|
|
168
|
+
if (getGlobalConfig().WarpDriveMirror.debug.LOG_REACT_SIGNAL_INTEGRATION || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REACT_SIGNAL_INTEGRATION) console.log(`[WarpDrive] Detected Watcher Destroyed During Notify, clearing signals`);
|
|
169
|
+
state.snapshot = null;
|
|
170
|
+
clearWatcher(state);
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
state.watcher.watch();
|
|
174
|
+
state.snapshot = { watcher: state.watcher };
|
|
175
|
+
return state;
|
|
176
|
+
}
|
|
177
|
+
function useWatcher() {
|
|
178
|
+
const state = useMemo(_createWatcher, []);
|
|
179
|
+
return useSyncExternalStore((notifyChanged) => {
|
|
180
|
+
if (getGlobalConfig().WarpDriveMirror.debug.LOG_REACT_SIGNAL_INTEGRATION || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REACT_SIGNAL_INTEGRATION) console.log(`[WarpDrive] Subscribing to Watcher`);
|
|
181
|
+
state.destroyed = false;
|
|
182
|
+
state.notifyReact = notifyChanged;
|
|
183
|
+
state.watcher.watch();
|
|
184
|
+
return () => {
|
|
185
|
+
if (getGlobalConfig().WarpDriveMirror.debug.LOG_REACT_SIGNAL_INTEGRATION || globalThis.getWarpDriveRuntimeConfig().debug.LOG_REACT_SIGNAL_INTEGRATION) console.log(`[WarpDrive] Deactivating Watcher Subscription`);
|
|
186
|
+
state.destroyed = true;
|
|
187
|
+
state.notifyReact = null;
|
|
188
|
+
};
|
|
189
|
+
}, () => state.snapshot);
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* @category Contexts
|
|
193
|
+
*/
|
|
194
|
+
const WatcherContext = /*#__PURE__*/ createContext(null);
|
|
195
|
+
/**
|
|
196
|
+
*
|
|
197
|
+
* @category Components
|
|
198
|
+
*/
|
|
199
|
+
function ReactiveContext({ children }) {
|
|
200
|
+
const watcher = useWatcher();
|
|
201
|
+
/**
|
|
202
|
+
* Unlike other frameworks, React does not have a built-in way to provide
|
|
203
|
+
* a context value other than by rendering an extra component.
|
|
204
|
+
*
|
|
205
|
+
*/
|
|
206
|
+
return /*#__PURE__*/ jsxDEV(WatcherContext, {
|
|
207
|
+
value: watcher,
|
|
208
|
+
children
|
|
209
|
+
}, void 0, false, {
|
|
210
|
+
fileName: _jsxFileName,
|
|
211
|
+
lineNumber: 164,
|
|
212
|
+
columnNumber: 10
|
|
213
|
+
}, this);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
//#endregion
|
|
217
|
+
export { WatcherContext as n, getGlobalConfig as r, ReactiveContext as t };
|
|
218
|
+
//# sourceMappingURL=reactive-context-C9-Fc8qx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactive-context-C9-Fc8qx.js","names":["each","array","Array","isArray","Error","macroCondition","predicate","config","packageRoot","runtimeConfig","packages","getGlobalConfig","global","isTesting","g","e","Boolean","setTesting","globalThis","__embroider_macros__runtime_config__","localConfig","initializeRuntimeMacrosConfig","Object","assign","updaterMethods","setConfig","value","setGlobalConfig","key","updaters","window","_embroider_macros_runtime_config","undefined","methods","updater","Signal","createContext","useSyncExternalStore","useMemo","getGlobalConfig","getGlobalConfig0","jsxDEV","_jsxDEV","nextFlush","watchers","watcherId","clearWatcher","state","watcher","unwatch","subtle","introspectSources","flush","pending","destroyed","WarpDrive","debug","LOG_REACT_SIGNAL_INTEGRATION","globalThis","getWarpDriveRuntimeConfig","console","log","snapshot","Set","getPending","notifyReact","watch","_createWatcher","id","Watcher","args","push","Promise","resolve","queueMicrotask","forEach","map","w","useWatcher","notifyChanged","WatcherContext","ReactiveContext","children","value","fileName","_jsxFileName","lineNumber","columnNumber"],"sources":["../../../../../node_modules/.pnpm/@embroi_8c5bde00dfb478e637d05be822ff1428/node_modules/@embroider/macros/src/addon/runtime.js","../../../src/-private/reactive-context.tsx"],"sourcesContent":["/*\n These are the runtime implementations for the javascript macros that have\n runtime implementations.\n\n Not every macro has a runtime implementation, some only make sense in the\n build and always run there.\n\n Even when we have runtime implementations, we are still careful to emit static\n errors during the build wherever possible, and runtime errors when necessary,\n so that you're not surprised when you switch from runtime-mode to compile-time\n mode.\n*/\n\n/*\n CAUTION: in classic builds, this file gets shared by all present copies of\n @embroider/macros. If you want to change its public API, you need to rename it\n and update `pathToRuntime` in ../babel/state.ts to point at it, so that your\n babel plugin and runtime will match.\n*/\n\nexport function each(array) {\n if (!Array.isArray(array)) {\n throw new Error(`the argument to the each() macro must be an array`);\n }\n return array;\n}\n\nexport function macroCondition(predicate) {\n return predicate;\n}\n\n// This is here as a compile target for `getConfig` and `getOwnConfig` when\n// we're in runtime mode. This is not public API to call from your own code.\nexport function config(packageRoot) {\n return runtimeConfig.packages[packageRoot];\n}\n\nexport function getGlobalConfig() {\n return runtimeConfig.global;\n}\n\nexport function isTesting() {\n let g = runtimeConfig.global;\n let e = g && g['@embroider/macros'];\n return Boolean(e && e.isTesting);\n}\n\nexport function setTesting(isTesting) {\n if (!runtimeConfig.global) {\n runtimeConfig.global = {};\n }\n if (!runtimeConfig.global['@embroider/macros']) {\n runtimeConfig.global['@embroider/macros'] = {};\n }\n runtimeConfig.global['@embroider/macros'].isTesting = Boolean(isTesting);\n}\n\n// Welcome intrepid developer!\n//\n// While this data is \"global\", this is a private variable.\n//\n// do not build features based off of its contents,\n// or assume it will have the same name in future releases.\nconst runtimeConfig = globalThis.__embroider_macros__runtime_config__ ||= {};\n\nruntimeConfig.packages ||= {};\nruntimeConfig.global ||= {};\n\n// In the off chance there are duplicate copies of @embroider/macros in the dep graph\n// (due to the package manager messing up)\n// Let's try to merge them together via the above global well known variable\nconst localConfig = initializeRuntimeMacrosConfig();\n\nObject.assign(runtimeConfig.packages, localConfig.packages);\nObject.assign(runtimeConfig.global, localConfig.global);\n\n// this exists to be targeted by our babel plugin\nfunction initializeRuntimeMacrosConfig() {\n return { packages: {}, global: {} };\n}\n\nfunction updaterMethods() {\n return {\n config,\n getGlobalConfig,\n setConfig(packageRoot, value) {\n runtimeConfig.packages[packageRoot] = value;\n },\n setGlobalConfig(key, value) {\n runtimeConfig.global[key] = value;\n },\n };\n}\n\n// this is how runtime config can get injected at boot. I'm not sure yet if this\n// should be public API, but we certainly need it internally to set things like\n// the global fastboot.isRunning.\n//\n// consumers of this API push a function onto\n// window._embroider_macros_runtime_config. The function is given four methods\n// which allow it to read and write the per-package and global configs. The\n// reason for allowing both read & write is that merging strategies are up to\n// each consumers -- read first, then merge, then write.\n//\n// For an example user of this API, see where we generate\n// embroider_macros_fastboot_init.js' in @embroider/core.\nlet updaters = typeof window !== 'undefined' ? window._embroider_macros_runtime_config : undefined;\nif (updaters) {\n let methods = updaterMethods();\n for (let updater of updaters) {\n updater(methods);\n }\n}\n","import { Signal } from \"signal-polyfill\";\nimport { createContext, type JSX, type ReactNode, useSyncExternalStore, type Context, useMemo } from \"react\";\nimport { LOG_REACT_SIGNAL_INTEGRATION } from \"@warp-drive-mirror/core/build-config/debugging\";\n\nlet nextFlush: Promise<void> | null = null;\nlet watchers: WatcherState[] = [];\nlet watcherId = 0;\n\ninterface WatcherState {\n watcherId: number;\n pending: boolean;\n destroyed: boolean;\n notifyReact: (() => void) | null;\n watcher: Signal.subtle.Watcher;\n\n // the extra wrapper returned here ensures that the context value for the watcher\n // changes causing a re-render when the watcher is updated.\n snapshot: { watcher: Signal.subtle.Watcher } | null;\n}\n\nfunction clearWatcher(state: WatcherState) {\n state.watcher.unwatch(...Signal.subtle.introspectSources(state.watcher));\n}\n\nfunction flush(state: WatcherState) {\n state.pending = false;\n if (state.destroyed) {\n if (LOG_REACT_SIGNAL_INTEGRATION) {\n console.log(`[WarpDrive] Detected Watcher Destroyed During Notify Flush, clearing signals`);\n }\n state.snapshot = null;\n clearWatcher(state);\n return;\n }\n\n if (LOG_REACT_SIGNAL_INTEGRATION) {\n console.log(`[WarpDrive] Notifying React That WatcherContext:${state.watcherId} Has Updated`);\n console.log(\"all signals\", new Set(Signal.subtle.introspectSources(state.watcher)));\n console.log(\"dirty signals\", new Set(state.watcher.getPending()));\n }\n\n // any time signals have changed, we notify React that our store has updated\n state.snapshot = { watcher: state.watcher };\n if (state.notifyReact) state.notifyReact();\n\n // tell the Watcher to start watching for changes again\n // by signaling that notifications have been flushed.\n state.watcher.watch();\n}\n\nfunction _createWatcher() {\n const id = watcherId++;\n if (LOG_REACT_SIGNAL_INTEGRATION) {\n console.log(`[WarpDrive] Creating a WatcherContext:${id}`);\n }\n const state: WatcherState = {\n watcherId: id,\n pending: false,\n destroyed: false,\n notifyReact: null as (() => void) | null,\n watcher: null as unknown as Signal.subtle.Watcher,\n\n // the extra wrapper returned here ensures that the context value for the watcher\n // changes causing a re-render when the watcher is updated.\n snapshot: null as { watcher: Signal.subtle.Watcher } | null,\n };\n\n state.watcher = new Signal.subtle.Watcher((...args) => {\n if (LOG_REACT_SIGNAL_INTEGRATION) {\n console.log(`watcher ${state.watcherId} notified`, args, state.watcher);\n }\n if (!state.pending && !state.destroyed) {\n watchers.push(state);\n state.pending = true;\n\n if (!nextFlush) {\n nextFlush = new Promise((resolve) => {\n queueMicrotask(() => {\n queueMicrotask(() => {\n queueMicrotask(() => {\n watchers.forEach(flush);\n if (LOG_REACT_SIGNAL_INTEGRATION) {\n console.log(\n \"Flushed watcher:\",\n watchers.map((w) => w.watcherId)\n );\n }\n watchers = [];\n nextFlush = null;\n\n resolve();\n });\n });\n });\n });\n }\n } else if (state.destroyed) {\n if (LOG_REACT_SIGNAL_INTEGRATION) {\n console.log(`[WarpDrive] Detected Watcher Destroyed During Notify, clearing signals`);\n }\n // if we are destroyed, we clear the watcher signals\n // so that it does not continue to watch for changes.\n state.snapshot = null;\n clearWatcher(state);\n }\n });\n\n // The watcher won't begin watching until we call `watcher.watch()`\n state.watcher.watch();\n state.snapshot = { watcher: state.watcher };\n\n return state;\n}\n\nexport function useWatcher(): { watcher: Signal.subtle.Watcher } | null {\n const state = useMemo(_createWatcher, []);\n\n return useSyncExternalStore(\n (notifyChanged: () => void) => {\n if (LOG_REACT_SIGNAL_INTEGRATION) {\n console.log(`[WarpDrive] Subscribing to Watcher`);\n }\n state.destroyed = false;\n state.notifyReact = notifyChanged;\n\n // The watcher won't begin watching until we call `watcher.watch()`\n state.watcher.watch();\n\n return () => {\n if (LOG_REACT_SIGNAL_INTEGRATION) {\n console.log(`[WarpDrive] Deactivating Watcher Subscription`);\n }\n state.destroyed = true;\n state.notifyReact = null;\n };\n },\n () => state.snapshot\n );\n}\n\n/**\n * @category Contexts\n */\nexport const WatcherContext: Context<{\n /**\n * The `Signal.subtle.Watcher` used to observe signal changes for the nearest {@link ReactiveContext}.\n */\n watcher: Signal.subtle.Watcher;\n} | null> = createContext<{\n watcher: Signal.subtle.Watcher;\n} | null>(null);\n\n/**\n *\n * @category Components\n */\nexport function ReactiveContext({ children }: { children: ReactNode }): JSX.Element {\n const watcher = useWatcher();\n /**\n * Unlike other frameworks, React does not have a built-in way to provide\n * a context value other than by rendering an extra component.\n *\n */\n return <WatcherContext value={watcher}>{children}</WatcherContext>;\n}\n"],"x_google_ignoreList":[0],"mappings":";;;;;AAiCA,SAAgBO,OAAOC,aAAa;CAClC,OAAOC,cAAcC,SAASF;AAChC;AAEA,SAAgBG,kBAAkB;CAChC,OAAOF,cAAcG;AACvB;AAwBA,MAAMH,gBAAgBS,WAAWC,yCAAyC,CAAC;AAE3EV,cAAcC,aAAa,CAAC;AAC5BD,cAAcG,WAAW,CAAC;AAK1B,MAAMQ,cAAcC,8BAA8B;AAElDC,OAAOC,OAAOd,cAAcC,UAAUU,YAAYV,QAAQ;AAC1DY,OAAOC,OAAOd,cAAcG,QAAQQ,YAAYR,MAAM;AAGtD,SAASS,gCAAgC;CAAA,OA7EvC;EAAC,YAAW,CAAC;EAAE,UAAS;GAAC,qBAAoB,EAAC,aAAY,MAAK;GAAE,aAAY;IAAC,SAAQ;KAAC,oCAAmC;KAAM,aAAY;KAAM,oBAAmB;KAAM,aAAY;KAAM,mBAAkB;KAAM,sBAAqB;KAAM,qBAAoB;KAAM,iBAAgB;KAAM,qBAAoB;KAAM,kBAAiB;KAAM,gBAAe;KAAM,gCAA+B;KAAM,gBAAe;KAAM,sBAAqB;KAAM,wCAAuC;IAAK;IAAE,gBAAe;IAAM,sBAAqB;IAAK,cAAa;IAAO,gBAAe;KAAC,uBAAsB;KAAM,6BAA4B;KAAM,6BAA4B;KAAM,4BAA2B;KAAM,mCAAkC;KAAM,2BAA0B;KAAM,8BAA6B;KAAM,iCAAgC;KAAM,6DAA4D;KAAM,wCAAuC;KAAM,8BAA6B;KAAM,2BAA0B;KAAM,iCAAgC;KAAM,gCAA+B;IAAK;IAAE,YAAW;KAAC,wCAAuC;KAAM,oCAAmC;KAAM,uBAAsB;IAAK;IAAE,iBAAgB;KAAC,oCAAmC;KAAK,aAAY;KAAK,oBAAmB;K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