zudoku 0.23.6 → 0.23.8
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/lib/plugins/openapi/Route.js +0 -3
- package/dist/lib/plugins/openapi/Route.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +10 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/context.d.ts +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +1 -1
- package/dist/vite/plugin-api.js +5 -1
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-theme-css.js +53 -1
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/lib/{OperationList-n4U_BHmO.js → OperationList-Cdbaz-V3.js} +3 -3
- package/lib/OperationList-Cdbaz-V3.js.map +1 -0
- package/lib/{Route-C8nwd9A2.js → Route-Ag5MH86N.js} +7 -9
- package/lib/Route-Ag5MH86N.js.map +1 -0
- package/lib/context-h_UkBLvr.js.map +1 -1
- package/lib/{index-DStSNvP-.js → index-Bfm--TJU.js} +3 -3
- package/lib/{index-DStSNvP-.js.map → index-Bfm--TJU.js.map} +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/lib/plugins/openapi/Route.tsx +0 -4
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +13 -1
- package/src/lib/plugins/openapi/context.tsx +1 -1
- package/src/lib/plugins/openapi/interfaces.ts +1 -1
- package/lib/OperationList-n4U_BHmO.js.map +0 -1
- package/lib/Route-C8nwd9A2.js.map +0 -1
|
@@ -2,36 +2,34 @@ import { j as e } from "./jsx-runtime-Dx-03ztt.js";
|
|
|
2
2
|
import { c as u, O as m } from "./chunk-D52XG6IA-Dl7HLe6j.js";
|
|
3
3
|
import { j } from "./utils-B4O1uet5.js";
|
|
4
4
|
import { O, G as l } from "./context-h_UkBLvr.js";
|
|
5
|
-
const
|
|
5
|
+
const d = ({
|
|
6
6
|
basePath: i,
|
|
7
7
|
versions: s,
|
|
8
8
|
config: t,
|
|
9
|
-
client:
|
|
9
|
+
client: o
|
|
10
10
|
}) => {
|
|
11
11
|
const { version: r } = u(), a = t.type === "file" ? {
|
|
12
12
|
type: t.type,
|
|
13
13
|
input: r ? t.input[r] : Object.values(t.input).at(0)
|
|
14
|
-
} : { type: t.type, input: t.input },
|
|
15
|
-
if (!o)
|
|
16
|
-
throw new Error("No version found");
|
|
14
|
+
} : { type: t.type, input: t.input }, n = r ?? s.at(0);
|
|
17
15
|
return /* @__PURE__ */ e.jsx(
|
|
18
16
|
O,
|
|
19
17
|
{
|
|
20
18
|
value: {
|
|
21
19
|
config: {
|
|
22
20
|
...t,
|
|
23
|
-
version:
|
|
21
|
+
version: n,
|
|
24
22
|
versions: Object.fromEntries(
|
|
25
23
|
s.map((p) => [p, j(i, p)])
|
|
26
24
|
),
|
|
27
25
|
...a
|
|
28
26
|
}
|
|
29
27
|
},
|
|
30
|
-
children: /* @__PURE__ */ e.jsx(l, { client:
|
|
28
|
+
children: /* @__PURE__ */ e.jsx(l, { client: o, children: /* @__PURE__ */ e.jsx(m, {}) })
|
|
31
29
|
}
|
|
32
30
|
);
|
|
33
31
|
};
|
|
34
32
|
export {
|
|
35
|
-
|
|
33
|
+
d as OpenApiRoute
|
|
36
34
|
};
|
|
37
|
-
//# sourceMappingURL=Route-
|
|
35
|
+
//# sourceMappingURL=Route-Ag5MH86N.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Route-Ag5MH86N.js","sources":["../src/lib/plugins/openapi/Route.tsx"],"sourcesContent":["import { Outlet, useParams } from \"react-router\";\nimport { joinPath } from \"../../util/joinPath.js\";\nimport type { GraphQLClient } from \"./client/GraphQLClient.js\";\nimport { GraphQLProvider } from \"./client/GraphQLContext.js\";\nimport { OasConfigProvider } from \"./context.js\";\nimport { type OasPluginConfig } from \"./interfaces.js\";\n\nexport const OpenApiRoute = ({\n basePath,\n versions,\n config,\n client,\n}: {\n basePath: string;\n versions: string[];\n config: OasPluginConfig;\n client: GraphQLClient;\n}) => {\n const { version } = useParams<\"version\">();\n\n const input =\n config.type === \"file\"\n ? {\n type: config.type,\n input: version\n ? config.input[version]!\n : Object.values(config.input).at(0)!,\n }\n : { type: config.type, input: config.input };\n\n const currentVersion = version ?? versions.at(0);\n\n return (\n <OasConfigProvider\n value={{\n config: {\n ...config,\n version: currentVersion,\n versions: Object.fromEntries(\n versions.map((version) => [version, joinPath(basePath, version)]),\n ),\n ...input,\n },\n }}\n >\n <GraphQLProvider client={client}>\n <Outlet />\n </GraphQLProvider>\n </OasConfigProvider>\n );\n};\n"],"names":["OpenApiRoute","basePath","versions","config","client","version","useParams","input","currentVersion","jsx","OasConfigProvider","joinPath","GraphQLProvider","Outlet"],"mappings":";;;;AAOO,MAAMA,IAAe,CAAC;AAAA,EAC3B,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AACF,MAKM;AACE,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAqB,GAEnCC,IACJJ,EAAO,SAAS,SACZ;AAAA,IACE,MAAMA,EAAO;AAAA,IACb,OAAOE,IACHF,EAAO,MAAME,CAAO,IACpB,OAAO,OAAOF,EAAO,KAAK,EAAE,GAAG,CAAC;AAAA,EAAA,IAEtC,EAAE,MAAMA,EAAO,MAAM,OAAOA,EAAO,MAAM,GAEzCK,IAAiBH,KAAWH,EAAS,GAAG,CAAC;AAG7C,SAAAO,gBAAAA,EAAA;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,QACL,QAAQ;AAAA,UACN,GAAGP;AAAA,UACH,SAASK;AAAA,UACT,UAAU,OAAO;AAAA,YACfN,EAAS,IAAI,CAACG,MAAY,CAACA,GAASM,EAASV,GAAUI,CAAO,CAAC,CAAC;AAAA,UAClE;AAAA,UACA,GAAGE;AAAA,QAAA;AAAA,MAEP;AAAA,MAEA,UAACE,gBAAAA,EAAAA,IAAAG,GAAA,EAAgB,QAAAR,GACf,UAAAK,gBAAAA,EAAA,IAACI,KAAO,EACV,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-h_UkBLvr.js","sources":["../src/lib/plugins/openapi/client/GraphQLContext.tsx","../src/lib/plugins/openapi/context.tsx"],"sourcesContent":["import { createContext, type ReactNode } from \"react\";\nimport { GraphQLClient } from \"./GraphQLClient.js\";\n\nexport const GraphQLContext = createContext<GraphQLClient | undefined>(\n undefined,\n);\n\nexport const GraphQLProvider = ({\n children,\n client,\n}: {\n children: ReactNode;\n client: GraphQLClient;\n}) => (\n <GraphQLContext.Provider value={client}>{children}</GraphQLContext.Provider>\n);\n","import { createContext, useContext } from \"react\";\nimport { OasPluginContext } from \"./interfaces.js\";\n\nconst OasContext = createContext<{ config: OasPluginContext } | undefined>(\n undefined,\n);\n\nexport const OasConfigProvider = OasContext.Provider;\n\nexport const useOasConfig = () => {\n const ctx = useContext(OasContext);\n if (!ctx) {\n throw new Error(\"useOasConfig must be used within a OasConfigProvider\");\n }\n return ctx.config;\n};\n"],"names":["GraphQLContext","createContext","GraphQLProvider","children","client","OasContext","OasConfigProvider","useOasConfig","ctx","useContext"],"mappings":";;AAGO,MAAMA,IAAiBC;AAAA,EAC5B;AACF,GAEaC,IAAkB,CAAC;AAAA,EAC9B,UAAAC;AAAA,EACA,QAAAC;AACF,4BAIGJ,EAAe,UAAf,EAAwB,OAAOI,GAAS,UAAAD,EAAS,CAAA,GCX9CE,IAAaJ;AAAA,EACjB;AACF,GAEaK,IAAoBD,EAAW,UAE/BE,IAAe,MAAM;AAC1B,QAAAC,IAAMC,EAAWJ,CAAU;AACjC,MAAI,CAACG;AACG,UAAA,IAAI,MAAM,sDAAsD;AAExE,SAAOA,EAAI;AACb;"}
|
|
1
|
+
{"version":3,"file":"context-h_UkBLvr.js","sources":["../src/lib/plugins/openapi/client/GraphQLContext.tsx","../src/lib/plugins/openapi/context.tsx"],"sourcesContent":["import { createContext, type ReactNode } from \"react\";\nimport { GraphQLClient } from \"./GraphQLClient.js\";\n\nexport const GraphQLContext = createContext<GraphQLClient | undefined>(\n undefined,\n);\n\nexport const GraphQLProvider = ({\n children,\n client,\n}: {\n children: ReactNode;\n client: GraphQLClient;\n}) => (\n <GraphQLContext.Provider value={client}>{children}</GraphQLContext.Provider>\n);\n","import { createContext, useContext } from \"react\";\nimport { type OasPluginContext } from \"./interfaces.js\";\n\nconst OasContext = createContext<{ config: OasPluginContext } | undefined>(\n undefined,\n);\n\nexport const OasConfigProvider = OasContext.Provider;\n\nexport const useOasConfig = () => {\n const ctx = useContext(OasContext);\n if (!ctx) {\n throw new Error(\"useOasConfig must be used within a OasConfigProvider\");\n }\n return ctx.config;\n};\n"],"names":["GraphQLContext","createContext","GraphQLProvider","children","client","OasContext","OasConfigProvider","useOasConfig","ctx","useContext"],"mappings":";;AAGO,MAAMA,IAAiBC;AAAA,EAC5B;AACF,GAEaC,IAAkB,CAAC;AAAA,EAC9B,UAAAC;AAAA,EACA,QAAAC;AACF,4BAIGJ,EAAe,UAAf,EAAwB,OAAOI,GAAS,UAAAD,EAAS,CAAA,GCX9CE,IAAaJ;AAAA,EACjB;AACF,GAEaK,IAAoBD,EAAW,UAE/BE,IAAe,MAAM;AAC1B,QAAAC,IAAMC,EAAWJ,CAAU;AACjC,MAAI,CAACG;AACG,UAAA,IAAI,MAAM,sDAAsD;AAExE,SAAOA,EAAI;AACb;"}
|
|
@@ -1248,7 +1248,7 @@ const ne = (e) => Math.abs(
|
|
|
1248
1248
|
{
|
|
1249
1249
|
path: n + "/:version?",
|
|
1250
1250
|
async lazy() {
|
|
1251
|
-
const { OpenApiRoute: r } = await import("./Route-
|
|
1251
|
+
const { OpenApiRoute: r } = await import("./Route-Ag5MH86N.js");
|
|
1252
1252
|
return {
|
|
1253
1253
|
element: /* @__PURE__ */ t.jsx(
|
|
1254
1254
|
r,
|
|
@@ -1265,7 +1265,7 @@ const ne = (e) => Math.abs(
|
|
|
1265
1265
|
{
|
|
1266
1266
|
index: !0,
|
|
1267
1267
|
async lazy() {
|
|
1268
|
-
const { OperationList: r } = await import("./OperationList-
|
|
1268
|
+
const { OperationList: r } = await import("./OperationList-Cdbaz-V3.js");
|
|
1269
1269
|
return { element: /* @__PURE__ */ t.jsx(r, {}) };
|
|
1270
1270
|
}
|
|
1271
1271
|
}
|
|
@@ -1281,4 +1281,4 @@ export {
|
|
|
1281
1281
|
ft as g,
|
|
1282
1282
|
jn as o
|
|
1283
1283
|
};
|
|
1284
|
-
//# sourceMappingURL=index-
|
|
1284
|
+
//# sourceMappingURL=index-Bfm--TJU.js.map
|