@expcat/tigercat-react 0.3.69 → 0.3.70

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.
Files changed (39) hide show
  1. package/dist/chunk-2EOXY2LP.mjs +353 -0
  2. package/dist/chunk-5CLXOFRZ.mjs +248 -0
  3. package/dist/chunk-6W6CRBBG.mjs +169 -0
  4. package/dist/chunk-EHYSER2Z.js +144 -0
  5. package/dist/chunk-GNMOOYHG.js +250 -0
  6. package/dist/chunk-NV3JUZ3N.js +57 -0
  7. package/dist/chunk-QFYS5QIZ.mjs +142 -0
  8. package/dist/chunk-QIJG42YQ.mjs +54 -0
  9. package/dist/chunk-U3JOBIDU.js +355 -0
  10. package/dist/chunk-Z7SXK2KO.js +171 -0
  11. package/dist/components/ActivityFeed.js +4 -4
  12. package/dist/components/ActivityFeed.mjs +2 -2
  13. package/dist/components/CropUpload.d.mts +52 -0
  14. package/dist/components/CropUpload.d.ts +52 -0
  15. package/dist/components/CropUpload.js +14 -0
  16. package/dist/components/CropUpload.mjs +5 -0
  17. package/dist/components/Image.d.mts +20 -0
  18. package/dist/components/Image.d.ts +20 -0
  19. package/dist/components/Image.js +13 -0
  20. package/dist/components/Image.mjs +4 -0
  21. package/dist/components/ImageCropper.d.mts +21 -0
  22. package/dist/components/ImageCropper.d.ts +21 -0
  23. package/dist/components/ImageCropper.js +10 -0
  24. package/dist/components/ImageCropper.mjs +1 -0
  25. package/dist/components/ImageGroup.d.mts +30 -0
  26. package/dist/components/ImageGroup.d.ts +30 -0
  27. package/dist/components/ImageGroup.js +16 -0
  28. package/dist/components/ImageGroup.mjs +3 -0
  29. package/dist/components/ImagePreview.d.mts +20 -0
  30. package/dist/components/ImagePreview.d.ts +20 -0
  31. package/dist/components/ImagePreview.js +11 -0
  32. package/dist/components/ImagePreview.mjs +2 -0
  33. package/dist/index.d.mts +5 -0
  34. package/dist/index.d.ts +5 -0
  35. package/dist/index.js +105 -76
  36. package/dist/index.mjs +22 -17
  37. package/package.json +2 -2
  38. package/dist/{chunk-MTL2QUM3.mjs → chunk-FTY2W4L2.mjs} +1 -1
  39. package/dist/{chunk-J3HKED4B.js → chunk-IOM7DWWQ.js} +1 -1
