@coffre/ui 0.1.9 → 0.1.11
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/client/_coffre/assets/account-BJAdDvZf.js +2 -0
- package/dist/client/_coffre/assets/account-D0jLpk5c.js +1 -0
- package/dist/client/_coffre/assets/affordances-Bq2-oUB5.js +1 -0
- package/dist/client/_coffre/assets/audit-C-pcBgKe.js +2 -0
- package/dist/client/_coffre/assets/audit-CHGlDeBB.js +1 -0
- package/dist/client/_coffre/assets/{auth.device--rDR2F8w.js → auth.device-BndOUjse.js} +1 -1
- package/dist/client/_coffre/assets/auth.device-CWHNQn9W.js +2 -0
- package/dist/client/_coffre/assets/directory-nDExpkAz.js +1 -0
- package/dist/client/_coffre/assets/dist-QVHMLatb.js +1 -0
- package/dist/client/_coffre/assets/globals-CKBoTlyH.css +1 -0
- package/dist/client/_coffre/assets/grants-CjoOnxzz.js +1 -0
- package/dist/client/_coffre/assets/icons-BQ27Ds9u.js +1 -0
- package/dist/client/_coffre/assets/index-CUGytaO3.js +12 -0
- package/dist/client/_coffre/assets/link-DP8SVWon.js +1 -0
- package/dist/client/_coffre/assets/login-CeaxDMcr.js +2 -0
- package/dist/client/_coffre/assets/login-DrMgvqZn.js +1 -0
- package/dist/client/_coffre/assets/offboarding-CNr_1tnl.js +1 -0
- package/dist/client/_coffre/assets/page-CGmvjSy4.js +1 -0
- package/dist/client/_coffre/assets/preload-helper-ClBkJ19f.js +1 -0
- package/dist/client/_coffre/assets/principal-page-DNLb_q_e.js +1 -0
- package/dist/client/_coffre/assets/projects._project._environment-CHzbboGp.js +3 -0
- package/dist/client/_coffre/assets/projects._project._environment-DDxu_HHD.js +2 -0
- package/dist/client/_coffre/assets/projects._project.index-CIAsjvg6.js +2 -0
- package/dist/client/_coffre/assets/projects._project.index-DZ9l6d-1.js +1 -0
- package/dist/client/_coffre/assets/projects.index-4eUXreE_.js +1 -0
- package/dist/client/_coffre/assets/row-state-ByET1OKX.js +1 -0
- package/dist/client/_coffre/assets/settings-D2zp1Ssu.js +1 -0
- package/dist/client/_coffre/assets/suspense-C7KwSnTG.js +1 -0
- package/dist/client/_coffre/assets/tokens._token-DWmbqzNk.js +2 -0
- package/dist/client/_coffre/assets/tokens._token-Dui_4KfS.js +1 -0
- package/dist/client/_coffre/assets/tokens.index-CSi5Wxwf.js +1 -0
- package/dist/client/_coffre/assets/ui-BdipqGpP.js +46 -0
- package/dist/client/_coffre/assets/unregistered-CA7B4C1m.js +1 -0
- package/dist/client/_coffre/assets/use-action-DRm9yVhV.js +1 -0
- package/dist/client/_coffre/assets/use-change-BRRMJocl.js +1 -0
- package/dist/client/_coffre/assets/use-shell-BMGlJ25Q.js +1 -0
- package/dist/client/_coffre/assets/useQuery-D__2KBOs.js +1 -0
- package/dist/client/_coffre/assets/useSuspenseQuery-CSXyDALB.js +1 -0
- package/dist/client/_coffre/assets/users._user-BkNrX7Qf.js +1 -0
- package/dist/client/_coffre/assets/users._user-jbSvtdOg.js +2 -0
- package/dist/client/_coffre/assets/users.index-CKnQ1G76.js +1 -0
- package/dist/server/.vite/manifest.json +343 -246
- package/dist/server/_coffre/assets/_tanstack-start-manifest_v-Dx-c3XVk.js +162 -0
- package/dist/server/_coffre/assets/{account-CZgVVZTf.js → account-BocTPU1J.js} +150 -117
- package/dist/server/_coffre/assets/{account-D7-ZAE2T.js → account-CL8hOGhO.js} +10 -24
- package/dist/server/_coffre/assets/{affordances-BNaXjMOb.js → affordances-CKANXDTG.js} +2 -22
- package/dist/server/_coffre/assets/{async-local-storage-C0cwgkEr.js → async-local-storage-C10uQtMM.js} +3 -2
- package/dist/server/_coffre/assets/{audit-BEbhtsEp.js → audit-Bcka4vA6.js} +46 -16
- package/dist/server/_coffre/assets/audit-CSRQYIhu.js +31 -0
- package/dist/server/_coffre/assets/{auth.device-w9N3FlNk.js → auth.device-CMcUISZY.js} +7 -5
- package/dist/server/_coffre/assets/{auth.device-CMR3csAI.js → auth.device-DqO0T-rU.js} +5 -5
- package/dist/server/_coffre/assets/{directory-Dr5X9TB5.js → directory-CyYx6Jx1.js} +87 -112
- package/dist/server/_coffre/assets/{use-action-DQUmeH-5.js → dist-CnnV3t2g.js} +3 -48
- package/dist/server/_coffre/assets/globals-CKBoTlyH.css +1 -0
- package/dist/server/_coffre/assets/grants-CRijabX0.js +158 -0
- package/dist/server/_coffre/assets/{page-BdnhpwvH.js → icons-Dy-5ccDF.js} +3 -196
- package/dist/server/_coffre/assets/lazyRouteComponent-CqBNCGuZ.js +480 -0
- package/dist/server/_coffre/assets/link-42ZWdjzZ.js +422 -0
- package/dist/server/_coffre/assets/{login-DUtCQju5.js → login-BI9tzJEy.js} +7 -5
- package/dist/server/_coffre/assets/{login-B2njIq_o.js → login-C-v88YwP.js} +2 -2
- package/dist/server/_coffre/assets/matchContext-qLfYbC6_.js +56 -0
- package/dist/server/_coffre/assets/{offboarding-DY5MarpG.js → offboarding-1H0LavTd.js} +6 -4
- package/dist/server/_coffre/assets/page-D_mO0-sn.js +3592 -0
- package/dist/server/_coffre/assets/{principal-page-SdG8_zcu.js → principal-page-DQDoXute.js} +51 -42
- package/dist/server/_coffre/assets/{projects._project._environment-CUS0VFUe.js → projects._project._environment-C-yVwC92.js} +168 -248
- package/dist/server/_coffre/assets/{projects._project._environment-BQIrmE3r.js → projects._project._environment-D_5R40of.js} +4 -11
- package/dist/server/_coffre/assets/{projects._project.index-D1NxvBtZ.js → projects._project.index-A2BImFIT.js} +134 -96
- package/dist/server/_coffre/assets/{projects._project.index-BjNdR4KC.js → projects._project.index-BPPKxKrt.js} +5 -4
- package/dist/server/_coffre/assets/{projects.index-BQDuuh6t.js → projects.index-543IsPzY.js} +62 -54
- package/dist/server/_coffre/assets/{react-dom-qCTiwGGR.js → react-dom-bBoJXlK2.js} +417 -51
- package/dist/server/_coffre/assets/{router-BUwZOXEH.js → router-CM3vK8QO.js} +376 -92
- package/dist/server/_coffre/assets/row-state-XBtDoIA4.js +117 -0
- package/dist/server/_coffre/assets/{settings-HOErM3pd.js → settings-BLVU74ym.js} +8 -6
- package/dist/server/_coffre/assets/suspense-CzYTwxOj.js +602 -0
- package/dist/server/_coffre/assets/tokens._token-B-hBgwBW.js +10 -0
- package/dist/server/_coffre/assets/{tokens._token-BZUArbzi.js → tokens._token-aubAUonP.js} +97 -79
- package/dist/server/_coffre/assets/{tokens.index-BReCgoV9.js → tokens.index-4D3jwp5v.js} +9 -6
- package/dist/server/_coffre/assets/{ui-D_slKpSF.js → ui-BI3Bf72q.js} +7 -836
- package/dist/server/_coffre/assets/{unregistered-Z17da4Rc.js → unregistered-CagDxMyw.js} +5 -3
- package/dist/server/_coffre/assets/use-action-tzBZvjjQ.js +47 -0
- package/dist/server/_coffre/assets/use-change-Dggqxy5y.js +1212 -0
- package/dist/server/_coffre/assets/use-shell-CwStDfzX.js +462 -0
- package/dist/server/_coffre/assets/useQuery-C6_dBjem.js +8 -0
- package/dist/server/_coffre/assets/{useStore-DWGPqzXR.js → useRouter-CaUSUNsw.js} +1 -420
- package/dist/server/_coffre/assets/useSuspenseQuery-BuapQt_P.js +117 -0
- package/dist/server/_coffre/assets/{users._user-DHTNhQ9o.js → users._user-137WNyxn.js} +4 -5
- package/dist/server/_coffre/assets/users._user-C252Iilj.js +10 -0
- package/dist/server/_coffre/assets/{users.index-Cfo3ODpX.js → users.index-DQHsfnal.js} +9 -6
- package/dist/server/index.js +6 -5
- package/package.json +5 -3
- package/src/components/directory.tsx +75 -104
- package/src/components/grants.tsx +60 -112
- package/src/components/principal-page.tsx +54 -67
- package/src/components/principal-picker.tsx +7 -16
- package/src/components/row-state.tsx +95 -0
- package/src/components/service-tokens.tsx +75 -64
- package/src/components/shell.tsx +1 -1
- package/src/components/syncs.tsx +42 -26
- package/src/lib/announce.ts +36 -0
- package/src/lib/changes.ts +498 -0
- package/src/lib/coffre.ts +3 -2
- package/src/lib/optimistic.ts +233 -0
- package/src/lib/queries.ts +393 -0
- package/src/lib/use-action.ts +20 -15
- package/src/lib/use-change.ts +42 -0
- package/src/lib/use-shell.ts +17 -0
- package/src/router.tsx +17 -9
- package/src/routes/__root.tsx +8 -38
- package/src/routes/account.tsx +163 -154
- package/src/routes/audit.tsx +51 -72
- package/src/routes/auth.device.tsx +4 -2
- package/src/routes/login.tsx +3 -2
- package/src/routes/projects.$project.$environment.tsx +226 -231
- package/src/routes/projects.$project.index.tsx +136 -118
- package/src/routes/projects.index.tsx +125 -145
- package/src/routes/settings.tsx +7 -7
- package/src/routes/tokens.$token.tsx +14 -17
- package/src/routes/tokens.index.tsx +8 -4
- package/src/routes/unregistered.tsx +3 -2
- package/src/routes/users.$user.tsx +4 -4
- package/src/routes/users.index.tsx +8 -4
- package/src/styles/globals.css +78 -1
- package/dist/client/_coffre/assets/account-C3rBPdu6.js +0 -2
- package/dist/client/_coffre/assets/account-J194gi6l.js +0 -1
- package/dist/client/_coffre/assets/affordances-CmoY-8Xf.js +0 -1
- package/dist/client/_coffre/assets/audit-BtI9em7Q.js +0 -2
- package/dist/client/_coffre/assets/audit-jURfT8Km.js +0 -1
- package/dist/client/_coffre/assets/auth.device-viDUwZRT.js +0 -2
- package/dist/client/_coffre/assets/coffre-CXkp3Efg.js +0 -1
- package/dist/client/_coffre/assets/directory-PEjdb8PS.js +0 -1
- package/dist/client/_coffre/assets/globals-Bh2x1gBM.css +0 -1
- package/dist/client/_coffre/assets/grants-4mSkXPU4.js +0 -1
- package/dist/client/_coffre/assets/index-CD7bvUCb.js +0 -12
- package/dist/client/_coffre/assets/login-C-wTm_t1.js +0 -2
- package/dist/client/_coffre/assets/login-CLLv1om9.js +0 -1
- package/dist/client/_coffre/assets/offboarding-DQ-56W0H.js +0 -1
- package/dist/client/_coffre/assets/page-DbSS7pYH.js +0 -1
- package/dist/client/_coffre/assets/preload-helper-DduCCcmc.js +0 -46
- package/dist/client/_coffre/assets/principal-page-DjH1cUyz.js +0 -1
- package/dist/client/_coffre/assets/projects._project._environment-BZnNvENc.js +0 -3
- package/dist/client/_coffre/assets/projects._project._environment-CLUpTvi-.js +0 -2
- package/dist/client/_coffre/assets/projects._project.index-CWXRo307.js +0 -2
- package/dist/client/_coffre/assets/projects._project.index-Dzgf95zv.js +0 -1
- package/dist/client/_coffre/assets/projects.index-BG8W91BX.js +0 -2
- package/dist/client/_coffre/assets/projects.index-N_kCFBMq.js +0 -1
- package/dist/client/_coffre/assets/settings-CNIY0--5.js +0 -1
- package/dist/client/_coffre/assets/settings-EimGqlQL.js +0 -2
- package/dist/client/_coffre/assets/tokens._token-CkU4dCwo.js +0 -1
- package/dist/client/_coffre/assets/tokens._token-Df2R8TF_.js +0 -2
- package/dist/client/_coffre/assets/tokens.index-CSf5Mlz8.js +0 -2
- package/dist/client/_coffre/assets/tokens.index-DtiWrKVq.js +0 -1
- package/dist/client/_coffre/assets/unregistered-D5go1AfR.js +0 -1
- package/dist/client/_coffre/assets/use-action-CUvWPRTx.js +0 -1
- package/dist/client/_coffre/assets/users._user-CImGVpYj.js +0 -1
- package/dist/client/_coffre/assets/users._user-D0JK911L.js +0 -2
- package/dist/client/_coffre/assets/users.index-B-7o0KBD.js +0 -1
- package/dist/client/_coffre/assets/users.index-BoFWF3mF.js +0 -2
- package/dist/server/_coffre/assets/_tanstack-start-manifest_v-CrnrBINO.js +0 -133
- package/dist/server/_coffre/assets/audit-wjpo1BWg.js +0 -74
- package/dist/server/_coffre/assets/coffre-DMs96kfX.js +0 -280
- package/dist/server/_coffre/assets/globals-Bh2x1gBM.css +0 -1
- package/dist/server/_coffre/assets/grants-C6UmWE8b.js +0 -243
- package/dist/server/_coffre/assets/projects.index-ha7jO4nC.js +0 -54
- package/dist/server/_coffre/assets/settings-Cy__khNA.js +0 -18
- package/dist/server/_coffre/assets/tokens._token-CmpmtfB_.js +0 -18
- package/dist/server/_coffre/assets/tokens.index-B5-4dD4C.js +0 -10
- package/dist/server/_coffre/assets/users._user-BKdSQhIg.js +0 -10
- package/dist/server/_coffre/assets/users.index-dMn0tlmc.js +0 -10
|
@@ -411,267 +411,6 @@ var require_react = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
411
411
|
module.exports = require_react_production();
|
|
412
412
|
}));
|
|
413
413
|
//#endregion
|
|
414
|
-
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/utils.js
|
|
415
|
-
/**
|
|
416
|
-
* Return the last element of an array.
|
|
417
|
-
* Intended for non-empty arrays used within router internals.
|
|
418
|
-
*/
|
|
419
|
-
function last(arr) {
|
|
420
|
-
return arr[arr.length - 1];
|
|
421
|
-
}
|
|
422
|
-
function isFunction(d) {
|
|
423
|
-
return typeof d === "function";
|
|
424
|
-
}
|
|
425
|
-
/**
|
|
426
|
-
* Apply a value-or-updater to a previous value.
|
|
427
|
-
* Accepts either a literal value or a function of the previous value.
|
|
428
|
-
*/
|
|
429
|
-
function functionalUpdate(updater, previous) {
|
|
430
|
-
if (isFunction(updater)) return updater(previous);
|
|
431
|
-
return updater;
|
|
432
|
-
}
|
|
433
|
-
var hasOwn = Object.prototype.hasOwnProperty;
|
|
434
|
-
function hasKeys(obj) {
|
|
435
|
-
for (const key in obj) if (hasOwn.call(obj, key)) return true;
|
|
436
|
-
return false;
|
|
437
|
-
}
|
|
438
|
-
var createNull = () => Object.create(null);
|
|
439
|
-
var nullReplaceEqualDeep = (prev, next) => replaceEqualDeep(prev, next, createNull);
|
|
440
|
-
/**
|
|
441
|
-
* This function returns `prev` if `_next` is deeply equal.
|
|
442
|
-
* If not, it will replace any deeply equal children of `b` with those of `a`.
|
|
443
|
-
* This can be used for structural sharing between immutable JSON values for example.
|
|
444
|
-
* Do not use this with signals
|
|
445
|
-
*/
|
|
446
|
-
function replaceEqualDeep(prev, _next, _makeObj = () => ({}), _depth = 0) {
|
|
447
|
-
return _next;
|
|
448
|
-
}
|
|
449
|
-
function isPlainObject(o) {
|
|
450
|
-
if (!hasObjectPrototype(o)) return false;
|
|
451
|
-
const ctor = o.constructor;
|
|
452
|
-
if (typeof ctor === "undefined") return true;
|
|
453
|
-
const prot = ctor.prototype;
|
|
454
|
-
if (!hasObjectPrototype(prot)) return false;
|
|
455
|
-
if (!prot.hasOwnProperty("isPrototypeOf")) return false;
|
|
456
|
-
return true;
|
|
457
|
-
}
|
|
458
|
-
function hasObjectPrototype(o) {
|
|
459
|
-
return Object.prototype.toString.call(o) === "[object Object]";
|
|
460
|
-
}
|
|
461
|
-
/**
|
|
462
|
-
* Perform a deep equality check with options for partial comparison and
|
|
463
|
-
* ignoring `undefined` values. Optimized for router state comparisons.
|
|
464
|
-
*/
|
|
465
|
-
function deepEqual(a, b, opts) {
|
|
466
|
-
if (a === b) return true;
|
|
467
|
-
if (typeof a !== typeof b) return false;
|
|
468
|
-
if (Array.isArray(a) && Array.isArray(b)) {
|
|
469
|
-
if (a.length !== b.length) return false;
|
|
470
|
-
for (let i = 0, l = a.length; i < l; i++) if (!deepEqual(a[i], b[i], opts)) return false;
|
|
471
|
-
return true;
|
|
472
|
-
}
|
|
473
|
-
if (isPlainObject(a) && isPlainObject(b)) {
|
|
474
|
-
const ignoreUndefined = opts?.ignoreUndefined ?? true;
|
|
475
|
-
if (opts?.partial) {
|
|
476
|
-
for (const k in b) if (!ignoreUndefined || b[k] !== void 0) {
|
|
477
|
-
if (!deepEqual(a[k], b[k], opts)) return false;
|
|
478
|
-
}
|
|
479
|
-
return true;
|
|
480
|
-
}
|
|
481
|
-
let aCount = 0;
|
|
482
|
-
if (!ignoreUndefined) aCount = Object.keys(a).length;
|
|
483
|
-
else for (const k in a) if (a[k] !== void 0) aCount++;
|
|
484
|
-
let bCount = 0;
|
|
485
|
-
for (const k in b) if (!ignoreUndefined || b[k] !== void 0) {
|
|
486
|
-
bCount++;
|
|
487
|
-
if (bCount > aCount || !deepEqual(a[k], b[k], opts)) return false;
|
|
488
|
-
}
|
|
489
|
-
return aCount === bCount;
|
|
490
|
-
}
|
|
491
|
-
return false;
|
|
492
|
-
}
|
|
493
|
-
/**
|
|
494
|
-
* Create a promise with exposed resolve/reject and status fields.
|
|
495
|
-
* Useful for coordinating async router lifecycle operations.
|
|
496
|
-
*/
|
|
497
|
-
function createControlledPromise(onResolve) {
|
|
498
|
-
let resolveLoadPromise;
|
|
499
|
-
let rejectLoadPromise;
|
|
500
|
-
const controlledPromise = new Promise((resolve, reject) => {
|
|
501
|
-
resolveLoadPromise = resolve;
|
|
502
|
-
rejectLoadPromise = reject;
|
|
503
|
-
});
|
|
504
|
-
controlledPromise.status = "pending";
|
|
505
|
-
controlledPromise.resolve = (value) => {
|
|
506
|
-
controlledPromise.status = "resolved";
|
|
507
|
-
controlledPromise.value = value;
|
|
508
|
-
resolveLoadPromise(value);
|
|
509
|
-
onResolve?.(value);
|
|
510
|
-
};
|
|
511
|
-
controlledPromise.reject = (e) => {
|
|
512
|
-
controlledPromise.status = "rejected";
|
|
513
|
-
rejectLoadPromise(e);
|
|
514
|
-
};
|
|
515
|
-
return controlledPromise;
|
|
516
|
-
}
|
|
517
|
-
/**
|
|
518
|
-
* Heuristically detect dynamic import "module not found" errors
|
|
519
|
-
* across major browsers for lazy route component handling.
|
|
520
|
-
*/
|
|
521
|
-
function isModuleNotFoundError(error) {
|
|
522
|
-
if (typeof error?.message !== "string") return false;
|
|
523
|
-
return error.message.startsWith("Failed to fetch dynamically imported module") || error.message.startsWith("error loading dynamically imported module") || error.message.startsWith("Importing a module script failed");
|
|
524
|
-
}
|
|
525
|
-
function isPromise(value) {
|
|
526
|
-
return Boolean(value && typeof value === "object" && typeof value.then === "function");
|
|
527
|
-
}
|
|
528
|
-
/**
|
|
529
|
-
* Re-encode characters that are unsafe in URL paths.
|
|
530
|
-
* Includes ASCII control characters (0x00-0x1F, 0x7F) and a subset of the
|
|
531
|
-
* WHATWG URL "path percent-encode set" (", <, >, `, {, }).
|
|
532
|
-
*
|
|
533
|
-
* Space (0x20) is intentionally excluded — decodeURI decodes %20 to space
|
|
534
|
-
* and the router stores decoded spaces in location.pathname. The existing
|
|
535
|
-
* encodePathLikeUrl already handles re-encoding spaces for outgoing URLs.
|
|
536
|
-
*
|
|
537
|
-
* These characters are decoded by decodeURI but must remain percent-encoded
|
|
538
|
-
* in paths to match how upstream layers (CDNs, edge middleware, browsers)
|
|
539
|
-
* interpret the URL, preventing infinite redirect loops and path mismatches.
|
|
540
|
-
*/
|
|
541
|
-
var PATH_UNSAFE_RE = /[\x00-\x1f\x7f"<>`{}]/g;
|
|
542
|
-
function sanitizePathSegment(segment) {
|
|
543
|
-
return segment.replace(PATH_UNSAFE_RE, (ch) => "%" + ch.charCodeAt(0).toString(16).toUpperCase().padStart(2, "0"));
|
|
544
|
-
}
|
|
545
|
-
function decodeSegment(segment) {
|
|
546
|
-
let decoded;
|
|
547
|
-
try {
|
|
548
|
-
decoded = decodeURI(segment);
|
|
549
|
-
} catch {
|
|
550
|
-
decoded = segment.replaceAll(/%[0-9A-F]{2}/gi, (match) => {
|
|
551
|
-
try {
|
|
552
|
-
return decodeURI(match);
|
|
553
|
-
} catch {
|
|
554
|
-
return match;
|
|
555
|
-
}
|
|
556
|
-
});
|
|
557
|
-
}
|
|
558
|
-
return sanitizePathSegment(decoded);
|
|
559
|
-
}
|
|
560
|
-
/**
|
|
561
|
-
* Default list of URL protocols to allow in links, redirects, and navigation.
|
|
562
|
-
* Any absolute URL protocol not in this list is treated as dangerous by default.
|
|
563
|
-
*/
|
|
564
|
-
var DEFAULT_PROTOCOL_ALLOWLIST = [
|
|
565
|
-
"http:",
|
|
566
|
-
"https:",
|
|
567
|
-
"mailto:",
|
|
568
|
-
"tel:"
|
|
569
|
-
];
|
|
570
|
-
/**
|
|
571
|
-
* Check if a URL string uses a protocol that is not in the allowlist.
|
|
572
|
-
* Returns true for blocked protocols like javascript:, blob:, data:, etc.
|
|
573
|
-
*
|
|
574
|
-
* The URL constructor correctly normalizes:
|
|
575
|
-
* - Mixed case (JavaScript: → javascript:)
|
|
576
|
-
* - Whitespace/control characters (java\nscript: → javascript:)
|
|
577
|
-
* - Leading whitespace
|
|
578
|
-
*
|
|
579
|
-
* For relative URLs (no protocol), returns false (safe).
|
|
580
|
-
*
|
|
581
|
-
* @param url - The URL string to check
|
|
582
|
-
* @param allowlist - Set of protocols to allow
|
|
583
|
-
* @returns true if the URL uses a protocol that is not allowed
|
|
584
|
-
*/
|
|
585
|
-
function isDangerousProtocol(url, allowlist) {
|
|
586
|
-
if (!url) return false;
|
|
587
|
-
try {
|
|
588
|
-
const parsed = new URL(url);
|
|
589
|
-
return !allowlist.has(parsed.protocol);
|
|
590
|
-
} catch {
|
|
591
|
-
return false;
|
|
592
|
-
}
|
|
593
|
-
}
|
|
594
|
-
var HTML_ESCAPE_LOOKUP = {
|
|
595
|
-
"&": "\\u0026",
|
|
596
|
-
">": "\\u003e",
|
|
597
|
-
"<": "\\u003c",
|
|
598
|
-
"\u2028": "\\u2028",
|
|
599
|
-
"\u2029": "\\u2029"
|
|
600
|
-
};
|
|
601
|
-
var HTML_ESCAPE_REGEX = /[&><\u2028\u2029]/g;
|
|
602
|
-
/**
|
|
603
|
-
* Escape HTML special characters in a string to prevent XSS attacks
|
|
604
|
-
* when embedding strings in script tags during SSR.
|
|
605
|
-
*
|
|
606
|
-
* This is essential for preventing XSS vulnerabilities when user-controlled
|
|
607
|
-
* content is embedded in inline scripts.
|
|
608
|
-
*/
|
|
609
|
-
function escapeHtml(str) {
|
|
610
|
-
return str.replace(HTML_ESCAPE_REGEX, (match) => HTML_ESCAPE_LOOKUP[match]);
|
|
611
|
-
}
|
|
612
|
-
function decodePath(path) {
|
|
613
|
-
if (!path) return {
|
|
614
|
-
path,
|
|
615
|
-
handledProtocolRelativeURL: false
|
|
616
|
-
};
|
|
617
|
-
if (!/[%\\\x00-\x1f\x7f]/.test(path) && !path.startsWith("//")) return {
|
|
618
|
-
path,
|
|
619
|
-
handledProtocolRelativeURL: false
|
|
620
|
-
};
|
|
621
|
-
const re = /%25|%5C/gi;
|
|
622
|
-
let cursor = 0;
|
|
623
|
-
let result = "";
|
|
624
|
-
let match;
|
|
625
|
-
while (null !== (match = re.exec(path))) {
|
|
626
|
-
result += decodeSegment(path.slice(cursor, match.index)) + match[0];
|
|
627
|
-
cursor = re.lastIndex;
|
|
628
|
-
}
|
|
629
|
-
result = result + decodeSegment(cursor ? path.slice(cursor) : path);
|
|
630
|
-
let handledProtocolRelativeURL = false;
|
|
631
|
-
if (result.startsWith("//")) {
|
|
632
|
-
handledProtocolRelativeURL = true;
|
|
633
|
-
result = "/" + result.replace(/^\/+/, "");
|
|
634
|
-
}
|
|
635
|
-
return {
|
|
636
|
-
path: result,
|
|
637
|
-
handledProtocolRelativeURL
|
|
638
|
-
};
|
|
639
|
-
}
|
|
640
|
-
/**
|
|
641
|
-
* Encodes a path the same way `new URL()` would, but without the overhead of full URL parsing.
|
|
642
|
-
*
|
|
643
|
-
* This function encodes:
|
|
644
|
-
* - Whitespace characters (spaces → %20, tabs → %09, etc.)
|
|
645
|
-
* - Non-ASCII/Unicode characters (emojis, accented characters, etc.)
|
|
646
|
-
*
|
|
647
|
-
* It preserves:
|
|
648
|
-
* - Already percent-encoded sequences (won't double-encode %2F, %25, etc.)
|
|
649
|
-
* - ASCII special characters valid in URL paths (@, $, &, +, etc.)
|
|
650
|
-
* - Forward slashes as path separators
|
|
651
|
-
*
|
|
652
|
-
* Used to generate proper href values for SSR without constructing URL objects.
|
|
653
|
-
*
|
|
654
|
-
* @example
|
|
655
|
-
* encodePathLikeUrl('/path/file name.pdf') // '/path/file%20name.pdf'
|
|
656
|
-
* encodePathLikeUrl('/path/日本語') // '/path/%E6%97%A5%E6%9C%AC%E8%AA%9E'
|
|
657
|
-
* encodePathLikeUrl('/path/already%20encoded') // '/path/already%20encoded' (preserved)
|
|
658
|
-
*/
|
|
659
|
-
function encodePathLikeUrl(path) {
|
|
660
|
-
if (!/\s|[^\u0000-\u007F]/.test(path)) return path;
|
|
661
|
-
return path.replace(/\s|[^\u0000-\u007F]/gu, encodeURIComponent);
|
|
662
|
-
}
|
|
663
|
-
function arraysEqual(a, b) {
|
|
664
|
-
if (a === b) return true;
|
|
665
|
-
if (a.length !== b.length) return false;
|
|
666
|
-
for (let i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;
|
|
667
|
-
return true;
|
|
668
|
-
}
|
|
669
|
-
//#endregion
|
|
670
|
-
//#region ../../node_modules/.pnpm/@tanstack+router-core@1.171.15/node_modules/@tanstack/router-core/dist/esm/invariant.js
|
|
671
|
-
function invariant() {
|
|
672
|
-
throw new Error("Invariant failed");
|
|
673
|
-
}
|
|
674
|
-
//#endregion
|
|
675
414
|
//#region ../../node_modules/.pnpm/react@19.2.7/node_modules/react/cjs/react-jsx-runtime.production.js
|
|
676
415
|
/**
|
|
677
416
|
* @license React
|
|
@@ -731,162 +470,4 @@ function useRouter(opts) {
|
|
|
731
470
|
return import_react.useContext(routerContext);
|
|
732
471
|
}
|
|
733
472
|
//#endregion
|
|
734
|
-
|
|
735
|
-
var matchContext = import_react.createContext(void 0);
|
|
736
|
-
var dummyMatchContext = import_react.createContext(void 0);
|
|
737
|
-
//#endregion
|
|
738
|
-
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.7/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
|
|
739
|
-
/**
|
|
740
|
-
* @license React
|
|
741
|
-
* use-sync-external-store-shim.production.js
|
|
742
|
-
*
|
|
743
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
744
|
-
*
|
|
745
|
-
* This source code is licensed under the MIT license found in the
|
|
746
|
-
* LICENSE file in the root directory of this source tree.
|
|
747
|
-
*/
|
|
748
|
-
var require_use_sync_external_store_shim_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
749
|
-
var React = require_react();
|
|
750
|
-
function is(x, y) {
|
|
751
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
752
|
-
}
|
|
753
|
-
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
754
|
-
var useState = React.useState;
|
|
755
|
-
var useEffect = React.useEffect;
|
|
756
|
-
var useLayoutEffect = React.useLayoutEffect;
|
|
757
|
-
var useDebugValue = React.useDebugValue;
|
|
758
|
-
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
759
|
-
var value = getSnapshot(), _useState = useState({ inst: {
|
|
760
|
-
value,
|
|
761
|
-
getSnapshot
|
|
762
|
-
} }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
763
|
-
useLayoutEffect(function() {
|
|
764
|
-
inst.value = value;
|
|
765
|
-
inst.getSnapshot = getSnapshot;
|
|
766
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
767
|
-
}, [
|
|
768
|
-
subscribe,
|
|
769
|
-
value,
|
|
770
|
-
getSnapshot
|
|
771
|
-
]);
|
|
772
|
-
useEffect(function() {
|
|
773
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
774
|
-
return subscribe(function() {
|
|
775
|
-
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
776
|
-
});
|
|
777
|
-
}, [subscribe]);
|
|
778
|
-
useDebugValue(value);
|
|
779
|
-
return value;
|
|
780
|
-
}
|
|
781
|
-
function checkIfSnapshotChanged(inst) {
|
|
782
|
-
var latestGetSnapshot = inst.getSnapshot;
|
|
783
|
-
inst = inst.value;
|
|
784
|
-
try {
|
|
785
|
-
var nextValue = latestGetSnapshot();
|
|
786
|
-
return !objectIs(inst, nextValue);
|
|
787
|
-
} catch (error) {
|
|
788
|
-
return !0;
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
792
|
-
return getSnapshot();
|
|
793
|
-
}
|
|
794
|
-
var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
795
|
-
exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
796
|
-
}));
|
|
797
|
-
//#endregion
|
|
798
|
-
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.7/node_modules/use-sync-external-store/shim/index.js
|
|
799
|
-
var require_shim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
800
|
-
module.exports = require_use_sync_external_store_shim_production();
|
|
801
|
-
}));
|
|
802
|
-
//#endregion
|
|
803
|
-
//#region ../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.7/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
|
|
804
|
-
/**
|
|
805
|
-
* @license React
|
|
806
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
807
|
-
*
|
|
808
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
809
|
-
*
|
|
810
|
-
* This source code is licensed under the MIT license found in the
|
|
811
|
-
* LICENSE file in the root directory of this source tree.
|
|
812
|
-
*/
|
|
813
|
-
var require_with_selector_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
814
|
-
var React = require_react();
|
|
815
|
-
var shim = require_shim();
|
|
816
|
-
function is(x, y) {
|
|
817
|
-
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
818
|
-
}
|
|
819
|
-
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
820
|
-
var useSyncExternalStore = shim.useSyncExternalStore;
|
|
821
|
-
var useRef = React.useRef;
|
|
822
|
-
var useEffect = React.useEffect;
|
|
823
|
-
var useMemo = React.useMemo;
|
|
824
|
-
var useDebugValue = React.useDebugValue;
|
|
825
|
-
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
826
|
-
var instRef = useRef(null);
|
|
827
|
-
if (null === instRef.current) {
|
|
828
|
-
var inst = {
|
|
829
|
-
hasValue: !1,
|
|
830
|
-
value: null
|
|
831
|
-
};
|
|
832
|
-
instRef.current = inst;
|
|
833
|
-
} else inst = instRef.current;
|
|
834
|
-
instRef = useMemo(function() {
|
|
835
|
-
function memoizedSelector(nextSnapshot) {
|
|
836
|
-
if (!hasMemo) {
|
|
837
|
-
hasMemo = !0;
|
|
838
|
-
memoizedSnapshot = nextSnapshot;
|
|
839
|
-
nextSnapshot = selector(nextSnapshot);
|
|
840
|
-
if (void 0 !== isEqual && inst.hasValue) {
|
|
841
|
-
var currentSelection = inst.value;
|
|
842
|
-
if (isEqual(currentSelection, nextSnapshot)) return memoizedSelection = currentSelection;
|
|
843
|
-
}
|
|
844
|
-
return memoizedSelection = nextSnapshot;
|
|
845
|
-
}
|
|
846
|
-
currentSelection = memoizedSelection;
|
|
847
|
-
if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
|
|
848
|
-
var nextSelection = selector(nextSnapshot);
|
|
849
|
-
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
850
|
-
memoizedSnapshot = nextSnapshot;
|
|
851
|
-
return memoizedSelection = nextSelection;
|
|
852
|
-
}
|
|
853
|
-
var hasMemo = !1, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
854
|
-
return [function() {
|
|
855
|
-
return memoizedSelector(getSnapshot());
|
|
856
|
-
}, null === maybeGetServerSnapshot ? void 0 : function() {
|
|
857
|
-
return memoizedSelector(maybeGetServerSnapshot());
|
|
858
|
-
}];
|
|
859
|
-
}, [
|
|
860
|
-
getSnapshot,
|
|
861
|
-
getServerSnapshot,
|
|
862
|
-
selector,
|
|
863
|
-
isEqual
|
|
864
|
-
]);
|
|
865
|
-
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
866
|
-
useEffect(function() {
|
|
867
|
-
inst.hasValue = !0;
|
|
868
|
-
inst.value = value;
|
|
869
|
-
}, [value]);
|
|
870
|
-
useDebugValue(value);
|
|
871
|
-
return value;
|
|
872
|
-
};
|
|
873
|
-
}));
|
|
874
|
-
//#endregion
|
|
875
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-store@0.9.3_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/@tanstack/react-store/dist/esm/useStore.js
|
|
876
|
-
var import_with_selector = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
877
|
-
module.exports = require_with_selector_production();
|
|
878
|
-
})))();
|
|
879
|
-
function defaultCompare(a, b) {
|
|
880
|
-
return a === b;
|
|
881
|
-
}
|
|
882
|
-
function useStore(atom, selector, compare = defaultCompare) {
|
|
883
|
-
const subscribe = (0, import_react.useCallback)((handleStoreChange) => {
|
|
884
|
-
if (!atom) return () => {};
|
|
885
|
-
const { unsubscribe } = atom.subscribe(handleStoreChange);
|
|
886
|
-
return unsubscribe;
|
|
887
|
-
}, [atom]);
|
|
888
|
-
const boundGetSnapshot = (0, import_react.useCallback)(() => atom?.get(), [atom]);
|
|
889
|
-
return (0, import_with_selector.useSyncExternalStoreWithSelector)(subscribe, boundGetSnapshot, boundGetSnapshot, selector, compare);
|
|
890
|
-
}
|
|
891
|
-
//#endregion
|
|
892
|
-
export { require_react as C, __toESM as E, replaceEqualDeep as S, __exportAll as T, isDangerousProtocol as _, routerContext as a, last as b, DEFAULT_PROTOCOL_ALLOWLIST as c, decodePath as d, deepEqual as f, hasKeys as g, functionalUpdate as h, useRouter as i, arraysEqual as l, escapeHtml as m, dummyMatchContext as n, require_jsx_runtime as o, encodePathLikeUrl as p, matchContext as r, invariant as s, useStore as t, createControlledPromise as u, isModuleNotFoundError as v, __commonJSMin as w, nullReplaceEqualDeep as x, isPromise as y };
|
|
473
|
+
export { __commonJSMin as a, require_react as i, routerContext as n, __exportAll as o, require_jsx_runtime as r, __toESM as s, useRouter as t };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { i as require_react, s as __toESM } from "./useRouter-CaUSUNsw.js";
|
|
2
|
+
import { D as notifyManager, N as noop } from "./page-D_mO0-sn.js";
|
|
3
|
+
import { a as ensurePreventErrorBoundaryRetry, c as useQueryErrorResetBoundary, f as useQueryClient, i as shouldSuspend, l as useIsRestoring, n as ensureSuspenseTimers, o as getHasError, r as fetchOptimistic, s as useClearResetErrorBoundary, t as defaultThrowOnError, u as QueryObserver } from "./suspense-CzYTwxOj.js";
|
|
4
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.2.7/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
5
|
+
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
6
|
+
function useBaseQuery(options, Observer, queryClient) {
|
|
7
|
+
const isRestoring = useIsRestoring();
|
|
8
|
+
const errorResetBoundary = useQueryErrorResetBoundary();
|
|
9
|
+
const client = useQueryClient(queryClient);
|
|
10
|
+
const defaultedOptions = client.defaultQueryOptions(options);
|
|
11
|
+
const query = client.getQueryCache().get(defaultedOptions.queryHash);
|
|
12
|
+
const subscribed = options.subscribed !== false;
|
|
13
|
+
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : subscribed ? "optimistic" : void 0;
|
|
14
|
+
ensureSuspenseTimers(defaultedOptions);
|
|
15
|
+
ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query);
|
|
16
|
+
useClearResetErrorBoundary(errorResetBoundary);
|
|
17
|
+
const [observer] = import_react.useState(() => new Observer(client, defaultedOptions));
|
|
18
|
+
const result = observer.getOptimisticResult(defaultedOptions);
|
|
19
|
+
const shouldSubscribe = !isRestoring && subscribed;
|
|
20
|
+
import_react.useSyncExternalStore(import_react.useCallback((onStoreChange) => {
|
|
21
|
+
const unsubscribe = shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop;
|
|
22
|
+
observer.updateResult();
|
|
23
|
+
return unsubscribe;
|
|
24
|
+
}, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
|
|
25
|
+
import_react.useEffect(() => {
|
|
26
|
+
observer.setOptions(defaultedOptions);
|
|
27
|
+
}, [defaultedOptions, observer]);
|
|
28
|
+
if (shouldSuspend(defaultedOptions, result)) throw fetchOptimistic(defaultedOptions, observer, errorResetBoundary);
|
|
29
|
+
if (getHasError({
|
|
30
|
+
result,
|
|
31
|
+
errorResetBoundary,
|
|
32
|
+
throwOnError: defaultedOptions.throwOnError,
|
|
33
|
+
query,
|
|
34
|
+
suspense: defaultedOptions.suspense
|
|
35
|
+
})) throw result.error;
|
|
36
|
+
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.103.1_react@19.2.7/node_modules/@tanstack/react-query/build/modern/useSuspenseQuery.js
|
|
40
|
+
/**
|
|
41
|
+
* The options for `useSuspenseQuery` are the same as for `useQuery`, except for `throwOnError`, `enabled`, and
|
|
42
|
+
* `placeholderData` — and `queryFn` may not be `skipToken`, since Suspense hooks can't render a "disabled" state.
|
|
43
|
+
*
|
|
44
|
+
* Caveat: cancellation does not work.
|
|
45
|
+
*
|
|
46
|
+
* @remarks Multiple `useSuspenseQuery` calls in the same component suspend serially, causing a request
|
|
47
|
+
* waterfall — each one blocks rendering until it resolves, so the next doesn't even start fetching until then.
|
|
48
|
+
* Use {@link useSuspenseQueries} instead when you have more than one suspenseful query in a component, so they
|
|
49
|
+
* fetch in parallel.
|
|
50
|
+
* @param options - The {@link UseSuspenseQueryOptions} to use — the same options as `useQuery`, minus the ones listed above.
|
|
51
|
+
* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will
|
|
52
|
+
* be used.
|
|
53
|
+
* @returns The same object as `useQuery`, except that `data` is guaranteed to be defined, `isPlaceholderData`
|
|
54
|
+
* is missing, and `status` is either `success` or `error` (with the derived flags set accordingly).
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* The query error is thrown if the fetch fails and no cached data exists yet, so an error boundary is
|
|
58
|
+
* required around `<Suspense>`. A failed background refetch instead continues to render the cached data.
|
|
59
|
+
* Use {@link QueryErrorResetBoundary} to let the user retry after such an error:
|
|
60
|
+
* ```tsx
|
|
61
|
+
* import { Suspense } from 'react'
|
|
62
|
+
* import { ErrorBoundary } from 'react-error-boundary'
|
|
63
|
+
* import { QueryErrorResetBoundary, useSuspenseQuery } from '@tanstack/react-query'
|
|
64
|
+
*
|
|
65
|
+
* function Posts() {
|
|
66
|
+
* // `data` is guaranteed to be defined here — no `isPending` check needed.
|
|
67
|
+
* const { data, isFetching } = useSuspenseQuery({
|
|
68
|
+
* queryKey: ['posts'],
|
|
69
|
+
* queryFn: fetchPosts,
|
|
70
|
+
* })
|
|
71
|
+
*
|
|
72
|
+
* return (
|
|
73
|
+
* <div>
|
|
74
|
+
* <h1>Posts {isFetching ? '(refreshing...)' : null}</h1>
|
|
75
|
+
* <ul>
|
|
76
|
+
* {data.map((post) => (
|
|
77
|
+
* <li key={post.id}>{post.title}</li>
|
|
78
|
+
* ))}
|
|
79
|
+
* </ul>
|
|
80
|
+
* </div>
|
|
81
|
+
* )
|
|
82
|
+
* }
|
|
83
|
+
*
|
|
84
|
+
* function App() {
|
|
85
|
+
* return (
|
|
86
|
+
* <QueryErrorResetBoundary>
|
|
87
|
+
* {({ reset }) => (
|
|
88
|
+
* <ErrorBoundary
|
|
89
|
+
* onReset={reset}
|
|
90
|
+
* fallbackRender={({ resetErrorBoundary }) => (
|
|
91
|
+
* <div>
|
|
92
|
+
* There was an error!
|
|
93
|
+
* <button onClick={() => resetErrorBoundary()}>Try again</button>
|
|
94
|
+
* </div>
|
|
95
|
+
* )}
|
|
96
|
+
* >
|
|
97
|
+
* <Suspense fallback={<h1>Loading posts...</h1>}>
|
|
98
|
+
* <Posts />
|
|
99
|
+
* </Suspense>
|
|
100
|
+
* </ErrorBoundary>
|
|
101
|
+
* )}
|
|
102
|
+
* </QueryErrorResetBoundary>
|
|
103
|
+
* )
|
|
104
|
+
* }
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
function useSuspenseQuery(options, queryClient) {
|
|
108
|
+
return useBaseQuery({
|
|
109
|
+
...options,
|
|
110
|
+
enabled: true,
|
|
111
|
+
suspense: true,
|
|
112
|
+
throwOnError: defaultThrowOnError,
|
|
113
|
+
placeholderData: void 0
|
|
114
|
+
}, QueryObserver, queryClient);
|
|
115
|
+
}
|
|
116
|
+
//#endregion
|
|
117
|
+
export { useBaseQuery as n, useSuspenseQuery as t };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as
|
|
3
|
-
import { t as
|
|
1
|
+
import { r as require_jsx_runtime } from "./useRouter-CaUSUNsw.js";
|
|
2
|
+
import { t as Route } from "./users._user-C252Iilj.js";
|
|
3
|
+
import { t as PrincipalPage } from "./principal-page-DQDoXute.js";
|
|
4
4
|
//#region src/routes/users.$user.tsx?tsr-split=component
|
|
5
5
|
var import_jsx_runtime = require_jsx_runtime();
|
|
6
6
|
function UserPage() {
|
|
7
7
|
const { user } = Route.useParams();
|
|
8
8
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PrincipalPage, {
|
|
9
9
|
principalType: "user",
|
|
10
|
-
principalId: user
|
|
11
|
-
data: Route.useLoaderData()
|
|
10
|
+
principalId: user
|
|
12
11
|
});
|
|
13
12
|
}
|
|
14
13
|
//#endregion
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { n as createFileRoute, t as lazyRouteComponent } from "./lazyRouteComponent-CqBNCGuZ.js";
|
|
2
|
+
import { u as loadPrincipal } from "./page-D_mO0-sn.js";
|
|
3
|
+
//#region src/routes/users.$user.tsx
|
|
4
|
+
var $$splitComponentImporter = () => import("./users._user-137WNyxn.js");
|
|
5
|
+
var Route = createFileRoute("/users/$user")({
|
|
6
|
+
loader: ({ context: { client, queryClient }, params }) => loadPrincipal(queryClient, client, "user", params.user),
|
|
7
|
+
component: lazyRouteComponent($$splitComponentImporter, "component")
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Route as t };
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { r as require_jsx_runtime } from "./useRouter-CaUSUNsw.js";
|
|
2
|
+
import { C as useCoffre, h as queries, i as PageHeader, n as ClosedDoor } from "./page-D_mO0-sn.js";
|
|
3
|
+
import { t as useShell } from "./use-shell-CwStDfzX.js";
|
|
4
|
+
import { t as useSuspenseQuery } from "./useSuspenseQuery-BuapQt_P.js";
|
|
5
|
+
import { q as Users } from "./icons-Dy-5ccDF.js";
|
|
6
|
+
import { n as DirectoryTable, t as AddPrincipal } from "./directory-CyYx6Jx1.js";
|
|
7
|
+
import { n as RemovedList } from "./offboarding-1H0LavTd.js";
|
|
6
8
|
//#region src/routes/users.index.tsx?tsr-split=component
|
|
7
9
|
var import_jsx_runtime = require_jsx_runtime();
|
|
8
10
|
function UsersPage() {
|
|
9
|
-
const
|
|
11
|
+
const { capabilities } = useShell();
|
|
12
|
+
const { data: result } = useSuspenseQuery(queries.directory(useCoffre(), capabilities.canManageGrants));
|
|
10
13
|
if (!result.ok) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ClosedDoor, {
|
|
11
14
|
icon: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Users, { size: 18 }),
|
|
12
15
|
label: "Users",
|
package/dist/server/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { T as isNotFound, _ as resolveManifestAssetLink, a as SafeFragment, f as createInlineCssPlaceholderAsset, g as getStylesheetHref, h as getScriptPreloadAttrs, l as CatchBoundary, n as runWithStartContext, p as createInlineCssStyleAsset, r as Match, t as getStartContext, u as ErrorComponent, v as resolveManifestCssLink, w as executeRewriteInput, x as createMemoryHistory } from "./_coffre/assets/async-local-storage-
|
|
1
|
+
import { a as __commonJSMin, i as require_react, n as routerContext, r as require_jsx_runtime, s as __toESM, t as useRouter } from "./_coffre/assets/useRouter-CaUSUNsw.js";
|
|
2
|
+
import { E as decodePath, S as invariant, j as hasKeys, t as require_react_dom, x as createLRUCache } from "./_coffre/assets/react-dom-bBoJXlK2.js";
|
|
3
|
+
import { T as isNotFound, _ as resolveManifestAssetLink, a as SafeFragment, f as createInlineCssPlaceholderAsset, g as getStylesheetHref, h as getScriptPreloadAttrs, l as CatchBoundary, n as runWithStartContext, p as createInlineCssStyleAsset, r as Match, t as getStartContext, u as ErrorComponent, v as resolveManifestCssLink, w as executeRewriteInput, x as createMemoryHistory } from "./_coffre/assets/async-local-storage-C10uQtMM.js";
|
|
4
|
+
import { i as isResolvedRedirect, n as matchContext, o as rootRouteId, r as isRedirect } from "./_coffre/assets/matchContext-qLfYbC6_.js";
|
|
4
5
|
import { ReadableStream as ReadableStream$1 } from "node:stream/web";
|
|
5
6
|
import { PassThrough, Readable } from "node:stream";
|
|
6
7
|
import { AsyncLocalStorage as AsyncLocalStorage$1 } from "node:async_hooks";
|
|
@@ -12380,7 +12381,7 @@ var HEADERS = { TSS_SHELL: "X-TSS_SHELL" };
|
|
|
12380
12381
|
* the dev styles URL for route-scoped CSS collection.
|
|
12381
12382
|
*/
|
|
12382
12383
|
async function getStartManifest(matchedRoutes) {
|
|
12383
|
-
const { tsrStartManifest } = await import("./_coffre/assets/_tanstack-start-manifest_v-
|
|
12384
|
+
const { tsrStartManifest } = await import("./_coffre/assets/_tanstack-start-manifest_v-Dx-c3XVk.js");
|
|
12384
12385
|
const startManifest = tsrStartManifest();
|
|
12385
12386
|
let routes = startManifest.routes;
|
|
12386
12387
|
routes[rootRouteId];
|
|
@@ -13507,7 +13508,7 @@ var getBaseManifest = getProdBaseManifest;
|
|
|
13507
13508
|
var createEarlyHintsForRequest = createEarlyHintsCollector;
|
|
13508
13509
|
async function loadEntries() {
|
|
13509
13510
|
const [routerEntry, startEntry, pluginAdapters] = await Promise.all([
|
|
13510
|
-
import("./_coffre/assets/router-
|
|
13511
|
+
import("./_coffre/assets/router-CM3vK8QO.js"),
|
|
13511
13512
|
import("./_coffre/assets/start-DR3rN0St.js"),
|
|
13512
13513
|
import("./_coffre/assets/empty-plugin-adapters-Cq4--YW-.js")
|
|
13513
13514
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coffre/ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "coffre's pages: a prebuilt TanStack Start handler and its static files.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -28,14 +28,16 @@
|
|
|
28
28
|
"./package.json": "./package.json"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@coffre/client": "0.1.
|
|
31
|
+
"@coffre/client": "0.1.11"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@cloudflare/vite-plugin": "1.50.0",
|
|
35
35
|
"@cloudflare/workers-types": "5.20260920.1",
|
|
36
36
|
"@fontsource-variable/inter": "5.3.0",
|
|
37
37
|
"@fontsource-variable/jetbrains-mono": "5.3.0",
|
|
38
|
+
"@tanstack/react-query": "5.103.1",
|
|
38
39
|
"@tanstack/react-router": "1.170.18",
|
|
40
|
+
"@tanstack/react-router-ssr-query": "1.167.2",
|
|
39
41
|
"@tanstack/react-start": "1.168.32",
|
|
40
42
|
"@types/node": "26.1.1",
|
|
41
43
|
"@types/react": "19.2.17",
|
|
@@ -51,7 +53,7 @@
|
|
|
51
53
|
"typescript": "5.9.3",
|
|
52
54
|
"vite": "8.1.5",
|
|
53
55
|
"wrangler": "4.118.0",
|
|
54
|
-
"@coffre/core": "0.1.
|
|
56
|
+
"@coffre/core": "0.1.11"
|
|
55
57
|
},
|
|
56
58
|
"scripts": {
|
|
57
59
|
"build": "vite build && rm dist/server/wrangler.json && tsdown && node ../../scripts/check-client-bundle.mjs",
|