zudoku 0.47.0 → 0.47.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/app/main.js +2 -2
- package/dist/app/main.js.map +1 -1
- package/dist/config/validators/validate.d.ts +120 -0
- package/dist/config/validators/validate.js +11 -0
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/lib/auth/issuer.js +3 -0
- package/dist/lib/auth/issuer.js.map +1 -1
- package/dist/lib/auth/issuer.test.js +13 -0
- package/dist/lib/auth/issuer.test.js.map +1 -1
- package/dist/lib/plugins/api-keys/index.js +1 -3
- package/dist/lib/plugins/api-keys/index.js.map +1 -1
- package/lib/Drawer-BzkOKwgC.js.map +1 -1
- package/lib/{Markdown-BUE2ViaD.js → Markdown-r4buN85T.js} +3 -3
- package/lib/{Markdown-BUE2ViaD.js.map → Markdown-r4buN85T.js.map} +1 -1
- package/lib/{MdxPage-By4UkRkI.js → MdxPage-DYKsTerz.js} +4 -4
- package/lib/{MdxPage-By4UkRkI.js.map → MdxPage-DYKsTerz.js.map} +1 -1
- package/lib/{OasProvider-C6_Kx5O7.js → OasProvider-8vNiLpIG.js} +2 -2
- package/lib/{OasProvider-C6_Kx5O7.js.map → OasProvider-8vNiLpIG.js.map} +1 -1
- package/lib/{OperationList-BISd29LY.js → OperationList-BCVHtZNK.js} +6 -6
- package/lib/{OperationList-BISd29LY.js.map → OperationList-BCVHtZNK.js.map} +1 -1
- package/lib/{RouteGuard-CgmsSw7T.js → RouteGuard-B7GVW4oL.js} +2 -2
- package/lib/{RouteGuard-CgmsSw7T.js.map → RouteGuard-B7GVW4oL.js.map} +1 -1
- package/lib/{SchemaList-BqnRo5ov.js → SchemaList-1oJKvBxh.js} +6 -6
- package/lib/{SchemaList-BqnRo5ov.js.map → SchemaList-1oJKvBxh.js.map} +1 -1
- package/lib/{SchemaView-CtYJpxQI.js → SchemaView-CTqaB-79.js} +3 -3
- package/lib/{SchemaView-CtYJpxQI.js.map → SchemaView-CTqaB-79.js.map} +1 -1
- package/lib/{SignUp-CrjeBbqN.js → SignUp-CRIKdWt9.js} +2 -2
- package/lib/{SignUp-CrjeBbqN.js.map → SignUp-CRIKdWt9.js.map} +1 -1
- package/lib/{Slot-DANV2b7_.js → Slot-B5qSAnwR.js} +4 -4
- package/lib/{Slot-DANV2b7_.js.map → Slot-B5qSAnwR.js.map} +1 -1
- package/lib/{SyntaxHighlight-DtvR7RLF.js → SyntaxHighlight-CqKHkyEy.js} +2 -2
- package/lib/{SyntaxHighlight-DtvR7RLF.js.map → SyntaxHighlight-CqKHkyEy.js.map} +1 -1
- package/lib/{Toc-ClJBmdtI.js → Toc-lxYQEOzX.js} +2 -2
- package/lib/{Toc-ClJBmdtI.js.map → Toc-lxYQEOzX.js.map} +1 -1
- package/lib/{circular-pOdgLzpG.js → circular-ZGGPtwMq.js} +2 -2
- package/lib/{circular-pOdgLzpG.js.map → circular-ZGGPtwMq.js.map} +1 -1
- package/lib/{createServer-qAtUf99r.js → createServer-DUBpXfvA.js} +5 -5
- package/lib/{createServer-qAtUf99r.js.map → createServer-DUBpXfvA.js.map} +1 -1
- package/lib/{errors-Bpodza84.js → errors-D27ZTQgx.js} +3 -3
- package/lib/{errors-Bpodza84.js.map → errors-D27ZTQgx.js.map} +1 -1
- package/lib/{hook-wIlTGE-2.js → hook-7wZANGJP.js} +2 -5
- package/lib/{hook-wIlTGE-2.js.map → hook-7wZANGJP.js.map} +1 -1
- package/lib/index-CrcNWbel.js.map +1 -1
- package/lib/{index-RFzRn4fM.js → index-Cucjfk3D.js} +9 -9
- package/lib/{index-RFzRn4fM.js.map → index-Cucjfk3D.js.map} +1 -1
- package/lib/{index-zddirpDj.js → index-DmNq2fbN.js} +226 -221
- package/lib/index-DmNq2fbN.js.map +1 -0
- package/lib/{mutation-C-kdA_1r.js → mutation-C1XCQTQL.js} +2 -2
- package/lib/{mutation-C-kdA_1r.js.map → mutation-C1XCQTQL.js.map} +1 -1
- package/lib/ui/SyntaxHighlight.js +2 -2
- package/lib/{useMutation-3Ph3x6En.js → useMutation-BKvPttRn.js} +3 -3
- package/lib/{useMutation-3Ph3x6En.js.map → useMutation-BKvPttRn.js.map} +1 -1
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-azureb2c.js +2 -2
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +2 -2
- package/lib/zudoku.components.js +5 -5
- package/lib/zudoku.hooks.js +2 -2
- package/lib/zudoku.plugin-api-catalog.js +2 -2
- package/lib/zudoku.plugin-api-keys.js +19 -21
- package/lib/zudoku.plugin-api-keys.js.map +1 -1
- package/lib/zudoku.plugin-custom-pages.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +2 -2
- package/lib/zudoku.plugin-search-pagefind.js +2 -2
- package/package.json +4 -4
- package/src/app/main.tsx +2 -2
- package/src/lib/auth/issuer.test.ts +16 -0
- package/src/lib/auth/issuer.ts +3 -0
- package/src/lib/plugins/api-keys/index.tsx +1 -3
- package/lib/index-zddirpDj.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { R as a, c as r, n as u } from "./hook-
|
|
1
|
+
import { R as a, c as r, n as u } from "./hook-7wZANGJP.js";
|
|
2
2
|
var d = class extends a {
|
|
3
3
|
#e;
|
|
4
4
|
#t;
|
|
@@ -193,4 +193,4 @@ export {
|
|
|
193
193
|
d as M,
|
|
194
194
|
h as g
|
|
195
195
|
};
|
|
196
|
-
//# sourceMappingURL=mutation-
|
|
196
|
+
//# sourceMappingURL=mutation-C1XCQTQL.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutation-C-kdA_1r.js","sources":["../../../node_modules/.pnpm/@tanstack+query-core@5.74.3/node_modules/@tanstack/query-core/build/modern/mutation.js"],"sourcesContent":["// src/mutation.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Removable } from \"./removable.js\";\nimport { createRetryer } from \"./retryer.js\";\nvar Mutation = class extends Removable {\n #observers;\n #mutationCache;\n #retryer;\n constructor(config) {\n super();\n this.mutationId = config.mutationId;\n this.#mutationCache = config.mutationCache;\n this.#observers = [];\n this.state = config.state || getDefaultState();\n this.setOptions(config.options);\n this.scheduleGc();\n }\n setOptions(options) {\n this.options = options;\n this.updateGcTime(this.options.gcTime);\n }\n get meta() {\n return this.options.meta;\n }\n addObserver(observer) {\n if (!this.#observers.includes(observer)) {\n this.#observers.push(observer);\n this.clearGcTimeout();\n this.#mutationCache.notify({\n type: \"observerAdded\",\n mutation: this,\n observer\n });\n }\n }\n removeObserver(observer) {\n this.#observers = this.#observers.filter((x) => x !== observer);\n this.scheduleGc();\n this.#mutationCache.notify({\n type: \"observerRemoved\",\n mutation: this,\n observer\n });\n }\n optionalRemove() {\n if (!this.#observers.length) {\n if (this.state.status === \"pending\") {\n this.scheduleGc();\n } else {\n this.#mutationCache.remove(this);\n }\n }\n }\n continue() {\n return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before\n this.execute(this.state.variables);\n }\n async execute(variables) {\n const onContinue = () => {\n this.#dispatch({ type: \"continue\" });\n };\n this.#retryer = createRetryer({\n fn: () => {\n if (!this.options.mutationFn) {\n return Promise.reject(new Error(\"No mutationFn found\"));\n }\n return this.options.mutationFn(variables);\n },\n onFail: (failureCount, error) => {\n this.#dispatch({ type: \"failed\", failureCount, error });\n },\n onPause: () => {\n this.#dispatch({ type: \"pause\" });\n },\n onContinue,\n retry: this.options.retry ?? 0,\n retryDelay: this.options.retryDelay,\n networkMode: this.options.networkMode,\n canRun: () => this.#mutationCache.canRun(this)\n });\n const restored = this.state.status === \"pending\";\n const isPaused = !this.#retryer.canStart();\n try {\n if (restored) {\n onContinue();\n } else {\n this.#dispatch({ type: \"pending\", variables, isPaused });\n await this.#mutationCache.config.onMutate?.(\n variables,\n this\n );\n const context = await this.options.onMutate?.(variables);\n if (context !== this.state.context) {\n this.#dispatch({\n type: \"pending\",\n context,\n variables,\n isPaused\n });\n }\n }\n const data = await this.#retryer.start();\n await this.#mutationCache.config.onSuccess?.(\n data,\n variables,\n this.state.context,\n this\n );\n await this.options.onSuccess?.(data, variables, this.state.context);\n await this.#mutationCache.config.onSettled?.(\n data,\n null,\n this.state.variables,\n this.state.context,\n this\n );\n await this.options.onSettled?.(data, null, variables, this.state.context);\n this.#dispatch({ type: \"success\", data });\n return data;\n } catch (error) {\n try {\n await this.#mutationCache.config.onError?.(\n error,\n variables,\n this.state.context,\n this\n );\n await this.options.onError?.(\n error,\n variables,\n this.state.context\n );\n await this.#mutationCache.config.onSettled?.(\n void 0,\n error,\n this.state.variables,\n this.state.context,\n this\n );\n await this.options.onSettled?.(\n void 0,\n error,\n variables,\n this.state.context\n );\n throw error;\n } finally {\n this.#dispatch({ type: \"error\", error });\n }\n } finally {\n this.#mutationCache.runNext(this);\n }\n }\n #dispatch(action) {\n const reducer = (state) => {\n switch (action.type) {\n case \"failed\":\n return {\n ...state,\n failureCount: action.failureCount,\n failureReason: action.error\n };\n case \"pause\":\n return {\n ...state,\n isPaused: true\n };\n case \"continue\":\n return {\n ...state,\n isPaused: false\n };\n case \"pending\":\n return {\n ...state,\n context: action.context,\n data: void 0,\n failureCount: 0,\n failureReason: null,\n error: null,\n isPaused: action.isPaused,\n status: \"pending\",\n variables: action.variables,\n submittedAt: Date.now()\n };\n case \"success\":\n return {\n ...state,\n data: action.data,\n failureCount: 0,\n failureReason: null,\n error: null,\n status: \"success\",\n isPaused: false\n };\n case \"error\":\n return {\n ...state,\n data: void 0,\n error: action.error,\n failureCount: state.failureCount + 1,\n failureReason: action.error,\n isPaused: false,\n status: \"error\"\n };\n }\n };\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.#observers.forEach((observer) => {\n observer.onMutationUpdate(action);\n });\n this.#mutationCache.notify({\n mutation: this,\n type: \"updated\",\n action\n });\n });\n }\n};\nfunction getDefaultState() {\n return {\n context: void 0,\n data: void 0,\n error: null,\n failureCount: 0,\n failureReason: null,\n isPaused: false,\n status: \"idle\",\n variables: void 0,\n submittedAt: 0\n };\n}\nexport {\n Mutation,\n getDefaultState\n};\n//# sourceMappingURL=mutation.js.map"],"names":["Mutation","Removable","#observers","#mutationCache","#retryer","config","getDefaultState","options","observer","x","variables","onContinue","#dispatch","createRetryer","failureCount","error","restored","isPaused","context","data","action","reducer","state","notifyManager"],"mappings":";AAIG,IAACA,IAAW,cAAcC,EAAU;AAAA,EACrCC;AAAA,EACAC;AAAA,EACAC;AAAA,EACA,YAAYC,GAAQ;AAClB,UAAO,GACP,KAAK,aAAaA,EAAO,YACzB,KAAKF,KAAiBE,EAAO,eAC7B,KAAKH,KAAa,CAAE,GACpB,KAAK,QAAQG,EAAO,SAASC,EAAiB,GAC9C,KAAK,WAAWD,EAAO,OAAO,GAC9B,KAAK,WAAY;AAAA,EACrB;AAAA,EACE,WAAWE,GAAS;AAClB,SAAK,UAAUA,GACf,KAAK,aAAa,KAAK,QAAQ,MAAM;AAAA,EACzC;AAAA,EACE,IAAI,OAAO;AACT,WAAO,KAAK,QAAQ;AAAA,EACxB;AAAA,EACE,YAAYC,GAAU;AACpB,IAAK,KAAKN,GAAW,SAASM,CAAQ,MACpC,KAAKN,GAAW,KAAKM,CAAQ,GAC7B,KAAK,eAAgB,GACrB,KAAKL,GAAe,OAAO;AAAA,MACzB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,UAAAK;AAAA,IACR,CAAO;AAAA,EAEP;AAAA,EACE,eAAeA,GAAU;AACvB,SAAKN,KAAa,KAAKA,GAAW,OAAO,CAACO,MAAMA,MAAMD,CAAQ,GAC9D,KAAK,WAAY,GACjB,KAAKL,GAAe,OAAO;AAAA,MACzB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,UAAAK;AAAA,IACN,CAAK;AAAA,EACL;AAAA,EACE,iBAAiB;AACf,IAAK,KAAKN,GAAW,WACf,KAAK,MAAM,WAAW,YACxB,KAAK,WAAY,IAEjB,KAAKC,GA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,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,aAAa;AAAA,EACd;AACH;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"mutation-C1XCQTQL.js","sources":["../../../node_modules/.pnpm/@tanstack+query-core@5.74.3/node_modules/@tanstack/query-core/build/modern/mutation.js"],"sourcesContent":["// src/mutation.ts\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Removable } from \"./removable.js\";\nimport { createRetryer } from \"./retryer.js\";\nvar Mutation = class extends Removable {\n #observers;\n #mutationCache;\n #retryer;\n constructor(config) {\n super();\n this.mutationId = config.mutationId;\n this.#mutationCache = config.mutationCache;\n this.#observers = [];\n this.state = config.state || getDefaultState();\n this.setOptions(config.options);\n this.scheduleGc();\n }\n setOptions(options) {\n this.options = options;\n this.updateGcTime(this.options.gcTime);\n }\n get meta() {\n return this.options.meta;\n }\n addObserver(observer) {\n if (!this.#observers.includes(observer)) {\n this.#observers.push(observer);\n this.clearGcTimeout();\n this.#mutationCache.notify({\n type: \"observerAdded\",\n mutation: this,\n observer\n });\n }\n }\n removeObserver(observer) {\n this.#observers = this.#observers.filter((x) => x !== observer);\n this.scheduleGc();\n this.#mutationCache.notify({\n type: \"observerRemoved\",\n mutation: this,\n observer\n });\n }\n optionalRemove() {\n if (!this.#observers.length) {\n if (this.state.status === \"pending\") {\n this.scheduleGc();\n } else {\n this.#mutationCache.remove(this);\n }\n }\n }\n continue() {\n return this.#retryer?.continue() ?? // continuing a mutation assumes that variables are set, mutation must have been dehydrated before\n this.execute(this.state.variables);\n }\n async execute(variables) {\n const onContinue = () => {\n this.#dispatch({ type: \"continue\" });\n };\n this.#retryer = createRetryer({\n fn: () => {\n if (!this.options.mutationFn) {\n return Promise.reject(new Error(\"No mutationFn found\"));\n }\n return this.options.mutationFn(variables);\n },\n onFail: (failureCount, error) => {\n this.#dispatch({ type: \"failed\", failureCount, error });\n },\n onPause: () => {\n this.#dispatch({ type: \"pause\" });\n },\n onContinue,\n retry: this.options.retry ?? 0,\n retryDelay: this.options.retryDelay,\n networkMode: this.options.networkMode,\n canRun: () => this.#mutationCache.canRun(this)\n });\n const restored = this.state.status === \"pending\";\n const isPaused = !this.#retryer.canStart();\n try {\n if (restored) {\n onContinue();\n } else {\n this.#dispatch({ type: \"pending\", variables, isPaused });\n await this.#mutationCache.config.onMutate?.(\n variables,\n this\n );\n const context = await this.options.onMutate?.(variables);\n if (context !== this.state.context) {\n this.#dispatch({\n type: \"pending\",\n context,\n variables,\n isPaused\n });\n }\n }\n const data = await this.#retryer.start();\n await this.#mutationCache.config.onSuccess?.(\n data,\n variables,\n this.state.context,\n this\n );\n await this.options.onSuccess?.(data, variables, this.state.context);\n await this.#mutationCache.config.onSettled?.(\n data,\n null,\n this.state.variables,\n this.state.context,\n this\n );\n await this.options.onSettled?.(data, null, variables, this.state.context);\n this.#dispatch({ type: \"success\", data });\n return data;\n } catch (error) {\n try {\n await this.#mutationCache.config.onError?.(\n error,\n variables,\n this.state.context,\n this\n );\n await this.options.onError?.(\n error,\n variables,\n this.state.context\n );\n await this.#mutationCache.config.onSettled?.(\n void 0,\n error,\n this.state.variables,\n this.state.context,\n this\n );\n await this.options.onSettled?.(\n void 0,\n error,\n variables,\n this.state.context\n );\n throw error;\n } finally {\n this.#dispatch({ type: \"error\", error });\n }\n } finally {\n this.#mutationCache.runNext(this);\n }\n }\n #dispatch(action) {\n const reducer = (state) => {\n switch (action.type) {\n case \"failed\":\n return {\n ...state,\n failureCount: action.failureCount,\n failureReason: action.error\n };\n case \"pause\":\n return {\n ...state,\n isPaused: true\n };\n case \"continue\":\n return {\n ...state,\n isPaused: false\n };\n case \"pending\":\n return {\n ...state,\n context: action.context,\n data: void 0,\n failureCount: 0,\n failureReason: null,\n error: null,\n isPaused: action.isPaused,\n status: \"pending\",\n variables: action.variables,\n submittedAt: Date.now()\n };\n case \"success\":\n return {\n ...state,\n data: action.data,\n failureCount: 0,\n failureReason: null,\n error: null,\n status: \"success\",\n isPaused: false\n };\n case \"error\":\n return {\n ...state,\n data: void 0,\n error: action.error,\n failureCount: state.failureCount + 1,\n failureReason: action.error,\n isPaused: false,\n status: \"error\"\n };\n }\n };\n this.state = reducer(this.state);\n notifyManager.batch(() => {\n this.#observers.forEach((observer) => {\n observer.onMutationUpdate(action);\n });\n this.#mutationCache.notify({\n mutation: this,\n type: \"updated\",\n action\n });\n });\n }\n};\nfunction getDefaultState() {\n return {\n context: void 0,\n data: void 0,\n error: null,\n failureCount: 0,\n failureReason: null,\n isPaused: false,\n status: \"idle\",\n variables: void 0,\n submittedAt: 0\n };\n}\nexport {\n Mutation,\n getDefaultState\n};\n//# sourceMappingURL=mutation.js.map"],"names":["Mutation","Removable","#observers","#mutationCache","#retryer","config","getDefaultState","options","observer","x","variables","onContinue","#dispatch","createRetryer","failureCount","error","restored","isPaused","context","data","action","reducer","state","notifyManager"],"mappings":";AAIG,IAACA,IAAW,cAAcC,EAAU;AAAA,EACrCC;AAAA,EACAC;AAAA,EACAC;AAAA,EACA,YAAYC,GAAQ;AAClB,UAAO,GACP,KAAK,aAAaA,EAAO,YACzB,KAAKF,KAAiBE,EAAO,eAC7B,KAAKH,KAAa,CAAE,GACpB,KAAK,QAAQG,EAAO,SAASC,EAAiB,GAC9C,KAAK,WAAWD,EAAO,OAAO,GAC9B,KAAK,WAAY;AAAA,EACrB;AAAA,EACE,WAAWE,GAAS;AAClB,SAAK,UAAUA,GACf,KAAK,aAAa,KAAK,QAAQ,MAAM;AAAA,EACzC;AAAA,EACE,IAAI,OAAO;AACT,WAAO,KAAK,QAAQ;AAAA,EACxB;AAAA,EACE,YAAYC,GAAU;AACpB,IAAK,KAAKN,GAAW,SAASM,CAAQ,MACpC,KAAKN,GAAW,KAAKM,CAAQ,GAC7B,KAAK,eAAgB,GACrB,KAAKL,GAAe,OAAO;AAAA,MACzB,MAAM;AAAA,MACN,UAAU;AAAA,MACV,UAAAK;AAAA,IACR,CAAO;AAAA,EAEP;AAAA,EACE,eAAeA,GAAU;AACvB,SAAKN,KA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,CAAO,GACD,KAAKjB,GAAe,OAAO;AAAA,QACzB,UAAU;AAAA,QACV,MAAM;AAAA,QACN,QAAAiB;AAAA,MACR,CAAO;AAAA,IACP,CAAK;AAAA,EACL;AACA;AACA,SAASd,IAAkB;AACzB,SAAO;AAAA,IACL,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,IACP,cAAc;AAAA,IACd,eAAe;AAAA,IACf,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,aAAa;AAAA,EACd;AACH;","x_google_ignoreList":[0]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import "../hook-
|
|
4
|
-
import { S as g } from "../SyntaxHighlight-
|
|
3
|
+
import "../hook-7wZANGJP.js";
|
|
4
|
+
import { S as g } from "../SyntaxHighlight-CqKHkyEy.js";
|
|
5
5
|
import "../invariant-DAFpPywt.js";
|
|
6
6
|
import "./CodeBlock.js";
|
|
7
7
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as o from "react";
|
|
2
|
-
import { g as l } from "./mutation-
|
|
3
|
-
import { S as p, s as d, h, n as a, e as b, f as m, g as f } from "./hook-
|
|
2
|
+
import { g as l } from "./mutation-C1XCQTQL.js";
|
|
3
|
+
import { S as p, s as d, h, n as a, e as b, f as m, g as f } from "./hook-7wZANGJP.js";
|
|
4
4
|
var v = class extends p {
|
|
5
5
|
#e;
|
|
6
6
|
#i = void 0;
|
|
@@ -94,4 +94,4 @@ function g(t, s) {
|
|
|
94
94
|
export {
|
|
95
95
|
g as u
|
|
96
96
|
};
|
|
97
|
-
//# sourceMappingURL=useMutation-
|
|
97
|
+
//# sourceMappingURL=useMutation-BKvPttRn.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMutation-
|
|
1
|
+
{"version":3,"file":"useMutation-BKvPttRn.js","sources":["../../../node_modules/.pnpm/@tanstack+query-core@5.74.3/node_modules/@tanstack/query-core/build/modern/mutationObserver.js","../../../node_modules/.pnpm/@tanstack+react-query@5.74.3_react@19.1.0/node_modules/@tanstack/react-query/build/modern/useMutation.js"],"sourcesContent":["// src/mutationObserver.ts\nimport { getDefaultState } from \"./mutation.js\";\nimport { notifyManager } from \"./notifyManager.js\";\nimport { Subscribable } from \"./subscribable.js\";\nimport { hashKey, shallowEqualObjects } from \"./utils.js\";\nvar MutationObserver = class extends Subscribable {\n #client;\n #currentResult = void 0;\n #currentMutation;\n #mutateOptions;\n constructor(client, options) {\n super();\n this.#client = client;\n this.setOptions(options);\n this.bindMethods();\n this.#updateResult();\n }\n bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n }\n setOptions(options) {\n const prevOptions = this.options;\n this.options = this.#client.defaultMutationOptions(options);\n if (!shallowEqualObjects(this.options, prevOptions)) {\n this.#client.getMutationCache().notify({\n type: \"observerOptionsUpdated\",\n mutation: this.#currentMutation,\n observer: this\n });\n }\n if (prevOptions?.mutationKey && this.options.mutationKey && hashKey(prevOptions.mutationKey) !== hashKey(this.options.mutationKey)) {\n this.reset();\n } else if (this.#currentMutation?.state.status === \"pending\") {\n this.#currentMutation.setOptions(this.options);\n }\n }\n onUnsubscribe() {\n if (!this.hasListeners()) {\n this.#currentMutation?.removeObserver(this);\n }\n }\n onMutationUpdate(action) {\n this.#updateResult();\n this.#notify(action);\n }\n getCurrentResult() {\n return this.#currentResult;\n }\n reset() {\n this.#currentMutation?.removeObserver(this);\n this.#currentMutation = void 0;\n this.#updateResult();\n this.#notify();\n }\n mutate(variables, options) {\n this.#mutateOptions = options;\n this.#currentMutation?.removeObserver(this);\n this.#currentMutation = this.#client.getMutationCache().build(this.#client, this.options);\n this.#currentMutation.addObserver(this);\n return this.#currentMutation.execute(variables);\n }\n #updateResult() {\n const state = this.#currentMutation?.state ?? getDefaultState();\n this.#currentResult = {\n ...state,\n isPending: state.status === \"pending\",\n isSuccess: state.status === \"success\",\n isError: state.status === \"error\",\n isIdle: state.status === \"idle\",\n mutate: this.mutate,\n reset: this.reset\n };\n }\n #notify(action) {\n notifyManager.batch(() => {\n if (this.#mutateOptions && this.hasListeners()) {\n const variables = this.#currentResult.variables;\n const context = this.#currentResult.context;\n if (action?.type === \"success\") {\n this.#mutateOptions.onSuccess?.(action.data, variables, context);\n this.#mutateOptions.onSettled?.(action.data, null, variables, context);\n } else if (action?.type === \"error\") {\n this.#mutateOptions.onError?.(action.error, variables, context);\n this.#mutateOptions.onSettled?.(\n void 0,\n action.error,\n variables,\n context\n );\n }\n }\n this.listeners.forEach((listener) => {\n listener(this.#currentResult);\n });\n });\n }\n};\nexport {\n MutationObserver\n};\n//# sourceMappingURL=mutationObserver.js.map","\"use client\";\n\n// src/useMutation.ts\nimport * as React from \"react\";\nimport { MutationObserver, notifyManager } from \"@tanstack/query-core\";\nimport { useQueryClient } from \"./QueryClientProvider.js\";\nimport { noop, shouldThrowError } from \"./utils.js\";\nfunction useMutation(options, queryClient) {\n const client = useQueryClient(queryClient);\n const [observer] = React.useState(\n () => new MutationObserver(\n client,\n options\n )\n );\n React.useEffect(() => {\n observer.setOptions(options);\n }, [observer, options]);\n const result = React.useSyncExternalStore(\n React.useCallback(\n (onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)),\n [observer]\n ),\n () => observer.getCurrentResult(),\n () => observer.getCurrentResult()\n );\n const mutate = React.useCallback(\n (variables, mutateOptions) => {\n observer.mutate(variables, mutateOptions).catch(noop);\n },\n [observer]\n );\n if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) {\n throw result.error;\n }\n return { ...result, mutate, mutateAsync: result.mutate };\n}\nexport {\n useMutation\n};\n//# sourceMappingURL=useMutation.js.map"],"names":["MutationObserver","Subscribable","#client","#currentResult","#currentMutation","#mutateOptions","client","options","#updateResult","prevOptions","shallowEqualObjects","hashKey","action","#notify","variables","state","getDefaultState","notifyManager","context","listener","useMutation","queryClient","useQueryClient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AA,MACAC;AAAA,IACN;AAAA,EACG;AACD,EAAAiB,EAAM,UAAU,MAAM;AACpB,IAAAD,EAAS,WAAWhB,CAAO;AAAA,EAC/B,GAAK,CAACgB,GAAUhB,CAAO,CAAC;AACtB,QAAMkB,IAASD,EAAM;AAAA,IACnBA,EAAM;AAAA,MACJ,CAACE,MAAkBH,EAAS,UAAUN,EAAc,WAAWS,CAAa,CAAC;AAAA,MAC7E,CAACH,CAAQ;AAAA,IACV;AAAA,IACD,MAAMA,EAAS,iBAAkB;AAAA,IACjC,MAAMA,EAAS,iBAAgB;AAAA,EAChC,GACKI,IAASH,EAAM;AAAA,IACnB,CAACV,GAAWc,MAAkB;AAC5B,MAAAL,EAAS,OAAOT,GAAWc,CAAa,EAAE,MAAMC,CAAI;AAAA,IACrD;AAAA,IACD,CAACN,CAAQ;AAAA,EACV;AACD,MAAIE,EAAO,SAASK,EAAiBP,EAAS,QAAQ,cAAc,CAACE,EAAO,KAAK,CAAC;AAChF,UAAMA,EAAO;AAEf,SAAO,EAAE,GAAGA,GAAQ,QAAAE,GAAQ,aAAaF,EAAO,OAAQ;AAC1D;","x_google_ignoreList":[0,1]}
|
package/lib/zudoku.auth-auth0.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as yo } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { C as aa } from "./ClientOnly-E7hGysn1.js";
|
|
3
|
-
import { j as sa, u as To } from "./hook-
|
|
4
|
-
import { C as ca, A as qt, a as la } from "./errors-
|
|
3
|
+
import { j as sa, u as To } from "./hook-7wZANGJP.js";
|
|
4
|
+
import { C as ca, A as qt, a as la } from "./errors-D27ZTQgx.js";
|
|
5
5
|
/*! @azure/msal-common v15.7.0 2025-05-30 */
|
|
6
6
|
const d = {
|
|
7
7
|
LIBRARY_NAME: "MSAL.JS",
|
package/lib/zudoku.auth-clerk.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as l } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { LogOutIcon as g } from "lucide-react";
|
|
3
|
-
import { S as f, a as w, b as p } from "./SignUp-
|
|
4
|
-
import { u as n } from "./hook-
|
|
3
|
+
import { S as f, a as w, b as p } from "./SignUp-CRIKdWt9.js";
|
|
4
|
+
import { u as n } from "./hook-7wZANGJP.js";
|
|
5
5
|
const y = ({
|
|
6
6
|
clerkPubKey: d,
|
|
7
7
|
redirectToAfterSignOut: c = "/",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { j as ne } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { g as Le } from "./invariant-DAFpPywt.js";
|
|
3
3
|
import { C as Ue } from "./ClientOnly-E7hGysn1.js";
|
|
4
|
-
import { j as xe, u as S } from "./hook-
|
|
5
|
-
import { C as Ce, O as re, A as R, a as Ie } from "./errors-
|
|
4
|
+
import { j as xe, u as S } from "./hook-7wZANGJP.js";
|
|
5
|
+
import { C as Ce, O as re, A as R, a as Ie } from "./errors-D27ZTQgx.js";
|
|
6
6
|
var O = { exports: {} }, je = O.exports, oe;
|
|
7
7
|
function De() {
|
|
8
8
|
return oe || (oe = 1, function(t) {
|
package/lib/zudoku.components.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { a as ft, H as Se } from "./index.esm-BFcSKCe-.js";
|
|
2
2
|
import { z as mt, J as Wt } from "./index--oeBayMa.js";
|
|
3
3
|
import { R as Kt, S as Yt, u as fe, f as me, g as Gt, L as Oe, O as pt } from "./chunk-DQRVZFIR-BblmKnHy.js";
|
|
4
|
-
import { S as gt, r as yt, Q as Jt, n as O, t as Me, v as Ze, w as Z, x as Xt, y as es, z as ts, A as ss, B as De, D as $e, E as rs, h as ze, F as qe, G as as, e as vt, H as xt, l as ns, k as P, i as ee, I as _t, J as bt, K as is, j as H, u as os, d as ds, N as cs, Z as ls, m as us, C as hs } from "./hook-
|
|
5
|
-
import { B as kt, R as fs } from "./RouteGuard-
|
|
6
|
-
import { E as wt, S as T, a as ms, R as ps } from "./Slot-
|
|
4
|
+
import { S as gt, r as yt, Q as Jt, n as O, t as Me, v as Ze, w as Z, x as Xt, y as es, z as ts, A as ss, B as De, D as $e, E as rs, h as ze, F as qe, G as as, e as vt, H as xt, l as ns, k as P, i as ee, I as _t, J as bt, K as is, j as H, u as os, d as ds, N as cs, Z as ls, m as us, C as hs } from "./hook-7wZANGJP.js";
|
|
5
|
+
import { B as kt, R as fs } from "./RouteGuard-B7GVW4oL.js";
|
|
6
|
+
import { E as wt, S as T, a as ms, R as ps } from "./Slot-B5qSAnwR.js";
|
|
7
7
|
import { j as i } from "./jsx-runtime-C5mzlN2N.js";
|
|
8
8
|
import { Button as jt } from "./ui/Button.js";
|
|
9
9
|
import { Callout as gs } from "./ui/Callout.js";
|
|
10
|
-
import { M as ys } from "./mutation-
|
|
10
|
+
import { M as ys } from "./mutation-C1XCQTQL.js";
|
|
11
11
|
import * as D from "react";
|
|
12
12
|
import { createContext as Te, StrictMode as Nt, useRef as Ae, useEffect as V, useState as J, useCallback as vs, Suspense as Ee, memo as Ct, Component as xs, createElement as Le, useMemo as ge, useContext as _s } from "react";
|
|
13
13
|
import * as bs from "react-dom";
|
|
14
14
|
import { CircleFadingArrowUpIcon as ks, LoaderCircleIcon as ws, ExternalLink as js, CircleXIcon as Ns, ChevronRightIcon as Cs, SearchIcon as Ss, SunIcon as Os, MoonIcon as Ts, MenuIcon as As, PanelLeftIcon as Es } from "lucide-react";
|
|
15
15
|
import { C as pe } from "./ClientOnly-E7hGysn1.js";
|
|
16
16
|
import { c as C } from "./cn-wvCW-ho6.js";
|
|
17
|
-
import { A as Ps, s as Rs, a as Be, b as Is, H as Ms, P as Zs, c as Ds, V as $s, M as zs } from "./Markdown-
|
|
17
|
+
import { A as Ps, s as Rs, a as Be, b as Is, H as Ms, P as Zs, c as Ds, V as $s, M as zs } from "./Markdown-r4buN85T.js";
|
|
18
18
|
import { S as St } from "./Spinner-mNLZ6awP.js";
|
|
19
19
|
import { C as qs } from "./CategoryHeading-Cu2RwgjC.js";
|
|
20
20
|
import { isSearchPlugin as Ls, isProfileMenuPlugin as Bs, isNavigationPlugin as Fe, isAuthenticationPlugin as Fs, isEventConsumerPlugin as Qs, needsInitialization as Vs, isApiIdentityPlugin as Us, isMdxProviderPlugin as Hs, hasHead as Ws } from "./zudoku.plugins.js";
|
package/lib/zudoku.hooks.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z as p } from "./index--oeBayMa.js";
|
|
2
|
-
import { k as n, i as a, m as c } from "./hook-
|
|
3
|
-
import { C as H } from "./hook-
|
|
2
|
+
import { k as n, i as a, m as c } from "./hook-7wZANGJP.js";
|
|
3
|
+
import { C as H } from "./hook-7wZANGJP.js";
|
|
4
4
|
import { u as f } from "./useExposedProps-BZQkZneR.js";
|
|
5
5
|
import { useState as i, useEffect as E } from "react";
|
|
6
6
|
import { u as d } from "./index-QzXzw_ra.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { j as t } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { s as f } from "./index-BvvmIczU.js";
|
|
3
3
|
import { d as b, m as j } from "./chunk-DQRVZFIR-BblmKnHy.js";
|
|
4
|
-
import { u as x, d as y, j as m } from "./hook-
|
|
4
|
+
import { u as x, d as y, j as m } from "./hook-7wZANGJP.js";
|
|
5
5
|
import { H as v } from "./index.esm-BFcSKCe-.js";
|
|
6
6
|
import { Link as N } from "./zudoku.components.js";
|
|
7
|
-
import { H as S, M as w } from "./Markdown-
|
|
7
|
+
import { H as S, M as w } from "./Markdown-r4buN85T.js";
|
|
8
8
|
const H = ({
|
|
9
9
|
items: r,
|
|
10
10
|
filterCatalogItems: o = (n) => n,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
2
|
import { CheckIcon as _, XIcon as se, PencilLineIcon as ne, RotateCwIcon as ie, EyeOffIcon as re, EyeIcon as ae, CopyIcon as oe, TrashIcon as le, KeyRoundIcon as de } from "lucide-react";
|
|
3
|
-
import { D as ce, S as
|
|
3
|
+
import { D as ce, S as O, R as ue } from "./Slot-B5qSAnwR.js";
|
|
4
4
|
import { i as P } from "./invariant-DAFpPywt.js";
|
|
5
5
|
import { O as he, L as Q } from "./chunk-DQRVZFIR-BblmKnHy.js";
|
|
6
|
-
import { i as fe, k as pe, e as xe, d as me } from "./hook-
|
|
6
|
+
import { i as fe, k as pe, e as xe, d as me } from "./hook-7wZANGJP.js";
|
|
7
7
|
import { Button as j } from "./ui/Button.js";
|
|
8
|
-
import { u as z } from "./useMutation-
|
|
8
|
+
import { u as z } from "./useMutation-BKvPttRn.js";
|
|
9
9
|
import * as S from "react";
|
|
10
|
-
import ye, { createContext as q, useRef as D, useLayoutEffect as ge, useEffect as B, useId as L, useContext as
|
|
10
|
+
import ye, { createContext as q, useRef as D, useLayoutEffect as ge, useEffect as B, useId as L, useContext as $, useInsertionEffect as je, useMemo as M, useCallback as Ce, Children as ve, isValidElement as we, useState as E } from "react";
|
|
11
11
|
import { C as ke, a as be } from "./Card-DPhGbYUM.js";
|
|
12
12
|
import { D as U, e as W, a as X, b as Y, c as G, d as J, f as V, g as K } from "./Dialog-BxpuVLh9.js";
|
|
13
13
|
import { Input as Ee } from "./ui/Input.js";
|
|
@@ -64,7 +64,7 @@ function ze({ children: t, isPresent: i, anchorX: s }) {
|
|
|
64
64
|
top: 0,
|
|
65
65
|
left: 0,
|
|
66
66
|
right: 0
|
|
67
|
-
}), { nonce: u } =
|
|
67
|
+
}), { nonce: u } = $(Ae);
|
|
68
68
|
return je(() => {
|
|
69
69
|
const { width: m, height: h, top: x, left: d, right: c } = r.current;
|
|
70
70
|
if (i || !o.current || !m || !h)
|
|
@@ -111,7 +111,7 @@ function Se() {
|
|
|
111
111
|
return /* @__PURE__ */ new Map();
|
|
112
112
|
}
|
|
113
113
|
function qe(t = !0) {
|
|
114
|
-
const i =
|
|
114
|
+
const i = $(ee);
|
|
115
115
|
if (i === null)
|
|
116
116
|
return [!0, null];
|
|
117
117
|
const { isPresent: s, onExitComplete: n, register: o } = i, r = L();
|
|
@@ -148,21 +148,21 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
148
148
|
return r === "wait" && C.length && (w = C), v(H(w)), l(d), null;
|
|
149
149
|
}
|
|
150
150
|
process.env.NODE_ENV !== "production" && r === "wait" && p.length > 1 && console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);
|
|
151
|
-
const { forceRender: A } =
|
|
151
|
+
const { forceRender: A } = $(Pe);
|
|
152
152
|
return e.jsx(e.Fragment, { children: p.map((w) => {
|
|
153
153
|
const g = I(w), b = u && !h ? !1 : d === p || c.includes(g), T = () => {
|
|
154
154
|
if (k.has(g))
|
|
155
155
|
k.set(g, !0);
|
|
156
156
|
else
|
|
157
157
|
return;
|
|
158
|
-
let
|
|
158
|
+
let F = !0;
|
|
159
159
|
k.forEach((te) => {
|
|
160
|
-
te || (
|
|
161
|
-
}),
|
|
160
|
+
te || (F = !1);
|
|
161
|
+
}), F && (A?.(), v(f.current), u && x?.(), n && n());
|
|
162
162
|
};
|
|
163
163
|
return e.jsx(Me, { isPresent: b, initial: !y.current || s ? void 0 : !1, custom: i, presenceAffectsLayout: o, mode: r, onExitComplete: b ? void 0 : T, anchorX: m, children: w }, g);
|
|
164
164
|
}) });
|
|
165
|
-
},
|
|
165
|
+
}, $e = ({ service: t }) => {
|
|
166
166
|
const i = pe(), s = xe(), [n, o] = E(
|
|
167
167
|
null
|
|
168
168
|
), [r, u] = E(""), { data: m, isFetching: h } = me({
|
|
@@ -235,13 +235,13 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
235
235
|
o(null), u("");
|
|
236
236
|
};
|
|
237
237
|
return /* @__PURE__ */ e.jsxs("div", { className: "max-w-screen-lg h-full pt-(--padding-content-top) pb-(--padding-content-bottom)", children: [
|
|
238
|
-
/* @__PURE__ */ e.jsx(
|
|
238
|
+
/* @__PURE__ */ e.jsx(O.Target, { name: "api-keys-list-page" }),
|
|
239
239
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-between pb-3", children: [
|
|
240
240
|
/* @__PURE__ */ e.jsx("h1", { className: "font-medium text-2xl", children: "API Keys" }),
|
|
241
241
|
t.createKey && /* @__PURE__ */ e.jsx(j, { asChild: !0, children: /* @__PURE__ */ e.jsx(Q, { to: "/settings/api-keys/new", children: "Create API Key" }) })
|
|
242
242
|
] }),
|
|
243
243
|
/* @__PURE__ */ e.jsx("p", { children: "Create, manage, and monitor your API keys" }),
|
|
244
|
-
/* @__PURE__ */ e.jsx(
|
|
244
|
+
/* @__PURE__ */ e.jsx(O.Target, { name: "api-keys-list-page-before-keys" }),
|
|
245
245
|
/* @__PURE__ */ e.jsx("div", { className: "h-8" }),
|
|
246
246
|
/* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-8", children: m.length === 0 ? /* @__PURE__ */ e.jsxs("div", { className: "flex col-span-full flex-col justify-center gap-4 items-center p-8 border rounded-sm bg-muted/30 text-muted-foreground", children: [
|
|
247
247
|
/* @__PURE__ */ e.jsxs("p", { className: "text-center", children: [
|
|
@@ -365,7 +365,7 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
365
365
|
] }),
|
|
366
366
|
/* @__PURE__ */ e.jsx("div", { className: "col-span-full grid-cols-subgrid grid", children: /* @__PURE__ */ e.jsx(Le, { children: a.apiKeys.map((l) => /* @__PURE__ */ e.jsxs(ye.Fragment, { children: [
|
|
367
367
|
/* @__PURE__ */ e.jsx(
|
|
368
|
-
|
|
368
|
+
Oe,
|
|
369
369
|
{
|
|
370
370
|
apiKey: l,
|
|
371
371
|
onDeleteKey: () => {
|
|
@@ -386,10 +386,10 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
386
386
|
}
|
|
387
387
|
) })
|
|
388
388
|
] });
|
|
389
|
-
},
|
|
389
|
+
}, Fe = (t) => {
|
|
390
390
|
const i = /* @__PURE__ */ new Date(), s = new Date(t), n = Math.floor((i.getTime() - s.getTime()) / 1e3), o = new Intl.RelativeTimeFormat("en", { numeric: "auto" });
|
|
391
391
|
return n < 60 ? o.format(-n, "second") : n < 3600 ? o.format(-Math.floor(n / 60), "minute") : n < 86400 ? o.format(-Math.floor(n / 3600), "hour") : n < 2592e3 ? o.format(-Math.floor(n / 86400), "day") : n < 31536e3 ? o.format(-Math.floor(n / 2592e3), "month") : o.format(-Math.floor(n / 31536e3), "year");
|
|
392
|
-
},
|
|
392
|
+
}, Oe = ({
|
|
393
393
|
apiKey: t,
|
|
394
394
|
onDeleteKey: i,
|
|
395
395
|
className: s
|
|
@@ -441,7 +441,7 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
441
441
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-1 mt-0.5 text-nowrap", children: [
|
|
442
442
|
h && /* @__PURE__ */ e.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
443
443
|
"Created ",
|
|
444
|
-
|
|
444
|
+
Fe(h),
|
|
445
445
|
"."
|
|
446
446
|
] }),
|
|
447
447
|
" ",
|
|
@@ -522,9 +522,7 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
522
522
|
headers: {
|
|
523
523
|
"Content-Type": "application/json"
|
|
524
524
|
},
|
|
525
|
-
body: JSON.stringify({
|
|
526
|
-
expiresOn: /* @__PURE__ */ new Date()
|
|
527
|
-
})
|
|
525
|
+
body: JSON.stringify({})
|
|
528
526
|
}
|
|
529
527
|
)
|
|
530
528
|
)
|
|
@@ -576,7 +574,7 @@ const Le = ({ children: t, custom: i, initial: s = !0, onExitComplete: n, presen
|
|
|
576
574
|
children: [
|
|
577
575
|
{
|
|
578
576
|
path: "/settings/api-keys",
|
|
579
|
-
element: /* @__PURE__ */ e.jsx(
|
|
577
|
+
element: /* @__PURE__ */ e.jsx($e, { service: i })
|
|
580
578
|
}
|
|
581
579
|
// {
|
|
582
580
|
// path: "/settings/api-keys/new",
|