@@ -0,0 +1,171 @@
1
+ 'use strict';
2
+
3
+ var chunkNV3JUZ3N_js = require('./chunk-NV3JUZ3N.js');
4
+ var chunkGNMOOYHG_js = require('./chunk-GNMOOYHG.js');
5
+ var react = require('react');
6
+ var tigercatCore = require('@expcat/tigercat-core');
7
+ var jsxRuntime = require('react/jsx-runtime');
8
+
9
+ var SvgIcon = ({ d, className = "w-8 h-8" }) => /* @__PURE__ */ jsxRuntime.jsx(
10
+ "svg",
11
+ {
12
+ className,
13
+ xmlns: "http://www.w3.org/2000/svg",
14
+ fill: "none",
15
+ viewBox: "0 0 24 24",
16
+ stroke: "currentColor",
17
+ children: /* @__PURE__ */ jsxRuntime.jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d })
18
+ }
19
+ );
20
+ var Image = ({
21
+ src,
22
+ alt = "",
23
+ width,
24
+ height,
25
+ fit = "cover",
26
+ fallbackSrc,
27
+ preview = true,
28
+ lazy = false,
29
+ className,
30
+ errorRender,
31
+ placeholderRender,
32
+ onPreviewVisibleChange,
33
+ onClick,
34
+ onKeyDown,
35
+ style,
36
+ ...props
37
+ }) => {
38
+ const [loading, setLoading] = react.useState(true);
39
+ const [error, setError] = react.useState(false);
40
+ const [actualSrc, setActualSrc] = react.useState(lazy ? "" : src);
41
+ const [previewVisible, setPreviewVisible] = react.useState(false);
42
+ const containerRef = react.useRef(null);
43
+ const group = react.useContext(chunkNV3JUZ3N_js.ImageGroupContext);
44
+ const registeredIndexRef = react.useRef(-1);
45
+ react.useEffect(() => {
46
+ if (group && src) {
47
+ registeredIndexRef.current = group.register(src);
48
+ return () => {
49
+ group.unregister(src);
50
+ };
51
+ }
52
+ }, [group, src]);
53
+ react.useEffect(() => {
54
+ if (!lazy || !containerRef.current) return;
55
+ const observer = new IntersectionObserver(
56
+ (entries) => {
57
+ if (entries[0]?.isIntersecting) {
58
+ setActualSrc(src);
59
+ observer.disconnect();
60
+ }
61
+ },
62
+ { threshold: 0.01 }
63
+ );
64
+ observer.observe(containerRef.current);
65
+ return () => observer.disconnect();
66
+ }, [lazy, src]);
67
+ react.useEffect(() => {
68
+ if (!lazy) {
69
+ setActualSrc(src);
70
+ setError(false);
71
+ setLoading(true);
72
+ }
73
+ }, [src, lazy]);
74
+ const handleLoad = react.useCallback(() => {
75
+ setLoading(false);
76
+ setError(false);
77
+ }, []);
78
+ const handleError = react.useCallback(() => {
79
+ setLoading(false);
80
+ setError(true);
81
+ if (fallbackSrc && actualSrc !== fallbackSrc) {
82
+ setActualSrc(fallbackSrc);
83
+ setError(false);
84
+ setLoading(true);
85
+ }
86
+ }, [fallbackSrc, actualSrc]);
87
+ const handleClick = react.useCallback(
88
+ (e) => {
89
+ onClick?.(e);
90
+ if (!preview) return;
91
+ if (group) {
92
+ group.openPreview(registeredIndexRef.current >= 0 ? registeredIndexRef.current : 0);
93
+ } else {
94
+ setPreviewVisible(true);
95
+ onPreviewVisibleChange?.(true);
96
+ }
97
+ },
98
+ [preview, group, onClick, onPreviewVisibleChange]
99
+ );
100
+ const handleKeyDown = react.useCallback(
101
+ (e) => {
102
+ onKeyDown?.(e);
103
+ if (preview && (e.key === "Enter" || e.key === " ")) {
104
+ e.preventDefault();
105
+ handleClick(e);
106
+ }
107
+ },
108
+ [preview, handleClick, onKeyDown]
109
+ );
110
+ const containerClasses = react.useMemo(
111
+ () => tigercatCore.classNames(tigercatCore.imageBaseClasses, preview && tigercatCore.imagePreviewCursorClass, className),
112
+ [preview, className]
113
+ );
114
+ const imgClasses = react.useMemo(() => tigercatCore.getImageImgClasses(fit), [fit]);
115
+ const containerStyle = react.useMemo(() => {
116
+ const s = { ...style };
117
+ const w = tigercatCore.toCSSSize(width);
118
+ const h = tigercatCore.toCSSSize(height);
119
+ if (w) s.width = w;
120
+ if (h) s.height = h;
121
+ return s;
122
+ }, [width, height, style]);
123
+ let content;
124
+ if (error && !fallbackSrc) {
125
+ content = errorRender || /* @__PURE__ */ jsxRuntime.jsx("div", { className: tigercatCore.imageErrorClasses, children: /* @__PURE__ */ jsxRuntime.jsx(SvgIcon, { d: tigercatCore.imageErrorIconPath }) });
126
+ } else if (loading && !actualSrc) {
127
+ content = placeholderRender || /* @__PURE__ */ jsxRuntime.jsx("div", { className: tigercatCore.imageLoadingClasses, children: /* @__PURE__ */ jsxRuntime.jsx(SvgIcon, { d: tigercatCore.imageErrorIconPath }) });
128
+ } else {
129
+ content = /* @__PURE__ */ jsxRuntime.jsx(
130
+ "img",
131
+ {
132
+ src: actualSrc,
133
+ alt,
134
+ className: imgClasses,
135
+ onLoad: handleLoad,
136
+ onError: handleError
137
+ }
138
+ );
139
+ }
140
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
141
+ /* @__PURE__ */ jsxRuntime.jsx(
142
+ "div",
143
+ {
144
+ ...props,
145
+ ref: containerRef,
146
+ className: containerClasses,
147
+ style: containerStyle,
148
+ role: preview ? "button" : void 0,
149
+ tabIndex: preview ? 0 : void 0,
150
+ "aria-label": preview ? `Preview ${alt || "image"}` : void 0,
151
+ onClick: handleClick,
152
+ onKeyDown: handleKeyDown,
153
+ children: content
154
+ }
155
+ ),
156
+ !group && previewVisible && src && /* @__PURE__ */ jsxRuntime.jsx(
157
+ chunkGNMOOYHG_js.ImagePreview,
158
+ {
159
+ visible: previewVisible,
160
+ images: [src],
161
+ currentIndex: 0,
162
+ onVisibleChange: (val) => {
163
+ setPreviewVisible(val);
164
+ onPreviewVisibleChange?.(val);
165
+ }
166
+ }
167
+ )
168
+ ] });
169
+ };
170
+
171
+ exports.Image = Image;
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkJ3HKED4B_js = require('../chunk-J3HKED4B.js');
5
+ var chunkIOM7DWWQ_js = require('../chunk-IOM7DWWQ.js');
6
6
  require('../chunk-PR3PQUKM.js');
