zudoku 0.3.0-dev.55 → 0.3.0-dev.56

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 (143) hide show
  1. package/dist/config/validators/validate.d.ts +12 -12
  2. package/dist/lib/components/DeveloperHint.d.ts +5 -0
  3. package/dist/lib/components/DeveloperHint.js +10 -0
  4. package/dist/lib/components/DeveloperHint.js.map +1 -0
  5. package/dist/lib/components/NotFoundPage.js +2 -2
  6. package/dist/lib/components/NotFoundPage.js.map +1 -1
  7. package/dist/lib/plugins/api-keys/ProtectedRoute.d.ts +1 -0
  8. package/dist/lib/plugins/api-keys/ProtectedRoute.js +14 -0
  9. package/dist/lib/plugins/api-keys/ProtectedRoute.js.map +1 -0
  10. package/dist/lib/plugins/api-keys/index.js +2 -12
  11. package/dist/lib/plugins/api-keys/index.js.map +1 -1
  12. package/dist/lib/plugins/openapi/OperationList.js +2 -2
  13. package/dist/lib/plugins/openapi/OperationList.js.map +1 -1
  14. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +3 -3
  15. package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
  16. package/lib/AnchorLink-GNsUeGSX.js +705 -0
  17. package/lib/{AnchorLink-BaXHjhF-.js.map → AnchorLink-GNsUeGSX.js.map} +1 -1
  18. package/lib/Button-DpHMZvVs.js +4571 -0
  19. package/lib/Button-DpHMZvVs.js.map +1 -0
  20. package/lib/DevPortalProvider-Do9oJqme.js +1081 -0
  21. package/lib/{DevPortalProvider-GjdO0Xr-.js.map → DevPortalProvider-Do9oJqme.js.map} +1 -1
  22. package/lib/Markdown-DtLFdxD1.js +15031 -0
  23. package/lib/Markdown-DtLFdxD1.js.map +1 -0
  24. package/lib/MdxPage-CbwYRKf5.js +190 -0
  25. package/lib/{MdxPage-Dlujuj-J.js.map → MdxPage-CbwYRKf5.js.map} +1 -1
  26. package/lib/OperationList-DpR4KzIJ.js +5570 -0
  27. package/lib/OperationList-DpR4KzIJ.js.map +1 -0
  28. package/lib/Route-C1LyvITr.js +13 -0
  29. package/lib/{Route-CR6TEwVC.js.map → Route-C1LyvITr.js.map} +1 -1
  30. package/lib/Spinner-Bhbs5aPI.js +182 -0
  31. package/lib/Spinner-Bhbs5aPI.js.map +1 -0
  32. package/lib/_commonjsHelpers-BVfed4GL.js +29 -0
  33. package/lib/_commonjsHelpers-BVfed4GL.js.map +1 -0
  34. package/lib/assets/index-BPdJm2ty.js +4765 -0
  35. package/lib/assets/{index-CpIig0AX.js.map → index-BPdJm2ty.js.map} +1 -1
  36. package/lib/assets/worker-BjPv-hjP.js +14897 -0
  37. package/lib/assets/{worker-B5k2aBV9.js.map → worker-BjPv-hjP.js.map} +1 -1
  38. package/lib/context-_fYfJFgk.js +14 -0
  39. package/lib/{context-BoN_3uxi.js.map → context-_fYfJFgk.js.map} +1 -1
  40. package/lib/hook-Biq3zYel.js +92 -0
  41. package/lib/hook-Biq3zYel.js.map +1 -0
  42. package/lib/{index-Dih8IAqw.js → index-DZ910ttL.js} +83 -103
  43. package/lib/{index-Dih8IAqw.js.map → index-DZ910ttL.js.map} +1 -1
  44. package/lib/index-gsAuUwQh.js +418 -0
  45. package/lib/index-gsAuUwQh.js.map +1 -0
  46. package/lib/index-pI9JkN46.js +4765 -0
  47. package/lib/{index-Bn03IPZt.js.map → index-pI9JkN46.js.map} +1 -1
  48. package/lib/jsx-runtime-CJZJivg2.js +1526 -0
  49. package/lib/{jsx-runtime-DvZ6OKMM.js.map → jsx-runtime-CJZJivg2.js.map} +1 -1
  50. package/lib/prism-bash.min-DadFsM4Z.js +7 -0
  51. package/lib/{prism-bash.min-BtBk0onv.js.map → prism-bash.min-DadFsM4Z.js.map} +1 -1
  52. package/lib/prism-csharp.min-Yizuc34Y.js +35 -0
  53. package/lib/{prism-csharp.min-Cv7D49bv.js.map → prism-csharp.min-Yizuc34Y.js.map} +1 -1
  54. package/lib/prism-java.min-d5iT_mOd.js +7 -0
  55. package/lib/{prism-java.min-tNK-JX6x.js.map → prism-java.min-d5iT_mOd.js.map} +1 -1
  56. package/lib/prism-json.min-B1GJqK1k.js +2 -0
  57. package/lib/{prism-json.min-Cdtv-CME.js.map → prism-json.min-B1GJqK1k.js.map} +1 -1
  58. package/lib/prism-markup-templating-DZrrEs0A.js +62 -0
  59. package/lib/{prism-markup-templating-iotg2sCU.js.map → prism-markup-templating-DZrrEs0A.js.map} +1 -1
  60. package/lib/prism-objectivec.min-BXSWqpJJ.js +2 -0
  61. package/lib/{prism-objectivec.min-CY4WGixz.js.map → prism-objectivec.min-BXSWqpJJ.js.map} +1 -1
  62. package/lib/prism-php.min-o7FpoMP_.js +11 -0
  63. package/lib/{prism-php.min-T6sIVgED.js.map → prism-php.min-o7FpoMP_.js.map} +1 -1
  64. package/lib/prism-ruby.min-C7LwcKyz.js +10 -0
  65. package/lib/{prism-ruby.min-B-2KAa4y.js.map → prism-ruby.min-C7LwcKyz.js.map} +1 -1
  66. package/lib/router-CBw2vqJE.js +2973 -0
  67. package/lib/{router-ButO1QyY.js.map → router-CBw2vqJE.js.map} +1 -1
  68. package/lib/slugify-CiPVjteN.js +28 -0
  69. package/lib/{slugify-CmS97Vy8.js.map → slugify-CiPVjteN.js.map} +1 -1
  70. package/lib/state-DKdaQzvh.js +288 -0
  71. package/lib/{state-CmGfNKhR.js.map → state-DKdaQzvh.js.map} +1 -1
  72. package/lib/urql-DMlBWUKL.js +1592 -0
  73. package/lib/{urql-DtVKPBx_.js.map → urql-DMlBWUKL.js.map} +1 -1
  74. package/lib/util-_jwUlTBU.js +41 -0
  75. package/lib/{util-B5KX4h4M.js.map → util-_jwUlTBU.js.map} +1 -1
  76. package/lib/zudoku.auth-auth0.js +18 -24
  77. package/lib/zudoku.auth-auth0.js.map +1 -1
  78. package/lib/zudoku.auth-clerk.js +34 -43
  79. package/lib/zudoku.auth-clerk.js.map +1 -1
  80. package/lib/zudoku.auth-openid.js +734 -1121
  81. package/lib/zudoku.auth-openid.js.map +1 -1
  82. package/lib/zudoku.components.js +822 -1076
  83. package/lib/zudoku.components.js.map +1 -1
  84. package/lib/zudoku.openapi-worker.js +9691 -13786
  85. package/lib/zudoku.openapi-worker.js.map +1 -1
  86. package/lib/zudoku.plugin-api-keys.js +171 -208
  87. package/lib/zudoku.plugin-api-keys.js.map +1 -1
  88. package/lib/zudoku.plugin-markdown.js +33 -41
  89. package/lib/zudoku.plugin-markdown.js.map +1 -1
  90. package/lib/zudoku.plugin-openapi.js +6 -6
  91. package/lib/zudoku.plugin-redirect.js +8 -10
  92. package/lib/zudoku.plugin-redirect.js.map +1 -1
  93. package/package.json +1 -1
  94. package/src/lib/components/DeveloperHint.tsx +25 -0
  95. package/src/lib/components/NotFoundPage.tsx +8 -14
  96. package/src/lib/plugins/api-keys/ProtectedRoute.tsx +29 -0
  97. package/src/lib/plugins/api-keys/index.tsx +2 -21
  98. package/src/lib/plugins/openapi/OperationList.tsx +5 -8
  99. package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +3 -5
  100. package/lib/AnchorLink-BaXHjhF-.js +0 -989
  101. package/lib/Combination-BfufJFkX.js +0 -1365
  102. package/lib/Combination-BfufJFkX.js.map +0 -1
  103. package/lib/DevPortalProvider-GjdO0Xr-.js +0 -1610
  104. package/lib/Markdown-B8nPVql1.js +0 -19708
  105. package/lib/Markdown-B8nPVql1.js.map +0 -1
  106. package/lib/MdxPage-Dlujuj-J.js +0 -223
  107. package/lib/OperationList-krPgt6sE.js +0 -8041
  108. package/lib/OperationList-krPgt6sE.js.map +0 -1
  109. package/lib/Playground-DOHxca0P.js +0 -539
  110. package/lib/Playground-DOHxca0P.js.map +0 -1
  111. package/lib/Route-CR6TEwVC.js +0 -13
  112. package/lib/Select-Boi_pe3L.js +0 -5298
  113. package/lib/Select-Boi_pe3L.js.map +0 -1
  114. package/lib/Spinner-oU0QJmi_.js +0 -16
  115. package/lib/Spinner-oU0QJmi_.js.map +0 -1
  116. package/lib/_commonjsHelpers-BxmBWJD2.js +0 -34
  117. package/lib/_commonjsHelpers-BxmBWJD2.js.map +0 -1
  118. package/lib/assets/index-CpIig0AX.js +0 -6341
  119. package/lib/assets/worker-B5k2aBV9.js +0 -18921
  120. package/lib/context-BoN_3uxi.js +0 -17
  121. package/lib/hook-CIuFuyBT.js +0 -90
  122. package/lib/hook-CIuFuyBT.js.map +0 -1
  123. package/lib/index-BL1P4Gqq.js +0 -280
  124. package/lib/index-BL1P4Gqq.js.map +0 -1
  125. package/lib/index-Bn03IPZt.js +0 -6341
  126. package/lib/index-FprhHF51.js +0 -253
  127. package/lib/index-FprhHF51.js.map +0 -1
  128. package/lib/jsx-runtime-DvZ6OKMM.js +0 -2110
  129. package/lib/mutation-DWY9x2Uc.js +0 -250
  130. package/lib/mutation-DWY9x2Uc.js.map +0 -1
  131. package/lib/prism-bash.min-BtBk0onv.js +0 -7
  132. package/lib/prism-csharp.min-Cv7D49bv.js +0 -30
  133. package/lib/prism-java.min-tNK-JX6x.js +0 -7
  134. package/lib/prism-json.min-Cdtv-CME.js +0 -2
  135. package/lib/prism-markup-templating-iotg2sCU.js +0 -94
  136. package/lib/prism-objectivec.min-CY4WGixz.js +0 -2
  137. package/lib/prism-php.min-T6sIVgED.js +0 -11
  138. package/lib/prism-ruby.min-B-2KAa4y.js +0 -8
  139. package/lib/router-ButO1QyY.js +0 -4062
  140. package/lib/slugify-CmS97Vy8.js +0 -50
  141. package/lib/state-CmGfNKhR.js +0 -436
  142. package/lib/urql-DtVKPBx_.js +0 -2567
  143. package/lib/util-B5KX4h4M.js +0 -55
