@fumadocs/base-ui 16.7.12 → 16.7.14
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 +2 -7
- package/dist/components/image-zoom.d.ts +1 -1
- package/dist/components/image-zoom.js +2 -2
- package/dist/components/toc/clerk.js +32 -17
- package/dist/components/toc/default.js +43 -7
- package/dist/components/toc/index.d.ts +2 -11
- package/dist/components/toc/index.js +2 -59
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-medium-image-zoom/dist/Controlled.d.ts +36 -0
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-medium-image-zoom/dist/Controlled.js +435 -0
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-medium-image-zoom/dist/Uncontrolled.d.ts +7 -0
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-medium-image-zoom/dist/Uncontrolled.js +17 -0
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-medium-image-zoom/dist/icons.js +24 -0
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-medium-image-zoom/dist/index.d.ts +2 -0
- package/dist/node_modules/.pnpm/react-medium-image-zoom@5.4.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-medium-image-zoom/dist/utils.js +372 -0
- package/dist/style.css +14 -14
- package/package.json +14 -11
package/css/generated/shared.css
CHANGED
|
@@ -24,8 +24,6 @@
|
|
|
24
24
|
@source inline("--easing");
|
|
25
25
|
@source inline("--fd-animated-height");
|
|
26
26
|
@source inline("--fd-banner-height");
|
|
27
|
-
@source inline("--fd-height");
|
|
28
|
-
@source inline("--fd-top");
|
|
29
27
|
@source inline("--padding-right");
|
|
30
28
|
@source inline("--popup-height");
|
|
31
29
|
@source inline("--popup-width");
|
|
@@ -282,7 +280,6 @@
|
|
|
282
280
|
@source inline("data-ending-style:h-0");
|
|
283
281
|
@source inline("data-ending-style:opacity-0");
|
|
284
282
|
@source inline("data-ending-style:scale-90");
|
|
285
|
-
@source inline("data-hidden");
|
|
286
283
|
@source inline("data-icon");
|
|
287
284
|
@source inline("data-instant:transition-none");
|
|
288
285
|
@source inline("data-line-numbers");
|
|
@@ -726,7 +723,7 @@
|
|
|
726
723
|
@source inline("onChange");
|
|
727
724
|
@source inline("onChangeRef");
|
|
728
725
|
@source inline("onClick");
|
|
729
|
-
@source inline("
|
|
726
|
+
@source inline("onCompute");
|
|
730
727
|
@source inline("onCopy");
|
|
731
728
|
@source inline("onKey");
|
|
732
729
|
@source inline("onKeyDown");
|
|
@@ -736,7 +733,6 @@
|
|
|
736
733
|
@source inline("onPointerLeave");
|
|
737
734
|
@source inline("onPointerMove");
|
|
738
735
|
@source inline("onPrint");
|
|
739
|
-
@source inline("onResize");
|
|
740
736
|
@source inline("onSearchChange");
|
|
741
737
|
@source inline("onSearchChangeCallback");
|
|
742
738
|
@source inline("onSelect");
|
|
@@ -943,6 +939,7 @@
|
|
|
943
939
|
@source inline("setActive");
|
|
944
940
|
@source inline("setChecked");
|
|
945
941
|
@source inline("setCollapsed");
|
|
942
|
+
@source inline("setComputed");
|
|
946
943
|
@source inline("setHidden");
|
|
947
944
|
@source inline("setHover");
|
|
948
945
|
@source inline("setIsOpen");
|
|
@@ -1063,7 +1060,6 @@
|
|
|
1063
1060
|
@source inline("this");
|
|
1064
1061
|
@source inline("throw");
|
|
1065
1062
|
@source inline("thumbBox");
|
|
1066
|
-
@source inline("thumbRef");
|
|
1067
1063
|
@source inline("tier");
|
|
1068
1064
|
@source inline("timeoutRef");
|
|
1069
1065
|
@source inline("timerRef");
|
|
@@ -1118,7 +1114,6 @@
|
|
|
1118
1114
|
@source inline("updateAnchor");
|
|
1119
1115
|
@source inline("updated");
|
|
1120
1116
|
@source inline("updates");
|
|
1121
|
-
@source inline("upper");
|
|
1122
1117
|
@source inline("upperOffset");
|
|
1123
1118
|
@source inline("upperX");
|
|
1124
1119
|
@source inline("url");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { UncontrolledProps } from "../node_modules/.pnpm/react-medium-image-zoom@5.4.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-medium-image-zoom/dist/Uncontrolled.js";
|
|
1
2
|
import { ComponentProps } from "react";
|
|
2
3
|
import { ImageProps } from "fumadocs-core/framework";
|
|
3
4
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
-
import { UncontrolledProps } from "react-medium-image-zoom";
|
|
5
5
|
|
|
6
6
|
//#region src/components/image-zoom.d.ts
|
|
7
7
|
type ImageZoomProps = ImageProps & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { Uncontrolled } from "../node_modules/.pnpm/react-medium-image-zoom@5.4.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-medium-image-zoom/dist/Uncontrolled.js";
|
|
2
3
|
import "./image-zoom2.css";
|
|
3
4
|
import { Image } from "fumadocs-core/framework";
|
|
4
5
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import Zoom from "react-medium-image-zoom";
|
|
6
6
|
//#region src/components/image-zoom.tsx
|
|
7
7
|
function getImageSrc(src) {
|
|
8
8
|
if (typeof src === "string") return src;
|
|
@@ -13,7 +13,7 @@ function getImageSrc(src) {
|
|
|
13
13
|
return "";
|
|
14
14
|
}
|
|
15
15
|
function ImageZoom({ zoomInProps, children, rmiz, ...props }) {
|
|
16
|
-
return /* @__PURE__ */ jsx(
|
|
16
|
+
return /* @__PURE__ */ jsx(Uncontrolled, {
|
|
17
17
|
zoomMargin: 20,
|
|
18
18
|
wrapElement: "span",
|
|
19
19
|
...rmiz,
|
|
@@ -3,7 +3,7 @@ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
|
3
3
|
import { useI18n } from "../../contexts/i18n.js";
|
|
4
4
|
import { cn } from "../../utils/cn.js";
|
|
5
5
|
import { mergeRefs } from "../../utils/merge-refs.js";
|
|
6
|
-
import {
|
|
6
|
+
import { useTOCItems } from "./index.js";
|
|
7
7
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
8
8
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import * as Primitive from "fumadocs-core/toc";
|
|
@@ -31,7 +31,7 @@ function TOCItems({ ref, className, thumbBox = true, ...props }) {
|
|
|
31
31
|
const output = [];
|
|
32
32
|
for (let i = 0; i < items.length; i++) {
|
|
33
33
|
const item = items[i];
|
|
34
|
-
const element = container.querySelector(`a[href="
|
|
34
|
+
const element = container.querySelector(`a[href="${item.url}"]`);
|
|
35
35
|
if (!element) continue;
|
|
36
36
|
const styles = getComputedStyle(element);
|
|
37
37
|
const x = getLineOffset(item.depth) + .5;
|
|
@@ -91,31 +91,27 @@ function TOCItems({ ref, className, thumbBox = true, ...props }) {
|
|
|
91
91
|
width: w,
|
|
92
92
|
height: h,
|
|
93
93
|
d,
|
|
94
|
-
itemLineLengths
|
|
94
|
+
itemLineLengths,
|
|
95
|
+
positions
|
|
95
96
|
});
|
|
96
97
|
}, [items, thumbBox]);
|
|
97
98
|
useEffect(() => {
|
|
99
|
+
const container = containerRef.current;
|
|
100
|
+
if (!container) return;
|
|
101
|
+
const observer = new ResizeObserver(onPrint);
|
|
102
|
+
observer.observe(container);
|
|
98
103
|
onPrint();
|
|
104
|
+
return () => {
|
|
105
|
+
observer.unobserve(container);
|
|
106
|
+
};
|
|
99
107
|
}, [onPrint]);
|
|
100
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [svg && /* @__PURE__ */ jsxs(
|
|
101
|
-
containerRef,
|
|
102
|
-
onContainerResize: onPrint,
|
|
108
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [svg && /* @__PURE__ */ jsxs("div", {
|
|
103
109
|
className: "absolute top-0 inset-s-0",
|
|
104
110
|
style: {
|
|
105
111
|
width: svg.width,
|
|
106
112
|
height: svg.height
|
|
107
113
|
},
|
|
108
|
-
children: [/* @__PURE__ */ jsx(
|
|
109
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
110
|
-
viewBox: `0 0 ${svg.width} ${svg.height}`,
|
|
111
|
-
className: "absolute transition-[clip-path]",
|
|
112
|
-
style: {
|
|
113
|
-
width: svg.width,
|
|
114
|
-
height: svg.height,
|
|
115
|
-
clipPath: `polygon(0 var(--fd-top), 100% var(--fd-top), 100% calc(var(--fd-top) + var(--fd-height)), 0 calc(var(--fd-top) + var(--fd-height)))`
|
|
116
|
-
},
|
|
117
|
-
children: svg.content
|
|
118
|
-
}), thumbBox && /* @__PURE__ */ jsx(ThumbBox, { computed: svg })]
|
|
114
|
+
children: [/* @__PURE__ */ jsx(ThumbTrack, { computed: svg }), thumbBox && /* @__PURE__ */ jsx(ThumbBox, { computed: svg })]
|
|
119
115
|
}), /* @__PURE__ */ jsx("div", {
|
|
120
116
|
ref: mergeRefs(containerRef, ref),
|
|
121
117
|
className: cn("flex flex-col", className),
|
|
@@ -129,6 +125,25 @@ function TOCEmpty() {
|
|
|
129
125
|
children: text.tocNoHeadings
|
|
130
126
|
});
|
|
131
127
|
}
|
|
128
|
+
function ThumbTrack({ computed }) {
|
|
129
|
+
const items = Primitive.useItems();
|
|
130
|
+
const startIdx = items.findIndex((item) => item.active);
|
|
131
|
+
if (startIdx === -1) return;
|
|
132
|
+
const endIdx = items.findLastIndex((item) => item.active);
|
|
133
|
+
const top = `${computed.positions[startIdx][0]}px`;
|
|
134
|
+
const bottom = `${computed.positions[endIdx][1]}px`;
|
|
135
|
+
return /* @__PURE__ */ jsx("svg", {
|
|
136
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
137
|
+
viewBox: `0 0 ${computed.width} ${computed.height}`,
|
|
138
|
+
className: "absolute transition-[clip-path]",
|
|
139
|
+
style: {
|
|
140
|
+
width: computed.width,
|
|
141
|
+
height: computed.height,
|
|
142
|
+
clipPath: `polygon(0 ${top}, 100% ${top}, 100% ${bottom}, 0 ${bottom})`
|
|
143
|
+
},
|
|
144
|
+
children: computed.content
|
|
145
|
+
});
|
|
146
|
+
}
|
|
132
147
|
function ThumbBox({ computed }) {
|
|
133
148
|
const items = Primitive.useItems();
|
|
134
149
|
const previousRef = useRef(null);
|
|
@@ -3,8 +3,8 @@ import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
|
3
3
|
import { useI18n } from "../../contexts/i18n.js";
|
|
4
4
|
import { cn } from "../../utils/cn.js";
|
|
5
5
|
import { mergeRefs } from "../../utils/merge-refs.js";
|
|
6
|
-
import {
|
|
7
|
-
import { useRef } from "react";
|
|
6
|
+
import { useTOCItems } from "./index.js";
|
|
7
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import * as Primitive from "fumadocs-core/toc";
|
|
10
10
|
//#region src/components/toc/default.tsx
|
|
@@ -15,19 +15,55 @@ var default_exports = /* @__PURE__ */ __exportAll({
|
|
|
15
15
|
});
|
|
16
16
|
function TOCItems({ ref, className, ...props }) {
|
|
17
17
|
const containerRef = useRef(null);
|
|
18
|
+
const items = useTOCItems();
|
|
19
|
+
const [computed, setComputed] = useState(null);
|
|
20
|
+
const onCompute = useCallback(() => {
|
|
21
|
+
const container = containerRef.current;
|
|
22
|
+
if (!container) return;
|
|
23
|
+
if (items.length === 0) {
|
|
24
|
+
setComputed(null);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const positions = [];
|
|
28
|
+
for (const item of items) {
|
|
29
|
+
const element = container.querySelector(`a[href="${item.url}"]`);
|
|
30
|
+
if (!element) continue;
|
|
31
|
+
const styles = getComputedStyle(element);
|
|
32
|
+
positions.push([element.offsetTop + parseFloat(styles.paddingTop), element.offsetTop + element.clientHeight - parseFloat(styles.paddingBottom)]);
|
|
33
|
+
}
|
|
34
|
+
setComputed({ positions });
|
|
35
|
+
}, [items]);
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
const container = containerRef.current;
|
|
38
|
+
if (!container) return;
|
|
39
|
+
const observer = new ResizeObserver(onCompute);
|
|
40
|
+
observer.observe(container);
|
|
41
|
+
onCompute();
|
|
42
|
+
return () => {
|
|
43
|
+
observer.disconnect();
|
|
44
|
+
};
|
|
45
|
+
}, [onCompute]);
|
|
18
46
|
return /* @__PURE__ */ jsxs("div", {
|
|
19
47
|
className: "relative",
|
|
20
|
-
children: [/* @__PURE__ */ jsx(TocThumb, {
|
|
21
|
-
containerRef,
|
|
22
|
-
className: "absolute inset-y-0 inset-s-0 bg-fd-primary w-px transition-[clip-path]",
|
|
23
|
-
style: { clipPath: "polygon(0 var(--fd-top), 100% var(--fd-top), 100% calc(var(--fd-top) + var(--fd-height)), 0 calc(var(--fd-top) + var(--fd-height)))" }
|
|
24
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
48
|
+
children: [computed && /* @__PURE__ */ jsx(TocThumb, { computed }), /* @__PURE__ */ jsx("div", {
|
|
25
49
|
ref: mergeRefs(ref, containerRef),
|
|
26
50
|
className: cn("flex flex-col border-s border-fd-foreground/10", className),
|
|
27
51
|
...props
|
|
28
52
|
})]
|
|
29
53
|
});
|
|
30
54
|
}
|
|
55
|
+
function TocThumb({ computed }) {
|
|
56
|
+
const items = Primitive.useItems();
|
|
57
|
+
const startIdx = items.findIndex((item) => item.active);
|
|
58
|
+
if (startIdx === -1) return;
|
|
59
|
+
const endIdx = items.findLastIndex((item) => item.active);
|
|
60
|
+
const top = `${computed.positions[startIdx][0]}px`;
|
|
61
|
+
const bottom = `${computed.positions[endIdx][1]}px`;
|
|
62
|
+
return /* @__PURE__ */ jsx("div", {
|
|
63
|
+
className: "absolute inset-y-0 inset-s-0 bg-fd-primary w-px transition-[clip-path]",
|
|
64
|
+
style: { clipPath: `polygon(0 ${top}, 100% ${top}, 100% ${bottom}, 0 ${bottom})` }
|
|
65
|
+
});
|
|
66
|
+
}
|
|
31
67
|
function TOCEmpty() {
|
|
32
68
|
const { text } = useI18n();
|
|
33
69
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentProps
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
2
|
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
3
|
import * as Primitive from "fumadocs-core/toc";
|
|
4
4
|
|
|
@@ -16,14 +16,5 @@ declare function TOCScrollArea({
|
|
|
16
16
|
className,
|
|
17
17
|
...props
|
|
18
18
|
}: ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
19
|
-
interface TocThumbProps extends ComponentProps<'div'> {
|
|
20
|
-
containerRef: RefObject<HTMLElement | null>;
|
|
21
|
-
onContainerResize?: () => void;
|
|
22
|
-
}
|
|
23
|
-
declare function TocThumb({
|
|
24
|
-
containerRef,
|
|
25
|
-
onContainerResize,
|
|
26
|
-
...props
|
|
27
|
-
}: TocThumbProps): _$react_jsx_runtime0.JSX.Element;
|
|
28
19
|
//#endregion
|
|
29
|
-
export { TOCProvider, TOCProviderProps, TOCScrollArea,
|
|
20
|
+
export { TOCProvider, TOCProviderProps, TOCScrollArea, useActiveAnchor, useActiveAnchors, useItems, useTOCItems };
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
3
3
|
import { cn } from "../../utils/cn.js";
|
|
4
4
|
import { mergeRefs } from "../../utils/merge-refs.js";
|
|
5
|
-
import { createContext, use,
|
|
5
|
+
import { createContext, use, useRef } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import * as Primitive from "fumadocs-core/toc";
|
|
8
|
-
import { useOnChange } from "fumadocs-core/utils/use-on-change";
|
|
9
8
|
//#region src/components/toc/index.tsx
|
|
10
9
|
var toc_exports = /* @__PURE__ */ __exportAll({
|
|
11
10
|
TOCProvider: () => TOCProvider,
|
|
12
11
|
TOCScrollArea: () => TOCScrollArea,
|
|
13
|
-
TocThumb: () => TocThumb,
|
|
14
12
|
useActiveAnchor: () => useActiveAnchor,
|
|
15
13
|
useActiveAnchors: () => useActiveAnchors,
|
|
16
14
|
useItems: () => useItems,
|
|
@@ -43,60 +41,5 @@ function TOCScrollArea({ ref, className, ...props }) {
|
|
|
43
41
|
})
|
|
44
42
|
});
|
|
45
43
|
}
|
|
46
|
-
function TocThumb({ containerRef, onContainerResize, ...props }) {
|
|
47
|
-
const thumbRef = useRef(null);
|
|
48
|
-
const active = useActiveAnchors();
|
|
49
|
-
function update(info) {
|
|
50
|
-
const element = thumbRef.current;
|
|
51
|
-
const container = containerRef.current;
|
|
52
|
-
if (!element || !container) return;
|
|
53
|
-
element.style.setProperty("--fd-top", `${info.top}px`);
|
|
54
|
-
element.style.setProperty("--fd-height", `${info.height}px`);
|
|
55
|
-
}
|
|
56
|
-
function calc(active) {
|
|
57
|
-
const container = containerRef.current;
|
|
58
|
-
if (!container || container.clientHeight === 0) return null;
|
|
59
|
-
if (active.length === 0) return {
|
|
60
|
-
height: 0,
|
|
61
|
-
top: 0
|
|
62
|
-
};
|
|
63
|
-
let upper = Number.MAX_VALUE;
|
|
64
|
-
let lower = 0;
|
|
65
|
-
for (const item of active) {
|
|
66
|
-
const element = container.querySelector(`a[href="#${item}"]`);
|
|
67
|
-
if (!element) continue;
|
|
68
|
-
const styles = getComputedStyle(element);
|
|
69
|
-
upper = Math.min(upper, element.offsetTop + parseFloat(styles.paddingTop));
|
|
70
|
-
lower = Math.max(lower, element.offsetTop + element.clientHeight - parseFloat(styles.paddingBottom));
|
|
71
|
-
}
|
|
72
|
-
return {
|
|
73
|
-
top: upper,
|
|
74
|
-
height: lower - upper
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
const onResize = useEffectEvent(() => {
|
|
78
|
-
const result = calc(active);
|
|
79
|
-
if (result) update(result);
|
|
80
|
-
onContainerResize?.();
|
|
81
|
-
});
|
|
82
|
-
useEffect(() => {
|
|
83
|
-
if (!containerRef.current) return;
|
|
84
|
-
const container = containerRef.current;
|
|
85
|
-
const observer = new ResizeObserver(onResize);
|
|
86
|
-
observer.observe(container);
|
|
87
|
-
return () => {
|
|
88
|
-
observer.disconnect();
|
|
89
|
-
};
|
|
90
|
-
}, [containerRef]);
|
|
91
|
-
useOnChange(active, () => {
|
|
92
|
-
const result = calc(active);
|
|
93
|
-
if (result) update(result);
|
|
94
|
-
});
|
|
95
|
-
return /* @__PURE__ */ jsx("div", {
|
|
96
|
-
ref: thumbRef,
|
|
97
|
-
"data-hidden": active.length === 0,
|
|
98
|
-
...props
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
44
|
//#endregion
|
|
102
|
-
export { TOCProvider, TOCScrollArea,
|
|
45
|
+
export { TOCProvider, TOCScrollArea, toc_exports, useActiveAnchor, useActiveAnchors, useItems, useTOCItems };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
//#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.3_react-dom@19.2.5_react@19.2.5__react@19.2.5/node_modules/react-medium-image-zoom/dist/Controlled.d.ts
|
|
4
|
+
declare const enum ModalState {
|
|
5
|
+
LOADED = "LOADED",
|
|
6
|
+
LOADING = "LOADING",
|
|
7
|
+
UNLOADED = "UNLOADED",
|
|
8
|
+
UNLOADING = "UNLOADING"
|
|
9
|
+
}
|
|
10
|
+
interface ControlledProps {
|
|
11
|
+
a11yNameButtonUnzoom?: string;
|
|
12
|
+
a11yNameButtonZoom?: string;
|
|
13
|
+
canSwipeToUnzoom?: boolean;
|
|
14
|
+
children: React.ReactNode;
|
|
15
|
+
classDialog?: string;
|
|
16
|
+
IconUnzoom?: React.ElementType;
|
|
17
|
+
IconZoom?: React.ElementType;
|
|
18
|
+
isDisabled?: boolean;
|
|
19
|
+
isZoomed: boolean;
|
|
20
|
+
onZoomChange?: (value: boolean, data: {
|
|
21
|
+
event: React.SyntheticEvent | Event;
|
|
22
|
+
}) => void;
|
|
23
|
+
swipeToUnzoomThreshold?: number;
|
|
24
|
+
wrapElement?: 'div' | 'span';
|
|
25
|
+
ZoomContent?: (data: {
|
|
26
|
+
buttonUnzoom: React.ReactElement<HTMLButtonElement>;
|
|
27
|
+
img: React.ReactElement | null;
|
|
28
|
+
isZoomImgLoaded: boolean;
|
|
29
|
+
modalState: ModalState;
|
|
30
|
+
onUnzoom: (e: Event) => void;
|
|
31
|
+
}) => React.ReactElement;
|
|
32
|
+
zoomImg?: React.ImgHTMLAttributes<HTMLImageElement>;
|
|
33
|
+
zoomMargin?: number;
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { ControlledProps };
|