7
- require('../chunk-QYYAXM5F.js');
8
7
  require('../chunk-2GKTVAAB.js');
8
+ require('../chunk-QYYAXM5F.js');
9
9
  require('../chunk-VCULFIZ5.js');
10
10
  require('../chunk-I5TCE5E7.js');
11
11
  require('../chunk-SSQOCZ6O.js');
@@ -15,9 +15,9 @@ require('../chunk-CI2WHAT2.js');
15
15
 
16
16
  Object.defineProperty(exports, "ActivityFeed", {
17
17
  enumerable: true,
18
- get: function () { return chunkJ3HKED4B_js.ActivityFeed; }
18
+ get: function () { return chunkIOM7DWWQ_js.ActivityFeed; }
19
19
  });
20
20
  Object.defineProperty(exports, "default", {
21
21
  enumerable: true,
22
- get: function () { return chunkJ3HKED4B_js.ActivityFeed_default; }
22
+ get: function () { return chunkIOM7DWWQ_js.ActivityFeed_default; }
23
23
  });
@@ -1,7 +1,7 @@
1
- export { ActivityFeed, ActivityFeed_default as default } from '../chunk-MTL2QUM3.mjs';
1
+ export { ActivityFeed, ActivityFeed_default as default } from '../chunk-FTY2W4L2.mjs';
2
2
  import '../chunk-JVTAKNRO.mjs';
3
- import '../chunk-XZVQ3PJS.mjs';
4
3
  import '../chunk-AVUXDQYO.mjs';
4
+ import '../chunk-XZVQ3PJS.mjs';
5
5
  import '../chunk-TGKNEMD4.mjs';
6
6
  import '../chunk-LIV33O73.mjs';
