@cherrystudio/file-preview 0.2.4 → 0.2.5
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/README.md +6 -6
- package/dist/{Combination-DJvKCNHX.js → Combination-CBuGcY5S.js} +2 -2
- package/dist/{FilePreviewTooLarge-Dy7vW_Ws.js → FilePreviewTooLarge-CZHFMl0w.js} +1 -1
- package/dist/{FilePreviewToolbarButton-B3fnHUsU.js → FilePreviewToolbarButton-BUzQxFLX.js} +3 -3
- package/dist/{ImageFilePreview-Dw1xQ7YI.js → ImageFilePreview-JR2KQf2x.js} +6 -6
- package/dist/{PdfFilePreview-z7OIP8EH.js → PdfFilePreview-B34-QmrL.js} +6 -6
- package/dist/{PowerPointFilePreview-B5Mbg-MX.js → PowerPointFilePreview-NukTW9aw.js} +6 -6
- package/dist/{RtfFilePreview-CcrhWuBX.js → RtfFilePreview-Bdy8iPf9.js} +3 -3
- package/dist/{SpreadsheetFilePreview-DJxlzv9k.js → SpreadsheetFilePreview-jB17TCNJ.js} +5 -5
- package/dist/{WordFilePreview-CQbS4yZX.js → WordFilePreview-YznLhQcq.js} +13 -8
- package/dist/{circle-alert-CYVQ2eOz.js → circle-alert-DOgmM2Zn.js} +1 -1
- package/dist/{imageFilePreviewPlugin-C9F4L9mo.js → imageFilePreviewPlugin-C02W1uyU.js} +1 -1
- package/dist/react.js +8 -8
- package/dist/{rotate-ccw-CA3ussD_.js → rotate-ccw-q9GRRcYM.js} +1 -1
- package/dist/styles.css +26 -28
- package/dist/{useTranslation-BKohPZAm.js → useTranslation-ezxuF2DX.js} +1 -1
- package/dist/{zoom-out-BXB6HBfC.js → zoom-out-DYpR5v9K.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -193,12 +193,12 @@ Escape, the close button, the backdrop, and selecting an internal destination di
|
|
|
193
193
|
it. Explicitly selecting either PDF layout also keeps page-width zoom in sync with
|
|
194
194
|
container resizing; manual zoom is preserved.
|
|
195
195
|
|
|
196
|
-
DOCX `fit-width`
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
196
|
+
DOCX `fit-width` fits the widest page to the pane, permits scales below 50%, and
|
|
197
|
+
never enlarges beyond 200%. It follows container resizing until the user zooms using
|
|
198
|
+
the toolbar or a pinch; Reset resumes fitting. No orientation message is needed for
|
|
199
|
+
DOCX. `normalizeSymbolBullets` is read when opening the document: it maps known
|
|
200
|
+
single-character Symbol/Wingdings bullet markers to Unicode and removes their legacy
|
|
201
|
+
font override. Other fonts, unknown symbols and numbered lists are preserved.
|
|
202
202
|
|
|
203
203
|
`bottomInset: 'content'` adds trailing space inside PDF, DOCX and PPTX document scroll
|
|
204
204
|
containers, in unscaled host CSS pixels. Both PDF outline layouts receive trailing
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as useComposedRefs } from "./useTranslation-
|
|
2
|
-
import { v as useCallbackRef$1, y as Primitive } from "./FilePreviewToolbarButton-
|
|
1
|
+
import { b as useComposedRefs } from "./useTranslation-ezxuF2DX.js";
|
|
2
|
+
import { v as useCallbackRef$1, y as Primitive } from "./FilePreviewToolbarButton-BUzQxFLX.js";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
4
|
import { useState } from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as usePreviewHost, d as EmptyState, h as FileWarning, t as useTranslation } from "./useTranslation-
|
|
1
|
+
import { a as usePreviewHost, d as EmptyState, h as FileWarning, t as useTranslation } from "./useTranslation-ezxuF2DX.js";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
//#region src/formatFileSize.ts
|
|
4
4
|
function formatFileSize(size) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as useComposedRefs, f as Button, p as cn, v as createSlot, y as createSlottable } from "./useTranslation-
|
|
1
|
+
import { b as useComposedRefs, f as Button, p as cn, v as createSlot, y as createSlottable } from "./useTranslation-ezxuF2DX.js";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import { useLayoutEffect } from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -3377,8 +3377,8 @@ function TooltipTrigger({ onFocus, ...props }) {
|
|
|
3377
3377
|
...props
|
|
3378
3378
|
});
|
|
3379
3379
|
}
|
|
3380
|
-
var contentStyles = "z-[80] w-fit max-w-80 origin-(--radix-tooltip-content-transform-origin) rounded-md bg-neutral-
|
|
3381
|
-
var arrowStyles = "z-[80] -translate-y-px fill-neutral-
|
|
3380
|
+
var contentStyles = "z-[80] w-fit max-w-80 origin-(--radix-tooltip-content-transform-origin) rounded-md bg-neutral-100 px-3 py-1.5 text-neutral-900 text-xs leading-relaxed whitespace-normal break-words data-[state*=open]:animate-in data-[state*=open]:fade-in-0 data-[state*=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 dark:bg-neutral-900 dark:text-neutral-50 [-webkit-app-region:no-drag]";
|
|
3381
|
+
var arrowStyles = "z-[80] -translate-y-px fill-neutral-100 stroke-neutral-100 stroke-2 dark:fill-neutral-900 dark:stroke-neutral-900 [paint-order:stroke_fill]";
|
|
3382
3382
|
var Tooltip = ({ children, content, title, placement, delay = 0, sideOffset = 8, showArrow = true, fullWidthTrigger = false, classNames, className, isDisabled, isOpen, onOpenChange, onClick, portalContainer, asChild = false }) => {
|
|
3383
3383
|
const tooltipContent = content ?? title;
|
|
3384
3384
|
const defaultPortalContainer = useTooltipPortalContainer();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { r as readPreviewDocument, t as PreviewError } from "./source-Rx3etU3y.js";
|
|
2
|
-
import { _ as cva, a as usePreviewHost, b as useComposedRefs, d as EmptyState, g as createLucideIcon, m as LoaderCircle, p as cn, r as FilePreviewLayout, s as FilePreviewToolbar, t as useTranslation, v as createSlot } from "./useTranslation-
|
|
3
|
-
import { n as ZoomIn, t as ZoomOut } from "./zoom-out-
|
|
4
|
-
import { S as composeEventHandlers, a as usePortalContainer, b as dispatchDiscreteCustomEvent, c as Portal$1, d as Content, f as Root2$1, g as DismissableLayer, h as useLayoutEffect2, l as Anchor, m as useId$1, o as useControllableState, p as createPopperScope, s as Presence, t as FilePreviewToolbarButton, u as Arrow, v as useCallbackRef, x as createContextScope, y as Primitive } from "./FilePreviewToolbarButton-
|
|
5
|
-
import { i as useFocusGuards, n as hideOthers, r as FocusScope, t as ReactRemoveScroll } from "./Combination-
|
|
6
|
-
import { t as imageFilePreviewPlugin } from "./imageFilePreviewPlugin-
|
|
7
|
-
import { t as FilePreviewTooLarge } from "./FilePreviewTooLarge-
|
|
2
|
+
import { _ as cva, a as usePreviewHost, b as useComposedRefs, d as EmptyState, g as createLucideIcon, m as LoaderCircle, p as cn, r as FilePreviewLayout, s as FilePreviewToolbar, t as useTranslation, v as createSlot } from "./useTranslation-ezxuF2DX.js";
|
|
3
|
+
import { n as ZoomIn, t as ZoomOut } from "./zoom-out-DYpR5v9K.js";
|
|
4
|
+
import { S as composeEventHandlers, a as usePortalContainer, b as dispatchDiscreteCustomEvent, c as Portal$1, d as Content, f as Root2$1, g as DismissableLayer, h as useLayoutEffect2, l as Anchor, m as useId$1, o as useControllableState, p as createPopperScope, s as Presence, t as FilePreviewToolbarButton, u as Arrow, v as useCallbackRef, x as createContextScope, y as Primitive } from "./FilePreviewToolbarButton-BUzQxFLX.js";
|
|
5
|
+
import { i as useFocusGuards, n as hideOthers, r as FocusScope, t as ReactRemoveScroll } from "./Combination-CBuGcY5S.js";
|
|
6
|
+
import { t as imageFilePreviewPlugin } from "./imageFilePreviewPlugin-C02W1uyU.js";
|
|
7
|
+
import { t as FilePreviewTooLarge } from "./FilePreviewTooLarge-CZHFMl0w.js";
|
|
8
8
|
import * as React$1 from "react";
|
|
9
9
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
10
10
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { i as readPreviewRange, n as assertPreviewRange, t as PreviewError } from "./source-Rx3etU3y.js";
|
|
2
|
-
import { a as usePreviewHost, b as useComposedRefs, d as EmptyState, f as Button, g as createLucideIcon, h as FileWarning, m as LoaderCircle, o as usePreviewLogger, p as cn, r as FilePreviewLayout, s as FilePreviewToolbar, t as useTranslation, u as ScrollArea, v as createSlot } from "./useTranslation-
|
|
3
|
-
import { n as ChevronRight, r as ChevronLeft, t as RotateCcw } from "./rotate-ccw-
|
|
4
|
-
import { t as CircleAlert } from "./circle-alert-
|
|
5
|
-
import { n as ZoomIn, t as ZoomOut } from "./zoom-out-
|
|
6
|
-
import { S as composeEventHandlers, _ as useDismissableLayerSurface, c as Portal, g as DismissableLayer, i as useDialogPortalContainer, m as useId$1, o as useControllableState, r as PortalContainerProvider, s as Presence, t as FilePreviewToolbarButton, x as createContextScope, y as Primitive } from "./FilePreviewToolbarButton-
|
|
7
|
-
import { i as useFocusGuards, n as hideOthers, r as FocusScope, t as ReactRemoveScroll } from "./Combination-
|
|
2
|
+
import { a as usePreviewHost, b as useComposedRefs, d as EmptyState, f as Button, g as createLucideIcon, h as FileWarning, m as LoaderCircle, o as usePreviewLogger, p as cn, r as FilePreviewLayout, s as FilePreviewToolbar, t as useTranslation, u as ScrollArea, v as createSlot } from "./useTranslation-ezxuF2DX.js";
|
|
3
|
+
import { n as ChevronRight, r as ChevronLeft, t as RotateCcw } from "./rotate-ccw-q9GRRcYM.js";
|
|
4
|
+
import { t as CircleAlert } from "./circle-alert-DOgmM2Zn.js";
|
|
5
|
+
import { n as ZoomIn, t as ZoomOut } from "./zoom-out-DYpR5v9K.js";
|
|
6
|
+
import { S as composeEventHandlers, _ as useDismissableLayerSurface, c as Portal, g as DismissableLayer, i as useDialogPortalContainer, m as useId$1, o as useControllableState, r as PortalContainerProvider, s as Presence, t as FilePreviewToolbarButton, x as createContextScope, y as Primitive } from "./FilePreviewToolbarButton-BUzQxFLX.js";
|
|
7
|
+
import { i as useFocusGuards, n as hideOthers, r as FocusScope, t as ReactRemoveScroll } from "./Combination-CBuGcY5S.js";
|
|
8
8
|
import { t as createPreviewSelection } from "./selection-B0INvh6t.js";
|
|
9
9
|
import { t as attachTouchPinch } from "./touchPinch-C4fl-9fg.js";
|
|
10
10
|
import * as React$1 from "react";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { i as __toESM } from "./rolldown-runtime-B-lAHAz2.js";
|
|
2
2
|
import { r as readPreviewDocument, t as PreviewError } from "./source-Rx3etU3y.js";
|
|
3
|
-
import { a as usePreviewHost, d as EmptyState, h as FileWarning, m as LoaderCircle, o as usePreviewLogger, r as FilePreviewLayout, s as FilePreviewToolbar, t as useTranslation } from "./useTranslation-
|
|
4
|
-
import { n as ChevronRight, r as ChevronLeft, t as RotateCcw } from "./rotate-ccw-
|
|
5
|
-
import { t as CircleAlert } from "./circle-alert-
|
|
6
|
-
import { n as ZoomIn, t as ZoomOut } from "./zoom-out-
|
|
7
|
-
import { t as FilePreviewToolbarButton } from "./FilePreviewToolbarButton-
|
|
8
|
-
import { t as FilePreviewTooLarge } from "./FilePreviewTooLarge-
|
|
3
|
+
import { a as usePreviewHost, d as EmptyState, h as FileWarning, m as LoaderCircle, o as usePreviewLogger, r as FilePreviewLayout, s as FilePreviewToolbar, t as useTranslation } from "./useTranslation-ezxuF2DX.js";
|
|
4
|
+
import { n as ChevronRight, r as ChevronLeft, t as RotateCcw } from "./rotate-ccw-q9GRRcYM.js";
|
|
5
|
+
import { t as CircleAlert } from "./circle-alert-DOgmM2Zn.js";
|
|
6
|
+
import { n as ZoomIn, t as ZoomOut } from "./zoom-out-DYpR5v9K.js";
|
|
7
|
+
import { t as FilePreviewToolbarButton } from "./FilePreviewToolbarButton-BUzQxFLX.js";
|
|
8
|
+
import { t as FilePreviewTooLarge } from "./FilePreviewTooLarge-CZHFMl0w.js";
|
|
9
9
|
import { t as createPreviewSelection } from "./selection-B0INvh6t.js";
|
|
10
10
|
import { t as require_jszip_min } from "./jszip.min-uwqlc4KL.js";
|
|
11
11
|
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as __toESM, t as __commonJSMin } from "./rolldown-runtime-B-lAHAz2.js";
|
|
2
2
|
import { r as readPreviewDocument, t as PreviewError } from "./source-Rx3etU3y.js";
|
|
3
|
-
import { a as usePreviewHost, d as EmptyState, m as LoaderCircle, r as FilePreviewLayout, t as useTranslation } from "./useTranslation-
|
|
4
|
-
import { t as CircleAlert } from "./circle-alert-
|
|
5
|
-
import { t as FilePreviewTooLarge } from "./FilePreviewTooLarge-
|
|
3
|
+
import { a as usePreviewHost, d as EmptyState, m as LoaderCircle, r as FilePreviewLayout, t as useTranslation } from "./useTranslation-ezxuF2DX.js";
|
|
4
|
+
import { t as CircleAlert } from "./circle-alert-DOgmM2Zn.js";
|
|
5
|
+
import { t as FilePreviewTooLarge } from "./FilePreviewTooLarge-CZHFMl0w.js";
|
|
6
6
|
import { useEffect, useRef, useState } from "react";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
8
|
//#region ../../node_modules/.pnpm/rtf.js@3.0.9_patch_hash=8f9a6825a5d8d1e4c4a5911165dc7e3398199e30ca7abc009df7bd0c612f3d24/node_modules/rtf.js/dist/EMFJS.bundle.js
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./documentAnchor-J7GGLU15.js";
|
|
2
2
|
import { r as readPreviewDocument, t as PreviewError } from "./source-Rx3etU3y.js";
|
|
3
|
-
import { _ as cva, a as usePreviewHost, d as EmptyState, m as LoaderCircle, o as usePreviewLogger, p as cn, r as FilePreviewLayout, t as useTranslation } from "./useTranslation-
|
|
4
|
-
import { t as CircleAlert } from "./circle-alert-
|
|
5
|
-
import { n as ZoomIn, t as ZoomOut } from "./zoom-out-
|
|
6
|
-
import { t as FilePreviewToolbarButton } from "./FilePreviewToolbarButton-
|
|
7
|
-
import { t as FilePreviewTooLarge } from "./FilePreviewTooLarge-
|
|
3
|
+
import { _ as cva, a as usePreviewHost, d as EmptyState, m as LoaderCircle, o as usePreviewLogger, p as cn, r as FilePreviewLayout, t as useTranslation } from "./useTranslation-ezxuF2DX.js";
|
|
4
|
+
import { t as CircleAlert } from "./circle-alert-DOgmM2Zn.js";
|
|
5
|
+
import { n as ZoomIn, t as ZoomOut } from "./zoom-out-DYpR5v9K.js";
|
|
6
|
+
import { t as FilePreviewToolbarButton } from "./FilePreviewToolbarButton-BUzQxFLX.js";
|
|
7
|
+
import { t as FilePreviewTooLarge } from "./FilePreviewTooLarge-CZHFMl0w.js";
|
|
8
8
|
import { n as normalizeSelectionText, t as createPreviewSelection } from "./selection-B0INvh6t.js";
|
|
9
9
|
import * as React$1 from "react";
|
|
10
10
|
import React, { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { i as __toESM } from "./rolldown-runtime-B-lAHAz2.js";
|
|
2
2
|
import { r as readPreviewDocument, t as PreviewError } from "./source-Rx3etU3y.js";
|
|
3
|
-
import { a as usePreviewHost, d as EmptyState, m as LoaderCircle, r as FilePreviewLayout, s as FilePreviewToolbar, t as useTranslation } from "./useTranslation-
|
|
4
|
-
import { n as ChevronRight, r as ChevronLeft, t as RotateCcw } from "./rotate-ccw-
|
|
5
|
-
import { t as CircleAlert } from "./circle-alert-
|
|
6
|
-
import { n as ZoomIn, t as ZoomOut } from "./zoom-out-
|
|
7
|
-
import { t as FilePreviewToolbarButton } from "./FilePreviewToolbarButton-
|
|
8
|
-
import { t as FilePreviewTooLarge } from "./FilePreviewTooLarge-
|
|
3
|
+
import { a as usePreviewHost, d as EmptyState, m as LoaderCircle, r as FilePreviewLayout, s as FilePreviewToolbar, t as useTranslation } from "./useTranslation-ezxuF2DX.js";
|
|
4
|
+
import { n as ChevronRight, r as ChevronLeft, t as RotateCcw } from "./rotate-ccw-q9GRRcYM.js";
|
|
5
|
+
import { t as CircleAlert } from "./circle-alert-DOgmM2Zn.js";
|
|
6
|
+
import { n as ZoomIn, t as ZoomOut } from "./zoom-out-DYpR5v9K.js";
|
|
7
|
+
import { t as FilePreviewToolbarButton } from "./FilePreviewToolbarButton-BUzQxFLX.js";
|
|
8
|
+
import { t as FilePreviewTooLarge } from "./FilePreviewTooLarge-CZHFMl0w.js";
|
|
9
9
|
import { t as createPreviewSelection } from "./selection-B0INvh6t.js";
|
|
10
10
|
import { t as attachTouchPinch } from "./touchPinch-C4fl-9fg.js";
|
|
11
11
|
import { t as require_jszip_min } from "./jszip.min-uwqlc4KL.js";
|
|
@@ -3877,7 +3877,7 @@ function WordFilePreview({ sourceId, fileName, document: previewDocument, onSele
|
|
|
3877
3877
|
if (!fitWidth || !container || !body || pageCount <= 0) return;
|
|
3878
3878
|
const fit = () => {
|
|
3879
3879
|
const width = body.offsetWidth;
|
|
3880
|
-
if (container.clientWidth > 0 && width > 0) setFitZoom(Math.min(
|
|
3880
|
+
if (container.clientWidth > 0 && width > 0) setFitZoom(Math.min(DOCX_PREVIEW_MAX_ZOOM, container.clientWidth / width));
|
|
3881
3881
|
};
|
|
3882
3882
|
fit();
|
|
3883
3883
|
const observer = new ResizeObserver(fit);
|
|
@@ -3957,7 +3957,12 @@ function WordFilePreview({ sourceId, fileName, document: previewDocument, onSele
|
|
|
3957
3957
|
normalizeSymbolBullets
|
|
3958
3958
|
});
|
|
3959
3959
|
if (!isCurrent()) return;
|
|
3960
|
-
stagingBody.querySelector(`.${docxClassName}-wrapper`)
|
|
3960
|
+
const wrapper = stagingBody.querySelector(`.${docxClassName}-wrapper`);
|
|
3961
|
+
if (wrapper) {
|
|
3962
|
+
wrapper.classList.add("docx-preview-wrapper");
|
|
3963
|
+
wrapper.style.background = "transparent";
|
|
3964
|
+
wrapper.style.padding = "0";
|
|
3965
|
+
}
|
|
3961
3966
|
const pages = getRenderedPages(stagingBody);
|
|
3962
3967
|
pages.forEach((page, index) => {
|
|
3963
3968
|
page.id = `docx-preview-page-${index + 1}`;
|
|
@@ -23,7 +23,7 @@ var imageFilePreviewPlugin = {
|
|
|
23
23
|
"image/vnd.microsoft.icon",
|
|
24
24
|
"image/svg+xml"
|
|
25
25
|
],
|
|
26
|
-
load: () => import("./ImageFilePreview-
|
|
26
|
+
load: () => import("./ImageFilePreview-JR2KQf2x.js")
|
|
27
27
|
};
|
|
28
28
|
//#endregion
|
|
29
29
|
export { imageFilePreviewPlugin as t };
|
package/dist/react.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as assertPreviewRange, t as PreviewError } from "./source-Rx3etU3y.js";
|
|
2
|
-
import { a as usePreviewHost, c as FilePreviewToolbarPortalHost, d as EmptyState, g as createLucideIcon, h as FileWarning, i as PreviewHostContext, l as FilePreviewToolbarPortalProvider, m as LoaderCircle, n as I18nContext, p as cn, r as FilePreviewLayout, s as FilePreviewToolbar, t as useTranslation } from "./useTranslation-
|
|
3
|
-
import { n as DialogPortalContainerProvider, r as PortalContainerProvider, t as FilePreviewToolbarButton } from "./FilePreviewToolbarButton-
|
|
4
|
-
import { t as imageFilePreviewPlugin } from "./imageFilePreviewPlugin-
|
|
2
|
+
import { a as usePreviewHost, c as FilePreviewToolbarPortalHost, d as EmptyState, g as createLucideIcon, h as FileWarning, i as PreviewHostContext, l as FilePreviewToolbarPortalProvider, m as LoaderCircle, n as I18nContext, p as cn, r as FilePreviewLayout, s as FilePreviewToolbar, t as useTranslation } from "./useTranslation-ezxuF2DX.js";
|
|
3
|
+
import { n as DialogPortalContainerProvider, r as PortalContainerProvider, t as FilePreviewToolbarButton } from "./FilePreviewToolbarButton-BUzQxFLX.js";
|
|
4
|
+
import { t as imageFilePreviewPlugin } from "./imageFilePreviewPlugin-C02W1uyU.js";
|
|
5
5
|
import { Component, Suspense, createContext, createElement, lazy, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
/**
|
|
@@ -32,14 +32,14 @@ var plugins = [
|
|
|
32
32
|
id: "pdf",
|
|
33
33
|
extensions: ["pdf"],
|
|
34
34
|
mediaTypes: ["application/pdf"],
|
|
35
|
-
load: () => import("./PdfFilePreview-
|
|
35
|
+
load: () => import("./PdfFilePreview-B34-QmrL.js"),
|
|
36
36
|
supportsSelectionReference: true
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
id: "powerpoint",
|
|
40
40
|
extensions: ["pptx"],
|
|
41
41
|
mediaTypes: ["application/vnd.openxmlformats-officedocument.presentationml.presentation"],
|
|
42
|
-
load: () => import("./PowerPointFilePreview-
|
|
42
|
+
load: () => import("./PowerPointFilePreview-NukTW9aw.js"),
|
|
43
43
|
supportsSelectionReference: true
|
|
44
44
|
},
|
|
45
45
|
{
|
|
@@ -50,20 +50,20 @@ var plugins = [
|
|
|
50
50
|
"text/rtf",
|
|
51
51
|
"application/x-rtf"
|
|
52
52
|
],
|
|
53
|
-
load: () => import("./RtfFilePreview-
|
|
53
|
+
load: () => import("./RtfFilePreview-Bdy8iPf9.js")
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
id: "spreadsheet",
|
|
57
57
|
extensions: ["xlsx"],
|
|
58
58
|
mediaTypes: ["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
|
|
59
|
-
load: () => import("./SpreadsheetFilePreview-
|
|
59
|
+
load: () => import("./SpreadsheetFilePreview-jB17TCNJ.js"),
|
|
60
60
|
supportsSelectionReference: true
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
id: "word",
|
|
64
64
|
extensions: ["docx"],
|
|
65
65
|
mediaTypes: ["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
|
|
66
|
-
load: () => import("./WordFilePreview-
|
|
66
|
+
load: () => import("./WordFilePreview-YznLhQcq.js"),
|
|
67
67
|
supportsSelectionReference: true
|
|
68
68
|
}
|
|
69
69
|
];
|
package/dist/styles.css
CHANGED
|
@@ -884,14 +884,9 @@
|
|
|
884
884
|
border-width: 0;
|
|
885
885
|
}
|
|
886
886
|
|
|
887
|
-
:where(.file-preview-root):is(.border
|
|
888
|
-
border-
|
|
889
|
-
border-
|
|
890
|
-
}
|
|
891
|
-
|
|
892
|
-
:where(.file-preview-root):is(.border-y-\[3px\]), :where(.file-preview-root) .border-y-\[3px\] {
|
|
893
|
-
border-block-style: var(--fp-tw-border-style);
|
|
894
|
-
border-block-width: 3px;
|
|
887
|
+
:where(.file-preview-root):is(.border-\[1\.5px\]), :where(.file-preview-root) .border-\[1\.5px\] {
|
|
888
|
+
border-style: var(--fp-tw-border-style);
|
|
889
|
+
border-width: 1.5px;
|
|
895
890
|
}
|
|
896
891
|
|
|
897
892
|
:where(.file-preview-root):is(.border-t), :where(.file-preview-root) .border-t {
|
|
@@ -1008,6 +1003,10 @@
|
|
|
1008
1003
|
background-color: var(--muted);
|
|
1009
1004
|
}
|
|
1010
1005
|
|
|
1006
|
+
:where(.file-preview-root):is(.bg-neutral-100), :where(.file-preview-root) .bg-neutral-100 {
|
|
1007
|
+
background-color: var(--cs-neutral-100);
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1011
1010
|
:where(.file-preview-root):is(.bg-neutral-900), :where(.file-preview-root) .bg-neutral-900 {
|
|
1012
1011
|
background-color: var(--cs-neutral-900);
|
|
1013
1012
|
}
|
|
@@ -1060,12 +1059,12 @@
|
|
|
1060
1059
|
fill: currentColor;
|
|
1061
1060
|
}
|
|
1062
1061
|
|
|
1063
|
-
:where(.file-preview-root):is(.fill-neutral-
|
|
1064
|
-
fill: var(--cs-neutral-
|
|
1062
|
+
:where(.file-preview-root):is(.fill-neutral-100), :where(.file-preview-root) .fill-neutral-100 {
|
|
1063
|
+
fill: var(--cs-neutral-100);
|
|
1065
1064
|
}
|
|
1066
1065
|
|
|
1067
|
-
:where(.file-preview-root):is(.stroke-neutral-
|
|
1068
|
-
stroke: var(--cs-neutral-
|
|
1066
|
+
:where(.file-preview-root):is(.stroke-neutral-100), :where(.file-preview-root) .stroke-neutral-100 {
|
|
1067
|
+
stroke: var(--cs-neutral-100);
|
|
1069
1068
|
}
|
|
1070
1069
|
|
|
1071
1070
|
:where(.file-preview-root):is(.stroke-2), :where(.file-preview-root) .stroke-2 {
|
|
@@ -1286,10 +1285,6 @@
|
|
|
1286
1285
|
color: var(--muted-foreground);
|
|
1287
1286
|
}
|
|
1288
1287
|
|
|
1289
|
-
:where(.file-preview-root):is(.text-neutral-50), :where(.file-preview-root) .text-neutral-50 {
|
|
1290
|
-
color: var(--cs-neutral-50);
|
|
1291
|
-
}
|
|
1292
|
-
|
|
1293
1288
|
:where(.file-preview-root):is(.text-neutral-900), :where(.file-preview-root) .text-neutral-900 {
|
|
1294
1289
|
color: var(--cs-neutral-900);
|
|
1295
1290
|
}
|
|
@@ -1477,14 +1472,9 @@
|
|
|
1477
1472
|
}
|
|
1478
1473
|
|
|
1479
1474
|
@media (hover: hover) {
|
|
1480
|
-
:where(.file-preview-root):is(.group-hover\/scrollbar\:border-
|
|
1481
|
-
border-
|
|
1482
|
-
border-
|
|
1483
|
-
}
|
|
1484
|
-
|
|
1485
|
-
:where(.file-preview-root):is(.group-hover\/scrollbar\:border-y-0:is(:where(.group\/scrollbar):hover *)), :where(.file-preview-root) .group-hover\/scrollbar\:border-y-0:is(:where(.group\/scrollbar):hover *) {
|
|
1486
|
-
border-block-style: var(--fp-tw-border-style);
|
|
1487
|
-
border-block-width: 0;
|
|
1475
|
+
:where(.file-preview-root):is(.group-hover\/scrollbar\:border-0:is(:where(.group\/scrollbar):hover *)), :where(.file-preview-root) .group-hover\/scrollbar\:border-0:is(:where(.group\/scrollbar):hover *) {
|
|
1476
|
+
border-style: var(--fp-tw-border-style);
|
|
1477
|
+
border-width: 0;
|
|
1488
1478
|
}
|
|
1489
1479
|
|
|
1490
1480
|
:where(.file-preview-root):is(.group-hover\/scrollbar\:bg-\[var\(--scrollbar-thumb-hover\,color-mix\(in_srgb\,var\(--foreground\)_20\%\,transparent\)\)\]:is(:where(.group\/scrollbar):hover *)), :where(.file-preview-root) .group-hover\/scrollbar\:bg-\[var\(--scrollbar-thumb-hover\,color-mix\(in_srgb\,var\(--foreground\)_20\%\,transparent\)\)\]:is(:where(.group\/scrollbar):hover *) {
|
|
@@ -2089,18 +2079,26 @@
|
|
|
2089
2079
|
background-color: var(--cs-neutral-100);
|
|
2090
2080
|
}
|
|
2091
2081
|
|
|
2092
|
-
:where(.file-preview-root):is(.dark\:
|
|
2093
|
-
|
|
2082
|
+
:where(.file-preview-root):is(.dark\:bg-neutral-900:is(.dark *)), :where(.file-preview-root) .dark\:bg-neutral-900:is(.dark *) {
|
|
2083
|
+
background-color: var(--cs-neutral-900);
|
|
2094
2084
|
}
|
|
2095
2085
|
|
|
2096
|
-
:where(.file-preview-root):is(.dark\:
|
|
2097
|
-
|
|
2086
|
+
:where(.file-preview-root):is(.dark\:fill-neutral-900:is(.dark *)), :where(.file-preview-root) .dark\:fill-neutral-900:is(.dark *) {
|
|
2087
|
+
fill: var(--cs-neutral-900);
|
|
2088
|
+
}
|
|
2089
|
+
|
|
2090
|
+
:where(.file-preview-root):is(.dark\:stroke-neutral-900:is(.dark *)), :where(.file-preview-root) .dark\:stroke-neutral-900:is(.dark *) {
|
|
2091
|
+
stroke: var(--cs-neutral-900);
|
|
2098
2092
|
}
|
|
2099
2093
|
|
|
2100
2094
|
:where(.file-preview-root):is(.dark\:text-muted-foreground:is(.dark *)), :where(.file-preview-root) .dark\:text-muted-foreground:is(.dark *) {
|
|
2101
2095
|
color: var(--muted-foreground);
|
|
2102
2096
|
}
|
|
2103
2097
|
|
|
2098
|
+
:where(.file-preview-root):is(.dark\:text-neutral-50:is(.dark *)), :where(.file-preview-root) .dark\:text-neutral-50:is(.dark *) {
|
|
2099
|
+
color: var(--cs-neutral-50);
|
|
2100
|
+
}
|
|
2101
|
+
|
|
2104
2102
|
:where(.file-preview-root):is(.dark\:text-neutral-100:is(.dark *)), :where(.file-preview-root) .dark\:text-neutral-100:is(.dark *) {
|
|
2105
2103
|
color: var(--cs-neutral-100);
|
|
2106
2104
|
}
|
|
@@ -4979,7 +4979,7 @@ function ScrollArea({ className, children, hidden, type = "scroll", scrollHideDe
|
|
|
4979
4979
|
className: cn("group/scrollbar z-10 flex touch-none duration-200 select-none data-[state=hidden]:animate-out data-[state=hidden]:fade-out-0 motion-reduce:animate-none", axis === "vertical" ? "w-3 py-0.5 pr-0.5" : "h-3 flex-col px-0.5 pb-0.5"),
|
|
4980
4980
|
children: /* @__PURE__ */ jsx(ScrollAreaThumb, {
|
|
4981
4981
|
"data-slot": "scroll-area-thumb",
|
|
4982
|
-
className:
|
|
4982
|
+
className: "relative flex-1 rounded-full border-[1.5px] border-solid border-transparent bg-[var(--scrollbar-thumb,color-mix(in_srgb,var(--foreground)_15%,transparent))] bg-clip-padding transition-[border-width,background-color] duration-150 group-hover/scrollbar:border-0 group-hover/scrollbar:bg-[var(--scrollbar-thumb-hover,color-mix(in_srgb,var(--foreground)_20%,transparent))] motion-reduce:transition-none"
|
|
4983
4983
|
})
|
|
4984
4984
|
}, axis)),
|
|
4985
4985
|
orientation === "both" && /* @__PURE__ */ jsx(ScrollAreaCorner, {})
|