zudoku 0.12.2 → 0.13.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 +3 -3
- package/dist/app/main.js.map +1 -1
- package/dist/cli/dev/handler.js +2 -2
- package/dist/cli/dev/handler.js.map +1 -1
- package/dist/config/validators/validate.d.ts +42 -23
- package/dist/config/validators/validate.js +6 -2
- package/dist/config/validators/validate.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/lib/components/Banner.js +7 -1
- package/dist/lib/components/Banner.js.map +1 -1
- package/dist/lib/components/Header.js +1 -1
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Layout.js +1 -1
- package/dist/lib/components/Layout.js.map +1 -1
- package/dist/lib/components/MobileTopNavigation.js +2 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/Search.js +1 -1
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/SlotletProvider.d.ts +9 -2
- package/dist/lib/components/SlotletProvider.js +4 -2
- package/dist/lib/components/SlotletProvider.js.map +1 -1
- package/dist/lib/components/index.d.ts +2 -1
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/core/DevPortalContext.d.ts +1 -1
- package/dist/lib/oas/graphql/index.js +2 -6
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/custom-pages/CustomPage.d.ts +2 -0
- package/dist/lib/plugins/custom-pages/CustomPage.js +10 -0
- package/dist/lib/plugins/custom-pages/CustomPage.js.map +1 -0
- package/dist/lib/plugins/custom-pages/index.d.ts +10 -0
- package/dist/lib/plugins/custom-pages/index.js +11 -0
- package/dist/lib/plugins/custom-pages/index.js.map +1 -0
- package/dist/lib/plugins/openapi/Endpoint.js +1 -1
- package/dist/lib/plugins/openapi/Endpoint.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationList.js +1 -1
- package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
- package/dist/lib/plugins/openapi/Route.d.ts +1 -1
- package/dist/lib/plugins/openapi/Route.js +1 -1
- package/dist/lib/plugins/openapi/Route.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/client/createMemoryClient.js +1 -1
- package/dist/lib/plugins/openapi/client/createMemoryClient.js.map +1 -1
- package/dist/lib/plugins/openapi/client/createWorkerClient.js +1 -1
- package/dist/lib/plugins/openapi/client/createWorkerClient.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +1 -1
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/ui/Callout.d.ts +36 -35
- package/dist/lib/ui/Callout.js.map +1 -1
- package/dist/lib/ui/Drawer.d.ts +8 -10
- package/dist/lib/ui/Drawer.js.map +1 -1
- package/dist/lib/util/useExposedProps.d.ts +2 -0
- package/dist/lib/util/useExposedProps.js +8 -0
- package/dist/lib/util/useExposedProps.js.map +1 -0
- package/dist/vite/config.js +2 -0
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.d.ts +6 -1
- package/dist/vite/dev-server.js +13 -3
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-component.js +0 -1
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-custom-pages.d.ts +4 -0
- package/dist/vite/plugin-custom-pages.js +30 -0
- package/dist/vite/plugin-custom-pages.js.map +1 -0
- package/dist/vite/plugin.js +2 -0
- package/dist/vite/plugin.js.map +1 -1
- package/lib/{AuthenticationPlugin-Bx9FK124.js → AuthenticationPlugin-CbgJ5SAh.js} +3 -3
- package/lib/{AuthenticationPlugin-Bx9FK124.js.map → AuthenticationPlugin-CbgJ5SAh.js.map} +1 -1
- package/lib/{DeveloperHint-YeWHKvyr.js → DeveloperHint-CiXPc9Xm.js} +2 -2
- package/lib/{DeveloperHint-YeWHKvyr.js.map → DeveloperHint-CiXPc9Xm.js.map} +1 -1
- package/lib/ErrorPage-B-zoPPVx.js +15 -0
- package/lib/{ErrorPage-CsZAN_za.js.map → ErrorPage-B-zoPPVx.js.map} +1 -1
- package/lib/Input-QMLhK7Rb.js +2229 -0
- package/lib/Input-QMLhK7Rb.js.map +1 -0
- package/lib/{Markdown-DapSf3wG.js → Markdown-D6Nze6qq.js} +3281 -5392
- package/lib/Markdown-D6Nze6qq.js.map +1 -0
- package/lib/{MdxPage-BqBWsXZ1.js → MdxPage-DBhq6-5F.js} +15 -15
- package/lib/{MdxPage-BqBWsXZ1.js.map → MdxPage-DBhq6-5F.js.map} +1 -1
- package/lib/{OperationList-CYrmxPa8.js → OperationList-Ba24gUd2.js} +50 -51
- package/lib/OperationList-Ba24gUd2.js.map +1 -0
- package/lib/{Route-Q5mqNQrv.js → Route-DI38nxYt.js} +3 -4
- package/lib/Route-DI38nxYt.js.map +1 -0
- package/lib/SidebarBadge-B9-VJSQr.js +503 -0
- package/lib/SidebarBadge-B9-VJSQr.js.map +1 -0
- package/lib/{SlotletProvider-D3UD5Go3.js → SlotletProvider-Cb8mGpBO.js} +46 -46
- package/lib/{SlotletProvider-D3UD5Go3.js.map → SlotletProvider-Cb8mGpBO.js.map} +1 -1
- package/lib/ZudokuContext-BEmsYQoq.js +1173 -0
- package/lib/ZudokuContext-BEmsYQoq.js.map +1 -0
- package/lib/assets/{index-B9EWVYfo.js → index-B_Jk_Yzp.js} +968 -938
- package/lib/assets/index-B_Jk_Yzp.js.map +1 -0
- package/lib/assets/{worker-Bcj4NA2p.js → worker-Bf8vjASY.js} +4582 -4303
- package/lib/assets/worker-Bf8vjASY.js.map +1 -0
- package/lib/cn-BmFQLtkS.js +2279 -0
- package/lib/cn-BmFQLtkS.js.map +1 -0
- package/lib/{index-BG0g4WW0.js → index-BRCiYFaL.js} +747 -737
- package/lib/index-BRCiYFaL.js.map +1 -0
- package/lib/{index-CLd8ycZz.js → index-CkwDvuPt.js} +947 -917
- package/lib/index-CkwDvuPt.js.map +1 -0
- package/lib/{index-LNp6rxyU.js → index-D06ATMgg.js} +2 -2
- package/lib/{index-LNp6rxyU.js.map → index-D06ATMgg.js.map} +1 -1
- package/lib/{index-BlJ2rj99.js → index-DA74gNq3.js} +1124 -974
- package/lib/index-DA74gNq3.js.map +1 -0
- package/lib/index-DJqnphbT.js +35 -0
- package/lib/{index-Bn6Lc9tq.js.map → index-DJqnphbT.js.map} +1 -1
- package/lib/{index-BngPzhKn.js → index-dgcPryXi.js} +3 -3
- package/lib/{index-BngPzhKn.js.map → index-dgcPryXi.js.map} +1 -1
- package/lib/{index-Dolisrci.js → index-g_JJcuFg.js} +603 -549
- package/lib/index-g_JJcuFg.js.map +1 -0
- package/lib/router-Oe6YmY6B.js +3024 -0
- package/lib/router-Oe6YmY6B.js.map +1 -0
- package/lib/state-CsuHT8ZO.js +183 -0
- package/lib/state-CsuHT8ZO.js.map +1 -0
- package/lib/urql-core-KJnLL26g.js +1455 -0
- package/lib/urql-core-KJnLL26g.js.map +1 -0
- package/lib/useExposedProps-Csw8oAlt.js +9 -0
- package/lib/useExposedProps-Csw8oAlt.js.map +1 -0
- package/lib/{utils-ByIc_KIM.js → utils-Chi3p5nE.js} +4 -4
- package/lib/utils-Chi3p5nE.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +1 -1
- package/lib/zudoku.auth-clerk.js +2 -2
- package/lib/zudoku.auth-openid.js +363 -350
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +1697 -1623
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +4599 -4319
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +7 -7
- package/lib/zudoku.plugin-custom-pages.js +21 -0
- package/lib/zudoku.plugin-custom-pages.js.map +1 -0
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +8 -8
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/package.json +61 -68
- package/src/app/main.tsx +3 -3
- package/src/lib/components/Banner.tsx +12 -2
- package/src/lib/components/Header.tsx +4 -2
- package/src/lib/components/Layout.tsx +1 -0
- package/src/lib/components/MobileTopNavigation.tsx +4 -0
- package/src/lib/components/Search.tsx +1 -1
- package/src/lib/components/SlotletProvider.tsx +27 -4
- package/src/lib/components/index.ts +1 -1
- package/src/lib/core/DevPortalContext.ts +1 -1
- package/src/lib/oas/graphql/index.ts +3 -11
- package/src/lib/plugins/custom-pages/CustomPage.tsx +15 -0
- package/src/lib/plugins/custom-pages/index.tsx +24 -0
- package/src/lib/plugins/openapi/Endpoint.tsx +1 -1
- package/src/lib/plugins/openapi/OperationList.tsx +1 -1
- package/src/lib/plugins/openapi/Route.tsx +1 -2
- package/src/lib/plugins/openapi/Sidecar.tsx +1 -1
- package/src/lib/plugins/openapi/client/createMemoryClient.ts +1 -6
- package/src/lib/plugins/openapi/client/createWorkerClient.ts +1 -6
- package/src/lib/plugins/openapi/index.tsx +1 -5
- package/src/lib/ui/Callout.tsx +7 -6
- package/src/lib/ui/Drawer.tsx +38 -36
- package/src/lib/util/useExposedProps.tsx +10 -0
- package/dist/lib/plugins/custom-page/index.d.ts +0 -8
- package/dist/lib/plugins/custom-page/index.js +0 -12
- package/dist/lib/plugins/custom-page/index.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/Editor.d.ts +0 -1
- package/dist/lib/plugins/openapi/playground/Editor.js +0 -5
- package/dist/lib/plugins/openapi/playground/Editor.js.map +0 -1
- package/dist/lib/plugins/openapi/util/urql.d.ts +0 -7
- package/dist/lib/plugins/openapi/util/urql.js +0 -8
- package/dist/lib/plugins/openapi/util/urql.js.map +0 -1
- package/lib/CategoryHeading-ovR-zHRq.js +0 -10
- package/lib/CategoryHeading-ovR-zHRq.js.map +0 -1
- package/lib/ErrorPage-CsZAN_za.js +0 -16
- package/lib/Input-CtVUl3eT.js +0 -2198
- package/lib/Input-CtVUl3eT.js.map +0 -1
- package/lib/Markdown-DapSf3wG.js.map +0 -1
- package/lib/OperationList-CYrmxPa8.js.map +0 -1
- package/lib/Route-Q5mqNQrv.js.map +0 -1
- package/lib/SidebarBadge-Dx7jtnoA.js +0 -498
- package/lib/SidebarBadge-Dx7jtnoA.js.map +0 -1
- package/lib/ZudokuContext-cr-pTRY1.js +0 -1084
- package/lib/ZudokuContext-cr-pTRY1.js.map +0 -1
- package/lib/_commonjsHelpers-BkfeUUK-.js +0 -29
- package/lib/_commonjsHelpers-BkfeUUK-.js.map +0 -1
- package/lib/assets/index-B9EWVYfo.js.map +0 -1
- package/lib/assets/worker-Bcj4NA2p.js.map +0 -1
- package/lib/index-BG0g4WW0.js.map +0 -1
- package/lib/index-BlJ2rj99.js.map +0 -1
- package/lib/index-Bn6Lc9tq.js +0 -9
- package/lib/index-CLd8ycZz.js.map +0 -1
- package/lib/index-Dolisrci.js.map +0 -1
- package/lib/router-D2p7Olpn.js +0 -2971
- package/lib/router-D2p7Olpn.js.map +0 -1
- package/lib/state-hNe1dw4B.js +0 -548
- package/lib/state-hNe1dw4B.js.map +0 -1
- package/lib/urql-YhcsXYy8.js +0 -1591
- package/lib/urql-YhcsXYy8.js.map +0 -1
- package/lib/utils-ByIc_KIM.js.map +0 -1
- package/lib/zudoku.plugin-custom-page.js +0 -13
- package/lib/zudoku.plugin-custom-page.js.map +0 -1
- package/src/lib/plugins/custom-page/index.tsx +0 -22
- package/src/lib/plugins/openapi/playground/Editor.tsx +0 -4
- package/src/lib/plugins/openapi/util/urql.ts +0 -8
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { S as x, R as f } from "./SlotletProvider-
|
|
3
|
-
import { u as g, a as d, I as j, S as v, b as w, c as b, d as k, e as K, f as m } from "./Input-
|
|
4
|
-
import { a as N, L as u, O as I } from "./index-
|
|
5
|
-
import { u as h, a as E, b as S } from "./ZudokuContext-
|
|
6
|
-
import { B as l,
|
|
7
|
-
import { D as C } from "./DeveloperHint-
|
|
2
|
+
import { S as x, R as f } from "./SlotletProvider-Cb8mGpBO.js";
|
|
3
|
+
import { u as g, a as d, I as j, S as v, b as w, c as b, d as k, e as K, f as m } from "./Input-QMLhK7Rb.js";
|
|
4
|
+
import { a as N, L as u, O as I } from "./index-BRCiYFaL.js";
|
|
5
|
+
import { u as h, a as E, b as S } from "./ZudokuContext-BEmsYQoq.js";
|
|
6
|
+
import { B as l, n as A } from "./index-g_JJcuFg.js";
|
|
7
|
+
import { D as C } from "./DeveloperHint-CiXPc9Xm.js";
|
|
8
8
|
import { RotateCwIcon as P, TrashIcon as D, EyeOffIcon as R, EyeIcon as q, CheckIcon as O, CopyIcon as z } from "lucide-react";
|
|
9
9
|
import { useState as p } from "react";
|
|
10
|
-
import {
|
|
10
|
+
import { c as T } from "./cn-BmFQLtkS.js";
|
|
11
11
|
function c(t, s) {
|
|
12
12
|
if (t)
|
|
13
13
|
return;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { j as s } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
+
import n from "react";
|
|
3
|
+
import { c as a } from "./cn-BmFQLtkS.js";
|
|
4
|
+
import { u as c } from "./useExposedProps-Csw8oAlt.js";
|
|
5
|
+
const u = ({
|
|
6
|
+
element: e,
|
|
7
|
+
render: t,
|
|
8
|
+
prose: o = !0
|
|
9
|
+
}) => {
|
|
10
|
+
const r = c(), m = t ? n.createElement(t, r) : e;
|
|
11
|
+
return /* @__PURE__ */ s.jsx("div", { className: a(o && "prose max-w-full"), children: m });
|
|
12
|
+
}, f = (e) => ({
|
|
13
|
+
getRoutes: () => e.map(({ path: t, ...o }) => ({
|
|
14
|
+
path: t,
|
|
15
|
+
element: /* @__PURE__ */ s.jsx(u, { ...o })
|
|
16
|
+
}))
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
f as customPagesPlugin
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=zudoku.plugin-custom-pages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zudoku.plugin-custom-pages.js","sources":["../src/lib/plugins/custom-pages/CustomPage.tsx","../src/lib/plugins/custom-pages/index.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn } from \"../../util/cn.js\";\nimport { useExposedProps } from \"../../util/useExposedProps.js\";\nimport type { CustomPageConfig } from \"./index.js\";\n\nexport const CustomPage = ({\n element,\n render,\n prose = true,\n}: Omit<CustomPageConfig, \"path\">) => {\n const slotletProps = useExposedProps();\n const content = render ? React.createElement(render, slotletProps) : element;\n\n return <div className={cn(prose && \"prose max-w-full\")}>{content}</div>;\n};\n","import { type ComponentType, type ReactNode } from \"react\";\nimport type { RouteObject } from \"react-router-dom\";\nimport { type ExposedComponentProps } from \"../../components/SlotletProvider.js\";\nimport type { DevPortalPlugin, NavigationPlugin } from \"../../core/plugins.js\";\nimport { CustomPage } from \"./CustomPage.js\";\n\nexport type CustomPageConfig = {\n path: string;\n prose?: boolean;\n element?: ReactNode;\n render?: ComponentType<ExposedComponentProps>;\n};\n\nexport const customPagesPlugin = (\n config: CustomPageConfig[],\n): DevPortalPlugin & NavigationPlugin => {\n return {\n getRoutes: (): RouteObject[] =>\n config.map(({ path, ...props }) => ({\n path,\n element: <CustomPage {...props} />,\n })),\n };\n};\n"],"names":["CustomPage","element","render","prose","slotletProps","useExposedProps","content","React","cn","customPagesPlugin","config","path","props","jsx"],"mappings":";;;;AAKO,MAAMA,IAAa,CAAC;AAAA,EACzB,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC,IAAQ;AACV,MAAsC;AACpC,QAAMC,IAAeC,KACfC,IAAUJ,IAASK,EAAM,cAAcL,GAAQE,CAAY,IAAIH;AAErE,+BAAQ,OAAI,EAAA,WAAWO,EAAGL,KAAS,kBAAkB,GAAI,UAAQG,EAAA,CAAA;AACnE,GCDaG,IAAoB,CAC/BC,OAEO;AAAA,EACL,WAAW,MACTA,EAAO,IAAI,CAAC,EAAE,MAAAC,GAAM,GAAGC,SAAa;AAAA,IAClC,MAAAD;AAAA,IACA,SAASE,gBAAAA,EAAAA,IAACb,GAAY,EAAA,GAAGY,EAAO,CAAA;AAAA,EAAA,EAChC;AAAA;"}
|
|
@@ -6,7 +6,7 @@ const x = (t, e, n) => Object.entries(t).flatMap(([a, p]) => {
|
|
|
6
6
|
return s ? {
|
|
7
7
|
path: s,
|
|
8
8
|
lazy: async () => {
|
|
9
|
-
const { MdxPage: i } = await import("./MdxPage-
|
|
9
|
+
const { MdxPage: i } = await import("./MdxPage-DBhq6-5F.js"), { default: m, ...l } = await p();
|
|
10
10
|
return {
|
|
11
11
|
element: /* @__PURE__ */ u.jsx(
|
|
12
12
|
i,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { o as u } from "./index-
|
|
3
|
-
import "./
|
|
4
|
-
import "./ZudokuContext-cr-pTRY1.js";
|
|
2
|
+
import { o as u } from "./index-DA74gNq3.js";
|
|
3
|
+
import "./ZudokuContext-BEmsYQoq.js";
|
|
5
4
|
import "lucide-react";
|
|
6
5
|
import "zudoku/openapi-worker";
|
|
7
|
-
import "./index-
|
|
8
|
-
import "./ErrorPage-
|
|
9
|
-
import "./Markdown-
|
|
6
|
+
import "./index-g_JJcuFg.js";
|
|
7
|
+
import "./ErrorPage-B-zoPPVx.js";
|
|
8
|
+
import "./Markdown-D6Nze6qq.js";
|
|
10
9
|
import "./joinPath-B7kNnUX4.js";
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
10
|
+
import "./urql-core-KJnLL26g.js";
|
|
11
|
+
import "./router-Oe6YmY6B.js";
|
|
12
|
+
import "./index-BRCiYFaL.js";
|
|
13
13
|
export {
|
|
14
14
|
u as openApiPlugin
|
|
15
15
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zudoku",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"homepage": "https://zudoku.dev",
|
|
6
6
|
"repository": {
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"import": "./lib/zudoku.plugin-redirect.js",
|
|
62
62
|
"types": "./dist/lib/plugins/redirect/index.d.ts"
|
|
63
63
|
},
|
|
64
|
-
"./plugins/custom-
|
|
65
|
-
"import": "./lib/zudoku.plugin-custom-
|
|
66
|
-
"types": "./dist/lib/plugins/custom-
|
|
64
|
+
"./plugins/custom-pages": {
|
|
65
|
+
"import": "./lib/zudoku.plugin-custom-pages.js",
|
|
66
|
+
"types": "./dist/lib/plugins/custom-pages/index.d.ts"
|
|
67
67
|
},
|
|
68
68
|
"./plugins/search-inkeep": {
|
|
69
69
|
"import": "./lib/zudoku.plugin-search-inkeep.js",
|
|
@@ -98,54 +98,58 @@
|
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
|
-
"@envelop/core": "5.0.
|
|
101
|
+
"@envelop/core": "5.0.2",
|
|
102
102
|
"@graphql-typed-document-node/core": "3.2.0",
|
|
103
103
|
"@hiogawa/vite-plugin-ssr-css": "0.0.1",
|
|
104
104
|
"@lekoarts/rehype-meta-as-attributes": "3.0.1",
|
|
105
105
|
"@mdx-js/react": "3.0.1",
|
|
106
106
|
"@mdx-js/rollup": "3.0.1",
|
|
107
|
-
"@monaco-editor/react": "^4.6.0",
|
|
108
107
|
"@pothos/core": "3.41.0",
|
|
109
|
-
"@radix-ui/react-collapsible": "1.1.
|
|
110
|
-
"@radix-ui/react-
|
|
111
|
-
"@radix-ui/react-
|
|
112
|
-
"@radix-ui/react-
|
|
113
|
-
"@
|
|
108
|
+
"@radix-ui/react-collapsible": "1.1.1",
|
|
109
|
+
"@radix-ui/react-dialog": "1.1.2",
|
|
110
|
+
"@radix-ui/react-dropdown-menu": "2.1.2",
|
|
111
|
+
"@radix-ui/react-select": "2.1.2",
|
|
112
|
+
"@radix-ui/react-slot": "1.1.0",
|
|
113
|
+
"@radix-ui/react-tabs": "1.1.1",
|
|
114
|
+
"@radix-ui/react-visually-hidden": "1",
|
|
115
|
+
"@sentry/node": "8.34.0",
|
|
114
116
|
"@sindresorhus/slugify": "2.2.1",
|
|
115
117
|
"@stefanprobst/rehype-extract-toc": "2.2.0",
|
|
116
|
-
"@tailwindcss/typography": "0.5.
|
|
117
|
-
"@tanstack/react-query": "5.
|
|
118
|
+
"@tailwindcss/typography": "0.5.15",
|
|
119
|
+
"@tanstack/react-query": "5.59.13",
|
|
120
|
+
"@types/react": "18.3.11",
|
|
121
|
+
"@types/react-dom": "18.3.1",
|
|
118
122
|
"@vitejs/plugin-react": "4.3.1",
|
|
123
|
+
"@zudoku/httpsnippet": "10.0.9",
|
|
119
124
|
"@zudoku/react-helmet-async": "2.0.4",
|
|
120
|
-
"autoprefixer": "10.4.
|
|
121
|
-
"chokidar": "
|
|
125
|
+
"autoprefixer": "10.4.20",
|
|
126
|
+
"chokidar": "3.6.0",
|
|
122
127
|
"class-variance-authority": "0.7.0",
|
|
128
|
+
"clsx": "2.1.1",
|
|
123
129
|
"dotenv": "16.4.5",
|
|
124
|
-
"express": "4.
|
|
125
|
-
"glob": "
|
|
130
|
+
"express": "4.21.1",
|
|
131
|
+
"glob": "11.0.0",
|
|
126
132
|
"graphql": "16.9.0",
|
|
127
133
|
"graphql-type-json": "0.3.2",
|
|
128
|
-
"graphql-yoga": "5.
|
|
129
|
-
"gray-matter": "
|
|
130
|
-
"http-terminator": "
|
|
131
|
-
"loglevel": "
|
|
132
|
-
"lru-cache": "11.0.
|
|
133
|
-
"lucide-react": "0.
|
|
134
|
-
"
|
|
134
|
+
"graphql-yoga": "5.7.0",
|
|
135
|
+
"gray-matter": "4.0.3",
|
|
136
|
+
"http-terminator": "3.2.0",
|
|
137
|
+
"loglevel": "1.9.2",
|
|
138
|
+
"lru-cache": "11.0.1",
|
|
139
|
+
"lucide-react": "0.452.0",
|
|
140
|
+
"oauth4webapi": "2.17.0",
|
|
135
141
|
"object-hash": "3.0.0",
|
|
136
142
|
"openapi-types": "12.1.3",
|
|
137
|
-
"picocolors": "
|
|
138
|
-
"postcss": "8.4.
|
|
139
|
-
"posthog-node": "
|
|
140
|
-
"prism-react-renderer": "2.
|
|
143
|
+
"picocolors": "1.1.0",
|
|
144
|
+
"postcss": "8.4.47",
|
|
145
|
+
"posthog-node": "4.2.1",
|
|
146
|
+
"prism-react-renderer": "2.4.0",
|
|
141
147
|
"prismjs": "1.29.0",
|
|
142
|
-
"react": "
|
|
143
|
-
"react-
|
|
144
|
-
"react-error-boundary": "^4.0.13",
|
|
145
|
-
"react-hook-form": "^7.52.1",
|
|
148
|
+
"react-error-boundary": "4.0.13",
|
|
149
|
+
"react-hook-form": "7.53.0",
|
|
146
150
|
"react-is": "18.3.1",
|
|
147
151
|
"react-markdown": "9.0.1",
|
|
148
|
-
"react-router-dom": "6.
|
|
152
|
+
"react-router-dom": "6.27.0",
|
|
149
153
|
"rehype-raw": "7.0.0",
|
|
150
154
|
"rehype-slug": "6.0.0",
|
|
151
155
|
"remark-comment": "1.0.0",
|
|
@@ -154,53 +158,42 @@
|
|
|
154
158
|
"remark-frontmatter": "5.0.0",
|
|
155
159
|
"remark-gfm": "4.0.0",
|
|
156
160
|
"remark-mdx-frontmatter": "5.0.0",
|
|
157
|
-
"rollup": "
|
|
158
|
-
"semver": "7.6.
|
|
159
|
-
"sitemap": "
|
|
161
|
+
"rollup": "4.24.0",
|
|
162
|
+
"semver": "7.6.3",
|
|
163
|
+
"sitemap": "8.0.0",
|
|
160
164
|
"strip-ansi": "7.1.0",
|
|
161
|
-
"tailwind-merge": "2.5.
|
|
162
|
-
"tailwindcss": "3.4.
|
|
163
|
-
"tsx": "4.19.
|
|
164
|
-
"ulidx": "
|
|
165
|
+
"tailwind-merge": "2.5.4",
|
|
166
|
+
"tailwindcss": "3.4.13",
|
|
167
|
+
"tsx": "4.19.1",
|
|
168
|
+
"ulidx": "2.4.1",
|
|
165
169
|
"unist-util-visit": "5.0.0",
|
|
166
170
|
"urql": "4.1.0",
|
|
167
|
-
"vaul": "
|
|
168
|
-
"vite": "5.
|
|
169
|
-
"yaml": "2.
|
|
171
|
+
"vaul": "1.1.0",
|
|
172
|
+
"vite": "5.4.9",
|
|
173
|
+
"yaml": "2.6.0",
|
|
170
174
|
"yargs": "17.7.2",
|
|
171
175
|
"zod": "3.23.8",
|
|
172
|
-
"zod-validation-error": "3.
|
|
173
|
-
"zustand": "
|
|
176
|
+
"zod-validation-error": "3.4.0",
|
|
177
|
+
"zustand": "5.0.0"
|
|
174
178
|
},
|
|
175
179
|
"devDependencies": {
|
|
176
|
-
"@
|
|
177
|
-
"@
|
|
178
|
-
"@radix-ui/react-tabs": "1.1.0",
|
|
179
|
-
"@types/express": "^4.17.21",
|
|
180
|
-
"@types/har-format": "^1.2.15",
|
|
180
|
+
"@types/express": "4.17.21",
|
|
181
|
+
"@types/har-format": "1.2.15",
|
|
181
182
|
"@types/json-schema": "7.0.15",
|
|
182
183
|
"@types/mdx": "2.0.13",
|
|
183
|
-
"@types/node": "20.
|
|
184
|
-
"@types/object-hash": "
|
|
185
|
-
"@types/react": "18.3.3",
|
|
186
|
-
"@types/react-dom": "18.3.0",
|
|
184
|
+
"@types/node": "20.16.11",
|
|
185
|
+
"@types/object-hash": "3.0.6",
|
|
187
186
|
"@types/react-is": "18.3.0",
|
|
188
|
-
"@types/
|
|
189
|
-
"@types/
|
|
190
|
-
"
|
|
191
|
-
"
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
"prism-react-renderer": "2.3.1",
|
|
195
|
-
"prismjs": "1.29.0",
|
|
196
|
-
"react-markdown": "9.0.1",
|
|
197
|
-
"react-router-dom": "6.25.1",
|
|
198
|
-
"rollup-plugin-visualizer": "^5.12.0",
|
|
199
|
-
"typescript": "5.5.3"
|
|
187
|
+
"@types/semver": "7.5.8",
|
|
188
|
+
"@types/yargs": "17.0.33",
|
|
189
|
+
"rollup-plugin-visualizer": "5.12.0",
|
|
190
|
+
"react": "18.3.1",
|
|
191
|
+
"react-dom": "18.3.1",
|
|
192
|
+
"typescript": "5.6.3"
|
|
200
193
|
},
|
|
201
194
|
"peerDependencies": {
|
|
202
|
-
"react": "
|
|
203
|
-
"react-dom": "
|
|
195
|
+
"react": ">=18",
|
|
196
|
+
"react-dom": ">=18"
|
|
204
197
|
},
|
|
205
198
|
"optionalDependencies": {
|
|
206
199
|
"@clerk/clerk-js": "5.11.0",
|
package/src/app/main.tsx
CHANGED
|
@@ -2,13 +2,13 @@ import { redirect, type RouteObject } from "react-router-dom";
|
|
|
2
2
|
import { configuredApiKeysPlugin } from "virtual:zudoku-api-keys-plugin";
|
|
3
3
|
import { configuredApiPlugins } from "virtual:zudoku-api-plugins";
|
|
4
4
|
import { configuredAuthProvider } from "virtual:zudoku-auth";
|
|
5
|
+
import { configuredCustomPagesPlugin } from "virtual:zudoku-custom-pages-plugin";
|
|
5
6
|
import { configuredDocsPlugins } from "virtual:zudoku-docs-plugins";
|
|
6
7
|
import { configuredRedirectPlugin } from "virtual:zudoku-redirect-plugin";
|
|
7
8
|
import { configuredSidebar } from "virtual:zudoku-sidebar";
|
|
8
9
|
import "virtual:zudoku-theme.css";
|
|
9
10
|
import { DevPortal, Layout, RouterError } from "zudoku/components";
|
|
10
11
|
import { isNavigationPlugin } from "zudoku/internal";
|
|
11
|
-
import { customPagePlugin } from "zudoku/plugins/custom-page";
|
|
12
12
|
import { inkeepSearchPlugin } from "zudoku/plugins/search-inkeep";
|
|
13
13
|
import type { ZudokuConfig } from "../config/config.js";
|
|
14
14
|
import { traverseSidebar } from "../lib/components/navigation/utils.js";
|
|
@@ -42,7 +42,7 @@ export const convertZudokuConfigToOptions = (
|
|
|
42
42
|
},
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
|
-
slotlets: config.
|
|
45
|
+
slotlets: config.UNSAFE_slotlets,
|
|
46
46
|
metadata: {
|
|
47
47
|
favicon: "https://cdn.zudoku.dev/logos/favicon.svg",
|
|
48
48
|
title: "%s - Zudoku",
|
|
@@ -60,7 +60,7 @@ export const convertZudokuConfigToOptions = (
|
|
|
60
60
|
...configuredApiPlugins,
|
|
61
61
|
...(configuredRedirectPlugin ? [configuredRedirectPlugin] : []),
|
|
62
62
|
...(configuredApiKeysPlugin ? [configuredApiKeysPlugin] : []),
|
|
63
|
-
...(
|
|
63
|
+
...(configuredCustomPagesPlugin ? [configuredCustomPagesPlugin] : []),
|
|
64
64
|
...(configuredAuthProvider?.getAuthenticationPlugin
|
|
65
65
|
? [configuredAuthProvider.getAuthenticationPlugin()]
|
|
66
66
|
: []),
|
|
@@ -9,7 +9,7 @@ const COLOR_MAP = {
|
|
|
9
9
|
tip: "bg-green-600",
|
|
10
10
|
caution: "bg-orange-500",
|
|
11
11
|
danger: "bg-rose-500",
|
|
12
|
-
};
|
|
12
|
+
} as const;
|
|
13
13
|
|
|
14
14
|
export const Banner = () => {
|
|
15
15
|
const { page } = useZudoku();
|
|
@@ -19,12 +19,22 @@ export const Banner = () => {
|
|
|
19
19
|
return <style>{`:root { --banner-height: 0px; }`}</style>;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
const mappedColor =
|
|
23
|
+
page.banner.color && page.banner.color in COLOR_MAP
|
|
24
|
+
? COLOR_MAP[page.banner.color as keyof typeof COLOR_MAP]
|
|
25
|
+
: !page.banner.color
|
|
26
|
+
? "bg-primary"
|
|
27
|
+
: undefined;
|
|
28
|
+
|
|
29
|
+
const style = !mappedColor ? { backgroundColor: page.banner.color } : {};
|
|
30
|
+
|
|
22
31
|
return (
|
|
23
32
|
<div
|
|
24
33
|
className={cn(
|
|
25
34
|
"relative text-primary-foreground text-sm font-medium px-4 py-2 flex gap-2 items-center",
|
|
26
|
-
|
|
35
|
+
mappedColor,
|
|
27
36
|
)}
|
|
37
|
+
style={style}
|
|
28
38
|
>
|
|
29
39
|
<div className="w-full">{page.banner.message}</div>
|
|
30
40
|
{page.banner.dismissible && (
|
|
@@ -91,8 +91,8 @@ export const Header = memo(function HeaderInner() {
|
|
|
91
91
|
</div>
|
|
92
92
|
</Link>
|
|
93
93
|
</div>
|
|
94
|
-
<div className="grid grid-cols-
|
|
95
|
-
<div className="w-full justify-center flex">
|
|
94
|
+
<div className="grid grid-cols-1 lg:grid-cols-[--sidecar-grid-cols] items-center gap-8">
|
|
95
|
+
<div className="w-full justify-center hidden lg:flex">
|
|
96
96
|
<Search />
|
|
97
97
|
</div>
|
|
98
98
|
|
|
@@ -133,7 +133,9 @@ export const Header = memo(function HeaderInner() {
|
|
|
133
133
|
</div>
|
|
134
134
|
</div>
|
|
135
135
|
</div>
|
|
136
|
+
<Slotlet name="top-navigation-before" />
|
|
136
137
|
<TopNavigation />
|
|
138
|
+
<Slotlet name="top-navigation-after" />
|
|
137
139
|
</div>
|
|
138
140
|
</header>
|
|
139
141
|
);
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
DrawerTrigger,
|
|
11
11
|
} from "../ui/Drawer.js";
|
|
12
12
|
import { useZudoku } from "./context/ZudokuContext.js";
|
|
13
|
+
import { Search } from "./Search.js";
|
|
13
14
|
|
|
14
15
|
export const MobileTopNavigation = () => {
|
|
15
16
|
const { topNavigation } = useZudoku();
|
|
@@ -27,6 +28,9 @@ export const MobileTopNavigation = () => {
|
|
|
27
28
|
<VisuallyHidden>
|
|
28
29
|
<DrawerTitle>Navigation</DrawerTitle>
|
|
29
30
|
</VisuallyHidden>
|
|
31
|
+
<div className="flex p-4">
|
|
32
|
+
<Search />
|
|
33
|
+
</div>
|
|
30
34
|
<ul className="flex flex-col items-center gap-4 p-4">
|
|
31
35
|
{topNavigation.map((item) => (
|
|
32
36
|
<li key={item.label}>
|
|
@@ -39,7 +39,7 @@ export const Search = () => {
|
|
|
39
39
|
<button
|
|
40
40
|
type="button"
|
|
41
41
|
onClick={() => setIsOpen(true)}
|
|
42
|
-
className="flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-
|
|
42
|
+
className="flex items-center border border-input hover:bg-accent hover:text-accent-foreground p-4 relative h-8 justify-start rounded-lg bg-background text-sm text-muted-foreground shadow-none w-full sm:w-72"
|
|
43
43
|
>
|
|
44
44
|
<div className="flex items-center gap-2 flex-grow">
|
|
45
45
|
<SearchIcon size={14} />
|
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
type ComponentType,
|
|
3
|
+
type ReactElement,
|
|
4
|
+
ReactNode,
|
|
5
|
+
useContext,
|
|
6
|
+
} from "react";
|
|
2
7
|
import { isValidElementType } from "react-is";
|
|
3
|
-
|
|
8
|
+
import {
|
|
9
|
+
type Location,
|
|
10
|
+
type NavigateFunction,
|
|
11
|
+
type SetURLSearchParams,
|
|
12
|
+
} from "react-router-dom";
|
|
13
|
+
import { useExposedProps } from "../util/useExposedProps.js";
|
|
14
|
+
|
|
15
|
+
export type Slotlets = Record<
|
|
16
|
+
string,
|
|
17
|
+
ReactNode | ReactElement | ComponentType<ExposedComponentProps>
|
|
18
|
+
>;
|
|
4
19
|
|
|
5
20
|
const SlotletContext = React.createContext<Slotlets | undefined>({});
|
|
6
21
|
|
|
@@ -18,13 +33,21 @@ export const SlotletProvider = ({
|
|
|
18
33
|
);
|
|
19
34
|
};
|
|
20
35
|
|
|
36
|
+
export type ExposedComponentProps = {
|
|
37
|
+
location: Location;
|
|
38
|
+
navigate: NavigateFunction;
|
|
39
|
+
searchParams: URLSearchParams;
|
|
40
|
+
setSearchParams: SetURLSearchParams;
|
|
41
|
+
};
|
|
42
|
+
|
|
21
43
|
export const Slotlet = ({ name }: { name: string }) => {
|
|
22
44
|
const context = useContext(SlotletContext);
|
|
23
45
|
const componentOrElement = context?.[name];
|
|
46
|
+
const slotletProps = useExposedProps();
|
|
24
47
|
|
|
25
48
|
if (isValidElementType(componentOrElement)) {
|
|
26
|
-
return React.createElement(componentOrElement);
|
|
49
|
+
return React.createElement(componentOrElement, slotletProps);
|
|
27
50
|
}
|
|
28
51
|
|
|
29
|
-
return componentOrElement;
|
|
52
|
+
return componentOrElement as ReactNode;
|
|
30
53
|
};
|
|
@@ -16,7 +16,7 @@ export const useMDXComponents = /*@__PURE__*/ useMDXComponentsImport;
|
|
|
16
16
|
export const Callout = /*@__PURE__*/ CalloutImport;
|
|
17
17
|
export const DevPortal = /*@__PURE__*/ DevPortalImport;
|
|
18
18
|
export const Layout = /*@__PURE__*/ LayoutImport;
|
|
19
|
-
export const Link = /*@__PURE__*/ LinkImport;
|
|
19
|
+
export const Link: typeof LinkImport = /*@__PURE__*/ LinkImport;
|
|
20
20
|
export const RouterError = /*@__PURE__*/ RouterErrorImport;
|
|
21
21
|
export const ServerError = /*@__PURE__*/ ServerErrorImport;
|
|
22
22
|
export const Bootstrap = /*@__PURE__*/ BootstrapImport;
|
|
@@ -58,9 +58,10 @@ export const createOperationSlug = (
|
|
|
58
58
|
);
|
|
59
59
|
};
|
|
60
60
|
|
|
61
|
-
const cache = new LRUCache<string,
|
|
61
|
+
const cache = new LRUCache<string, OpenAPIDocument>({
|
|
62
62
|
ttl: 60 * 10 * 1000,
|
|
63
63
|
ttlAutopurge: true,
|
|
64
|
+
fetchMethod: (_key, _oldValue, { context }) => validate(context as string),
|
|
64
65
|
});
|
|
65
66
|
|
|
66
67
|
const builder = new SchemaBuilder<{
|
|
@@ -429,16 +430,7 @@ const Schema = builder.objectRef<OpenAPIDocument>("Schema").implement({
|
|
|
429
430
|
|
|
430
431
|
const loadOpenAPISchema = async (input: NonNullable<unknown>) => {
|
|
431
432
|
const hash = hashit(input);
|
|
432
|
-
|
|
433
|
-
if (cache.has(hash)) {
|
|
434
|
-
return cache.get(hash)!;
|
|
435
|
-
}
|
|
436
|
-
|
|
437
|
-
const schema = validate(input);
|
|
438
|
-
|
|
439
|
-
cache.set(hash, schema);
|
|
440
|
-
|
|
441
|
-
return schema;
|
|
433
|
+
return await cache.forceFetch(hash, { context: input });
|
|
442
434
|
};
|
|
443
435
|
|
|
444
436
|
const SchemaSource = builder.enumType("SchemaType", {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { cn } from "../../util/cn.js";
|
|
3
|
+
import { useExposedProps } from "../../util/useExposedProps.js";
|
|
4
|
+
import type { CustomPageConfig } from "./index.js";
|
|
5
|
+
|
|
6
|
+
export const CustomPage = ({
|
|
7
|
+
element,
|
|
8
|
+
render,
|
|
9
|
+
prose = true,
|
|
10
|
+
}: Omit<CustomPageConfig, "path">) => {
|
|
11
|
+
const slotletProps = useExposedProps();
|
|
12
|
+
const content = render ? React.createElement(render, slotletProps) : element;
|
|
13
|
+
|
|
14
|
+
return <div className={cn(prose && "prose max-w-full")}>{content}</div>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type ComponentType, type ReactNode } from "react";
|
|
2
|
+
import type { RouteObject } from "react-router-dom";
|
|
3
|
+
import { type ExposedComponentProps } from "../../components/SlotletProvider.js";
|
|
4
|
+
import type { DevPortalPlugin, NavigationPlugin } from "../../core/plugins.js";
|
|
5
|
+
import { CustomPage } from "./CustomPage.js";
|
|
6
|
+
|
|
7
|
+
export type CustomPageConfig = {
|
|
8
|
+
path: string;
|
|
9
|
+
prose?: boolean;
|
|
10
|
+
element?: ReactNode;
|
|
11
|
+
render?: ComponentType<ExposedComponentProps>;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const customPagesPlugin = (
|
|
15
|
+
config: CustomPageConfig[],
|
|
16
|
+
): DevPortalPlugin & NavigationPlugin => {
|
|
17
|
+
return {
|
|
18
|
+
getRoutes: (): RouteObject[] =>
|
|
19
|
+
config.map(({ path, ...props }) => ({
|
|
20
|
+
path,
|
|
21
|
+
element: <CustomPage {...props} />,
|
|
22
|
+
})),
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CheckIcon, CopyIcon } from "lucide-react";
|
|
2
2
|
import { useState, useTransition } from "react";
|
|
3
|
+
import { useQuery } from "urql";
|
|
3
4
|
import { useSelectedServerStore } from "../../authentication/state.js";
|
|
4
5
|
import { InlineCode } from "../../components/InlineCode.js";
|
|
5
6
|
import { Button } from "../../ui/Button.js";
|
|
6
7
|
import { useOasConfig } from "./context.js";
|
|
7
8
|
import { graphql } from "./graphql/index.js";
|
|
8
9
|
import { SimpleSelect } from "./SimpleSelect.js";
|
|
9
|
-
import { useQuery } from "./util/urql.js";
|
|
10
10
|
|
|
11
11
|
const ServersQuery = graphql(/* GraphQL */ `
|
|
12
12
|
query ServersQuery($input: JSON!, $type: SchemaType!) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ResultOf } from "@graphql-typed-document-node/core";
|
|
2
|
+
import { useQuery } from "urql";
|
|
2
3
|
import { CategoryHeading } from "../../components/CategoryHeading.js";
|
|
3
4
|
import { DeveloperHint } from "../../components/DeveloperHint.js";
|
|
4
5
|
import { ErrorPage } from "../../components/ErrorPage.js";
|
|
@@ -12,7 +13,6 @@ import { OperationListItem } from "./OperationListItem.js";
|
|
|
12
13
|
import StaggeredRender from "./StaggeredRender.js";
|
|
13
14
|
import { useOasConfig } from "./context.js";
|
|
14
15
|
import { graphql } from "./graphql/index.js";
|
|
15
|
-
import { useQuery } from "./util/urql.js";
|
|
16
16
|
|
|
17
17
|
export const OperationsFragment = graphql(/* GraphQL */ `
|
|
18
18
|
fragment OperationsFragment on OperationItem {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Outlet } from "react-router-dom";
|
|
2
|
+
import { Provider, Client as UrqlClient } from "urql";
|
|
2
3
|
import { OasConfigProvider } from "./context.js";
|
|
3
4
|
import { OasPluginConfig } from "./interfaces.js";
|
|
4
5
|
|
|
5
|
-
import { Provider, Client as UrqlClient } from "./util/urql.js";
|
|
6
|
-
|
|
7
6
|
export function OpenApiRoute({
|
|
8
7
|
config,
|
|
9
8
|
client,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HTTPSnippet } from "@zudoku/httpsnippet";
|
|
2
2
|
import { Fragment, useMemo, useTransition } from "react";
|
|
3
3
|
import { useSearchParams } from "react-router-dom";
|
|
4
|
+
import { useQuery } from "urql";
|
|
4
5
|
import { useSelectedServerStore } from "../../authentication/state.js";
|
|
5
6
|
import { TextColorMap } from "../../components/navigation/SidebarBadge.js";
|
|
6
7
|
import { SyntaxHighlight } from "../../components/SyntaxHighlight.js";
|
|
@@ -16,7 +17,6 @@ import { ResponsesSidecarBox } from "./ResponsesSidecarBox.js";
|
|
|
16
17
|
import * as SidecarBox from "./SidecarBox.js";
|
|
17
18
|
import { SimpleSelect } from "./SimpleSelect.js";
|
|
18
19
|
import { generateSchemaExample } from "./util/generateSchemaExample.js";
|
|
19
|
-
import { useQuery } from "./util/urql.js";
|
|
20
20
|
|
|
21
21
|
const getConverted = (snippet: HTTPSnippet, option: string) => {
|
|
22
22
|
let converted;
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
|
-
import {
|
|
3
|
-
cacheExchange,
|
|
4
|
-
Client,
|
|
5
|
-
fetchExchange,
|
|
6
|
-
mapExchange,
|
|
7
|
-
} from "../util/urql.js";
|
|
2
|
+
import { cacheExchange, Client, fetchExchange, mapExchange } from "urql";
|
|
8
3
|
import { createServer } from "./createServer.js";
|
|
9
4
|
import { CreateClientFunction } from "./interfaces.js";
|
|
10
5
|
|
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-console */
|
|
2
2
|
import { monotonicFactory } from "ulidx";
|
|
3
|
+
import { cacheExchange, Client, fetchExchange, mapExchange } from "urql";
|
|
3
4
|
import { createWaitForNotify } from "../../../util/createWaitForNotify.js";
|
|
4
|
-
import {
|
|
5
|
-
cacheExchange,
|
|
6
|
-
Client,
|
|
7
|
-
fetchExchange,
|
|
8
|
-
mapExchange,
|
|
9
|
-
} from "../util/urql.js";
|
|
10
5
|
import { createClient as createMemoryClient } from "./createMemoryClient.js";
|
|
11
6
|
import { CreateClientFunction } from "./interfaces.js";
|
|
12
7
|
|