7
7
  import '../chunk-3M2IG6IN.mjs';
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ import { ImageCropperProps, CropResult } from '@expcat/tigercat-core';
3
+
4
+ interface CropUploadProps {
5
+ /**
6
+ * Accepted file types
7
+ * @default 'image/*'
8
+ */
9
+ accept?: string;
10
+ /**
11
+ * Whether the component is disabled
12
+ * @default false
13
+ */
14
+ disabled?: boolean;
15
+ /**
16
+ * Maximum file size in bytes
17
+ */
18
+ maxSize?: number;
19
+ /**
20
+ * Props to pass to the internal ImageCropper
21
+ */
22
+ cropperProps?: Partial<Omit<ImageCropperProps, 'src'>>;
23
+ /**
24
+ * Title for the crop modal
25
+ * @default '裁剪图片'
26
+ */
27
+ modalTitle?: string;
28
+ /**
29
+ * Width of the crop modal
30
+ * @default 520
31
+ */
32
+ modalWidth?: number;
33
+ /**
34
+ * Additional CSS classes
35
+ */
36
+ className?: string;
37
+ /**
38
+ * Custom trigger content
39
+ */
40
+ children?: React.ReactNode;
41
+ /**
42
+ * Callback after cropping completes
43
+ */
44
+ onCropComplete?: (result: CropResult) => void;
45
+ /**
46
+ * Callback on error
47
+ */
48
+ onError?: (error: Error) => void;
49
+ }
50
+ declare const CropUpload: React.FC<CropUploadProps>;
51
+
52
+ export { CropUpload, type CropUploadProps };
@@ -0,0 +1,52 @@
1
+ import React from 'react';
2
+ import { ImageCropperProps, CropResult } from '@expcat/tigercat-core';
3
+
4
+ interface CropUploadProps {
5
+ /**
6
+ * Accepted file types
7
+ * @default 'image/*'
8
+ */
9
+ accept?: string;
10
+ /**
11
+ * Whether the component is disabled
12
+ * @default false
13
+ */
14
+ disabled?: boolean;
15
+ /**
16
+ * Maximum file size in bytes
17
+ */
18
+ maxSize?: number;
19
+ /**
20
+ * Props to pass to the internal ImageCropper
21
+ */
22
+ cropperProps?: Partial<Omit<ImageCropperProps, 'src'>>;
23
+ /**
24
+ * Title for the crop modal
25
+ * @default '裁剪图片'
26
+ */
27
+ modalTitle?: string;
28
+ /**
29
+ * Width of the crop modal
30
+ * @default 520
31
+ */
32
+ modalWidth?: number;
33
+ /**
34
+ * Additional CSS classes
35
+ */
36
+ className?: string;
37
+ /**
38
+ * Custom trigger content
39
+ */
40
+ children?: React.ReactNode;
41
+ /**
42
+ * Callback after cropping completes
43
+ */
44
+ onCropComplete?: (result: CropResult) => void;
45
+ /**
46
+ * Callback on error
47
+ */
48
+ onError?: (error: Error) => void;
49
+ }
50
+ declare const CropUpload: React.FC<CropUploadProps>;
51
+
52
+ export { CropUpload, type CropUploadProps };
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ var chunkEHYSER2Z_js = require('../chunk-EHYSER2Z.js');
4
+ require('../chunk-3T7L3MHX.js');
5
+ require('../chunk-U3JOBIDU.js');
6
+ require('../chunk-ZYPEO2KY.js');
7
+ require('../chunk-F24IF2QL.js');
8
+
9
+
10
+
11
+ Object.defineProperty(exports, "CropUpload", {
12
+ enumerable: true,
13
+ get: function () { return chunkEHYSER2Z_js.CropUpload; }
14
+ });
@@ -0,0 +1,5 @@
1
+ export { CropUpload } from '../chunk-QFYS5QIZ.mjs';
2
+ import '../chunk-JNLX47UL.mjs';
3
+ import '../chunk-2EOXY2LP.mjs';
4
+ import '../chunk-WLIFEALE.mjs';
5
+ import '../chunk-ENSLMM3L.mjs';
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { ImageProps as ImageProps$1 } from '@expcat/tigercat-core';
3
+
4
+ interface ImageProps extends Omit<ImageProps$1, 'className'>, Omit<React.HTMLAttributes<HTMLDivElement>, 'width' | 'height'> {
5
+ /**
6
+ * Custom error placeholder
7
+ */
8
+ errorRender?: React.ReactNode;
9
+ /**
10
+ * Custom loading placeholder
11
+ */
12
+ placeholderRender?: React.ReactNode;
13
+ /**
14
+ * Callback when preview visibility changes
15
+ */
16
+ onPreviewVisibleChange?: (visible: boolean) => void;
17
+ }
18
+ declare const Image: React.FC<ImageProps>;
19
+
20
+ export { Image, type ImageProps };
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { ImageProps as ImageProps$1 } from '@expcat/tigercat-core';
3
+
4
+ interface ImageProps extends Omit<ImageProps$1, 'className'>, Omit<React.HTMLAttributes<HTMLDivElement>, 'width' | 'height'> {
5
+ /**
6
+ * Custom error placeholder
7
+ */
8
+ errorRender?: React.ReactNode;
9
+ /**
10
+ * Custom loading placeholder
11
+ */
12
+ placeholderRender?: React.ReactNode;
13
+ /**
14
+ * Callback when preview visibility changes
15
+ */
16
+ onPreviewVisibleChange?: (visible: boolean) => void;
17
+ }
18
+ declare const Image: React.FC<ImageProps>;
19
+
20
+ export { Image, type ImageProps };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var chunkZ7SXK2KO_js = require('../chunk-Z7SXK2KO.js');
4
+ require('../chunk-NV3JUZ3N.js');
5
+ require('../chunk-GNMOOYHG.js');
6
+ require('../chunk-ZYPEO2KY.js');
7
+
8
+
9
+
10
+ Object.defineProperty(exports, "Image", {
11
+ enumerable: true,
12
+ get: function () { return chunkZ7SXK2KO_js.Image; }
13
+ });
@@ -0,0 +1,4 @@
1
+ export { Image } from '../chunk-6W6CRBBG.mjs';
2
+ import '../chunk-QIJG42YQ.mjs';
3
+ import '../chunk-5CLXOFRZ.mjs';
4
+ import '../chunk-WLIFEALE.mjs';
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { ImageCropperProps as ImageCropperProps$1, CropRect, CropResult } from '@expcat/tigercat-core';
3
+
4
+ interface ImageCropperProps extends Omit<ImageCropperProps$1, 'className'> {
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ /**
8
+ * Callback when crop area changes
9
+ */
10
+ onCropChange?: (rect: CropRect) => void;
11
+ /**
12
+ * Callback when image is loaded and ready
13
+ */
14
+ onReady?: () => void;
15
+ }
16
+ interface ImageCropperRef {
17
+ getCropResult: () => Promise<CropResult>;
18
+ }
19
+ declare const ImageCropper: React.ForwardRefExoticComponent<ImageCropperProps & React.RefAttributes<ImageCropperRef>>;
20
+
21
+ export { ImageCropper, type ImageCropperProps, type ImageCropperRef };
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { ImageCropperProps as ImageCropperProps$1, CropRect, CropResult } from '@expcat/tigercat-core';
3
+
4
+ interface ImageCropperProps extends Omit<ImageCropperProps$1, 'className'> {
5
+ className?: string;
6
+ style?: React.CSSProperties;
7
+ /**
8
+ * Callback when crop area changes
9
+ */
10
+ onCropChange?: (rect: CropRect) => void;
11
+ /**
12
+ * Callback when image is loaded and ready
13
+ */
14
+ onReady?: () => void;
15
+ }
16
+ interface ImageCropperRef {
17
+ getCropResult: () => Promise<CropResult>;
18
+ }
19
+ declare const ImageCropper: React.ForwardRefExoticComponent<ImageCropperProps & React.RefAttributes<ImageCropperRef>>;
20
+
21
+ export { ImageCropper, type ImageCropperProps, type ImageCropperRef };
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ var chunkU3JOBIDU_js = require('../chunk-U3JOBIDU.js');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "ImageCropper", {
8
+ enumerable: true,
9
+ get: function () { return chunkU3JOBIDU_js.ImageCropper; }
10
+ });
@@ -0,0 +1 @@
1
+ export { ImageCropper } from '../chunk-2EOXY2LP.mjs';
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+
3
+ interface ImageGroupContextValue {
4
+ register: (src: string) => number;
5
+ unregister: (src: string) => void;
6
+ openPreview: (index: number) => void;
7
+ }
8
+ declare const ImageGroupContext: React.Context<ImageGroupContextValue | null>;
9
+ interface ImageGroupProps {
10
+ /**
11
+ * Whether to enable preview for all child images
12
+ * @default true
13
+ */
14
+ preview?: boolean;
15
+ /**
16
+ * Callback when preview visibility changes
17
+ */
18
+ onPreviewVisibleChange?: (visible: boolean) => void;
19
+ /**
20
+ * Children
21
+ */
22
+ children?: React.ReactNode;
23
+ /**
24
+ * Additional CSS classes
25
+ */
26
+ className?: string;
27
+ }
28
+ declare const ImageGroup: React.FC<ImageGroupProps>;
29
+
30
+ export { ImageGroup, ImageGroupContext, type ImageGroupContextValue, type ImageGroupProps };
@@ -0,0 +1,30 @@
1
+ import React from 'react';
2
+
3
+ interface ImageGroupContextValue {
4
+ register: (src: string) => number;
5
+ unregister: (src: string) => void;
6
+ openPreview: (index: number) => void;
7
+ }
8
+ declare const ImageGroupContext: React.Context<ImageGroupContextValue | null>;
9
+ interface ImageGroupProps {
10
+ /**
11
+ * Whether to enable preview for all child images
12
+ * @default true
13
+ */
14
+ preview?: boolean;
15
+ /**
16
+ * Callback when preview visibility changes
17
+ */
18
+ onPreviewVisibleChange?: (visible: boolean) => void;
19
+ /**
20
+ * Children
21
+ */
22
+ children?: React.ReactNode;
23
+ /**
24
+ * Additional CSS classes
25
+ */
26
+ className?: string;
27
+ }
28
+ declare const ImageGroup: React.FC<ImageGroupProps>;
29
+
30
+ export { ImageGroup, ImageGroupContext, type ImageGroupContextValue, type ImageGroupProps };
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var chunkNV3JUZ3N_js = require('../chunk-NV3JUZ3N.js');
4
+ require('../chunk-GNMOOYHG.js');
5
+ require('../chunk-ZYPEO2KY.js');
6
+
7
+
8
+
9
+ Object.defineProperty(exports, "ImageGroup", {
10
+ enumerable: true,
11
+ get: function () { return chunkNV3JUZ3N_js.ImageGroup; }
12
+ });
13
+ Object.defineProperty(exports, "ImageGroupContext", {
14
+ enumerable: true,
15
+ get: function () { return chunkNV3JUZ3N_js.ImageGroupContext; }
16
+ });
@@ -0,0 +1,3 @@
1
+ export { ImageGroup, ImageGroupContext } from '../chunk-QIJG42YQ.mjs';
2
+ import '../chunk-5CLXOFRZ.mjs';
3
+ import '../chunk-WLIFEALE.mjs';
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { ImagePreviewProps as ImagePreviewProps$1 } from '@expcat/tigercat-core';
3
+
4
+ interface ImagePreviewProps extends ImagePreviewProps$1 {
5
+ /**
6
+ * Callback when visibility changes
7
+ */
8
+ onVisibleChange?: (visible: boolean) => void;
9
+ /**
10
+ * Callback when current index changes
11
+ */
12
+ onCurrentIndexChange?: (index: number) => void;
13
+ /**
14
+ * Callback when scale changes
15
+ */
16
+ onScaleChange?: (scale: number) => void;
17
+ }
18
+ declare const ImagePreview: React.FC<ImagePreviewProps>;
19
+
20
+ export { ImagePreview, type ImagePreviewProps };
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { ImagePreviewProps as ImagePreviewProps$1 } from '@expcat/tigercat-core';
3
+
4
+ interface ImagePreviewProps extends ImagePreviewProps$1 {
5
+ /**
6
+ * Callback when visibility changes
7
+ */
8
+ onVisibleChange?: (visible: boolean) => void;
9
+ /**
10
+ * Callback when current index changes
11
+ */
12
+ onCurrentIndexChange?: (index: number) => void;
13
+ /**
14
+ * Callback when scale changes
15
+ */
16
+ onScaleChange?: (scale: number) => void;
17
+ }
18
+ declare const ImagePreview: React.FC<ImagePreviewProps>;
19
+
20
+ export { ImagePreview, type ImagePreviewProps };
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var chunkGNMOOYHG_js = require('../chunk-GNMOOYHG.js');
4
+ require('../chunk-ZYPEO2KY.js');
5
+
6
+
7
+
8
+ Object.defineProperty(exports, "ImagePreview", {
9
+ enumerable: true,
10
+ get: function () { return chunkGNMOOYHG_js.ImagePreview; }
11
+ });
@@ -0,0 +1,2 @@
1
+ export { ImagePreview } from '../chunk-5CLXOFRZ.mjs';
2
+ import '../chunk-WLIFEALE.mjs';
package/dist/index.d.mts CHANGED
@@ -35,6 +35,10 @@ export { Tag, TagProps } from './components/Tag.mjs';
35
35
  export { Badge, BadgeProps } from './components/Badge.mjs';
