gemi 0.140.0 → 0.140.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/auth/AuthController.d.ts +2 -0
- package/dist/auth/AuthController.d.ts.map +1 -1
- package/dist/auth/types.d.ts +5 -0
- package/dist/auth/types.d.ts.map +1 -1
- package/dist/{chunk-mxqnrn1k.js → chunk-1vfnehjr.js} +1 -1
- package/dist/{chunk-gx202f9t.js → chunk-2vfdahm9.js} +1 -1
- package/dist/{chunk-ygyjtrzb.js → chunk-679ndcdq.js} +2 -2
- package/dist/{chunk-ygyjtrzb.js.map → chunk-679ndcdq.js.map} +1 -1
- package/dist/{chunk-d7a092vd.js → chunk-bmam8bsm.js} +1 -1
- package/dist/{chunk-ny01tp0y.js → chunk-bywhpfyv.js} +25 -25
- package/dist/{chunk-ny01tp0y.js.map → chunk-bywhpfyv.js.map} +5 -4
- package/dist/chunks/{RealtimeClient-B345JtXu.js → RealtimeClient-DFgd6k2O.js} +2 -2
- package/dist/chunks/{RealtimeClient-B345JtXu.js.map → RealtimeClient-DFgd6k2O.js.map} +1 -1
- package/dist/chunks/{ThemeProvider-BwlMubvu.js → ThemeProvider-D8T12nBG.js} +26 -12
- package/dist/chunks/ThemeProvider-D8T12nBG.js.map +1 -0
- package/dist/chunks/{fetchFileRequest-DKKdn8Yp.js → fetchFileRequest-Bu8thkJP.js} +2 -2
- package/dist/chunks/{fetchFileRequest-DKKdn8Yp.js.map → fetchFileRequest-Bu8thkJP.js.map} +1 -1
- package/dist/chunks/{live-Cq65lqVg.js → live-CR8v1KcI.js} +3 -3
- package/dist/chunks/{live-Cq65lqVg.js.map → live-CR8v1KcI.js.map} +1 -1
- package/dist/chunks/{mutationExtras-KMQj-GZD.js → mutationExtras-DuFelh7K.js} +2 -2
- package/dist/chunks/{mutationExtras-KMQj-GZD.js.map → mutationExtras-DuFelh7K.js.map} +1 -1
- package/dist/client/ClientRouterContext.d.ts.map +1 -1
- package/dist/client/Link.d.ts.map +1 -1
- package/dist/client/auth/useSignIn.d.ts +4 -0
- package/dist/client/auth/useSignIn.d.ts.map +1 -1
- package/dist/client/auth/useUser.d.ts +1 -0
- package/dist/client/auth/useUser.d.ts.map +1 -1
- package/dist/client/index.js +5 -7
- package/dist/client/index.js.map +1 -1
- package/dist/facades/index.js +1 -1
- package/dist/http/index.js +1 -1
- package/dist/i18n/index.js +1 -1
- package/dist/i18n/localePrefix.d.ts +13 -0
- package/dist/i18n/localePrefix.d.ts.map +1 -0
- package/dist/kernel/index.js +1 -1
- package/dist/server/index.js +1 -1
- package/dist/services/index.js +1 -1
- package/dist/services/router/ViewRouteDispatcher.d.ts.map +1 -1
- package/dist/testing/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/ThemeProvider-BwlMubvu.js.map +0 -1
- /package/dist/{chunk-mxqnrn1k.js.map → chunk-1vfnehjr.js.map} +0 -0
- /package/dist/{chunk-gx202f9t.js.map → chunk-2vfdahm9.js.map} +0 -0
- /package/dist/{chunk-d7a092vd.js.map → chunk-bmam8bsm.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as applyParams, at as QueryError, nt as parseRetryAfter } from "./ThemeProvider-D8T12nBG.js";
|
|
2
2
|
//#region client/fetchFileRequest.ts
|
|
3
3
|
/**
|
|
4
4
|
* `fetchBlob` / `fetchText` once loaded: the `GET`, a `QueryError` for a
|
|
@@ -54,4 +54,4 @@ function filenameOf(response) {
|
|
|
54
54
|
//#endregion
|
|
55
55
|
export { fetchFile, filenameOf };
|
|
56
56
|
|
|
57
|
-
//# sourceMappingURL=fetchFileRequest-
|
|
57
|
+
//# sourceMappingURL=fetchFileRequest-Bu8thkJP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchFileRequest-
|
|
1
|
+
{"version":3,"file":"fetchFileRequest-Bu8thkJP.js","names":[],"sources":["../../client/fetchFileRequest.ts"],"sourcesContent":["import { applyParams } from \"../utils/applyParams\";\nimport type { FetchedBlob, FetchedText, FetchFileOptions } from \"./fetchFile\";\nimport { QueryError } from \"./QueryError\";\nimport { parseRetryAfter } from \"./retryPolicy\";\n\n// What `fetchBlob` and `fetchText` in `./fetchFile` load on their first call\n// (#915).\n\ntype RequestOptions = Omit<FetchFileOptions<string>, \"params\"> & {\n params?: Record<string, string | number | undefined>;\n};\n\n/**\n * `fetchBlob` / `fetchText` once loaded: the `GET`, a `QueryError` for a\n * non-2xx, and the body read `as` a blob or text.\n */\nexport async function fetchFile(\n path: string,\n // The caller's `FetchFileOptions<P>`, checked against its path there.\n options: object | undefined,\n as: \"blob\" | \"text\",\n): Promise<FetchedBlob | FetchedText> {\n const response = await request(path, options as RequestOptions);\n const body = as === \"blob\" ? { blob: await response.blob() } : { text: await response.text() };\n return { ...body, filename: filenameOf(response), response } as FetchedBlob | FetchedText;\n}\n\nasync function request(path: string, options: RequestOptions = {}) {\n const { params = {}, search, signal, init } = options;\n const url = applyParams(path, params);\n const query = searchString(search);\n const response = await fetch(`/api${url}${query ? `?${query}` : \"\"}`, {\n ...init,\n method: \"GET\",\n signal,\n });\n if (!response.ok) {\n // An error body that is not JSON (a proxy's HTML 502) is still that status.\n const body = await response.json().catch(() => null);\n throw new QueryError(\n url,\n query,\n response.status,\n body,\n parseRetryAfter(response.headers.get(\"retry-after\")),\n );\n }\n return response;\n}\n\nfunction searchString(search: FetchFileOptions<string>[\"search\"]) {\n if (!search) return \"\";\n if (search instanceof URLSearchParams) return search.toString();\n const params = new URLSearchParams();\n for (const [key, value] of Object.entries(search)) {\n if (value !== null && value !== undefined) params.append(key, String(value));\n }\n return params.toString();\n}\n\n/**\n * The file name in a `Content-Disposition` header: the RFC 5987\n * `filename*=UTF-8''...` form when present and decodable, else `filename`.\n *\n * @internal Exported for tests.\n */\nexport function filenameOf(response: Response): string | null {\n const header = response.headers.get(\"content-disposition\");\n if (!header) return null;\n const extended = /filename\\*\\s*=\\s*([^']*)'[^']*'([^;]+)/i.exec(header);\n if (extended) {\n try {\n return decodeURIComponent(extended[2].trim());\n } catch {\n // A malformed escape: fall back to the plain form.\n }\n }\n const plain = /filename\\s*=\\s*(?:\"((?:[^\"\\\\]|\\\\.)*)\"|([^;]+))/i.exec(header);\n if (!plain) return null;\n const name = plain[1] !== undefined ? plain[1].replace(/\\\\(.)/g, \"$1\") : plain[2].trim();\n return name || null;\n}\n"],"mappings":";;;;;;AAgBA,eAAsB,UACpB,MAEA,SACA,IACoC;CACpC,MAAM,WAAW,MAAM,QAAQ,MAAM,OAAyB;CAE9D,OAAO;EAAE,GADI,OAAO,SAAS,EAAE,MAAM,MAAM,SAAS,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,SAAS,KAAK,EAAE;EAC3E,UAAU,WAAW,QAAQ;EAAG;CAAS;AAC7D;AAEA,eAAe,QAAQ,MAAc,UAA0B,CAAC,GAAG;CACjE,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,QAAQ,SAAS;CAC9C,MAAM,MAAM,YAAY,MAAM,MAAM;CACpC,MAAM,QAAQ,aAAa,MAAM;CACjC,MAAM,WAAW,MAAM,MAAM,OAAO,MAAM,QAAQ,IAAI,UAAU,MAAM;EACpE,GAAG;EACH,QAAQ;EACR;CACF,CAAC;CACD,IAAI,CAAC,SAAS,IAAI;EAEhB,MAAM,OAAO,MAAM,SAAS,KAAK,CAAC,CAAC,YAAY,IAAI;EACnD,MAAM,IAAI,WACR,KACA,OACA,SAAS,QACT,MACA,gBAAgB,SAAS,QAAQ,IAAI,aAAa,CAAC,CACrD;CACF;CACA,OAAO;AACT;AAEA,SAAS,aAAa,QAA4C;CAChE,IAAI,CAAC,QAAQ,OAAO;CACpB,IAAI,kBAAkB,iBAAiB,OAAO,OAAO,SAAS;CAC9D,MAAM,SAAS,IAAI,gBAAgB;CACnC,KAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,MAAM,GAC9C,IAAI,UAAU,QAAQ,UAAU,KAAA,GAAW,OAAO,OAAO,KAAK,OAAO,KAAK,CAAC;CAE7E,OAAO,OAAO,SAAS;AACzB;;;;;;;AAQA,SAAgB,WAAW,UAAmC;CAC5D,MAAM,SAAS,SAAS,QAAQ,IAAI,qBAAqB;CACzD,IAAI,CAAC,QAAQ,OAAO;CACpB,MAAM,WAAW,0CAA0C,KAAK,MAAM;CACtE,IAAI,UACF,IAAI;EACF,OAAO,mBAAmB,SAAS,EAAE,CAAC,KAAK,CAAC;CAC9C,QAAQ,CAER;CAEF,MAAM,QAAQ,kDAAkD,KAAK,MAAM;CAC3E,IAAI,CAAC,OAAO,OAAO;CAEnB,QADa,MAAM,OAAO,KAAA,IAAY,MAAM,EAAE,CAAC,QAAQ,UAAU,IAAI,IAAI,MAAM,EAAE,CAAC,KAAK,MACxE;AACjB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { K as loadedModule, U as realtime } from "./ThemeProvider-D8T12nBG.js";
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __exportAll = (all, no_symbols) => {
|
|
@@ -76,7 +76,7 @@ function followLive(provided, live, resource, setOpen) {
|
|
|
76
76
|
};
|
|
77
77
|
const socket = provided ?? realtime.client;
|
|
78
78
|
if (socket) start(socket);
|
|
79
|
-
else import("./RealtimeClient-
|
|
79
|
+
else import("./RealtimeClient-DFgd6k2O.js").then((module) => start(loadedModule(module).tabClient())).catch(() => {});
|
|
80
80
|
return () => {
|
|
81
81
|
stop?.();
|
|
82
82
|
stop = null;
|
|
@@ -85,4 +85,4 @@ function followLive(provided, live, resource, setOpen) {
|
|
|
85
85
|
//#endregion
|
|
86
86
|
export { live_exports as n, followLive as t };
|
|
87
87
|
|
|
88
|
-
//# sourceMappingURL=live-
|
|
88
|
+
//# sourceMappingURL=live-CR8v1KcI.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-
|
|
1
|
+
{"version":3,"file":"live-CR8v1KcI.js","names":[],"sources":["../../client/realtime/live.ts"],"sourcesContent":["import type { QueryResource } from \"../QueryResource\";\nimport type { ChannelPattern } from \"../useChannel\";\nimport { EVENT_COALESCE_MS } from \"./useChannelSubscription\";\nimport type { ChannelParamValues, RealtimeSocket } from \"./RealtimeClient\";\nimport { loadedModule } from \"../lazyModule\";\nimport { realtime } from \"./loader\";\n\n/**\n * `useQuery`'s `live` option: the channel whose events and resyncs refetch\n * the query. A pattern without params (`\"user\"`), `[pattern, params]`, or\n * `{ channel, params }`.\n */\nexport type LiveChannel =\n | ChannelPattern\n | readonly [ChannelPattern, ChannelParamValues]\n | { channel: ChannelPattern; params?: ChannelParamValues };\n\nexport function resolveLiveChannel(\n live: LiveChannel | null | undefined | false,\n): { pattern: string; params: ChannelParamValues } | null {\n if (!live) return null;\n if (typeof live === \"string\") return { pattern: live, params: {} };\n if (Array.isArray(live)) return { pattern: live[0], params: live[1] ?? {} };\n const object = live as { channel: string; params?: ChannelParamValues };\n return { pattern: object.channel, params: object.params ?? {} };\n}\n\n/**\n * `useQuery`'s `live` subscription, loaded on first use by `followLive` in\n * `./loader` (#891). The channel's events refetch every cached variant of the\n * query (the rendered ones now), a burst of them once per\n * `EVENT_COALESCE_MS`; a resync refetches at once. `setOpen` follows whether\n * the channel is open, which pauses the query's polling.\n */\nexport function subscribeLive(\n socket: RealtimeSocket,\n live: LiveChannel,\n resource: () => QueryResource,\n setOpen: (open: boolean) => void,\n): () => void {\n const channel = resolveLiveChannel(live);\n if (!channel) return () => {};\n const refresh = () => {\n const target = resource();\n for (const key of target.variantKeys()) target.invalidate(key);\n };\n let timer: ReturnType<typeof setTimeout> | null = null;\n const release = socket.subscribe(channel.pattern, channel.params, {\n onEvent: () => {\n if (timer) return;\n timer = setTimeout(() => {\n timer = null;\n refresh();\n }, EVENT_COALESCE_MS);\n },\n onResync: refresh,\n onStatus: (status) => setOpen(status === \"open\"),\n });\n return () => {\n if (timer) clearTimeout(timer);\n release();\n };\n}\n\n/**\n * What `followLive` in `./loader` hands over to once this module is loaded:\n * subscribes on the provided socket, or the tab's client, loading that first\n * when it is not there yet. Returns the function that stops it.\n */\nexport function followLive(\n provided: RealtimeSocket | null,\n live: LiveChannel,\n resource: () => QueryResource,\n setOpen: (open: boolean) => void,\n): () => void {\n // `undefined` until it subscribes, `null` once stopped.\n let stop: (() => void) | null | undefined;\n const start = (socket: RealtimeSocket) => {\n if (stop === undefined) stop = subscribeLive(socket, live, resource, setOpen);\n };\n const socket = provided ?? realtime.client;\n if (socket) start(socket);\n // Its own `import()` of the client rather than `loadRealtimeClient`, which\n // would keep that in the entry chunk of every app with a `useQuery`. A\n // failed load leaves the channel closed, so the query keeps polling.\n else\n import(\"./RealtimeClient.js\")\n .then((module) => start(loadedModule(module).tabClient()))\n .catch(() => {});\n return () => {\n stop?.();\n stop = null;\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAiBA,SAAgB,mBACd,MACwD;CACxD,IAAI,CAAC,MAAM,OAAO;CAClB,IAAI,OAAO,SAAS,UAAU,OAAO;EAAE,SAAS;EAAM,QAAQ,CAAC;CAAE;CACjE,IAAI,MAAM,QAAQ,IAAI,GAAG,OAAO;EAAE,SAAS,KAAK;EAAI,QAAQ,KAAK,MAAM,CAAC;CAAE;CAC1E,MAAM,SAAS;CACf,OAAO;EAAE,SAAS,OAAO;EAAS,QAAQ,OAAO,UAAU,CAAC;CAAE;AAChE;;;;;;;;AASA,SAAgB,cACd,QACA,MACA,UACA,SACY;CACZ,MAAM,UAAU,mBAAmB,IAAI;CACvC,IAAI,CAAC,SAAS,aAAa,CAAC;CAC5B,MAAM,gBAAgB;EACpB,MAAM,SAAS,SAAS;EACxB,KAAK,MAAM,OAAO,OAAO,YAAY,GAAG,OAAO,WAAW,GAAG;CAC/D;CACA,IAAI,QAA8C;CAClD,MAAM,UAAU,OAAO,UAAU,QAAQ,SAAS,QAAQ,QAAQ;EAChE,eAAe;GACb,IAAI,OAAO;GACX,QAAQ,iBAAiB;IACvB,QAAQ;IACR,QAAQ;GACV,GAAA,GAAoB;EACtB;EACA,UAAU;EACV,WAAW,WAAW,QAAQ,WAAW,MAAM;CACjD,CAAC;CACD,aAAa;EACX,IAAI,OAAO,aAAa,KAAK;EAC7B,QAAQ;CACV;AACF;;;;;;AAOA,SAAgB,WACd,UACA,MACA,UACA,SACY;CAEZ,IAAI;CACJ,MAAM,SAAS,WAA2B;EACxC,IAAI,SAAS,KAAA,GAAW,OAAO,cAAc,QAAQ,MAAM,UAAU,OAAO;CAC9E;CACA,MAAM,SAAS,YAAY,SAAS;CACpC,IAAI,QAAQ,MAAM,MAAM;MAKtB,OAAO,+BAAsB,CAC1B,MAAM,WAAW,MAAM,aAAa,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CACzD,YAAY,CAAC,CAAC;CACnB,aAAa;EACX,OAAO;EACP,OAAO;CACT;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { J as applyParams, q as toVariantKey } from "./ThemeProvider-D8T12nBG.js";
|
|
2
2
|
import { p as mutationErrorFromBody, s as isObject } from "./MutationError-DuKqBW8o.js";
|
|
3
3
|
//#region client/mutationErrorHelpers.ts
|
|
4
4
|
var FALLBACK_MESSAGE = "Something went wrong. Try again.";
|
|
@@ -112,4 +112,4 @@ function applyQueryUpdates(getResource, routeParams, updates, answer) {
|
|
|
112
112
|
//#endregion
|
|
113
113
|
export { applyQueryUpdates, withMutationErrorHelpers, writeQueryData };
|
|
114
114
|
|
|
115
|
-
//# sourceMappingURL=mutationExtras-
|
|
115
|
+
//# sourceMappingURL=mutationExtras-DuFelh7K.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutationExtras-
|
|
1
|
+
{"version":3,"file":"mutationExtras-DuFelh7K.js","names":[],"sources":["../../client/mutationErrorHelpers.ts","../../client/queryUpdates.ts"],"sourcesContent":["import {\n isObject,\n mutationErrorFromBody,\n type MutationErrorHelpers,\n type MutationValidationError,\n type WithMutationErrorHelpers,\n} from \"./MutationError\";\n\n// `error.list()` and `error.field(name)` on what the mutation hooks hand over.\n// Loaded with the hooks' other extras when one mounts (see\n// `./mutationModules`), so no route's entry chunk carries it (#915).\n//\n// `list` and `field` repeat `mutationErrorList` and `mutationErrorField` from\n// `./MutationError` on purpose. Those are public and synchronous, so they sit\n// in whatever chunk calls them; importing them here would put them, and so\n// this code, back in every entry chunk. `MutationError.helpers.test` runs the\n// same cases through both.\n\nconst FALLBACK_MESSAGE = \"Something went wrong. Try again.\";\n\n// `isValidationError`, which an import would keep in the entry chunk.\nfunction isValidationError(error: unknown): error is MutationValidationError {\n return isObject(error) && error.kind === \"validation_error\";\n}\n\n// A `QueryError`'s refusal, read as the mutation hooks read a body. Read by\n// shape, not `instanceof`, so a copy of the class from another bundle works.\nfunction unwrapQueryError(error: unknown): unknown {\n if (error instanceof Error && error.name === \"QueryError\" && \"body\" in error) {\n const { body, status } = error as Error & { body: unknown; status: number };\n return body == null ? error : mutationErrorFromBody(body, status);\n }\n return error;\n}\n\n// `error.list(fallback)`: see `mutationErrorList`.\nfunction list(\n error: unknown,\n fallback: string = FALLBACK_MESSAGE,\n): string[] {\n const value = unwrapQueryError(error);\n if (isValidationError(value)) {\n const messages = Object.values(value.messages ?? {})\n .flat()\n .filter((message) => typeof message === \"string\" && message !== \"\");\n return messages.length > 0 ? messages : [fallback];\n }\n if (\n isObject(value) &&\n !(value instanceof Error) &&\n value.kind !== \"server_error\" &&\n typeof value.message === \"string\" &&\n value.message !== \"\"\n ) {\n return [value.message];\n }\n return [fallback];\n}\n\n// `error.field(name)`: see `mutationErrorField`.\nfunction field(error: unknown, name: string): string[] {\n const value = unwrapQueryError(error);\n if (!isValidationError(value)) return [];\n const messages = value.messages?.[name];\n return Array.isArray(messages) ? [...messages] : [];\n}\n\n/**\n * Puts `list` and `field` on an error the hooks hand over, as non-enumerable\n * properties, so `toEqual`, a spread and `JSON.stringify` see the same object\n * as before. A key the error already has is left alone; a primitive or a\n * frozen value is returned as it is.\n *\n * @internal\n */\nexport function withMutationErrorHelpers<T>(error: T): WithMutationErrorHelpers<T> {\n if (!isObject(error) || !Object.isExtensible(error)) {\n return error as WithMutationErrorHelpers<T>;\n }\n const helpers: MutationErrorHelpers = {\n list: (fallback) => list(error, fallback),\n field: (name) => field(error, name),\n };\n for (const key of [\"list\", \"field\"] as const) {\n if (key in error) continue;\n Object.defineProperty(error, key, {\n value: helpers[key],\n configurable: true,\n writable: true,\n enumerable: false,\n });\n }\n return error as WithMutationErrorHelpers<T>;\n}\n","import type { QueryResource } from \"./QueryResource\";\nimport type { QueryTarget, QueryUpdate } from \"./useSetQueryData\";\nimport { applyParams } from \"../utils/applyParams\";\nimport { toVariantKey } from \"../utils/variantKey\";\n\n// The cache writes behind a mutation's `updates` and `useSetQueryData()`\n// (#897). Loaded with the hooks' other extras when one mounts (see\n// `./mutationModules`), so no route's entry chunk carries it (#915).\n\ntype Resolve = (key: string) => QueryResource;\n\n/**\n * Write data the server just produced (a mutation's answer) into a variant,\n * with no refetch: unlike `mutate`, the value is not a guess to reconcile.\n * The variant counts as freshly fetched, so its `staleTime` starts again, and\n * a GET already on the wire for it is dropped when it lands, since it may\n * carry the data from before the write. A reader suspended on the variant\n * wakes up with it (#897). Here rather than on `QueryResource`, which every\n * entry chunk carries (#915).\n */\nfunction setVariant(resource: QueryResource, variantKey: string, data: unknown) {\n resource.dropHttpCache(variantKey);\n resource.markApplied(variantKey);\n const store = resource.store.getValue();\n resource.fill(store, variantKey, data, Date.now());\n resource.store.next(store);\n}\n\n/** The value to write, or a function of the cached one. */\nexport type WriteQueryNext = { value: unknown } | { update: (current: any) => unknown };\n\n/**\n * Write into every variant `target` names. `next` is the value to write, or\n * a function of the cached value; a function skips a variant with nothing\n * cached. A value seeds a single variant that is not cached yet; a predicate\n * only ever reaches variants that are.\n */\nexport function writeQueryData(\n getResource: Resolve,\n routeParams: Record<string, any>,\n target: QueryTarget<any>,\n next: WriteQueryNext,\n) {\n const { path, params = {}, search = {} } = target;\n const resource = getResource(applyParams(String(path), { ...routeParams, ...params }));\n const write = (variantKey: string) => {\n if (\"value\" in next) {\n setVariant(resource, variantKey, next.value);\n return;\n }\n const state = resource.peek(variantKey);\n if (!state?.hasData) return;\n setVariant(resource, variantKey, next.update(state.data));\n };\n\n if (typeof search === \"function\") {\n for (const variantKey of resource.variantKeys()) {\n if (!resource.peek(variantKey)?.hasData) continue;\n if (search(new URLSearchParams(variantKey))) write(variantKey);\n }\n return;\n }\n write(toVariantKey(search));\n}\n\n/**\n * Write a mutation's `updates` with its answer.\n */\nexport function applyQueryUpdates(\n getResource: Resolve,\n routeParams: Record<string, any>,\n updates: ReadonlyArray<QueryUpdate<any>> | undefined,\n answer: unknown,\n) {\n for (const update of updates ?? []) {\n const { data } = update as { data?: (answer: any, current: any) => any };\n writeQueryData(\n getResource,\n routeParams,\n update,\n data ? { update: (current) => data(answer, current) } : { value: answer },\n );\n }\n}\n"],"mappings":";;;AAkBA,IAAM,mBAAmB;AAGzB,SAAS,kBAAkB,OAAkD;CAC3E,OAAO,SAAS,KAAK,KAAK,MAAM,SAAS;AAC3C;AAIA,SAAS,iBAAiB,OAAyB;CACjD,IAAI,iBAAiB,SAAS,MAAM,SAAS,gBAAgB,UAAU,OAAO;EAC5E,MAAM,EAAE,MAAM,WAAW;EACzB,OAAO,QAAQ,OAAO,QAAQ,sBAAsB,MAAM,MAAM;CAClE;CACA,OAAO;AACT;AAGA,SAAS,KACP,OACA,WAAmB,kBACT;CACV,MAAM,QAAQ,iBAAiB,KAAK;CACpC,IAAI,kBAAkB,KAAK,GAAG;EAC5B,MAAM,WAAW,OAAO,OAAO,MAAM,YAAY,CAAC,CAAC,CAAC,CACjD,KAAK,CAAC,CACN,QAAQ,YAAY,OAAO,YAAY,YAAY,YAAY,EAAE;EACpE,OAAO,SAAS,SAAS,IAAI,WAAW,CAAC,QAAQ;CACnD;CACA,IACE,SAAS,KAAK,KACd,EAAE,iBAA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,UAAU,YAAY,KAAK,KAAK;GAC3C;EACF;EACA,MAAM,QAAQ,SAAS,KAAK,UAAU;EACtC,IAAI,CAAC,OAAO,SAAS;EACrB,WAAW,UAAU,YAAY,KAAK,OAAO,MAAM,IAAI,CAAC;CAC1D;CAEA,IAAI,OAAO,WAAW,YAAY;EAChC,KAAK,MAAM,cAAc,SAAS,YAAY,GAAG;GAC/C,IAAI,CAAC,SAAS,KAAK,UAAU,CAAC,EAAE,SAAS;GACzC,IAAI,OAAO,IAAI,gBAAgB,UAAU,CAAC,GAAG,MAAM,UAAU;EAC/D;EACA;CACF;CACA,MAAM,aAAa,MAAM,CAAC;AAC5B;;;;AAKA,SAAgB,kBACd,aACA,aACA,SACA,QACA;CACA,KAAK,MAAM,UAAU,WAAW,CAAC,GAAG;EAClC,MAAM,EAAE,SAAS;EACjB,eACE,aACA,aACA,QACA,OAAO,EAAE,SAAS,YAAY,KAAK,QAAQ,OAAO,EAAE,IAAI,EAAE,OAAO,OAAO,CAC1E;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ClientRouterContext.d.ts","sourceRoot":"","sources":["../../client/ClientRouterContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,OAAO,EAAwB,MAAM,SAAS,CAAC;AAC1E,OAAO,EAOL,KAAK,iBAAiB,EACvB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAG3C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ClientRouterContext.d.ts","sourceRoot":"","sources":["../../client/ClientRouterContext.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAe,KAAK,OAAO,EAAwB,MAAM,SAAS,CAAC;AAC1E,OA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AAE,UAAU,CAAC,CAAC;CACzC;AAKD,eAAO,MAAM,oBAAoB,GAC/B,OAAO,iBAAiB,CAAC,yBAAyB,CAAC,4CAyVpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../client/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,cAAc,EAEnB,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"Link.d.ts","sourceRoot":"","sources":["../../client/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,cAAc,EAEnB,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AAGf,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGrE,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAM9C,KAAK,KAAK,GAAG;KACV,CAAC,IAAI,MAAM,OAAO,IAAI,CAAC,SAAS,QAAQ,MAAM,CAAC,EAAE,GAC9C,CAAC,GACD,KAAK,GAAG,UAAU,CAAC,CAAC,CAAC;CAC1B,CAAC;AAEF,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC;AAE3E;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;AAQ1E,KAAK,aAAa,CAAC,CAAC,SAAS,MAAM,KAAK,IAAI,IAAI,CAC9C,cAAc,CAAC,GAAG,CAAC,EACnB,MAAM,CACP,G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,7 @@ export declare function useSignIn(args?: UseSignInArgs): {
|
|
|
8
8
|
name: string | null;
|
|
9
9
|
email: string | null;
|
|
10
10
|
emailVerifiedAt: Date | null;
|
|
11
|
+
locale: string | null;
|
|
11
12
|
globalRole: number;
|
|
12
13
|
accounts: import("../../auth/types").Account[];
|
|
13
14
|
extension: Record<string, any>;
|
|
@@ -27,6 +28,7 @@ export declare function useSignIn(args?: UseSignInArgs): {
|
|
|
27
28
|
name: string | null;
|
|
28
29
|
email: string | null;
|
|
29
30
|
emailVerifiedAt: Date | null;
|
|
31
|
+
locale: string | null;
|
|
30
32
|
globalRole: number;
|
|
31
33
|
accounts: import("../../auth/types").Account[];
|
|
32
34
|
extension: Record<string, any>;
|
|
@@ -36,6 +38,7 @@ export declare function useSignIn(args?: UseSignInArgs): {
|
|
|
36
38
|
name: string | null;
|
|
37
39
|
email: string | null;
|
|
38
40
|
emailVerifiedAt: Date | null;
|
|
41
|
+
locale: string | null;
|
|
39
42
|
globalRole: number;
|
|
40
43
|
accounts: import("../../auth/types").Account[];
|
|
41
44
|
extension: Record<string, any>;
|
|
@@ -46,6 +49,7 @@ export declare function useSignIn(args?: UseSignInArgs): {
|
|
|
46
49
|
name: string | null;
|
|
47
50
|
email: string | null;
|
|
48
51
|
emailVerifiedAt: Date | null;
|
|
52
|
+
locale: string | null;
|
|
49
53
|
globalRole: number;
|
|
50
54
|
accounts: import("../../auth/types").Account[];
|
|
51
55
|
extension: Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSignIn.d.ts","sourceRoot":"","sources":["../../../client/auth/useSignIn.tsx"],"names":[],"mappings":"AAIA,UAAU,aAAa;IACrB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;CACjC;AAMD,wBAAgB,SAAS,CAAC,IAAI,GAAE,aAA2B
|
|
1
|
+
{"version":3,"file":"useSignIn.d.ts","sourceRoot":"","sources":["../../../client/auth/useSignIn.tsx"],"names":[],"mappings":"AAIA,UAAU,aAAa;IACrB,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;CACjC;AAMD,wBAAgB,SAAS,CAAC,IAAI,GAAE,aAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiB1D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUser.d.ts","sourceRoot":"","sources":["../../../client/auth/useUser.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,MAAM,CAAC,EAAE,eAAe
|
|
1
|
+
{"version":3,"file":"useUser.d.ts","sourceRoot":"","sources":["../../../client/auth/useUser.ts"],"names":[],"mappings":"AAGA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,wBAAwB,CAAC;AAEhC;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,MAAM,CAAC,EAAE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6B/C"}
|
package/dist/client/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as pickDefined, A as I18nProvider, B as configureRealtime, C as readRoutePayload, D as useSearchParams, E as useRoute, F as isAbsoluteUrl, G as loadLazy, J as applyParams$1, K as loadedModule, L as Action, M as ServerDataProvider, N as useLocation, O as useNavigate, P as domainUrl, Q as USER_QUERY_CONFIG_KEYS, S as setActiveLocale, T as routeDataUrl, U as realtime, V as followLive, W as reconnectRealtime, X as QueryManagerContext, Y as QueryConfigContext, Z as QueryManagerProvider, _ as isChunkLoadError, a as useRouteTransition, at as QueryError, b as loadDictionaryForRender, c as ClientRouterContext, d as ComponentsProvider, et as DEFAULT_STALE_TIME, f as initialViewModulesReady, g as configureChunkLoadRecovery, h as CHUNK_RELOAD_MARKER, i as RouteTransitionProvider, it as shouldRetryQuery, j as ServerDataContext, k as I18nContext, l as ClientRouterProvider, m as subscribeViewModules, n as useTheme, o as useChannelSubscription, ot as Subject, p as loadViewModule, q as toVariantKey, r as m, rt as retryDelayFor, s as useCoalesced, t as ThemeProvider, tt as isRetryableQueryError, u as ComponentsContext, v as recoverFromChunkLoadError, w as splitLocalePrefix, x as registerDictionary, y as loadDictionary, z as RealtimeContext } from "../chunks/ThemeProvider-D8T12nBG.js";
|
|
2
2
|
import { n as RouteStateContext, r as RouteStateProvider, t as useParams } from "../chunks/useParams-BN3XXfmG.js";
|
|
3
3
|
import { a as isNetworkError, c as isPermissionError, d as isValidationError, f as mutationErrorField, h as mutationErrorList, i as isHttpError, l as isRateLimitError, m as mutationErrorKind, n as isCsrfError, o as isNotFoundError, p as mutationErrorFromBody, r as isFormError, s as isObject, t as isAuthenticationError, u as isServerError } from "../chunks/MutationError-DuKqBW8o.js";
|
|
4
4
|
import { Fragment, StrictMode, Suspense, createContext, createElement, isValidElement, lazy, memo, use, useCallback, useContext, useDeferredValue, useEffect, useMemo, useRef, useState, useSyncExternalStore, useTransition } from "react";
|
|
@@ -561,7 +561,7 @@ var SOCKET_ID_HEADER = "x-gemi-socket";
|
|
|
561
561
|
*/
|
|
562
562
|
var mutationExtras = {
|
|
563
563
|
current: null,
|
|
564
|
-
load: () => import("../chunks/mutationExtras-
|
|
564
|
+
load: () => import("../chunks/mutationExtras-DuFelh7K.js")
|
|
565
565
|
};
|
|
566
566
|
/** Starts loading `./mutationExtras`: the hooks' mount effect. */
|
|
567
567
|
function preloadMutationExtras() {
|
|
@@ -899,7 +899,7 @@ function useMutate() {
|
|
|
899
899
|
//#region client/fetchFile.ts
|
|
900
900
|
var request = {
|
|
901
901
|
current: null,
|
|
902
|
-
load: () => import("../chunks/fetchFileRequest-
|
|
902
|
+
load: () => import("../chunks/fetchFileRequest-Bu8thkJP.js")
|
|
903
903
|
};
|
|
904
904
|
/**
|
|
905
905
|
* Downloads a file route's body as a `Blob`.
|
|
@@ -1452,8 +1452,7 @@ var RouteLink = memo((props) => {
|
|
|
1452
1452
|
const resolvedPath = path || "/";
|
|
1453
1453
|
let urlLocaleSegment = location.locale;
|
|
1454
1454
|
if (urlLocaleSegment === defaultLocale) urlLocaleSegment = "";
|
|
1455
|
-
const
|
|
1456
|
-
const targetHref = [[`${localeSegment}${path}`, searchParams.toString()].filter((s) => s.length > 0).join("?"), hash].join("");
|
|
1455
|
+
const targetHref = [[`${urlLocaleSegment ? `/${urlLocaleSegment}` : ""}${path}`, searchParams.toString()].filter((s) => s.length > 0).join("?"), hash].join("");
|
|
1457
1456
|
const currentHref = [
|
|
1458
1457
|
location.pathname,
|
|
1459
1458
|
location.search,
|
|
@@ -1533,8 +1532,7 @@ var RouteLink = memo((props) => {
|
|
|
1533
1532
|
e.preventDefault();
|
|
1534
1533
|
return;
|
|
1535
1534
|
}
|
|
1536
|
-
|
|
1537
|
-
currentPath = currentPath === "" ? "/" : currentPath;
|
|
1535
|
+
const currentPath = splitLocalePrefix(window.location.pathname, urlLocaleSegment ? [urlLocaleSegment] : []).pathname;
|
|
1538
1536
|
if (hash === "") e.preventDefault();
|
|
1539
1537
|
push(href, {
|
|
1540
1538
|
hash,
|