zudoku 0.3.0-dev.99 → 0.3.0
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/demo.js +5 -9
- package/dist/app/demo.js.map +1 -1
- package/dist/app/main.js +9 -7
- package/dist/app/main.js.map +1 -1
- package/dist/app/standalone.js +12 -8
- package/dist/app/standalone.js.map +1 -1
- package/dist/cli/dev/handler.js +1 -1
- package/dist/config/validators/SidebarSchema.js +9 -4
- package/dist/config/validators/SidebarSchema.js.map +1 -1
- package/dist/lib/components/ClientOnly.d.ts +3 -0
- package/dist/lib/components/ClientOnly.js +7 -0
- package/dist/lib/components/ClientOnly.js.map +1 -0
- package/dist/lib/components/Header.js +3 -2
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Markdown.js +3 -2
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/Search.js +5 -8
- package/dist/lib/components/Search.js.map +1 -1
- package/dist/lib/components/SlotletProvider.d.ts +2 -2
- package/dist/lib/components/SlotletProvider.js +7 -2
- package/dist/lib/components/SlotletProvider.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +6 -2
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +3 -2
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/components/navigation/SidebarWrapper.js +2 -3
- package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
- package/dist/lib/core/plugins.d.ts +1 -1
- package/dist/lib/core/plugins.js +1 -1
- package/dist/lib/core/plugins.js.map +1 -1
- package/dist/lib/oas/graphql/index.js +18 -3
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +5 -5
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterList.js +3 -1
- package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +3 -1
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +5 -9
- package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.d.ts +3 -1
- package/dist/lib/plugins/openapi/Sidecar.js +11 -5
- package/dist/lib/plugins/openapi/Sidecar.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/plugins/openapi/playground/Playground.js +2 -3
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/createUrl.js +5 -1
- package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaComponents.d.ts +13 -0
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js +28 -0
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +6 -0
- package/dist/lib/plugins/openapi/schema/SchemaView.js +58 -0
- package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/utils.d.ts +3 -0
- package/dist/lib/plugins/openapi/schema/utils.js +6 -0
- package/dist/lib/plugins/openapi/schema/utils.js.map +1 -0
- package/dist/lib/plugins/search-inkeep/index.js +3 -5
- package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
- package/dist/lib/themeToggle.d.ts +1 -0
- package/dist/lib/themeToggle.js +7 -0
- package/dist/lib/themeToggle.js.map +1 -0
- package/dist/lib/util/MdxComponents.js +4 -4
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/vite/config.d.ts +4 -5
- package/dist/vite/config.js +7 -4
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/config.test.js +2 -2
- package/dist/vite/config.test.js.map +1 -1
- package/dist/vite/dev-server.d.ts +0 -1
- package/dist/vite/dev-server.js +2 -21
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/html.js +2 -11
- package/dist/vite/html.js.map +1 -1
- package/dist/vite/plugin-api-keys.d.ts +3 -3
- package/dist/vite/plugin-api-keys.js +2 -1
- package/dist/vite/plugin-api-keys.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +3 -3
- package/dist/vite/plugin-api.js +2 -1
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.d.ts +3 -3
- package/dist/vite/plugin-auth.js +2 -1
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-component.d.ts +3 -3
- package/dist/vite/plugin-component.js +17 -14
- package/dist/vite/plugin-component.js.map +1 -1
- package/dist/vite/plugin-config-reload.d.ts +4 -0
- package/dist/vite/plugin-config-reload.js +24 -0
- package/dist/vite/plugin-config-reload.js.map +1 -0
- package/dist/vite/plugin-config.d.ts +2 -2
- package/dist/vite/plugin-config.js.map +1 -1
- package/dist/vite/plugin-custom-css.d.ts +3 -3
- package/dist/vite/plugin-custom-css.js +2 -1
- package/dist/vite/plugin-custom-css.js.map +1 -1
- package/dist/vite/plugin-docs.d.ts +3 -3
- package/dist/vite/plugin-docs.js +3 -2
- package/dist/vite/plugin-docs.js.map +1 -1
- package/dist/vite/plugin-html-transform.d.ts +2 -0
- package/dist/vite/plugin-html-transform.js +15 -0
- package/dist/vite/plugin-html-transform.js.map +1 -0
- package/dist/vite/plugin-mdx.d.ts +3 -3
- package/dist/vite/plugin-mdx.js +2 -1
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/plugin-metadata.d.ts +1 -1
- package/dist/vite/plugin-redirect.d.ts +3 -3
- package/dist/vite/plugin-redirect.js +2 -1
- package/dist/vite/plugin-redirect.js.map +1 -1
- package/dist/vite/plugin-sidebar.d.ts +3 -3
- package/dist/vite/plugin-sidebar.js +5 -4
- package/dist/vite/plugin-sidebar.js.map +1 -1
- package/dist/vite/plugin.d.ts +3 -2
- package/dist/vite/plugin.js +16 -11
- package/dist/vite/plugin.js.map +1 -1
- package/lib/{CategoryHeading-BWq12Bfa.js → CategoryHeading-z15xh7Jb.js} +2 -2
- package/lib/{CategoryHeading-BWq12Bfa.js.map → CategoryHeading-z15xh7Jb.js.map} +1 -1
- package/lib/{Combination-D-9IH0zy.js → Combination-DTfV-c98.js} +2 -2
- package/lib/{Combination-D-9IH0zy.js.map → Combination-DTfV-c98.js.map} +1 -1
- package/lib/{Input-HmAaR6kw.js → Input-DB9VROFR.js} +3 -3
- package/lib/{Input-HmAaR6kw.js.map → Input-DB9VROFR.js.map} +1 -1
- package/lib/Markdown-CEccPMI_.js +20508 -0
- package/lib/Markdown-CEccPMI_.js.map +1 -0
- package/lib/{MdxPage-oN3huD58.js → MdxPage-CnqOoqvp.js} +12 -15
- package/lib/MdxPage-CnqOoqvp.js.map +1 -0
- package/lib/OperationList-Cxiw2Z-v.js +457 -0
- package/lib/OperationList-Cxiw2Z-v.js.map +1 -0
- package/lib/{Route-DAF15JAU.js → Route-DfAFiR7v.js} +2 -2
- package/lib/{Route-DAF15JAU.js.map → Route-DfAFiR7v.js.map} +1 -1
- package/lib/SlotletProvider-ByLSCZQa.js +262 -0
- package/lib/SlotletProvider-ByLSCZQa.js.map +1 -0
- package/lib/{Spinner-BCz1kNGw.js → Spinner-BT_AYFrA.js} +3 -3
- package/lib/{Spinner-BCz1kNGw.js.map → Spinner-BT_AYFrA.js.map} +1 -1
- package/lib/assets/{worker-CR7aeKop.js → worker-CzHUifWA.js} +710 -703
- package/lib/assets/{worker-CR7aeKop.js.map → worker-CzHUifWA.js.map} +1 -1
- package/lib/{index-CtKkHGcd.js → index-D-9zqIOh.js} +1159 -1147
- package/lib/index-D-9zqIOh.js.map +1 -0
- package/lib/{index-D-9Z7HSn.js → index-Dz4LyXZI.js} +3 -3
- package/lib/{index-D-9Z7HSn.js.map → index-Dz4LyXZI.js.map} +1 -1
- package/lib/zudoku.components.js +775 -759
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.openapi-worker.js +734 -727
- package/lib/zudoku.openapi-worker.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +4 -4
- package/lib/zudoku.plugin-custom-page.js +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +3 -3
- package/lib/zudoku.plugin-search-inkeep.js +23 -22
- package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
- package/package.json +99 -78
- package/src/app/demo-cdn.html +1 -1
- package/src/app/demo.html +1 -1
- package/src/app/demo.tsx +7 -9
- package/src/app/main.css +22 -0
- package/src/app/main.tsx +11 -8
- package/src/app/standalone.html +1 -1
- package/src/app/standalone.tsx +13 -8
- package/src/lib/components/ClientOnly.tsx +13 -0
- package/src/lib/components/Header.tsx +3 -0
- package/src/lib/components/Markdown.tsx +3 -2
- package/src/lib/components/Search.tsx +7 -7
- package/src/lib/components/SlotletProvider.tsx +10 -5
- package/src/lib/components/navigation/SidebarCategory.tsx +13 -2
- package/src/lib/components/navigation/SidebarItem.tsx +3 -2
- package/src/lib/components/navigation/SidebarWrapper.tsx +20 -18
- package/src/lib/core/plugins.ts +2 -2
- package/src/lib/oas/graphql/index.ts +26 -7
- package/src/lib/plugins/markdown/MdxPage.tsx +0 -1
- package/src/lib/plugins/openapi/OperationListItem.tsx +22 -17
- package/src/lib/plugins/openapi/ParameterList.tsx +10 -8
- package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +51 -39
- package/src/lib/plugins/openapi/Sidecar.tsx +34 -19
- package/src/lib/plugins/openapi/index.tsx +1 -1
- package/src/lib/plugins/openapi/playground/Playground.tsx +3 -6
- package/src/lib/plugins/openapi/playground/createUrl.ts +6 -5
- package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +126 -0
- package/src/lib/plugins/openapi/schema/SchemaView.tsx +172 -0
- package/src/lib/plugins/openapi/schema/utils.ts +10 -0
- package/src/lib/plugins/search-inkeep/index.tsx +11 -9
- package/src/lib/themeToggle.ts +7 -0
- package/src/lib/util/MdxComponents.tsx +12 -12
- package/LICENSE.md +0 -21
- package/dist/lib/plugins/openapi/SchemaListView.d.ts +0 -7
- package/dist/lib/plugins/openapi/SchemaListView.js +0 -27
- package/dist/lib/plugins/openapi/SchemaListView.js.map +0 -1
- package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +0 -8
- package/dist/lib/plugins/openapi/SchemaListViewItem.js +0 -25
- package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +0 -1
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +0 -8
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +0 -17
- package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +0 -1
- package/lib/Markdown-B_Gax7at.js +0 -14108
- package/lib/Markdown-B_Gax7at.js.map +0 -1
- package/lib/MdxPage-oN3huD58.js.map +0 -1
- package/lib/OperationList-Ctj0ihBN.js +0 -448
- package/lib/OperationList-Ctj0ihBN.js.map +0 -1
- package/lib/SlotletProvider-CzMAO73_.js +0 -82
- package/lib/SlotletProvider-CzMAO73_.js.map +0 -1
- package/lib/index-CtKkHGcd.js.map +0 -1
- package/src/lib/plugins/openapi/SchemaListView.tsx +0 -75
- package/src/lib/plugins/openapi/SchemaListViewItem.tsx +0 -125
- package/src/lib/plugins/openapi/SchemaListViewItemGroup.tsx +0 -63
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import {
|
|
3
|
-
import { u as g, a as u, I as j, S as k, b as v, c as w, d as b, e as K, f as y } from "./Input-
|
|
2
|
+
import { S as p, R as f } from "./SlotletProvider-ByLSCZQa.js";
|
|
3
|
+
import { u as g, a as u, I as j, S as k, b as v, c as w, d as b, e as K, f as y } from "./Input-DB9VROFR.js";
|
|
4
4
|
import { b as N, L as x, O as E } from "./index-7kcHaXD6.js";
|
|
5
5
|
import { u as h, t as A, j as S } from "./ZudokuContext-BIZ8zHbZ.js";
|
|
6
|
-
import { B as l, p as I } from "./Combination-
|
|
6
|
+
import { B as l, p as I } from "./Combination-DTfV-c98.js";
|
|
7
7
|
import { D as P } from "./DeveloperHint-BQSFXH01.js";
|
|
8
8
|
import { useState as C } from "react";
|
|
9
|
-
import { c as d, a as D } from "./Markdown-
|
|
9
|
+
import { c as d, a as D } from "./Markdown-CEccPMI_.js";
|
|
10
10
|
/**
|
|
11
11
|
* @license lucide-react v0.378.0 - ISC
|
|
12
12
|
*
|
|
@@ -6,7 +6,7 @@ const u = (t, e) => Object.entries(t).flatMap(([a, r]) => {
|
|
|
6
6
|
return {
|
|
7
7
|
path: s.at(-1) === "index" ? s.slice(0, -1).join("/") : o,
|
|
8
8
|
lazy: async () => {
|
|
9
|
-
const { MdxPage: i } = await import("./MdxPage-
|
|
9
|
+
const { MdxPage: i } = await import("./MdxPage-CnqOoqvp.js"), { default: p, ...c } = await r();
|
|
10
10
|
return {
|
|
11
11
|
element: /* @__PURE__ */ m.jsx(
|
|
12
12
|
i,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { o as l } from "./index-
|
|
2
|
+
import { o as l } from "./index-D-9zqIOh.js";
|
|
3
3
|
import "./urql-DrBfkb92.js";
|
|
4
4
|
import "./ZudokuContext-BIZ8zHbZ.js";
|
|
5
5
|
import "zudoku/openapi-worker";
|
|
6
|
-
import "./Combination-
|
|
7
|
-
import "./Markdown-
|
|
6
|
+
import "./Combination-DTfV-c98.js";
|
|
7
|
+
import "./Markdown-CEccPMI_.js";
|
|
8
8
|
import "./joinPath-B7kNnUX4.js";
|
|
9
9
|
import "./router-BiRCp01d.js";
|
|
10
10
|
import "./index-7kcHaXD6.js";
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { j as n } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { lazy as i } from "react";
|
|
3
|
-
const o = {
|
|
2
|
+
import { useSyncExternalStore as a, lazy as i } from "react";
|
|
3
|
+
const o = () => () => {
|
|
4
|
+
}, c = (e) => a(
|
|
5
|
+
o,
|
|
6
|
+
() => "client",
|
|
7
|
+
() => "server"
|
|
8
|
+
) === "client" ? e.children : null, l = {
|
|
4
9
|
theme: {
|
|
5
10
|
components: {
|
|
6
11
|
AIChatPageWrapper: {
|
|
@@ -18,33 +23,29 @@ const o = {
|
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
25
|
}
|
|
21
|
-
},
|
|
22
|
-
prefilledQuery:
|
|
23
|
-
isOpen:
|
|
24
|
-
onClose:
|
|
26
|
+
}, p = {}, u = i(() => import("./InkeepCustomTrigger-CE5-K5ex.js")), h = ({
|
|
27
|
+
prefilledQuery: e,
|
|
28
|
+
isOpen: r,
|
|
29
|
+
onClose: t,
|
|
25
30
|
settings: s
|
|
26
31
|
}) => /* @__PURE__ */ n.jsx(
|
|
27
|
-
|
|
32
|
+
u,
|
|
28
33
|
{
|
|
29
|
-
isOpen:
|
|
30
|
-
onClose:
|
|
31
|
-
baseSettings: { ...
|
|
32
|
-
aiChatSettings:
|
|
34
|
+
isOpen: r,
|
|
35
|
+
onClose: t,
|
|
36
|
+
baseSettings: { ...l, ...s },
|
|
37
|
+
aiChatSettings: p,
|
|
33
38
|
searchSettings: {
|
|
34
|
-
prefilledQuery:
|
|
39
|
+
prefilledQuery: e || void 0
|
|
35
40
|
}
|
|
36
41
|
}
|
|
37
|
-
),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
onClose: e.onClose,
|
|
43
|
-
settings: t
|
|
44
|
-
}
|
|
45
|
-
)
|
|
42
|
+
), g = (e) => ({
|
|
43
|
+
renderSearch: ({
|
|
44
|
+
isOpen: r,
|
|
45
|
+
onClose: t
|
|
46
|
+
}) => /* @__PURE__ */ n.jsx(c, { children: /* @__PURE__ */ n.jsx(h, { isOpen: r, onClose: t, settings: e }) })
|
|
46
47
|
});
|
|
47
48
|
export {
|
|
48
|
-
|
|
49
|
+
g as inkeepSearchPlugin
|
|
49
50
|
};
|
|
50
51
|
//# sourceMappingURL=zudoku.plugin-search-inkeep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zudoku.plugin-search-inkeep.js","sources":["../src/lib/plugins/search-inkeep/inkeep.ts","../src/lib/plugins/search-inkeep/index.tsx"],"sourcesContent":["import {\n InkeepAIChatSettings,\n InkeepModalSettings,\n InkeepSearchSettings,\n} from \"@inkeep/widgets\";\n\nconst baseSettings = {\n theme: {\n components: {\n AIChatPageWrapper: {\n defaultProps: {\n size: \"shrink-vertically\",\n variant: \"no-shadow\",\n },\n },\n SearchBarTrigger: {\n defaultProps: {\n size: \"expand\",\n variant: \"subtle\", // Choose from 'emphasized' or 'subtle'\n },\n },\n },\n },\n} as const;\n\nconst modalSettings: InkeepModalSettings = {};\n\nconst searchSettings: InkeepSearchSettings = {};\n\nconst aiChatSettings: InkeepAIChatSettings = {};\n\nexport { aiChatSettings, baseSettings, modalSettings, searchSettings };\n","import type { InkeepWidgetBaseSettings } from \"@inkeep/widgets\";\nimport { lazy } from \"react\";\nimport type { DevPortalPlugin } from \"../../core/plugins.js\";\nimport { aiChatSettings, baseSettings } from \"./inkeep.js\";\n\ntype PickedPluginInkeepBaseSettings =\n | \"apiKey\"\n | \"integrationId\"\n | \"organizationId\"\n | \"primaryBrandColor\"\n | \"organizationDisplayName\";\n\ntype PluginInkeepBaseSettings = Pick<\n InkeepWidgetBaseSettings,\n PickedPluginInkeepBaseSettings\n>;\n\nconst Inkeep = lazy(() => import(\"./InkeepCustomTrigger.js\"));\n\nconst InkeepSearch = ({\n prefilledQuery,\n isOpen,\n onClose,\n settings,\n}: {\n isOpen: boolean;\n onClose: () => void;\n prefilledQuery?: string | null;\n settings: PluginInkeepBaseSettings;\n}) => {\n return (\n <Inkeep\n isOpen={isOpen}\n onClose={onClose}\n baseSettings={{ ...baseSettings, ...settings }}\n aiChatSettings={aiChatSettings}\n searchSettings={{\n prefilledQuery: prefilledQuery || undefined,\n }}\n />\n );\n};\n\nexport const inkeepSearchPlugin = (\n settings: PluginInkeepBaseSettings,\n): DevPortalPlugin => {\n return {\n
|
|
1
|
+
{"version":3,"file":"zudoku.plugin-search-inkeep.js","sources":["../src/lib/components/ClientOnly.tsx","../src/lib/plugins/search-inkeep/inkeep.ts","../src/lib/plugins/search-inkeep/index.tsx"],"sourcesContent":["import { useSyncExternalStore } from \"react\";\n\nconst noop = () => () => {};\n\nexport const ClientOnly = (props: { children: React.ReactNode }) => {\n const value = useSyncExternalStore(\n noop,\n () => \"client\",\n () => \"server\",\n );\n\n return value === \"client\" ? props.children : null;\n};\n","import {\n InkeepAIChatSettings,\n InkeepModalSettings,\n InkeepSearchSettings,\n} from \"@inkeep/widgets\";\n\nconst baseSettings = {\n theme: {\n components: {\n AIChatPageWrapper: {\n defaultProps: {\n size: \"shrink-vertically\",\n variant: \"no-shadow\",\n },\n },\n SearchBarTrigger: {\n defaultProps: {\n size: \"expand\",\n variant: \"subtle\", // Choose from 'emphasized' or 'subtle'\n },\n },\n },\n },\n} as const;\n\nconst modalSettings: InkeepModalSettings = {};\n\nconst searchSettings: InkeepSearchSettings = {};\n\nconst aiChatSettings: InkeepAIChatSettings = {};\n\nexport { aiChatSettings, baseSettings, modalSettings, searchSettings };\n","import type { InkeepWidgetBaseSettings } from \"@inkeep/widgets\";\nimport { lazy } from \"react\";\nimport { ClientOnly } from \"../../components/ClientOnly.js\";\nimport type { DevPortalPlugin } from \"../../core/plugins.js\";\nimport { aiChatSettings, baseSettings } from \"./inkeep.js\";\n\ntype PickedPluginInkeepBaseSettings =\n | \"apiKey\"\n | \"integrationId\"\n | \"organizationId\"\n | \"primaryBrandColor\"\n | \"organizationDisplayName\";\n\ntype PluginInkeepBaseSettings = Pick<\n InkeepWidgetBaseSettings,\n PickedPluginInkeepBaseSettings\n>;\n\nconst Inkeep = lazy(() => import(\"./InkeepCustomTrigger.js\"));\n\nconst InkeepSearch = ({\n prefilledQuery,\n isOpen,\n onClose,\n settings,\n}: {\n isOpen: boolean;\n onClose: () => void;\n prefilledQuery?: string | null;\n settings: PluginInkeepBaseSettings;\n}) => {\n return (\n <Inkeep\n isOpen={isOpen}\n onClose={onClose}\n baseSettings={{ ...baseSettings, ...settings }}\n aiChatSettings={aiChatSettings}\n searchSettings={{\n prefilledQuery: prefilledQuery || undefined,\n }}\n />\n );\n};\n\nexport const inkeepSearchPlugin = (\n settings: PluginInkeepBaseSettings,\n): DevPortalPlugin => {\n return {\n renderSearch: ({\n isOpen,\n onClose,\n }: {\n isOpen: boolean;\n onClose: () => void;\n }) => {\n return (\n <ClientOnly>\n <InkeepSearch isOpen={isOpen} onClose={onClose} settings={settings} />\n </ClientOnly>\n );\n },\n };\n};\n"],"names":["noop","ClientOnly","props","useSyncExternalStore","baseSettings","aiChatSettings","Inkeep","lazy","InkeepSearch","prefilledQuery","isOpen","onClose","settings","jsx","inkeepSearchPlugin"],"mappings":";;AAEA,MAAMA,IAAO,MAAM,MAAM;AAAC,GAEbC,IAAa,CAACC,MACXC;AAAA,EACZH;AAAA,EACA,MAAM;AAAA,EACN,MAAM;AAAA,MAGS,WAAWE,EAAM,WAAW,MCLzCE,IAAe;AAAA,EACnB,OAAO;AAAA,IACL,YAAY;AAAA,MACV,mBAAmB;AAAA,QACjB,cAAc;AAAA,UACZ,MAAM;AAAA,UACN,SAAS;AAAA,QACX;AAAA,MACF;AAAA,MACA,kBAAkB;AAAA,QAChB,cAAc;AAAA,UACZ,MAAM;AAAA,UACN,SAAS;AAAA;AAAA,QACX;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF,GAMMC,IAAuC,CAAC,GCXxCC,IAASC,EAAK,MAAM,OAAO,mCAA0B,CAAC,GAEtDC,IAAe,CAAC;AAAA,EACpB,gBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,UAAAC;AACF,MAOIC,gBAAAA,EAAA;AAAA,EAACP;AAAA,EAAA;AAAA,IACC,QAAAI;AAAA,IACA,SAAAC;AAAA,IACA,cAAc,EAAE,GAAGP,GAAc,GAAGQ,EAAS;AAAA,IAC7C,gBAAAP;AAAA,IACA,gBAAgB;AAAA,MACd,gBAAgBI,KAAkB;AAAA,IACpC;AAAA,EAAA;AAAA,GAKOK,IAAqB,CAChCF,OAEO;AAAA,EACL,cAAc,CAAC;AAAA,IACb,QAAAF;AAAA,IACA,SAAAC;AAAA,EAAA,4BAMGV,GACC,EAAA,UAAAY,gBAAAA,EAAAA,IAACL,KAAa,QAAAE,GAAgB,SAAAC,GAAkB,UAAAC,EAAoB,CAAA,EACtE,CAAA;AAEJ;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zudoku",
|
|
3
|
-
"version": "0.3.0
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -9,79 +9,108 @@
|
|
|
9
9
|
"src/lib",
|
|
10
10
|
"src/app"
|
|
11
11
|
],
|
|
12
|
-
"module": "./dist/index.js",
|
|
13
|
-
"types": "./dist/index.d.ts",
|
|
14
12
|
"bin": {
|
|
15
13
|
"zudoku": "./cli.js"
|
|
16
14
|
},
|
|
17
15
|
"exports": {
|
|
18
|
-
".":
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
"./
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"./
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"./
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
"./
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"./
|
|
38
|
-
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
"
|
|
16
|
+
".": "./src/index.ts",
|
|
17
|
+
"./internal": "./src/internal.ts",
|
|
18
|
+
"./auth/clerk": "./src/lib/authentication/providers/clerk.ts",
|
|
19
|
+
"./auth/auth0": "./src/lib/authentication/providers/auth0.ts",
|
|
20
|
+
"./auth/openid": "./src/lib/authentication/providers/openid.ts",
|
|
21
|
+
"./plugins/api-keys": "./src/lib/plugins/api-keys/index.ts",
|
|
22
|
+
"./plugins/markdown": "./src/lib/plugins/markdown/index.ts",
|
|
23
|
+
"./plugins/openapi": "./src/lib/plugins/openapi/index.ts",
|
|
24
|
+
"./plugins/redirect": "./src/lib/plugins/redirect/index.ts",
|
|
25
|
+
"./plugins/custom-page": "./src/lib/plugins/custom-page/index.ts",
|
|
26
|
+
"./plugins/search-inkeep": "./src/lib/plugins/search-inkeep/index.ts",
|
|
27
|
+
"./openapi-worker": "./src/lib/plugins/openapi-worker.ts",
|
|
28
|
+
"./components": "./src/lib/components/index.ts",
|
|
29
|
+
"./vite": "./src/vite/plugin.ts",
|
|
30
|
+
"./tailwind": "./src/app/tailwind.ts",
|
|
31
|
+
"./app/*": "./src/app/*"
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"module": "./dist/index.js",
|
|
35
|
+
"types": "./dist/index.d.ts",
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"import": "./dist/index.js",
|
|
39
|
+
"types": "./dist/index.d.ts"
|
|
40
|
+
},
|
|
41
|
+
"./internal": {
|
|
42
|
+
"import": "./dist/internal.js"
|
|
43
|
+
},
|
|
44
|
+
"./auth/clerk": {
|
|
45
|
+
"import": "./lib/zudoku.auth-clerk.js",
|
|
46
|
+
"types": "./dist/lib/authentication/providers/clerk.d.ts"
|
|
47
|
+
},
|
|
48
|
+
"./auth/auth0": {
|
|
49
|
+
"import": "./lib/zudoku.auth-auth0.js",
|
|
50
|
+
"types": "./dist/lib/authentication/providers/auth0.d.ts"
|
|
51
|
+
},
|
|
52
|
+
"./auth/openid": {
|
|
53
|
+
"import": "./lib/zudoku.auth-openid.js",
|
|
54
|
+
"types": "./dist/lib/authentication/providers/openid.d.ts"
|
|
55
|
+
},
|
|
56
|
+
"./plugins/api-keys": {
|
|
57
|
+
"import": "./lib/zudoku.plugin-api-keys.js",
|
|
58
|
+
"types": "./dist/lib/plugins/api-keys/index.d.ts"
|
|
59
|
+
},
|
|
60
|
+
"./plugins/markdown": {
|
|
61
|
+
"import": "./lib/zudoku.plugin-markdown.js",
|
|
62
|
+
"types": "./dist/lib/plugins/markdown/index.d.ts"
|
|
63
|
+
},
|
|
64
|
+
"./plugins/openapi": {
|
|
65
|
+
"import": "./lib/zudoku.plugin-openapi.js",
|
|
66
|
+
"types": "./dist/lib/plugins/openapi/index.d.ts"
|
|
67
|
+
},
|
|
68
|
+
"./plugins/redirect": {
|
|
69
|
+
"import": "./lib/zudoku.plugin-redirect.js",
|
|
70
|
+
"types": "./dist/lib/plugins/redirect/index.d.ts"
|
|
71
|
+
},
|
|
72
|
+
"./plugins/custom-page": {
|
|
73
|
+
"import": "./lib/zudoku.plugin-custom-page.js",
|
|
74
|
+
"types": "./dist/lib/plugins/custom-page/index.d.ts"
|
|
75
|
+
},
|
|
76
|
+
"./plugins/search-inkeep": {
|
|
77
|
+
"import": "./lib/zudoku.plugin-search-inkeep.js",
|
|
78
|
+
"types": "./dist/lib/plugins/search-inkeep/index.d.ts"
|
|
79
|
+
},
|
|
80
|
+
"./openapi-worker": {
|
|
81
|
+
"import": "./lib/zudoku.openapi-worker.js",
|
|
82
|
+
"types": "./dist/lib/plugins/openapi-worker.d.ts"
|
|
83
|
+
},
|
|
84
|
+
"./components": {
|
|
85
|
+
"import": "./lib/zudoku.components.js",
|
|
86
|
+
"types": "./dist/lib/components/index.d.ts"
|
|
87
|
+
},
|
|
88
|
+
"./vite": {
|
|
89
|
+
"require": "./dist/vite/plugin.js",
|
|
90
|
+
"import": "./dist/vite/plugin.js"
|
|
91
|
+
},
|
|
92
|
+
"./tailwind": {
|
|
93
|
+
"require": "./dist/app/tailwind.js",
|
|
94
|
+
"import": "./dist/app/tailwind.js"
|
|
95
|
+
},
|
|
96
|
+
"./main.css": {
|
|
97
|
+
"require": "./src/app/main.css",
|
|
98
|
+
"import": "./src/app/main.css"
|
|
99
|
+
},
|
|
100
|
+
"./app/*": {
|
|
101
|
+
"import": "./src/app/*"
|
|
102
|
+
}
|
|
83
103
|
}
|
|
84
104
|
},
|
|
105
|
+
"scripts": {
|
|
106
|
+
"build": "tsc --project tsconfig.json",
|
|
107
|
+
"build:vite": "vite build && pnpm run hack:fix-worker-paths lib",
|
|
108
|
+
"build:standalone:vite": "vite build --mode standalone --config vite.standalone.config.ts",
|
|
109
|
+
"build:standalone:html": "cp ./src/app/standalone.html ./standalone/standalone.html && cp ./src/app/demo.html ./standalone/demo.html && cp ./src/app/demo-cdn.html ./standalone/index.html",
|
|
110
|
+
"hack:fix-worker-paths": "node ./scripts/hack-worker.mjs",
|
|
111
|
+
"clean": "tsc --build --clean",
|
|
112
|
+
"test": "node --test --enable-source-maps"
|
|
113
|
+
},
|
|
85
114
|
"dependencies": {
|
|
86
115
|
"@envelop/core": "5.0.1",
|
|
87
116
|
"@graphql-typed-document-node/core": "3.2.0",
|
|
@@ -128,6 +157,7 @@
|
|
|
128
157
|
"react-is": "18.3.1",
|
|
129
158
|
"react-markdown": "9.0.1",
|
|
130
159
|
"react-router-dom": "6.25.1",
|
|
160
|
+
"rehype-raw": "7.0.0",
|
|
131
161
|
"rehype-slug": "6.0.0",
|
|
132
162
|
"remark-comment": "1.0.0",
|
|
133
163
|
"remark-directive": "3.0.0",
|
|
@@ -186,14 +216,5 @@
|
|
|
186
216
|
"optionalDependencies": {
|
|
187
217
|
"@clerk/clerk-js": "5.11.0",
|
|
188
218
|
"@inkeep/widgets": "^0.2.289"
|
|
189
|
-
},
|
|
190
|
-
"scripts": {
|
|
191
|
-
"build": "tsc --project tsconfig.json",
|
|
192
|
-
"build:vite": "vite build && pnpm run hack:fix-worker-paths lib",
|
|
193
|
-
"build:standalone:vite": "vite build --mode standalone --config vite.standalone.config.ts",
|
|
194
|
-
"build:standalone:html": "cp ./src/app/standalone.html ./standalone/standalone.html && cp ./src/app/demo.html ./standalone/demo.html && cp ./src/app/demo-cdn.html ./standalone/index.html",
|
|
195
|
-
"hack:fix-worker-paths": "node ./scripts/hack-worker.mjs",
|
|
196
|
-
"clean": "tsc --build --clean",
|
|
197
|
-
"test": "node --test --enable-source-maps"
|
|
198
219
|
}
|
|
199
|
-
}
|
|
220
|
+
}
|
package/src/app/demo-cdn.html
CHANGED
package/src/app/demo.html
CHANGED
package/src/app/demo.tsx
CHANGED
|
@@ -4,6 +4,7 @@ import { createBrowserRouter } from "react-router-dom";
|
|
|
4
4
|
import { Bootstrap } from "zudoku/components";
|
|
5
5
|
import type { ZudokuConfig } from "../config/validators/validate.js";
|
|
6
6
|
import { openApiPlugin } from "../lib/plugins/openapi/index.js";
|
|
7
|
+
import { themeToggle } from "../lib/themeToggle.js";
|
|
7
8
|
import "../lib/util/logInit.js";
|
|
8
9
|
import "./main.css";
|
|
9
10
|
import { getRoutesByConfig } from "./main.js";
|
|
@@ -16,9 +17,12 @@ if (!apiUrl) {
|
|
|
16
17
|
);
|
|
17
18
|
}
|
|
18
19
|
|
|
20
|
+
themeToggle();
|
|
21
|
+
|
|
19
22
|
logger.info(`API URL: ${apiUrl}`);
|
|
20
23
|
|
|
21
|
-
const root =
|
|
24
|
+
const root =
|
|
25
|
+
document.getElementById("zudoku") ?? document.getElementById("root");
|
|
22
26
|
|
|
23
27
|
if (!root) {
|
|
24
28
|
throw new Error("No div found with id root");
|
|
@@ -29,13 +33,7 @@ if (!root) {
|
|
|
29
33
|
|
|
30
34
|
const config = {
|
|
31
35
|
page: {
|
|
32
|
-
|
|
33
|
-
src: {
|
|
34
|
-
light: "https://cdn.zudoku.dev/logos/icon.svg",
|
|
35
|
-
dark: "https://cdn.zudoku.dev/logos/icon.svg",
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
pageTitle: "Developer Portal",
|
|
36
|
+
pageTitle: "Demo",
|
|
39
37
|
},
|
|
40
38
|
topNavigation: [
|
|
41
39
|
{
|
|
@@ -56,6 +54,6 @@ const config = {
|
|
|
56
54
|
|
|
57
55
|
const routes = getRoutesByConfig(config);
|
|
58
56
|
const router = createBrowserRouter(routes, {
|
|
59
|
-
basename:
|
|
57
|
+
basename: window.location.pathname,
|
|
60
58
|
});
|
|
61
59
|
createRoot(root).render(<Bootstrap router={router} />);
|
package/src/app/main.css
CHANGED
|
@@ -170,6 +170,28 @@
|
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
+
.scrollbar::-webkit-scrollbar {
|
|
174
|
+
padding: 2px;
|
|
175
|
+
width: 12px;
|
|
176
|
+
height: 12px;
|
|
177
|
+
background: transparent;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.scrollbar:hover::-webkit-scrollbar-thumb {
|
|
181
|
+
background: hsla(var(--border));
|
|
182
|
+
border-radius: 12px;
|
|
183
|
+
border: 2px solid transparent;
|
|
184
|
+
background-clip: content-box;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.scrollbar::-webkit-scrollbar-thumb {
|
|
188
|
+
background: transparent;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.scrollbar::-webkit-scrollbar-corner {
|
|
192
|
+
background: transparent;
|
|
193
|
+
}
|
|
194
|
+
|
|
173
195
|
/* Theme */
|
|
174
196
|
:root {
|
|
175
197
|
--background: 0 0% 100%;
|
package/src/app/main.tsx
CHANGED
|
@@ -9,32 +9,35 @@ import "virtual:zudoku-theme.css";
|
|
|
9
9
|
import { DevPortal, Layout, RouterError } from "zudoku/components";
|
|
10
10
|
import { isNavigationPlugin } from "zudoku/internal";
|
|
11
11
|
import { customPagePlugin } from "zudoku/plugins/custom-page";
|
|
12
|
+
import { inkeepSearchPlugin } from "zudoku/plugins/search-inkeep";
|
|
12
13
|
import type { ZudokuConfig } from "../config/config.js";
|
|
13
14
|
import type { ZudokuContextOptions } from "../lib/core/DevPortalContext.js";
|
|
14
|
-
import { inkeepSearchPlugin } from "../lib/plugins/search-inkeep/index.js";
|
|
15
15
|
|
|
16
16
|
export const convertZudokuConfigToOptions = (
|
|
17
17
|
config: ZudokuConfig,
|
|
18
18
|
): ZudokuContextOptions => {
|
|
19
|
-
const
|
|
20
|
-
config.page?.logoUrl ??
|
|
19
|
+
const fallbackLogoLight =
|
|
20
|
+
config.page?.logoUrl ??
|
|
21
|
+
"https://cdn.zudoku.dev/logos/zudoku-logo-full-light.svg";
|
|
22
|
+
const fallbackLogoDark =
|
|
23
|
+
config.page?.logoUrl ??
|
|
24
|
+
"https://cdn.zudoku.dev/logos/zudoku-logo-full-dark.svg";
|
|
21
25
|
|
|
22
26
|
return {
|
|
23
27
|
page: {
|
|
24
|
-
pageTitle: "Developer Portal",
|
|
25
28
|
...config.page,
|
|
26
29
|
logo: {
|
|
27
30
|
...config.page?.logo,
|
|
28
31
|
src: {
|
|
29
|
-
light: config.page?.logo?.src?.light ??
|
|
30
|
-
dark: config.page?.logo?.src?.dark ??
|
|
32
|
+
light: config.page?.logo?.src?.light ?? fallbackLogoLight,
|
|
33
|
+
dark: config.page?.logo?.src?.dark ?? fallbackLogoDark,
|
|
31
34
|
},
|
|
32
35
|
},
|
|
33
36
|
},
|
|
34
37
|
slotlets: config.slotlets,
|
|
35
38
|
metadata: {
|
|
36
|
-
favicon: "https://cdn.zudoku.dev/logos/
|
|
37
|
-
title: "%s
|
|
39
|
+
favicon: "https://cdn.zudoku.dev/logos/favicon.svg",
|
|
40
|
+
title: "%s - Zudoku",
|
|
38
41
|
...config.metadata,
|
|
39
42
|
},
|
|
40
43
|
sidebars: configuredSidebar,
|
package/src/app/standalone.html
CHANGED
package/src/app/standalone.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import { createBrowserRouter } from "react-router-dom";
|
|
|
3
3
|
import { Bootstrap } from "zudoku/components";
|
|
4
4
|
import type { ZudokuConfig } from "../config/validators/validate.js";
|
|
5
5
|
import { openApiPlugin } from "../lib/plugins/openapi/index.js";
|
|
6
|
+
import { themeToggle } from "../lib/themeToggle.js";
|
|
6
7
|
import "../lib/util/logInit.js";
|
|
7
8
|
import "./main.css";
|
|
8
9
|
import { getRoutesByConfig } from "./main.js";
|
|
@@ -12,6 +13,8 @@ if (!root) {
|
|
|
12
13
|
throw new Error("No div found with attribute data-api-url");
|
|
13
14
|
}
|
|
14
15
|
|
|
16
|
+
themeToggle();
|
|
17
|
+
|
|
15
18
|
const apiUrl = root.getAttribute("data-api-url");
|
|
16
19
|
const pageTitle = document.getElementsByTagName("title")[0].innerText;
|
|
17
20
|
const logoUrl = root.getAttribute("data-logo-url");
|
|
@@ -21,13 +24,15 @@ const logoUrl = root.getAttribute("data-logo-url");
|
|
|
21
24
|
|
|
22
25
|
const config = {
|
|
23
26
|
page: {
|
|
24
|
-
logo:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
logo: logoUrl
|
|
28
|
+
? {
|
|
29
|
+
src: {
|
|
30
|
+
light: logoUrl,
|
|
31
|
+
dark: logoUrl,
|
|
32
|
+
},
|
|
33
|
+
}
|
|
34
|
+
: undefined,
|
|
35
|
+
pageTitle,
|
|
31
36
|
},
|
|
32
37
|
topNavigation: [
|
|
33
38
|
{
|
|
@@ -48,6 +53,6 @@ const config = {
|
|
|
48
53
|
|
|
49
54
|
const routes = getRoutesByConfig(config);
|
|
50
55
|
const router = createBrowserRouter(routes, {
|
|
51
|
-
basename:
|
|
56
|
+
basename: window.location.pathname,
|
|
52
57
|
});
|
|
53
58
|
createRoot(root).render(<Bootstrap router={router} />);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useSyncExternalStore } from "react";
|
|
2
|
+
|
|
3
|
+
const noop = () => () => {};
|
|
4
|
+
|
|
5
|
+
export const ClientOnly = (props: { children: React.ReactNode }) => {
|
|
6
|
+
const value = useSyncExternalStore(
|
|
7
|
+
noop,
|
|
8
|
+
() => "client",
|
|
9
|
+
() => "server",
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
return value === "client" ? props.children : null;
|
|
13
|
+
};
|
|
@@ -21,6 +21,7 @@ import { cn } from "../util/cn.js";
|
|
|
21
21
|
import { useTheme } from "./context/ThemeContext.js";
|
|
22
22
|
import { useZudoku } from "./context/ZudokuContext.js";
|
|
23
23
|
import { Search } from "./Search.js";
|
|
24
|
+
import { Slotlet } from "./SlotletProvider.js";
|
|
24
25
|
import { TopNavigation } from "./TopNavigation.js";
|
|
25
26
|
|
|
26
27
|
const RecursiveMenu = ({ item }: { item: ProfileNavigationItem }) => {
|
|
@@ -94,6 +95,7 @@ export const Header = memo(function HeaderInner() {
|
|
|
94
95
|
</div>
|
|
95
96
|
|
|
96
97
|
<div className="items-center justify-self-end text-sm hidden lg:flex gap-2">
|
|
98
|
+
<Slotlet name="head-navigation-start" />
|
|
97
99
|
{isAuthEnabled && !isAuthenticated ? (
|
|
98
100
|
<Button variant="ghost" asChild>
|
|
99
101
|
<Link
|
|
@@ -132,6 +134,7 @@ export const Header = memo(function HeaderInner() {
|
|
|
132
134
|
>
|
|
133
135
|
<ThemeIcon size={18} />
|
|
134
136
|
</button>
|
|
137
|
+
<Slotlet name="head-navigation-end" />
|
|
135
138
|
</div>
|
|
136
139
|
</div>
|
|
137
140
|
</div>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import ReactMarkdown from "react-markdown";
|
|
2
|
+
import rehypeRaw from "rehype-raw";
|
|
2
3
|
import remarkGfm from "remark-gfm";
|
|
3
4
|
import { visit } from "unist-util-visit";
|
|
4
5
|
import { MdxComponents } from "../util/MdxComponents.js";
|
|
@@ -8,13 +9,13 @@ import { MdxComponents } from "../util/MdxComponents.js";
|
|
|
8
9
|
const rehypeCodeBlockPlugin = () => (tree: any) => {
|
|
9
10
|
visit(tree, "element", (node, _index, parent) => {
|
|
10
11
|
if (node.tagName === "code") {
|
|
11
|
-
node.properties.inline = parent?.tagName !== "pre";
|
|
12
|
+
node.properties.inline = String(parent?.tagName !== "pre");
|
|
12
13
|
}
|
|
13
14
|
});
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
const remarkPlugins = [remarkGfm];
|
|
17
|
-
const rehypePlugins = [rehypeCodeBlockPlugin];
|
|
18
|
+
const rehypePlugins = [rehypeCodeBlockPlugin, rehypeRaw];
|
|
18
19
|
|
|
19
20
|
// other styles are defined in main.css .prose
|
|
20
21
|
export const ProseClasses = "prose dark:prose-invert prose-neutral";
|