@particle-academy/react-fancy 5.48.1 → 5.49.0
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/CHANGELOG.md +19 -0
- package/dist/FauxClient.types-Dtk9aRs6.d.cts +64 -0
- package/dist/FauxClient.types-Dtk9aRs6.d.ts +64 -0
- package/dist/{ImageViewer.types-BaqlDeuo.d.cts → ImageViewer.types-BDTxBYEN.d.ts} +9 -0
- package/dist/{ImageViewer.types-BaqlDeuo.d.ts → ImageViewer.types-CtqaA6KV.d.cts} +9 -0
- package/dist/{PdfViewer.types-_u6vboSl.d.ts → PdfViewer.types-Bgn9EmZT.d.cts} +8 -0
- package/dist/{PdfViewer.types-_u6vboSl.d.cts → PdfViewer.types-xnPpdjJa.d.ts} +8 -0
- package/dist/{chunk-ZMD3PIYF.cjs → chunk-KST6GW2B.cjs} +6 -6
- package/dist/{chunk-ZMD3PIYF.cjs.map → chunk-KST6GW2B.cjs.map} +1 -1
- package/dist/{chunk-V35A6B7A.cjs → chunk-LP3HMRQT.cjs} +13 -4
- package/dist/chunk-LP3HMRQT.cjs.map +1 -0
- package/dist/{chunk-KO2HLNBB.js → chunk-MQEV7XEG.js} +4 -4
- package/dist/{chunk-KO2HLNBB.js.map → chunk-MQEV7XEG.js.map} +1 -1
- package/dist/{chunk-SOYORSLZ.js → chunk-VKRQHLM5.js} +13 -4
- package/dist/chunk-VKRQHLM5.js.map +1 -0
- package/dist/{chunk-QDVDBUJM.cjs → chunk-WBJRFWZE.cjs} +26 -5
- package/dist/chunk-WBJRFWZE.cjs.map +1 -0
- package/dist/{chunk-MUCXXYDN.js → chunk-XOWWNG7D.js} +26 -5
- package/dist/chunk-XOWWNG7D.js.map +1 -0
- package/dist/faux-client.d.cts +2 -63
- package/dist/faux-client.d.ts +2 -63
- package/dist/image-viewer.cjs +4 -2
- package/dist/image-viewer.d.cts +3 -2
- package/dist/image-viewer.d.ts +3 -2
- package/dist/image-viewer.js +3 -1
- package/dist/{index-CgPpIw_O.d.cts → index-AesVUjQE.d.cts} +2 -2
- package/dist/{index-IeivGsNg.d.ts → index-D3wJ8hrZ.d.ts} +2 -2
- package/dist/index.cjs +12 -12
- package/dist/index.d.cts +5 -4
- package/dist/index.d.ts +5 -4
- package/dist/index.js +4 -4
- package/dist/media-viewer.cjs +6 -4
- package/dist/media-viewer.d.cts +4 -3
- package/dist/media-viewer.d.ts +4 -3
- package/dist/media-viewer.js +5 -3
- package/dist/pdf-viewer.cjs +4 -2
- package/dist/pdf-viewer.d.cts +2 -1
- package/dist/pdf-viewer.d.ts +2 -1
- package/dist/pdf-viewer.js +3 -1
- package/package.json +1 -1
- package/dist/chunk-MUCXXYDN.js.map +0 -1
- package/dist/chunk-QDVDBUJM.cjs.map +0 -1
- package/dist/chunk-SOYORSLZ.js.map +0 -1
- package/dist/chunk-V35A6B7A.cjs.map +0 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FauxClient } from './chunk-XWXV6HSK.js';
|
|
1
2
|
import { usePanZoom } from './chunk-CPY7NHXM.js';
|
|
2
3
|
import { cn } from './chunk-MMW2JGKZ.js';
|
|
3
4
|
import { forwardRef, useRef, useState, useCallback } from 'react';
|
|
@@ -29,7 +30,9 @@ var ImageViewer = forwardRef(
|
|
|
29
30
|
onLoad,
|
|
30
31
|
onError,
|
|
31
32
|
className,
|
|
32
|
-
style
|
|
33
|
+
style,
|
|
34
|
+
frame = false,
|
|
35
|
+
frameProps
|
|
33
36
|
}, ref) => {
|
|
34
37
|
const containerRef = useRef(null);
|
|
35
38
|
const [status, setStatus] = useState("loading");
|
|
@@ -78,15 +81,17 @@ var ImageViewer = forwardRef(
|
|
|
78
81
|
[setViewport, minZoom, maxZoom]
|
|
79
82
|
);
|
|
80
83
|
const reset = useCallback(() => setViewport(DEFAULT_VIEWPORT), [setViewport]);
|
|
81
|
-
const showControls = (controls ?? zoomable) && interactive;
|
|
84
|
+
const showControls = !frame && (controls ?? zoomable) && interactive;
|
|
82
85
|
const transform = `translate(${current.panX}px, ${current.panY}px) scale(${current.zoom})`;
|
|
83
|
-
|
|
86
|
+
const viewer = /* @__PURE__ */ jsxs(
|
|
84
87
|
"div",
|
|
85
88
|
{
|
|
86
89
|
ref,
|
|
87
90
|
"data-react-fancy-image-viewer": "",
|
|
88
91
|
className: cn(
|
|
89
92
|
"relative isolate overflow-hidden rounded-md select-none",
|
|
93
|
+
// In the frame it fills the frame's body; standalone, the caller sizes it.
|
|
94
|
+
frame && "h-full w-full rounded-none",
|
|
90
95
|
checkerboard ? "fancy-checkerboard" : "bg-zinc-100 dark:bg-zinc-900",
|
|
91
96
|
className
|
|
92
97
|
),
|
|
@@ -188,10 +193,26 @@ var ImageViewer = forwardRef(
|
|
|
188
193
|
]
|
|
189
194
|
}
|
|
190
195
|
);
|
|
196
|
+
if (!frame) return viewer;
|
|
197
|
+
return /* @__PURE__ */ jsx(
|
|
198
|
+
FauxClient,
|
|
199
|
+
{
|
|
200
|
+
variant: "device",
|
|
201
|
+
controls: true,
|
|
202
|
+
fill: true,
|
|
203
|
+
applyZoom: false,
|
|
204
|
+
zoom: current.zoom,
|
|
205
|
+
onZoomChange: (z) => z === 1 ? reset() : zoomBy(z / current.zoom),
|
|
206
|
+
minZoom,
|
|
207
|
+
maxZoom,
|
|
208
|
+
...frameProps,
|
|
209
|
+
children: viewer
|
|
210
|
+
}
|
|
211
|
+
);
|
|
191
212
|
}
|
|
192
213
|
);
|
|
193
214
|
ImageViewer.displayName = "ImageViewer";
|
|
194
215
|
|
|
195
216
|
export { ImageViewer };
|
|
196
|
-
//# sourceMappingURL=chunk-
|
|
197
|
-
//# sourceMappingURL=chunk-
|
|
217
|
+
//# sourceMappingURL=chunk-XOWWNG7D.js.map
|
|
218
|
+
//# sourceMappingURL=chunk-XOWWNG7D.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ImageViewer/ImageViewer.tsx"],"names":[],"mappings":";;;;;;AAYA,IA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XOWWNG7D.js","sourcesContent":["import { FauxClient } from \"../FauxClient\";\nimport {\n forwardRef,\n useCallback,\n useRef,\n useState,\n type CSSProperties,\n} from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { usePanZoom } from \"../../hooks/use-pan-zoom\";\nimport type { ImageViewerProps, ImageViewerViewport } from \"./ImageViewer.types\";\n\nconst DEFAULT_VIEWPORT: ImageViewerViewport = { panX: 0, panY: 0, zoom: 1 };\n\nconst fitClasses: Record<NonNullable<ImageViewerProps[\"fit\"]>, string> = {\n contain: \"h-full w-full object-contain\",\n cover: \"h-full w-full object-cover\",\n none: \"max-w-none object-none\",\n};\n\nfunction clamp(n: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, n));\n}\n\n/**\n * A standalone image viewer: fits the image to its container, with optional\n * Ctrl/⌘+wheel zoom, click-drag panning, and a transparency checkerboard. Works\n * anywhere on its own and is also what `<MediaViewer>` renders for images.\n *\n * The pan/zoom viewport is controllable (`viewport` + `onViewportChange`) so an\n * agent bridge can drive it; it's uncontrolled by default.\n *\n * ```tsx\n * <ImageViewer src=\"/logo.png\" alt=\"logo.png\" style={{ height: 320 }} />\n * ```\n */\nexport const ImageViewer = forwardRef<HTMLDivElement, ImageViewerProps>(\n (\n {\n src,\n alt = \"\",\n fit = \"contain\",\n zoomable = true,\n pannable = true,\n controls,\n minZoom = 0.25,\n maxZoom = 8,\n checkerboard = true,\n viewport,\n defaultViewport,\n onViewportChange,\n onLoad,\n onError,\n className,\n style,\n frame = false,\n frameProps,\n },\n ref,\n ) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const [status, setStatus] = useState<\"loading\" | \"loaded\" | \"error\">(\"loading\");\n\n // Controllable viewport supporting functional updates (usePanZoom needs them).\n const isControlled = viewport !== undefined;\n const [internal, setInternal] = useState<ImageViewerViewport>(\n defaultViewport ?? DEFAULT_VIEWPORT,\n );\n const current = isControlled ? viewport! : internal;\n const currentRef = useRef(current);\n currentRef.current = current;\n\n const setViewport = useCallback(\n (\n next:\n | ImageViewerViewport\n | ((prev: ImageViewerViewport) => ImageViewerViewport),\n ) => {\n const resolved =\n typeof next === \"function\" ? next(currentRef.current) : next;\n if (!isControlled) setInternal(resolved);\n onViewportChange?.(resolved);\n },\n [isControlled, onViewportChange],\n );\n\n const interactive = status === \"loaded\";\n const { containerProps, isPanning } = usePanZoom({\n viewport: current,\n setViewport,\n minZoom,\n maxZoom,\n pannable: pannable && interactive,\n zoomable: zoomable && interactive,\n containerRef,\n });\n\n // Zoom about the container centre — used by the +/− buttons.\n const zoomBy = useCallback(\n (factor: number) => {\n const el = containerRef.current;\n if (!el) return;\n const rect = el.getBoundingClientRect();\n const cx = rect.width / 2;\n const cy = rect.height / 2;\n setViewport((prev) => {\n const newZoom = clamp(prev.zoom * factor, minZoom, maxZoom);\n const ratio = newZoom / prev.zoom;\n return {\n zoom: newZoom,\n panX: cx - (cx - prev.panX) * ratio,\n panY: cy - (cy - prev.panY) * ratio,\n };\n });\n },\n [setViewport, minZoom, maxZoom],\n );\n\n const reset = useCallback(() => setViewport(DEFAULT_VIEWPORT), [setViewport]);\n\n const showControls = !frame && (controls ?? zoomable) && interactive;\n const transform = `translate(${current.panX}px, ${current.panY}px) scale(${current.zoom})`;\n\n const viewer = (\n <div\n ref={ref}\n data-react-fancy-image-viewer=\"\"\n className={cn(\n \"relative isolate overflow-hidden rounded-md select-none\",\n // In the frame it fills the frame's body; standalone, the caller sizes it.\n frame && \"h-full w-full rounded-none\",\n checkerboard\n ? \"fancy-checkerboard\"\n : \"bg-zinc-100 dark:bg-zinc-900\",\n className,\n )}\n style={style}\n >\n <div\n ref={containerRef}\n data-canvas-bg=\"\"\n className={cn(\n \"absolute inset-0 flex items-center justify-center\",\n isPanning\n ? \"cursor-grabbing\"\n : pannable && interactive\n ? \"cursor-grab\"\n : \"\",\n )}\n style={\n {\n transform,\n transformOrigin: \"0 0\",\n willChange: \"transform\",\n touchAction: zoomable || pannable ? \"none\" : undefined,\n } as CSSProperties\n }\n onDoubleClick={zoomable ? reset : undefined}\n {...containerProps}\n >\n <img\n src={src}\n alt={alt}\n draggable={false}\n onLoad={() => {\n setStatus(\"loaded\");\n onLoad?.();\n }}\n onError={() => {\n setStatus(\"error\");\n onError?.();\n }}\n className={cn(\n \"pointer-events-none block\",\n status === \"error\" && \"hidden\",\n fitClasses[fit],\n )}\n />\n </div>\n\n {status === \"error\" && (\n <div\n data-react-fancy-image-viewer-error=\"\"\n className=\"absolute inset-0 flex flex-col items-center justify-center gap-1 p-4 text-center text-sm text-zinc-500 dark:text-zinc-400\"\n >\n <span className=\"font-medium\">Couldn't load image</span>\n <span className=\"max-w-full truncate text-xs opacity-70\">{alt || src}</span>\n </div>\n )}\n\n {showControls && (\n <div\n data-react-fancy-image-viewer-controls=\"\"\n className=\"absolute bottom-2 right-2 flex items-center gap-0.5 rounded-md border border-zinc-200 bg-white/90 p-0.5 text-zinc-700 shadow-sm backdrop-blur dark:border-zinc-700 dark:bg-zinc-900/90 dark:text-zinc-200\"\n >\n <button\n type=\"button\"\n aria-label=\"Zoom out\"\n onClick={() => zoomBy(1 / 1.25)}\n className=\"flex h-6 w-6 items-center justify-center rounded text-base leading-none hover:bg-zinc-100 dark:hover:bg-zinc-800\"\n >\n −\n </button>\n <button\n type=\"button\"\n aria-label=\"Reset zoom\"\n onClick={reset}\n className=\"min-w-[3rem] rounded px-1 text-center text-xs tabular-nums hover:bg-zinc-100 dark:hover:bg-zinc-800\"\n >\n {Math.round(current.zoom * 100)}%\n </button>\n <button\n type=\"button\"\n aria-label=\"Zoom in\"\n onClick={() => zoomBy(1.25)}\n className=\"flex h-6 w-6 items-center justify-center rounded text-base leading-none hover:bg-zinc-100 dark:hover:bg-zinc-800\"\n >\n +\n </button>\n </div>\n )}\n </div>\n );\n\n if (!frame) return viewer;\n\n // The frame's bar drives the image's own zoom (about the centre), and the\n // image's boxed bar steps aside: one set of controls, revealed on hover.\n return (\n <FauxClient\n variant=\"device\"\n controls\n fill\n applyZoom={false}\n zoom={current.zoom}\n onZoomChange={(z) => (z === 1 ? reset() : zoomBy(z / current.zoom))}\n minZoom={minZoom}\n maxZoom={maxZoom}\n {...frameProps}\n >\n {viewer}\n </FauxClient>\n );\n },\n);\n\nImageViewer.displayName = \"ImageViewer\";\n"]}
|
package/dist/faux-client.d.cts
CHANGED
|
@@ -1,66 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
interface FauxClientProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
5
|
-
/** Chrome style: a browser window, a device bezel, or no chrome. */
|
|
6
|
-
variant?: "browser" | "device" | "bare";
|
|
7
|
-
/** Address-bar / title text (browser variant). */
|
|
8
|
-
url?: ReactNode;
|
|
9
|
-
/** Right-aligned meta text in the bar (browser variant). */
|
|
10
|
-
meta?: ReactNode;
|
|
11
|
-
/** Show the macOS traffic-light dots (browser variant). */
|
|
12
|
-
dots?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Logical content width in px. When set, children render at this width and are
|
|
15
|
-
* scaled to fit (see {@link FauxClientProps.scale}) — for downscaled previews
|
|
16
|
-
* of full pages/apps. Omit to render children at natural size (chrome only).
|
|
17
|
-
*/
|
|
18
|
-
width?: number;
|
|
19
|
-
/** `"fit"` scales the logical {@link FauxClientProps.width} to the frame; a number is a fixed scale. */
|
|
20
|
-
scale?: number | "fit";
|
|
21
|
-
/**
|
|
22
|
-
* A zoom bar (−, percentage, +) and a full-screen button, in the frame's
|
|
23
|
-
* bottom-right corner. `true` for both; `{ zoom: false }` or
|
|
24
|
-
* `{ fullscreen: false }` to leave one out. Default `false`.
|
|
25
|
-
*/
|
|
26
|
-
controls?: boolean | {
|
|
27
|
-
zoom?: boolean;
|
|
28
|
-
fullscreen?: boolean;
|
|
29
|
-
};
|
|
30
|
-
/** The zoom, 1 = fit. Controllable, so an agent can read and set it. */
|
|
31
|
-
zoom?: number;
|
|
32
|
-
defaultZoom?: number;
|
|
33
|
-
onZoomChange?: (zoom: number) => void;
|
|
34
|
-
/** Default 0.5. */
|
|
35
|
-
minZoom?: number;
|
|
36
|
-
/** Default 4. */
|
|
37
|
-
maxZoom?: number;
|
|
38
|
-
/**
|
|
39
|
-
* Called when the frame enters or leaves full screen, however it happened
|
|
40
|
-
* (the button, Esc, the browser). The frame also carries
|
|
41
|
-
* `data-fullscreen="true"` while it is, for styling the content.
|
|
42
|
-
*/
|
|
43
|
-
onFullscreenChange?: (fullscreen: boolean) => void;
|
|
44
|
-
/**
|
|
45
|
-
* Take the parent's height, and give the content whatever the chrome leaves.
|
|
46
|
-
* For content that sizes itself to its box (a slide viewer, a spreadsheet)
|
|
47
|
-
* rather than to what is in it. Default `false`.
|
|
48
|
-
*/
|
|
49
|
-
fill?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* `false`: the frame shows the zoom controls and keeps the zoom state, but
|
|
52
|
-
* does not scale the content; the content reads `zoom` (via `onZoomChange` or
|
|
53
|
-
* a controlled `zoom`) and zooms itself. For content that fits itself to its
|
|
54
|
-
* box (a slide viewer), which a scaled frame only re-fits. Default `true`.
|
|
55
|
-
*/
|
|
56
|
-
applyZoom?: boolean;
|
|
57
|
-
className?: string;
|
|
58
|
-
/** Class for the browser bar. */
|
|
59
|
-
barClassName?: string;
|
|
60
|
-
/** Class for the content viewport. */
|
|
61
|
-
bodyClassName?: string;
|
|
62
|
-
children?: ReactNode;
|
|
63
|
-
}
|
|
2
|
+
import { F as FauxClientProps } from './FauxClient.types-Dtk9aRs6.cjs';
|
|
64
3
|
|
|
65
4
|
/**
|
|
66
5
|
* A frame that mimics a browser window or device, rendering **real UI** inside.
|
|
@@ -75,4 +14,4 @@ interface FauxClientProps extends Omit<HTMLAttributes<HTMLDivElement>, "children
|
|
|
75
14
|
*/
|
|
76
15
|
declare const FauxClient: react.ForwardRefExoticComponent<FauxClientProps & react.RefAttributes<HTMLDivElement>>;
|
|
77
16
|
|
|
78
|
-
export { FauxClient,
|
|
17
|
+
export { FauxClient, FauxClientProps };
|
package/dist/faux-client.d.ts
CHANGED
|
@@ -1,66 +1,5 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
interface FauxClientProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
|
|
5
|
-
/** Chrome style: a browser window, a device bezel, or no chrome. */
|
|
6
|
-
variant?: "browser" | "device" | "bare";
|
|
7
|
-
/** Address-bar / title text (browser variant). */
|
|
8
|
-
url?: ReactNode;
|
|
9
|
-
/** Right-aligned meta text in the bar (browser variant). */
|
|
10
|
-
meta?: ReactNode;
|
|
11
|
-
/** Show the macOS traffic-light dots (browser variant). */
|
|
12
|
-
dots?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Logical content width in px. When set, children render at this width and are
|
|
15
|
-
* scaled to fit (see {@link FauxClientProps.scale}) — for downscaled previews
|
|
16
|
-
* of full pages/apps. Omit to render children at natural size (chrome only).
|
|
17
|
-
*/
|
|
18
|
-
width?: number;
|
|
19
|
-
/** `"fit"` scales the logical {@link FauxClientProps.width} to the frame; a number is a fixed scale. */
|
|
20
|
-
scale?: number | "fit";
|
|
21
|
-
/**
|
|
22
|
-
* A zoom bar (−, percentage, +) and a full-screen button, in the frame's
|
|
23
|
-
* bottom-right corner. `true` for both; `{ zoom: false }` or
|
|
24
|
-
* `{ fullscreen: false }` to leave one out. Default `false`.
|
|
25
|
-
*/
|
|
26
|
-
controls?: boolean | {
|
|
27
|
-
zoom?: boolean;
|
|
28
|
-
fullscreen?: boolean;
|
|
29
|
-
};
|
|
30
|
-
/** The zoom, 1 = fit. Controllable, so an agent can read and set it. */
|
|
31
|
-
zoom?: number;
|
|
32
|
-
defaultZoom?: number;
|
|
33
|
-
onZoomChange?: (zoom: number) => void;
|
|
34
|
-
/** Default 0.5. */
|
|
35
|
-
minZoom?: number;
|
|
36
|
-
/** Default 4. */
|
|
37
|
-
maxZoom?: number;
|
|
38
|
-
/**
|
|
39
|
-
* Called when the frame enters or leaves full screen, however it happened
|
|
40
|
-
* (the button, Esc, the browser). The frame also carries
|
|
41
|
-
* `data-fullscreen="true"` while it is, for styling the content.
|
|
42
|
-
*/
|
|
43
|
-
onFullscreenChange?: (fullscreen: boolean) => void;
|
|
44
|
-
/**
|
|
45
|
-
* Take the parent's height, and give the content whatever the chrome leaves.
|
|
46
|
-
* For content that sizes itself to its box (a slide viewer, a spreadsheet)
|
|
47
|
-
* rather than to what is in it. Default `false`.
|
|
48
|
-
*/
|
|
49
|
-
fill?: boolean;
|
|
50
|
-
/**
|
|
51
|
-
* `false`: the frame shows the zoom controls and keeps the zoom state, but
|
|
52
|
-
* does not scale the content; the content reads `zoom` (via `onZoomChange` or
|
|
53
|
-
* a controlled `zoom`) and zooms itself. For content that fits itself to its
|
|
54
|
-
* box (a slide viewer), which a scaled frame only re-fits. Default `true`.
|
|
55
|
-
*/
|
|
56
|
-
applyZoom?: boolean;
|
|
57
|
-
className?: string;
|
|
58
|
-
/** Class for the browser bar. */
|
|
59
|
-
barClassName?: string;
|
|
60
|
-
/** Class for the content viewport. */
|
|
61
|
-
bodyClassName?: string;
|
|
62
|
-
children?: ReactNode;
|
|
63
|
-
}
|
|
2
|
+
import { F as FauxClientProps } from './FauxClient.types-Dtk9aRs6.js';
|
|
64
3
|
|
|
65
4
|
/**
|
|
66
5
|
* A frame that mimics a browser window or device, rendering **real UI** inside.
|
|
@@ -75,4 +14,4 @@ interface FauxClientProps extends Omit<HTMLAttributes<HTMLDivElement>, "children
|
|
|
75
14
|
*/
|
|
76
15
|
declare const FauxClient: react.ForwardRefExoticComponent<FauxClientProps & react.RefAttributes<HTMLDivElement>>;
|
|
77
16
|
|
|
78
|
-
export { FauxClient,
|
|
17
|
+
export { FauxClient, FauxClientProps };
|
package/dist/image-viewer.cjs
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkWBJRFWZE_cjs = require('./chunk-WBJRFWZE.cjs');
|
|
4
|
+
require('./chunk-DUOZSOSB.cjs');
|
|
4
5
|
require('./chunk-T6YELZPJ.cjs');
|
|
6
|
+
require('./chunk-SNHU2AI4.cjs');
|
|
5
7
|
require('./chunk-ZU5Q77OT.cjs');
|
|
6
8
|
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
Object.defineProperty(exports, "ImageViewer", {
|
|
10
12
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkWBJRFWZE_cjs.ImageViewer; }
|
|
12
14
|
});
|
|
13
15
|
//# sourceMappingURL=image-viewer.cjs.map
|
|
14
16
|
//# sourceMappingURL=image-viewer.cjs.map
|
package/dist/image-viewer.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { I as ImageViewerProps } from './ImageViewer.types-
|
|
3
|
-
export { a as ImageViewerViewport } from './ImageViewer.types-
|
|
2
|
+
import { I as ImageViewerProps } from './ImageViewer.types-CtqaA6KV.cjs';
|
|
3
|
+
export { a as ImageViewerViewport } from './ImageViewer.types-CtqaA6KV.cjs';
|
|
4
|
+
import './FauxClient.types-Dtk9aRs6.cjs';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* A standalone image viewer: fits the image to its container, with optional
|
package/dist/image-viewer.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { I as ImageViewerProps } from './ImageViewer.types-
|
|
3
|
-
export { a as ImageViewerViewport } from './ImageViewer.types-
|
|
2
|
+
import { I as ImageViewerProps } from './ImageViewer.types-BDTxBYEN.js';
|
|
3
|
+
export { a as ImageViewerViewport } from './ImageViewer.types-BDTxBYEN.js';
|
|
4
|
+
import './FauxClient.types-Dtk9aRs6.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* A standalone image viewer: fits the image to its container, with optional
|
package/dist/image-viewer.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
export { ImageViewer } from './chunk-
|
|
1
|
+
export { ImageViewer } from './chunk-XOWWNG7D.js';
|
|
2
|
+
import './chunk-XWXV6HSK.js';
|
|
2
3
|
import './chunk-CPY7NHXM.js';
|
|
4
|
+
import './chunk-EDYAXGUM.js';
|
|
3
5
|
import './chunk-MMW2JGKZ.js';
|
|
4
6
|
//# sourceMappingURL=image-viewer.js.map
|
|
5
7
|
//# sourceMappingURL=image-viewer.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, CSSProperties } from 'react';
|
|
3
|
-
import { I as ImageViewerProps } from './ImageViewer.types-
|
|
3
|
+
import { I as ImageViewerProps } from './ImageViewer.types-CtqaA6KV.cjs';
|
|
4
4
|
import { V as VideoViewerProps } from './VideoViewer.types-_AwQ8DQr.cjs';
|
|
5
5
|
import { A as AudioViewerProps } from './AudioViewer.types-CyhmQVQd.cjs';
|
|
6
|
-
import { P as PdfViewerProps } from './PdfViewer.types-
|
|
6
|
+
import { P as PdfViewerProps } from './PdfViewer.types-Bgn9EmZT.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Resolve what kind of media a source is, from its MIME type (preferred) or its
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode, CSSProperties } from 'react';
|
|
3
|
-
import { I as ImageViewerProps } from './ImageViewer.types-
|
|
3
|
+
import { I as ImageViewerProps } from './ImageViewer.types-BDTxBYEN.js';
|
|
4
4
|
import { V as VideoViewerProps } from './VideoViewer.types-_AwQ8DQr.js';
|
|
5
5
|
import { A as AudioViewerProps } from './AudioViewer.types-CyhmQVQd.js';
|
|
6
|
-
import { P as PdfViewerProps } from './PdfViewer.types-
|
|
6
|
+
import { P as PdfViewerProps } from './PdfViewer.types-xnPpdjJa.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Resolve what kind of media a source is, from its MIME type (preferred) or its
|
package/dist/index.cjs
CHANGED
|
@@ -57,16 +57,16 @@ var chunkXKDW6B7X_cjs = require('./chunk-XKDW6B7X.cjs');
|
|
|
57
57
|
var chunkBBOIFV27_cjs = require('./chunk-BBOIFV27.cjs');
|
|
58
58
|
require('./chunk-YLGTDBB2.cjs');
|
|
59
59
|
var chunkZVDW2VX5_cjs = require('./chunk-ZVDW2VX5.cjs');
|
|
60
|
-
var
|
|
60
|
+
var chunkKST6GW2B_cjs = require('./chunk-KST6GW2B.cjs');
|
|
61
61
|
var chunkTH7VP4CL_cjs = require('./chunk-TH7VP4CL.cjs');
|
|
62
|
-
var
|
|
62
|
+
var chunkLP3HMRQT_cjs = require('./chunk-LP3HMRQT.cjs');
|
|
63
63
|
var chunkRPVCMW64_cjs = require('./chunk-RPVCMW64.cjs');
|
|
64
|
-
var chunkDUOZSOSB_cjs = require('./chunk-DUOZSOSB.cjs');
|
|
65
64
|
var chunkT45XK5GN_cjs = require('./chunk-T45XK5GN.cjs');
|
|
66
65
|
var chunkVKXNCYLE_cjs = require('./chunk-VKXNCYLE.cjs');
|
|
67
66
|
var chunkOOZCJLEF_cjs = require('./chunk-OOZCJLEF.cjs');
|
|
68
67
|
require('./chunk-FJKZ5NOA.cjs');
|
|
69
|
-
var
|
|
68
|
+
var chunkWBJRFWZE_cjs = require('./chunk-WBJRFWZE.cjs');
|
|
69
|
+
var chunkDUOZSOSB_cjs = require('./chunk-DUOZSOSB.cjs');
|
|
70
70
|
var chunkTGNQ5Y6F_cjs = require('./chunk-TGNQ5Y6F.cjs');
|
|
71
71
|
require('./chunk-S3TRSECD.cjs');
|
|
72
72
|
var chunkPV5WDIGM_cjs = require('./chunk-PV5WDIGM.cjs');
|
|
@@ -443,11 +443,11 @@ Object.defineProperty(exports, "Marquee", {
|
|
|
443
443
|
});
|
|
444
444
|
Object.defineProperty(exports, "MediaViewer", {
|
|
445
445
|
enumerable: true,
|
|
446
|
-
get: function () { return
|
|
446
|
+
get: function () { return chunkKST6GW2B_cjs.MediaViewer; }
|
|
447
447
|
});
|
|
448
448
|
Object.defineProperty(exports, "resolveMediaType", {
|
|
449
449
|
enumerable: true,
|
|
450
|
-
get: function () { return
|
|
450
|
+
get: function () { return chunkKST6GW2B_cjs.resolveMediaType; }
|
|
451
451
|
});
|
|
452
452
|
Object.defineProperty(exports, "VideoViewer", {
|
|
453
453
|
enumerable: true,
|
|
@@ -455,7 +455,7 @@ Object.defineProperty(exports, "VideoViewer", {
|
|
|
455
455
|
});
|
|
456
456
|
Object.defineProperty(exports, "PdfViewer", {
|
|
457
457
|
enumerable: true,
|
|
458
|
-
get: function () { return
|
|
458
|
+
get: function () { return chunkLP3HMRQT_cjs.PdfViewer; }
|
|
459
459
|
});
|
|
460
460
|
Object.defineProperty(exports, "Menu", {
|
|
461
461
|
enumerable: true,
|
|
@@ -465,10 +465,6 @@ Object.defineProperty(exports, "useMenu", {
|
|
|
465
465
|
enumerable: true,
|
|
466
466
|
get: function () { return chunkRPVCMW64_cjs.useMenu; }
|
|
467
467
|
});
|
|
468
|
-
Object.defineProperty(exports, "FauxClient", {
|
|
469
|
-
enumerable: true,
|
|
470
|
-
get: function () { return chunkDUOZSOSB_cjs.FauxClient; }
|
|
471
|
-
});
|
|
472
468
|
Object.defineProperty(exports, "FileBrowser", {
|
|
473
469
|
enumerable: true,
|
|
474
470
|
get: function () { return chunkT45XK5GN_cjs.FileBrowser; }
|
|
@@ -499,7 +495,11 @@ Object.defineProperty(exports, "Grid", {
|
|
|
499
495
|
});
|
|
500
496
|
Object.defineProperty(exports, "ImageViewer", {
|
|
501
497
|
enumerable: true,
|
|
502
|
-
get: function () { return
|
|
498
|
+
get: function () { return chunkWBJRFWZE_cjs.ImageViewer; }
|
|
499
|
+
});
|
|
500
|
+
Object.defineProperty(exports, "FauxClient", {
|
|
501
|
+
enumerable: true,
|
|
502
|
+
get: function () { return chunkDUOZSOSB_cjs.FauxClient; }
|
|
503
503
|
});
|
|
504
504
|
Object.defineProperty(exports, "IndexList", {
|
|
505
505
|
enumerable: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -43,7 +43,8 @@ export { Stat, StatBand, StatBandProps, StatProps } from './stat.cjs';
|
|
|
43
43
|
export { Profile, ProfileProps } from './profile.cjs';
|
|
44
44
|
export { e as Card, f as CardBleedEdges, d as CardBleedProps, a as CardBodyProps, b as CardFooterProps, C as CardHeaderProps, c as CardMediaProps, g as CardPadding, h as CardProps, i as CardSectionProps, j as CardSections, k as CardSize } from './Card-CuRZivBz.cjs';
|
|
45
45
|
export { Callout, CalloutProps } from './callout.cjs';
|
|
46
|
-
export { FauxClient
|
|
46
|
+
export { FauxClient } from './faux-client.cjs';
|
|
47
|
+
export { F as FauxClientProps } from './FauxClient.types-Dtk9aRs6.cjs';
|
|
47
48
|
export { StickyNote, StickyNoteColor, StickyNoteProps } from './sticky-note.cjs';
|
|
48
49
|
export { b as Timeline, a as TimelineBlockProps, c as TimelineEvent, T as TimelineItemProps, d as TimelineOrientation, e as TimelineProps, f as TimelineVariant } from './Timeline-BSk0X2nV.cjs';
|
|
49
50
|
export { TimeGrid, TimeGridProps, TimeGridTone } from './time-grid.cjs';
|
|
@@ -81,7 +82,7 @@ export { MobileMenu, MobileMenuBottomBarProps, MobileMenuContextValue, MobileMen
|
|
|
81
82
|
export { Kanban, KanbanCardMoveHandler, KanbanCardProps, KanbanColumnHandleProps, KanbanColumnMoveHandler, KanbanColumnProps, KanbanContextValue, KanbanProps, useKanban } from './kanban.cjs';
|
|
82
83
|
export { DropPosition, TreeNav, TreeNavContextValue, TreeNavProps, TreeNodeData, TreeNodeProps, useTreeNav } from './tree-nav.cjs';
|
|
83
84
|
export { FileBrowser, FileBrowserContextValue, FileBrowserNewFolder, FileBrowserNodeProps, FileBrowserPathBarProps, FileBrowserProps, FileBrowserProvider, FileBrowserRow, FileBrowserToolbarProps, FileBrowserTreeProps, FileEntry, FileKind, FileLoadStatus, FileSelectMode, FileSnapshotNode, FileSort, FileSortDirection, FileSortField, useFileBrowser, validateFolderName } from './file-browser.cjs';
|
|
84
|
-
export { M as MediaKind, a as MediaViewer, b as MediaViewerProps, R as ResolveMediaTypeInput, r as resolveMediaType } from './index-
|
|
85
|
+
export { M as MediaKind, a as MediaViewer, b as MediaViewerProps, R as ResolveMediaTypeInput, r as resolveMediaType } from './index-AesVUjQE.cjs';
|
|
85
86
|
export { F as FancyPlatform, P as PlatformHints, a as PromptAttachment, b as PromptCmd, c as PromptInput, d as PromptInputProps, e as PromptMention, f as browserPlatformHints, g as detectPlatform, m as modifierKeyLabel } from './index-BF5qsQur.cjs';
|
|
86
87
|
import { P as Placement } from './types-DJI492iY.cjs';
|
|
87
88
|
export { A as ActionColor, B as ButtonColor, C as Color, S as Size, V as Variant } from './types-DJI492iY.cjs';
|
|
@@ -92,13 +93,13 @@ export { ChatDrawer, ChatDrawerProps, ChatDrawerTab } from './chat-drawer.cjs';
|
|
|
92
93
|
export { ControlledAdapterHandle, InputTag, InputTagAdapter, InputTagAdapterState, InputTagProps, InputTagTrigger, InputTagTriggers, contentEditableAdapter, controlledAdapter, inputAdapter, textareaAdapter } from './input-tag.cjs';
|
|
93
94
|
export { MagicWand, MagicWandAction, MagicWandAppearance, MagicWandProps, MagicWandSelection } from './magic-wand.cjs';
|
|
94
95
|
export { ImageViewer } from './image-viewer.cjs';
|
|
95
|
-
export { I as ImageViewerProps, a as ImageViewerViewport } from './ImageViewer.types-
|
|
96
|
+
export { I as ImageViewerProps, a as ImageViewerViewport } from './ImageViewer.types-CtqaA6KV.cjs';
|
|
96
97
|
export { VideoViewer } from './video-viewer.cjs';
|
|
97
98
|
export { V as VideoViewerProps } from './VideoViewer.types-_AwQ8DQr.cjs';
|
|
98
99
|
export { AudioViewer } from './audio-viewer.cjs';
|
|
99
100
|
export { A as AudioViewerProps } from './AudioViewer.types-CyhmQVQd.cjs';
|
|
100
101
|
export { PdfViewer } from './pdf-viewer.cjs';
|
|
101
|
-
export { P as PdfViewerProps } from './PdfViewer.types-
|
|
102
|
+
export { P as PdfViewerProps } from './PdfViewer.types-Bgn9EmZT.cjs';
|
|
102
103
|
export { J as JSON_FIELD_TYPES, a as JsonArray, b as JsonEditor, c as JsonEditorActivity, d as JsonEditorEdit, e as JsonEditorIssue, f as JsonEditorNode, g as JsonEditorPendingEdit, h as JsonEditorProps, i as JsonFieldType, j as JsonKeyMapEntry, k as JsonKeyRule, l as JsonObject, m as JsonPath, n as JsonPrimitive, o as JsonValue, P as ParsedKeyMap, p as applyJsonEdit, q as describeEdit, r as findJsonConflicts, s as getAtPath, t as inferType, u as parseKeyMap, v as parsePath, w as pathToString, x as resolveKeyRule, y as typeMatches } from './index-CEb-loCl.cjs';
|
|
103
104
|
|
|
104
105
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -43,7 +43,8 @@ export { Stat, StatBand, StatBandProps, StatProps } from './stat.js';
|
|
|
43
43
|
export { Profile, ProfileProps } from './profile.js';
|
|
44
44
|
export { e as Card, f as CardBleedEdges, d as CardBleedProps, a as CardBodyProps, b as CardFooterProps, C as CardHeaderProps, c as CardMediaProps, g as CardPadding, h as CardProps, i as CardSectionProps, j as CardSections, k as CardSize } from './Card-CuRZivBz.js';
|
|
45
45
|
export { Callout, CalloutProps } from './callout.js';
|
|
46
|
-
export { FauxClient
|
|
46
|
+
export { FauxClient } from './faux-client.js';
|
|
47
|
+
export { F as FauxClientProps } from './FauxClient.types-Dtk9aRs6.js';
|
|
47
48
|
export { StickyNote, StickyNoteColor, StickyNoteProps } from './sticky-note.js';
|
|
48
49
|
export { b as Timeline, a as TimelineBlockProps, c as TimelineEvent, T as TimelineItemProps, d as TimelineOrientation, e as TimelineProps, f as TimelineVariant } from './Timeline-B-3JFX43.js';
|
|
49
50
|
export { TimeGrid, TimeGridProps, TimeGridTone } from './time-grid.js';
|
|
@@ -81,7 +82,7 @@ export { MobileMenu, MobileMenuBottomBarProps, MobileMenuContextValue, MobileMen
|
|
|
81
82
|
export { Kanban, KanbanCardMoveHandler, KanbanCardProps, KanbanColumnHandleProps, KanbanColumnMoveHandler, KanbanColumnProps, KanbanContextValue, KanbanProps, useKanban } from './kanban.js';
|
|
82
83
|
export { DropPosition, TreeNav, TreeNavContextValue, TreeNavProps, TreeNodeData, TreeNodeProps, useTreeNav } from './tree-nav.js';
|
|
83
84
|
export { FileBrowser, FileBrowserContextValue, FileBrowserNewFolder, FileBrowserNodeProps, FileBrowserPathBarProps, FileBrowserProps, FileBrowserProvider, FileBrowserRow, FileBrowserToolbarProps, FileBrowserTreeProps, FileEntry, FileKind, FileLoadStatus, FileSelectMode, FileSnapshotNode, FileSort, FileSortDirection, FileSortField, useFileBrowser, validateFolderName } from './file-browser.js';
|
|
84
|
-
export { M as MediaKind, a as MediaViewer, b as MediaViewerProps, R as ResolveMediaTypeInput, r as resolveMediaType } from './index-
|
|
85
|
+
export { M as MediaKind, a as MediaViewer, b as MediaViewerProps, R as ResolveMediaTypeInput, r as resolveMediaType } from './index-D3wJ8hrZ.js';
|
|
85
86
|
export { F as FancyPlatform, P as PlatformHints, a as PromptAttachment, b as PromptCmd, c as PromptInput, d as PromptInputProps, e as PromptMention, f as browserPlatformHints, g as detectPlatform, m as modifierKeyLabel } from './index-BZON-gXr.js';
|
|
86
87
|
import { P as Placement } from './types-DJI492iY.js';
|
|
87
88
|
export { A as ActionColor, B as ButtonColor, C as Color, S as Size, V as Variant } from './types-DJI492iY.js';
|
|
@@ -92,13 +93,13 @@ export { ChatDrawer, ChatDrawerProps, ChatDrawerTab } from './chat-drawer.js';
|
|
|
92
93
|
export { ControlledAdapterHandle, InputTag, InputTagAdapter, InputTagAdapterState, InputTagProps, InputTagTrigger, InputTagTriggers, contentEditableAdapter, controlledAdapter, inputAdapter, textareaAdapter } from './input-tag.js';
|
|
93
94
|
export { MagicWand, MagicWandAction, MagicWandAppearance, MagicWandProps, MagicWandSelection } from './magic-wand.js';
|
|
94
95
|
export { ImageViewer } from './image-viewer.js';
|
|
95
|
-
export { I as ImageViewerProps, a as ImageViewerViewport } from './ImageViewer.types-
|
|
96
|
+
export { I as ImageViewerProps, a as ImageViewerViewport } from './ImageViewer.types-BDTxBYEN.js';
|
|
96
97
|
export { VideoViewer } from './video-viewer.js';
|
|
97
98
|
export { V as VideoViewerProps } from './VideoViewer.types-_AwQ8DQr.js';
|
|
98
99
|
export { AudioViewer } from './audio-viewer.js';
|
|
99
100
|
export { A as AudioViewerProps } from './AudioViewer.types-CyhmQVQd.js';
|
|
100
101
|
export { PdfViewer } from './pdf-viewer.js';
|
|
101
|
-
export { P as PdfViewerProps } from './PdfViewer.types-
|
|
102
|
+
export { P as PdfViewerProps } from './PdfViewer.types-xnPpdjJa.js';
|
|
102
103
|
export { J as JSON_FIELD_TYPES, a as JsonArray, b as JsonEditor, c as JsonEditorActivity, d as JsonEditorEdit, e as JsonEditorIssue, f as JsonEditorNode, g as JsonEditorPendingEdit, h as JsonEditorProps, i as JsonFieldType, j as JsonKeyMapEntry, k as JsonKeyRule, l as JsonObject, m as JsonPath, n as JsonPrimitive, o as JsonValue, P as ParsedKeyMap, p as applyJsonEdit, q as describeEdit, r as findJsonConflicts, s as getAtPath, t as inferType, u as parseKeyMap, v as parsePath, w as pathToString, x as resolveKeyRule, y as typeMatches } from './index-DeAJbVOn.js';
|
|
103
104
|
|
|
104
105
|
/**
|
package/dist/index.js
CHANGED
|
@@ -55,16 +55,16 @@ export { DisplayValue } from './chunk-KKWNKBKR.js';
|
|
|
55
55
|
export { Field } from './chunk-5MU6X3KO.js';
|
|
56
56
|
import './chunk-GFYSELJF.js';
|
|
57
57
|
export { Marquee } from './chunk-RSLZL6VP.js';
|
|
58
|
-
export { MediaViewer, resolveMediaType } from './chunk-
|
|
58
|
+
export { MediaViewer, resolveMediaType } from './chunk-MQEV7XEG.js';
|
|
59
59
|
export { VideoViewer } from './chunk-VOGI7GX3.js';
|
|
60
|
-
export { PdfViewer } from './chunk-
|
|
60
|
+
export { PdfViewer } from './chunk-VKRQHLM5.js';
|
|
61
61
|
export { Menu, useMenu } from './chunk-RA2VOQ46.js';
|
|
62
|
-
export { FauxClient } from './chunk-XWXV6HSK.js';
|
|
63
62
|
export { FileBrowser, FileBrowserNewFolder, useFileBrowser, validateFolderName } from './chunk-2KAJ4L7C.js';
|
|
64
63
|
export { FileUpload, useFileUpload } from './chunk-W6RDAZJC.js';
|
|
65
64
|
export { Grid } from './chunk-TM3RTWKI.js';
|
|
66
65
|
import './chunk-CFH6CJQG.js';
|
|
67
|
-
export { ImageViewer } from './chunk-
|
|
66
|
+
export { ImageViewer } from './chunk-XOWWNG7D.js';
|
|
67
|
+
export { FauxClient } from './chunk-XWXV6HSK.js';
|
|
68
68
|
export { IndexList } from './chunk-UKUNWGL5.js';
|
|
69
69
|
import './chunk-AUTW5O4W.js';
|
|
70
70
|
export { ContextMenu, useContextMenu } from './chunk-SWBF2BXA.js';
|
package/dist/media-viewer.cjs
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKST6GW2B_cjs = require('./chunk-KST6GW2B.cjs');
|
|
4
4
|
require('./chunk-TH7VP4CL.cjs');
|
|
5
|
-
require('./chunk-
|
|
6
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-LP3HMRQT.cjs');
|
|
6
|
+
require('./chunk-WBJRFWZE.cjs');
|
|
7
|
+
require('./chunk-DUOZSOSB.cjs');
|
|
7
8
|
require('./chunk-T6YELZPJ.cjs');
|
|
8
9
|
require('./chunk-QW66UHWO.cjs');
|
|
10
|
+
require('./chunk-SNHU2AI4.cjs');
|
|
9
11
|
require('./chunk-ZU5Q77OT.cjs');
|
|
10
12
|
|
|
11
13
|
|
|
12
14
|
|
|
13
15
|
Object.defineProperty(exports, "MediaViewer", {
|
|
14
16
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkKST6GW2B_cjs.MediaViewer; }
|
|
16
18
|
});
|
|
17
19
|
//# sourceMappingURL=media-viewer.cjs.map
|
|
18
20
|
//# sourceMappingURL=media-viewer.cjs.map
|
package/dist/media-viewer.d.cts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { a as MediaViewer, b as MediaViewerProps } from './index-
|
|
1
|
+
export { a as MediaViewer, b as MediaViewerProps } from './index-AesVUjQE.cjs';
|
|
2
2
|
import 'react';
|
|
3
|
-
import './ImageViewer.types-
|
|
3
|
+
import './ImageViewer.types-CtqaA6KV.cjs';
|
|
4
|
+
import './FauxClient.types-Dtk9aRs6.cjs';
|
|
4
5
|
import './VideoViewer.types-_AwQ8DQr.cjs';
|
|
5
6
|
import './AudioViewer.types-CyhmQVQd.cjs';
|
|
6
|
-
import './PdfViewer.types-
|
|
7
|
+
import './PdfViewer.types-Bgn9EmZT.cjs';
|
package/dist/media-viewer.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export { a as MediaViewer, b as MediaViewerProps } from './index-
|
|
1
|
+
export { a as MediaViewer, b as MediaViewerProps } from './index-D3wJ8hrZ.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import './ImageViewer.types-
|
|
3
|
+
import './ImageViewer.types-BDTxBYEN.js';
|
|
4
|
+
import './FauxClient.types-Dtk9aRs6.js';
|
|
4
5
|
import './VideoViewer.types-_AwQ8DQr.js';
|
|
5
6
|
import './AudioViewer.types-CyhmQVQd.js';
|
|
6
|
-
import './PdfViewer.types-
|
|
7
|
+
import './PdfViewer.types-xnPpdjJa.js';
|
package/dist/media-viewer.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export { MediaViewer } from './chunk-
|
|
1
|
+
export { MediaViewer } from './chunk-MQEV7XEG.js';
|
|
2
2
|
import './chunk-VOGI7GX3.js';
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
3
|
+
import './chunk-VKRQHLM5.js';
|
|
4
|
+
import './chunk-XOWWNG7D.js';
|
|
5
|
+
import './chunk-XWXV6HSK.js';
|
|
5
6
|
import './chunk-CPY7NHXM.js';
|
|
6
7
|
import './chunk-UIJR26YW.js';
|
|
8
|
+
import './chunk-EDYAXGUM.js';
|
|
7
9
|
import './chunk-MMW2JGKZ.js';
|
|
8
10
|
//# sourceMappingURL=media-viewer.js.map
|
|
9
11
|
//# sourceMappingURL=media-viewer.js.map
|
package/dist/pdf-viewer.cjs
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkLP3HMRQT_cjs = require('./chunk-LP3HMRQT.cjs');
|
|
4
|
+
require('./chunk-DUOZSOSB.cjs');
|
|
5
|
+
require('./chunk-SNHU2AI4.cjs');
|
|
4
6
|
require('./chunk-ZU5Q77OT.cjs');
|
|
5
7
|
|
|
6
8
|
|
|
7
9
|
|
|
8
10
|
Object.defineProperty(exports, "PdfViewer", {
|
|
9
11
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkLP3HMRQT_cjs.PdfViewer; }
|
|
11
13
|
});
|
|
12
14
|
//# sourceMappingURL=pdf-viewer.cjs.map
|
|
13
15
|
//# sourceMappingURL=pdf-viewer.cjs.map
|
package/dist/pdf-viewer.d.cts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { P as PdfViewerProps } from './PdfViewer.types-
|
|
2
|
+
import { P as PdfViewerProps } from './PdfViewer.types-Bgn9EmZT.cjs';
|
|
3
|
+
import './FauxClient.types-Dtk9aRs6.cjs';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* A standalone PDF viewer — embeds the document via the browser's native PDF
|
package/dist/pdf-viewer.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import { P as PdfViewerProps } from './PdfViewer.types-
|
|
2
|
+
import { P as PdfViewerProps } from './PdfViewer.types-xnPpdjJa.js';
|
|
3
|
+
import './FauxClient.types-Dtk9aRs6.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* A standalone PDF viewer — embeds the document via the browser's native PDF
|
package/dist/pdf-viewer.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export { PdfViewer } from './chunk-
|
|
1
|
+
export { PdfViewer } from './chunk-VKRQHLM5.js';
|
|
2
|
+
import './chunk-XWXV6HSK.js';
|
|
3
|
+
import './chunk-EDYAXGUM.js';
|
|
2
4
|
import './chunk-MMW2JGKZ.js';
|
|
3
5
|
//# sourceMappingURL=pdf-viewer.js.map
|
|
4
6
|
//# sourceMappingURL=pdf-viewer.js.map
|