@hanzo/docs-base-ui 16.5.0 → 16.7.5
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/README.md +3 -3
- package/css/aspen.css +39 -0
- package/css/black.css +39 -1
- package/css/catppuccin.css +49 -1
- package/css/dusk.css +47 -1
- package/css/emerald.css +39 -0
- package/css/generated/docs.css +490 -0
- package/css/generated/flux.css +429 -0
- package/css/generated/home.css +285 -0
- package/css/generated/notebook.css +526 -0
- package/css/generated/shared.css +1173 -0
- package/css/lib/base.css +214 -0
- package/css/lib/default-colors.css +51 -0
- package/css/lib/shiki.css +98 -0
- package/css/neutral.css +7 -1
- package/css/ocean.css +44 -1
- package/css/preset.css +9 -7
- package/css/purple.css +39 -1
- package/css/ruby.css +39 -0
- package/css/shadcn.css +36 -1
- package/css/solar.css +75 -1
- package/css/vitepress.css +65 -1
- package/dist/_virtual/_rolldown/runtime.js +13 -0
- package/dist/components/accordion.d.ts +2 -3
- package/dist/components/accordion.js +9 -13
- package/dist/components/banner.d.ts +3 -4
- package/dist/components/banner.js +5 -9
- package/dist/components/callout.d.ts +6 -7
- package/dist/components/callout.js +1 -4
- package/dist/components/card.d.ts +4 -5
- package/dist/components/card.js +2 -5
- package/dist/components/codeblock.d.ts +8 -9
- package/dist/components/codeblock.js +9 -13
- package/dist/components/codeblock.rsc.d.ts +21 -0
- package/dist/components/codeblock.rsc.js +22 -0
- package/dist/components/dialog/search-algolia.d.ts +7 -9
- package/dist/components/dialog/search-algolia.js +8 -12
- package/dist/components/dialog/search-default.d.ts +7 -9
- package/dist/components/dialog/search-default.js +8 -12
- package/dist/components/dialog/search-orama.d.ts +7 -9
- package/dist/components/dialog/search-orama.js +8 -12
- package/dist/components/dialog/search.d.ts +21 -21
- package/dist/components/dialog/search.js +137 -60
- package/dist/components/dynamic-codeblock.core.d.ts +35 -0
- package/dist/components/dynamic-codeblock.core.js +51 -0
- package/dist/components/dynamic-codeblock.d.ts +7 -29
- package/dist/components/dynamic-codeblock.js +11 -60
- package/dist/components/files.d.ts +1 -2
- package/dist/components/files.js +6 -10
- package/dist/components/github-info.d.ts +23 -10
- package/dist/components/github-info.js +34 -29
- package/dist/components/heading.d.ts +1 -2
- package/dist/components/heading.js +3 -6
- package/dist/components/image-zoom.d.ts +4 -5
- package/dist/components/image-zoom.js +2 -5
- package/dist/components/inline-toc.d.ts +3 -4
- package/dist/components/inline-toc.js +2 -6
- package/dist/components/sidebar/base.d.ts +29 -23
- package/dist/components/sidebar/base.js +16 -22
- package/dist/components/sidebar/link-item.d.ts +3 -4
- package/dist/components/sidebar/link-item.js +6 -3
- package/dist/components/sidebar/page-tree.d.ts +3 -4
- package/dist/components/sidebar/page-tree.js +56 -45
- package/dist/components/sidebar/tabs/dropdown.d.ts +6 -9
- package/dist/components/sidebar/tabs/dropdown.js +22 -29
- package/dist/components/sidebar/tabs/index.d.ts +3 -17
- package/dist/components/sidebar/tabs/index.js +0 -3
- package/dist/components/steps.d.ts +4 -5
- package/dist/components/steps.js +0 -3
- package/dist/components/tabs.d.ts +15 -11
- package/dist/components/tabs.js +15 -20
- package/dist/components/toc/clerk.d.ts +19 -1
- package/dist/components/toc/clerk.js +165 -10
- package/dist/components/toc/default.d.ts +19 -1
- package/dist/components/toc/default.js +45 -10
- package/dist/components/toc/index.d.ts +29 -1
- package/dist/components/toc/index.js +105 -10
- package/dist/components/type-table.d.ts +11 -6
- package/dist/components/type-table.js +28 -23
- package/dist/components/ui/accordion.d.ts +7 -8
- package/dist/components/ui/accordion.js +2 -6
- package/dist/components/ui/button.d.ts +1 -2
- package/dist/components/ui/button.js +0 -3
- package/dist/components/ui/collapsible.d.ts +6 -7
- package/dist/components/ui/collapsible.js +3 -7
- package/dist/components/ui/navigation-menu.d.ts +27 -13
- package/dist/components/ui/navigation-menu.js +53 -31
- package/dist/components/ui/popover.d.ts +11 -6
- package/dist/components/ui/popover.js +15 -19
- package/dist/components/ui/scroll-area.d.ts +17 -7
- package/dist/components/ui/scroll-area.js +27 -31
- package/dist/components/ui/tabs.d.ts +8 -9
- package/dist/components/ui/tabs.js +5 -9
- package/dist/contexts/i18n.d.ts +62 -1
- package/dist/contexts/i18n.js +53 -10
- package/dist/contexts/search.d.ts +71 -5
- package/dist/contexts/search.js +64 -10
- package/dist/contexts/tree.d.ts +21 -1
- package/dist/contexts/tree.js +36 -10
- package/dist/i18n.d.ts +21 -1
- package/dist/i18n.js +20 -3
- package/dist/layouts/docs/client.d.ts +30 -29
- package/dist/layouts/docs/client.js +76 -52
- package/dist/layouts/docs/index.d.ts +21 -35
- package/dist/layouts/docs/index.js +16 -172
- package/dist/layouts/docs/page/index.d.ts +75 -52
- package/dist/layouts/docs/page/index.js +76 -56
- package/dist/layouts/docs/page/slots/breadcrumb.d.ts +14 -0
- package/dist/layouts/docs/page/slots/breadcrumb.js +44 -0
- package/dist/layouts/docs/page/slots/container.d.ts +7 -0
- package/dist/layouts/docs/page/slots/container.js +17 -0
- package/dist/layouts/docs/page/slots/footer.d.ts +23 -0
- package/dist/layouts/docs/page/slots/footer.js +56 -0
- package/dist/layouts/docs/page/slots/toc.d.ts +55 -0
- package/dist/layouts/docs/page/slots/toc.js +166 -0
- package/dist/layouts/docs/slots/container.d.ts +7 -0
- package/dist/layouts/docs/slots/container.js +29 -0
- package/dist/layouts/docs/slots/header.d.ts +8 -0
- package/dist/layouts/docs/slots/header.js +38 -0
- package/dist/layouts/docs/slots/sidebar.d.ts +30 -0
- package/dist/layouts/docs/slots/sidebar.js +319 -0
- package/dist/layouts/flux/index.d.ts +74 -0
- package/dist/layouts/flux/index.js +146 -0
- package/dist/layouts/flux/page/index.d.ts +105 -0
- package/dist/layouts/flux/page/index.js +104 -0
- package/dist/layouts/flux/page/slots/breadcrumb.d.ts +14 -0
- package/dist/layouts/flux/page/slots/breadcrumb.js +44 -0
- package/dist/layouts/flux/page/slots/container.d.ts +7 -0
- package/dist/layouts/flux/page/slots/container.js +17 -0
- package/dist/layouts/flux/page/slots/footer.d.ts +23 -0
- package/dist/layouts/flux/page/slots/footer.js +56 -0
- package/dist/layouts/flux/page/slots/toc.d.ts +34 -0
- package/dist/layouts/flux/page/slots/toc.js +172 -0
- package/dist/layouts/flux/slots/container.d.ts +7 -0
- package/dist/layouts/flux/slots/container.js +13 -0
- package/dist/layouts/flux/slots/sidebar.d.ts +23 -0
- package/dist/layouts/flux/slots/sidebar.js +237 -0
- package/dist/layouts/flux/slots/tab-dropdown.d.ts +17 -0
- package/dist/layouts/flux/slots/tab-dropdown.js +85 -0
- package/dist/layouts/home/index.d.ts +25 -8
- package/dist/layouts/home/index.js +39 -19
- package/dist/layouts/home/navbar.d.ts +7 -16
- package/dist/layouts/home/navbar.js +12 -14
- package/dist/layouts/home/not-found.d.ts +9 -0
- package/dist/layouts/home/not-found.js +38 -0
- package/dist/layouts/home/slots/container.d.ts +7 -0
- package/dist/layouts/home/slots/container.js +13 -0
- package/dist/layouts/home/slots/header.d.ts +11 -0
- package/dist/layouts/home/slots/header.js +242 -0
- package/dist/layouts/notebook/client.d.ts +32 -44
- package/dist/layouts/notebook/client.js +58 -148
- package/dist/layouts/notebook/index.d.ts +26 -25
- package/dist/layouts/notebook/index.js +16 -213
- package/dist/layouts/notebook/page/index.d.ts +75 -52
- package/dist/layouts/notebook/page/index.js +76 -56
- package/dist/layouts/notebook/page/slots/breadcrumb.d.ts +14 -0
- package/dist/layouts/notebook/page/slots/breadcrumb.js +44 -0
- package/dist/layouts/notebook/page/slots/container.d.ts +7 -0
- package/dist/layouts/notebook/page/slots/container.js +17 -0
- package/dist/layouts/notebook/page/slots/footer.d.ts +23 -0
- package/dist/layouts/notebook/page/slots/footer.js +56 -0
- package/dist/layouts/notebook/page/slots/toc.d.ts +55 -0
- package/dist/layouts/notebook/page/slots/toc.js +165 -0
- package/dist/layouts/notebook/slots/container.d.ts +7 -0
- package/dist/layouts/notebook/slots/container.js +31 -0
- package/dist/layouts/notebook/slots/header.d.ts +8 -0
- package/dist/layouts/notebook/slots/header.js +194 -0
- package/dist/layouts/notebook/slots/sidebar.d.ts +40 -0
- package/dist/layouts/notebook/slots/sidebar.js +297 -0
- package/dist/layouts/shared/client.d.ts +45 -0
- package/dist/layouts/shared/client.js +84 -0
- package/dist/layouts/shared/index.d.ts +144 -35
- package/dist/layouts/shared/index.js +74 -15
- package/dist/layouts/shared/page-actions.d.ts +36 -0
- package/dist/layouts/shared/page-actions.js +190 -0
- package/dist/layouts/shared/slots/language-select.d.ts +10 -0
- package/dist/layouts/shared/{language-toggle.js → slots/language-select.js} +12 -16
- package/dist/layouts/shared/slots/search-trigger.d.ts +23 -0
- package/dist/layouts/shared/{search-toggle.js → slots/search-trigger.js} +12 -16
- package/dist/layouts/shared/slots/theme-switch.d.ts +14 -0
- package/dist/layouts/shared/{theme-toggle.js → slots/theme-switch.js} +11 -15
- package/dist/mdx.d.ts +23 -13
- package/dist/mdx.js +2 -6
- package/dist/mdx.server.d.ts +1 -3
- package/dist/mdx.server.js +0 -3
- package/dist/og/takumi.d.ts +21 -0
- package/dist/og/takumi.js +70 -0
- package/dist/og.d.ts +22 -1
- package/dist/og.js +70 -3
- package/dist/page.d.ts +6 -7
- package/dist/page.js +9 -14
- package/dist/provider/base.d.ts +5 -6
- package/dist/provider/base.js +5 -9
- package/dist/provider/next.d.ts +4 -5
- package/dist/provider/next.js +1 -5
- package/dist/provider/react-router.d.ts +4 -5
- package/dist/provider/react-router.js +1 -5
- package/dist/provider/tanstack.d.ts +4 -5
- package/dist/provider/tanstack.js +1 -5
- package/dist/provider/waku.d.ts +4 -5
- package/dist/provider/waku.js +1 -5
- package/dist/style.css +594 -192
- package/dist/tailwind/typography.d.ts +2 -0
- package/dist/tailwind/typography.js +2 -0
- package/dist/utils/cn.js +2 -0
- package/dist/utils/merge-refs.js +11 -0
- package/dist/utils/urls.js +15 -0
- package/dist/utils/use-copy-button.d.ts +6 -1
- package/dist/utils/use-copy-button.js +26 -3
- package/dist/utils/use-footer-items.d.ts +9 -1
- package/dist/utils/use-footer-items.js +24 -3
- package/dist/utils/use-is-scroll-top.d.ts +8 -1
- package/dist/utils/use-is-scroll-top.js +20 -3
- package/package.json +133 -81
- package/css/layouts/docs.css +0 -1
- package/css/layouts/home.css +0 -1
- package/css/layouts/notebook.css +0 -1
- package/dist/_virtual/rolldown_runtime.js +0 -36
- package/dist/components/accordion.d.ts.map +0 -1
- package/dist/components/accordion.js.map +0 -1
- package/dist/components/banner.d.ts.map +0 -1
- package/dist/components/banner.js.map +0 -1
- package/dist/components/callout.d.ts.map +0 -1
- package/dist/components/callout.js.map +0 -1
- package/dist/components/card.d.ts.map +0 -1
- package/dist/components/card.js.map +0 -1
- package/dist/components/codeblock.d.ts.map +0 -1
- package/dist/components/codeblock.js.map +0 -1
- package/dist/components/dialog/search-algolia.d.ts.map +0 -1
- package/dist/components/dialog/search-algolia.js.map +0 -1
- package/dist/components/dialog/search-default.d.ts.map +0 -1
- package/dist/components/dialog/search-default.js.map +0 -1
- package/dist/components/dialog/search-orama.d.ts.map +0 -1
- package/dist/components/dialog/search-orama.js.map +0 -1
- package/dist/components/dialog/search.d.ts.map +0 -1
- package/dist/components/dialog/search.js.map +0 -1
- package/dist/components/dynamic-codeblock.d.ts.map +0 -1
- package/dist/components/dynamic-codeblock.js.map +0 -1
- package/dist/components/files.d.ts.map +0 -1
- package/dist/components/files.js.map +0 -1
- package/dist/components/github-info.d.ts.map +0 -1
- package/dist/components/github-info.js.map +0 -1
- package/dist/components/heading.d.ts.map +0 -1
- package/dist/components/heading.js.map +0 -1
- package/dist/components/image-zoom-CtfZieBH.css +0 -80
- package/dist/components/image-zoom-CtfZieBH.css.map +0 -1
- package/dist/components/image-zoom.d.ts.map +0 -1
- package/dist/components/image-zoom.js.map +0 -1
- package/dist/components/image-zoom2.js +0 -1
- package/dist/components/inline-toc.d.ts.map +0 -1
- package/dist/components/inline-toc.js.map +0 -1
- package/dist/components/sidebar/base.d.ts.map +0 -1
- package/dist/components/sidebar/base.js.map +0 -1
- package/dist/components/sidebar/link-item.d.ts.map +0 -1
- package/dist/components/sidebar/link-item.js.map +0 -1
- package/dist/components/sidebar/page-tree.d.ts.map +0 -1
- package/dist/components/sidebar/page-tree.js.map +0 -1
- package/dist/components/sidebar/tabs/dropdown.d.ts.map +0 -1
- package/dist/components/sidebar/tabs/dropdown.js.map +0 -1
- package/dist/components/sidebar/tabs/index.d.ts.map +0 -1
- package/dist/components/sidebar/tabs/index.js.map +0 -1
- package/dist/components/steps.d.ts.map +0 -1
- package/dist/components/steps.js.map +0 -1
- package/dist/components/tabs.d.ts.map +0 -1
- package/dist/components/tabs.js.map +0 -1
- package/dist/components/toc/clerk.js.map +0 -1
- package/dist/components/toc/default.js.map +0 -1
- package/dist/components/toc/index.js.map +0 -1
- package/dist/components/type-table.d.ts.map +0 -1
- package/dist/components/type-table.js.map +0 -1
- package/dist/components/ui/accordion.d.ts.map +0 -1
- package/dist/components/ui/accordion.js.map +0 -1
- package/dist/components/ui/button.d.ts.map +0 -1
- package/dist/components/ui/button.js.map +0 -1
- package/dist/components/ui/collapsible.d.ts.map +0 -1
- package/dist/components/ui/collapsible.js.map +0 -1
- package/dist/components/ui/navigation-menu.d.ts.map +0 -1
- package/dist/components/ui/navigation-menu.js.map +0 -1
- package/dist/components/ui/popover.d.ts.map +0 -1
- package/dist/components/ui/popover.js.map +0 -1
- package/dist/components/ui/scroll-area.d.ts.map +0 -1
- package/dist/components/ui/scroll-area.js.map +0 -1
- package/dist/components/ui/tabs.d.ts.map +0 -1
- package/dist/components/ui/tabs.js.map +0 -1
- package/dist/contexts/i18n.js.map +0 -1
- package/dist/contexts/search.d.ts.map +0 -1
- package/dist/contexts/search.js.map +0 -1
- package/dist/contexts/tree.js.map +0 -1
- package/dist/layouts/docs/client.d.ts.map +0 -1
- package/dist/layouts/docs/client.js.map +0 -1
- package/dist/layouts/docs/index.d.ts.map +0 -1
- package/dist/layouts/docs/index.js.map +0 -1
- package/dist/layouts/docs/page/client.d.ts +0 -46
- package/dist/layouts/docs/page/client.d.ts.map +0 -1
- package/dist/layouts/docs/page/client.js +0 -227
- package/dist/layouts/docs/page/client.js.map +0 -1
- package/dist/layouts/docs/page/index.d.ts.map +0 -1
- package/dist/layouts/docs/page/index.js.map +0 -1
- package/dist/layouts/docs/sidebar.d.ts +0 -63
- package/dist/layouts/docs/sidebar.d.ts.map +0 -1
- package/dist/layouts/docs/sidebar.js +0 -162
- package/dist/layouts/docs/sidebar.js.map +0 -1
- package/dist/layouts/home/client.d.ts +0 -19
- package/dist/layouts/home/client.d.ts.map +0 -1
- package/dist/layouts/home/client.js +0 -285
- package/dist/layouts/home/client.js.map +0 -1
- package/dist/layouts/home/index.d.ts.map +0 -1
- package/dist/layouts/home/index.js.map +0 -1
- package/dist/layouts/home/navbar.d.ts.map +0 -1
- package/dist/layouts/home/navbar.js.map +0 -1
- package/dist/layouts/notebook/client.d.ts.map +0 -1
- package/dist/layouts/notebook/client.js.map +0 -1
- package/dist/layouts/notebook/index.d.ts.map +0 -1
- package/dist/layouts/notebook/index.js.map +0 -1
- package/dist/layouts/notebook/page/client.d.ts +0 -46
- package/dist/layouts/notebook/page/client.d.ts.map +0 -1
- package/dist/layouts/notebook/page/client.js +0 -227
- package/dist/layouts/notebook/page/client.js.map +0 -1
- package/dist/layouts/notebook/page/index.d.ts.map +0 -1
- package/dist/layouts/notebook/page/index.js.map +0 -1
- package/dist/layouts/notebook/sidebar.d.ts +0 -59
- package/dist/layouts/notebook/sidebar.d.ts.map +0 -1
- package/dist/layouts/notebook/sidebar.js +0 -133
- package/dist/layouts/notebook/sidebar.js.map +0 -1
- package/dist/layouts/shared/index.d.ts.map +0 -1
- package/dist/layouts/shared/index.js.map +0 -1
- package/dist/layouts/shared/language-toggle.d.ts +0 -10
- package/dist/layouts/shared/language-toggle.d.ts.map +0 -1
- package/dist/layouts/shared/language-toggle.js.map +0 -1
- package/dist/layouts/shared/search-toggle.d.ts +0 -23
- package/dist/layouts/shared/search-toggle.d.ts.map +0 -1
- package/dist/layouts/shared/search-toggle.js.map +0 -1
- package/dist/layouts/shared/theme-toggle.d.ts +0 -14
- package/dist/layouts/shared/theme-toggle.d.ts.map +0 -1
- package/dist/layouts/shared/theme-toggle.js.map +0 -1
- package/dist/mdx.d.ts.map +0 -1
- package/dist/mdx.js.map +0 -1
- package/dist/mdx.server.d.ts.map +0 -1
- package/dist/mdx.server.js.map +0 -1
- package/dist/page.d.ts.map +0 -1
- package/dist/page.js.map +0 -1
- package/dist/provider/base.d.ts.map +0 -1
- package/dist/provider/base.js.map +0 -1
- package/dist/provider/next.d.ts.map +0 -1
- package/dist/provider/next.js.map +0 -1
- package/dist/provider/react-router.d.ts.map +0 -1
- package/dist/provider/react-router.js.map +0 -1
- package/dist/provider/tanstack.d.ts.map +0 -1
- package/dist/provider/tanstack.js.map +0 -1
- package/dist/provider/waku.d.ts.map +0 -1
- package/dist/provider/waku.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __exportAll };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Accordion as Accordion$1, AccordionItem } from "./ui/accordion.js";
|
|
2
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/accordion.d.ts
|
|
6
6
|
declare function Accordions({
|
|
@@ -20,5 +20,4 @@ declare function Accordion({
|
|
|
20
20
|
value?: string;
|
|
21
21
|
}): react_jsx_runtime0.JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
|
-
export { Accordion, Accordions };
|
|
24
|
-
//# sourceMappingURL=accordion.d.ts.map
|
|
23
|
+
export { Accordion, Accordions };
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { useCopyButton } from "../utils/use-copy-button.js";
|
|
3
4
|
import { buttonVariants } from "./ui/button.js";
|
|
5
|
+
import { mergeRefs } from "../utils/merge-refs.js";
|
|
4
6
|
import { Accordion as Accordion$1, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger } from "./ui/accordion.js";
|
|
5
|
-
import { cn } from "@hanzo/docs-ui/cn";
|
|
6
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
-
import { Check, Link } from "lucide-react";
|
|
8
7
|
import { useEffect, useRef, useState } from "react";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Check, LinkIcon } from "lucide-react";
|
|
12
10
|
//#region src/components/accordion.tsx
|
|
13
11
|
function Accordions({ ref, className, defaultValue, ...props }) {
|
|
14
12
|
const rootRef = useRef(null);
|
|
@@ -20,8 +18,8 @@ function Accordions({ ref, className, defaultValue, ...props }) {
|
|
|
20
18
|
if (!element || id.length === 0) return;
|
|
21
19
|
const selected = document.getElementById(id);
|
|
22
20
|
if (!selected || !element.contains(selected)) return;
|
|
23
|
-
const value
|
|
24
|
-
if (value
|
|
21
|
+
const value = selected.getAttribute("data-accordion-value");
|
|
22
|
+
if (value) setValue((prev) => [value, ...prev]);
|
|
25
23
|
}, []);
|
|
26
24
|
return /* @__PURE__ */ jsx(Accordion$1, {
|
|
27
25
|
ref: composedRef,
|
|
@@ -62,10 +60,8 @@ function CopyButton({ id }) {
|
|
|
62
60
|
className: "text-fd-muted-foreground me-2"
|
|
63
61
|
})),
|
|
64
62
|
onClick,
|
|
65
|
-
children: checked ? /* @__PURE__ */ jsx(Check, { className: "size-3.5" }) : /* @__PURE__ */ jsx(
|
|
63
|
+
children: checked ? /* @__PURE__ */ jsx(Check, { className: "size-3.5" }) : /* @__PURE__ */ jsx(LinkIcon, { className: "size-3.5" })
|
|
66
64
|
});
|
|
67
65
|
}
|
|
68
|
-
|
|
69
66
|
//#endregion
|
|
70
67
|
export { Accordion, Accordions };
|
|
71
|
-
//# sourceMappingURL=accordion.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime84 from "react/jsx-runtime";
|
|
2
1
|
import { HTMLAttributes } from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/banner.d.ts
|
|
5
5
|
type BannerVariant = 'rainbow' | 'normal';
|
|
@@ -29,7 +29,6 @@ declare function Banner({
|
|
|
29
29
|
* @defaultValue true
|
|
30
30
|
*/
|
|
31
31
|
changeLayout?: boolean;
|
|
32
|
-
}):
|
|
32
|
+
}): react_jsx_runtime0.JSX.Element | null;
|
|
33
33
|
//#endregion
|
|
34
|
-
export { Banner };
|
|
35
|
-
//# sourceMappingURL=banner.d.ts.map
|
|
34
|
+
export { Banner };
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
3
|
import { buttonVariants } from "./ui/button.js";
|
|
4
|
-
import { cn } from "@hanzo/docs-ui/cn";
|
|
5
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { X } from "lucide-react";
|
|
7
4
|
import { useEffect, useState } from "react";
|
|
8
|
-
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { X } from "lucide-react";
|
|
9
7
|
//#region src/components/banner.tsx
|
|
10
8
|
function Banner({ id, variant = "normal", changeLayout = true, height = "3rem", rainbowColors = [
|
|
11
9
|
"rgba(0,149,255,0.56)",
|
|
@@ -49,7 +47,7 @@ function Banner({ id, variant = "normal", changeLayout = true, height = "3rem",
|
|
|
49
47
|
}
|
|
50
48
|
const maskImage = "linear-gradient(to bottom,white,transparent), radial-gradient(circle at top center, white, transparent)";
|
|
51
49
|
function flow({ colors }) {
|
|
52
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
50
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
53
51
|
className: "absolute inset-0 z-[-1]",
|
|
54
52
|
style: {
|
|
55
53
|
maskImage,
|
|
@@ -64,7 +62,5 @@ function flow({ colors }) {
|
|
|
64
62
|
to { background-position: 100% 0; }
|
|
65
63
|
}` })] });
|
|
66
64
|
}
|
|
67
|
-
|
|
68
65
|
//#endregion
|
|
69
66
|
export { Banner };
|
|
70
|
-
//# sourceMappingURL=banner.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as react_jsx_runtime11 from "react/jsx-runtime";
|
|
2
1
|
import { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/callout.d.ts
|
|
5
5
|
type CalloutType = 'info' | 'warn' | 'error' | 'success' | 'warning' | 'idea';
|
|
@@ -9,7 +9,7 @@ declare function Callout({
|
|
|
9
9
|
...props
|
|
10
10
|
}: {
|
|
11
11
|
title?: ReactNode;
|
|
12
|
-
} & Omit<CalloutContainerProps, 'title'>):
|
|
12
|
+
} & Omit<CalloutContainerProps, 'title'>): react_jsx_runtime0.JSX.Element;
|
|
13
13
|
interface CalloutContainerProps extends ComponentProps<'div'> {
|
|
14
14
|
/**
|
|
15
15
|
* @defaultValue info
|
|
@@ -27,17 +27,16 @@ declare function CalloutContainer({
|
|
|
27
27
|
className,
|
|
28
28
|
style,
|
|
29
29
|
...props
|
|
30
|
-
}: CalloutContainerProps):
|
|
30
|
+
}: CalloutContainerProps): react_jsx_runtime0.JSX.Element;
|
|
31
31
|
declare function CalloutTitle({
|
|
32
32
|
children,
|
|
33
33
|
className,
|
|
34
34
|
...props
|
|
35
|
-
}: ComponentProps<'p'>):
|
|
35
|
+
}: ComponentProps<'p'>): react_jsx_runtime0.JSX.Element;
|
|
36
36
|
declare function CalloutDescription({
|
|
37
37
|
children,
|
|
38
38
|
className,
|
|
39
39
|
...props
|
|
40
|
-
}: ComponentProps<'p'>):
|
|
40
|
+
}: ComponentProps<'p'>): react_jsx_runtime0.JSX.Element;
|
|
41
41
|
//#endregion
|
|
42
|
-
export { Callout, CalloutContainer, CalloutContainerProps, CalloutDescription, CalloutTitle, CalloutType };
|
|
43
|
-
//# sourceMappingURL=callout.d.ts.map
|
|
42
|
+
export { Callout, CalloutContainer, CalloutContainerProps, CalloutDescription, CalloutTitle, CalloutType };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { cn } from "
|
|
1
|
+
import { cn } from "../utils/cn.js";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { CircleCheck, CircleX, Info, Lightbulb, TriangleAlert } from "lucide-react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/callout.tsx
|
|
6
5
|
const iconClass = "size-5 -me-0.5 fill-(--callout-color) text-fd-card";
|
|
7
6
|
function Callout({ children, title, ...props }) {
|
|
@@ -57,7 +56,5 @@ function CalloutDescription({ children, className, ...props }) {
|
|
|
57
56
|
children
|
|
58
57
|
});
|
|
59
58
|
}
|
|
60
|
-
|
|
61
59
|
//#endregion
|
|
62
60
|
export { Callout, CalloutContainer, CalloutDescription, CalloutTitle };
|
|
63
|
-
//# sourceMappingURL=callout.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as react_jsx_runtime25 from "react/jsx-runtime";
|
|
2
1
|
import { HTMLAttributes, ReactNode } from "react";
|
|
2
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
|
|
4
4
|
//#region src/components/card.d.ts
|
|
5
|
-
declare function Cards(props: HTMLAttributes<HTMLDivElement>):
|
|
5
|
+
declare function Cards(props: HTMLAttributes<HTMLDivElement>): react_jsx_runtime0.JSX.Element;
|
|
6
6
|
type CardProps = Omit<HTMLAttributes<HTMLElement>, 'title'> & {
|
|
7
7
|
icon?: ReactNode;
|
|
8
8
|
title: ReactNode;
|
|
@@ -15,7 +15,6 @@ declare function Card({
|
|
|
15
15
|
title,
|
|
16
16
|
description,
|
|
17
17
|
...props
|
|
18
|
-
}: CardProps):
|
|
18
|
+
}: CardProps): react_jsx_runtime0.JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
|
-
export { Card, CardProps, Cards };
|
|
21
|
-
//# sourceMappingURL=card.d.ts.map
|
|
20
|
+
export { Card, CardProps, Cards };
|
package/dist/components/card.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { cn } from "@hanzo/docs-ui/cn";
|
|
1
|
+
import { cn } from "../utils/cn.js";
|
|
3
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
3
|
+
import Link from "@hanzo/docs-core/link";
|
|
5
4
|
//#region src/components/card.tsx
|
|
6
5
|
function Cards(props) {
|
|
7
6
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -35,7 +34,5 @@ function Card({ icon, title, description, ...props }) {
|
|
|
35
34
|
]
|
|
36
35
|
});
|
|
37
36
|
}
|
|
38
|
-
|
|
39
37
|
//#endregion
|
|
40
38
|
export { Card, Cards };
|
|
41
|
-
//# sourceMappingURL=card.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs.js";
|
|
2
|
-
import * as react_jsx_runtime38 from "react/jsx-runtime";
|
|
3
2
|
import { ComponentProps, HTMLAttributes, ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
4
|
|
|
5
5
|
//#region src/components/codeblock.d.ts
|
|
6
6
|
interface CodeBlockProps extends ComponentProps<'figure'> {
|
|
@@ -36,7 +36,7 @@ interface CodeBlockProps extends ComponentProps<'figure'> {
|
|
|
36
36
|
children?: ReactNode;
|
|
37
37
|
}) => ReactNode;
|
|
38
38
|
}
|
|
39
|
-
declare function Pre(props: ComponentProps<'pre'>):
|
|
39
|
+
declare function Pre(props: ComponentProps<'pre'>): react_jsx_runtime0.JSX.Element;
|
|
40
40
|
declare function CodeBlock({
|
|
41
41
|
ref,
|
|
42
42
|
title,
|
|
@@ -47,22 +47,21 @@ declare function CodeBlock({
|
|
|
47
47
|
children,
|
|
48
48
|
Actions,
|
|
49
49
|
...props
|
|
50
|
-
}: CodeBlockProps):
|
|
50
|
+
}: CodeBlockProps): react_jsx_runtime0.JSX.Element;
|
|
51
51
|
declare function CodeBlockTabs({
|
|
52
52
|
ref,
|
|
53
53
|
className,
|
|
54
54
|
...props
|
|
55
|
-
}: ComponentProps<typeof Tabs>):
|
|
55
|
+
}: ComponentProps<typeof Tabs>): react_jsx_runtime0.JSX.Element;
|
|
56
56
|
declare function CodeBlockTabsList({
|
|
57
57
|
className,
|
|
58
58
|
...props
|
|
59
|
-
}: ComponentProps<typeof TabsList>):
|
|
59
|
+
}: ComponentProps<typeof TabsList>): react_jsx_runtime0.JSX.Element;
|
|
60
60
|
declare function CodeBlockTabsTrigger({
|
|
61
61
|
children,
|
|
62
62
|
className,
|
|
63
63
|
...props
|
|
64
|
-
}: ComponentProps<typeof TabsTrigger>):
|
|
65
|
-
declare function CodeBlockTab(props: ComponentProps<typeof TabsContent>):
|
|
64
|
+
}: ComponentProps<typeof TabsTrigger>): react_jsx_runtime0.JSX.Element;
|
|
65
|
+
declare function CodeBlockTab(props: ComponentProps<typeof TabsContent>): react_jsx_runtime0.JSX.Element;
|
|
66
66
|
//#endregion
|
|
67
|
-
export { CodeBlock, CodeBlockProps, CodeBlockTab, CodeBlockTabs, CodeBlockTabsList, CodeBlockTabsTrigger, Pre };
|
|
68
|
-
//# sourceMappingURL=codeblock.d.ts.map
|
|
67
|
+
export { CodeBlock, CodeBlockProps, CodeBlockTab, CodeBlockTabs, CodeBlockTabsList, CodeBlockTabsTrigger, Pre };
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { useCopyButton } from "../utils/use-copy-button.js";
|
|
3
4
|
import { buttonVariants } from "./ui/button.js";
|
|
5
|
+
import { mergeRefs } from "../utils/merge-refs.js";
|
|
4
6
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs.js";
|
|
5
|
-
import {
|
|
7
|
+
import { createContext, use, useMemo, useRef } from "react";
|
|
6
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
9
|
import { Check, Clipboard } from "lucide-react";
|
|
8
|
-
import { createContext, use, useMemo, useRef } from "react";
|
|
9
|
-
import { useCopyButton } from "@hanzo/docs-ui/hooks/use-copy-button";
|
|
10
|
-
import { mergeRefs } from "@hanzo/docs-ui/merge-refs";
|
|
11
|
-
|
|
12
10
|
//#region src/components/codeblock.tsx
|
|
13
11
|
const TabsContext = createContext(null);
|
|
14
12
|
function Pre(props) {
|
|
@@ -18,9 +16,9 @@ function Pre(props) {
|
|
|
18
16
|
children: props.children
|
|
19
17
|
});
|
|
20
18
|
}
|
|
21
|
-
function CodeBlock({ ref, title, allowCopy = true, keepBackground = false, icon, viewportProps = {}, children, Actions = (props
|
|
22
|
-
...props
|
|
23
|
-
className: cn("empty:hidden", props
|
|
19
|
+
function CodeBlock({ ref, title, allowCopy = true, keepBackground = false, icon, viewportProps = {}, children, Actions = (props) => /* @__PURE__ */ jsx("div", {
|
|
20
|
+
...props,
|
|
21
|
+
className: cn("empty:hidden", props.className)
|
|
24
22
|
}), ...props }) {
|
|
25
23
|
const inTab = use(TabsContext) !== null;
|
|
26
24
|
const areaRef = useRef(null);
|
|
@@ -114,13 +112,11 @@ function CodeBlockTabsTrigger({ children, className, ...props }) {
|
|
|
114
112
|
return /* @__PURE__ */ jsxs(TabsTrigger, {
|
|
115
113
|
...props,
|
|
116
114
|
className: (s) => cn("relative group inline-flex text-sm font-medium text-nowrap items-center transition-colors gap-2 px-2 py-1.5 [&_svg]:size-3.5", s.active ? "text-fd-primary" : "hover:text-fd-accent-foreground", typeof className === "function" ? className(s) : className),
|
|
117
|
-
children: [/* @__PURE__ */ jsx("div", { className: "absolute inset-x-2 bottom-0 h-px group-data-
|
|
115
|
+
children: [/* @__PURE__ */ jsx("div", { className: "absolute inset-x-2 bottom-0 h-px group-data-active:bg-fd-primary" }), children]
|
|
118
116
|
});
|
|
119
117
|
}
|
|
120
118
|
function CodeBlockTab(props) {
|
|
121
119
|
return /* @__PURE__ */ jsx(TabsContent, { ...props });
|
|
122
120
|
}
|
|
123
|
-
|
|
124
121
|
//#endregion
|
|
125
122
|
export { CodeBlock, CodeBlockTab, CodeBlockTabs, CodeBlockTabsList, CodeBlockTabsTrigger, Pre };
|
|
126
|
-
//# sourceMappingURL=codeblock.js.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { CodeBlockProps } from "./codeblock.js";
|
|
2
|
+
import * as react from "react";
|
|
3
|
+
import { HighlightOptions } from "@hanzo/docs-core/highlight";
|
|
4
|
+
|
|
5
|
+
//#region src/components/codeblock.rsc.d.ts
|
|
6
|
+
type ServerCodeBlockProps = HighlightOptions & {
|
|
7
|
+
code: string;
|
|
8
|
+
/**
|
|
9
|
+
* Extra props for the underlying `<CodeBlock />` component.
|
|
10
|
+
*
|
|
11
|
+
* Ignored if you defined your own `pre` component in `components`.
|
|
12
|
+
*/
|
|
13
|
+
codeblock?: CodeBlockProps;
|
|
14
|
+
};
|
|
15
|
+
declare function ServerCodeBlock({
|
|
16
|
+
code,
|
|
17
|
+
codeblock,
|
|
18
|
+
...options
|
|
19
|
+
}: ServerCodeBlockProps): Promise<react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | (string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined)>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { ServerCodeBlock, ServerCodeBlockProps };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { cn } from "../utils/cn.js";
|
|
2
|
+
import { CodeBlock, Pre } from "./codeblock.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { highlight } from "@hanzo/docs-core/highlight";
|
|
5
|
+
//#region src/components/codeblock.rsc.tsx
|
|
6
|
+
async function ServerCodeBlock({ code, codeblock, ...options }) {
|
|
7
|
+
return await highlight(code, {
|
|
8
|
+
defaultColor: false,
|
|
9
|
+
...options,
|
|
10
|
+
components: {
|
|
11
|
+
pre: (props) => /* @__PURE__ */ jsx(CodeBlock, {
|
|
12
|
+
...props,
|
|
13
|
+
...codeblock,
|
|
14
|
+
className: cn("my-0", props.className, codeblock?.className),
|
|
15
|
+
children: /* @__PURE__ */ jsx(Pre, { children: props.children })
|
|
16
|
+
}),
|
|
17
|
+
...options.components
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { ServerCodeBlock };
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./search.js";
|
|
3
|
-
import * as react_jsx_runtime76 from "react/jsx-runtime";
|
|
1
|
+
import { SearchLink, SharedProps, TagItem } from "../../contexts/search.js";
|
|
4
2
|
import { ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
4
|
import { AlgoliaOptions } from "@hanzo/docs-core/search/client";
|
|
6
5
|
|
|
7
6
|
//#region src/components/dialog/search-algolia.d.ts
|
|
8
|
-
interface AlgoliaSearchDialogProps extends
|
|
7
|
+
interface AlgoliaSearchDialogProps extends SharedProps {
|
|
9
8
|
searchOptions: AlgoliaOptions;
|
|
10
|
-
links?:
|
|
9
|
+
links?: SearchLink[];
|
|
11
10
|
footer?: ReactNode;
|
|
12
11
|
defaultTag?: string;
|
|
13
|
-
tags?:
|
|
12
|
+
tags?: TagItem[];
|
|
14
13
|
/**
|
|
15
14
|
* Add the "Powered by Algolia" label, this is useful for free tier users
|
|
16
15
|
*
|
|
@@ -33,7 +32,6 @@ declare function AlgoliaSearchDialog({
|
|
|
33
32
|
links,
|
|
34
33
|
footer,
|
|
35
34
|
...props
|
|
36
|
-
}: AlgoliaSearchDialogProps):
|
|
35
|
+
}: AlgoliaSearchDialogProps): react_jsx_runtime0.JSX.Element;
|
|
37
36
|
//#endregion
|
|
38
|
-
export { AlgoliaSearchDialogProps, AlgoliaSearchDialog as default };
|
|
39
|
-
//# sourceMappingURL=search-algolia.d.ts.map
|
|
37
|
+
export { AlgoliaSearchDialogProps, AlgoliaSearchDialog as default };
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { i18n_exports } from "../../contexts/i18n.js";
|
|
1
|
+
"use client";
|
|
2
|
+
import { useI18n } from "../../contexts/i18n.js";
|
|
4
3
|
import { SearchDialog, SearchDialogClose, SearchDialogContent, SearchDialogFooter, SearchDialogHeader, SearchDialogIcon, SearchDialogInput, SearchDialogList, SearchDialogOverlay, TagsList, TagsListItem } from "./search.js";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
4
|
import { useMemo, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { useOnChange } from "@hanzo/docs-core/utils/use-on-change";
|
|
8
7
|
import { useDocsSearch } from "@hanzo/docs-core/search/client";
|
|
9
|
-
|
|
10
8
|
//#region src/components/dialog/search-algolia.tsx
|
|
11
9
|
function AlgoliaSearchDialog({ searchOptions, tags = [], defaultTag, showAlgolia = false, allowClear = false, links = [], footer, ...props }) {
|
|
12
10
|
const [tag, setTag] = useState(defaultTag);
|
|
13
|
-
const { locale } =
|
|
11
|
+
const { locale } = useI18n();
|
|
14
12
|
const { search, setSearch, query } = useDocsSearch({
|
|
15
13
|
type: "algolia",
|
|
16
14
|
tag,
|
|
@@ -46,10 +44,10 @@ function AlgoliaSearchDialog({ searchOptions, tags = [], defaultTag, showAlgolia
|
|
|
46
44
|
tag,
|
|
47
45
|
onTagChange: setTag,
|
|
48
46
|
allowClear,
|
|
49
|
-
children: [tags.map((tag
|
|
50
|
-
value: tag
|
|
51
|
-
children: tag
|
|
52
|
-
}, tag
|
|
47
|
+
children: [tags.map((tag) => /* @__PURE__ */ jsx(TagsListItem, {
|
|
48
|
+
value: tag.value,
|
|
49
|
+
children: tag.name
|
|
50
|
+
}, tag.value)), label]
|
|
53
51
|
}) : label, footer] })
|
|
54
52
|
]
|
|
55
53
|
});
|
|
@@ -62,7 +60,5 @@ function AlgoliaTitle() {
|
|
|
62
60
|
children: "Search powered by Algolia"
|
|
63
61
|
});
|
|
64
62
|
}
|
|
65
|
-
|
|
66
63
|
//#endregion
|
|
67
64
|
export { AlgoliaSearchDialog as default };
|
|
68
|
-
//# sourceMappingURL=search-algolia.js.map
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./search.js";
|
|
3
|
-
import * as react_jsx_runtime136 from "react/jsx-runtime";
|
|
1
|
+
import { SearchLink, SharedProps, TagItem } from "../../contexts/search.js";
|
|
4
2
|
import { ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
4
|
|
|
6
5
|
//#region src/components/dialog/search-default.d.ts
|
|
7
|
-
interface DefaultSearchDialogProps extends
|
|
8
|
-
links?:
|
|
6
|
+
interface DefaultSearchDialogProps extends SharedProps {
|
|
7
|
+
links?: SearchLink[];
|
|
9
8
|
/**
|
|
10
9
|
* @defaultValue 'fetch'
|
|
11
10
|
*/
|
|
12
11
|
type?: 'fetch' | 'static';
|
|
13
12
|
defaultTag?: string;
|
|
14
|
-
tags?:
|
|
13
|
+
tags?: TagItem[];
|
|
15
14
|
/**
|
|
16
15
|
* Search API URL
|
|
17
16
|
*/
|
|
@@ -38,7 +37,6 @@ declare function DefaultSearchDialog({
|
|
|
38
37
|
links,
|
|
39
38
|
footer,
|
|
40
39
|
...props
|
|
41
|
-
}: DefaultSearchDialogProps):
|
|
40
|
+
}: DefaultSearchDialogProps): react_jsx_runtime0.JSX.Element;
|
|
42
41
|
//#endregion
|
|
43
|
-
export { DefaultSearchDialogProps, DefaultSearchDialog as default };
|
|
44
|
-
//# sourceMappingURL=search-default.d.ts.map
|
|
42
|
+
export { DefaultSearchDialogProps, DefaultSearchDialog as default };
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { i18n_exports } from "../../contexts/i18n.js";
|
|
1
|
+
"use client";
|
|
2
|
+
import { useI18n } from "../../contexts/i18n.js";
|
|
4
3
|
import { SearchDialog, SearchDialogClose, SearchDialogContent, SearchDialogFooter, SearchDialogHeader, SearchDialogIcon, SearchDialogInput, SearchDialogList, SearchDialogOverlay, TagsList, TagsListItem } from "./search.js";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
4
|
import { useMemo, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { useOnChange } from "@hanzo/docs-core/utils/use-on-change";
|
|
8
7
|
import { useDocsSearch } from "@hanzo/docs-core/search/client";
|
|
9
|
-
|
|
10
8
|
//#region src/components/dialog/search-default.tsx
|
|
11
9
|
function DefaultSearchDialog({ defaultTag, tags = [], api, delayMs, type = "fetch", allowClear = false, links = [], footer, ...props }) {
|
|
12
|
-
const { locale } =
|
|
10
|
+
const { locale } = useI18n();
|
|
13
11
|
const [tag, setTag] = useState(defaultTag);
|
|
14
12
|
const { search, setSearch, query } = useDocsSearch(type === "fetch" ? {
|
|
15
13
|
type: "fetch",
|
|
@@ -52,15 +50,13 @@ function DefaultSearchDialog({ defaultTag, tags = [], api, delayMs, type = "fetc
|
|
|
52
50
|
tag,
|
|
53
51
|
onTagChange: setTag,
|
|
54
52
|
allowClear,
|
|
55
|
-
children: tags.map((tag
|
|
56
|
-
value: tag
|
|
57
|
-
children: tag
|
|
58
|
-
}, tag
|
|
53
|
+
children: tags.map((tag) => /* @__PURE__ */ jsx(TagsListItem, {
|
|
54
|
+
value: tag.value,
|
|
55
|
+
children: tag.name
|
|
56
|
+
}, tag.value))
|
|
59
57
|
}), footer] })
|
|
60
58
|
]
|
|
61
59
|
});
|
|
62
60
|
}
|
|
63
|
-
|
|
64
61
|
//#endregion
|
|
65
62
|
export { DefaultSearchDialog as default };
|
|
66
|
-
//# sourceMappingURL=search-default.js.map
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./search.js";
|
|
3
|
-
import * as react_jsx_runtime83 from "react/jsx-runtime";
|
|
1
|
+
import { SearchLink, SharedProps, TagItem } from "../../contexts/search.js";
|
|
4
2
|
import { ReactNode } from "react";
|
|
3
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
4
|
import { OramaCloudOptions } from "@hanzo/docs-core/search/client";
|
|
6
5
|
|
|
7
6
|
//#region src/components/dialog/search-orama.d.ts
|
|
8
|
-
interface OramaSearchDialogProps extends
|
|
9
|
-
links?:
|
|
7
|
+
interface OramaSearchDialogProps extends SharedProps {
|
|
8
|
+
links?: SearchLink[];
|
|
10
9
|
client: OramaCloudOptions['client'];
|
|
11
10
|
searchOptions?: OramaCloudOptions['params'];
|
|
12
11
|
index?: OramaCloudOptions['index'];
|
|
13
12
|
footer?: ReactNode;
|
|
14
13
|
defaultTag?: string;
|
|
15
|
-
tags?:
|
|
14
|
+
tags?: TagItem[];
|
|
16
15
|
/**
|
|
17
16
|
* Add the "Powered by Orama" label
|
|
18
17
|
*
|
|
@@ -40,7 +39,6 @@ declare function OramaSearchDialog({
|
|
|
40
39
|
footer,
|
|
41
40
|
links,
|
|
42
41
|
...props
|
|
43
|
-
}: OramaSearchDialogProps):
|
|
42
|
+
}: OramaSearchDialogProps): react_jsx_runtime0.JSX.Element;
|
|
44
43
|
//#endregion
|
|
45
|
-
export { OramaSearchDialogProps, OramaSearchDialog as default };
|
|
46
|
-
//# sourceMappingURL=search-orama.d.ts.map
|
|
44
|
+
export { OramaSearchDialogProps, OramaSearchDialog as default };
|
|
@@ -1,18 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { i18n_exports } from "../../contexts/i18n.js";
|
|
1
|
+
"use client";
|
|
2
|
+
import { useI18n } from "../../contexts/i18n.js";
|
|
4
3
|
import { SearchDialog, SearchDialogClose, SearchDialogContent, SearchDialogFooter, SearchDialogHeader, SearchDialogIcon, SearchDialogInput, SearchDialogList, SearchDialogOverlay, TagsList, TagsListItem } from "./search.js";
|
|
5
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
4
|
import { useMemo, useState } from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
6
|
import { useOnChange } from "@hanzo/docs-core/utils/use-on-change";
|
|
8
7
|
import { useDocsSearch } from "@hanzo/docs-core/search/client";
|
|
9
|
-
|
|
10
8
|
//#region src/components/dialog/search-orama.tsx
|
|
11
9
|
/**
|
|
12
10
|
* Orama Cloud integration
|
|
13
11
|
*/
|
|
14
12
|
function OramaSearchDialog({ client, searchOptions, tags = [], defaultTag, showOrama = true, allowClear = false, index, footer, links = [], ...props }) {
|
|
15
|
-
const { locale } =
|
|
13
|
+
const { locale } = useI18n();
|
|
16
14
|
const [tag, setTag] = useState(defaultTag);
|
|
17
15
|
const { search, setSearch, query } = useDocsSearch({
|
|
18
16
|
type: "orama-cloud",
|
|
@@ -51,10 +49,10 @@ function OramaSearchDialog({ client, searchOptions, tags = [], defaultTag, showO
|
|
|
51
49
|
tag,
|
|
52
50
|
onTagChange: setTag,
|
|
53
51
|
allowClear,
|
|
54
|
-
children: [tags.map((tag
|
|
55
|
-
value: tag
|
|
56
|
-
children: tag
|
|
57
|
-
}, tag
|
|
52
|
+
children: [tags.map((tag) => /* @__PURE__ */ jsx(TagsListItem, {
|
|
53
|
+
value: tag.value,
|
|
54
|
+
children: tag.name
|
|
55
|
+
}, tag.value)), label]
|
|
58
56
|
}) : label, footer] })
|
|
59
57
|
] })]
|
|
60
58
|
});
|
|
@@ -67,7 +65,5 @@ function Label() {
|
|
|
67
65
|
children: "Search powered by Orama"
|
|
68
66
|
});
|
|
69
67
|
}
|
|
70
|
-
|
|
71
68
|
//#endregion
|
|
72
69
|
export { OramaSearchDialog as default };
|
|
73
|
-
//# sourceMappingURL=search-orama.js.map
|