@warp-drive-mirror/core 5.10.0-alpha.13 → 5.10.0-alpha.15
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-BpyvBYFj.js → -private-Y-13dsHO.js} +39 -9
- package/dist/-private-Y-13dsHO.js.map +1 -0
- package/dist/build-config/babel-macros.d.ts +5 -0
- package/dist/build-config/canary-features.d.ts +5 -0
- package/dist/build-config/debugging.d.ts +59 -0
- package/dist/build-config/deprecations.d.ts +5 -0
- package/dist/build-config.d.ts +17 -0
- package/dist/{configure-CjsojjiI.d.ts → configure-CodrrdQr.d.ts} +51 -8
- package/dist/configure-CodrrdQr.d.ts.map +1 -0
- package/dist/configure.d.ts +10 -2
- package/dist/configure.js +2 -2
- package/dist/graph/-private.d.ts +1 -1
- package/dist/graph/-private.js +2 -2
- package/dist/graph/-private.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{internal-CgOlgOt3.d.ts → internal-BOC6nyCi.d.ts} +25 -15
- package/dist/{internal-CgOlgOt3.d.ts.map → internal-BOC6nyCi.d.ts.map} +1 -1
- package/dist/reactive/-private.d.ts +1 -1
- package/dist/reactive.d.ts +276 -1
- package/dist/reactive.js +2 -2
- package/dist/{request-MiwUbGdT.js → request-DUGpwUhf.js} +23 -13
- package/dist/{request-MiwUbGdT.js.map → request-DUGpwUhf.js.map} +1 -1
- package/dist/request.d.ts +9 -1
- package/dist/request.js +1 -1
- package/dist/signals/-leaked.d.ts +16 -2
- package/dist/signals/-leaked.d.ts.map +1 -1
- package/dist/signals/-leaked.js +1 -1
- package/dist/{src-DlNeupkA.js → src-DDLNZD8D.js} +5 -5
- package/dist/{src-DlNeupkA.js.map → src-DDLNZD8D.js.map} +1 -1
- package/dist/store/-private.d.ts +1 -1
- package/dist/store/-private.js +1 -1
- package/dist/store.d.ts +6 -1
- package/dist/types/-private.d.ts +1 -0
- package/dist/types/-private.js +1 -1
- package/dist/types/cache/relationship.d.ts +5 -0
- package/dist/types/cache.d.ts +6 -1
- package/dist/types/graph.d.ts +5 -0
- package/dist/types/record.d.ts +5 -0
- package/dist/types/request.d.ts +1 -1
- package/dist/types/runtime.d.ts +10 -5
- package/dist/types/runtime.d.ts.map +1 -1
- package/dist/types/runtime.js +7 -3
- package/dist/types/runtime.js.map +1 -1
- package/dist/types/schema/concepts.d.ts +5 -0
- package/dist/types/schema/schema-service.d.ts +6 -1
- package/dist/types/spec/error.d.ts +4 -0
- package/dist/types/spec/json-api-raw.d.ts +5 -0
- package/dist/types.d.ts +9 -1
- package/dist/unpkg/dev/{-private-BH4O810v.js → -private-BoKjsWc1.js} +39 -9
- package/dist/unpkg/dev/-private-BoKjsWc1.js.map +1 -0
- package/dist/unpkg/dev/configure.js +2 -2
- package/dist/unpkg/dev/graph/-private.js +2 -2
- package/dist/unpkg/dev/graph/-private.js.map +1 -1
- package/dist/unpkg/dev/index.js +1 -1
- package/dist/unpkg/dev/reactive.js +2 -2
- package/dist/unpkg/dev/{request-Fe-vpe-u.js → request-BQUGZTOj.js} +23 -13
- package/dist/unpkg/dev/{request-Fe-vpe-u.js.map → request-BQUGZTOj.js.map} +1 -1
- package/dist/unpkg/dev/request.js +1 -1
- package/dist/unpkg/dev/signals/-leaked.js +1 -1
- package/dist/unpkg/dev/{src-FSk0Z_Lp.js → src-DqRXbeNO.js} +5 -5
- package/dist/unpkg/dev/{src-FSk0Z_Lp.js.map → src-DqRXbeNO.js.map} +1 -1
- package/dist/unpkg/dev/store/-private.js +1 -1
- package/dist/unpkg/dev/types/-private.js +1 -1
- package/dist/unpkg/dev/types/runtime.js +7 -3
- package/dist/unpkg/dev/types/runtime.js.map +1 -1
- package/dist/unpkg/dev-deprecated/{-private-BH4O810v.js → -private-BoKjsWc1.js} +39 -9
- package/dist/unpkg/dev-deprecated/-private-BoKjsWc1.js.map +1 -0
- package/dist/unpkg/dev-deprecated/configure.js +2 -2
- package/dist/unpkg/dev-deprecated/graph/-private.js +2 -2
- package/dist/unpkg/dev-deprecated/graph/-private.js.map +1 -1
- package/dist/unpkg/dev-deprecated/index.js +1 -1
- package/dist/unpkg/dev-deprecated/reactive.js +2 -2
- package/dist/unpkg/dev-deprecated/{request-Fe-vpe-u.js → request-BQUGZTOj.js} +23 -13
- package/dist/unpkg/dev-deprecated/{request-Fe-vpe-u.js.map → request-BQUGZTOj.js.map} +1 -1
- package/dist/unpkg/dev-deprecated/request.js +1 -1
- package/dist/unpkg/dev-deprecated/signals/-leaked.js +1 -1
- package/dist/unpkg/dev-deprecated/{src-Isk_Je7q.js → src-EY9o2zd6.js} +5 -5
- package/dist/unpkg/dev-deprecated/{src-Isk_Je7q.js.map → src-EY9o2zd6.js.map} +1 -1
- package/dist/unpkg/dev-deprecated/store/-private.js +1 -1
- package/dist/unpkg/dev-deprecated/types/-private.js +1 -1
- package/dist/unpkg/dev-deprecated/types/runtime.js +7 -3
- package/dist/unpkg/dev-deprecated/types/runtime.js.map +1 -1
- package/dist/unpkg/{prod-deprecated/-private-DKVDMUfT.js → prod/-private-CRDwlN1v.js} +39 -9
- package/dist/unpkg/prod/-private-CRDwlN1v.js.map +1 -0
- package/dist/unpkg/prod/configure.js +2 -2
- package/dist/unpkg/prod/graph/-private.js.map +1 -1
- package/dist/unpkg/prod/index.js +1 -1
- package/dist/unpkg/prod/reactive.js +2 -2
- package/dist/unpkg/{prod-deprecated/request-ndw2Fy91.js → prod/request-0h8eJko9.js} +23 -13
- package/dist/unpkg/{prod-deprecated/request-ndw2Fy91.js.map → prod/request-0h8eJko9.js.map} +1 -1
- package/dist/unpkg/prod/request.js +1 -1
- package/dist/unpkg/prod/signals/-leaked.js +1 -1
- package/dist/unpkg/prod/{src-CoSpuocQ.js → src-Dagh1FmP.js} +5 -5
- package/dist/unpkg/prod/{src-CoSpuocQ.js.map → src-Dagh1FmP.js.map} +1 -1
- package/dist/unpkg/prod/store/-private.js +1 -1
- package/dist/unpkg/prod/types/-private.js +1 -1
- package/dist/unpkg/prod/types/runtime.js +7 -3
- package/dist/unpkg/prod/types/runtime.js.map +1 -1
- package/dist/unpkg/{prod/-private-DKVDMUfT.js → prod-deprecated/-private-CRDwlN1v.js} +39 -9
- package/dist/unpkg/prod-deprecated/-private-CRDwlN1v.js.map +1 -0
- package/dist/unpkg/prod-deprecated/configure.js +2 -2
- package/dist/unpkg/prod-deprecated/graph/-private.js.map +1 -1
- package/dist/unpkg/prod-deprecated/index.js +1 -1
- package/dist/unpkg/prod-deprecated/reactive.js +2 -2
- package/dist/unpkg/{prod/request-ndw2Fy91.js → prod-deprecated/request-0h8eJko9.js} +23 -13
- package/dist/unpkg/{prod/request-ndw2Fy91.js.map → prod-deprecated/request-0h8eJko9.js.map} +1 -1
- package/dist/unpkg/prod-deprecated/request.js +1 -1
- package/dist/unpkg/prod-deprecated/signals/-leaked.js +1 -1
- package/dist/unpkg/prod-deprecated/{src-FK_rMde5.js → src-CvV5lz9D.js} +5 -5
- package/dist/unpkg/prod-deprecated/{src-FK_rMde5.js.map → src-CvV5lz9D.js.map} +1 -1
- package/dist/unpkg/prod-deprecated/store/-private.js +1 -1
- package/dist/unpkg/prod-deprecated/types/-private.js +1 -1
- package/dist/unpkg/prod-deprecated/types/runtime.js +7 -3
- package/dist/unpkg/prod-deprecated/types/runtime.js.map +1 -1
- package/logos/README.md +1 -1
- package/package.json +4 -4
- package/dist/-private-BpyvBYFj.js.map +0 -1
- package/dist/configure-CjsojjiI.d.ts.map +0 -1
- package/dist/unpkg/dev/-private-BH4O810v.js.map +0 -1
- package/dist/unpkg/dev-deprecated/-private-BH4O810v.js.map +0 -1
- package/dist/unpkg/prod/-private-DKVDMUfT.js.map +0 -1
- package/dist/unpkg/prod-deprecated/-private-DKVDMUfT.js.map +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { C as setRecordIdentifier, D as isRequestKey, E as fieldValueIdentity, F as coerceId, I as ensureStringId, L as log, O as isResourceKey, P as normalizeModelName, R as logGroup, S as recordIdentifierFor, T as assertPrivateCapabilities, _ as isPrivateStore, b as StoreMap, f as createLegacyManyArray, g as assertPrivateStore, h as Store, m as CacheHandler, p as constructResource, v as RecordArrayManager, w as storeFor, x as _clearCaches, y as fastPush } from "../src-
|
|
1
|
+
import { C as setRecordIdentifier, D as isRequestKey, E as fieldValueIdentity, F as coerceId, I as ensureStringId, L as log, O as isResourceKey, P as normalizeModelName, R as logGroup, S as recordIdentifierFor, T as assertPrivateCapabilities, _ as isPrivateStore, b as StoreMap, f as createLegacyManyArray, g as assertPrivateStore, h as Store, m as CacheHandler, p as constructResource, v as RecordArrayManager, w as storeFor, x as _clearCaches, y as fastPush } from "../src-DqRXbeNO.js";
|
|
2
2
|
|
|
3
3
|
export { CacheHandler, RecordArrayManager, Store, StoreMap, _clearCaches, normalizeModelName as _deprecatingNormalize, assertPrivateCapabilities, assertPrivateStore, coerceId, constructResource, createLegacyManyArray, ensureStringId, fastPush, fieldValueIdentity, isPrivateStore, isRequestKey, isResourceKey, log, logGroup, recordIdentifierFor, setRecordIdentifier, storeFor };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/types/-private.ts
|
|
2
2
|
const name = "@warp-drive-mirror/core";
|
|
3
|
-
const version = "5.10.0-alpha.
|
|
3
|
+
const version = "5.10.0-alpha.15";
|
|
4
4
|
const GlobalRef = globalThis;
|
|
5
5
|
const UniversalCache = GlobalRef.__warpDrive_universalCache = GlobalRef.__warpDrive_universalCache ?? {};
|
|
6
6
|
GlobalRef[name] = GlobalRef[name] ?? { __version: version };
|
|
@@ -2,8 +2,12 @@ import { getOrSetUniversal } from "./-private.js";
|
|
|
2
2
|
|
|
3
3
|
//#region src/types/runtime.ts
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
6
|
-
* {@link @warp-drive-mirror/core!build-config/debugging |
|
|
5
|
+
* The shape of the runtime-configurable debug logging flags: one boolean per
|
|
6
|
+
* {@link @warp-drive-mirror/core!build-config/debugging | debugging flag}. Pass a
|
|
7
|
+
* `Partial<LOG_CONFIG>` to {@link setLogging}.
|
|
8
|
+
*
|
|
9
|
+
* @summary The runtime debug logging flags, one boolean per debugging flag, as accepted by `setLogging`.
|
|
10
|
+
* @public
|
|
7
11
|
*/
|
|
8
12
|
const RuntimeConfig = getOrSetUniversal("WarpDriveRuntimeConfig", { debug: {} });
|
|
9
13
|
function trySessionStorage() {
|
|
@@ -31,7 +35,7 @@ function getRuntimeConfig() {
|
|
|
31
35
|
* Upserts the specified logging configuration into the runtime
|
|
32
36
|
* config.
|
|
33
37
|
*
|
|
34
|
-
* globalThis.setWarpDriveLogging({ LOG_CACHE: true }
|
|
38
|
+
* globalThis.setWarpDriveLogging({ LOG_CACHE: true });
|
|
35
39
|
*
|
|
36
40
|
*/
|
|
37
41
|
function setLogging(config) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","names":["getOrSetUniversal","RuntimeConfig","debug","trySessionStorage","globalThis","sessionStorage","undefined","storage","settings","getItem","Object","assign","JSON","parse","getRuntimeConfig","setLogging","config","setItem","stringify","setIsMaybeMirage","value","mirage"],"sources":["../../../../src/types/runtime.ts"],"sourcesContent":["import type * as LOGGING from '@warp-drive-mirror/build-config/debugging';\n\nimport { getOrSetUniversal } from './-private.ts';\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"runtime.js","names":["getOrSetUniversal","RuntimeConfig","debug","trySessionStorage","globalThis","sessionStorage","undefined","storage","settings","getItem","Object","assign","JSON","parse","getRuntimeConfig","setLogging","config","setItem","stringify","setIsMaybeMirage","value","mirage"],"sources":["../../../../src/types/runtime.ts"],"sourcesContent":["import type * as LOGGING from '@warp-drive-mirror/build-config/debugging';\n\nimport { getOrSetUniversal } from './-private.ts';\n\ntype LOG_CONFIG_KEY = keyof typeof LOGGING;\n\n/**\n * The shape of the runtime-configurable debug logging flags: one boolean per\n * {@link @warp-drive-mirror/core!build-config/debugging | debugging flag}. Pass a\n * `Partial<LOG_CONFIG>` to {@link setLogging}.\n *\n * @summary The runtime debug logging flags, one boolean per debugging flag, as accepted by `setLogging`.\n * @public\n */\nexport type LOG_CONFIG = { [key in LOG_CONFIG_KEY]: boolean };\n\nconst RuntimeConfig: {\n /**\n * the currently active logging configuration, see\n * {@link @warp-drive-mirror/core!build-config/debugging | the debugging flags}\n */\n debug: Partial<LOG_CONFIG>;\n /**\n * whether requests should be treated as being served by Mirage,\n * see {@link setIsMaybeMirage}\n */\n mirage?: boolean;\n} = getOrSetUniversal('WarpDriveRuntimeConfig', {\n debug: {},\n});\n\nfunction trySessionStorage() {\n // This works even when sessionStorage is not available.\n // See https://github.com/warp-drive-data/warp-drive/issues/9784\n try {\n return globalThis.sessionStorage;\n } catch {\n return undefined;\n }\n}\n\nconst storage = trySessionStorage();\nconst settings = storage?.getItem('WarpDriveRuntimeConfig');\nif (settings) {\n Object.assign(RuntimeConfig, JSON.parse(settings));\n}\n\n/**\n * Returns the current WarpDrive runtime configuration.\n *\n * @example\n * ```ts\n * const { debug, mirage } = getRuntimeConfig();\n * ```\n */\nexport function getRuntimeConfig(): typeof RuntimeConfig {\n return RuntimeConfig;\n}\n\n/**\n * Upserts the specified logging configuration into the runtime\n * config.\n *\n * globalThis.setWarpDriveLogging({ LOG_CACHE: true });\n *\n */\nexport function setLogging(config: Partial<LOG_CONFIG>): void {\n Object.assign(RuntimeConfig.debug, config);\n storage?.setItem('WarpDriveRuntimeConfig', JSON.stringify(RuntimeConfig));\n}\n\n/**\n * Explicitly declares whether requests may be served by Mirage (or another\n * Pretender-based fetch mock) instead of a native `fetch` implementation.\n *\n * The `Fetch` request handler otherwise infers this via a heuristic (the\n * presence of `window.server.pretender`, or `window.fetch` appearing to be\n * patched), which can be wrong in either direction: some Mirage setups don't\n * expose `window.server`, while some unrelated tools (APM agents, browser\n * extensions) also patch `fetch`. Call this to override that heuristic:\n * `true` to force Mirage-compatible behavior on, `false` to force it off.\n *\n * globalThis.setWarpDriveIsMaybeMirage(true);\n *\n */\nexport function setIsMaybeMirage(value: boolean): void {\n RuntimeConfig.mirage = value;\n storage?.setItem('WarpDriveRuntimeConfig', JSON.stringify(RuntimeConfig));\n}\n"],"mappings":";;;;;;;;;;;AAgBA,MAAMC,gBAWFD,kBAAkB,0BAA0B,EAC9CE,OAAO,CAAC,EACV,CAAC;AAED,SAASC,oBAAoB;CAG3B,IAAI;EACF,OAAOC,WAAWC;CACpB,QAAQ;EACN;CACF;AACF;AAEA,MAAME,UAAUJ,kBAAkB;AAClC,MAAMK,WAAWD,SAASE,QAAQ,wBAAwB;AAC1D,IAAID,UACFE,OAAOC,OAAOV,eAAeW,KAAKC,MAAML,QAAQ,CAAC;;;;;;;;;AAWnD,SAAgBM,mBAAyC;CACvD,OAAOb;AACT;;;;;;;;AASA,SAAgBc,WAAWC,QAAmC;CAC5DN,OAAOC,OAAOV,cAAcC,OAAOc,MAAM;CACzCT,SAASU,QAAQ,0BAA0BL,KAAKM,UAAUjB,aAAa,CAAC;AAC1E;;;;;;;;;;;;;;;AAgBA,SAAgBkB,iBAAiBC,OAAsB;CACrDnB,cAAcoB,SAASD;CACvBb,SAASU,QAAQ,0BAA0BL,KAAKM,UAAUjB,aAAa,CAAC;AAC1E"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getOrSetGlobal, peekTransient, setTransient } from "./types/-private.js";
|
|
2
|
-
import { f as setPromiseResult, o as DOMError, u as getPromiseResult } from "./request-
|
|
2
|
+
import { f as setPromiseResult, o as DOMError, u as getPromiseResult } from "./request-BQUGZTOj.js";
|
|
3
3
|
|
|
4
4
|
//#region src/signals/reactivity/configure.ts
|
|
5
5
|
const ARRAY_SIGNAL = getOrSetGlobal("#[]", Symbol("#[]"));
|
|
@@ -15,10 +15,12 @@ const OBJECT_SIGNAL = getOrSetGlobal("#{}", Symbol("#{}"));
|
|
|
15
15
|
* The hooks which MUST be configured in order to use reactive arrays,
|
|
16
16
|
* resources and documents with framework specfic signals or TC39 signals.
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* To support multiple frameworks on the same page, import
|
|
19
|
+
* `@warp-drive-mirror/alien-signals/install` before each framework's `install` entry
|
|
20
|
+
* point. Its hooks implement {@link SignalHooks.register}, so each framework's
|
|
21
|
+
* hooks, passed to {@link registerSignals}, are added to its signals graph
|
|
22
|
+
* instead of replacing it, and its memos stay up to date for every framework.
|
|
23
|
+
* See [Using Ember and React on the Same Page](/guides/the-manual/cookbook/multiple-frameworks-on-one-page.md).
|
|
22
24
|
*
|
|
23
25
|
* Unlike many signals implementations, WarpDrive does not wrap values as
|
|
24
26
|
* signals directly, but instead uses signals to alert the reactive layer
|
|
@@ -55,8 +57,9 @@ const OBJECT_SIGNAL = getOrSetGlobal("#{}", Symbol("#{}"));
|
|
|
55
57
|
* @public
|
|
56
58
|
*/
|
|
57
59
|
/**
|
|
58
|
-
* Configures the signals implementation to use
|
|
59
|
-
*
|
|
60
|
+
* Configures the signals implementation to use, replacing any configured
|
|
61
|
+
* before. To add a framework's hooks alongside those of other frameworks, use
|
|
62
|
+
* {@link registerSignals} instead.
|
|
60
63
|
*
|
|
61
64
|
* See {@link HooksOptions} for the options passed to the provided function
|
|
62
65
|
* when called.
|
|
@@ -74,6 +77,33 @@ function setupSignals(buildConfig) {
|
|
|
74
77
|
setTransient("signalHooks", hooks);
|
|
75
78
|
}
|
|
76
79
|
/**
|
|
80
|
+
* Adds the hooks built by `buildConfig` to the configured signals implementation if it composes
|
|
81
|
+
* other implementations, such as `@warp-drive-mirror/alien-signals`, and otherwise configures them with
|
|
82
|
+
* {@link setupSignals}.
|
|
83
|
+
*
|
|
84
|
+
* A framework's `install` entry point calls this rather than `setupSignals`, so that importing
|
|
85
|
+
* `@warp-drive-mirror/alien-signals/install` first lets every framework on the page share its signals
|
|
86
|
+
* and memos.
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```ts
|
|
90
|
+
* import { registerSignals } from '@warp-drive-mirror/core/configure';
|
|
91
|
+
*
|
|
92
|
+
* registerSignals(buildSignalConfig);
|
|
93
|
+
* ```
|
|
94
|
+
*
|
|
95
|
+
* @summary Registers signal hooks with the configured composing implementation, or configures
|
|
96
|
+
* them with `setupSignals` when there is none.
|
|
97
|
+
* @since 5.10.0
|
|
98
|
+
* @public
|
|
99
|
+
* @param buildConfig - a function that takes options and returns a configuration object
|
|
100
|
+
*/
|
|
101
|
+
function registerSignals(buildConfig) {
|
|
102
|
+
const signalHooks = peekTransient("signalHooks");
|
|
103
|
+
if (signalHooks?.register) signalHooks.register(buildConfig);
|
|
104
|
+
else setupSignals(buildConfig);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
77
107
|
* Internal method for consuming the configured `createSignal` hook
|
|
78
108
|
*
|
|
79
109
|
* @private
|
|
@@ -3879,5 +3909,5 @@ function getPromiseState(promise) {
|
|
|
3879
3909
|
}
|
|
3880
3910
|
|
|
3881
3911
|
//#endregion
|
|
3882
|
-
export { ARRAY_SIGNAL as A, createInternalMemo as C, notifyInternalSignal as D, makeInitializer as E,
|
|
3883
|
-
//# sourceMappingURL=-private-
|
|
3912
|
+
export { ARRAY_SIGNAL as A, createInternalMemo as C, notifyInternalSignal as D, makeInitializer as E, willSyncFlushWatchers as F, registerSignals as M, setupSignals as N, peekInternalSignal as O, waitFor as P, consumeInternalSignal as S, getOrCreateInternalSignal as T, entangleSignal as _, getPaginationState as a, signal as b, getPaginationCache as c, getRequestState as d, createSignalDescriptor as f, entangleInitiallyStaleSignal as g, defineSignal as h, getPaginationLinks as i, OBJECT_SIGNAL as j, withSignalStore as k, DISPOSE as l, defineNonEnumerableSignal as m, createPaginationLinksSubscription as n, clearPaginationCache as o, defineGate as p, createPaginationSubscription as r, defaultPageHints as s, getPromiseState as t, createRequestSubscription as u, gate as v, createInternalSignal as w, Signals as x, memoized as y };
|
|
3913
|
+
//# sourceMappingURL=-private-BoKjsWc1.js.map
|