zudoku 0.23.6 → 0.23.7

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.
@@ -1,6 +1,6 @@
1
1
  import "./jsx-runtime-Dx-03ztt.js";
2
2
  import "./chunk-D52XG6IA-Dl7HLe6j.js";
3
- import { o as a } from "./index-DStSNvP-.js";
3
+ import { o as a } from "./index-D8Hk4b5L.js";
4
4
  import "./utils-B4O1uet5.js";
5
5
  import "lucide-react";
6
6
  import "./hook-DgGeo5iL.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.23.6",
3
+ "version": "0.23.7",
4
4
  "type": "module",
5
5
  "homepage": "https://zudoku.dev",
6
6
  "repository": {
@@ -30,10 +30,6 @@ export const OpenApiRoute = ({
30
30
 
31
31
  const currentVersion = version ?? versions.at(0);
32
32
 
33
- if (!currentVersion) {
34
- throw new Error("No version found");
35
- }
36
-
37
33
  return (
38
34
  <OasConfigProvider
39
35
  value={{
@@ -1,5 +1,5 @@
1
1
  import { createContext, useContext } from "react";
2
- import { OasPluginContext } from "./interfaces.js";
2
+ import { type OasPluginContext } from "./interfaces.js";
3
3
 
4
4
  const OasContext = createContext<{ config: OasPluginContext } | undefined>(
5
5
  undefined,
@@ -26,6 +26,6 @@ export type OasPluginContext = {
26
26
  server?: string;
27
27
  navigationId?: string;
28
28
  skipPreload?: boolean;
29
- version: string;
29
+ version?: string;
30
30
  versions: Record<string, string>;
31
31
  } & ContextOasSource;
@@ -1 +0,0 @@
1
- {"version":3,"file":"Route-C8nwd9A2.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 if (!currentVersion) {\n throw new Error(\"No version found\");\n }\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;AAE/C,MAAI,CAACM;AACG,UAAA,IAAI,MAAM,kBAAkB;AAIlC,SAAAC,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;"}