zudoku 0.3.0-dev.98 → 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.
Files changed (206) hide show
  1. package/dist/app/demo.js +5 -9
  2. package/dist/app/demo.js.map +1 -1
  3. package/dist/app/main.js +9 -7
  4. package/dist/app/main.js.map +1 -1
  5. package/dist/app/standalone.js +12 -8
  6. package/dist/app/standalone.js.map +1 -1
  7. package/dist/cli/dev/handler.js +1 -1
  8. package/dist/config/validators/SidebarSchema.js +9 -4
  9. package/dist/config/validators/SidebarSchema.js.map +1 -1
  10. package/dist/lib/components/ClientOnly.d.ts +3 -0
  11. package/dist/lib/components/ClientOnly.js +7 -0
  12. package/dist/lib/components/ClientOnly.js.map +1 -0
  13. package/dist/lib/components/Header.js +3 -2
  14. package/dist/lib/components/Header.js.map +1 -1
  15. package/dist/lib/components/Markdown.js +3 -2
  16. package/dist/lib/components/Markdown.js.map +1 -1
  17. package/dist/lib/components/Search.js +5 -8
  18. package/dist/lib/components/Search.js.map +1 -1
  19. package/dist/lib/components/SlotletProvider.d.ts +2 -2
  20. package/dist/lib/components/SlotletProvider.js +7 -2
  21. package/dist/lib/components/SlotletProvider.js.map +1 -1
  22. package/dist/lib/components/navigation/SidebarCategory.js +6 -2
  23. package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
  24. package/dist/lib/components/navigation/SidebarItem.js +3 -2
  25. package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
  26. package/dist/lib/components/navigation/SidebarWrapper.js +2 -3
  27. package/dist/lib/components/navigation/SidebarWrapper.js.map +1 -1
  28. package/dist/lib/core/plugins.d.ts +1 -1
  29. package/dist/lib/core/plugins.js +1 -1
  30. package/dist/lib/core/plugins.js.map +1 -1
  31. package/dist/lib/oas/graphql/index.js +18 -3
  32. package/dist/lib/oas/graphql/index.js.map +1 -1
  33. package/dist/lib/plugins/markdown/MdxPage.js +1 -1
  34. package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
  35. package/dist/lib/plugins/openapi/OperationListItem.js +5 -5
  36. package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
  37. package/dist/lib/plugins/openapi/ParameterList.js +3 -1
  38. package/dist/lib/plugins/openapi/ParameterList.js.map +1 -1
  39. package/dist/lib/plugins/openapi/ResponsesSidecarBox.d.ts +3 -1
  40. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js +5 -9
  41. package/dist/lib/plugins/openapi/ResponsesSidecarBox.js.map +1 -1
  42. package/dist/lib/plugins/openapi/Sidecar.d.ts +3 -1
  43. package/dist/lib/plugins/openapi/Sidecar.js +11 -5
  44. package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
  45. package/dist/lib/plugins/openapi/index.js +1 -1
  46. package/dist/lib/plugins/openapi/index.js.map +1 -1
  47. package/dist/lib/plugins/openapi/playground/Playground.js +2 -3
  48. package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
  49. package/dist/lib/plugins/openapi/playground/createUrl.js +5 -1
  50. package/dist/lib/plugins/openapi/playground/createUrl.js.map +1 -1
  51. package/dist/lib/plugins/openapi/schema/SchemaComponents.d.ts +13 -0
  52. package/dist/lib/plugins/openapi/schema/SchemaComponents.js +28 -0
  53. package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +1 -0
  54. package/dist/lib/plugins/openapi/schema/SchemaView.d.ts +6 -0
  55. package/dist/lib/plugins/openapi/schema/SchemaView.js +58 -0
  56. package/dist/lib/plugins/openapi/schema/SchemaView.js.map +1 -0
  57. package/dist/lib/plugins/openapi/schema/utils.d.ts +3 -0
  58. package/dist/lib/plugins/openapi/schema/utils.js +6 -0
  59. package/dist/lib/plugins/openapi/schema/utils.js.map +1 -0
  60. package/dist/lib/plugins/search-inkeep/index.js +5 -8
  61. package/dist/lib/plugins/search-inkeep/index.js.map +1 -1
  62. package/dist/lib/plugins/search-inkeep/inkeep.d.ts +19 -2
  63. package/dist/lib/plugins/search-inkeep/inkeep.js +1 -15
  64. package/dist/lib/plugins/search-inkeep/inkeep.js.map +1 -1
  65. package/dist/lib/themeToggle.d.ts +1 -0
  66. package/dist/lib/themeToggle.js +7 -0
  67. package/dist/lib/themeToggle.js.map +1 -0
  68. package/dist/lib/util/MdxComponents.js +4 -4
  69. package/dist/lib/util/MdxComponents.js.map +1 -1
  70. package/dist/vite/config.d.ts +4 -5
  71. package/dist/vite/config.js +7 -4
  72. package/dist/vite/config.js.map +1 -1
  73. package/dist/vite/config.test.js +2 -2
  74. package/dist/vite/config.test.js.map +1 -1
  75. package/dist/vite/dev-server.d.ts +0 -1
  76. package/dist/vite/dev-server.js +2 -21
  77. package/dist/vite/dev-server.js.map +1 -1
  78. package/dist/vite/html.js +2 -11
  79. package/dist/vite/html.js.map +1 -1
  80. package/dist/vite/plugin-api-keys.d.ts +3 -3
  81. package/dist/vite/plugin-api-keys.js +2 -1
  82. package/dist/vite/plugin-api-keys.js.map +1 -1
  83. package/dist/vite/plugin-api.d.ts +3 -3
  84. package/dist/vite/plugin-api.js +2 -1
  85. package/dist/vite/plugin-api.js.map +1 -1
  86. package/dist/vite/plugin-auth.d.ts +3 -3
  87. package/dist/vite/plugin-auth.js +2 -1
  88. package/dist/vite/plugin-auth.js.map +1 -1
  89. package/dist/vite/plugin-component.d.ts +3 -3
  90. package/dist/vite/plugin-component.js +17 -14
  91. package/dist/vite/plugin-component.js.map +1 -1
  92. package/dist/vite/plugin-config-reload.d.ts +4 -0
  93. package/dist/vite/plugin-config-reload.js +24 -0
  94. package/dist/vite/plugin-config-reload.js.map +1 -0
  95. package/dist/vite/plugin-config.d.ts +2 -2
  96. package/dist/vite/plugin-config.js.map +1 -1
  97. package/dist/vite/plugin-custom-css.d.ts +3 -3
  98. package/dist/vite/plugin-custom-css.js +2 -1
  99. package/dist/vite/plugin-custom-css.js.map +1 -1
  100. package/dist/vite/plugin-docs.d.ts +3 -3
  101. package/dist/vite/plugin-docs.js +3 -2
  102. package/dist/vite/plugin-docs.js.map +1 -1
  103. package/dist/vite/plugin-html-transform.d.ts +2 -0
  104. package/dist/vite/plugin-html-transform.js +15 -0
  105. package/dist/vite/plugin-html-transform.js.map +1 -0
  106. package/dist/vite/plugin-mdx.d.ts +3 -3
  107. package/dist/vite/plugin-mdx.js +2 -1
  108. package/dist/vite/plugin-mdx.js.map +1 -1
  109. package/dist/vite/plugin-metadata.d.ts +1 -1
  110. package/dist/vite/plugin-redirect.d.ts +3 -3
  111. package/dist/vite/plugin-redirect.js +2 -1
  112. package/dist/vite/plugin-redirect.js.map +1 -1
  113. package/dist/vite/plugin-sidebar.d.ts +3 -3
  114. package/dist/vite/plugin-sidebar.js +5 -4
  115. package/dist/vite/plugin-sidebar.js.map +1 -1
  116. package/dist/vite/plugin.d.ts +3 -2
  117. package/dist/vite/plugin.js +16 -11
  118. package/dist/vite/plugin.js.map +1 -1
  119. package/lib/{CategoryHeading-BWq12Bfa.js → CategoryHeading-z15xh7Jb.js} +2 -2
  120. package/lib/{CategoryHeading-BWq12Bfa.js.map → CategoryHeading-z15xh7Jb.js.map} +1 -1
  121. package/lib/{Combination-D-9IH0zy.js → Combination-DTfV-c98.js} +2 -2
  122. package/lib/{Combination-D-9IH0zy.js.map → Combination-DTfV-c98.js.map} +1 -1
  123. package/lib/{Input-HmAaR6kw.js → Input-DB9VROFR.js} +3 -3
  124. package/lib/{Input-HmAaR6kw.js.map → Input-DB9VROFR.js.map} +1 -1
  125. package/lib/Markdown-CEccPMI_.js +20508 -0
  126. package/lib/Markdown-CEccPMI_.js.map +1 -0
  127. package/lib/{MdxPage-oN3huD58.js → MdxPage-CnqOoqvp.js} +12 -15
  128. package/lib/MdxPage-CnqOoqvp.js.map +1 -0
  129. package/lib/OperationList-Cxiw2Z-v.js +457 -0
  130. package/lib/OperationList-Cxiw2Z-v.js.map +1 -0
  131. package/lib/{Route-DAF15JAU.js → Route-DfAFiR7v.js} +2 -2
  132. package/lib/{Route-DAF15JAU.js.map → Route-DfAFiR7v.js.map} +1 -1
  133. package/lib/SlotletProvider-ByLSCZQa.js +262 -0
  134. package/lib/SlotletProvider-ByLSCZQa.js.map +1 -0
  135. package/lib/{Spinner-BCz1kNGw.js → Spinner-BT_AYFrA.js} +3 -3
  136. package/lib/{Spinner-BCz1kNGw.js.map → Spinner-BT_AYFrA.js.map} +1 -1
  137. package/lib/assets/{worker-CR7aeKop.js → worker-CzHUifWA.js} +710 -703
  138. package/lib/assets/{worker-CR7aeKop.js.map → worker-CzHUifWA.js.map} +1 -1
  139. package/lib/{index-CtKkHGcd.js → index-D-9zqIOh.js} +1159 -1147
  140. package/lib/index-D-9zqIOh.js.map +1 -0
  141. package/lib/{index-D-9Z7HSn.js → index-Dz4LyXZI.js} +3 -3
  142. package/lib/{index-D-9Z7HSn.js.map → index-Dz4LyXZI.js.map} +1 -1
  143. package/lib/zudoku.components.js +775 -759
  144. package/lib/zudoku.components.js.map +1 -1
  145. package/lib/zudoku.openapi-worker.js +734 -727
  146. package/lib/zudoku.openapi-worker.js.map +1 -1
  147. package/lib/zudoku.plugin-api-keys.js +4 -4
  148. package/lib/zudoku.plugin-custom-page.js +1 -1
  149. package/lib/zudoku.plugin-markdown.js +1 -1
  150. package/lib/zudoku.plugin-openapi.js +3 -3
  151. package/lib/zudoku.plugin-search-inkeep.js +24 -29
  152. package/lib/zudoku.plugin-search-inkeep.js.map +1 -1
  153. package/package.json +99 -78
  154. package/src/app/demo-cdn.html +1 -1
  155. package/src/app/demo.html +1 -1
  156. package/src/app/demo.tsx +7 -9
  157. package/src/app/main.css +22 -0
  158. package/src/app/main.tsx +11 -8
  159. package/src/app/standalone.html +1 -1
  160. package/src/app/standalone.tsx +13 -8
  161. package/src/lib/components/ClientOnly.tsx +13 -0
  162. package/src/lib/components/Header.tsx +4 -1
  163. package/src/lib/components/Markdown.tsx +3 -2
  164. package/src/lib/components/Search.tsx +7 -7
  165. package/src/lib/components/SlotletProvider.tsx +10 -5
  166. package/src/lib/components/navigation/SidebarCategory.tsx +13 -2
  167. package/src/lib/components/navigation/SidebarItem.tsx +3 -2
  168. package/src/lib/components/navigation/SidebarWrapper.tsx +20 -18
  169. package/src/lib/core/plugins.ts +2 -2
  170. package/src/lib/oas/graphql/index.ts +26 -7
  171. package/src/lib/plugins/markdown/MdxPage.tsx +0 -1
  172. package/src/lib/plugins/openapi/OperationListItem.tsx +22 -17
  173. package/src/lib/plugins/openapi/ParameterList.tsx +10 -8
  174. package/src/lib/plugins/openapi/ResponsesSidecarBox.tsx +51 -39
  175. package/src/lib/plugins/openapi/Sidecar.tsx +34 -19
  176. package/src/lib/plugins/openapi/index.tsx +1 -1
  177. package/src/lib/plugins/openapi/playground/Playground.tsx +3 -6
  178. package/src/lib/plugins/openapi/playground/createUrl.ts +6 -5
  179. package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +126 -0
  180. package/src/lib/plugins/openapi/schema/SchemaView.tsx +172 -0
  181. package/src/lib/plugins/openapi/schema/utils.ts +10 -0
  182. package/src/lib/plugins/search-inkeep/index.tsx +16 -8
  183. package/src/lib/plugins/search-inkeep/inkeep.ts +3 -18
  184. package/src/lib/themeToggle.ts +7 -0
  185. package/src/lib/util/MdxComponents.tsx +12 -12
  186. package/LICENSE.md +0 -21
  187. package/dist/lib/plugins/openapi/SchemaListView.d.ts +0 -7
  188. package/dist/lib/plugins/openapi/SchemaListView.js +0 -27
  189. package/dist/lib/plugins/openapi/SchemaListView.js.map +0 -1
  190. package/dist/lib/plugins/openapi/SchemaListViewItem.d.ts +0 -8
  191. package/dist/lib/plugins/openapi/SchemaListViewItem.js +0 -25
  192. package/dist/lib/plugins/openapi/SchemaListViewItem.js.map +0 -1
  193. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.d.ts +0 -8
  194. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js +0 -17
  195. package/dist/lib/plugins/openapi/SchemaListViewItemGroup.js.map +0 -1
  196. package/lib/Markdown-B_Gax7at.js +0 -14108
  197. package/lib/Markdown-B_Gax7at.js.map +0 -1
  198. package/lib/MdxPage-oN3huD58.js.map +0 -1
  199. package/lib/OperationList-Ctj0ihBN.js +0 -448
  200. package/lib/OperationList-Ctj0ihBN.js.map +0 -1
  201. package/lib/SlotletProvider-CzMAO73_.js +0 -82
  202. package/lib/SlotletProvider-CzMAO73_.js.map +0 -1
  203. package/lib/index-CtKkHGcd.js.map +0 -1
  204. package/src/lib/plugins/openapi/SchemaListView.tsx +0 -75
  205. package/src/lib/plugins/openapi/SchemaListViewItem.tsx +0 -125
  206. 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 { a as p, R as f } from "./SlotletProvider-CzMAO73_.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-HmAaR6kw.js";
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-D-9IH0zy.js";
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-B_Gax7at.js";
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
  *
