zudoku 0.26.0 → 0.27.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/main.d.ts +1 -1
- package/dist/app/main.js +19 -7
- package/dist/app/main.js.map +1 -1
- package/dist/config/config.d.ts +1 -0
- package/dist/config/validators/InputSidebarSchema.d.ts +2 -2
- package/dist/config/validators/common.d.ts +78 -0
- package/dist/config/validators/common.js +6 -0
- package/dist/config/validators/common.js.map +1 -1
- package/dist/config/validators/validate.d.ts +34 -0
- package/dist/lib/authentication/providers/auth0.js +1 -1
- package/dist/lib/authentication/providers/auth0.js.map +1 -1
- package/dist/lib/authentication/providers/openid.d.ts +1 -1
- package/dist/lib/authentication/providers/openid.js +10 -6
- package/dist/lib/authentication/providers/openid.js.map +1 -1
- package/dist/lib/components/AnchorLink.js +5 -2
- package/dist/lib/components/AnchorLink.js.map +1 -1
- package/dist/lib/components/Autocomplete.d.ts +12 -0
- package/dist/lib/components/Autocomplete.js +47 -0
- package/dist/lib/components/Autocomplete.js.map +1 -0
- package/dist/lib/components/Header.js +4 -4
- package/dist/lib/components/Header.js.map +1 -1
- package/dist/lib/components/Heading.d.ts +1 -1
- package/dist/lib/components/Markdown.d.ts +2 -2
- package/dist/lib/components/Markdown.js +3 -1
- package/dist/lib/components/Markdown.js.map +1 -1
- package/dist/lib/components/StatusPage.d.ts +7 -0
- package/dist/lib/components/StatusPage.js +71 -0
- package/dist/lib/components/StatusPage.js.map +1 -0
- package/dist/lib/components/SyntaxHighlight.d.ts +2 -1
- package/dist/lib/components/SyntaxHighlight.js +2 -2
- package/dist/lib/components/SyntaxHighlight.js.map +1 -1
- package/dist/lib/components/ThemeSwitch.js +4 -4
- package/dist/lib/components/ThemeSwitch.js.map +1 -1
- package/dist/lib/components/cache.d.ts +6 -0
- package/dist/lib/components/cache.js +13 -0
- package/dist/lib/components/cache.js.map +1 -0
- package/dist/lib/components/context/ViewportAnchorContext.js +16 -4
- package/dist/lib/components/context/ViewportAnchorContext.js.map +1 -1
- package/dist/lib/components/context/ZudokuContext.js +2 -1
- package/dist/lib/components/context/ZudokuContext.js.map +1 -1
- package/dist/lib/components/index.d.ts +9 -2
- package/dist/lib/components/index.js +5 -2
- package/dist/lib/components/index.js.map +1 -1
- package/dist/lib/core/RouteGuard.d.ts +1 -0
- package/dist/lib/core/RouteGuard.js +28 -0
- package/dist/lib/core/RouteGuard.js.map +1 -0
- package/dist/lib/core/ZudokuContext.d.ts +4 -2
- package/dist/lib/core/ZudokuContext.js +9 -7
- package/dist/lib/core/ZudokuContext.js.map +1 -1
- package/dist/lib/oas/graphql/circular.d.ts +3 -0
- package/dist/lib/oas/graphql/circular.js +27 -0
- package/dist/lib/oas/graphql/circular.js.map +1 -0
- package/dist/lib/oas/graphql/index.js +5 -6
- package/dist/lib/oas/graphql/index.js.map +1 -1
- package/dist/lib/oas/parser/dereference/index.d.ts +0 -1
- package/dist/lib/oas/parser/dereference/index.js +1 -1
- package/dist/lib/oas/parser/dereference/index.js.map +1 -1
- package/dist/lib/plugins/markdown/MdxPage.js +8 -2
- package/dist/lib/plugins/markdown/MdxPage.js.map +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js +1 -1
- package/dist/lib/plugins/openapi/OperationListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js +1 -1
- package/dist/lib/plugins/openapi/ParameterListItem.js.map +1 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.d.ts +3 -1
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js +3 -2
- package/dist/lib/plugins/openapi/PlaygroundDialogWrapper.js.map +1 -1
- package/dist/lib/plugins/openapi/Sidecar.js +3 -3
- package/dist/lib/plugins/openapi/Sidecar.js.map +1 -1
- package/dist/lib/plugins/openapi/index.js +4 -11
- package/dist/lib/plugins/openapi/index.js.map +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +7 -2
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.d.ts +6 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js +12 -0
- package/dist/lib/plugins/openapi/playground/ExamplesDropdown.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/Headers.js +67 -4
- package/dist/lib/plugins/openapi/playground/Headers.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/ParamsGrid.d.ts +5 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js +4 -0
- package/dist/lib/plugins/openapi/playground/ParamsGrid.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/PathParams.js +4 -12
- package/dist/lib/plugins/openapi/playground/PathParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/Playground.d.ts +18 -1
- package/dist/lib/plugins/openapi/playground/Playground.js +53 -40
- package/dist/lib/plugins/openapi/playground/Playground.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js +1 -1
- package/dist/lib/plugins/openapi/playground/PlaygroundDialog.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/QueryParams.js +21 -30
- package/dist/lib/plugins/openapi/playground/QueryParams.js.map +1 -1
- package/dist/lib/plugins/openapi/playground/SubmitButton.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/SubmitButton.js +22 -0
- package/dist/lib/plugins/openapi/playground/SubmitButton.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js +11 -0
- package/dist/lib/plugins/openapi/playground/result-panel/RequestTab.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.d.ts +8 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js +95 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResponseTab.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.d.ts +7 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js +16 -0
- package/dist/lib/plugins/openapi/playground/result-panel/ResultPanel.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.d.ts +10 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js +32 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.js.map +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js +56 -0
- package/dist/lib/plugins/openapi/playground/result-panel/convertToTypes.test.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.d.ts +2 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js +5 -3
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.js.map +1 -1
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js +49 -0
- package/dist/lib/plugins/openapi/post-processors/removeExtensions.test.js.map +1 -1
- package/dist/lib/plugins/openapi/post-processors/removeParameters.d.ts +10 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js +66 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.js.map +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.d.ts +1 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js +131 -0
- package/dist/lib/plugins/openapi/post-processors/removeParameters.test.js.map +1 -0
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js +1 -1
- package/dist/lib/plugins/openapi/schema/SchemaComponents.js.map +1 -1
- package/dist/lib/ui/Command.d.ts +9 -1
- package/dist/lib/ui/Command.js +5 -1
- package/dist/lib/ui/Command.js.map +1 -1
- package/dist/lib/ui/Select.js +2 -2
- package/dist/lib/ui/Select.js.map +1 -1
- package/dist/lib/util/MdxComponents.js +2 -2
- package/dist/lib/util/MdxComponents.js.map +1 -1
- package/dist/lib/util/joinUrl.d.ts +1 -0
- package/dist/lib/util/joinUrl.js +40 -0
- package/dist/lib/util/joinUrl.js.map +1 -0
- package/dist/lib/util/useScrollToAnchor.d.ts +1 -0
- package/dist/lib/util/useScrollToAnchor.js +26 -15
- package/dist/lib/util/useScrollToAnchor.js.map +1 -1
- package/dist/vite/build.js +10 -10
- package/dist/vite/build.js.map +1 -1
- package/dist/vite/config.js +4 -1
- package/dist/vite/config.js.map +1 -1
- package/dist/vite/dev-server.js +4 -1
- package/dist/vite/dev-server.js.map +1 -1
- package/dist/vite/plugin-api.d.ts +1 -1
- package/dist/vite/plugin-api.js +31 -7
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-auth.js +4 -1
- package/dist/vite/plugin-auth.js.map +1 -1
- package/dist/vite/plugin-mdx.js +9 -4
- package/dist/vite/plugin-mdx.js.map +1 -1
- package/dist/vite/prerender.d.ts +2 -2
- package/dist/vite/prerender.js +5 -4
- package/dist/vite/prerender.js.map +1 -1
- package/dist/zuplo/enrich-with-zuplo.d.ts +5 -0
- package/dist/zuplo/enrich-with-zuplo.js +184 -0
- package/dist/zuplo/enrich-with-zuplo.js.map +1 -0
- package/dist/zuplo/env.d.ts +1 -0
- package/dist/zuplo/env.js +3 -0
- package/dist/zuplo/env.js.map +1 -1
- package/dist/zuplo/policy-types.d.ts +33 -0
- package/dist/zuplo/policy-types.js +8 -0
- package/dist/zuplo/policy-types.js.map +1 -0
- package/dist/zuplo/with-zuplo-processors.d.ts +3 -0
- package/dist/zuplo/with-zuplo-processors.js +26 -0
- package/dist/zuplo/with-zuplo-processors.js.map +1 -0
- package/dist/zuplo/with-zuplo.d.ts +1 -1
- package/dist/zuplo/with-zuplo.js +7 -26
- package/dist/zuplo/with-zuplo.js.map +1 -1
- package/lib/{AuthenticationPlugin-DNXBcsVN.js → AuthenticationPlugin-CO_YCd2x.js} +3 -3
- package/lib/{AuthenticationPlugin-DNXBcsVN.js.map → AuthenticationPlugin-CO_YCd2x.js.map} +1 -1
- package/lib/{Markdown-BrfrjEk_.js → Markdown-B8o9Qz4q.js} +1197 -1186
- package/lib/{Markdown-BrfrjEk_.js.map → Markdown-B8o9Qz4q.js.map} +1 -1
- package/lib/{MdxPage-LNZLj_A5.js → MdxPage-BxRt3Ly7.js} +63 -58
- package/lib/MdxPage-BxRt3Ly7.js.map +1 -0
- package/lib/OperationList-DH-zIgtq.js +5160 -0
- package/lib/OperationList-DH-zIgtq.js.map +1 -0
- package/lib/{Route-Pzk6qwIk.js → Route-DJ0ZlVq1.js} +3 -3
- package/lib/{Route-Pzk6qwIk.js.map → Route-DJ0ZlVq1.js.map} +1 -1
- package/lib/{Select-DkOpAG0c.js → Select-B7UXR0SB.js} +61 -61
- package/lib/Select-B7UXR0SB.js.map +1 -0
- package/lib/{SlotletProvider-DPbx9KdU.js → SlotletProvider-CtIp8rP3.js} +4 -4
- package/lib/{SlotletProvider-DPbx9KdU.js.map → SlotletProvider-CtIp8rP3.js.map} +1 -1
- package/lib/{Button-oroWHXAy.js → Spinner-BlzrEEk1.js} +15 -12
- package/lib/Spinner-BlzrEEk1.js.map +1 -0
- package/lib/{SyntaxHighlight-CJCSPG1F.js → SyntaxHighlight-C1w1QPdY.js} +300 -295
- package/lib/{SyntaxHighlight-CJCSPG1F.js.map → SyntaxHighlight-C1w1QPdY.js.map} +1 -1
- package/lib/{ZudokuContext-D3ayHjP-.js → ZudokuContext-8jts0fF3.js} +259 -248
- package/lib/ZudokuContext-8jts0fF3.js.map +1 -0
- package/lib/{chunk-SYFQ2XB5-KWlHsT7t.js → chunk-SYFQ2XB5-BPvC-soB.js} +6 -5
- package/lib/{chunk-SYFQ2XB5-KWlHsT7t.js.map → chunk-SYFQ2XB5-BPvC-soB.js.map} +1 -1
- package/lib/circular-Dgpd6AN-.js +15397 -0
- package/lib/circular-Dgpd6AN-.js.map +1 -0
- package/lib/{createServer-BcaswoFO.js → createServer-BV0tHzLK.js} +3450 -5577
- package/lib/createServer-BV0tHzLK.js.map +1 -0
- package/lib/{hook-DUyACbIK.js → hook-BG02esyv.js} +2 -2
- package/lib/{hook-DUyACbIK.js.map → hook-BG02esyv.js.map} +1 -1
- package/lib/index-B7mqiOei.js +509 -0
- package/lib/index-B7mqiOei.js.map +1 -0
- package/lib/index-DmqsUPcm.js +1915 -0
- package/lib/index-DmqsUPcm.js.map +1 -0
- package/lib/joinUrl-BTy9bvoK.js +20 -0
- package/lib/joinUrl-BTy9bvoK.js.map +1 -0
- package/lib/post-processors/removeExtensions.js +7 -7
- package/lib/post-processors/removeExtensions.js.map +1 -1
- package/lib/post-processors/removeParameters.js +48 -0
- package/lib/post-processors/removeParameters.js.map +1 -0
- package/lib/ui/ActionButton.js +10 -11
- package/lib/ui/ActionButton.js.map +1 -1
- package/lib/ui/Command.js +125 -13
- package/lib/ui/Command.js.map +1 -1
- package/lib/ui/Select.js +2 -2
- package/lib/ui/Select.js.map +1 -1
- package/lib/{useExposedProps-BBHR7aLM.js → useExposedProps-BLKFBylA.js} +2 -2
- package/lib/{useExposedProps-BBHR7aLM.js.map → useExposedProps-BLKFBylA.js.map} +1 -1
- package/lib/useScrollToAnchor-Bl6mz9_x.js +288 -0
- package/lib/useScrollToAnchor-Bl6mz9_x.js.map +1 -0
- package/lib/zudoku.auth-auth0.js +7 -9
- package/lib/zudoku.auth-auth0.js.map +1 -1
- package/lib/zudoku.auth-clerk.js +1 -1
- package/lib/zudoku.auth-openid.js +223 -219
- package/lib/zudoku.auth-openid.js.map +1 -1
- package/lib/zudoku.components.js +754 -992
- package/lib/zudoku.components.js.map +1 -1
- package/lib/zudoku.plugin-api-catalog.js +3 -3
- package/lib/zudoku.plugin-api-keys.js +5 -5
- package/lib/zudoku.plugin-custom-pages.js +2 -2
- package/lib/zudoku.plugin-markdown.js +1 -1
- package/lib/zudoku.plugin-openapi.js +4 -4
- package/lib/zudoku.plugin-redirect.js +1 -1
- package/package.json +2 -2
- package/src/app/main.css +50 -50
- package/src/app/main.tsx +26 -7
- package/src/lib/authentication/providers/auth0.tsx +1 -4
- package/src/lib/authentication/providers/openid.tsx +12 -5
- package/src/lib/components/AnchorLink.tsx +5 -2
- package/src/lib/components/Autocomplete.tsx +111 -0
- package/src/lib/components/Header.tsx +4 -4
- package/src/lib/components/Markdown.tsx +14 -15
- package/src/lib/components/StatusPage.tsx +91 -0
- package/src/lib/components/SyntaxHighlight.tsx +14 -0
- package/src/lib/components/ThemeSwitch.tsx +14 -15
- package/src/lib/components/cache.ts +15 -0
- package/src/lib/components/context/ViewportAnchorContext.tsx +20 -6
- package/src/lib/components/context/ZudokuContext.ts +3 -1
- package/src/lib/components/index.ts +9 -2
- package/src/lib/core/RouteGuard.tsx +35 -0
- package/src/lib/core/ZudokuContext.ts +9 -8
- package/src/lib/oas/graphql/circular.ts +29 -0
- package/src/lib/oas/graphql/index.ts +9 -9
- package/src/lib/oas/parser/dereference/index.ts +1 -2
- package/src/lib/plugins/markdown/MdxPage.tsx +9 -1
- package/src/lib/plugins/openapi/OperationListItem.tsx +0 -2
- package/src/lib/plugins/openapi/ParameterListItem.tsx +1 -0
- package/src/lib/plugins/openapi/PlaygroundDialogWrapper.tsx +5 -0
- package/src/lib/plugins/openapi/Sidecar.tsx +4 -2
- package/src/lib/plugins/openapi/index.tsx +9 -15
- package/src/lib/plugins/openapi/interfaces.ts +10 -2
- package/src/lib/plugins/openapi/playground/ExamplesDropdown.tsx +54 -0
- package/src/lib/plugins/openapi/playground/Headers.tsx +136 -39
- package/src/lib/plugins/openapi/playground/ParamsGrid.tsx +8 -0
- package/src/lib/plugins/openapi/playground/PathParams.tsx +34 -74
- package/src/lib/plugins/openapi/playground/Playground.tsx +219 -177
- package/src/lib/plugins/openapi/playground/PlaygroundDialog.tsx +1 -1
- package/src/lib/plugins/openapi/playground/QueryParams.tsx +90 -122
- package/src/lib/plugins/openapi/playground/SubmitButton.tsx +75 -0
- package/src/lib/plugins/openapi/playground/result-panel/RequestTab.tsx +73 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResponseTab.tsx +210 -0
- package/src/lib/plugins/openapi/playground/result-panel/ResultPanel.tsx +101 -0
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.test.ts +64 -0
- package/src/lib/plugins/openapi/playground/result-panel/convertToTypes.ts +36 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.test.ts +58 -0
- package/src/lib/plugins/openapi/post-processors/removeExtensions.ts +7 -4
- package/src/lib/plugins/openapi/post-processors/removeParameters.test.ts +148 -0
- package/src/lib/plugins/openapi/post-processors/removeParameters.ts +101 -0
- package/src/lib/plugins/openapi/schema/SchemaComponents.tsx +1 -1
- package/src/lib/ui/Command.tsx +20 -0
- package/src/lib/ui/Select.tsx +1 -1
- package/src/lib/util/MdxComponents.tsx +2 -1
- package/src/lib/util/joinUrl.ts +57 -0
- package/src/lib/util/useScrollToAnchor.ts +32 -15
- package/dist/lib/plugins/openapi/playground/EnumSelector.d.ts +0 -8
- package/dist/lib/plugins/openapi/playground/EnumSelector.js +0 -21
- package/dist/lib/plugins/openapi/playground/EnumSelector.js.map +0 -1
- package/dist/lib/plugins/openapi/playground/ResponseTab.d.ts +0 -4
- package/dist/lib/plugins/openapi/playground/ResponseTab.js +0 -42
- package/dist/lib/plugins/openapi/playground/ResponseTab.js.map +0 -1
- package/lib/AnchorLink-_Vu02ceN.js +0 -34
- package/lib/AnchorLink-_Vu02ceN.js.map +0 -1
- package/lib/Button-oroWHXAy.js.map +0 -1
- package/lib/Command-D5DE0DD7.js +0 -611
- package/lib/Command-D5DE0DD7.js.map +0 -1
- package/lib/MdxPage-LNZLj_A5.js.map +0 -1
- package/lib/OperationList-PCwzTp1r.js +0 -5144
- package/lib/OperationList-PCwzTp1r.js.map +0 -1
- package/lib/Select-DkOpAG0c.js.map +0 -1
- package/lib/Spinner-C5gHXrVz.js +0 -7
- package/lib/Spinner-C5gHXrVz.js.map +0 -1
- package/lib/ZudokuContext-D3ayHjP-.js.map +0 -1
- package/lib/createServer-BcaswoFO.js.map +0 -1
- package/lib/index-CaILD1AV.js +0 -1292
- package/lib/index-CaILD1AV.js.map +0 -1
- package/lib/index-TaRXY2w1.js +0 -43
- package/lib/index-TaRXY2w1.js.map +0 -1
- package/src/lib/plugins/openapi/playground/EnumSelector.tsx +0 -86
- package/src/lib/plugins/openapi/playground/ResponseTab.tsx +0 -76
package/lib/ui/Command.js
CHANGED
|
@@ -1,17 +1,129 @@
|
|
|
1
|
-
import "../jsx-runtime-Bdg6XQ1m.js";
|
|
2
|
-
import {
|
|
3
|
-
import "lucide-react";
|
|
4
|
-
import "react";
|
|
5
|
-
import "../cn-qaFjX9_3.js";
|
|
1
|
+
import { j as t } from "../jsx-runtime-Bdg6XQ1m.js";
|
|
2
|
+
import { V as o, D as n, a as i } from "../index-B7mqiOei.js";
|
|
3
|
+
import { Search as p } from "lucide-react";
|
|
4
|
+
import * as r from "react";
|
|
5
|
+
import { c as s } from "../cn-qaFjX9_3.js";
|
|
6
|
+
const m = r.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t.jsx(
|
|
7
|
+
o,
|
|
8
|
+
{
|
|
9
|
+
ref: d,
|
|
10
|
+
className: s(
|
|
11
|
+
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
|
12
|
+
e
|
|
13
|
+
),
|
|
14
|
+
...a
|
|
15
|
+
}
|
|
16
|
+
));
|
|
17
|
+
m.displayName = o.displayName;
|
|
18
|
+
const v = ({ children: e, ...a }) => /* @__PURE__ */ t.jsx(n, { ...a, children: /* @__PURE__ */ t.jsx(i, { className: "overflow-hidden p-0 shadow-lg", children: /* @__PURE__ */ t.jsx(m, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5", children: e }) }) }), l = r.forwardRef(({ className: e, ...a }, d) => (
|
|
19
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
20
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
21
|
+
/* @__PURE__ */ t.jsx(p, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
22
|
+
/* @__PURE__ */ t.jsx(
|
|
23
|
+
o.Input,
|
|
24
|
+
{
|
|
25
|
+
ref: d,
|
|
26
|
+
className: s(
|
|
27
|
+
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
|
28
|
+
e
|
|
29
|
+
),
|
|
30
|
+
...a
|
|
31
|
+
}
|
|
32
|
+
)
|
|
33
|
+
] })
|
|
34
|
+
));
|
|
35
|
+
l.displayName = o.Input.displayName;
|
|
36
|
+
const c = r.forwardRef(({ className: e, ...a }, d) => (
|
|
37
|
+
// eslint-disable-next-line react/no-unknown-property
|
|
38
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex items-center", "cmdk-input-wrapper": "", children: /* @__PURE__ */ t.jsx(
|
|
39
|
+
o.Input,
|
|
40
|
+
{
|
|
41
|
+
ref: d,
|
|
42
|
+
className: s(
|
|
43
|
+
"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
44
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
45
|
+
e
|
|
46
|
+
),
|
|
47
|
+
...a
|
|
48
|
+
}
|
|
49
|
+
) })
|
|
50
|
+
));
|
|
51
|
+
c.displayName = o.Input.displayName;
|
|
52
|
+
const u = r.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t.jsx(
|
|
53
|
+
o.List,
|
|
54
|
+
{
|
|
55
|
+
ref: d,
|
|
56
|
+
className: s("max-h-[300px] overflow-y-auto overflow-x-hidden", e),
|
|
57
|
+
...a
|
|
58
|
+
}
|
|
59
|
+
));
|
|
60
|
+
u.displayName = o.List.displayName;
|
|
61
|
+
const f = r.forwardRef((e, a) => /* @__PURE__ */ t.jsx(
|
|
62
|
+
o.Empty,
|
|
63
|
+
{
|
|
64
|
+
ref: a,
|
|
65
|
+
className: "py-6 text-center text-sm",
|
|
66
|
+
...e
|
|
67
|
+
}
|
|
68
|
+
));
|
|
69
|
+
f.displayName = o.Empty.displayName;
|
|
70
|
+
const x = r.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t.jsx(
|
|
71
|
+
o.Group,
|
|
72
|
+
{
|
|
73
|
+
ref: d,
|
|
74
|
+
className: s(
|
|
75
|
+
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
|
76
|
+
e
|
|
77
|
+
),
|
|
78
|
+
...a
|
|
79
|
+
}
|
|
80
|
+
));
|
|
81
|
+
x.displayName = o.Group.displayName;
|
|
82
|
+
const g = r.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t.jsx(
|
|
83
|
+
o.Separator,
|
|
84
|
+
{
|
|
85
|
+
ref: d,
|
|
86
|
+
className: s("-mx-1 h-px bg-border", e),
|
|
87
|
+
...a
|
|
88
|
+
}
|
|
89
|
+
));
|
|
90
|
+
g.displayName = o.Separator.displayName;
|
|
91
|
+
const h = r.forwardRef(({ className: e, ...a }, d) => /* @__PURE__ */ t.jsx(
|
|
92
|
+
o.Item,
|
|
93
|
+
{
|
|
94
|
+
ref: d,
|
|
95
|
+
className: s(
|
|
96
|
+
"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
97
|
+
e
|
|
98
|
+
),
|
|
99
|
+
...a
|
|
100
|
+
}
|
|
101
|
+
));
|
|
102
|
+
h.displayName = o.Item.displayName;
|
|
103
|
+
const y = ({
|
|
104
|
+
className: e,
|
|
105
|
+
...a
|
|
106
|
+
}) => /* @__PURE__ */ t.jsx(
|
|
107
|
+
"span",
|
|
108
|
+
{
|
|
109
|
+
className: s(
|
|
110
|
+
"ml-auto text-xs tracking-widest text-muted-foreground",
|
|
111
|
+
e
|
|
112
|
+
),
|
|
113
|
+
...a
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
y.displayName = "CommandShortcut";
|
|
6
117
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
118
|
+
m as Command,
|
|
119
|
+
v as CommandDialog,
|
|
120
|
+
f as CommandEmpty,
|
|
121
|
+
x as CommandGroup,
|
|
122
|
+
c as CommandInlineInput,
|
|
123
|
+
l as CommandInput,
|
|
124
|
+
h as CommandItem,
|
|
13
125
|
u as CommandList,
|
|
14
|
-
|
|
15
|
-
|
|
126
|
+
g as CommandSeparator,
|
|
127
|
+
y as CommandShortcut
|
|
16
128
|
};
|
|
17
129
|
//# sourceMappingURL=Command.js.map
|
package/lib/ui/Command.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Command.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
1
|
+
{"version":3,"file":"Command.js","sources":["../../src/lib/ui/Command.tsx"],"sourcesContent":["import { type DialogProps } from \"@radix-ui/react-dialog\";\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { Search } from \"lucide-react\";\nimport * as React from \"react\";\nimport { Dialog, DialogContent } from \"zudoku/ui/Dialog.js\";\nimport { cn } from \"../util/cn.js\";\n\nconst Command = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive\n ref={ref}\n className={cn(\n \"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground\",\n className,\n )}\n {...props}\n />\n));\nCommand.displayName = CommandPrimitive.displayName;\n\nconst CommandDialog = ({ children, ...props }: DialogProps) => {\n return (\n <Dialog {...props}>\n <DialogContent className=\"overflow-hidden p-0 shadow-lg\">\n <Command className=\"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5\">\n {children}\n </Command>\n </DialogContent>\n </Dialog>\n );\n};\n\nconst CommandInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n // eslint-disable-next-line react/no-unknown-property\n <div className=\"flex items-center border-b px-3\" cmdk-input-wrapper=\"\">\n <Search className=\"mr-2 h-4 w-4 shrink-0 opacity-50\" />\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInput.displayName = CommandPrimitive.Input.displayName;\n\nconst CommandInlineInput = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Input>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>\n>(({ className, ...props }, ref) => (\n // eslint-disable-next-line react/no-unknown-property\n <div className=\"flex items-center\" cmdk-input-wrapper=\"\">\n <CommandPrimitive.Input\n ref={ref}\n className={cn(\n \"flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50\",\n \"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring\",\n className,\n )}\n {...props}\n />\n </div>\n));\n\nCommandInlineInput.displayName = CommandPrimitive.Input.displayName;\nconst CommandList = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.List>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.List\n ref={ref}\n className={cn(\"max-h-[300px] overflow-y-auto overflow-x-hidden\", className)}\n {...props}\n />\n));\n\nCommandList.displayName = CommandPrimitive.List.displayName;\n\nconst CommandEmpty = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Empty>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>\n>((props, ref) => (\n <CommandPrimitive.Empty\n ref={ref}\n className=\"py-6 text-center text-sm\"\n {...props}\n />\n));\n\nCommandEmpty.displayName = CommandPrimitive.Empty.displayName;\n\nconst CommandGroup = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Group>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Group\n ref={ref}\n className={cn(\n \"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground\",\n className,\n )}\n {...props}\n />\n));\n\nCommandGroup.displayName = CommandPrimitive.Group.displayName;\n\nconst CommandSeparator = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 h-px bg-border\", className)}\n {...props}\n />\n));\nCommandSeparator.displayName = CommandPrimitive.Separator.displayName;\n\nconst CommandItem = React.forwardRef<\n React.ElementRef<typeof CommandPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>\n>(({ className, ...props }, ref) => (\n <CommandPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n className,\n )}\n {...props}\n />\n));\n\nCommandItem.displayName = CommandPrimitive.Item.displayName;\n\nconst CommandShortcut = ({\n className,\n ...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground\",\n className,\n )}\n {...props}\n />\n );\n};\nCommandShortcut.displayName = \"CommandShortcut\";\n\nexport {\n Command,\n CommandDialog,\n CommandEmpty,\n CommandGroup,\n CommandInlineInput,\n CommandInput,\n CommandItem,\n CommandList,\n CommandSeparator,\n CommandShortcut,\n};\n"],"names":["Command","React","className","props","ref","jsx","CommandPrimitive","cn","CommandDialog","children","Dialog","DialogContent","CommandInput","jsxs","Search","CommandInlineInput","CommandList","CommandEmpty","CommandGroup","CommandSeparator","CommandItem","CommandShortcut"],"mappings":";;;;;AAOM,MAAAA,IAAUC,EAAM,WAGpB,CAAC,EAAE,WAAAC,GAAW,GAAGC,EAAM,GAAGC,MAC1BC,gBAAAA,EAAA;AAAA,EAACC;AAAAA,EAAA;AAAA,IACC,KAAAF;AAAA,IACA,WAAWG;AAAA,MACT;AAAA,MACAL;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN,CAC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AAnB;AAAA,EACA,GAAGC;AACL,MAEIE,gBAAAA,EAAA;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWE;AAAA,MACT;AAAA,MACAL;AAAA,IACF;AAAA,IACC,GAAGC;AAAA,EAAA;AACN;AAGJkB,EAAgB,cAAc;"}
|
package/lib/ui/Select.js
CHANGED
|
@@ -62,8 +62,8 @@ const x = l.forwardRef(({ className: s, children: o, position: a = "popper", ...
|
|
|
62
62
|
e.Viewport,
|
|
63
63
|
{
|
|
64
64
|
className: r(
|
|
65
|
-
"
|
|
66
|
-
|
|
65
|
+
a === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
|
|
66
|
+
"divide-y"
|
|
67
67
|
),
|
|
68
68
|
children: o
|
|
69
69
|
}
|
package/lib/ui/Select.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../src/lib/ui/Select.tsx"],"sourcesContent":["import * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"../util/cn.js\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"truncate\">{children}</span>\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"flex-shrink-0 h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../src/lib/ui/Select.tsx"],"sourcesContent":["import * as SelectPrimitive from \"@radix-ui/react-select\";\nimport { Check, ChevronDown, ChevronUp } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"../util/cn.js\";\n\nconst Select = SelectPrimitive.Root;\n\nconst SelectGroup = SelectPrimitive.Group;\n\nconst SelectValue = SelectPrimitive.Value;\n\nconst SelectTrigger = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Trigger>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Trigger\n ref={ref}\n className={cn(\n \"flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"truncate\">{children}</span>\n <SelectPrimitive.Icon asChild>\n <ChevronDown className=\"flex-shrink-0 h-4 w-4 opacity-50\" />\n </SelectPrimitive.Icon>\n </SelectPrimitive.Trigger>\n));\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName;\n\nconst SelectScrollUpButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollUpButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <ChevronUp className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollUpButton>\n));\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;\n\nconst SelectScrollDownButton = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.ScrollDownButton\n ref={ref}\n className={cn(\n \"flex cursor-default items-center justify-center py-1\",\n className,\n )}\n {...props}\n >\n <ChevronDown className=\"h-4 w-4\" />\n </SelectPrimitive.ScrollDownButton>\n));\nSelectScrollDownButton.displayName =\n SelectPrimitive.ScrollDownButton.displayName;\n\nconst SelectContent = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = \"popper\", ...props }, ref) => (\n <SelectPrimitive.Portal>\n <SelectPrimitive.Content\n ref={ref}\n className={cn(\n \"relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2\",\n position === \"popper\" &&\n \"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1\",\n className,\n )}\n position={position}\n {...props}\n >\n <SelectScrollUpButton />\n <SelectPrimitive.Viewport\n className={cn(\n position === \"popper\" &&\n \"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]\",\n \"divide-y\",\n )}\n >\n {children}\n </SelectPrimitive.Viewport>\n <SelectScrollDownButton />\n </SelectPrimitive.Content>\n </SelectPrimitive.Portal>\n));\nSelectContent.displayName = SelectPrimitive.Content.displayName;\n\nconst SelectLabel = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Label\n ref={ref}\n className={cn(\"py-1.5 pl-8 pr-2 text-sm font-semibold\", className)}\n {...props}\n />\n));\nSelectLabel.displayName = SelectPrimitive.Label.displayName;\n\nconst SelectItem = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n <SelectPrimitive.Item\n ref={ref}\n className={cn(\n \"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50\",\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <SelectPrimitive.ItemIndicator>\n <Check className=\"h-4 w-4\" />\n </SelectPrimitive.ItemIndicator>\n </span>\n\n <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n </SelectPrimitive.Item>\n));\nSelectItem.displayName = SelectPrimitive.Item.displayName;\n\nconst SelectSeparator = React.forwardRef<\n React.ElementRef<typeof SelectPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <SelectPrimitive.Separator\n ref={ref}\n className={cn(\"-mx-1 my-1 h-px bg-muted\", className)}\n {...props}\n />\n));\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName;\n\nexport {\n Select,\n SelectContent,\n SelectGroup,\n SelectItem,\n SelectLabel,\n SelectScrollDownButton,\n SelectScrollUpButton,\n SelectSeparator,\n SelectTrigger,\n SelectValue,\n};\n"],"names":["Select","SelectPrimitive","SelectGroup","SelectValue","SelectTrigger","React","className","children","props","ref","jsxs","cn","jsx","ChevronDown","SelectScrollUpButton","ChevronUp","SelectScrollDownButton","SelectContent","position","SelectLabel","SelectItem","Check","SelectSeparator"],"mappings":";;;;;A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ACAL;AAAA,IACF;AAAA,IACC,GAAGE;AAAA,IAEJ,UAAA;AAAA,MAAAI,gBAAAA,EAAA,IAAC,QAAK,EAAA,WAAU,gEACd,UAAAA,gBAAAA,EAAA,IAACX,EAAgB,eAAhB,EACC,UAAAW,gBAAAA,EAAA,IAACS,GAAM,EAAA,WAAU,UAAU,CAAA,EAC7B,CAAA,GACF;AAAA,MAECT,gBAAAA,EAAAA,IAAAX,EAAgB,UAAhB,EAA0B,UAAAM,EAAS,CAAA;AAAA,IAAA;AAAA,EAAA;AACtC,CACD;AACDa,EAAW,cAAcnB,EAAgB,KAAK;AAExC,MAAAqB,IAAkBjB,EAAM,WAG5B,CAAC,EAAE,WAAAC,GAAW,GAAGE,EAAM,GAAGC,MAC1BG,gBAAAA,EAAA;AAAA,EAACX,EAAgB;AAAA,EAAhB;AAAA,IACC,KAAAQ;AAAA,IACA,WAAWE,EAAG,4BAA4BL,CAAS;AAAA,IAClD,GAAGE;AAAA,EAAA;AACN,CACD;AACDc,EAAgB,cAAcrB,EAAgB,UAAU;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as t, a as c, b as n, c as u } from "./chunk-SYFQ2XB5-
|
|
1
|
+
import { u as t, a as c, b as n, c as u } from "./chunk-SYFQ2XB5-BPvC-soB.js";
|
|
2
2
|
const i = () => {
|
|
3
3
|
const a = t(), s = c(), [e, o] = n(), r = u();
|
|
4
4
|
return { location: a, navigate: s, params: r, searchParams: e, setSearchParams: o };
|
|
@@ -6,4 +6,4 @@ const i = () => {
|
|
|
6
6
|
export {
|
|
7
7
|
i as u
|
|
8
8
|
};
|
|
9
|
-
//# sourceMappingURL=useExposedProps-
|
|
9
|
+
//# sourceMappingURL=useExposedProps-BLKFBylA.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExposedProps-
|
|
1
|
+
{"version":3,"file":"useExposedProps-BLKFBylA.js","sources":["../src/lib/util/useExposedProps.tsx"],"sourcesContent":["import {\n useLocation,\n useNavigate,\n useParams,\n useSearchParams,\n} from \"react-router\";\nimport type { ExposedComponentProps } from \"../components/SlotletProvider.js\";\n\nexport const useExposedProps = (): ExposedComponentProps => {\n const location = useLocation();\n const navigate = useNavigate();\n const [searchParams, setSearchParams] = useSearchParams();\n const params = useParams();\n\n return { location, navigate, params, searchParams, setSearchParams };\n};\n"],"names":["useExposedProps","location","useLocation","navigate","useNavigate","searchParams","setSearchParams","useSearchParams","params","useParams"],"mappings":";AAQO,MAAMA,IAAkB,MAA6B;AAC1D,QAAMC,IAAWC,EAAY,GACvBC,IAAWC,EAAY,GACvB,CAACC,GAAcC,CAAe,IAAIC,EAAgB,GAClDC,IAASC,EAAU;AAEzB,SAAO,EAAE,UAAAR,GAAU,UAAAE,GAAU,QAAAK,GAAQ,cAAAH,GAAc,iBAAAC,EAAgB;AACrE;"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import h, { useState as v, useEffect as w, useCallback as L } from "react";
|
|
2
|
+
import { u as A, L as O, e as D, N as g, b as E } from "./chunk-SYFQ2XB5-BPvC-soB.js";
|
|
3
|
+
import { u as m } from "./Markdown-B8o9Qz4q.js";
|
|
4
|
+
import { j as t } from "./jsx-runtime-Bdg6XQ1m.js";
|
|
5
|
+
import { c as V } from "./index-Djenk2Hj.js";
|
|
6
|
+
import { ChevronRightIcon as P, ExternalLinkIcon as _ } from "lucide-react";
|
|
7
|
+
import { i as z, j as I } from "./ZudokuContext-8jts0fF3.js";
|
|
8
|
+
import { c as i } from "./cn-qaFjX9_3.js";
|
|
9
|
+
import * as x from "@radix-ui/react-collapsible";
|
|
10
|
+
const p = {}, T = h.createContext(p);
|
|
11
|
+
function B(e) {
|
|
12
|
+
const n = h.useContext(T);
|
|
13
|
+
return h.useMemo(
|
|
14
|
+
function() {
|
|
15
|
+
return typeof e == "function" ? e(n) : { ...n, ...e };
|
|
16
|
+
},
|
|
17
|
+
[n, e]
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
function te(e) {
|
|
21
|
+
let n;
|
|
22
|
+
return e.disableParentContext ? n = typeof e.components == "function" ? e.components(p) : e.components || p : n = B(e.components), h.createElement(
|
|
23
|
+
T.Provider,
|
|
24
|
+
{ value: n },
|
|
25
|
+
e.children
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
const R = (e) => {
|
|
29
|
+
const n = A(), a = M(), s = typeof e.to == "string" ? e.to : e.to.hash, l = (r) => {
|
|
30
|
+
var c;
|
|
31
|
+
(c = e.onClick) == null || c.call(e, r), !(!(s != null && s.startsWith("#")) || s !== n.hash) && (r.preventDefault(), a(s));
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ t.jsx(O, { ...e, onClick: l });
|
|
34
|
+
}, W = {
|
|
35
|
+
green: "bg-green-400 dark:bg-green-800",
|
|
36
|
+
blue: "bg-sky-400 dark:bg-sky-800",
|
|
37
|
+
yellow: "bg-yellow-400 dark:bg-yellow-800",
|
|
38
|
+
red: "bg-red-400 dark:bg-red-800",
|
|
39
|
+
purple: "bg-purple-400 dark:bg-purple-600",
|
|
40
|
+
indigo: "bg-indigo-400 dark:bg-indigo-600",
|
|
41
|
+
gray: "bg-gray-400 dark:bg-gray-600"
|
|
42
|
+
}, F = {
|
|
43
|
+
green: "text-green-500 dark:text-green-600",
|
|
44
|
+
blue: "text-sky-400 dark:text-sky-600",
|
|
45
|
+
yellow: "text-yellow-400 dark:text-yellow-600",
|
|
46
|
+
red: "text-red-400 dark:text-red-600",
|
|
47
|
+
purple: "text-purple-400 dark:text-purple-600",
|
|
48
|
+
indigo: "text-indigo-400 dark:text-indigo-600",
|
|
49
|
+
gray: "text-gray-400 dark:text-gray-600"
|
|
50
|
+
}, b = ({
|
|
51
|
+
color: e,
|
|
52
|
+
label: n,
|
|
53
|
+
className: a,
|
|
54
|
+
invert: s
|
|
55
|
+
}) => /* @__PURE__ */ t.jsx(
|
|
56
|
+
"span",
|
|
57
|
+
{
|
|
58
|
+
className: i(
|
|
59
|
+
"mt-0.5 flex items-center duration-200 transition-opacity text-center uppercase font-mono text-[0.65rem] font-bold rounded text-background dark:text-zinc-50 h-4 px-1",
|
|
60
|
+
s ? F[e] : W[e],
|
|
61
|
+
a
|
|
62
|
+
),
|
|
63
|
+
children: n
|
|
64
|
+
}
|
|
65
|
+
), X = ({
|
|
66
|
+
category: e,
|
|
67
|
+
onRequestClose: n
|
|
68
|
+
}) => {
|
|
69
|
+
var N, y;
|
|
70
|
+
const a = z(e), [s, l] = v(!1), r = e.collapsible ?? !0, c = e.collapsed ?? !0, k = !!(!r || !c || a), [j, u] = v(k), f = D(((N = e.link) == null ? void 0 : N.id) ?? "");
|
|
71
|
+
w(() => {
|
|
72
|
+
a && u(!0);
|
|
73
|
+
}, [a]);
|
|
74
|
+
const C = r && /* @__PURE__ */ t.jsx(
|
|
75
|
+
"button",
|
|
76
|
+
{
|
|
77
|
+
type: "button",
|
|
78
|
+
onClick: (o) => {
|
|
79
|
+
o.preventDefault(), u((S) => !S), l(!0);
|
|
80
|
+
},
|
|
81
|
+
children: /* @__PURE__ */ t.jsx(
|
|
82
|
+
P,
|
|
83
|
+
{
|
|
84
|
+
size: 16,
|
|
85
|
+
className: i(
|
|
86
|
+
s && "transition",
|
|
87
|
+
"shrink-0 group-data-[state=open]:rotate-90"
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
return /* @__PURE__ */ t.jsxs(
|
|
94
|
+
x.Root,
|
|
95
|
+
{
|
|
96
|
+
className: "flex flex-col",
|
|
97
|
+
defaultOpen: k,
|
|
98
|
+
open: j,
|
|
99
|
+
onOpenChange: () => u(!0),
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ t.jsx(x.Trigger, { className: "group", asChild: !0, disabled: !r, children: /* @__PURE__ */ t.jsxs(
|
|
102
|
+
"div",
|
|
103
|
+
{
|
|
104
|
+
onClick: () => l(!0),
|
|
105
|
+
className: d({
|
|
106
|
+
isActive: !1,
|
|
107
|
+
className: [
|
|
108
|
+
"text-start font-medium",
|
|
109
|
+
r ? "cursor-pointer" : "cursor-default hover:bg-transparent"
|
|
110
|
+
]
|
|
111
|
+
}),
|
|
112
|
+
children: [
|
|
113
|
+
e.icon && /* @__PURE__ */ t.jsx(
|
|
114
|
+
e.icon,
|
|
115
|
+
{
|
|
116
|
+
size: 16,
|
|
117
|
+
className: i("align-[-0.125em] ", f && "text-primary")
|
|
118
|
+
}
|
|
119
|
+
),
|
|
120
|
+
((y = e.link) == null ? void 0 : y.type) === "doc" ? /* @__PURE__ */ t.jsx(
|
|
121
|
+
g,
|
|
122
|
+
{
|
|
123
|
+
to: I(e.link.id),
|
|
124
|
+
className: "flex-1",
|
|
125
|
+
onClick: () => {
|
|
126
|
+
f && !j && u(!0);
|
|
127
|
+
},
|
|
128
|
+
children: /* @__PURE__ */ t.jsxs(
|
|
129
|
+
"div",
|
|
130
|
+
{
|
|
131
|
+
className: i(
|
|
132
|
+
"flex items-center gap-2 justify-between w-full",
|
|
133
|
+
f ? "text-primary" : "text-foreground/80"
|
|
134
|
+
),
|
|
135
|
+
children: [
|
|
136
|
+
/* @__PURE__ */ t.jsx("div", { className: "truncate", children: e.label }),
|
|
137
|
+
C
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
) : /* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between w-full", children: [
|
|
143
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex gap-2 truncate w-full", children: e.label }),
|
|
144
|
+
C
|
|
145
|
+
] })
|
|
146
|
+
]
|
|
147
|
+
}
|
|
148
|
+
) }),
|
|
149
|
+
/* @__PURE__ */ t.jsx(
|
|
150
|
+
x.Content,
|
|
151
|
+
{
|
|
152
|
+
className: i(
|
|
153
|
+
// CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle
|
|
154
|
+
s && "CollapsibleContent",
|
|
155
|
+
"ms-6 my-1"
|
|
156
|
+
),
|
|
157
|
+
children: /* @__PURE__ */ t.jsx("ul", { className: "relative after:absolute after:-left-[--padding-nav-item] after:translate-x-[1.5px] after:top-0 after:bottom-0 after:w-px after:bg-border", children: e.items.map((o) => /* @__PURE__ */ t.jsx(
|
|
158
|
+
$,
|
|
159
|
+
{
|
|
160
|
+
onRequestClose: n,
|
|
161
|
+
item: o
|
|
162
|
+
},
|
|
163
|
+
("id" in o ? o.id : "") + ("href" in o ? o.href : "") + o.label
|
|
164
|
+
)) })
|
|
165
|
+
}
|
|
166
|
+
)
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}, d = V(
|
|
171
|
+
"flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent",
|
|
172
|
+
{
|
|
173
|
+
variants: {
|
|
174
|
+
isActive: {
|
|
175
|
+
true: "text-primary font-medium",
|
|
176
|
+
false: "text-foreground/80"
|
|
177
|
+
},
|
|
178
|
+
isMuted: {
|
|
179
|
+
true: "text-foreground/30",
|
|
180
|
+
false: ""
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
defaultVariants: {
|
|
184
|
+
isActive: !1
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
), H = "data-anchor", $ = ({
|
|
188
|
+
item: e,
|
|
189
|
+
onRequestClose: n
|
|
190
|
+
}) => {
|
|
191
|
+
var l, r;
|
|
192
|
+
const { activeAnchor: a } = m(), [s] = E();
|
|
193
|
+
switch (e.type) {
|
|
194
|
+
case "category":
|
|
195
|
+
return /* @__PURE__ */ t.jsx(X, { category: e, onRequestClose: n });
|
|
196
|
+
case "doc":
|
|
197
|
+
return /* @__PURE__ */ t.jsxs(
|
|
198
|
+
g,
|
|
199
|
+
{
|
|
200
|
+
className: ({ isActive: c }) => d({ isActive: c }),
|
|
201
|
+
to: I(e.id),
|
|
202
|
+
onClick: n,
|
|
203
|
+
children: [
|
|
204
|
+
e.icon && /* @__PURE__ */ t.jsx(e.icon, { size: 16, className: "align-[-0.125em]" }),
|
|
205
|
+
e.badge ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
206
|
+
/* @__PURE__ */ t.jsx("span", { className: "truncate flex-1", title: e.label, children: e.label }),
|
|
207
|
+
/* @__PURE__ */ t.jsx(b, { ...e.badge })
|
|
208
|
+
] }) : e.label
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
case "link":
|
|
213
|
+
return e.href.startsWith("#") ? /* @__PURE__ */ t.jsx(
|
|
214
|
+
R,
|
|
215
|
+
{
|
|
216
|
+
to: { hash: e.href, search: s.toString() },
|
|
217
|
+
[H]: e.href.slice(1),
|
|
218
|
+
className: d({
|
|
219
|
+
isActive: e.href.slice(1) === a,
|
|
220
|
+
className: ((l = e.badge) == null ? void 0 : l.placement) !== "start" && "justify-between"
|
|
221
|
+
}),
|
|
222
|
+
onClick: n,
|
|
223
|
+
children: e.badge ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
224
|
+
/* @__PURE__ */ t.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
225
|
+
/* @__PURE__ */ t.jsx(b, { ...e.badge })
|
|
226
|
+
] }) : /* @__PURE__ */ t.jsx("span", { className: "break-all", children: e.label })
|
|
227
|
+
}
|
|
228
|
+
) : e.href.startsWith("http") ? /* @__PURE__ */ t.jsxs(
|
|
229
|
+
"a",
|
|
230
|
+
{
|
|
231
|
+
className: d(),
|
|
232
|
+
href: e.href,
|
|
233
|
+
target: "_blank",
|
|
234
|
+
rel: "noopener noreferrer",
|
|
235
|
+
onClick: n,
|
|
236
|
+
children: [
|
|
237
|
+
/* @__PURE__ */ t.jsx("span", { className: "whitespace-normal", children: e.label }),
|
|
238
|
+
/* @__PURE__ */ t.jsx("span", { className: "whitespace-nowrap", children: /* @__PURE__ */ t.jsx(_, { className: "inline -translate-y-0.5", size: 12 }) })
|
|
239
|
+
]
|
|
240
|
+
}
|
|
241
|
+
) : /* @__PURE__ */ t.jsx(
|
|
242
|
+
g,
|
|
243
|
+
{
|
|
244
|
+
className: d({
|
|
245
|
+
className: ((r = e.badge) == null ? void 0 : r.placement) !== "start" && "justify-between"
|
|
246
|
+
}),
|
|
247
|
+
to: e.href,
|
|
248
|
+
children: e.badge ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
249
|
+
/* @__PURE__ */ t.jsx("span", { className: "truncate", title: e.label, children: e.label }),
|
|
250
|
+
/* @__PURE__ */ t.jsx(b, { ...e.badge })
|
|
251
|
+
] }) : /* @__PURE__ */ t.jsx("span", { className: "break-all", children: e.label })
|
|
252
|
+
}
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
}, U = (e, n = { block: "center" }) => {
|
|
256
|
+
if (!e) return;
|
|
257
|
+
const a = e.getBoundingClientRect();
|
|
258
|
+
a.top >= 0 && a.left >= 0 && a.bottom <= (window.innerHeight || document.documentElement.clientHeight) && a.right <= (window.innerWidth || document.documentElement.clientWidth) || e.scrollIntoView(n);
|
|
259
|
+
}, M = () => {
|
|
260
|
+
const { setActiveAnchor: e } = m();
|
|
261
|
+
return L(
|
|
262
|
+
(a) => {
|
|
263
|
+
const s = a.replace(/^#/, "").split("/").at(0), l = document.getElementById(decodeURIComponent(s)), r = document.querySelector(
|
|
264
|
+
`[${H}="${s}"]`
|
|
265
|
+
);
|
|
266
|
+
return l ? (l.scrollIntoView(), U(r), requestIdleCallback(() => e(s)), !0) : !1;
|
|
267
|
+
},
|
|
268
|
+
[e]
|
|
269
|
+
);
|
|
270
|
+
}, ne = () => {
|
|
271
|
+
const e = A(), { setActiveAnchor: n } = m(), a = M();
|
|
272
|
+
w(() => {
|
|
273
|
+
if (e.hash && !a(e.hash)) {
|
|
274
|
+
const s = new MutationObserver((l, r) => {
|
|
275
|
+
a(e.hash) && r.disconnect();
|
|
276
|
+
});
|
|
277
|
+
return s.observe(document.body, { childList: !0, subtree: !0 }), () => s.disconnect();
|
|
278
|
+
}
|
|
279
|
+
}, [e.hash, n]);
|
|
280
|
+
};
|
|
281
|
+
export {
|
|
282
|
+
R as A,
|
|
283
|
+
te as M,
|
|
284
|
+
$ as S,
|
|
285
|
+
ne as a,
|
|
286
|
+
B as u
|
|
287
|
+
};
|
|
288
|
+
//# sourceMappingURL=useScrollToAnchor-Bl6mz9_x.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useScrollToAnchor-Bl6mz9_x.js","sources":["../../../node_modules/.pnpm/@mdx-js+react@3.1.0_@types+react@19.0.7_react@19.0.0/node_modules/@mdx-js/react/lib/index.js","../src/lib/components/AnchorLink.tsx","../src/lib/components/navigation/SidebarBadge.tsx","../src/lib/components/navigation/SidebarCategory.tsx","../src/lib/components/navigation/SidebarItem.tsx","../src/lib/util/useScrollToAnchor.ts"],"sourcesContent":["/**\n * @import {MDXComponents} from 'mdx/types.js'\n * @import {Component, ReactElement, ReactNode} from 'react'\n */\n\n/**\n * @callback MergeComponents\n * Custom merge function.\n * @param {Readonly<MDXComponents>} currentComponents\n * Current components from the context.\n * @returns {MDXComponents}\n * Additional components.\n *\n * @typedef Props\n * Configuration for `MDXProvider`.\n * @property {ReactNode | null | undefined} [children]\n * Children (optional).\n * @property {Readonly<MDXComponents> | MergeComponents | null | undefined} [components]\n * Additional components to use or a function that creates them (optional).\n * @property {boolean | null | undefined} [disableParentContext=false]\n * Turn off outer component context (default: `false`).\n */\n\nimport React from 'react'\n\n/** @type {Readonly<MDXComponents>} */\nconst emptyComponents = {}\n\nconst MDXContext = React.createContext(emptyComponents)\n\n/**\n * Get current components from the MDX Context.\n *\n * @param {Readonly<MDXComponents> | MergeComponents | null | undefined} [components]\n * Additional components to use or a function that creates them (optional).\n * @returns {MDXComponents}\n * Current components.\n */\nexport function useMDXComponents(components) {\n const contextComponents = React.useContext(MDXContext)\n\n // Memoize to avoid unnecessary top-level context changes\n return React.useMemo(\n function () {\n // Custom merge via a function prop\n if (typeof components === 'function') {\n return components(contextComponents)\n }\n\n return {...contextComponents, ...components}\n },\n [contextComponents, components]\n )\n}\n\n/**\n * Provider for MDX context.\n *\n * @param {Readonly<Props>} properties\n * Properties.\n * @returns {ReactElement}\n * Element.\n * @satisfies {Component}\n */\nexport function MDXProvider(properties) {\n /** @type {Readonly<MDXComponents>} */\n let allComponents\n\n if (properties.disableParentContext) {\n allComponents =\n typeof properties.components === 'function'\n ? properties.components(emptyComponents)\n : properties.components || emptyComponents\n } else {\n allComponents = useMDXComponents(properties.components)\n }\n\n return React.createElement(\n MDXContext.Provider,\n {value: allComponents},\n properties.children\n )\n}\n","import React from \"react\";\nimport { Link, type LinkProps, useLocation } from \"react-router\";\nimport { useScrollToHash } from \"../util/useScrollToAnchor.js\";\n\n/**\n * Link that scrolls to anchor even if the hash is already set in the URL.\n */\nexport const AnchorLink = (props: LinkProps) => {\n const location = useLocation();\n const scrollToHash = useScrollToHash();\n const hash = typeof props.to === \"string\" ? props.to : props.to.hash;\n\n const handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {\n props.onClick?.(event);\n if (!hash?.startsWith(\"#\") || hash !== location.hash) return;\n\n event.preventDefault();\n scrollToHash(hash);\n };\n\n return <Link {...props} onClick={handleClick} />;\n};\n","import { cn } from \"../../util/cn.js\";\n\nexport const ColorMap = {\n green: \"bg-green-400 dark:bg-green-800\",\n blue: \"bg-sky-400 dark:bg-sky-800\",\n yellow: \"bg-yellow-400 dark:bg-yellow-800\",\n red: \"bg-red-400 dark:bg-red-800\",\n purple: \"bg-purple-400 dark:bg-purple-600\",\n indigo: \"bg-indigo-400 dark:bg-indigo-600\",\n gray: \"bg-gray-400 dark:bg-gray-600\",\n};\n\nexport const ColorMapInvert = {\n green: \"text-green-500 dark:text-green-600\",\n blue: \"text-sky-400 dark:text-sky-600\",\n yellow: \"text-yellow-400 dark:text-yellow-600\",\n red: \"text-red-400 dark:text-red-600\",\n purple: \"text-purple-400 dark:text-purple-600\",\n indigo: \"text-indigo-400 dark:text-indigo-600\",\n gray: \"text-gray-400 dark:text-gray-600\",\n};\n\nexport const SidebarBadge = ({\n color,\n label,\n className,\n invert,\n}: {\n color: keyof typeof ColorMap;\n label: string;\n className?: string;\n invert?: boolean;\n}) => {\n return (\n <span\n className={cn(\n \"mt-0.5 flex items-center duration-200 transition-opacity text-center uppercase font-mono text-[0.65rem] font-bold rounded text-background dark:text-zinc-50 h-4 px-1\",\n invert ? ColorMapInvert[color] : ColorMap[color],\n className,\n )}\n >\n {label}\n </span>\n );\n};\n","import * as Collapsible from \"@radix-ui/react-collapsible\";\nimport { ChevronRightIcon } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport { NavLink, useMatch } from \"react-router\";\nimport type { SidebarItemCategory } from \"../../../config/validators/SidebarSchema.js\";\nimport { cn } from \"../../util/cn.js\";\nimport { joinPath } from \"../../util/joinPath.js\";\nimport { navigationListItem, SidebarItem } from \"./SidebarItem.js\";\nimport { useIsCategoryOpen } from \"./utils.js\";\n\nexport const SidebarCategory = ({\n category,\n onRequestClose,\n}: {\n category: SidebarItemCategory;\n onRequestClose?: () => void;\n}) => {\n const isCategoryOpen = useIsCategoryOpen(category);\n const [hasInteracted, setHasInteracted] = useState(false);\n\n const isCollapsible = category.collapsible ?? true;\n const isCollapsed = category.collapsed ?? true;\n const isDefaultOpen = Boolean(\n !isCollapsible || !isCollapsed || isCategoryOpen,\n );\n const [open, setOpen] = useState(isDefaultOpen);\n const isActive = useMatch(category.link?.id ?? \"\");\n\n useEffect(() => {\n // this is triggered when an item from the sidebar is clicked\n // and the sidebar, enclosing this item, is not opened\n if (isCategoryOpen) {\n setOpen(true);\n }\n }, [isCategoryOpen]);\n\n const ToggleButton = isCollapsible && (\n <button\n type=\"button\"\n onClick={(e) => {\n e.preventDefault();\n setOpen((prev) => !prev);\n setHasInteracted(true);\n }}\n >\n <ChevronRightIcon\n size={16}\n className={cn(\n hasInteracted && \"transition\",\n \"shrink-0 group-data-[state=open]:rotate-90\",\n )}\n />\n </button>\n );\n\n return (\n <Collapsible.Root\n className=\"flex flex-col\"\n defaultOpen={isDefaultOpen}\n open={open}\n onOpenChange={() => setOpen(true)}\n >\n <Collapsible.Trigger className=\"group\" asChild disabled={!isCollapsible}>\n <div\n onClick={() => setHasInteracted(true)}\n className={navigationListItem({\n isActive: false,\n className: [\n \"text-start font-medium\",\n isCollapsible\n ? \"cursor-pointer\"\n : \"cursor-default hover:bg-transparent\",\n ],\n })}\n >\n {category.icon && (\n <category.icon\n size={16}\n className={cn(\"align-[-0.125em] \", isActive && \"text-primary\")}\n />\n )}\n {category.link?.type === \"doc\" ? (\n <NavLink\n to={joinPath(category.link.id)}\n className=\"flex-1\"\n onClick={() => {\n // if it is the current path and closed then open it because there's no path change to trigger the open\n if (isActive && !open) {\n setOpen(true);\n }\n }}\n >\n <div\n className={cn(\n \"flex items-center gap-2 justify-between w-full\",\n isActive ? \"text-primary\" : \"text-foreground/80\",\n )}\n >\n <div className=\"truncate\">{category.label}</div>\n {ToggleButton}\n </div>\n </NavLink>\n ) : (\n <div className=\"flex items-center justify-between w-full\">\n <div className=\"flex gap-2 truncate w-full\">{category.label}</div>\n {ToggleButton}\n </div>\n )}\n </div>\n </Collapsible.Trigger>\n <Collapsible.Content\n className={cn(\n // CollapsibleContent class is used to animate and it should only be applied when the user has triggered the toggle\n hasInteracted && \"CollapsibleContent\",\n \"ms-6 my-1\",\n )}\n >\n <ul className=\"relative after:absolute after:-left-[--padding-nav-item] after:translate-x-[1.5px] after:top-0 after:bottom-0 after:w-px after:bg-border\">\n {category.items.map((item) => (\n <SidebarItem\n key={\n (\"id\" in item ? item.id : \"\") +\n (\"href\" in item ? item.href : \"\") +\n item.label\n }\n onRequestClose={onRequestClose}\n item={item}\n />\n ))}\n </ul>\n </Collapsible.Content>\n </Collapsible.Root>\n );\n};\n","import { cva } from \"class-variance-authority\";\nimport { ExternalLinkIcon } from \"lucide-react\";\nimport { NavLink, useSearchParams } from \"react-router\";\n\nimport type { SidebarItem as SidebarItemType } from \"../../../config/validators/SidebarSchema.js\";\nimport { joinPath } from \"../../util/joinPath.js\";\nimport { AnchorLink } from \"../AnchorLink.js\";\nimport { useViewportAnchor } from \"../context/ViewportAnchorContext.js\";\nimport { SidebarBadge } from \"./SidebarBadge.js\";\nimport { SidebarCategory } from \"./SidebarCategory.js\";\n\nexport const navigationListItem = cva(\n \"flex items-center gap-2 px-[--padding-nav-item] py-1.5 rounded-lg hover:bg-accent\",\n {\n variants: {\n isActive: {\n true: \"text-primary font-medium\",\n false: \"text-foreground/80\",\n },\n isMuted: {\n true: \"text-foreground/30\",\n false: \"\",\n },\n },\n defaultVariants: {\n isActive: false,\n },\n },\n);\n\nexport const DATA_ANCHOR_ATTR = \"data-anchor\";\n\nexport const SidebarItem = ({\n item,\n onRequestClose,\n}: {\n item: SidebarItemType;\n onRequestClose?: () => void;\n}) => {\n const { activeAnchor } = useViewportAnchor();\n const [searchParams] = useSearchParams();\n\n switch (item.type) {\n case \"category\":\n return (\n <SidebarCategory category={item} onRequestClose={onRequestClose} />\n );\n case \"doc\":\n return (\n <NavLink\n className={({ isActive }) => navigationListItem({ isActive })}\n to={joinPath(item.id)}\n onClick={onRequestClose}\n >\n {item.icon && <item.icon size={16} className=\"align-[-0.125em]\" />}\n {item.badge ? (\n <>\n <span className=\"truncate flex-1\" title={item.label}>\n {item.label}\n </span>\n <SidebarBadge {...item.badge} />\n </>\n ) : (\n item.label\n )}\n </NavLink>\n );\n case \"link\":\n return item.href.startsWith(\"#\") ? (\n <AnchorLink\n to={{ hash: item.href, search: searchParams.toString() }}\n {...{ [DATA_ANCHOR_ATTR]: item.href.slice(1) }}\n className={navigationListItem({\n isActive: item.href.slice(1) === activeAnchor,\n className: item.badge?.placement !== \"start\" && \"justify-between\",\n })}\n onClick={onRequestClose}\n >\n {item.badge ? (\n <>\n <span className=\"truncate\" title={item.label}>\n {item.label}\n </span>\n <SidebarBadge {...item.badge} />\n </>\n ) : (\n <span className=\"break-all\">{item.label}</span>\n )}\n </AnchorLink>\n ) : !item.href.startsWith(\"http\") ? (\n <NavLink\n className={navigationListItem({\n className: item.badge?.placement !== \"start\" && \"justify-between\",\n })}\n to={item.href}\n >\n {item.badge ? (\n <>\n <span className=\"truncate\" title={item.label}>\n {item.label}\n </span>\n <SidebarBadge {...item.badge} />\n </>\n ) : (\n <span className=\"break-all\">{item.label}</span>\n )}\n </NavLink>\n ) : (\n <a\n className={navigationListItem()}\n href={item.href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n onClick={onRequestClose}\n >\n <span className=\"whitespace-normal\">{item.label}</span>\n {/* This prevents that the icon would be positioned in its own line if the text fills a line entirely */}\n <span className=\"whitespace-nowrap\">\n <ExternalLinkIcon className=\"inline -translate-y-0.5\" size={12} />\n </span>\n </a>\n );\n }\n};\n","import { useCallback, useEffect } from \"react\";\nimport { useLocation } from \"react-router\";\nimport { useViewportAnchor } from \"../components/context/ViewportAnchorContext.js\";\nimport { DATA_ANCHOR_ATTR } from \"../components/navigation/SidebarItem.js\";\n\nconst scrollIntoViewIfNeeded = (\n element: Element | null,\n options: ScrollIntoViewOptions = { block: \"center\" },\n) => {\n if (!element) return;\n\n const rect = element.getBoundingClientRect();\n const isInView =\n rect.top >= 0 &&\n rect.left >= 0 &&\n rect.bottom <=\n (window.innerHeight || document.documentElement.clientHeight) &&\n rect.right <= (window.innerWidth || document.documentElement.clientWidth);\n\n if (isInView) return;\n\n element.scrollIntoView(options);\n};\n\nexport const useScrollToHash = () => {\n const { setActiveAnchor } = useViewportAnchor();\n\n const scrollToHash = useCallback(\n (hash: string) => {\n const cleanHash = hash\n .replace(/^#/, \"\")\n // Operation list items might have subdivisions that the sidebar doesn't show.\n // The subdivisions are separated by a slash so we need to remove everything before the slash to get the sidebar correct item.\n .split(\"/\")\n .at(0)!;\n const element = document.getElementById(decodeURIComponent(cleanHash));\n const link = document.querySelector(\n `[${DATA_ANCHOR_ATTR}=\"${cleanHash}\"]`,\n );\n\n if (element) {\n element.scrollIntoView();\n scrollIntoViewIfNeeded(link);\n requestIdleCallback(() => setActiveAnchor(cleanHash));\n return true;\n }\n\n // Scroll didn't happen\n return false;\n },\n [setActiveAnchor],\n );\n\n return scrollToHash;\n};\n\nexport const useScrollToAnchor = () => {\n const location = useLocation();\n const { setActiveAnchor } = useViewportAnchor();\n const scrollToHash = useScrollToHash();\n\n useEffect(() => {\n if (!location.hash) return;\n\n if (!scrollToHash(location.hash)) {\n const observer = new MutationObserver((_, obs) => {\n if (!scrollToHash(location.hash)) return;\n obs.disconnect();\n });\n\n observer.observe(document.body, { childList: true, subtree: true });\n\n return () => observer.disconnect();\n }\n }, [location.hash, setActiveAnchor]);\n};\n"],"names":["emptyComponents","MDXContext","React","useMDXComponents","components","contextComponents","MDXProvider","properties","allComponents","AnchorLink","props","location","useLocation","scrollToHash","useScrollToHash","hash","handleClick","event","_a","jsx","Link","ColorMap","ColorMapInvert","SidebarBadge","color","label","className","invert","cn","SidebarCategory","category","onRequestClose","isCategoryOpen","useIsCategoryOpen","hasInteracted","setHasInteracted","useState","isCollapsible","isCollapsed","isDefaultOpen","open","setOpen","isActive","useMatch","useEffect","ToggleButton","e","prev","ChevronRightIcon","jsxs","Collapsible","navigationListItem","_b","NavLink","joinPath","item","SidebarItem","cva","DATA_ANCHOR_ATTR","activeAnchor","useViewportAnchor","searchParams","useSearchParams","Fragment","ExternalLinkIcon","scrollIntoViewIfNeeded","element","options","rect","setActiveAnchor","useCallback","cleanHash","link","useScrollToAnchor","observer","_","obs"],"mappings":";;;;;;;;;AA0BA,MAAMA,IAAkB,CAAA,GAElBC,IAAaC,EAAM,cAAcF,CAAe;AAU/C,SAASG,EAAiBC,GAAY;AAC3C,QAAMC,IAAoBH,EAAM,WAAWD,CAAU;AAGrD,SAAOC,EAAM;AAAA,IACX,WAAY;AAEV,aAAI,OAAOE,KAAe,aACjBA,EAAWC,CAAiB,IAG9B,EAAC,GAAGA,GAAmB,GAAGD,EAAU;AAAA,IAC5C;AAAA,IACD,CAACC,GAAmBD,CAAU;AAAA,EAClC;AACA;AAW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1BcU;AAAA,IACnB,CAACvD,MAAiB;AACV,YAAAwD,IAAYxD,EACf,QAAQ,MAAM,EAAE,EAGhB,MAAM,GAAG,EACT,GAAG,CAAC,GACDmD,IAAU,SAAS,eAAe,mBAAmBK,CAAS,CAAC,GAC/DC,IAAO,SAAS;AAAA,QACpB,IAAId,CAAgB,KAAKa,CAAS;AAAA,MACpC;AAEA,aAAIL,KACFA,EAAQ,eAAe,GACvBD,EAAuBO,CAAI,GACP,oBAAA,MAAMH,EAAgBE,CAAS,CAAC,GAC7C,MAIF;AAAA,IACT;AAAA,IACA,CAACF,CAAe;AAAA,EAClB;AAGF,GAEaI,KAAoB,MAAM;AACrC,QAAM9D,IAAWC,EAAY,GACvB,EAAE,iBAAAyD,EAAgB,IAAIT,EAAkB,GACxC/C,IAAeC,EAAgB;AAErC,EAAA8B,EAAU,MAAM;AACV,QAACjC,EAAS,QAEV,CAACE,EAAaF,EAAS,IAAI,GAAG;AAChC,YAAM+D,IAAW,IAAI,iBAAiB,CAACC,GAAGC,MAAQ;AAChD,QAAK/D,EAAaF,EAAS,IAAI,KAC/BiE,EAAI,WAAW;AAAA,MAAA,CAChB;AAEQ,aAAAF,EAAA,QAAQ,SAAS,MAAM,EAAE,WAAW,IAAM,SAAS,IAAM,GAE3D,MAAMA,EAAS,WAAW;AAAA,IAAA;AAAA,EAElC,GAAA,CAAC/D,EAAS,MAAM0D,CAAe,CAAC;AACrC;","x_google_ignoreList":[0]}
|
package/lib/zudoku.auth-auth0.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var c = (e, s, t) => s in e ?
|
|
1
|
+
var r = Object.defineProperty;
|
|
2
|
+
var c = (e, s, t) => s in e ? r(e, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[s] = t;
|
|
3
3
|
var n = (e, s, t) => c(e, typeof s != "symbol" ? s + "" : s, t);
|
|
4
4
|
import { u } from "./state-mM7uaXTW.js";
|
|
5
5
|
import { OpenIDAuthenticationProvider as d } from "./zudoku.auth-openid.js";
|
|
@@ -23,12 +23,10 @@ class h extends d {
|
|
|
23
23
|
profile: null,
|
|
24
24
|
providerData: null
|
|
25
25
|
});
|
|
26
|
-
const o = new URL(
|
|
27
|
-
window.location.origin + this.logoutRedirectUrlPath
|
|
28
|
-
);
|
|
26
|
+
const o = new URL(window.location.origin);
|
|
29
27
|
if (o.pathname = this.logoutRedirectUrlPath, t.end_session_endpoint) {
|
|
30
|
-
const
|
|
31
|
-
i &&
|
|
28
|
+
const a = new URL(t.end_session_endpoint);
|
|
29
|
+
i && a.searchParams.set("id_token_hint", i), a.searchParams.set(
|
|
32
30
|
"post_logout_redirect_uri",
|
|
33
31
|
o.toString()
|
|
34
32
|
);
|
|
@@ -39,8 +37,8 @@ class h extends d {
|
|
|
39
37
|
});
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
|
-
const
|
|
40
|
+
const _ = (e) => new h(e);
|
|
43
41
|
export {
|
|
44
|
-
|
|
42
|
+
_ as default
|
|
45
43
|
};
|
|
46
44
|
//# sourceMappingURL=zudoku.auth-auth0.js.map
|