zudoku 0.13.1 → 0.13.3
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/config/validators/InputSidebarSchema.d.ts +19 -4
- package/dist/config/validators/InputSidebarSchema.js +7 -28
- package/dist/config/validators/InputSidebarSchema.js.map +1 -1
- package/dist/config/validators/SidebarSchema.js +5 -6
- package/dist/config/validators/SidebarSchema.js.map +1 -1
- package/dist/config/validators/validate.d.ts +6 -6
- package/dist/lib/components/MobileTopNavigation.js +1 -1
- package/dist/lib/components/MobileTopNavigation.js.map +1 -1
- package/dist/lib/components/navigation/Sidebar.js +1 -1
- package/dist/lib/components/navigation/Sidebar.js.map +1 -1
- package/dist/lib/components/navigation/SidebarCategory.js +18 -7
- package/dist/lib/components/navigation/SidebarCategory.js.map +1 -1
- package/dist/lib/components/navigation/SidebarItem.js +12 -5
- package/dist/lib/components/navigation/SidebarItem.js.map +1 -1
- package/dist/lib/plugins/custom-pages/CustomPage.js +2 -1
- package/dist/lib/plugins/custom-pages/CustomPage.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/playground/Playground.js +1 -0
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/vite/plugin-mdx.js +17 -0
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/lib/{AuthenticationPlugin-CbgJ5SAh.js → AuthenticationPlugin-D1nhROkO.js} +3 -3
- package/lib/{AuthenticationPlugin-CbgJ5SAh.js.map → AuthenticationPlugin-D1nhROkO.js.map} +1 -1
- package/lib/CategoryHeading-B7TlPvuN.js +10 -0
- package/lib/CategoryHeading-B7TlPvuN.js.map +1 -0
- package/lib/{DeveloperHint-CiXPc9Xm.js → DeveloperHint-B_QCCafl.js} +2 -2
- package/lib/{DeveloperHint-CiXPc9Xm.js.map → DeveloperHint-B_QCCafl.js.map} +1 -1
- package/lib/ErrorPage-DqqAV1dr.js +16 -0
- package/lib/{ErrorPage-B-zoPPVx.js.map → ErrorPage-DqqAV1dr.js.map} +1 -1
- package/lib/{Input-QMLhK7Rb.js → Input-a9rLgbP_.js} +4 -4
- package/lib/{Input-QMLhK7Rb.js.map → Input-a9rLgbP_.js.map} +1 -1
- package/lib/{Markdown-D6Nze6qq.js → Markdown-Y__eLG0x.js} +5677 -3406
- package/lib/Markdown-Y__eLG0x.js.map +1 -0
- package/lib/{MdxPage-DBhq6-5F.js → MdxPage-B4FcPIi5.js} +15 -15
- package/lib/MdxPage-B4FcPIi5.js.map +1 -0
- package/lib/{OperationList-Ba24gUd2.js → OperationList-BhLMwPSh.js} +23 -23
- package/lib/{OperationList-Ba24gUd2.js.map → OperationList-BhLMwPSh.js.map} +1 -1
- package/lib/{Route-DI38nxYt.js → Route-fK1i4Ryz.js} +3 -3
- package/lib/{Route-DI38nxYt.js.map → Route-fK1i4Ryz.js.map} +1 -1
- package/lib/{SidebarBadge-B9-VJSQr.js → SidebarBadge-BdzN0ZBK.js} +3 -3
- package/lib/{SidebarBadge-B9-VJSQr.js.map → SidebarBadge-BdzN0ZBK.js.map} +1 -1
- package/lib/{SlotletProvider-Cb8mGpBO.js → SlotletProvider-DmqWiVFt.js} +17 -16
- package/lib/{SlotletProvider-Cb8mGpBO.js.map → SlotletProvider-DmqWiVFt.js.map} +1 -1
- package/lib/{ZudokuContext-BEmsYQoq.js → ZudokuContext-MRoel6bS.js} +2 -2
- package/lib/{ZudokuContext-BEmsYQoq.js.map → ZudokuContext-MRoel6bS.js.map} +1 -1
- package/lib/{index-dgcPryXi.js → index-BijFM__9.js} +3 -3
- package/lib/{index-dgcPryXi.js.map → index-BijFM__9.js.map} +1 -1
- package/lib/{index-BRCiYFaL.js → index-DFN92YJN.js} +3 -2
- package/lib/{index-BRCiYFaL.js.map → index-DFN92YJN.js.map} +1 -1
- package/lib/{index-g_JJcuFg.js → index-_GxJ8hpM.js} +35 -36
- package/lib/{index-g_JJcuFg.js.map → index-_GxJ8hpM.js.map} +1 -1
- package/lib/{index-DA74gNq3.js → index-dHVZhVNO.js} +111 -111
- package/lib/index-dHVZhVNO.js.map +1 -0
- package/lib/{router-Oe6YmY6B.js → router-BsfSoK2j.js} +3 -3
- package/lib/{router-Oe6YmY6B.js.map → router-BsfSoK2j.js.map} +1 -1
- package/lib/{useExposedProps-Csw8oAlt.js → useExposedProps-BWwxa-Hg.js} +2 -2
- package/lib/{useExposedProps-Csw8oAlt.js.map → useExposedProps-BWwxa-Hg.js.map} +1 -1
- package/lib/{utils-Chi3p5nE.js → utils-C8S3st2k.js} +3 -3
- package/lib/{utils-Chi3p5nE.js.map → utils-C8S3st2k.js.map} +1 -1
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +5 -5
- package/lib/zudoku.components.js +650 -644
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-keys.js +7 -7
- package/lib/zudoku.plugin-custom-pages.js +14 -14
- package/lib/zudoku.plugin-custom-pages.js.map +1 -1
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +7 -7
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/package.json +1 -1
- package/src/app/main.css +0 -1
- package/src/lib/components/MobileTopNavigation.tsx +1 -1
- package/src/lib/components/navigation/Sidebar.tsx +1 -1
- package/src/lib/components/navigation/SidebarCategory.tsx +34 -26
- package/src/lib/components/navigation/SidebarItem.tsx +16 -17
- package/src/lib/plugins/custom-pages/CustomPage.tsx +4 -1
- package/src/lib/plugins/markdown/MdxPage.tsx +10 -8
- package/src/lib/plugins/openapi/playground/Playground.tsx +1 -0
- package/lib/ErrorPage-B-zoPPVx.js +0 -15
- package/lib/Markdown-D6Nze6qq.js.map +0 -1
- package/lib/MdxPage-DBhq6-5F.js.map +0 -1
- package/lib/cn-BmFQLtkS.js +0 -2279
- package/lib/cn-BmFQLtkS.js.map +0 -1
- package/lib/index-DA74gNq3.js.map +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { S as x, R as f } from "./SlotletProvider-
|
|
3
|
-
import { u as g, a as d, I as j, S as v, b as w, c as b, d as k, e as K, f as m } from "./Input-
|
|
4
|
-
import { a as N, L as u, O as I } from "./index-
|
|
5
|
-
import { u as h, a as E, b as S } from "./ZudokuContext-
|
|
6
|
-
import { B as l, n as A } from "./index-
|
|
7
|
-
import { D as C } from "./DeveloperHint-
|
|
2
|
+
import { S as x, R as f } from "./SlotletProvider-DmqWiVFt.js";
|
|
3
|
+
import { u as g, a as d, I as j, S as v, b as w, c as b, d as k, e as K, f as m } from "./Input-a9rLgbP_.js";
|
|
4
|
+
import { a as N, L as u, O as I } from "./index-DFN92YJN.js";
|
|
5
|
+
import { u as h, a as E, b as S } from "./ZudokuContext-MRoel6bS.js";
|
|
6
|
+
import { B as l, n as A } from "./index-_GxJ8hpM.js";
|
|
7
|
+
import { D as C } from "./DeveloperHint-B_QCCafl.js";
|
|
8
8
|
import { RotateCwIcon as P, TrashIcon as D, EyeOffIcon as R, EyeIcon as q, CheckIcon as O, CopyIcon as z } from "lucide-react";
|
|
9
9
|
import { useState as p } from "react";
|
|
10
|
-
import {
|
|
10
|
+
import { a as T } from "./Markdown-Y__eLG0x.js";
|
|
11
11
|
function c(t, s) {
|
|
12
12
|
if (t)
|
|
13
13
|
return;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import { u as c } from "./useExposedProps-
|
|
5
|
-
const
|
|
6
|
-
element:
|
|
7
|
-
render:
|
|
8
|
-
prose:
|
|
1
|
+
import { j as o } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
+
import a from "react";
|
|
3
|
+
import { a as n, P as u } from "./Markdown-Y__eLG0x.js";
|
|
4
|
+
import { u as c } from "./useExposedProps-BWwxa-Hg.js";
|
|
5
|
+
const l = ({
|
|
6
|
+
element: t,
|
|
7
|
+
render: s,
|
|
8
|
+
prose: e = !0
|
|
9
9
|
}) => {
|
|
10
|
-
const r = c(), m =
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
}, f = (
|
|
13
|
-
getRoutes: () =>
|
|
14
|
-
path:
|
|
15
|
-
element: /* @__PURE__ */
|
|
10
|
+
const r = c(), m = s ? a.createElement(s, r) : t;
|
|
11
|
+
return /* @__PURE__ */ o.jsx("div", { className: n(e && u, "max-w-full"), children: m });
|
|
12
|
+
}, f = (t) => ({
|
|
13
|
+
getRoutes: () => t.map(({ path: s, ...e }) => ({
|
|
14
|
+
path: s,
|
|
15
|
+
element: /* @__PURE__ */ o.jsx(l, { ...e })
|
|
16
16
|
}))
|
|
17
17
|
});
|
|
18
18
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"zudoku.plugin-custom-pages.js","sources":["../src/lib/plugins/custom-pages/CustomPage.tsx","../src/lib/plugins/custom-pages/index.tsx"],"sourcesContent":["import React from \"react\";\nimport { cn } from \"../../util/cn.js\";\nimport { useExposedProps } from \"../../util/useExposedProps.js\";\nimport type { CustomPageConfig } from \"./index.js\";\n\nexport const CustomPage = ({\n element,\n render,\n prose = true,\n}: Omit<CustomPageConfig, \"path\">) => {\n const slotletProps = useExposedProps();\n const content = render ? React.createElement(render, slotletProps) : element;\n\n return <div className={cn(prose && \"
|
|
1
|
+
{"version":3,"file":"zudoku.plugin-custom-pages.js","sources":["../src/lib/plugins/custom-pages/CustomPage.tsx","../src/lib/plugins/custom-pages/index.tsx"],"sourcesContent":["import React from \"react\";\nimport { ProseClasses } from \"../../components/Markdown.js\";\nimport { cn } from \"../../util/cn.js\";\nimport { useExposedProps } from \"../../util/useExposedProps.js\";\nimport type { CustomPageConfig } from \"./index.js\";\n\nexport const CustomPage = ({\n element,\n render,\n prose = true,\n}: Omit<CustomPageConfig, \"path\">) => {\n const slotletProps = useExposedProps();\n const content = render ? React.createElement(render, slotletProps) : element;\n\n return (\n <div className={cn(prose && ProseClasses, \"max-w-full\")}>{content}</div>\n );\n};\n","import { type ComponentType, type ReactNode } from \"react\";\nimport type { RouteObject } from \"react-router-dom\";\nimport { type ExposedComponentProps } from \"../../components/SlotletProvider.js\";\nimport type { DevPortalPlugin, NavigationPlugin } from \"../../core/plugins.js\";\nimport { CustomPage } from \"./CustomPage.js\";\n\nexport type CustomPageConfig = {\n path: string;\n prose?: boolean;\n element?: ReactNode;\n render?: ComponentType<ExposedComponentProps>;\n};\n\nexport const customPagesPlugin = (\n config: CustomPageConfig[],\n): DevPortalPlugin & NavigationPlugin => {\n return {\n getRoutes: (): RouteObject[] =>\n config.map(({ path, ...props }) => ({\n path,\n element: <CustomPage {...props} />,\n })),\n };\n};\n"],"names":["CustomPage","element","render","prose","slotletProps","useExposedProps","content","React","jsx","cn","ProseClasses","customPagesPlugin","config","path","props"],"mappings":";;;;AAMO,MAAMA,IAAa,CAAC;AAAA,EACzB,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC,IAAQ;AACV,MAAsC;AACpC,QAAMC,IAAeC,KACfC,IAAUJ,IAASK,EAAM,cAAcL,GAAQE,CAAY,IAAIH;AAGnE,SAAAO,gBAAAA,MAAC,SAAI,WAAWC,EAAGN,KAASO,GAAc,YAAY,GAAI,UAAQJ,EAAA,CAAA;AAEtE,GCJaK,IAAoB,CAC/BC,OAEO;AAAA,EACL,WAAW,MACTA,EAAO,IAAI,CAAC,EAAE,MAAAC,GAAM,GAAGC,SAAa;AAAA,IAClC,MAAAD;AAAA,IACA,SAASL,gBAAAA,EAAAA,IAACR,GAAY,EAAA,GAAGc,EAAO,CAAA;AAAA,EAAA,EAChC;AAAA;"}
|
|
@@ -6,7 +6,7 @@ const x = (t, e, n) => Object.entries(t).flatMap(([a, p]) => {
|
|
|
6
6
|
return s ? {
|
|
7
7
|
path: s,
|
|
8
8
|
lazy: async () => {
|
|
9
|
-
const { MdxPage: i } = await import("./MdxPage-
|
|
9
|
+
const { MdxPage: i } = await import("./MdxPage-B4FcPIi5.js"), { default: m, ...l } = await p();
|
|
10
10
|
return {
|
|
11
11
|
element: /* @__PURE__ */ u.jsx(
|
|
12
12
|
i,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { o as u } from "./index-
|
|
3
|
-
import "./ZudokuContext-
|
|
2
|
+
import { o as u } from "./index-dHVZhVNO.js";
|
|
3
|
+
import "./ZudokuContext-MRoel6bS.js";
|
|
4
4
|
import "lucide-react";
|
|
5
5
|
import "zudoku/openapi-worker";
|
|
6
|
-
import "./index-
|
|
7
|
-
import "./ErrorPage-
|
|
8
|
-
import "./Markdown-
|
|
6
|
+
import "./index-_GxJ8hpM.js";
|
|
7
|
+
import "./ErrorPage-DqqAV1dr.js";
|
|
8
|
+
import "./Markdown-Y__eLG0x.js";
|
|
9
9
|
import "./joinPath-B7kNnUX4.js";
|
|
10
10
|
import "./urql-core-KJnLL26g.js";
|
|
11
|
-
import "./router-
|
|
12
|
-
import "./index-
|
|
11
|
+
import "./router-BsfSoK2j.js";
|
|
12
|
+
import "./index-DFN92YJN.js";
|
|
13
13
|
export {
|
|
14
14
|
u as openApiPlugin
|
|
15
15
|
};
|
package/package.json
CHANGED
package/src/app/main.css
CHANGED
|
@@ -22,7 +22,7 @@ export const MobileTopNavigation = () => {
|
|
|
22
22
|
</DrawerTrigger>
|
|
23
23
|
</div>
|
|
24
24
|
<DrawerContent
|
|
25
|
-
className="lg:hidden h-screen right-0 left-auto w-[320px] rounded-none"
|
|
25
|
+
className="lg:hidden h-screen right-0 left-auto w-[320px] rounded-none overflow-auto"
|
|
26
26
|
aria-describedby={undefined}
|
|
27
27
|
>
|
|
28
28
|
<VisuallyHidden>
|
|
@@ -24,7 +24,7 @@ export const Sidebar = () => {
|
|
|
24
24
|
<Slotlet name="zudoku-after-navigation" />
|
|
25
25
|
</SidebarWrapper>
|
|
26
26
|
<DrawerContent
|
|
27
|
-
className="lg:hidden h-screen left-0 p-6 w-[320px] rounded-none"
|
|
27
|
+
className="lg:hidden h-screen left-0 p-6 w-[320px] rounded-none overflow-auto"
|
|
28
28
|
aria-describedby={undefined}
|
|
29
29
|
>
|
|
30
30
|
<VisuallyHidden>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
2
2
|
import { ChevronRightIcon } from "lucide-react";
|
|
3
3
|
import { useEffect, useState } from "react";
|
|
4
|
-
import { NavLink } from "react-router-dom";
|
|
4
|
+
import { NavLink, useMatch } from "react-router-dom";
|
|
5
5
|
import type { SidebarItemCategory } from "../../../config/validators/SidebarSchema.js";
|
|
6
6
|
import { cn } from "../../util/cn.js";
|
|
7
7
|
import { joinPath } from "../../util/joinPath.js";
|
|
@@ -26,6 +26,7 @@ export const SidebarCategory = ({
|
|
|
26
26
|
!isCollapsible || !isCollapsed || isCategoryOpen,
|
|
27
27
|
);
|
|
28
28
|
const [open, setOpen] = useState(isDefaultOpen);
|
|
29
|
+
const isActive = useMatch(joinPath(topNavItem?.id, category.link?.id));
|
|
29
30
|
|
|
30
31
|
useEffect(() => {
|
|
31
32
|
// this is triggered when an item from the sidebar is clicked
|
|
@@ -56,46 +57,54 @@ export const SidebarCategory = ({
|
|
|
56
57
|
|
|
57
58
|
return (
|
|
58
59
|
<Collapsible.Root
|
|
59
|
-
className=
|
|
60
|
+
className="flex flex-col"
|
|
60
61
|
defaultOpen={isDefaultOpen}
|
|
61
62
|
open={open}
|
|
62
63
|
onOpenChange={() => setOpen(true)}
|
|
63
64
|
>
|
|
64
65
|
<Collapsible.Trigger className="group" asChild disabled={!isCollapsible}>
|
|
65
66
|
<div
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
67
|
+
onClick={() => setHasInteracted(true)}
|
|
68
|
+
className={navigationListItem({
|
|
69
|
+
isActive: false,
|
|
70
|
+
isTopLevel: level === 0,
|
|
71
|
+
className: [
|
|
72
|
+
"text-start",
|
|
73
|
+
isCollapsible
|
|
74
|
+
? "cursor-pointer"
|
|
75
|
+
: "cursor-default hover:bg-transparent",
|
|
76
|
+
],
|
|
77
|
+
})}
|
|
73
78
|
>
|
|
74
79
|
{category.icon && (
|
|
75
80
|
<category.icon
|
|
76
81
|
size={16}
|
|
77
|
-
className=
|
|
82
|
+
className={cn(
|
|
83
|
+
"align-[-0.125em] -translate-x-1",
|
|
84
|
+
isActive && "text-primary",
|
|
85
|
+
)}
|
|
78
86
|
/>
|
|
79
87
|
)}
|
|
80
88
|
{category.link?.type === "doc" ? (
|
|
81
89
|
<NavLink
|
|
82
90
|
to={joinPath(topNavItem?.id, category.link.id)}
|
|
83
91
|
className="flex-1"
|
|
84
|
-
onClick={() =>
|
|
92
|
+
onClick={() => {
|
|
93
|
+
// if it is the current path and closed then open it because there's no path change to trigger the open
|
|
94
|
+
if (isActive && !open) {
|
|
95
|
+
setOpen(true);
|
|
96
|
+
}
|
|
97
|
+
}}
|
|
85
98
|
>
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
<div className="truncate">{category.label}</div>
|
|
96
|
-
{ToggleButton}
|
|
97
|
-
</div>
|
|
98
|
-
)}
|
|
99
|
+
<div
|
|
100
|
+
className={cn(
|
|
101
|
+
"flex items-center gap-2 justify-between w-full",
|
|
102
|
+
isActive ? "text-primary" : "text-foreground/80",
|
|
103
|
+
)}
|
|
104
|
+
>
|
|
105
|
+
<div className="truncate">{category.label}</div>
|
|
106
|
+
{ToggleButton}
|
|
107
|
+
</div>
|
|
99
108
|
</NavLink>
|
|
100
109
|
) : (
|
|
101
110
|
<div className="flex items-center justify-between w-full">
|
|
@@ -109,10 +118,9 @@ export const SidebarCategory = ({
|
|
|
109
118
|
className={cn(
|
|
110
119
|
// CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
|
|
111
120
|
hasInteracted && "CollapsibleContent",
|
|
112
|
-
"ms-[calc(var(--padding-nav-item)*1.125)]",
|
|
113
121
|
)}
|
|
114
122
|
>
|
|
115
|
-
<ul className="mt-1 border-l
|
|
123
|
+
<ul className="mt-1 border-l ms-0.5">
|
|
116
124
|
{category.items.map((item) => (
|
|
117
125
|
<SidebarItem
|
|
118
126
|
key={
|
|
@@ -3,7 +3,6 @@ import { ExternalLinkIcon } from "lucide-react";
|
|
|
3
3
|
import { NavLink, useSearchParams } from "react-router-dom";
|
|
4
4
|
|
|
5
5
|
import type { SidebarItem as SidebarItemType } from "../../../config/validators/SidebarSchema.js";
|
|
6
|
-
import { cn } from "../../util/cn.js";
|
|
7
6
|
import { joinPath } from "../../util/joinPath.js";
|
|
8
7
|
import { AnchorLink } from "../AnchorLink.js";
|
|
9
8
|
import { useViewportAnchor } from "../context/ViewportAnchorContext.js";
|
|
@@ -16,7 +15,8 @@ export const navigationListItem = cva(
|
|
|
16
15
|
{
|
|
17
16
|
variants: {
|
|
18
17
|
isTopLevel: {
|
|
19
|
-
true: "font-
|
|
18
|
+
true: "font-medium -mx-[--padding-nav-item]",
|
|
19
|
+
false: "-mr-[--padding-nav-item] ml-[--padding-nav-item]",
|
|
20
20
|
},
|
|
21
21
|
isActive: {
|
|
22
22
|
true: "text-primary font-medium",
|
|
@@ -27,6 +27,9 @@ export const navigationListItem = cva(
|
|
|
27
27
|
false: "",
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
|
+
defaultVariants: {
|
|
31
|
+
isActive: false,
|
|
32
|
+
},
|
|
30
33
|
},
|
|
31
34
|
);
|
|
32
35
|
|
|
@@ -58,7 +61,7 @@ export const SidebarItem = ({
|
|
|
58
61
|
{item.icon && <item.icon size={16} className="align-[-0.125em]" />}
|
|
59
62
|
{item.badge ? (
|
|
60
63
|
<>
|
|
61
|
-
<span className="truncate" title={item.label}>
|
|
64
|
+
<span className="truncate flex-1" title={item.label}>
|
|
62
65
|
{item.label}
|
|
63
66
|
</span>
|
|
64
67
|
<SidebarBadge {...item.badge} />
|
|
@@ -73,13 +76,11 @@ export const SidebarItem = ({
|
|
|
73
76
|
<AnchorLink
|
|
74
77
|
to={{ hash: item.href, search: searchParams.toString() }}
|
|
75
78
|
{...{ [DATA_ANCHOR_ATTR]: item.href.slice(1) }}
|
|
76
|
-
className={
|
|
77
|
-
|
|
78
|
-
level === 0
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}),
|
|
82
|
-
)}
|
|
79
|
+
className={navigationListItem({
|
|
80
|
+
isActive: item.href.slice(1) === activeAnchor,
|
|
81
|
+
isTopLevel: level === 0,
|
|
82
|
+
className: item.badge?.placement !== "start" && "justify-between",
|
|
83
|
+
})}
|
|
83
84
|
>
|
|
84
85
|
{item.badge ? (
|
|
85
86
|
<>
|
|
@@ -94,7 +95,9 @@ export const SidebarItem = ({
|
|
|
94
95
|
</AnchorLink>
|
|
95
96
|
) : !item.href.startsWith("http") ? (
|
|
96
97
|
<NavLink
|
|
97
|
-
className={
|
|
98
|
+
className={navigationListItem({
|
|
99
|
+
className: item.badge?.placement !== "start" && "justify-between",
|
|
100
|
+
})}
|
|
98
101
|
to={item.href}
|
|
99
102
|
>
|
|
100
103
|
{item.badge ? (
|
|
@@ -110,10 +113,7 @@ export const SidebarItem = ({
|
|
|
110
113
|
</NavLink>
|
|
111
114
|
) : (
|
|
112
115
|
<a
|
|
113
|
-
className={
|
|
114
|
-
navigationListItem({ isTopLevel: level === 0 }),
|
|
115
|
-
"block",
|
|
116
|
-
)}
|
|
116
|
+
className={navigationListItem({ isTopLevel: level === 0 })}
|
|
117
117
|
href={item.href}
|
|
118
118
|
target="_blank"
|
|
119
119
|
rel="noopener noreferrer"
|
|
@@ -121,8 +121,7 @@ export const SidebarItem = ({
|
|
|
121
121
|
<span className="whitespace-normal">{item.label}</span>
|
|
122
122
|
{/* This prevents that the icon would be positioned in its own line if the text fills a line entirely */}
|
|
123
123
|
<span className="whitespace-nowrap">
|
|
124
|
-
|
|
125
|
-
<ExternalLinkIcon className="inline ml-1" size={12} />
|
|
124
|
+
<ExternalLinkIcon className="inline -translate-y-0.5" size={12} />
|
|
126
125
|
</span>
|
|
127
126
|
</a>
|
|
128
127
|
);
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { ProseClasses } from "../../components/Markdown.js";
|
|
2
3
|
import { cn } from "../../util/cn.js";
|
|
3
4
|
import { useExposedProps } from "../../util/useExposedProps.js";
|
|
4
5
|
import type { CustomPageConfig } from "./index.js";
|
|
@@ -11,5 +12,7 @@ export const CustomPage = ({
|
|
|
11
12
|
const slotletProps = useExposedProps();
|
|
12
13
|
const content = render ? React.createElement(render, slotletProps) : element;
|
|
13
14
|
|
|
14
|
-
return
|
|
15
|
+
return (
|
|
16
|
+
<div className={cn(prose && ProseClasses, "max-w-full")}>{content}</div>
|
|
17
|
+
);
|
|
15
18
|
};
|
|
@@ -68,14 +68,16 @@ export const MdxPage = ({
|
|
|
68
68
|
"max-w-full xl:w-full xl:max-w-prose flex-1 flex-shrink pt-[--padding-content-top] pb-[--padding-content-bottom]",
|
|
69
69
|
)}
|
|
70
70
|
>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
{title}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
{(category || title) && (
|
|
72
|
+
<header>
|
|
73
|
+
{category && <CategoryHeading>{category}</CategoryHeading>}
|
|
74
|
+
{title && (
|
|
75
|
+
<Heading level={1} id={slugify(title)}>
|
|
76
|
+
{title}
|
|
77
|
+
</Heading>
|
|
78
|
+
)}
|
|
79
|
+
</header>
|
|
80
|
+
)}
|
|
79
81
|
<MdxComponent
|
|
80
82
|
components={{ ...useMDXComponents(), ...MarkdownHeadings }}
|
|
81
83
|
/>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { j as e } from "./jsx-runtime-B6kdoens.js";
|
|
2
|
-
import { P as n, C as o, H as i } from "./Markdown-D6Nze6qq.js";
|
|
3
|
-
const c = ({
|
|
4
|
-
title: r = "An error occurred",
|
|
5
|
-
message: a,
|
|
6
|
-
category: s
|
|
7
|
-
}) => /* @__PURE__ */ e.jsxs("div", { className: n + " h-full pt-[--padding-content-top]", children: [
|
|
8
|
-
s && /* @__PURE__ */ e.jsx(o, { children: s }),
|
|
9
|
-
r && /* @__PURE__ */ e.jsx(i, { level: 1, className: "flex gap-3.5 items-center", children: r }),
|
|
10
|
-
/* @__PURE__ */ e.jsx("p", { children: a })
|
|
11
|
-
] });
|
|
12
|
-
export {
|
|
13
|
-
c as E
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=ErrorPage-B-zoPPVx.js.map
|