@@ -1,5 +1,5 @@
1
1
  import { j as m } from "./jsx-runtime-B6kdoens.js";
2
- import { P as o } from "./Markdown-B_Gax7at.js";
2
+ import { P as o } from "./Markdown-CEccPMI_.js";
3
3
  const l = (s) => ({
4
4
  getRoutes: () => s.map(({ path: e, element: t }) => ({
5
5
  path: e,
@@ -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-oN3huD58.js"), { default: p, ...c } = await r();
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-CtKkHGcd.js";
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-D-9IH0zy.js";
7
- import "./Markdown-B_Gax7at.js";
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,11 +1,11 @@
1
1
  import { j as n } from "./jsx-runtime-B6kdoens.js";
2
- import { lazy as a } from "react";
3
- const r = {
4
- apiKey: "499c156cf7a9798343949c8bb5665ac95e48132c6d68c42e",
5
- integrationId: "clot3asdz0000s601nc8jwnzx",
6
- organizationId: "org_dDOlt2uJlMWM8oIS",
7
- primaryBrandColor: "#ff00bd",
8
- organizationDisplayName: "Zuplo",
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 = {
9
9
  theme: {
10
10
  components: {
11
11
  AIChatPageWrapper: {
@@ -23,34 +23,29 @@ const r = {
23
23
  }
24
24
  }
25
25
  }
26
- }, s = {
27
- shareChatUrlBasePath: `${process.env.NODE_ENV === "development" ? "http://localhost:3000" : "https://zuplo.com"}/docs/ask`,
28
- isChatSharingEnabled: !0,
29
- quickQuestions: [
30
- "How do I create a custom policy?",
31
- "What is the difference between production and preview environments?",
32
- "How do I set a custom domain?",
33
- "How do I use environment variables?"
34
- ]
35
- }, i = a(() => import("./InkeepCustomTrigger-CE5-K5ex.js")), c = ({
36
- prefilledQuery: t,
37
- isOpen: e,
38
- onClose: o
26
+ }, p = {}, u = i(() => import("./InkeepCustomTrigger-CE5-K5ex.js")), h = ({
27
+ prefilledQuery: e,
28
+ isOpen: r,
29
+ onClose: t,
30
+ settings: s
39
31
  }) => /* @__PURE__ */ n.jsx(
40
- i,
32
+ u,
41
33
  {
42
- isOpen: e,
43
- onClose: o,
44
- baseSettings: r,
45
- aiChatSettings: s,
34
+ isOpen: r,
35
+ onClose: t,
36
+ baseSettings: { ...l, ...s },
37
+ aiChatSettings: p,
46
38
  searchSettings: {
47
- prefilledQuery: t || void 0
39
+ prefilledQuery: e || void 0
48
40
  }
49
41
  }
50
- ), d = (t) => ({
51
- onRequestSearch: (e) => typeof window > "u" ? null : /* @__PURE__ */ n.jsx(c, { isOpen: e.isOpen, onClose: e.onClose, ...t })
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 }) })
52
47
  });
53
48
  export {
54
- d as inkeepSearchPlugin
49
+ g as inkeepSearchPlugin
55
50
  };
56
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 InkeepWidgetBaseSettings,\n} from \"@inkeep/widgets\";\n\nconst baseSettings: InkeepWidgetBaseSettings = {\n apiKey: \"499c156cf7a9798343949c8bb5665ac95e48132c6d68c42e\",\n integrationId: \"clot3asdz0000s601nc8jwnzx\",\n organizationId: \"org_dDOlt2uJlMWM8oIS\",\n primaryBrandColor: \"#ff00bd\",\n organizationDisplayName: \"Zuplo\",\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};\n\nconst modalSettings: InkeepModalSettings = {};\n\nconst searchSettings: InkeepSearchSettings = {};\n\nconst aiChatSettings: InkeepAIChatSettings = {\n shareChatUrlBasePath: `${process.env.NODE_ENV === \"development\" ? \"http://localhost:3000\" : \"https://zuplo.com\"}/docs/ask`,\n isChatSharingEnabled: true,\n quickQuestions: [\n \"How do I create a custom policy?\",\n \"What is the difference between production and preview environments?\",\n \"How do I set a custom domain?\",\n \"How do I use environment variables?\",\n ],\n};\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//.then((module) => module.InkeepCustomTrigger)\nconst InkeepSearch = ({\n prefilledQuery,\n isOpen,\n onClose,\n}: {\n isOpen: boolean;\n onClose: () => void;\n prefilledQuery?: string | null;\n} & PluginInkeepBaseSettings) => {\n return (\n <Inkeep\n isOpen={isOpen}\n onClose={onClose}\n baseSettings={baseSettings}\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 onRequestSearch: (o: { isOpen: boolean; onClose: () => void }) => {\n if (typeof window === \"undefined\") {\n return null;\n }\n return (\n <InkeepSearch isOpen={o.isOpen} onClose={o.onClose} {...settings} />\n );\n },\n };\n};\n"],"names":["baseSettings","aiChatSettings","Inkeep","lazy","InkeepSearch","prefilledQuery","isOpen","onClose","jsx","inkeepSearchPlugin","settings","o"],"mappings":";;AAOA,MAAMA,IAAyC;AAAA,EAC7C,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,mBAAmB;AAAA,EACnB,yBAAyB;AAAA,EACzB,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;AAAA,EAC3C,sBAAsB,GAAG,QAAQ,IAAI,aAAa,gBAAgB,0BAA0B,mBAAmB;AAAA,EAC/G,sBAAsB;AAAA,EACtB,gBAAgB;AAAA,IACd;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF,GC3BMC,IAASC,EAAK,MAAM,OAAO,mCAA0B,CAAC,GAEtDC,IAAe,CAAC;AAAA,EACpB,gBAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AACF,MAMIC,gBAAAA,EAAA;AAAA,EAACN;AAAA,EAAA;AAAA,IACC,QAAAI;AAAA,IACA,SAAAC;AAAA,IACA,cAAAP;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAgB;AAAA,MACd,gBAAgBI,KAAkB;AAAA,IACpC;AAAA,EAAA;AAAA,GAKOI,IAAqB,CAChCC,OAEO;AAAA,EACL,iBAAiB,CAACC,MACZ,OAAO,SAAW,MACb,OAGPH,gBAAAA,MAACJ,KAAa,QAAQO,EAAE,QAAQ,SAASA,EAAE,SAAU,GAAGD,EAAU,CAAA;AAEtE;"}
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-dev.98",
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
- "import": "./dist/index.js",
20
- "types": "./dist/index.d.ts"
21
- },
22
- "./internal": {
23
- "import": "./dist/internal.js"
24
- },
25
- "./auth/clerk": {
26
- "import": "./lib/zudoku.auth-clerk.js",
27
- "types": "./dist/lib/authentication/providers/clerk.d.ts"
28
- },
29
- "./auth/auth0": {
30
- "import": "./lib/zudoku.auth-auth0.js",
31
- "types": "./dist/lib/authentication/providers/auth0.d.ts"
32
- },
33
- "./auth/openid": {
34
- "import": "./lib/zudoku.auth-openid.js",
35
- "types": "./dist/lib/authentication/providers/openid.d.ts"
36
- },
37
- "./plugins/api-keys": {
38
- "import": "./lib/zudoku.plugin-api-keys.js",
39
- "types": "./dist/lib/plugins/api-keys/index.d.ts"
40
- },
41
- "./plugins/markdown": {
42
- "import": "./lib/zudoku.plugin-markdown.js",
43
- "types": "./dist/lib/plugins/markdown/index.d.ts"
44
- },
45
- "./plugins/openapi": {
46
- "import": "./lib/zudoku.plugin-openapi.js",
47
- "types": "./dist/lib/plugins/openapi/index.d.ts"
48
- },
49
- "./plugins/redirect": {
50
- "import": "./lib/zudoku.plugin-redirect.js",
51
- "types": "./dist/lib/plugins/redirect/index.d.ts"
52
- },
53
- "./plugins/custom-page": {
54
- "import": "./lib/zudoku.plugin-custom-page.js",
55
- "types": "./dist/lib/plugins/custom-page/index.d.ts"
56
- },
57
- "./plugins/search-inkeep": {
58
- "import": "./lib/zudoku.plugin-search-inkeep.js",
59
- "types": "./dist/lib/plugins/search-inkeep/index.d.ts"
60
- },
61
- "./openapi-worker": {
62
- "import": "./lib/zudoku.openapi-worker.js",
63
- "types": "./dist/lib/plugins/openapi-worker.d.ts"
64
- },
65
- "./components": {
66
- "import": "./lib/zudoku.components.js",
67
- "types": "./dist/lib/components/index.d.ts"
68
- },
69
- "./vite": {
70
- "require": "./dist/vite/plugin.js",
71
- "import": "./dist/vite/plugin.js"
72
- },
73
- "./tailwind": {
74
- "require": "./dist/app/tailwind.js",
75
- "import": "./dist/app/tailwind.js"
76
- },
77
- "./main.css": {
78
- "require": "./src/app/main.css",
79
- "import": "./src/app/main.css"
80
- },
81
- "./app/*": {
82
- "import": "./src/app/*"
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
+ }
@@ -5,7 +5,7 @@
5
5
  <link
