gemi 0.193.0 → 0.193.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/dist/{chunk-m0aq07nj.js → chunk-fhvyq67n.js} +1 -1
- package/dist/{chunk-7bbtre2j.js → chunk-gsrf5c3c.js} +2 -2
- package/dist/{chunk-7bbtre2j.js.map → chunk-gsrf5c3c.js.map} +1 -1
- package/dist/chunk-vese6sny.js +24 -0
- package/dist/{chunk-8ysrmyer.js.map → chunk-vese6sny.js.map} +3 -3
- package/dist/chunks/{RealtimeClient-bPI28SVg.js → RealtimeClient-BVQeh_yg.js} +2 -2
- package/dist/chunks/{RealtimeClient-bPI28SVg.js.map → RealtimeClient-BVQeh_yg.js.map} +1 -1
- package/dist/chunks/{ThemeProvider-BstCYMfV.js → ThemeProvider-G2g5Z1ZS.js} +45 -5
- package/dist/chunks/{ThemeProvider-BstCYMfV.js.map → ThemeProvider-G2g5Z1ZS.js.map} +1 -1
- package/dist/chunks/{fetchFileRequest-BD9pg9RL.js → fetchFileRequest-Bzva9J59.js} +2 -2
- package/dist/chunks/{fetchFileRequest-BD9pg9RL.js.map → fetchFileRequest-Bzva9J59.js.map} +1 -1
- package/dist/chunks/{live-DYLCi077.js → live-C2Sck5PO.js} +3 -3
- package/dist/chunks/{live-DYLCi077.js.map → live-C2Sck5PO.js.map} +1 -1
- package/dist/chunks/{mutationExtras-Bo8pvlEx.js → mutationExtras-HC7AC6zn.js} +2 -2
- package/dist/chunks/{mutationExtras-Bo8pvlEx.js.map → mutationExtras-HC7AC6zn.js.map} +1 -1
- package/dist/chunks/{subscriptionStream-CtwEcda9.js → subscriptionStream-CaTWWJwt.js} +2 -2
- package/dist/chunks/{subscriptionStream-CtwEcda9.js.map → subscriptionStream-CaTWWJwt.js.map} +1 -1
- package/dist/client/chunkLoadRecovery.d.ts +5 -2
- package/dist/client/chunkLoadRecovery.d.ts.map +1 -1
- package/dist/client/index.js +4 -4
- package/dist/server/index.js +1 -1
- package/dist/testing/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-8ysrmyer.js +0 -24
- /package/dist/{chunk-m0aq07nj.js.map → chunk-fhvyq67n.js.map} +0 -0
|
@@ -1053,7 +1053,7 @@ function loadedRealtimeClient() {
|
|
|
1053
1053
|
}
|
|
1054
1054
|
var loading = null;
|
|
1055
1055
|
/** The lazily loaded client. Replaceable in tests, to simulate a failed load. */
|
|
1056
|
-
var lazyModules = { client: () => import("./RealtimeClient-
|
|
1056
|
+
var lazyModules = { client: () => import("./RealtimeClient-BVQeh_yg.js") };
|
|
1057
1057
|
/**
|
|
1058
1058
|
* `./live`, loaded by the first live query. `<Page>` in `gemi/testing` sets
|
|
1059
1059
|
* `current` up front, so a live query on a provided socket subscribes during
|
|
@@ -1061,7 +1061,7 @@ var lazyModules = { client: () => import("./RealtimeClient-bPI28SVg.js") };
|
|
|
1061
1061
|
*/
|
|
1062
1062
|
var liveModule = {
|
|
1063
1063
|
current: null,
|
|
1064
|
-
load: () => import("./live-
|
|
1064
|
+
load: () => import("./live-C2Sck5PO.js").then((n) => n.n)
|
|
1065
1065
|
};
|
|
1066
1066
|
/**
|
|
1067
1067
|
* The tab's client, loading its module and creating it on first use. `null`
|
|
@@ -3285,6 +3285,7 @@ var pendingLoad = null;
|
|
|
3285
3285
|
function configureChunkLoadRecovery(next) {
|
|
3286
3286
|
enabled = next !== false;
|
|
3287
3287
|
options = next || {};
|
|
3288
|
+
tidyWindowName();
|
|
3288
3289
|
}
|
|
3289
3290
|
/**
|
|
3290
3291
|
* The router calls this as each client-side navigation starts. A full load
|
|
@@ -3398,7 +3399,34 @@ function withinCooldown(elapsed, cooldownMs) {
|
|
|
3398
3399
|
return elapsed >= 0 && elapsed < cooldownMs;
|
|
3399
3400
|
}
|
|
3400
3401
|
function markReload(url) {
|
|
3401
|
-
|
|
3402
|
+
if (chunkReloadGuard("gemi:chunk-reload", url, cooldownMs(), true) !== "ok") return false;
|
|
3403
|
+
tidyWindowName();
|
|
3404
|
+
return true;
|
|
3405
|
+
}
|
|
3406
|
+
var tidyTimer;
|
|
3407
|
+
/**
|
|
3408
|
+
* Takes gemi's marker out of `window.name` (back to `""`) once it guards
|
|
3409
|
+
* nothing (#1188): the page may want the name for itself, under the same
|
|
3410
|
+
* "only while it is empty" rule gemi follows. Now when nothing in it is live,
|
|
3411
|
+
* otherwise once the newest entry's cooldown has passed, checked again then
|
|
3412
|
+
* since a reload may have been recorded in the meantime. Only a name that
|
|
3413
|
+
* holds gemi's marker is ever cleared; see `chunkReloadGuard`'s `"tidy"`.
|
|
3414
|
+
*/
|
|
3415
|
+
function tidyWindowName() {
|
|
3416
|
+
clearTimeout(tidyTimer);
|
|
3417
|
+
tidyTimer = void 0;
|
|
3418
|
+
if (typeof window === "undefined") return;
|
|
3419
|
+
let delay;
|
|
3420
|
+
try {
|
|
3421
|
+
if (chunkReloadGuard("gemi:chunk-reload", window.location.href, cooldownMs(), "tidy") !== "cooldown") return;
|
|
3422
|
+
const held = JSON.parse(window.name.slice(18));
|
|
3423
|
+
const now = Date.now();
|
|
3424
|
+
delay = Math.max(...Object.values(held.m).filter((at) => typeof at === "number" && at <= now)) + cooldownMs() - now;
|
|
3425
|
+
} catch {
|
|
3426
|
+
return;
|
|
3427
|
+
}
|
|
3428
|
+
if (!Number.isFinite(delay)) return;
|
|
3429
|
+
tidyTimer = setTimeout(tidyWindowName, Math.max(0, delay) + 1);
|
|
3402
3430
|
}
|
|
3403
3431
|
/**
|
|
3404
3432
|
* The cross-document guard, shared by the client and the server's reload stub
|
|
@@ -3407,7 +3435,10 @@ function markReload(url) {
|
|
|
3407
3435
|
* onto `url` was recorded inside `cooldownMs`, `"storage"` when no marker can
|
|
3408
3436
|
* be read at all, otherwise `"ok"`. With `claim` true it also records the
|
|
3409
3437
|
* reload, and answers `"ok"` only once the record was written and read back
|
|
3410
|
-
* unchanged; a caller navigates on nothing less.
|
|
3438
|
+
* unchanged; a caller navigates on nothing less. With `"tidy"` it only looks
|
|
3439
|
+
* at `window.name`: a gemi marker with no live entry for this origin (expired,
|
|
3440
|
+
* from the future, another origin's, or one that does not parse) is cleared
|
|
3441
|
+
* to `""` and `"ok"` answered; `"cooldown"` while an entry is still live.
|
|
3411
3442
|
*
|
|
3412
3443
|
* Two places can hold the marker:
|
|
3413
3444
|
*
|
|
@@ -3480,6 +3511,15 @@ function chunkReloadGuard(key, url, cooldownMs, claim) {
|
|
|
3480
3511
|
} catch {
|
|
3481
3512
|
named = null;
|
|
3482
3513
|
}
|
|
3514
|
+
if (claim === "tidy") {
|
|
3515
|
+
try {
|
|
3516
|
+
const current = window.name;
|
|
3517
|
+
if (named === null || current.indexOf(prefix) !== 0) return "ok";
|
|
3518
|
+
for (const k in named) if (fresh(named[k])) return "cooldown";
|
|
3519
|
+
window.name = "";
|
|
3520
|
+
} catch {}
|
|
3521
|
+
return "ok";
|
|
3522
|
+
}
|
|
3483
3523
|
if (fresh(stored[url]) || named && fresh(named[page])) return "cooldown";
|
|
3484
3524
|
if (!storage && !named) return "storage";
|
|
3485
3525
|
if (!claim) return "ok";
|
|
@@ -4127,4 +4167,4 @@ function useTheme() {
|
|
|
4127
4167
|
//#endregion
|
|
4128
4168
|
export { QueryManagerProvider as $, useNavigate as A, createMemoryHistory as B, loadDictionaryForRender as C, routeDataUrl as D, readRoutePayload as E, useLocation as F, realtime as G, configureRealtime as H, domainUrl as I, loadedModule as J, reconnectRealtime as K, isAbsoluteUrl as L, I18nProvider as M, ServerDataContext as N, useRoute as O, ServerDataProvider as P, QueryManagerContext as Q, ProgressManager as R, loadDictionary as S, setActiveLocale as T, followLive as U, RealtimeContext as V, liveModule as W, applyParams as X, toVariantKey as Y, QueryConfigContext as Z, isChunkLoadError as _, Subject as _t, useRouteTransition as a, resetAuthenticationIncident as at, recoverFromBuildMismatch as b, ClientRouterContext as c, isExternalRedirect as ct, ComponentsProvider as d, equalJitter as dt, USER_QUERY_CONFIG_KEYS as et, initialViewModulesReady as f, isRetryableQueryError as ft, configureChunkLoadRecovery as g, QueryError as gt, CHUNK_RELOAD_MARKER as h, shouldRetryQuery as ht, RouteTransitionProvider as i, reportAuthenticationRefusal as it, I18nContext as j, useSearchParams as k, ClientRouterProvider as l, safeRedirectPath as lt, subscribeViewModules as m, retryDelayFor as mt, useTheme as n, DEFAULT_STALE_TIME as nt, useChannelSubscription as o, setAuthenticationNavigator as ot, loadViewModule as p, parseRetryAfter as pt, loadLazy as q, m as r, configureAuthenticationErrors as rt, useCoalesced as s, INTENDED_URL_PARAM as st, ThemeProvider as t, pickDefined as tt, ComponentsContext as u, readResponseBody as ut, navigationStarted as v, registerDictionary as w, recoverFromChunkLoadError as x, otherBuild as y, Action as z };
|
|
4129
4169
|
|
|
4130
|
-
//# sourceMappingURL=ThemeProvider-
|
|
4170
|
+
//# sourceMappingURL=ThemeProvider-G2g5Z1ZS.js.map
|