@fumadocs/base-ui 16.17.8 → 16.17.9
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/css/generated/flux.css +1 -1
- package/css/generated/glass.css +1 -1
- package/css/generated/shared.css +1 -1
- package/css/generated/spacious.css +1 -1
- package/dist/.translations/index.d.ts +1 -3
- package/dist/.translations/keys.js +1 -2
- package/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/components/accordion.d.ts +1 -3
- package/dist/components/accordion.js +1 -2
- package/dist/components/banner.d.ts +0 -2
- package/dist/components/banner.js +1 -2
- package/dist/components/callout.d.ts +1 -3
- package/dist/components/callout.js +1 -2
- package/dist/components/card.d.ts +1 -3
- package/dist/components/card.js +1 -2
- package/dist/components/codeblock.d.ts +1 -3
- package/dist/components/codeblock.js +1 -2
- package/dist/components/codeblock.rsc.d.ts +1 -3
- package/dist/components/codeblock.rsc.js +1 -2
- package/dist/components/dialog/search-algolia.d.ts +1 -3
- package/dist/components/dialog/search-algolia.js +1 -2
- package/dist/components/dialog/search-default.d.ts +1 -3
- package/dist/components/dialog/search-default.js +1 -2
- package/dist/components/dialog/search-orama.d.ts +1 -3
- package/dist/components/dialog/search-orama.js +1 -2
- package/dist/components/dialog/search.d.ts +0 -2
- package/dist/components/dialog/search.js +1 -2
- package/dist/components/dynamic-codeblock.core.d.ts +0 -2
- package/dist/components/dynamic-codeblock.core.js +1 -2
- package/dist/components/dynamic-codeblock.d.ts +1 -3
- package/dist/components/dynamic-codeblock.js +1 -2
- package/dist/components/files.d.ts +1 -3
- package/dist/components/files.js +1 -2
- package/dist/components/github-info.d.ts +1 -3
- package/dist/components/github-info.js +1 -2
- package/dist/components/heading.d.ts +0 -2
- package/dist/components/heading.js +1 -2
- package/dist/components/image-zoom.d.ts +1 -3
- package/dist/components/image-zoom.js +1 -2
- package/dist/components/inline-toc.d.ts +1 -3
- package/dist/components/inline-toc.js +1 -2
- package/dist/components/sidebar/base.d.ts +0 -1
- package/dist/components/sidebar/base.js +1 -2
- package/dist/components/sidebar/link-item.d.ts +0 -2
- package/dist/components/sidebar/link-item.js +1 -2
- package/dist/components/sidebar/page-tree.d.ts +0 -2
- package/dist/components/sidebar/page-tree.js +1 -2
- package/dist/components/sidebar/tabs/dropdown.d.ts +1 -3
- package/dist/components/sidebar/tabs/dropdown.js +1 -2
- package/dist/components/sidebar/tabs/index.d.ts +1 -3
- package/dist/components/sidebar/tabs/index.js +1 -2
- package/dist/components/steps.d.ts +1 -3
- package/dist/components/steps.js +1 -2
- package/dist/components/tabs.d.ts +1 -3
- package/dist/components/tabs.js +1 -2
- package/dist/components/toc/block.d.ts +1 -3
- package/dist/components/toc/block.js +6 -13
- package/dist/components/toc/clerk.d.ts +2 -4
- package/dist/components/toc/clerk.js +85 -120
- package/dist/components/toc/default.d.ts +2 -4
- package/dist/components/toc/default.js +112 -149
- package/dist/components/toc/index.d.ts +1 -3
- package/dist/components/toc/index.js +1 -2
- package/dist/components/type-table.d.ts +1 -3
- package/dist/components/type-table.js +1 -2
- package/dist/components/ui/accordion.d.ts +1 -3
- package/dist/components/ui/accordion.js +1 -2
- package/dist/components/ui/button.d.ts +1 -3
- package/dist/components/ui/button.js +1 -2
- package/dist/components/ui/collapsible.d.ts +1 -3
- package/dist/components/ui/collapsible.js +1 -2
- package/dist/components/ui/popover.d.ts +1 -3
- package/dist/components/ui/popover.js +1 -2
- package/dist/components/ui/tabs.d.ts +1 -3
- package/dist/components/ui/tabs.js +1 -2
- package/dist/contexts/i18n.d.ts +0 -2
- package/dist/contexts/i18n.js +1 -2
- package/dist/contexts/search.d.ts +0 -2
- package/dist/contexts/search.js +1 -2
- package/dist/contexts/tree.d.ts +0 -2
- package/dist/contexts/tree.js +1 -2
- package/dist/i18n.d.ts +0 -2
- package/dist/i18n.js +1 -2
- package/dist/layouts/docs/client.d.ts +0 -2
- package/dist/layouts/docs/client.js +1 -2
- package/dist/layouts/docs/index.d.ts +0 -2
- package/dist/layouts/docs/index.js +1 -2
- package/dist/layouts/docs/page/index.d.ts +0 -2
- package/dist/layouts/docs/page/index.js +1 -2
- package/dist/layouts/docs/page/slots/breadcrumb.d.ts +1 -3
- package/dist/layouts/docs/page/slots/breadcrumb.js +1 -2
- package/dist/layouts/docs/page/slots/container.d.ts +1 -3
- package/dist/layouts/docs/page/slots/container.js +1 -2
- package/dist/layouts/docs/page/slots/footer.d.ts +0 -2
- package/dist/layouts/docs/page/slots/footer.js +1 -2
- package/dist/layouts/docs/page/slots/toc.d.ts +1 -3
- package/dist/layouts/docs/page/slots/toc.js +1 -2
- package/dist/layouts/docs/slots/container.d.ts +1 -3
- package/dist/layouts/docs/slots/container.js +1 -2
- package/dist/layouts/docs/slots/header.d.ts +1 -3
- package/dist/layouts/docs/slots/header.js +1 -2
- package/dist/layouts/docs/slots/sidebar.d.ts +1 -3
- package/dist/layouts/docs/slots/sidebar.js +1 -2
- package/dist/layouts/flux/index.d.ts +0 -2
- package/dist/layouts/flux/index.js +1 -2
- package/dist/layouts/flux/page/index.d.ts +0 -2
- package/dist/layouts/flux/page/index.js +1 -2
- package/dist/layouts/flux/page/slots/breadcrumb.d.ts +1 -3
- package/dist/layouts/flux/page/slots/breadcrumb.js +1 -2
- package/dist/layouts/flux/page/slots/container.d.ts +1 -3
- package/dist/layouts/flux/page/slots/container.js +1 -2
- package/dist/layouts/flux/page/slots/footer.d.ts +0 -2
- package/dist/layouts/flux/page/slots/footer.js +1 -2
- package/dist/layouts/flux/page/slots/toc.d.ts +1 -3
- package/dist/layouts/flux/page/slots/toc.js +1 -2
- package/dist/layouts/flux/slots/container.d.ts +1 -3
- package/dist/layouts/flux/slots/container.js +1 -2
- package/dist/layouts/flux/slots/sidebar.d.ts +1 -3
- package/dist/layouts/flux/slots/sidebar.js +1 -2
- package/dist/layouts/flux/slots/tab-dropdown.d.ts +1 -3
- package/dist/layouts/flux/slots/tab-dropdown.js +1 -2
- package/dist/layouts/glass/index.d.ts +0 -2
- package/dist/layouts/glass/index.js +1 -2
- package/dist/layouts/glass/layout-tabs.js +1 -2
- package/dist/layouts/glass/page/index.d.ts +0 -2
- package/dist/layouts/glass/page/index.js +1 -2
- package/dist/layouts/glass/page/slots/breadcrumb.d.ts +1 -3
- package/dist/layouts/glass/page/slots/breadcrumb.js +1 -2
- package/dist/layouts/glass/page/slots/footer.d.ts +0 -2
- package/dist/layouts/glass/page/slots/footer.js +1 -2
- package/dist/layouts/glass/page/slots/toc.d.ts +1 -3
- package/dist/layouts/glass/page/slots/toc.js +1 -2
- package/dist/layouts/glass/slots/header.d.ts +1 -3
- package/dist/layouts/glass/slots/header.js +1 -2
- package/dist/layouts/glass/slots/sidebar.d.ts +1 -3
- package/dist/layouts/glass/slots/sidebar.js +1 -2
- package/dist/layouts/home/index.d.ts +0 -2
- package/dist/layouts/home/index.js +1 -2
- package/dist/layouts/home/navbar.d.ts +1 -3
- package/dist/layouts/home/navbar.js +1 -2
- package/dist/layouts/home/not-found.d.ts +1 -3
- package/dist/layouts/home/not-found.js +1 -2
- package/dist/layouts/home/slots/container.d.ts +1 -3
- package/dist/layouts/home/slots/container.js +1 -2
- package/dist/layouts/home/slots/header.d.ts +1 -3
- package/dist/layouts/home/slots/header.js +1 -2
- package/dist/layouts/notebook/client.d.ts +0 -2
- package/dist/layouts/notebook/client.js +1 -2
- package/dist/layouts/notebook/index.d.ts +0 -2
- package/dist/layouts/notebook/index.js +1 -2
- package/dist/layouts/notebook/page/index.d.ts +0 -2
- package/dist/layouts/notebook/page/index.js +1 -2
- package/dist/layouts/notebook/page/slots/breadcrumb.d.ts +1 -3
- package/dist/layouts/notebook/page/slots/breadcrumb.js +1 -2
- package/dist/layouts/notebook/page/slots/container.d.ts +1 -3
- package/dist/layouts/notebook/page/slots/container.js +1 -2
- package/dist/layouts/notebook/page/slots/footer.d.ts +0 -2
- package/dist/layouts/notebook/page/slots/footer.js +1 -2
- package/dist/layouts/notebook/page/slots/toc.d.ts +1 -3
- package/dist/layouts/notebook/page/slots/toc.js +1 -2
- package/dist/layouts/notebook/slots/container.d.ts +1 -3
- package/dist/layouts/notebook/slots/container.js +1 -2
- package/dist/layouts/notebook/slots/header.d.ts +1 -3
- package/dist/layouts/notebook/slots/header.js +1 -2
- package/dist/layouts/notebook/slots/sidebar.d.ts +0 -2
- package/dist/layouts/notebook/slots/sidebar.js +1 -2
- package/dist/layouts/shared/client.d.ts +1 -3
- package/dist/layouts/shared/client.js +1 -2
- package/dist/layouts/shared/index.d.ts +0 -2
- package/dist/layouts/shared/index.js +1 -2
- package/dist/layouts/shared/page-actions.d.ts +1 -3
- package/dist/layouts/shared/page-actions.js +1 -2
- package/dist/layouts/shared/slots/language-select.d.ts +1 -3
- package/dist/layouts/shared/slots/language-select.js +1 -2
- package/dist/layouts/shared/slots/search-trigger.d.ts +1 -3
- package/dist/layouts/shared/slots/search-trigger.js +1 -2
- package/dist/layouts/shared/slots/theme-switch.d.ts +1 -3
- package/dist/layouts/shared/slots/theme-switch.js +1 -2
- package/dist/layouts/spacious/index.d.ts +0 -2
- package/dist/layouts/spacious/index.js +1 -2
- package/dist/layouts/spacious/page/index.d.ts +0 -2
- package/dist/layouts/spacious/page/index.js +1 -2
- package/dist/layouts/spacious/page/slots/breadcrumb.d.ts +1 -3
- package/dist/layouts/spacious/page/slots/breadcrumb.js +1 -2
- package/dist/layouts/spacious/page/slots/footer.d.ts +0 -2
- package/dist/layouts/spacious/page/slots/footer.js +1 -2
- package/dist/layouts/spacious/page/slots/toc.d.ts +0 -2
- package/dist/layouts/spacious/page/slots/toc.js +1 -2
- package/dist/layouts/spacious/slots/actions.d.ts +1 -3
- package/dist/layouts/spacious/slots/actions.js +1 -2
- package/dist/layouts/spacious/slots/header.d.ts +1 -3
- package/dist/layouts/spacious/slots/header.js +1 -2
- package/dist/layouts/spacious/slots/sidebar.d.ts +1 -3
- package/dist/layouts/spacious/slots/sidebar.js +1 -2
- package/dist/mdx.d.ts +0 -2
- package/dist/mdx.js +1 -2
- package/dist/mdx.server.d.ts +0 -2
- package/dist/mdx.server.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/controlled.d.ts +0 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/controlled.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/uncontrolled.d.ts +1 -3
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/uncontrolled.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/adjust-svg-ids.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/compute-positioned-style.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/element-tests.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-div-img-style.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-img-alt.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-img-object-fit-style.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-img-regular-style.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-img-src.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-modal-img-transform.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-scale.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-style-ghost.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-style-modal-img.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-target-dimension.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/parse-position.js +1 -2
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/test-has-scalable-src.js +1 -2
- package/dist/og/takumi.d.ts +1 -3
- package/dist/og/takumi.js +1 -2
- package/dist/og.d.ts +0 -2
- package/dist/og.js +1 -2
- package/dist/page.d.ts +0 -2
- package/dist/page.js +1 -2
- package/dist/provider/astro.d.ts +1 -3
- package/dist/provider/astro.js +17 -2
- package/dist/provider/base.d.ts +0 -2
- package/dist/provider/base.js +1 -2
- package/dist/provider/next.d.ts +1 -3
- package/dist/provider/next.js +1 -2
- package/dist/provider/react-router.d.ts +1 -3
- package/dist/provider/react-router.js +1 -2
- package/dist/provider/tanstack.d.ts +1 -3
- package/dist/provider/tanstack.js +1 -2
- package/dist/provider/waku.d.ts +1 -3
- package/dist/provider/waku.js +1 -2
- package/dist/style.css +3 -6
- package/dist/utils/hotkey.js +1 -2
- package/dist/utils/merge-refs.js +1 -2
- package/dist/utils/urls.js +1 -2
- package/dist/utils/use-copy-button.d.ts +1 -3
- package/dist/utils/use-copy-button.js +1 -2
- package/dist/utils/use-footer-items.d.ts +1 -3
- package/dist/utils/use-footer-items.js +1 -2
- package/dist/utils/use-is-scroll-top.d.ts +1 -3
- package/dist/utils/use-is-scroll-top.js +1 -2
- package/package.json +4 -4
|
@@ -5,7 +5,7 @@ import { useI18n } from "../../../contexts/i18n.js";
|
|
|
5
5
|
import { Popover, PopoverContent, PopoverTrigger } from "../../../components/ui/popover.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { useTranslations } from "@fuma-translate/react";
|
|
8
|
-
|
|
8
|
+
// src/layouts/shared/slots/language-select.tsx
|
|
9
9
|
function LanguageSelect({ className, variant = "ghost", children, ...rest }) {
|
|
10
10
|
const context = useI18n();
|
|
11
11
|
const t = useTranslations({ note: "language switcher" });
|
|
@@ -39,5 +39,4 @@ function LanguageSelectText(props) {
|
|
|
39
39
|
children: text
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
//#endregion
|
|
43
42
|
export { LanguageSelect, LanguageSelectText };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ButtonProps } from "../../../components/ui/button.js";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
|
-
//#region src/layouts/shared/slots/search-trigger.d.ts
|
|
4
3
|
export interface SearchTriggerProps extends Omit<ComponentProps<'button'>, 'color'>, ButtonProps {
|
|
5
4
|
hideIfDisabled?: boolean;
|
|
6
5
|
}
|
|
@@ -8,5 +7,4 @@ export declare function SearchTrigger({ hideIfDisabled, size, color, variant, ..
|
|
|
8
7
|
export interface FullSearchTriggerProps extends ComponentProps<'button'> {
|
|
9
8
|
hideIfDisabled?: boolean;
|
|
10
9
|
}
|
|
11
|
-
export declare function FullSearchTrigger({ hideIfDisabled, ...props }: FullSearchTriggerProps): import("react").JSX.Element | null;
|
|
12
|
-
//#endregion
|
|
10
|
+
export declare function FullSearchTrigger({ hideIfDisabled, ...props }: FullSearchTriggerProps): import("react").JSX.Element | null;
|
|
@@ -6,7 +6,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
6
6
|
import { Search } from "lucide-react";
|
|
7
7
|
import { useTranslations } from "@fuma-translate/react";
|
|
8
8
|
import { Dialog } from "@base-ui/react/dialog";
|
|
9
|
-
|
|
9
|
+
// src/layouts/shared/slots/search-trigger.tsx
|
|
10
10
|
function SearchTrigger({ hideIfDisabled, size = "icon-sm", color, variant = color ?? "ghost", ...props }) {
|
|
11
11
|
const { enabled, dialogHandle } = useSearchContext();
|
|
12
12
|
const t = useTranslations({ note: "search trigger" });
|
|
@@ -46,5 +46,4 @@ function FullSearchTrigger({ hideIfDisabled, ...props }) {
|
|
|
46
46
|
]
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
//#endregion
|
|
50
49
|
export { FullSearchTrigger, SearchTrigger };
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
//#region src/layouts/shared/slots/theme-switch.d.ts
|
|
3
2
|
export interface ThemeSwitchProps extends ComponentProps<'div'> {
|
|
4
3
|
mode?: 'light-dark' | 'light-dark-system';
|
|
5
4
|
}
|
|
6
|
-
export declare function ThemeSwitch({ className, mode, ...props }: ThemeSwitchProps): import("react").JSX.Element;
|
|
7
|
-
//#endregion
|
|
5
|
+
export declare function ThemeSwitch({ className, mode, ...props }: ThemeSwitchProps): import("react").JSX.Element;
|
|
@@ -7,7 +7,7 @@ import { useSyncExternalStore } from "react";
|
|
|
7
7
|
import { useTranslations } from "@fuma-translate/react";
|
|
8
8
|
import { useTheme } from "next-themes";
|
|
9
9
|
import { flushSync } from "react-dom";
|
|
10
|
-
|
|
10
|
+
// src/layouts/shared/slots/theme-switch.tsx
|
|
11
11
|
const noop = () => () => {};
|
|
12
12
|
const itemVariants = cva("size-6.5 p-1.5 text-fd-muted-foreground", { variants: { active: {
|
|
13
13
|
true: "bg-fd-accent text-fd-accent-foreground",
|
|
@@ -84,5 +84,4 @@ function ThemeSwitch({ className, mode = "light-dark", ...props }) {
|
|
|
84
84
|
]
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
//#endregion
|
|
88
87
|
export { ThemeSwitch };
|
|
@@ -3,7 +3,6 @@ import { AIChatOptions, BaseLayoutProps, GetLayoutTabsOptions, LayoutTab, LinkIt
|
|
|
3
3
|
import { SidebarProps, SidebarProviderProps } from "./slots/sidebar.js";
|
|
4
4
|
import { ComponentProps, FC } from "react";
|
|
5
5
|
import * as PageTree from "fumadocs-core/page-tree";
|
|
6
|
-
//#region src/layouts/spacious/index.d.ts
|
|
7
6
|
export interface DocsSlots extends BaseSlots {
|
|
8
7
|
header: FC<ComponentProps<'header'>>;
|
|
9
8
|
/**
|
|
@@ -34,5 +33,4 @@ export declare function useSpaciousLayout(): {
|
|
|
34
33
|
slots: DocsSlots;
|
|
35
34
|
};
|
|
36
35
|
export declare function DocsLayout(props: DocsLayoutProps): import("react").JSX.Element;
|
|
37
|
-
//#endregion
|
|
38
36
|
export {};
|
|
@@ -8,7 +8,7 @@ import { Header } from "./slots/header.js";
|
|
|
8
8
|
import { HeaderActions } from "./slots/actions.js";
|
|
9
9
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
import { createContext, use, useMemo } from "react";
|
|
11
|
-
|
|
11
|
+
// src/layouts/spacious/index.tsx
|
|
12
12
|
const LayoutContext = createContext(null);
|
|
13
13
|
function useSpaciousLayout() {
|
|
14
14
|
const context = use(LayoutContext);
|
|
@@ -76,5 +76,4 @@ function DocsLayout(props) {
|
|
|
76
76
|
})
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
-
//#endregion
|
|
80
79
|
export { DocsLayout, useSpaciousLayout };
|
|
@@ -4,7 +4,6 @@ import { Footer, FooterProps } from "./slots/footer.js";
|
|
|
4
4
|
import { Breadcrumb, BreadcrumbProps } from "./slots/breadcrumb.js";
|
|
5
5
|
import { ComponentProps, FC } from "react";
|
|
6
6
|
import { TOCItemType } from "fumadocs-core/toc";
|
|
7
|
-
//#region src/layouts/spacious/page/index.d.ts
|
|
8
7
|
interface DocsPageSlots {
|
|
9
8
|
toc: {
|
|
10
9
|
provider: FC<TOCProviderProps>;
|
|
@@ -52,5 +51,4 @@ export declare function DocsTitle({ className, ...props }: ComponentProps<'h1'>)
|
|
|
52
51
|
export declare function PageLastUpdate({ date: value, ...props }: Omit<ComponentProps<'p'>, 'children'> & {
|
|
53
52
|
date: Date;
|
|
54
53
|
}): import("react").JSX.Element;
|
|
55
|
-
//#endregion
|
|
56
54
|
export { type BreadcrumbProps, type FooterProps, MarkdownCopyButton, Breadcrumb as PageBreadcrumb, Footer as PageFooter, ViewOptionsPopover };
|
|
@@ -12,7 +12,7 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
|
12
12
|
import { EditIcon, SidebarIcon } from "lucide-react";
|
|
13
13
|
import { createContext, use, useSyncExternalStore } from "react";
|
|
14
14
|
import { useTranslations } from "@fuma-translate/react";
|
|
15
|
-
|
|
15
|
+
// src/layouts/spacious/page/index.tsx
|
|
16
16
|
const PageContext = createContext(null);
|
|
17
17
|
function useDocsPage() {
|
|
18
18
|
const context = use(PageContext);
|
|
@@ -145,5 +145,4 @@ function PageLastUpdate({ date: value, ...props }) {
|
|
|
145
145
|
]
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
//#endregion
|
|
149
148
|
export { DocsBody, DocsDescription, DocsPage, DocsTitle, EditOnGitHub, MarkdownCopyButton, Breadcrumb as PageBreadcrumb, Footer as PageFooter, PageLastUpdate, ViewOptionsPopover, useDocsPage };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
import { BreadcrumbOptions } from "fumadocs-core/breadcrumb";
|
|
3
|
-
//#region src/layouts/spacious/page/slots/breadcrumb.d.ts
|
|
4
3
|
export type BreadcrumbProps = BreadcrumbOptions & ComponentProps<'nav'>;
|
|
5
4
|
export declare function useBreadcrumbItems({ includeRoot, includeSeparator, includePage }?: BreadcrumbOptions): import("fumadocs-core/breadcrumb").BreadcrumbItem[];
|
|
6
5
|
/**
|
|
7
6
|
* The folders of current page
|
|
8
7
|
*/
|
|
9
|
-
export declare function Breadcrumb({ includeRoot, includeSeparator, includePage, className, ...props }: BreadcrumbProps): import("react").JSX.Element | undefined;
|
|
10
|
-
//#endregion
|
|
8
|
+
export declare function Breadcrumb({ includeRoot, includeSeparator, includePage, className, ...props }: BreadcrumbProps): import("react").JSX.Element | undefined;
|
|
@@ -5,7 +5,7 @@ import Link from "fumadocs-core/link";
|
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Fragment as Fragment$1, useMemo } from "react";
|
|
7
7
|
import { getBreadcrumbItemsFromPath } from "fumadocs-core/breadcrumb";
|
|
8
|
-
|
|
8
|
+
// src/layouts/spacious/page/slots/breadcrumb.tsx
|
|
9
9
|
function useBreadcrumbItems({ includeRoot, includeSeparator, includePage } = {}) {
|
|
10
10
|
const path = useTreePath();
|
|
11
11
|
const { root } = useTreeContext();
|
|
@@ -47,5 +47,4 @@ function Breadcrumb({ includeRoot, includeSeparator, includePage, className, ...
|
|
|
47
47
|
})] }, i))
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
|
-
//#endregion
|
|
51
50
|
export { Breadcrumb, useBreadcrumbItems };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
import * as PageTree from "fumadocs-core/page-tree";
|
|
3
|
-
//#region src/layouts/spacious/page/slots/footer.d.ts
|
|
4
3
|
type Item = Pick<PageTree.Item, 'name' | 'description' | 'url'>;
|
|
5
4
|
export interface FooterProps extends ComponentProps<'nav'> {
|
|
6
5
|
/**
|
|
@@ -12,5 +11,4 @@ export interface FooterProps extends ComponentProps<'nav'> {
|
|
|
12
11
|
};
|
|
13
12
|
}
|
|
14
13
|
export declare function Footer({ items, className, ...props }: FooterProps): import("react").JSX.Element | undefined;
|
|
15
|
-
//#endregion
|
|
16
14
|
export {};
|
|
@@ -8,7 +8,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
8
8
|
import { ArrowLeftIcon, ArrowRightIcon } from "lucide-react";
|
|
9
9
|
import { useMemo } from "react";
|
|
10
10
|
import { useTranslations } from "@fuma-translate/react";
|
|
11
|
-
|
|
11
|
+
// src/layouts/spacious/page/slots/footer.tsx
|
|
12
12
|
function Footer({ items, className, ...props }) {
|
|
13
13
|
const footerList = useFooterItems();
|
|
14
14
|
const pathname = usePathname();
|
|
@@ -57,5 +57,4 @@ function FooterItem({ item, next }) {
|
|
|
57
57
|
})]
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
|
-
//#endregion
|
|
61
60
|
export { Footer };
|
|
@@ -3,7 +3,6 @@ import { TOCItemsProps as TOCItemsProps$1 } from "../../../../components/toc/blo
|
|
|
3
3
|
import { TOCItemsProps as TOCItemsProps$2 } from "../../../../components/toc/clerk.js";
|
|
4
4
|
import { TOCProviderProps as TOCProviderProps$1 } from "../../../../components/toc/index.js";
|
|
5
5
|
import { ComponentProps, ReactNode } from "react";
|
|
6
|
-
//#region src/layouts/spacious/page/slots/toc.d.ts
|
|
7
6
|
export type TOCProviderProps = TOCProviderProps$1;
|
|
8
7
|
export declare function TOCProvider(props: TOCProviderProps): import("react").JSX.Element;
|
|
9
8
|
type TOCStyle = {
|
|
@@ -41,5 +40,4 @@ export type TOCPopoverProps = TOCDropdownProps & {
|
|
|
41
40
|
export declare function TOCPopover({ container, trigger, content, header, footer, ...props }: TOCPopoverProps): import("react").JSX.Element;
|
|
42
41
|
/** the TOC dropdown for page header */
|
|
43
42
|
export declare function TOCDropdown({ trigger, content, header, footer, ...props }: TOCDropdownProps): import("react").JSX.Element;
|
|
44
|
-
//#endregion
|
|
45
43
|
export {};
|
|
@@ -13,7 +13,7 @@ import { useEffect, useRef, useState } from "react";
|
|
|
13
13
|
import { useTranslations } from "@fuma-translate/react";
|
|
14
14
|
import { useTOCSelector } from "fumadocs-core/toc";
|
|
15
15
|
import { Popover } from "@base-ui/react/popover";
|
|
16
|
-
|
|
16
|
+
// src/layouts/spacious/page/slots/toc.tsx
|
|
17
17
|
const variants = {
|
|
18
18
|
normal: default_exports,
|
|
19
19
|
clerk: clerk_exports,
|
|
@@ -204,5 +204,4 @@ function TOCProgress({ size = 16, ...props }) {
|
|
|
204
204
|
})]
|
|
205
205
|
});
|
|
206
206
|
}
|
|
207
|
-
//#endregion
|
|
208
207
|
export { TOC, TOCDropdown, TOCPopover, TOCProvider };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
//#region src/layouts/spacious/slots/actions.d.ts
|
|
3
2
|
/** AI chat, language switcher and icon links move into the options menu on smaller viewports */
|
|
4
|
-
export declare function HeaderActions({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
5
|
-
//#endregion
|
|
3
|
+
export declare function HeaderActions({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
|
|
@@ -11,7 +11,7 @@ import { useTranslations } from "@fuma-translate/react";
|
|
|
11
11
|
import { useTheme } from "next-themes";
|
|
12
12
|
import { flushSync } from "react-dom";
|
|
13
13
|
import { Menu } from "@base-ui/react/menu";
|
|
14
|
-
|
|
14
|
+
// src/layouts/spacious/slots/actions.tsx
|
|
15
15
|
const popupClass = "flex flex-col max-h-(--available-height) overflow-y-auto rounded-2xl border bg-fd-popover text-sm text-fd-popover-foreground shadow-lg outline-none origin-(--transform-origin) transition-[opacity,scale] duration-150 ease-[cubic-bezier(0.22,1,0.36,1)] data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-97 data-ending-style:duration-100 motion-reduce:transition-none";
|
|
16
16
|
const itemClass = "flex w-full min-h-9 items-center gap-3 rounded-lg px-2.5 py-1.5 text-start outline-none transition-colors duration-100 data-highlighted:bg-fd-accent data-highlighted:text-fd-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0";
|
|
17
17
|
function IconLinks({ className }) {
|
|
@@ -219,5 +219,4 @@ function ThemeSegments() {
|
|
|
219
219
|
}, key))]
|
|
220
220
|
});
|
|
221
221
|
}
|
|
222
|
-
//#endregion
|
|
223
222
|
export { HeaderActions };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
//#region src/layouts/spacious/slots/header.d.ts
|
|
3
2
|
/** the mobile navbar */
|
|
4
|
-
export declare function Header({ className, ...props }: ComponentProps<'header'>): import("react").JSX.Element;
|
|
5
|
-
//#endregion
|
|
3
|
+
export declare function Header({ className, ...props }: ComponentProps<'header'>): import("react").JSX.Element;
|
|
@@ -5,7 +5,7 @@ import { SidebarTrigger } from "../../../components/sidebar/base.js";
|
|
|
5
5
|
import { useSpaciousLayout } from "../index.js";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { SidebarIcon } from "lucide-react";
|
|
8
|
-
|
|
8
|
+
// src/layouts/spacious/slots/header.tsx
|
|
9
9
|
/** the mobile navbar */
|
|
10
10
|
function Header({ className, ...props }) {
|
|
11
11
|
const { slots } = useSpaciousLayout();
|
|
@@ -30,5 +30,4 @@ function Header({ className, ...props }) {
|
|
|
30
30
|
]
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
//#endregion
|
|
34
33
|
export { Header };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { SidebarProviderProps as SidebarProviderProps$1 } from "../../../components/sidebar/base.js";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
|
-
//#region src/layouts/spacious/slots/sidebar.d.ts
|
|
4
3
|
export type SidebarProviderProps = Omit<SidebarProviderProps$1, 'collapsible'>;
|
|
5
4
|
export type SidebarProps = ComponentProps<'aside'>;
|
|
6
5
|
export declare function SidebarProvider(props: SidebarProviderProps): import("react").JSX.Element;
|
|
7
6
|
export declare function Sidebar({ className, ...props }: SidebarProps): import("react").JSX.Element | undefined;
|
|
8
|
-
export declare function SidebarDrawer(): import("react").JSX.Element;
|
|
9
|
-
//#endregion
|
|
7
|
+
export declare function SidebarDrawer(): import("react").JSX.Element;
|
|
@@ -16,7 +16,7 @@ import { cva } from "class-variance-authority";
|
|
|
16
16
|
import { useTranslations } from "@fuma-translate/react";
|
|
17
17
|
import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
18
18
|
import { Menu } from "@base-ui/react/menu";
|
|
19
|
-
|
|
19
|
+
// src/layouts/spacious/slots/sidebar.tsx
|
|
20
20
|
/** the hover fill comes from the gliding block of `SidebarItems` */
|
|
21
21
|
const itemVariants = cva("relative flex w-full items-center gap-3 rounded-lg px-2.5 py-2 text-start wrap-anywhere outline-none transition-colors focus-visible:ring-2 focus-visible:ring-fd-ring [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
22
22
|
variants: { active: {
|
|
@@ -301,5 +301,4 @@ const SidebarLinkItem = createLinkItemRenderer({
|
|
|
301
301
|
SidebarFolderTrigger,
|
|
302
302
|
SidebarItem
|
|
303
303
|
});
|
|
304
|
-
//#endregion
|
|
305
304
|
export { Sidebar, SidebarDrawer, SidebarProvider };
|
package/dist/mdx.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { Card, Cards } from "./components/card.js";
|
|
|
3
3
|
import { CodeBlockTab, CodeBlockTabs, CodeBlockTabsList, CodeBlockTabsTrigger } from "./components/codeblock.js";
|
|
4
4
|
import { createRelativeLink as createRelativeLink$1 } from "./mdx.server.js";
|
|
5
5
|
import React, { AnchorHTMLAttributes, FC, HTMLAttributes, ImgHTMLAttributes, TableHTMLAttributes } from "react";
|
|
6
|
-
//#region src/mdx.d.ts
|
|
7
6
|
/**
|
|
8
7
|
* global types for MDX.js
|
|
9
8
|
*/
|
|
@@ -40,5 +39,4 @@ declare const defaultMdxComponents: {
|
|
|
40
39
|
CalloutDescription: typeof CalloutDescription;
|
|
41
40
|
};
|
|
42
41
|
export declare const createRelativeLink: typeof createRelativeLink$1;
|
|
43
|
-
//#endregion
|
|
44
42
|
export { defaultMdxComponents as default };
|
package/dist/mdx.js
CHANGED
|
@@ -6,7 +6,7 @@ import { CodeBlock, CodeBlockTab, CodeBlockTabs, CodeBlockTabsList, CodeBlockTab
|
|
|
6
6
|
import Link from "fumadocs-core/link";
|
|
7
7
|
import { Image } from "fumadocs-core/framework";
|
|
8
8
|
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
|
|
9
|
+
// src/mdx.tsx
|
|
10
10
|
function Image$1(props) {
|
|
11
11
|
return /* @__PURE__ */ jsx(Image, {
|
|
12
12
|
sizes: "(max-width: 768px) 100vw, (max-width: 1200px) 70vw, 900px",
|
|
@@ -67,5 +67,4 @@ const defaultMdxComponents = {
|
|
|
67
67
|
const createRelativeLink = () => {
|
|
68
68
|
throw new Error("`createRelativeLink` is only supported in Node.js environment");
|
|
69
69
|
};
|
|
70
|
-
//#endregion
|
|
71
70
|
export { createRelativeLink, defaultMdxComponents as default };
|
package/dist/mdx.server.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import defaultMdxComponents from "./mdx.js";
|
|
2
2
|
import { ComponentProps, FC } from "react";
|
|
3
3
|
import { LoaderConfig, LoaderOutput, Page } from "fumadocs-core/source";
|
|
4
|
-
//#region src/mdx.server.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Extend the default Link component to resolve relative file paths in `href`.
|
|
7
6
|
*
|
|
@@ -10,5 +9,4 @@ import { LoaderConfig, LoaderOutput, Page } from "fumadocs-core/source";
|
|
|
10
9
|
* @param OverrideLink The component to override from
|
|
11
10
|
*/
|
|
12
11
|
export declare function createRelativeLink<C extends LoaderConfig>(source: LoaderOutput<C>, page: Page | C['page'], OverrideLink?: FC<ComponentProps<'a'>>): FC<ComponentProps<'a'>>;
|
|
13
|
-
//#endregion
|
|
14
12
|
export { defaultMdxComponents as default };
|
package/dist/mdx.server.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import defaultMdxComponents from "./mdx.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/mdx.server.tsx
|
|
4
4
|
/**
|
|
5
5
|
* Extend the default Link component to resolve relative file paths in `href`.
|
|
6
6
|
*
|
|
@@ -16,5 +16,4 @@ function createRelativeLink(source, page, OverrideLink = defaultMdxComponents.a)
|
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
//#endregion
|
|
20
19
|
export { createRelativeLink, defaultMdxComponents as default };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/controlled.d.ts
|
|
3
2
|
type ModalState = 'LOADED' | 'LOADING' | 'UNLOADED' | 'UNLOADING';
|
|
4
3
|
export interface ControlledProps {
|
|
5
4
|
a11yNameButtonUnzoom?: string;
|
|
@@ -26,5 +25,4 @@ export interface ControlledProps {
|
|
|
26
25
|
zoomImg?: React.ImgHTMLAttributes<HTMLImageElement>;
|
|
27
26
|
zoomMargin?: number;
|
|
28
27
|
}
|
|
29
|
-
//#endregion
|
|
30
28
|
export {};
|
|
@@ -6,7 +6,7 @@ import { getStyleGhost } from "./utils/get-style-ghost.js";
|
|
|
6
6
|
import { getStyleModalImg } from "./utils/get-style-modal-img.js";
|
|
7
7
|
import React from "react";
|
|
8
8
|
import ReactDOM from "react-dom";
|
|
9
|
-
|
|
9
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/controlled.js
|
|
10
10
|
const IMAGE_QUERY = [
|
|
11
11
|
"img",
|
|
12
12
|
"svg",
|
|
@@ -457,5 +457,4 @@ function IEnlarge() {
|
|
|
457
457
|
xmlns: "http://www.w3.org/2000/svg"
|
|
458
458
|
}, React.createElement("path", { d: "M 9 1 L 9 2 L 12.292969 2 L 2 12.292969 L 2 9 L 1 9 L 1 14 L 6 14 L 6 13 L 2.707031 13 L 13 2.707031 L 13 6 L 14 6 L 14 1 Z" }));
|
|
459
459
|
}
|
|
460
|
-
//#endregion
|
|
461
460
|
export { Controlled };
|
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { ControlledProps } from "./controlled.js";
|
|
2
2
|
import React from "react";
|
|
3
|
-
|
|
4
|
-
export type UncontrolledProps = Omit<ControlledProps, 'isZoomed'>;
|
|
5
|
-
//#endregion
|
|
3
|
+
export type UncontrolledProps = Omit<ControlledProps, 'isZoomed'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Controlled } from "./controlled.js";
|
|
2
2
|
import React from "react";
|
|
3
|
-
|
|
3
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/uncontrolled.js
|
|
4
4
|
function Uncontrolled({ onZoomChange, ...props }) {
|
|
5
5
|
const [isZoomed, setIsZoomed] = React.useState(false);
|
|
6
6
|
const handleZoomChange = React.useCallback((value, { event }) => {
|
|
@@ -13,5 +13,4 @@ function Uncontrolled({ onZoomChange, ...props }) {
|
|
|
13
13
|
onZoomChange: handleZoomChange
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
|
-
//#endregion
|
|
17
16
|
export { Uncontrolled };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/adjust-svg-ids.js
|
|
2
2
|
const adjustSvgIDs = (svgEl) => {
|
|
3
3
|
const newIdSuffix = "-zoom";
|
|
4
4
|
const attrs = [
|
|
@@ -49,5 +49,4 @@ const adjustSvgIDs = (svgEl) => {
|
|
|
49
49
|
}
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
-
//#endregion
|
|
53
52
|
export { adjustSvgIDs };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getScale } from "./get-scale.js";
|
|
2
2
|
import { parsePosition } from "./parse-position.js";
|
|
3
|
-
|
|
3
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/compute-positioned-style.js
|
|
4
4
|
const computePositionedStyle = ({ containerHeight, containerLeft, containerTop, containerWidth, hasScalableSrc, offset, position, targetHeight, targetWidth, visibleHeight, visibleWidth }) => {
|
|
5
5
|
const [posLeft = "50%", posTop = "50%"] = position.split(" ");
|
|
6
6
|
const posX = parsePosition(posLeft, containerWidth - visibleWidth);
|
|
@@ -21,5 +21,4 @@ const computePositionedStyle = ({ containerHeight, containerLeft, containerTop,
|
|
|
21
21
|
initialTransform: `translate(0,0) scale(${1 / scale})`
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
//#endregion
|
|
25
24
|
export { computePositionedStyle };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/element-tests.js
|
|
2
2
|
function isElement(el) {
|
|
3
3
|
if (typeof Element === "undefined") return false;
|
|
4
4
|
return el instanceof Element;
|
|
@@ -8,5 +8,4 @@ const testDiv = (el) => testElType("DIV", el) || testElType("SPAN", el);
|
|
|
8
8
|
const testImg = (el) => testElType("IMG", el);
|
|
9
9
|
const testImgLoaded = (el) => el.complete && el.naturalHeight !== 0;
|
|
10
10
|
const testSvg = (el) => testElType("SVG", el);
|
|
11
|
-
//#endregion
|
|
12
11
|
export { testDiv, testImg, testImgLoaded, testSvg };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parsePosition } from "./parse-position.js";
|
|
2
2
|
import { computePositionedStyle } from "./compute-positioned-style.js";
|
|
3
|
-
|
|
3
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-div-img-style.js
|
|
4
4
|
const getDivImgStyle = ({ backgroundPosition, backgroundSize, containerHeight, containerLeft, containerTop, containerWidth, hasScalableSrc, offset, targetHeight, targetWidth }) => {
|
|
5
5
|
const base = {
|
|
6
6
|
containerHeight,
|
|
@@ -41,5 +41,4 @@ const getDivImgStyle = ({ backgroundPosition, backgroundSize, containerHeight, c
|
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
-
//#endregion
|
|
45
44
|
export { getDivImgStyle };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { testImg } from "./element-tests.js";
|
|
2
|
-
|
|
2
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-img-alt.js
|
|
3
3
|
const getImgAlt = (imgEl) => {
|
|
4
4
|
if (imgEl !== null) {
|
|
5
5
|
if (testImg(imgEl)) return imgEl.alt;
|
|
6
6
|
else return imgEl.getAttribute("aria-label") ?? void 0;
|
|
7
7
|
}
|
|
8
8
|
};
|
|
9
|
-
//#endregion
|
|
10
9
|
export { getImgAlt };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getScale } from "./get-scale.js";
|
|
2
2
|
import { computePositionedStyle } from "./compute-positioned-style.js";
|
|
3
|
-
|
|
3
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-img-object-fit-style.js
|
|
4
4
|
const getImgObjectFitStyle = ({ containerHeight, containerLeft, containerTop, containerWidth, hasScalableSrc, objectFit: objectFitParam, objectPosition, offset, targetHeight, targetWidth }) => {
|
|
5
5
|
let resolvedObjectFit = objectFitParam;
|
|
6
6
|
if (resolvedObjectFit === "scale-down") {
|
|
@@ -53,5 +53,4 @@ const getImgObjectFitStyle = ({ containerHeight, containerLeft, containerTop, co
|
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
};
|
|
56
|
-
//#endregion
|
|
57
56
|
export { getImgObjectFitStyle };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getScale } from "./get-scale.js";
|
|
2
|
-
|
|
2
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-img-regular-style.js
|
|
3
3
|
const getImgRegularStyle = ({ containerHeight, containerLeft, containerTop, containerWidth, hasScalableSrc, offset, targetHeight, targetWidth }) => {
|
|
4
4
|
const scale = getScale({
|
|
5
5
|
containerHeight,
|
|
@@ -17,5 +17,4 @@ const getImgRegularStyle = ({ containerHeight, containerLeft, containerTop, cont
|
|
|
17
17
|
initialTransform: `translate(0,0) scale(${1 / scale})`
|
|
18
18
|
};
|
|
19
19
|
};
|
|
20
|
-
//#endregion
|
|
21
20
|
export { getImgRegularStyle };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { testDiv, testImg } from "./element-tests.js";
|
|
2
|
-
|
|
2
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-img-src.js
|
|
3
3
|
const URL_REGEX = /url(?:\(['"]?)(?<url>.*?)(?:['"]?\))/;
|
|
4
4
|
const getImgSrc = (imgEl) => {
|
|
5
5
|
if (imgEl !== null) {
|
|
@@ -10,5 +10,4 @@ const getImgSrc = (imgEl) => {
|
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
|
-
//#endregion
|
|
14
13
|
export { getImgSrc };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-modal-img-transform.js
|
|
2
2
|
const getModalImgTransform = ({ height, initialTransform, isZoomed, left, top, userTransform, width }) => {
|
|
3
3
|
let centeredUserTransform = "";
|
|
4
4
|
if (userTransform !== "none" && userTransform !== "") {
|
|
@@ -18,5 +18,4 @@ const getModalImgTransform = ({ height, initialTransform, isZoomed, left, top, u
|
|
|
18
18
|
if (centeredUserTransform === "") return base;
|
|
19
19
|
return `${base} ${centeredUserTransform}`;
|
|
20
20
|
};
|
|
21
|
-
//#endregion
|
|
22
21
|
export { getModalImgTransform };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-scale.js
|
|
2
2
|
const getScaleToWindow = ({ height, offset, width }) => Math.min((window.innerWidth - offset * 2) / width, (window.innerHeight - offset * 2) / height);
|
|
3
3
|
const getScaleToWindowMax = ({ containerHeight, containerWidth, offset, targetHeight, targetWidth }) => {
|
|
4
4
|
const scale = getScaleToWindow({
|
|
@@ -23,5 +23,4 @@ const getScale = ({ containerHeight, containerWidth, hasScalableSrc, offset, tar
|
|
|
23
23
|
width: containerWidth
|
|
24
24
|
});
|
|
25
25
|
};
|
|
26
|
-
//#endregion
|
|
27
26
|
export { getScale };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { testSvg } from "./element-tests.js";
|
|
2
|
-
|
|
2
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-style-ghost.js
|
|
3
3
|
const getStyleGhost = (imgEl) => {
|
|
4
4
|
if (imgEl == null) return {};
|
|
5
5
|
if (testSvg(imgEl)) {
|
|
@@ -27,5 +27,4 @@ const getStyleGhost = (imgEl) => {
|
|
|
27
27
|
top: imgEl.offsetTop
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
//#endregion
|
|
31
30
|
export { getStyleGhost };
|
|
@@ -5,7 +5,7 @@ import { getDivImgStyle } from "./get-div-img-style.js";
|
|
|
5
5
|
import { getModalImgTransform } from "./get-modal-img-transform.js";
|
|
6
6
|
import { getTargetDimension } from "./get-target-dimension.js";
|
|
7
7
|
import { testHasScalableSrc } from "./test-has-scalable-src.js";
|
|
8
|
-
|
|
8
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-style-modal-img.js
|
|
9
9
|
const getStyleModalImg = ({ hasZoomImg, imgSrc, isSvg, isZoomed, loadedImgEl, offset, shouldRefresh, targetEl }) => {
|
|
10
10
|
const hasScalableSrc = testHasScalableSrc({
|
|
11
11
|
hasZoomImg,
|
|
@@ -71,5 +71,4 @@ const getStyleModalImg = ({ hasZoomImg, imgSrc, isSvg, isZoomed, loadedImgEl, of
|
|
|
71
71
|
if (isZoomed && shouldRefresh) result.transitionDuration = "0.01ms";
|
|
72
72
|
return result;
|
|
73
73
|
};
|
|
74
|
-
//#endregion
|
|
75
74
|
export { getStyleModalImg };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/get-target-dimension.js
|
|
2
2
|
const getTargetDimension = ({ fallback, natural }) => natural !== void 0 && natural !== 0 ? natural : fallback;
|
|
3
|
-
//#endregion
|
|
4
3
|
export { getTargetDimension };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/parse-position.js
|
|
2
2
|
const parsePosition = (position, relativeNum) => {
|
|
3
3
|
const positionNum = parseFloat(position);
|
|
4
4
|
return position.endsWith("%") ? relativeNum * positionNum / 100 : positionNum;
|
|
5
5
|
};
|
|
6
|
-
//#endregion
|
|
7
6
|
export { parsePosition };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// ../../node_modules/.pnpm/react-medium-image-zoom@5.4.9_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-medium-image-zoom/dist/utils/test-has-scalable-src.js
|
|
2
2
|
const SRC_SVG_REGEX = /\.svg$/i;
|
|
3
3
|
const testHasScalableSrc = ({ hasZoomImg, imgSrc, isSvg }) => isSvg || imgSrc?.slice(0, 18) === "data:image/svg+xml" || hasZoomImg || imgSrc !== void 0 && SRC_SVG_REGEX.test(imgSrc);
|
|
4
|
-
//#endregion
|
|
5
4
|
export { testHasScalableSrc };
|