36
36
  export { Card, CardProps } from './components/Card.mjs';
37
37
  export { Avatar, AvatarProps } from './components/Avatar.mjs';
38
+ export { Image, ImageProps } from './components/Image.mjs';
39
+ export { ImagePreview, ImagePreviewProps } from './components/ImagePreview.mjs';
40
+ export { ImageGroup, ImageGroupContext, ImageGroupContextValue, ImageGroupProps } from './components/ImageGroup.mjs';
41
+ export { ImageCropper, ImageCropperProps, ImageCropperRef } from './components/ImageCropper.mjs';
38
42
  export { List, ListProps } from './components/List.mjs';
39
43
  export { default as Descriptions, DescriptionsProps } from './components/Descriptions.mjs';
40
44
  export { Timeline, TimelineProps } from './components/Timeline.mjs';
@@ -72,6 +76,7 @@ export { default as CommentThread, CommentThreadProps } from './components/Comme
72
76
  export { default as NotificationCenter, NotificationCenterProps } from './components/NotificationCenter.mjs';
73
77
  export { default as DataTableWithToolbar, DataTableWithToolbarProps } from './components/DataTableWithToolbar.mjs';
74
78
  export { default as FormWizard, FormWizardProps } from './components/FormWizard.mjs';
79
+ export { CropUpload, CropUploadProps } from './components/CropUpload.mjs';
75
80
  export { default as ChartCanvas, ChartCanvasProps } from './components/ChartCanvas.mjs';