@@ -1,223 +0,0 @@
1
- import { j as jsxRuntimeExports, u as useLocation } from "./jsx-runtime-DvZ6OKMM.js";
2
- import { A as AnchorLink, a as Helmet, u as useMDXComponents } from "./AnchorLink-BaXHjhF-.js";
3
- import { useRef, useState, useEffect, useMemo } from "react";
4
- import { c as createLucideIcon, b as useViewportAnchor, e as cn, P as ProseClasses, g as CategoryHeading, H as Heading, L as Link } from "./Markdown-B8nPVql1.js";
5
- import { k as useTopNavigationItem } from "./DevPortalProvider-GjdO0Xr-.js";
6
- import { t as traverseNavigation, i as isPathItem } from "./util-B5KX4h4M.js";
7
- import { s as slugify } from "./slugify-CmS97Vy8.js";
8
- /**
9
- * @license lucide-react v0.378.0 - ISC
10
- *
11
- * This source code is licensed under the ISC license.
12
- * See the LICENSE file in the root directory of this source tree.
13
- */
14
- const ListTree = createLucideIcon("ListTree", [
15
- ["path", { d: "M21 12h-8", key: "1bmf0i" }],
16
- ["path", { d: "M21 6H8", key: "1pqkrb" }],
17
- ["path", { d: "M21 18h-8", key: "1tm79t" }],
18
- ["path", { d: "M3 6v4c0 1.1.9 2 2 2h3", key: "1ywdgy" }],
19
- ["path", { d: "M3 10v6c0 1.1.9 2 2 2h3", key: "2wc746" }]
20
- ]);
21
- const DATA_ANCHOR_ATTR = "data-active";
22
- const TocItem = ({
23
- item,
24
- children,
25
- className,
26
- isActive
27
- }) => {
28
- return /* @__PURE__ */ jsxRuntimeExports.jsxs(
29
- "li",
30
- {
31
- className: cn(
32
- "truncate",
33
- isActive ? "text-primary" : "text-foreground/65 dark:text-foreground/75",
34
- className
35
- ),
36
- title: item.value,
37
- children: [
38
- /* @__PURE__ */ jsxRuntimeExports.jsx(
39
- AnchorLink,
40
- {
41
- to: `#${item.id}`,
42
- ...{ [DATA_ANCHOR_ATTR]: item.id },
43
- className: cn(
44
- isActive ? "text-primary" : "text-foreground/65 dark:text-foreground/75 hover:text-foreground"
45
- ),
46
- children: item.value
47
- }
48
- ),
49
- children
50
- ]
51
- }
52
- );
53
- };
54
- const Toc = ({ entries }) => {
55
- const { activeAnchor } = useViewportAnchor();
56
- const listWrapperRef = useRef(null);
57
- const [indicatorStyle, setIndicatorStyles] = useState({});
58
- useEffect(() => {
59
- if (!listWrapperRef.current) return;
60
- const activeElement = listWrapperRef.current.querySelector(
61
- `[${DATA_ANCHOR_ATTR}='${activeAnchor}']`
62
- );
63
- if (!activeElement) {
64
- setIndicatorStyles({
65
- "--indicator-top": "0",
66
- "--indicator-opacity": 0
67
- });
68
- return;
69
- }
70
- const topParent = listWrapperRef.current.getBoundingClientRect().top;
71
- const topElement = activeElement.getBoundingClientRect().top;
72
- setIndicatorStyles({
73
- "--indicator-top": `${topElement - topParent}px`,
74
- "--indicator-opacity": 1
75
- });
76
- }, [activeAnchor]);
77
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("aside", { className: "sticky top-[--header-height] h-[calc(100vh-var(--header-height))] pt-[--padding-content-top] pb-[--padding-content-bottom] overflow-y-auto ps-1 text-sm", children: [
78
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-2 font-medium mb-2", children: [
79
- /* @__PURE__ */ jsxRuntimeExports.jsx(ListTree, { size: 16 }),
80
- "On this page"
81
- ] }),
82
- /* @__PURE__ */ jsxRuntimeExports.jsx(
83
- "ul",
84
- {
85
- ref: listWrapperRef,
86
- style: indicatorStyle,
87
- className: cn(
88
- "relative ms-2 ps-4 font-medium list-none mt-0 space-y-2",
89
- "before:absolute before:inset-0 before:right-auto before:bg-border before:w-[2px]",
90
- "after:absolute after:-left-px after:-translate-y-1 after:top-[--indicator-top] after:opacity-[--indicator-opacity] after:h-6 after:bg-primary after:w-[4px] after:rounded after:ease-out after:[transition:top__150ms,opacity_325ms]"
91
- ),
92
- children: entries.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(
93
- TocItem,
94
- {
95
- isActive: item.id === activeAnchor,
96
- item,
97
- className: "pl-0",
98
- children: item.children && /* @__PURE__ */ jsxRuntimeExports.jsx("ul", { className: "list-none pl-4 pt-2 space-y-2", children: item.children.map((child) => /* @__PURE__ */ jsxRuntimeExports.jsx(
99
- TocItem,
100
- {
101
- item: child,
102
- isActive: child.id === activeAnchor
103
- },
104
- child.id
105
- )) })
106
- },
107
- item.id
108
- ))
109
- }
110
- )
111
- ] });
112
- };
113
- const MarkdownHeadings = {
114
- h2: ({ children, id }) => /* @__PURE__ */ jsxRuntimeExports.jsx(Heading, { level: 2, id, registerSidebarAnchor: true, children }),
115
- h3: ({ children, id }) => /* @__PURE__ */ jsxRuntimeExports.jsxs(Heading, { level: 3, id, registerSidebarAnchor: true, children: [
116
- " ",
117
- children
118
- ] })
119
- };
120
- const MdxPage = ({
121
- mdxComponent: MdxComponent,
122
- frontmatter = {},
123
- defaultOptions,
124
- tableOfContents
125
- }) => {
126
- var _a, _b;
127
- const navItem = useTopNavigationItem();
128
- const location = useLocation();
129
- const categoryTitle = navItem ? traverseNavigation(navItem, (_node, fullPath, parentNodes) => {
130
- var _a2;
131
- if (fullPath === location.pathname) {
132
- return (_a2 = parentNodes.at(0)) == null ? void 0 : _a2.label;
133
- }
134
- }) : void 0;
135
- const title = frontmatter.title;
136
- const category = frontmatter.category ?? categoryTitle;
137
- const hideToc = frontmatter.toc === false || (defaultOptions == null ? void 0 : defaultOptions.toc) === false;
138
- const pageTitle = ((_a = tableOfContents.find((item) => item.depth === 1)) == null ? void 0 : _a.value) ?? title;
139
- const hidePager = frontmatter.disablePager ?? (defaultOptions == null ? void 0 : defaultOptions.disablePager) ?? false;
140
- const tocEntries = ((_b = tableOfContents.find((item) => item.depth === 1)) == null ? void 0 : _b.children) ?? // if `title` is provided by frontmatter it does not appear in the table of contents
141
- tableOfContents.filter((item) => item.depth === 2);
142
- const showToc = !hideToc && tocEntries.length > 0;
143
- const { prev, next } = useMemo(() => {
144
- let prev2 = { path: "", label: "" };
145
- let next2 = { path: "", label: "" };
146
- let shouldStop = false;
147
- if (!navItem) return { prev: prev2, next: next2 };
148
- traverseNavigation(navItem, (node, fullPath) => {
149
- var _a2, _b2;
150
- const item = { path: fullPath, label: node.label };
151
- if (shouldStop && isPathItem(node) && !((_a2 = node.children) == null ? void 0 : _a2.length)) {
152
- next2 = item;
153
- return true;
154
- }
155
- if (fullPath === location.pathname) {
156
- shouldStop = true;
157
- }
158
- if (!shouldStop && isPathItem(node) && !((_b2 = node.children) == null ? void 0 : _b2.length)) {
159
- prev2 = item;
160
- }
161
- });
162
- return { prev: prev2, next: next2 };
163
- }, [navItem, location.pathname]);
164
- return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "xl:grid grid-cols-[--sidecar-grid-cols] gap-8 justify-between", children: [
165
- /* @__PURE__ */ jsxRuntimeExports.jsx(Helmet, { children: /* @__PURE__ */ jsxRuntimeExports.jsx("title", { children: pageTitle }) }),
166
- /* @__PURE__ */ jsxRuntimeExports.jsxs(
167
- "div",
168
- {
169
- className: cn(
170
- ProseClasses,
171
- "max-w-full xl:w-full xl:max-w-prose flex-1 flex-shrink pt-[--padding-content-top] pb-[--padding-content-bottom]"
172
- ),
173
- children: [
174
- /* @__PURE__ */ jsxRuntimeExports.jsxs("header", { children: [
175
- category && /* @__PURE__ */ jsxRuntimeExports.jsx(CategoryHeading, { children: category }),
176
- title && /* @__PURE__ */ jsxRuntimeExports.jsx(Heading, { level: 1, id: slugify(title, { lower: true }), children: title }),
177
- frontmatter.description && /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "prose-lg", children: frontmatter.description })
178
- ] }),
179
- /* @__PURE__ */ jsxRuntimeExports.jsx(
180
- MdxComponent,
181
- {
182
- components: { ...useMDXComponents(), ...MarkdownHeadings }
183
- }
184
- ),
185
- !hidePager && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
186
- /* @__PURE__ */ jsxRuntimeExports.jsx("hr", {}),
187
- /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "not-prose flex items-center justify-between gap-8", children: [
188
- prev.path ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
189
- Link,
190
- {
191
- to: prev.path,
192
- className: "flex flex-col items-stretch gap-2 flex-1 truncate border border-border rounded px-6 py-4 text-start hover:border-primary/85 transition shadow-sm hover:shadow-md",
193
- title: typeof prev.label === "string" ? prev.label : void 0,
194
- children: [
195
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-muted-foreground", children: "← Previous page" }),
196
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-lg text-primary truncate", children: prev.label })
197
- ]
198
- }
199
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1" }),
200
- next.path ? /* @__PURE__ */ jsxRuntimeExports.jsxs(
201
- Link,
202
- {
203
- to: next.path,
204
- className: "flex flex-col items-stretch gap-2 flex-1 truncate border border-border rounded px-6 py-4 text-end hover:border-primary/85 transition shadow-sm hover:shadow-md",
205
- title: typeof next.label === "string" ? next.label : void 0,
206
- children: [
207
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm text-muted-foreground", children: "Next page →" }),
208
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-lg text-primary truncate", children: next.label })
209
- ]
210
- }
211
- ) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1" })
212
- ] })
213
- ] })
214
- ]
215
- }
216
- ),
217
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "hidden xl:block", children: showToc && /* @__PURE__ */ jsxRuntimeExports.jsx(Toc, { entries: tocEntries }) })
218
- ] });
219
- };
220
- export {
221
- MdxPage
222
- };
223
- //# sourceMappingURL=MdxPage-Dlujuj-J.js.map