6
6
  rel="icon"
7
7
  type="image/svg+xml"
8
- href="https://cdn.zudoku.dev/logos/icon.svg"
8
+ href="https://cdn.zudoku.dev/logos/favicon.svg"
9
9
  />
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
11
  <title>Zudoku Demo</title>
package/src/app/demo.html CHANGED
@@ -5,7 +5,7 @@
5
5
  <link
6
6
  rel="icon"
7
7
  type="image/svg+xml"
8
- href="https://cdn.zudoku.dev/logos/icon.svg"
8
+ href="https://cdn.zudoku.dev/logos/favicon.svg"
9
9
  />
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
11
  <title>Zudoku Demo</title>
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 = document.getElementById("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
- logo: {
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: "/demo",
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 fallbackLogo =
20
- config.page?.logoUrl ?? "https://cdn.zudoku.dev/logos/icon.svg";
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 ?? fallbackLogo,
30
- dark: config.page?.logo?.src?.dark ?? fallbackLogo,
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/icon.svg",
37
- title: "%s | Developer Portal",
39
+ favicon: "https://cdn.zudoku.dev/logos/favicon.svg",
40
+ title: "%s - Zudoku",
38
41
  ...config.metadata,
39
42
  },
40
43
  sidebars: configuredSidebar,
@@ -5,7 +5,7 @@
5
5
  <link
6
6
  rel="icon"
7
7
  type="image/svg+xml"
8
- href="https://cdn.zudoku.dev/logos/icon.svg"
8
+ href="https://cdn.zudoku.dev/logos/favicon.svg"
9
9
  />
10
10
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
11
11
  <title>Dev Portal</title>
@@ -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
- src: {
26
- light: logoUrl ?? "https://cdn.zudoku.dev/logos/icon.svg",
27
- dark: logoUrl ?? "https://cdn.zudoku.dev/logos/icon.svg",
28
- },
29
- },
30
- pageTitle: pageTitle ?? "Developer Portal",
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: "/standalone",
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 }) => {
@@ -89,11 +90,12 @@ export const Header = memo(function HeaderInner() {
89
90
  </Link>
90
91
  </div>
91
92
  <div className="grid grid-cols-[--sidecar-grid-cols] items-center gap-8">
92
- <div className="w-full max-w-prose">
93
+ <div className="w-full justify-center flex">
93
94
  <Search />
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";