fumadocs-ui 16.8.7 → 16.8.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/shared.css +5 -5
- package/dist/components/accordion.js +1 -1
- package/dist/components/codeblock.js +1 -1
- package/dist/components/dialog/search.js +2 -2
- package/dist/components/heading.d.ts +2 -2
- package/dist/components/heading.js +20 -10
- package/dist/components/image-zoom.d.ts +1 -1
- package/dist/components/image-zoom.js +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/contexts/i18n.js +1 -1
- package/dist/contexts/search.js +1 -1
- package/dist/layouts/home/slots/header.d.ts +1 -1
- package/dist/layouts/shared/page-actions.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/controlled.d.ts +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/controlled.js +27 -11
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/uncontrolled.d.ts +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/uncontrolled.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/adjust-svg-ids.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/compute-positioned-style.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/element-tests.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/get-div-img-style.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/get-img-alt.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/get-img-object-fit-style.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/get-img-regular-style.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/get-img-src.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/get-modal-img-transform.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/get-scale.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/get-style-ghost.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/get-style-modal-img.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/get-target-dimension.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/parse-position.js +1 -1
- package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/utils/test-has-scalable-src.js +1 -1
- package/dist/og/takumi.d.ts +1 -1
- package/dist/style.css +15 -18
- package/package.json +13 -13
- /package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.4_react-dom@19.2.5_react@19.2.5__react@19.2.5 → react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6}/node_modules/react-medium-image-zoom/dist/index.d.ts +0 -0
package/css/generated/shared.css
CHANGED
|
@@ -92,7 +92,6 @@
|
|
|
92
92
|
@source inline("application/json");
|
|
93
93
|
@source inline("areaRef");
|
|
94
94
|
@source inline("aria-describedby");
|
|
95
|
-
@source inline("aria-hidden");
|
|
96
95
|
@source inline("aria-label");
|
|
97
96
|
@source inline("aria-selected");
|
|
98
97
|
@source inline("as");
|
|
@@ -404,6 +403,8 @@
|
|
|
404
403
|
@source inline("group-data-[state=active]:bg-fd-primary");
|
|
405
404
|
@source inline("group-data-[state=open]:rotate-180");
|
|
406
405
|
@source inline("group-data-[state=open]:rotate-90");
|
|
406
|
+
@source inline("group-hover/heading:opacity-100");
|
|
407
|
+
@source inline("group/heading");
|
|
407
408
|
@source inline("groupListeners");
|
|
408
409
|
@source inline("guides");
|
|
409
410
|
@source inline("h");
|
|
@@ -465,6 +466,8 @@
|
|
|
465
466
|
@source inline("inputType");
|
|
466
467
|
@source inline("inset-0");
|
|
467
468
|
@source inline("inset-s-0");
|
|
469
|
+
@source inline("inset-s-3");
|
|
470
|
+
@source inline("inset-s-6");
|
|
468
471
|
@source inline("inset-x-0");
|
|
469
472
|
@source inline("inset-x-2");
|
|
470
473
|
@source inline("inset-y-0");
|
|
@@ -642,6 +645,7 @@
|
|
|
642
645
|
@source inline("onChange");
|
|
643
646
|
@source inline("onClick");
|
|
644
647
|
@source inline("onCompute");
|
|
648
|
+
@source inline("onCopy");
|
|
645
649
|
@source inline("onKey");
|
|
646
650
|
@source inline("onOpenChange");
|
|
647
651
|
@source inline("onOpenChangeCallback");
|
|
@@ -708,8 +712,6 @@
|
|
|
708
712
|
@source inline("pb-0");
|
|
709
713
|
@source inline("pb-2");
|
|
710
714
|
@source inline("pe-2");
|
|
711
|
-
@source inline("peer");
|
|
712
|
-
@source inline("peer-hover:opacity-100");
|
|
713
715
|
@source inline("performing");
|
|
714
716
|
@source inline("persist");
|
|
715
717
|
@source inline("persistent");
|
|
@@ -892,8 +894,6 @@
|
|
|
892
894
|
@source inline("specific");
|
|
893
895
|
@source inline("src");
|
|
894
896
|
@source inline("stars");
|
|
895
|
-
@source inline("start-3");
|
|
896
|
-
@source inline("start-6");
|
|
897
897
|
@source inline("startIdx");
|
|
898
898
|
@source inline("state");
|
|
899
899
|
@source inline("static");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
-
import { useCopyButton } from "../utils/use-copy-button.js";
|
|
4
3
|
import { buttonVariants } from "./ui/button.js";
|
|
4
|
+
import { useCopyButton } from "../utils/use-copy-button.js";
|
|
5
5
|
import { mergeRefs } from "../utils/merge-refs.js";
|
|
6
6
|
import { Accordion as Accordion$1, AccordionContent, AccordionHeader, AccordionItem, AccordionTrigger } from "./ui/accordion.js";
|
|
7
7
|
import { useEffect, useRef, useState } from "react";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
-
import { useCopyButton } from "../utils/use-copy-button.js";
|
|
4
3
|
import { buttonVariants } from "./ui/button.js";
|
|
4
|
+
import { useCopyButton } from "../utils/use-copy-button.js";
|
|
5
5
|
import { mergeRefs } from "../utils/merge-refs.js";
|
|
6
6
|
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs.js";
|
|
7
7
|
import { createContext, use, useMemo, useRef } from "react";
|
|
@@ -263,9 +263,9 @@ function SearchDialogListItem({ item, className, children, renderMarkdown = (s)
|
|
|
263
263
|
}),
|
|
264
264
|
item.type !== "page" && /* @__PURE__ */ jsx("div", {
|
|
265
265
|
role: "none",
|
|
266
|
-
className: "absolute
|
|
266
|
+
className: "absolute inset-s-3 inset-y-0 w-px bg-fd-border"
|
|
267
267
|
}),
|
|
268
|
-
item.type === "heading" && /* @__PURE__ */ jsx(Hash, { className: "absolute
|
|
268
|
+
item.type === "heading" && /* @__PURE__ */ jsx(Hash, { className: "absolute inset-s-6 top-2.5 size-4 text-fd-muted-foreground" }),
|
|
269
269
|
/* @__PURE__ */ jsx("div", {
|
|
270
270
|
className: cn("min-w-0", item.type === "text" && "ps-4", item.type === "heading" && "ps-8", item.type === "page" || item.type === "heading" ? "font-medium" : "text-fd-popover-foreground/80"),
|
|
271
271
|
children: typeof item.content === "string" ? renderMarkdown(item.content) : item.content
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
2
3
|
|
|
3
4
|
//#region src/components/heading.d.ts
|
|
4
5
|
type Types = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
@@ -7,8 +8,7 @@ type HeadingProps<T extends Types> = Omit<ComponentPropsWithoutRef<T>, 'as'> & {
|
|
|
7
8
|
};
|
|
8
9
|
declare function Heading<T extends Types = 'h1'>({
|
|
9
10
|
as,
|
|
10
|
-
className,
|
|
11
11
|
...props
|
|
12
|
-
}: HeadingProps<T>):
|
|
12
|
+
}: HeadingProps<T>): _$react_jsx_runtime0.JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { Heading };
|
|
@@ -1,24 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { buttonVariants } from "./ui/button.js";
|
|
4
|
+
import { useCopyButton } from "../utils/use-copy-button.js";
|
|
2
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { LinkIcon } from "lucide-react";
|
|
6
|
+
import { CopyCheckIcon, LinkIcon } from "lucide-react";
|
|
4
7
|
//#region src/components/heading.tsx
|
|
5
|
-
function Heading({ as,
|
|
8
|
+
function Heading({ as, ...props }) {
|
|
6
9
|
const As = as ?? "h1";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
+
const [isChecked, onCopy] = useCopyButton(() => {
|
|
11
|
+
if (!props.id) return;
|
|
12
|
+
const url = new URL(window.location.href);
|
|
13
|
+
url.hash = props.id;
|
|
14
|
+
return navigator.clipboard.writeText(url.href);
|
|
10
15
|
});
|
|
16
|
+
if (!props.id) return /* @__PURE__ */ jsx(As, { ...props });
|
|
11
17
|
return /* @__PURE__ */ jsxs(As, {
|
|
12
|
-
className: cn("flex scroll-m-28 flex-row items-center gap-2", className),
|
|
13
18
|
...props,
|
|
19
|
+
className: cn("group/heading flex scroll-m-28 flex-row items-center gap-1", props.className),
|
|
14
20
|
children: [/* @__PURE__ */ jsx("a", {
|
|
15
21
|
"data-card": "",
|
|
16
22
|
href: `#${props.id}`,
|
|
17
|
-
className: "peer",
|
|
18
23
|
children: props.children
|
|
19
|
-
}), /* @__PURE__ */ jsx(
|
|
20
|
-
"aria-
|
|
21
|
-
className:
|
|
24
|
+
}), /* @__PURE__ */ jsx("button", {
|
|
25
|
+
"aria-label": "Copy Anchor Link",
|
|
26
|
+
className: cn(buttonVariants({
|
|
27
|
+
variant: "ghost",
|
|
28
|
+
size: "icon-xs"
|
|
29
|
+
}), "not-prose shrink-0 text-fd-muted-foreground opacity-0 transition-opacity group-hover/heading:opacity-100"),
|
|
30
|
+
onClick: onCopy,
|
|
31
|
+
children: isChecked ? /* @__PURE__ */ jsx(CopyCheckIcon, {}) : /* @__PURE__ */ jsx(LinkIcon, {})
|
|
22
32
|
})]
|
|
23
33
|
});
|
|
24
34
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UncontrolledProps } from "../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
1
|
+
import { UncontrolledProps } from "../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/react-medium-image-zoom/dist/uncontrolled.js";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
3
|
import { ImageProps } from "fumadocs-core/framework";
|
|
4
4
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { Uncontrolled } from "../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
2
|
+
import { Uncontrolled } from "../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/react-medium-image-zoom/dist/uncontrolled.js";
|
|
3
3
|
import "./image-zoom2.css";
|
|
4
4
|
import { Image } from "fumadocs-core/framework";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -5,7 +5,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
5
5
|
declare const buttonVariants: (props?: ({
|
|
6
6
|
variant?: "primary" | "outline" | "ghost" | "secondary" | null | undefined;
|
|
7
7
|
color?: "primary" | "outline" | "ghost" | "secondary" | null | undefined;
|
|
8
|
-
size?: "
|
|
8
|
+
size?: "icon" | "sm" | "icon-sm" | "icon-xs" | null | undefined;
|
|
9
9
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
10
10
|
type ButtonProps = VariantProps<typeof buttonVariants>;
|
|
11
11
|
//#endregion
|
package/dist/contexts/i18n.js
CHANGED
|
@@ -28,7 +28,7 @@ function I18nProvider({ locales = [], locale, onLocaleChange, children, translat
|
|
|
28
28
|
const onChange = (value) => {
|
|
29
29
|
if (onLocaleChange) return onLocaleChange(value);
|
|
30
30
|
const segments = pathname.split("/").filter((v) => v.length > 0);
|
|
31
|
-
if (segments[0] !== locale) segments.unshift(value);
|
|
31
|
+
if (segments.length === 0 || segments[0] !== locale) segments.unshift(value);
|
|
32
32
|
else segments[0] = value;
|
|
33
33
|
router.push(`/${segments.join("/")}`);
|
|
34
34
|
};
|
package/dist/contexts/search.js
CHANGED
|
@@ -14,7 +14,7 @@ function useSearchContext() {
|
|
|
14
14
|
function MetaOrControl() {
|
|
15
15
|
const [key, setKey] = useState("⌘");
|
|
16
16
|
useEffect(() => {
|
|
17
|
-
if (window.navigator.userAgent
|
|
17
|
+
if (/Windows|Linux/i.test(window.navigator.userAgent)) setKey("Ctrl");
|
|
18
18
|
}, []);
|
|
19
19
|
return key;
|
|
20
20
|
}
|
|
@@ -5,7 +5,7 @@ import * as _$class_variance_authority_types0 from "class-variance-authority/typ
|
|
|
5
5
|
|
|
6
6
|
//#region src/layouts/home/slots/header.d.ts
|
|
7
7
|
declare const navItemVariants: (props?: ({
|
|
8
|
-
variant?: "icon" | "
|
|
8
|
+
variant?: "icon" | "main" | "button" | null | undefined;
|
|
9
9
|
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
10
10
|
declare function Header(props: ComponentProps<'header'>): string | number | bigint | true | _$react_jsx_runtime0.JSX.Element | Iterable<_$react.ReactNode> | Promise<string | number | bigint | boolean | _$react.ReactPortal | _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>> | Iterable<_$react.ReactNode> | null | undefined>;
|
|
11
11
|
//#endregion
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../../utils/cn.js";
|
|
3
|
-
import { useCopyButton } from "../../utils/use-copy-button.js";
|
|
4
3
|
import { buttonVariants } from "../../components/ui/button.js";
|
|
4
|
+
import { useCopyButton } from "../../utils/use-copy-button.js";
|
|
5
5
|
import { Popover, PopoverContent, PopoverTrigger } from "../../components/ui/popover.js";
|
|
6
6
|
import { useMemo, useState } from "react";
|
|
7
7
|
import { usePathname } from "fumadocs-core/framework";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
3
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/react-medium-image-zoom/dist/controlled.d.ts
|
|
4
4
|
type ModalState = 'LOADED' | 'LOADING' | 'UNLOADED' | 'UNLOADING';
|
|
5
5
|
interface ControlledProps {
|
|
6
6
|
a11yNameButtonUnzoom?: string;
|
|
@@ -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
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
9
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/react-medium-image-zoom/dist/controlled.js
|
|
10
10
|
const IMAGE_QUERY = [
|
|
11
11
|
"img",
|
|
12
12
|
"svg",
|
|
@@ -15,6 +15,8 @@ const IMAGE_QUERY = [
|
|
|
15
15
|
].map((x) => `${x}:not([aria-hidden="true"])`).join(",");
|
|
16
16
|
const defaultBodyAttrs = {
|
|
17
17
|
overflow: "",
|
|
18
|
+
position: "",
|
|
19
|
+
top: "",
|
|
18
20
|
width: ""
|
|
19
21
|
};
|
|
20
22
|
function getDialogContainer() {
|
|
@@ -50,10 +52,12 @@ var ControlledBase = class extends React.Component {
|
|
|
50
52
|
this.imgEl = null;
|
|
51
53
|
this.isScaling = false;
|
|
52
54
|
this.prevBodyAttrs = defaultBodyAttrs;
|
|
55
|
+
this.prevScrollY = 0;
|
|
53
56
|
this.styleModalImg = {};
|
|
54
57
|
this.handleModalStateChange = (prevModalState) => {
|
|
55
58
|
const { state: { modalState } } = this;
|
|
56
59
|
if (prevModalState !== "LOADING" && modalState === "LOADING") {
|
|
60
|
+
this.isScaling = false;
|
|
57
61
|
this.loadZoomImg();
|
|
58
62
|
window.addEventListener("resize", this.handleResize, { passive: true });
|
|
59
63
|
window.addEventListener("touchstart", this.handleTouchStart, { passive: true });
|
|
@@ -176,6 +180,8 @@ var ControlledBase = class extends React.Component {
|
|
|
176
180
|
};
|
|
177
181
|
this.handleWheel = (e) => {
|
|
178
182
|
if (e.ctrlKey) return;
|
|
183
|
+
if (this.isScaling) return;
|
|
184
|
+
if ((window.visualViewport?.scale ?? 1) > 1) return;
|
|
179
185
|
e.stopPropagation();
|
|
180
186
|
queueMicrotask(() => {
|
|
181
187
|
this.handleUnzoom(e);
|
|
@@ -210,12 +216,10 @@ var ControlledBase = class extends React.Component {
|
|
|
210
216
|
}
|
|
211
217
|
};
|
|
212
218
|
this.handleTouchEnd = () => {
|
|
213
|
-
this.isScaling = false;
|
|
214
219
|
this.touchYStart = void 0;
|
|
215
220
|
this.touchYEnd = void 0;
|
|
216
221
|
};
|
|
217
222
|
this.handleTouchCancel = () => {
|
|
218
|
-
this.isScaling = false;
|
|
219
223
|
this.touchYStart = void 0;
|
|
220
224
|
this.touchYEnd = void 0;
|
|
221
225
|
};
|
|
@@ -250,19 +254,31 @@ var ControlledBase = class extends React.Component {
|
|
|
250
254
|
}
|
|
251
255
|
};
|
|
252
256
|
this.bodyScrollDisable = () => {
|
|
257
|
+
const bodyStyle = document.body.style;
|
|
253
258
|
this.prevBodyAttrs = {
|
|
254
|
-
overflow:
|
|
255
|
-
|
|
259
|
+
overflow: bodyStyle.overflow,
|
|
260
|
+
position: bodyStyle.position,
|
|
261
|
+
top: bodyStyle.top,
|
|
262
|
+
width: bodyStyle.width
|
|
256
263
|
};
|
|
257
|
-
const
|
|
258
|
-
|
|
259
|
-
document.body.
|
|
264
|
+
const scrollY = window.scrollY;
|
|
265
|
+
this.prevScrollY = scrollY;
|
|
266
|
+
const clientWidth = document.body.clientWidth;
|
|
267
|
+
bodyStyle.overflow = "hidden";
|
|
268
|
+
bodyStyle.position = "fixed";
|
|
269
|
+
bodyStyle.top = `-${scrollY}px`;
|
|
270
|
+
bodyStyle.width = `${clientWidth}px`;
|
|
260
271
|
};
|
|
261
272
|
this.bodyScrollEnable = () => {
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
|
|
273
|
+
const bodyStyle = document.body.style;
|
|
274
|
+
const prev = this.prevBodyAttrs;
|
|
275
|
+
bodyStyle.width = prev.width;
|
|
276
|
+
bodyStyle.position = prev.position;
|
|
277
|
+
bodyStyle.top = prev.top;
|
|
278
|
+
bodyStyle.overflow = prev.overflow;
|
|
279
|
+
window.scrollTo(0, this.prevScrollY);
|
|
265
280
|
this.prevBodyAttrs = defaultBodyAttrs;
|
|
281
|
+
this.prevScrollY = 0;
|
|
266
282
|
};
|
|
267
283
|
this.loadZoomImg = () => {
|
|
268
284
|
const { props: { zoomImg } } = this;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ControlledProps } from "./controlled.js";
|
|
2
2
|
import React from "react";
|
|
3
3
|
|
|
4
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
4
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/react-medium-image-zoom/dist/uncontrolled.d.ts
|
|
5
5
|
type UncontrolledProps = Omit<ControlledProps, 'isZoomed'>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { UncontrolledProps };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Controlled } from "./controlled.js";
|
|
2
2
|
import React from "react";
|
|
3
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
3
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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 }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
1
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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 = [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getScale } from "./get-scale.js";
|
|
2
2
|
import { parsePosition } from "./parse-position.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
3
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
1
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parsePosition } from "./parse-position.js";
|
|
2
2
|
import { computePositionedStyle } from "./compute-positioned-style.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
3
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { testImg } from "./element-tests.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
2
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/node_modules/react-medium-image-zoom/dist/utils/get-img-alt.js
|
|
3
3
|
const getImgAlt = (imgEl) => {
|
|
4
4
|
if (imgEl !== null) if (testImg(imgEl)) return imgEl.alt;
|
|
5
5
|
else return imgEl.getAttribute("aria-label") ?? void 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getScale } from "./get-scale.js";
|
|
2
2
|
import { computePositionedStyle } from "./compute-positioned-style.js";
|
|
3
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
3
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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") if (targetWidth <= containerWidth && targetHeight <= containerHeight) resolvedObjectFit = "none";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getScale } from "./get-scale.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
2
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { testDiv, testImg } from "./element-tests.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
2
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
1
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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 !== "") {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
1
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { testSvg } from "./element-tests.js";
|
|
2
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
2
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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)) {
|
|
@@ -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
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
8
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
1
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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
3
|
//#endregion
|
|
4
4
|
export { getTargetDimension };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
1
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.
|
|
1
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.5_react-dom@19.2.6_react@19.2.6__react@19.2.6/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
4
|
//#endregion
|
package/dist/og/takumi.d.ts
CHANGED
package/dist/style.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.
|
|
1
|
+
/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties;
|
|
3
3
|
@layer theme, base, components, utilities;
|
|
4
4
|
@layer theme {
|
|
@@ -317,16 +317,13 @@
|
|
|
317
317
|
.inset-s-0 {
|
|
318
318
|
inset-inline-start: calc(var(--spacing) * 0);
|
|
319
319
|
}
|
|
320
|
+
.inset-s-3 {
|
|
321
|
+
inset-inline-start: calc(var(--spacing) * 3);
|
|
322
|
+
}
|
|
320
323
|
.inset-s-4 {
|
|
321
324
|
inset-inline-start: calc(var(--spacing) * 4);
|
|
322
325
|
}
|
|
323
|
-
.
|
|
324
|
-
inset-inline-start: var(--spacing);
|
|
325
|
-
}
|
|
326
|
-
.start-3 {
|
|
327
|
-
inset-inline-start: calc(var(--spacing) * 3);
|
|
328
|
-
}
|
|
329
|
-
.start-6 {
|
|
326
|
+
.inset-s-6 {
|
|
330
327
|
inset-inline-start: calc(var(--spacing) * 6);
|
|
331
328
|
}
|
|
332
329
|
.end-2 {
|
|
@@ -1219,6 +1216,9 @@
|
|
|
1219
1216
|
.scroll-m-28 {
|
|
1220
1217
|
scroll-margin: calc(var(--spacing) * 28);
|
|
1221
1218
|
}
|
|
1219
|
+
.\[scrollbar-width\:none\] {
|
|
1220
|
+
scrollbar-width: none;
|
|
1221
|
+
}
|
|
1222
1222
|
.list-none {
|
|
1223
1223
|
list-style-type: none;
|
|
1224
1224
|
}
|
|
@@ -2001,9 +2001,6 @@
|
|
|
2001
2001
|
.\[offset-distance\:var\(--offset-distance\,0\)\] {
|
|
2002
2002
|
offset-distance: var(--offset-distance,0);
|
|
2003
2003
|
}
|
|
2004
|
-
.\[scrollbar-width\:none\] {
|
|
2005
|
-
scrollbar-width: none;
|
|
2006
|
-
}
|
|
2007
2004
|
.\*\:pointer-events-auto {
|
|
2008
2005
|
:is(& > *) {
|
|
2009
2006
|
pointer-events: auto;
|
|
@@ -2105,6 +2102,13 @@
|
|
|
2105
2102
|
margin-bottom: calc(var(--spacing) * 2);
|
|
2106
2103
|
}
|
|
2107
2104
|
}
|
|
2105
|
+
.group-hover\/heading\:opacity-100 {
|
|
2106
|
+
&:is(:where(.group\/heading):hover *) {
|
|
2107
|
+
@media (hover: hover) {
|
|
2108
|
+
opacity: 100%;
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2108
2112
|
.group-data-\[state\=active\]\:bg-fd-primary {
|
|
2109
2113
|
&:is(:where(.group)[data-state="active"] *) {
|
|
2110
2114
|
background-color: var(--color-fd-primary);
|
|
@@ -2120,13 +2124,6 @@
|
|
|
2120
2124
|
rotate: 180deg;
|
|
2121
2125
|
}
|
|
2122
2126
|
}
|
|
2123
|
-
.peer-hover\:opacity-100 {
|
|
2124
|
-
&:is(:where(.peer):hover ~ *) {
|
|
2125
|
-
@media (hover: hover) {
|
|
2126
|
-
opacity: 100%;
|
|
2127
|
-
}
|
|
2128
|
-
}
|
|
2129
|
-
}
|
|
2130
2127
|
.placeholder\:text-fd-muted-foreground {
|
|
2131
2128
|
&::placeholder {
|
|
2132
2129
|
color: var(--color-fd-muted-foreground);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fumadocs-ui",
|
|
3
|
-
"version": "16.8.
|
|
3
|
+
"version": "16.8.9",
|
|
4
4
|
"description": "The Radix UI version of Fumadocs UI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Docs",
|
|
@@ -143,21 +143,21 @@
|
|
|
143
143
|
"@fumadocs/tailwind": "0.0.5"
|
|
144
144
|
},
|
|
145
145
|
"devDependencies": {
|
|
146
|
-
"@tailwindcss/cli": "^4.
|
|
147
|
-
"@tailwindcss/oxide": "^4.
|
|
148
|
-
"@tsdown/css": "^0.
|
|
146
|
+
"@tailwindcss/cli": "^4.3.0",
|
|
147
|
+
"@tailwindcss/oxide": "^4.3.0",
|
|
148
|
+
"@tsdown/css": "^0.22.0",
|
|
149
149
|
"@types/hast": "^3.0.4",
|
|
150
150
|
"@types/mdx": "^2.0.13",
|
|
151
|
-
"@types/node": "^25.6.
|
|
151
|
+
"@types/node": "^25.6.2",
|
|
152
152
|
"@types/react": "^19.2.14",
|
|
153
153
|
"@types/react-dom": "^19.2.3",
|
|
154
154
|
"fuma-cli": "^0.1.1",
|
|
155
|
-
"react-medium-image-zoom": "^5.4.
|
|
156
|
-
"tailwindcss": "^4.
|
|
157
|
-
"tsdown": "0.
|
|
155
|
+
"react-medium-image-zoom": "^5.4.5",
|
|
156
|
+
"tailwindcss": "^4.3.0",
|
|
157
|
+
"tsdown": "0.22.0",
|
|
158
158
|
"unified": "^11.0.5",
|
|
159
159
|
"@fumadocs/cli": "1.3.10",
|
|
160
|
-
"fumadocs-core": "16.8.
|
|
160
|
+
"fumadocs-core": "16.8.9",
|
|
161
161
|
"tsconfig": "0.0.0"
|
|
162
162
|
},
|
|
163
163
|
"peerDependencies": {
|
|
@@ -167,7 +167,7 @@
|
|
|
167
167
|
"next": "16.x.x",
|
|
168
168
|
"react": "^19.2.0",
|
|
169
169
|
"react-dom": "^19.2.0",
|
|
170
|
-
"fumadocs-core": "16.8.
|
|
170
|
+
"fumadocs-core": "16.8.9"
|
|
171
171
|
},
|
|
172
172
|
"peerDependenciesMeta": {
|
|
173
173
|
"next": {
|
|
@@ -184,14 +184,14 @@
|
|
|
184
184
|
}
|
|
185
185
|
},
|
|
186
186
|
"inlinedDependencies": {
|
|
187
|
-
"react-medium-image-zoom": "5.4.
|
|
187
|
+
"react-medium-image-zoom": "5.4.5"
|
|
188
188
|
},
|
|
189
189
|
"scripts": {
|
|
190
190
|
"build": "pnpm build:layout && pnpm build:tailwind",
|
|
191
|
-
"build:layout": "tsdown
|
|
191
|
+
"build:layout": "tsdown",
|
|
192
192
|
"build:tailwind": "tailwindcss -i css/style.css -o ./dist/style.css",
|
|
193
193
|
"clean": "rimraf dist",
|
|
194
|
-
"dev": "concurrently \"tsdown --watch --clean false
|
|
194
|
+
"dev": "concurrently \"tsdown --watch --clean false\" \"tailwindcss -i css/style.css -o ./dist/style.css -w\"",
|
|
195
195
|
"lint": "oxlint .",
|
|
196
196
|
"types:check": "tsc --noEmit"
|
|
197
197
|
}
|