76
81
  export { default as ChartAxis, ChartAxisProps } from './components/ChartAxis.mjs';
77
82
  export { default as ChartGrid, ChartGridProps } from './components/ChartGrid.mjs';
package/dist/index.d.ts CHANGED
@@ -35,6 +35,10 @@ export { Tag, TagProps } from './components/Tag.js';
35
35
  export { Badge, BadgeProps } from './components/Badge.js';
36
36
  export { Card, CardProps } from './components/Card.js';
37
37
  export { Avatar, AvatarProps } from './components/Avatar.js';
38
+ export { Image, ImageProps } from './components/Image.js';
39
+ export { ImagePreview, ImagePreviewProps } from './components/ImagePreview.js';
40
+ export { ImageGroup, ImageGroupContext, ImageGroupContextValue, ImageGroupProps } from './components/ImageGroup.js';
41
+ export { ImageCropper, ImageCropperProps, ImageCropperRef } from './components/ImageCropper.js';
38
42
  export { List, ListProps } from './components/List.js';
39
43
  export { default as Descriptions, DescriptionsProps } from './components/Descriptions.js';
40
44
  export { Timeline, TimelineProps } from './components/Timeline.js';
@@ -72,6 +76,7 @@ export { default as CommentThread, CommentThreadProps } from './components/Comme
72
76
  export { default as NotificationCenter, NotificationCenterProps } from './components/NotificationCenter.js';
73
77
  export { default as DataTableWithToolbar, DataTableWithToolbarProps } from './components/DataTableWithToolbar.js';
74
78
  export { default as FormWizard, FormWizardProps } from './components/FormWizard.js';
79
+ export { CropUpload, CropUploadProps } from './components/CropUpload.js';
75
80
  export { default as ChartCanvas, ChartCanvasProps } from './components/ChartCanvas.js';
76
81
  export { default as ChartAxis, ChartAxisProps } from './components/ChartAxis.js';
77
82
  export { default as ChartGrid, ChartGridProps } from './components/ChartGrid.js';