@file-viewer/vue3 2.2.2 → 2.2.4

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.
@@ -165,6 +165,17 @@ export type FileViewerEmits = CoreFileViewerComponentEmits;
165
165
  * 都应围绕这组能力保持同名同语义,避免不同生态出现 API 漂移。
166
166
  */
167
167
  export type FileViewerExpose = CoreFileViewerPublicApi;
168
+ /**
169
+ * Vue 3 原生工具栏扩展插槽的响应式属性。
170
+ *
171
+ * `api` 是组件实例方法门面;其余状态会随当前文件、缩放和搜索结果更新。
172
+ */
173
+ export interface FileViewerToolbarSlotProps {
174
+ readonly api: CoreFileViewerPublicApi;
175
+ readonly availability: CoreFileViewerOperationAvailability;
176
+ readonly zoomState: CoreFileViewerZoomState;
177
+ readonly searchState: CoreFileViewerSearchState;
178
+ }
168
179
  /**
169
180
  * 预览器通用配置。
170
181
  */
@@ -1,5 +1,11 @@
1
1
  import { FileViewerComponentProps as FileViewerProps, FileViewerResolvedThemeMode } from '@file-viewer/core';
2
- declare const __VLS_export: import('vue').DefineComponent<FileViewerProps, import('@file-viewer/core').FileViewerPublicApi, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
2
+ import { FileViewerToolbarSlotProps } from '../../common/type';
3
+ type __VLS_Slots = {
4
+ 'toolbar-start'?: (props: FileViewerToolbarSlotProps) => unknown;
5
+ 'toolbar-end'?: (props: FileViewerToolbarSlotProps) => unknown;
6
+ };
7
+ declare const __VLS_base: import('vue').DefineComponent<FileViewerProps, import('@file-viewer/core').FileViewerPublicApi, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
8
+ "zoom-change": (state: import('@file-viewer/core').FileViewerZoomState) => any;
3
9
  "load-start": (context: import('@file-viewer/core').FileViewerLifecycleContext) => any;
4
10
  "load-complete": (context: import('@file-viewer/core').FileViewerLifecycleContext) => any;
5
11
  "unload-start": (context: import('@file-viewer/core').FileViewerLifecycleContext) => any;
@@ -10,10 +16,10 @@ declare const __VLS_export: import('vue').DefineComponent<FileViewerProps, impor
10
16
  "operation-availability-change": (availability: import('@file-viewer/core').FileViewerOperationAvailability) => any;
11
17
  "location-change": (anchor: import('@file-viewer/core').FileViewerDocumentAnchor | null) => any;
12
18
  "fit-change": (result: import('@file-viewer/core').FileViewerFitResult) => any;
13
- "zoom-change": (state: import('@file-viewer/core').FileViewerZoomState) => any;
14
19
  "view-state-change": (change: import('@file-viewer/core').FileViewerViewStateChange) => any;
15
20
  "theme-change": (theme: FileViewerResolvedThemeMode) => any;
16
21
  }, string, import('vue').PublicProps, Readonly<FileViewerProps> & Readonly<{
22
+ "onZoom-change"?: ((state: import('@file-viewer/core').FileViewerZoomState) => any) | undefined;
17
23
  "onLoad-start"?: ((context: import('@file-viewer/core').FileViewerLifecycleContext) => any) | undefined;
18
24
  "onLoad-complete"?: ((context: import('@file-viewer/core').FileViewerLifecycleContext) => any) | undefined;
19
25
  "onUnload-start"?: ((context: import('@file-viewer/core').FileViewerLifecycleContext) => any) | undefined;
@@ -24,9 +30,14 @@ declare const __VLS_export: import('vue').DefineComponent<FileViewerProps, impor
24
30
  "onOperation-availability-change"?: ((availability: import('@file-viewer/core').FileViewerOperationAvailability) => any) | undefined;
25
31
  "onLocation-change"?: ((anchor: import('@file-viewer/core').FileViewerDocumentAnchor | null) => any) | undefined;
26
32
  "onFit-change"?: ((result: import('@file-viewer/core').FileViewerFitResult) => any) | undefined;
27
- "onZoom-change"?: ((state: import('@file-viewer/core').FileViewerZoomState) => any) | undefined;
28
33
  "onView-state-change"?: ((change: import('@file-viewer/core').FileViewerViewStateChange) => any) | undefined;
29
34
  "onTheme-change"?: ((theme: FileViewerResolvedThemeMode) => any) | undefined;
30
35
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
36
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
37
  declare const _default: typeof __VLS_export;
32
38
  export default _default;
39
+ type __VLS_WithSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -0,0 +1,43 @@
1
+ import { FileViewerComponentProps as FileViewerProps, FileViewerPublicApi as FileViewerExpose } from '@file-viewer/core';
2
+ import { FileViewerToolbarSlotProps } from '../../common/type';
3
+ type __VLS_Slots = {
4
+ 'toolbar-start'?: (props: FileViewerToolbarSlotProps) => unknown;
5
+ 'toolbar-end'?: (props: FileViewerToolbarSlotProps) => unknown;
6
+ };
7
+ declare const __VLS_base: import('vue').DefineComponent<FileViewerProps, FileViewerExpose, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
8
+ "zoom-change": (state: import('@file-viewer/core').FileViewerZoomState) => any;
9
+ "load-start": (context: import('@file-viewer/core').FileViewerLifecycleContext) => any;
10
+ "load-complete": (context: import('@file-viewer/core').FileViewerLifecycleContext) => any;
11
+ "unload-start": (context: import('@file-viewer/core').FileViewerLifecycleContext) => any;
12
+ "unload-complete": (context: import('@file-viewer/core').FileViewerLifecycleContext) => any;
13
+ "search-change": (state: import('@file-viewer/core').FileViewerSearchState) => any;
14
+ "operation-before": (context: import('@file-viewer/core').FileViewerOperationContext) => any;
15
+ "operation-cancel": (context: import('@file-viewer/core').FileViewerOperationContext) => any;
16
+ "operation-availability-change": (availability: import('@file-viewer/core').FileViewerOperationAvailability) => any;
17
+ "location-change": (anchor: import('@file-viewer/core').FileViewerDocumentAnchor | null) => any;
18
+ "fit-change": (result: import('@file-viewer/core').FileViewerFitResult) => any;
19
+ "view-state-change": (change: import('@file-viewer/core').FileViewerViewStateChange) => any;
20
+ "theme-change": (theme: import('@file-viewer/core').FileViewerResolvedThemeMode) => any;
21
+ }, string, import('vue').PublicProps, Readonly<FileViewerProps> & Readonly<{
22
+ "onZoom-change"?: ((state: import('@file-viewer/core').FileViewerZoomState) => any) | undefined;
23
+ "onLoad-start"?: ((context: import('@file-viewer/core').FileViewerLifecycleContext) => any) | undefined;
24
+ "onLoad-complete"?: ((context: import('@file-viewer/core').FileViewerLifecycleContext) => any) | undefined;
25
+ "onUnload-start"?: ((context: import('@file-viewer/core').FileViewerLifecycleContext) => any) | undefined;
26
+ "onUnload-complete"?: ((context: import('@file-viewer/core').FileViewerLifecycleContext) => any) | undefined;
27
+ "onSearch-change"?: ((state: import('@file-viewer/core').FileViewerSearchState) => any) | undefined;
28
+ "onOperation-before"?: ((context: import('@file-viewer/core').FileViewerOperationContext) => any) | undefined;
29
+ "onOperation-cancel"?: ((context: import('@file-viewer/core').FileViewerOperationContext) => any) | undefined;
30
+ "onOperation-availability-change"?: ((availability: import('@file-viewer/core').FileViewerOperationAvailability) => any) | undefined;
31
+ "onLocation-change"?: ((anchor: import('@file-viewer/core').FileViewerDocumentAnchor | null) => any) | undefined;
32
+ "onFit-change"?: ((result: import('@file-viewer/core').FileViewerFitResult) => any) | undefined;
33
+ "onView-state-change"?: ((change: import('@file-viewer/core').FileViewerViewStateChange) => any) | undefined;
34
+ "onTheme-change"?: ((theme: import('@file-viewer/core').FileViewerResolvedThemeMode) => any) | undefined;
35
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
36
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
37
+ declare const _default: typeof __VLS_export;
38
+ export default _default;
39
+ type __VLS_WithSlots<T, S> = T & {
40
+ new (): {
41
+ $slots: S;
42
+ };
43
+ };
@@ -13,6 +13,51 @@ interface UseViewerDocumentFeaturesOptions {
13
13
  * 这里负责把这些能力组合成组件对外暴露的 API,并同步搜索/定位状态。
14
14
  */
15
15
  export declare const useViewerDocumentFeatures: ({ output, getOptions, emitSearchChange, emitLocationChange }: UseViewerDocumentFeaturesOptions) => {
16
+ searchState: {
17
+ query: string;
18
+ total: number;
19
+ currentIndex: number;
20
+ current: {
21
+ id: string;
22
+ index: number;
23
+ text: string;
24
+ anchor: {
25
+ id: string;
26
+ index: number;
27
+ line: number;
28
+ type: "page" | "line" | "block";
29
+ label: string;
30
+ text: string;
31
+ page?: number | undefined;
32
+ top: number;
33
+ left: number;
34
+ width: number;
35
+ height: number;
36
+ } | null;
37
+ line?: number | undefined;
38
+ page?: number | undefined;
39
+ } | null;
40
+ matches: {
41
+ id: string;
42
+ index: number;
43
+ text: string;
44
+ anchor: {
45
+ id: string;
46
+ index: number;
47
+ line: number;
48
+ type: "page" | "line" | "block";
49
+ label: string;
50
+ text: string;
51
+ page?: number | undefined;
52
+ top: number;
53
+ left: number;
54
+ width: number;
55
+ height: number;
56
+ } | null;
57
+ line?: number | undefined;
58
+ page?: number | undefined;
59
+ }[];
60
+ };
16
61
  refreshDocumentIndex: (options?: import('@file-viewer/core').FileViewerDocumentFeatureActionOptions) => Promise<FileViewerDocumentAnchor[]>;
17
62
  clearDocumentState: () => Promise<FileViewerSearchState>;
18
63
  getScrollContainer: () => HTMLElement | null;
@@ -34,6 +34,7 @@ export declare const useViewerRenderSurface: ({ output, getOptions, isCurrentReq
34
34
  clearRenderedContent: (reason?: FileViewerLifecycleContext["reason"]) => import('@file-viewer/core').FileViewerRenderSurfaceClearState<FileViewerVueRenderSession, FileViewerLifecycleContext | null>;
35
35
  mountRenderedContent: (buffer: ArrayBuffer, file: File, version: number, sourceUrl?: string, streamUrl?: string) => Promise<FileViewerVueRenderSession | undefined>;
36
36
  activeExportAdapter: import('vue').ShallowRef<FileRenderExportAdapter | null, FileRenderExportAdapter | null>;
37
+ rendererSearchAvailable: Ref<boolean, boolean>;
37
38
  renderedReady: Ref<boolean, boolean>;
38
39
  progressiveReady: Ref<boolean, boolean>;
39
40
  };
@@ -11,6 +11,7 @@ interface UseViewerToolbarOptions {
11
11
  getZoomState: () => FileViewerZoomState;
12
12
  loading: Ref<boolean>;
13
13
  normalizedToolbar: ComputedRef<FileViewerToolbarOptions>;
14
+ rendererSearchAvailable: Ref<boolean>;
14
15
  renderedReady: Ref<boolean>;
15
16
  zoomState: FileViewerZoomState;
16
17
  emitOperationAvailabilityChange: (availability: FileViewerOperationAvailability) => void;
@@ -22,7 +23,7 @@ interface UseViewerToolbarOptions {
22
23
  * 按钮显隐、PDF 默认悬浮位置和能力矩阵由 `@file-viewer/core` 统一计算;
23
24
  * 这里只负责把 Vue 响应式状态、组件事件和操作 API 串起来。
24
25
  */
25
- export declare const useViewerToolbar: ({ activeExportAdapter, currentBuffer, currentExtend, currentFile, currentSourceUrl, error, getOptions, getZoomState, loading, normalizedToolbar, renderedReady, zoomState, emitOperationAvailabilityChange, emitZoomChange }: UseViewerToolbarOptions) => {
26
+ export declare const useViewerToolbar: ({ activeExportAdapter, currentBuffer, currentExtend, currentFile, currentSourceUrl, error, getOptions, getZoomState, loading, normalizedToolbar, rendererSearchAvailable, renderedReady, zoomState, emitOperationAvailabilityChange, emitZoomChange }: UseViewerToolbarOptions) => {
26
27
  operationAvailability: ComputedRef<FileViewerOperationAvailability>;
27
28
  visibleToolbar: ComputedRef<FileViewerToolbarOptions>;
28
29
  toolbarOrder: ComputedRef<FileViewerResolvedToolbarItem[]>;
@@ -0,0 +1,11 @@
1
+ export interface ViewerReadinessPresentationInput {
2
+ loading: boolean;
3
+ progressiveReady: boolean;
4
+ renderedReady: boolean;
5
+ hasError: boolean;
6
+ }
7
+ export interface ViewerReadinessPresentation {
8
+ contentHidden: boolean;
9
+ loadingStateVisible: boolean;
10
+ }
11
+ export declare const resolveViewerReadinessPresentation: ({ loading, progressiveReady, renderedReady, hasError }: ViewerReadinessPresentationInput) => ViewerReadinessPresentation;
@@ -1,2 +1,2 @@
1
- import { default as FileViewer } from './FileViewer.vue';
1
+ import { default as FileViewer } from './ShadowFileViewer.vue';
2
2
  export default FileViewer;
@@ -1,5 +1,6 @@
1
1
  import { FileRenderContext, FileRenderHandlerRendererSession, FileViewerRenderedInstance as Rendered } from '@file-viewer/core';
2
2
  export type FileViewerVueRenderSession = FileRenderHandlerRendererSession<Rendered | undefined>;
3
+ export type FileViewerVueSearchAvailabilityListener = (available: boolean) => void;
3
4
  /**
4
5
  * Bridges the Vue renderer registry into the framework-neutral core renderer session.
5
6
  *
@@ -8,4 +9,4 @@ export type FileViewerVueRenderSession = FileRenderHandlerRendererSession<Render
8
9
  * @file-viewer/preset-all work in the native Vue component path without falling back to
9
10
  * the static core-only registry.
10
11
  */
11
- export declare function createVueRenderSession(buffer: ArrayBuffer, type: string, target: HTMLDivElement, context?: FileRenderContext): Promise<FileViewerVueRenderSession>;
12
+ export declare function createVueRenderSession(buffer: ArrayBuffer, type: string, target: HTMLDivElement, context?: FileRenderContext, onSearchAvailabilityChange?: FileViewerVueSearchAvailabilityListener): Promise<FileViewerVueRenderSession>;
@@ -1,135 +1 @@
1
- import { FileViewerAiOptions, FileViewerApplyViewStateOptions, FileViewerArchiveOptions, FileViewerCadOptions, FileViewerDocxOptions, FileViewerDocumentAnchor, FileViewerDocumentChunk, FileViewerEvent, FileViewerEventHandler, FileViewerEventType, FileViewerFileRef, FileViewerFitMode, FileViewerFitOptions, FileViewerFitResult, FileViewerInstance, FileViewerLifecycleContext, FileViewerOperationAvailability, FileViewerOperationContext, FileViewerOptions, FileViewerPdfOptions, FileViewerPrintOptions, FileViewerSpreadsheetOptions, FileViewerPublicApi, FileViewerSearchOptions, FileViewerSearchState, FileViewerThemeMode, FileViewerToolbarOptions, FileViewerToolbarPosition, FileViewerTypstOptions, FileViewerViewState, FileViewerWatermarkOptions, FileViewerZoomState, RendererRegistry } from '@file-viewer/core';
2
- export type FileRef = FileViewerFileRef;
3
- export type ViewerWatermarkOptions = FileViewerWatermarkOptions;
4
- export type ViewerToolbarPosition = FileViewerToolbarPosition;
5
- export type ViewerToolbarOptions = FileViewerToolbarOptions;
6
- export type ViewerArchiveOptions = FileViewerArchiveOptions;
7
- export type ViewerPdfOptions = FileViewerPdfOptions;
8
- export type ViewerSpreadsheetOptions = FileViewerSpreadsheetOptions;
9
- export type ViewerDocxOptions = FileViewerDocxOptions;
10
- export type ViewerTypstOptions = FileViewerTypstOptions;
11
- export type ViewerCadOptions = FileViewerCadOptions;
12
- export type ViewerSearchOptions = FileViewerSearchOptions;
13
- export type ViewerAiOptions = FileViewerAiOptions;
14
- export type ViewerFitMode = FileViewerFitMode;
15
- export type ViewerFitOptions = FileViewerFitOptions;
16
- export type ViewerFitResult = FileViewerFitResult;
17
- export type ViewerViewState = FileViewerViewState;
18
- export type ViewerApplyViewStateOptions = FileViewerApplyViewStateOptions;
19
- export type ViewerThemeMode = FileViewerThemeMode;
20
- export type ViewerOptions = FileViewerOptions;
21
- export type ViewerEventType = FileViewerEventType;
22
- export type ViewerEvent = FileViewerEvent;
23
- export type ViewerEventHandler = FileViewerEventHandler;
24
- export type ViewerLifecycleContext = FileViewerLifecycleContext;
25
- export type ViewerOperationContext = FileViewerOperationContext;
26
- export interface ViewerState {
27
- loading: boolean;
28
- ready: boolean;
29
- error: unknown | null;
30
- lastEvent: ViewerEvent | null;
31
- lifecycle: ViewerLifecycleContext | null;
32
- availability: FileViewerOperationAvailability | null;
33
- search: FileViewerSearchState | null;
34
- zoom: FileViewerZoomState | null;
35
- location: FileViewerDocumentAnchor | null;
36
- viewState: FileViewerViewState | null;
37
- }
38
- export type ViewerStateListener = (state: ViewerState, event?: ViewerEvent) => void;
39
- export interface ViewerMountOptions {
40
- url?: string;
41
- file?: FileRef;
42
- buffer?: ArrayBuffer;
43
- name?: string;
44
- filename?: string;
45
- type?: string;
46
- size?: number;
47
- options?: ViewerOptions;
48
- onEvent?: ViewerEventHandler;
49
- onStateChange?: ViewerStateListener;
50
- }
51
- export interface ViewerSourceInput {
52
- url?: string;
53
- file?: FileRef;
54
- buffer?: ArrayBuffer;
55
- filename?: string;
56
- name?: string;
57
- type?: string;
58
- size?: number;
59
- }
60
- export interface ViewerFetchInput {
61
- url: string;
62
- signal?: AbortSignal;
63
- source: ViewerSourceInput;
64
- }
65
- export type ViewerFetchFile = (input: ViewerFetchInput) => Promise<FileRef | null | undefined>;
66
- export interface ViewerCoreOptions {
67
- registry?: RendererRegistry;
68
- fetchFile?: ViewerFetchFile;
69
- onError?: (error: unknown, source: ViewerSourceInput) => void;
70
- }
71
- export interface ViewerController {
72
- readonly container: HTMLElement;
73
- load(options: ViewerMountOptions): Promise<void>;
74
- update(options?: ViewerMountOptions): Promise<void>;
75
- reload(): Promise<void>;
76
- destroy(): void;
77
- getApi(): FileViewerPublicApi | FileViewerInstance | null;
78
- downloadOriginalFile(): Promise<void>;
79
- printRenderedHtml(options?: FileViewerPrintOptions): Promise<void>;
80
- printWithMask(options?: FileViewerPrintOptions): Promise<void>;
81
- exportRenderedHtml(): Promise<void>;
82
- zoomIn(): Promise<FileViewerZoomState | null>;
83
- zoomOut(): Promise<FileViewerZoomState | null>;
84
- resetZoom(): Promise<FileViewerZoomState | null>;
85
- fitToView(fit?: FileViewerFitMode | FileViewerFitOptions): Promise<FileViewerFitResult | null>;
86
- getViewState(): FileViewerViewState | null;
87
- applyViewState(state: FileViewerViewState, options?: FileViewerApplyViewStateOptions): Promise<FileViewerViewState | null>;
88
- searchDocument(query: string): Promise<FileViewerSearchState | null>;
89
- clearDocumentSearch(): Promise<FileViewerSearchState | null>;
90
- nextSearchResult(): Promise<FileViewerSearchState | null>;
91
- previousSearchResult(): Promise<FileViewerSearchState | null>;
92
- collectDocumentAnchors(): Promise<FileViewerDocumentAnchor[]>;
93
- scrollToAnchor(anchor: FileViewerDocumentAnchor | string): Promise<boolean>;
94
- scrollToLine(line: number): Promise<boolean>;
95
- getDocumentTextChunks(): FileViewerDocumentChunk[];
96
- getOperationAvailability(): FileViewerOperationAvailability | null;
97
- getZoomState(): FileViewerZoomState | null;
98
- getSearchState(): FileViewerSearchState | null;
99
- getState(): ViewerState;
100
- subscribe(listener: ViewerStateListener): () => void;
101
- }
102
- export type ViewerControllerAccessor = () => ViewerController | null;
103
- export interface ViewerControllerHandle {
104
- load(options: ViewerMountOptions): Promise<void>;
105
- update(options?: ViewerMountOptions): Promise<void>;
106
- reload(): Promise<void>;
107
- destroy(): void;
108
- getController(): ViewerController | null;
109
- getApi(): FileViewerPublicApi | FileViewerInstance | null;
110
- downloadOriginalFile(): Promise<void>;
111
- printRenderedHtml(options?: FileViewerPrintOptions): Promise<void>;
112
- printWithMask(options?: FileViewerPrintOptions): Promise<void>;
113
- exportRenderedHtml(): Promise<void>;
114
- zoomIn(): Promise<FileViewerZoomState | null>;
115
- zoomOut(): Promise<FileViewerZoomState | null>;
116
- resetZoom(): Promise<FileViewerZoomState | null>;
117
- fitToView(fit?: FileViewerFitMode | FileViewerFitOptions): Promise<FileViewerFitResult | null>;
118
- getViewState(): FileViewerViewState | null;
119
- applyViewState(state: FileViewerViewState, options?: FileViewerApplyViewStateOptions): Promise<FileViewerViewState | null>;
120
- searchDocument(query: string): Promise<FileViewerSearchState | null>;
121
- clearDocumentSearch(): Promise<FileViewerSearchState | null>;
122
- nextSearchResult(): Promise<FileViewerSearchState | null>;
123
- previousSearchResult(): Promise<FileViewerSearchState | null>;
124
- collectDocumentAnchors(): Promise<FileViewerDocumentAnchor[]>;
125
- scrollToAnchor(anchor: FileViewerDocumentAnchor | string): Promise<boolean>;
126
- scrollToLine(line: number): Promise<boolean>;
127
- getDocumentTextChunks(): FileViewerDocumentChunk[];
128
- getOperationAvailability(): FileViewerOperationAvailability | null;
129
- getZoomState(): FileViewerZoomState | null;
130
- getSearchState(): FileViewerSearchState | null;
131
- getState(): ViewerState | null;
132
- subscribe(listener: ViewerStateListener): () => void;
133
- }
134
- export declare const createViewerControllerHandle: (getController: ViewerControllerAccessor, dispose: () => void) => ViewerControllerHandle;
135
- export declare const mountViewer: (container: HTMLElement, initialOptions?: ViewerMountOptions, coreOptions?: ViewerCoreOptions) => ViewerController;
1
+ export * from '@file-viewer/core/browser';
@@ -11,12 +11,7 @@ export interface FileViewerVue3PluginOptions {
11
11
  componentName?: string;
12
12
  }
13
13
  export type FileViewerVue3Handle = FileViewerExpose;
14
- /**
15
- * Vue3 插件安装器。
16
- *
17
- * 这里顺手引入库级样式,确保宿主项目只要 `app.use(FileViewer)`,
18
- * 就能拿到组件渲染所需的基础样式。
19
- */
14
+ /** Vue3 plugin installer. Component styles follow each instance's isolation mode. */
20
15
  declare class Installer implements FileViewerInstaller {
21
16
  private installed;
22
17
  install(app: App, options?: FileViewerVue3PluginOptions): void;
@@ -26,5 +21,5 @@ export default _default;
26
21
  export { FileViewer };
27
22
  export { createFlyfishFileViewer, mountFlyfishFileViewer } from './native';
28
23
  export type { CreateFlyfishFileViewerOptions, FlyfishFileViewerNativeController, FlyfishFileViewerNativeSource } from './native';
29
- export type { FileRef, ViewerAiOptions, ViewerApplyViewStateOptions, ViewerArchiveOptions, ViewerCadOptions, ViewerController, ViewerControllerAccessor, ViewerControllerHandle, ViewerDocxOptions, ViewerEvent, ViewerEventHandler, ViewerEventType, ViewerFetchFile, ViewerFetchInput, ViewerMountOptions, ViewerOptions, ViewerPdfOptions, ViewerSpreadsheetOptions, ViewerCoreOptions, ViewerSearchOptions, ViewerSourceInput, ViewerThemeMode, ViewerToolbarOptions, ViewerToolbarPosition, ViewerTypstOptions, ViewerViewState, ViewerWatermarkOptions, ViewerLifecycleContext, ViewerOperationContext, ViewerState, ViewerStateListener, } from './controller';
30
- export type { FileRenderContext, FileRenderExportAdapter, FileRenderExportMode, FileRenderExportOptions, FileViewerAiOptions, FileViewerApplyViewStateOptions, FileViewerArchiveOptions, FileViewerBeforeOperation, FileViewerCadDwfLineWeightMode, FileViewerCadOptions, FileViewerCadRenderer, FileViewerDocxOptions, FileViewerDocumentAnchor, FileViewerDocumentChunk, FileViewerEmits, FileViewerEventMap, FileViewerExpose, FileViewerLifecycleContext, FileViewerLifecycleHooks, FileViewerLifecyclePhase, FileViewerOperationAvailability, FileViewerOperationContext, FileViewerOperationType, FileViewerOptions, FileViewerPdfOptions, FileViewerSpreadsheetOptions, FileViewerProps, FileViewerSearchMatch, FileViewerSearchOptions, FileViewerSearchProvider, FileViewerSearchState, FileViewerSourceType, FileViewerToolbarOptions, FileViewerToolbarPosition, FileViewerThemeMode, FileViewerTypstOptions, FileViewerViewScrollState, FileViewerViewState, FileViewerViewStateChange, FileViewerViewStateChangeAction, FileViewerViewStateChangeSource, FileViewerViewStateProvider, FileViewerWatermarkOptions, FileViewerZoomProvider, FileViewerZoomState } from './common/type';
24
+ export type { FileRef, ViewerAiOptions, ViewerApplyViewStateOptions, ViewerArchiveOptions, ViewerCadOptions, ViewerController, ViewerControllerAccessor, ViewerControllerHandle, ViewerDocxOptions, ViewerEvent, ViewerEventHandler, ViewerEventType, ViewerFetchFile, ViewerFetchInput, ViewerFitMode, ViewerFitOptions, ViewerFitResult, ViewerMountOptions, ViewerOptions, ViewerPdfOptions, ViewerPresentationOptions, ViewerSpreadsheetOptions, ViewerCoreOptions, ViewerSearchOptions, ViewerSourceInput, ViewerThemeMode, ViewerToolbarOptions, ViewerToolbarPosition, ViewerTypstOptions, ViewerUiDensity, ViewerUiOptions, ViewerViewState, ViewerWatermarkOptions, ViewerLifecycleContext, ViewerOperationContext, ViewerState, ViewerStateListener, } from './controller';
25
+ export type { FileRenderContext, FileRenderExportAdapter, FileRenderExportMode, FileRenderExportOptions, FileViewerAiOptions, FileViewerApplyViewStateOptions, FileViewerArchiveOptions, FileViewerBeforeOperation, FileViewerCadDwfLineWeightMode, FileViewerCadOptions, FileViewerCadRenderer, FileViewerDocxOptions, FileViewerDocumentAnchor, FileViewerDocumentChunk, FileViewerEmits, FileViewerEventMap, FileViewerExpose, FileViewerLifecycleContext, FileViewerLifecycleHooks, FileViewerLifecyclePhase, FileViewerOperationAvailability, FileViewerOperationContext, FileViewerOperationType, FileViewerOptions, FileViewerPdfOptions, FileViewerSpreadsheetOptions, FileViewerProps, FileViewerSearchMatch, FileViewerSearchOptions, FileViewerSearchProvider, FileViewerSearchState, FileViewerSourceType, FileViewerToolbarOptions, FileViewerToolbarPosition, FileViewerToolbarSlotProps, FileViewerThemeMode, FileViewerTypstOptions, FileViewerViewScrollState, FileViewerViewState, FileViewerViewStateChange, FileViewerViewStateChangeAction, FileViewerViewStateChangeSource, FileViewerViewStateProvider, FileViewerWatermarkOptions, FileViewerZoomProvider, FileViewerZoomState } from './common/type';
package/dist/vue3.css CHANGED
@@ -1,2 +1,2 @@
1
- .file-viewer[data-v-6c73dd0a]{--file-viewer-toolbar-gap:6px;--file-viewer-toolbar-min-height:45px;--file-viewer-toolbar-padding:6px 10px;--file-viewer-toolbar-floating-offset:16px;--file-viewer-toolbar-floating-min-height:42px;--file-viewer-toolbar-floating-padding:6px;--file-viewer-toolbar-group-gap:2px;--file-viewer-toolbar-group-padding:2px;--file-viewer-toolbar-button-min-width:42px;--file-viewer-toolbar-button-height:30px;--file-viewer-toolbar-button-padding:0 10px;--file-viewer-toolbar-button-radius:8px;--file-viewer-toolbar-icon-size:30px;--file-viewer-toolbar-meter-min-width:48px;--file-viewer-toolbar-meter-padding:0 8px;--file-viewer-toolbar-floating-button-min-width:48px;--file-viewer-toolbar-floating-button-height:32px;--file-viewer-toolbar-floating-icon-size:32px;--file-viewer-toolbar-floating-meter-min-width:54px;background:var(--file-viewer-render-surface-background,#fff);--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;flex-direction:column;width:100%;height:100%;display:flex;position:relative}.file-viewer[data-viewer-density=compact][data-v-6c73dd0a]{--file-viewer-toolbar-gap:3px;--file-viewer-toolbar-min-height:34px;--file-viewer-toolbar-padding:3px 5px;--file-viewer-toolbar-floating-offset:10px;--file-viewer-toolbar-floating-min-height:32px;--file-viewer-toolbar-floating-padding:3px;--file-viewer-toolbar-group-gap:2px;--file-viewer-toolbar-group-padding:2px;--file-viewer-toolbar-button-min-width:34px;--file-viewer-toolbar-button-height:26px;--file-viewer-toolbar-button-padding:0 6px;--file-viewer-toolbar-button-radius:6px;--file-viewer-toolbar-icon-size:26px;--file-viewer-toolbar-meter-min-width:42px;--file-viewer-toolbar-meter-padding:0 5px;--file-viewer-toolbar-floating-button-min-width:38px;--file-viewer-toolbar-floating-button-height:28px;--file-viewer-toolbar-floating-icon-size:28px;--file-viewer-toolbar-floating-meter-min-width:46px}.file-viewer[data-viewer-theme=dark][data-v-6c73dd0a]{background:var(--file-viewer-render-surface-background,#0f171d);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}.viewer-stage[data-v-6c73dd0a]{flex-direction:column;flex:1;min-height:0;display:flex;position:relative;overflow:hidden}.viewer-actions[data-v-6c73dd0a]{justify-content:flex-end;align-items:center;gap:var(--file-viewer-toolbar-gap);min-height:var(--file-viewer-toolbar-min-height);padding:var(--file-viewer-toolbar-padding);background:rgba(255,255,255,.92);border-bottom:1px solid rgba(20,35,53,.06);flex-shrink:0;display:inline-flex}.viewer-actions[data-toolbar-position=top-center][data-v-6c73dd0a]{justify-content:center}.viewer-actions--floating[data-v-6c73dd0a]{z-index:30;right:calc(var(--file-viewer-toolbar-floating-offset) + env(safe-area-inset-right,0px));bottom:calc(var(--file-viewer-toolbar-floating-offset) + env(safe-area-inset-bottom,0px));min-height:var(--file-viewer-toolbar-floating-min-height);padding:var(--file-viewer-toolbar-floating-padding);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);background:rgba(255,255,255,.94);border:1px solid rgba(20,35,53,.1);border-radius:999px;position:absolute;box-shadow:0 18px 44px rgba(15,23,42,.16)}.viewer-actions-group[data-v-6c73dd0a]{align-items:center;gap:var(--file-viewer-toolbar-group-gap);padding:var(--file-viewer-toolbar-group-padding);background:rgba(20,35,53,.035);border:1px solid rgba(20,35,53,.08);border-radius:999px;display:inline-flex}.viewer-actions button[data-v-6c73dd0a]{min-width:var(--file-viewer-toolbar-button-min-width);height:var(--file-viewer-toolbar-button-height);padding:var(--file-viewer-toolbar-button-padding);border-radius:var(--file-viewer-toolbar-button-radius);color:#40546a;font:inherit;cursor:pointer;background:0 0;border:0;font-size:12px;font-weight:800}.viewer-actions .viewer-icon-button[data-v-6c73dd0a]{width:var(--file-viewer-toolbar-icon-size);min-width:var(--file-viewer-toolbar-icon-size);justify-content:center;align-items:center;padding:0;display:inline-flex}.viewer-actions .viewer-zoom-meter[data-v-6c73dd0a]{min-width:var(--file-viewer-toolbar-meter-min-width);height:var(--file-viewer-toolbar-button-height);padding:var(--file-viewer-toolbar-meter-padding);box-sizing:border-box;color:#23465e;justify-content:center;align-items:center;display:inline-flex}.viewer-actions .viewer-zoom-meter--readonly[data-v-6c73dd0a]{white-space:nowrap;font-size:12px;font-weight:800;line-height:1}.viewer-print-menu[data-v-6c73dd0a]{display:inline-flex;position:relative}.viewer-print-menu-panel[data-v-6c73dd0a]{z-index:40;background:rgba(255,255,255,.96);border:1px solid rgba(20,35,53,.12);border-radius:10px;flex-direction:column;gap:2px;min-width:118px;padding:4px;display:none;position:absolute;top:calc(100% + 4px);right:0;box-shadow:0 12px 28px rgba(15,23,42,.16)}.viewer-print-menu[data-open=true] .viewer-print-menu-panel[data-v-6c73dd0a]{display:flex}.viewer-print-menu-panel button[data-v-6c73dd0a]{text-align:left;border-radius:8px;justify-content:flex-start;width:100%;min-width:0}.viewer-actions--floating .viewer-print-menu-panel[data-v-6c73dd0a]{z-index:50;top:auto;bottom:calc(100% + 6px)}.viewer-actions--floating button[data-v-6c73dd0a]{min-width:var(--file-viewer-toolbar-floating-button-min-width);height:var(--file-viewer-toolbar-floating-button-height);border-radius:999px}.viewer-actions--floating .viewer-icon-button[data-v-6c73dd0a]{width:var(--file-viewer-toolbar-floating-icon-size);min-width:var(--file-viewer-toolbar-floating-icon-size)}.viewer-actions--floating .viewer-zoom-meter[data-v-6c73dd0a]{min-width:var(--file-viewer-toolbar-floating-meter-min-width);height:var(--file-viewer-toolbar-floating-button-height)}.viewer-actions button[data-v-6c73dd0a]:hover:not(:disabled){color:#16774c;background:rgba(33,163,102,.1)}.viewer-actions button[data-v-6c73dd0a]:disabled{color:#aab5c0;cursor:not-allowed}.viewer-content-shell[data-v-6c73dd0a]{flex:1;min-height:0;position:relative;overflow:hidden}.content[data-v-6c73dd0a]{background:var(--file-viewer-render-surface-background,#f2f2f2);width:100%;height:100%;display:block;overflow:auto}.content.hidden[data-v-6c73dd0a]{visibility:hidden}.flyfish-search-match{color:inherit;background:rgba(255,214,102,.72);border-radius:4px;padding:0 2px;box-shadow:0 0 0 1px rgba(185,128,0,.14)}.flyfish-search-match--active{background:rgba(47,191,122,.82);box-shadow:0 0 0 2px rgba(30,132,83,.24)}.viewer-watermark[data-v-6c73dd0a]{z-index:20;pointer-events:none;background-repeat:repeat;position:absolute;top:0;bottom:0;left:0;right:0}.state-panel[data-v-6c73dd0a]{z-index:40;background:linear-gradient(rgba(255,255,255,.92),rgba(246,248,249,.98));justify-content:center;align-items:center;padding:24px;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.loading-card[data-v-6c73dd0a],.error-card[data-v-6c73dd0a]{background:rgba(255,255,255,.92);border:1px solid rgba(19,36,55,.06);border-radius:24px;align-items:center;gap:18px;width:min(100%,460px);padding:22px;display:flex;box-shadow:0 18px 42px rgba(15,31,47,.12)}.loading-icon[data-v-6c73dd0a]{background:linear-gradient(135deg, var(--viewer-accent) 0%, var(--viewer-accent) 100%);color:#fff;letter-spacing:.04em;border-radius:20px;flex-shrink:0;justify-content:center;align-items:center;min-width:70px;height:70px;padding:0 12px;font-size:22px;font-weight:800;display:inline-flex;box-shadow:0 14px 30px rgba(17,28,40,.14)}.loading-copy[data-v-6c73dd0a]{flex:1;min-width:0}.loading-kicker[data-v-6c73dd0a]{color:var(--viewer-accent);letter-spacing:.08em;text-transform:uppercase;font-size:12px;font-weight:700;display:block}.loading-copy strong[data-v-6c73dd0a],.error-card strong[data-v-6c73dd0a]{color:#16283b;margin-top:4px;font-size:20px;line-height:1.2;display:block}.loading-copy p[data-v-6c73dd0a],.error-card p[data-v-6c73dd0a]{color:#6a7d90;margin:8px 0 0;line-height:1.6}.loading-ring[data-v-6c73dd0a]{border:3px solid var(--viewer-soft);border-top-color:var(--viewer-accent);border-radius:999px;flex-shrink:0;width:38px;height:38px;animation:.9s linear infinite viewer-spin-6c73dd0a}.error-card[data-v-6c73dd0a]{text-align:center;display:block}.error-card strong[data-v-6c73dd0a]{color:#b42318}.file-viewer[data-viewer-theme=dark] .viewer-actions--floating[data-v-6c73dd0a]{background:rgba(14,22,28,.94);border-color:rgba(167,185,198,.16);box-shadow:0 20px 52px rgba(0,0,0,.34)}.file-viewer[data-viewer-theme=dark] .viewer-actions[data-v-6c73dd0a]{background:rgba(14,22,28,.94);border-bottom-color:rgba(167,185,198,.12)}.file-viewer[data-viewer-theme=dark] .viewer-actions button[data-v-6c73dd0a]{color:#b8c7d5}.file-viewer[data-viewer-theme=dark] .viewer-actions-group[data-v-6c73dd0a]{background:rgba(167,185,198,.08);border-color:rgba(167,185,198,.13)}.file-viewer[data-viewer-theme=dark] .viewer-actions button[data-v-6c73dd0a]:hover:not(:disabled){color:#5ee0ae;background:rgba(45,212,154,.14)}.file-viewer[data-viewer-theme=dark] .viewer-actions button[data-v-6c73dd0a]:disabled{color:#667888}.file-viewer[data-viewer-theme=dark] .content[data-v-6c73dd0a]{background:var(--file-viewer-render-surface-background,#141c23)}.file-viewer[data-viewer-theme=dark] .state-panel[data-v-6c73dd0a]{background:linear-gradient(rgba(15,23,30,.92),rgba(11,17,22,.98))}.file-viewer[data-viewer-theme=dark] .loading-card[data-v-6c73dd0a],.file-viewer[data-viewer-theme=dark] .error-card[data-v-6c73dd0a]{background:rgba(19,29,37,.94);border-color:rgba(139,161,177,.16);box-shadow:0 22px 52px rgba(0,0,0,.34)}.file-viewer[data-viewer-theme=dark] .loading-copy strong[data-v-6c73dd0a],.file-viewer[data-viewer-theme=dark] .error-card strong[data-v-6c73dd0a]{color:#eff7fb}.file-viewer[data-viewer-theme=dark] .loading-copy p[data-v-6c73dd0a],.file-viewer[data-viewer-theme=dark] .error-card p[data-v-6c73dd0a]{color:#9eb0bf}.file-viewer[data-viewer-theme=dark] .error-card strong[data-v-6c73dd0a]{color:#ff9c91}@keyframes viewer-spin-6c73dd0a{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-color-scheme:dark){.file-viewer[data-viewer-theme=system][data-v-6c73dd0a]{background:var(--file-viewer-render-surface-background,#0f171d);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}.file-viewer[data-viewer-theme=system] .viewer-actions--floating[data-v-6c73dd0a]{background:rgba(14,22,28,.94);border-color:rgba(167,185,198,.16);box-shadow:0 20px 52px rgba(0,0,0,.34)}.file-viewer[data-viewer-theme=system] .viewer-actions[data-v-6c73dd0a]{background:rgba(14,22,28,.94);border-bottom-color:rgba(167,185,198,.12)}.file-viewer[data-viewer-theme=system] .viewer-actions button[data-v-6c73dd0a]{color:#b8c7d5}.file-viewer[data-viewer-theme=system] .viewer-actions-group[data-v-6c73dd0a]{background:rgba(167,185,198,.08);border-color:rgba(167,185,198,.13)}.file-viewer[data-viewer-theme=system] .viewer-actions button[data-v-6c73dd0a]:hover:not(:disabled){color:#5ee0ae;background:rgba(45,212,154,.14)}.file-viewer[data-viewer-theme=system] .viewer-actions button[data-v-6c73dd0a]:disabled{color:#667888}.file-viewer[data-viewer-theme=system] .content[data-v-6c73dd0a]{background:var(--file-viewer-render-surface-background,#141c23)}.file-viewer[data-viewer-theme=system] .state-panel[data-v-6c73dd0a]{background:linear-gradient(rgba(15,23,30,.92),rgba(11,17,22,.98))}.file-viewer[data-viewer-theme=system] .loading-card[data-v-6c73dd0a],.file-viewer[data-viewer-theme=system] .error-card[data-v-6c73dd0a]{background:rgba(19,29,37,.94);border-color:rgba(139,161,177,.16);box-shadow:0 22px 52px rgba(0,0,0,.34)}.file-viewer[data-viewer-theme=system] .loading-copy strong[data-v-6c73dd0a],.file-viewer[data-viewer-theme=system] .error-card strong[data-v-6c73dd0a]{color:#eff7fb}.file-viewer[data-viewer-theme=system] .loading-copy p[data-v-6c73dd0a],.file-viewer[data-viewer-theme=system] .error-card p[data-v-6c73dd0a]{color:#9eb0bf}.file-viewer[data-viewer-theme=system] .error-card strong[data-v-6c73dd0a]{color:#ff9c91}}@media (max-width:767px){.viewer-actions--floating[data-v-6c73dd0a]{right:calc(10px + env(safe-area-inset-right,0px));bottom:calc(10px + env(safe-area-inset-bottom,0px));gap:4px;max-width:calc(100% - 20px);padding:5px;overflow:visible}.viewer-actions--floating .viewer-print-menu-panel[data-v-6c73dd0a]{min-width:min(148px,100vw - 32px);left:50%;right:auto;transform:translate(-50%)}.viewer-actions--floating button[data-v-6c73dd0a]{min-width:40px;height:30px;padding:0 9px}}.file-render{width:100%;min-width:0;height:100%;min-height:0}
1
+ .file-viewer[data-v-0e08cfcb]{--_file-viewer-toolbar-gap:var(--file-viewer-toolbar-gap,6px);--_file-viewer-toolbar-min-height:var(--file-viewer-toolbar-min-height,45px);--_file-viewer-toolbar-padding:var(--file-viewer-toolbar-padding,6px 10px);--_file-viewer-toolbar-floating-offset:var(--file-viewer-toolbar-floating-offset,16px);--_file-viewer-toolbar-floating-min-height:var(--file-viewer-toolbar-floating-min-height,42px);--_file-viewer-toolbar-floating-padding:var(--file-viewer-toolbar-floating-padding,6px);--_file-viewer-toolbar-group-gap:var(--file-viewer-group-gap,var(--file-viewer-toolbar-group-gap,2px));--_file-viewer-toolbar-group-padding:var(--file-viewer-group-padding,var(--file-viewer-toolbar-group-padding,2px));--_file-viewer-toolbar-button-min-width:var(--file-viewer-button-min-width,var(--file-viewer-toolbar-button-min-width,42px));--_file-viewer-toolbar-button-height:var(--file-viewer-button-height,var(--file-viewer-toolbar-button-height,30px));--_file-viewer-toolbar-button-padding:var(--file-viewer-button-padding,var(--file-viewer-toolbar-button-padding,0 10px));--_file-viewer-toolbar-button-radius:var(--file-viewer-button-radius,var(--file-viewer-toolbar-button-radius,8px));--_file-viewer-toolbar-icon-size:var(--file-viewer-icon-button-size,var(--file-viewer-toolbar-icon-size,30px));--_file-viewer-toolbar-meter-min-width:var(--file-viewer-zoom-meter-min-width,var(--file-viewer-toolbar-meter-min-width,48px));--_file-viewer-toolbar-meter-padding:var(--file-viewer-zoom-meter-padding,var(--file-viewer-toolbar-meter-padding,0 8px));--_file-viewer-toolbar-floating-button-min-width:var(--file-viewer-floating-button-min-width,var(--file-viewer-toolbar-floating-button-min-width,48px));--_file-viewer-toolbar-floating-button-height:var(--file-viewer-floating-button-height,var(--file-viewer-toolbar-floating-button-height,32px));--_file-viewer-toolbar-floating-icon-size:var(--file-viewer-floating-icon-button-size,var(--file-viewer-toolbar-floating-icon-size,32px));--_file-viewer-toolbar-floating-meter-min-width:var(--file-viewer-floating-zoom-meter-min-width,var(--file-viewer-toolbar-floating-meter-min-width,54px));background:var(--file-viewer-render-surface-background,var(--file-viewer-bg,#fff));width:100%;height:100%;color:var(--file-viewer-text,#172033);font:var(--file-viewer-font,14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);letter-spacing:0;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;flex-direction:column;display:flex;position:relative}.file-viewer[data-viewer-density=compact][data-v-0e08cfcb]{--_file-viewer-toolbar-gap:var(--file-viewer-toolbar-gap,3px);--_file-viewer-toolbar-min-height:var(--file-viewer-toolbar-min-height,34px);--_file-viewer-toolbar-padding:var(--file-viewer-toolbar-padding,3px 5px);--_file-viewer-toolbar-floating-offset:var(--file-viewer-toolbar-floating-offset,10px);--_file-viewer-toolbar-floating-min-height:var(--file-viewer-toolbar-floating-min-height,32px);--_file-viewer-toolbar-floating-padding:var(--file-viewer-toolbar-floating-padding,3px);--_file-viewer-toolbar-group-gap:var(--file-viewer-group-gap,var(--file-viewer-toolbar-group-gap,2px));--_file-viewer-toolbar-group-padding:var(--file-viewer-group-padding,var(--file-viewer-toolbar-group-padding,2px));--_file-viewer-toolbar-button-min-width:var(--file-viewer-button-min-width,var(--file-viewer-toolbar-button-min-width,34px));--_file-viewer-toolbar-button-height:var(--file-viewer-button-height,var(--file-viewer-toolbar-button-height,26px));--_file-viewer-toolbar-button-padding:var(--file-viewer-button-padding,var(--file-viewer-toolbar-button-padding,0 6px));--_file-viewer-toolbar-button-radius:var(--file-viewer-button-radius,var(--file-viewer-toolbar-button-radius,6px));--_file-viewer-toolbar-icon-size:var(--file-viewer-icon-button-size,var(--file-viewer-toolbar-icon-size,26px));--_file-viewer-toolbar-meter-min-width:var(--file-viewer-zoom-meter-min-width,var(--file-viewer-toolbar-meter-min-width,42px));--_file-viewer-toolbar-meter-padding:var(--file-viewer-zoom-meter-padding,var(--file-viewer-toolbar-meter-padding,0 5px));--_file-viewer-toolbar-floating-button-min-width:var(--file-viewer-floating-button-min-width,var(--file-viewer-toolbar-floating-button-min-width,38px));--_file-viewer-toolbar-floating-button-height:var(--file-viewer-floating-button-height,var(--file-viewer-toolbar-floating-button-height,28px));--_file-viewer-toolbar-floating-icon-size:var(--file-viewer-floating-icon-button-size,var(--file-viewer-toolbar-floating-icon-size,28px));--_file-viewer-toolbar-floating-meter-min-width:var(--file-viewer-floating-zoom-meter-min-width,var(--file-viewer-toolbar-floating-meter-min-width,46px))}.file-viewer[data-viewer-theme=dark][data-v-0e08cfcb]{background:var(--file-viewer-render-surface-background,var(--file-viewer-bg,#0f171d));color:var(--file-viewer-text,#e5eef8);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}.viewer-stage[data-v-0e08cfcb]{flex-direction:column;flex:1;min-height:0;display:flex;position:relative;overflow:hidden}.viewer-actions[data-v-0e08cfcb]{z-index:var(--file-viewer-z-toolbar,20);justify-content:flex-end;align-items:center;gap:var(--_file-viewer-toolbar-gap);min-height:var(--_file-viewer-toolbar-min-height);padding:var(--_file-viewer-toolbar-padding);border-bottom:1px solid var(--file-viewer-toolbar-border,rgba(20,35,53,.06));background:var(--file-viewer-toolbar-bg,rgba(255,255,255,.92));box-shadow:var(--file-viewer-toolbar-shadow,none);flex-shrink:0;display:inline-flex;position:relative}.viewer-actions[data-toolbar-position=top-center][data-v-0e08cfcb]{justify-content:center}.viewer-actions--floating[data-v-0e08cfcb]{z-index:var(--file-viewer-z-floating-toolbar,30);right:calc(var(--_file-viewer-toolbar-floating-offset) + env(safe-area-inset-right,0px));bottom:calc(var(--_file-viewer-toolbar-floating-offset) + env(safe-area-inset-bottom,0px));min-height:var(--_file-viewer-toolbar-floating-min-height);padding:var(--_file-viewer-toolbar-floating-padding);border:1px solid var(--file-viewer-toolbar-border,rgba(20,35,53,.1));border-radius:var(--file-viewer-toolbar-radius,999px);background:var(--file-viewer-toolbar-bg,rgba(255,255,255,.94));box-shadow:var(--file-viewer-toolbar-shadow,0 18px 44px rgba(15,23,42,.16));-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);position:absolute}.viewer-actions-group[data-v-0e08cfcb]{align-items:center;gap:var(--_file-viewer-toolbar-group-gap);padding:var(--_file-viewer-toolbar-group-padding);border:1px solid var(--file-viewer-group-border,rgba(20,35,53,.08));background:var(--file-viewer-group-bg,rgba(20,35,53,.035));border-radius:999px;display:inline-flex}.viewer-toolbar-slot[data-v-0e08cfcb]{align-items:center;gap:var(--_file-viewer-toolbar-gap);min-width:0;display:inline-flex}.viewer-toolbar-slot--start[data-v-0e08cfcb]{margin-right:auto}.viewer-toolbar-slot[data-v-0e08cfcb] button,.viewer-toolbar-slot[data-v-0e08cfcb] a{min-height:var(--_file-viewer-toolbar-button-height)}.viewer-search-actions[data-v-0e08cfcb]{min-width:0}.viewer-search-form[data-v-0e08cfcb]{align-items:center;gap:2px;min-width:0;display:inline-flex}.viewer-search-input[data-v-0e08cfcb]{box-sizing:border-box;width:max(108px,min(16vw,188px));height:var(--_file-viewer-toolbar-button-height);border:1px solid var(--file-viewer-input-border,rgba(20,35,53,.14));border-radius:var(--_file-viewer-toolbar-button-radius);background:var(--file-viewer-input-bg,rgba(255,255,255,.9));color:var(--file-viewer-text,#172033);font:inherit;outline:0;padding:0 9px;font-size:12px}.viewer-search-input[data-v-0e08cfcb]:focus{border-color:var(--file-viewer-focus-ring,rgba(33,163,102,.52));box-shadow:0 0 0 2px var(--file-viewer-focus-ring,rgba(33,163,102,.16))}.viewer-search-input[data-v-0e08cfcb]:disabled{color:var(--file-viewer-button-disabled-color,#aab5c0);cursor:not-allowed}.viewer-search-input[data-v-0e08cfcb]::-webkit-search-cancel-button{display:none}.viewer-search-count[data-v-0e08cfcb]{min-width:38px;color:var(--file-viewer-muted,#6a7d90);font-variant-numeric:tabular-nums;text-align:center;white-space:nowrap;font-size:11px}.viewer-actions--floating .viewer-search-input[data-v-0e08cfcb]{width:max(104px,min(14vw,164px));height:var(--_file-viewer-toolbar-floating-button-height);border-radius:999px}.viewer-actions button[data-v-0e08cfcb]{min-width:var(--_file-viewer-toolbar-button-min-width);height:var(--_file-viewer-toolbar-button-height);padding:var(--_file-viewer-toolbar-button-padding);border-radius:var(--_file-viewer-toolbar-button-radius);color:var(--file-viewer-button-color,#40546a);font:inherit;cursor:pointer;background:0 0;border:0;font-size:12px;font-weight:800}.viewer-actions .viewer-icon-button[data-v-0e08cfcb]{width:var(--_file-viewer-toolbar-icon-size);min-width:var(--_file-viewer-toolbar-icon-size);justify-content:center;align-items:center;padding:0;display:inline-flex}.viewer-actions .viewer-zoom-meter[data-v-0e08cfcb]{min-width:var(--_file-viewer-toolbar-meter-min-width);height:var(--_file-viewer-toolbar-button-height);padding:var(--_file-viewer-toolbar-meter-padding);box-sizing:border-box;color:var(--file-viewer-button-color,#23465e);justify-content:center;align-items:center;display:inline-flex}.viewer-actions .viewer-zoom-meter--readonly[data-v-0e08cfcb]{white-space:nowrap;font-size:12px;font-weight:800;line-height:1}.viewer-print-menu[data-v-0e08cfcb]{display:inline-flex;position:relative}.viewer-print-menu-panel[data-v-0e08cfcb]{z-index:40;background:rgba(255,255,255,.96);border:1px solid rgba(20,35,53,.12);border-radius:10px;flex-direction:column;gap:2px;min-width:118px;padding:4px;display:none;position:absolute;top:calc(100% + 4px);right:0;box-shadow:0 12px 28px rgba(15,23,42,.16)}.viewer-print-menu[data-open=true] .viewer-print-menu-panel[data-v-0e08cfcb]{display:flex}.viewer-print-menu-panel button[data-v-0e08cfcb]{text-align:left;border-radius:8px;justify-content:flex-start;width:100%;min-width:0}.viewer-actions--floating .viewer-print-menu-panel[data-v-0e08cfcb]{z-index:50;top:auto;bottom:calc(100% + 6px)}.viewer-actions--floating button[data-v-0e08cfcb]{min-width:var(--_file-viewer-toolbar-floating-button-min-width);height:var(--_file-viewer-toolbar-floating-button-height);border-radius:999px}.viewer-actions--floating .viewer-icon-button[data-v-0e08cfcb]{width:var(--_file-viewer-toolbar-floating-icon-size);min-width:var(--_file-viewer-toolbar-floating-icon-size)}.viewer-actions--floating .viewer-zoom-meter[data-v-0e08cfcb]{min-width:var(--_file-viewer-toolbar-floating-meter-min-width);height:var(--_file-viewer-toolbar-floating-button-height)}.viewer-actions button[data-v-0e08cfcb]:hover:not(:disabled){background:var(--file-viewer-button-hover-bg,rgba(33,163,102,.1));color:var(--file-viewer-button-hover-color,#16774c)}.viewer-actions button[data-v-0e08cfcb]:disabled{color:var(--file-viewer-button-disabled-color,#aab5c0);cursor:not-allowed}.viewer-actions button[data-v-0e08cfcb]:focus-visible{outline:2px solid var(--file-viewer-focus-ring,rgba(33,163,102,.52));outline-offset:2px}.viewer-content-shell[data-v-0e08cfcb]{flex:1;min-height:0;position:relative;overflow:hidden}.content[data-v-0e08cfcb],.content[data-v-0e08cfcb] .file-render,.content[data-v-0e08cfcb] .file-render-host{scrollbar-width:var(--file-viewer-scrollbar-width);scrollbar-color:var(--file-viewer-scrollbar-colors)}.content[data-v-0e08cfcb]{box-sizing:border-box;width:100%;height:100%;background:var(--file-viewer-render-surface-background,var(--file-viewer-bg,#f2f2f2));scroll-padding-block-start:var(--file-viewer-content-start-inset,0px);display:block;overflow:auto}.content[data-v-0e08cfcb]::-webkit-scrollbar{width:var(--file-viewer-scrollbar-size);height:var(--file-viewer-scrollbar-size);background:var(--file-viewer-scrollbar-track)}.content[data-v-0e08cfcb] .file-render::-webkit-scrollbar{width:var(--file-viewer-scrollbar-size);height:var(--file-viewer-scrollbar-size);background:var(--file-viewer-scrollbar-track)}.content[data-v-0e08cfcb] .file-render-host::-webkit-scrollbar{width:var(--file-viewer-scrollbar-size);height:var(--file-viewer-scrollbar-size);background:var(--file-viewer-scrollbar-track)}.content[data-v-0e08cfcb]::-webkit-scrollbar-track{background:var(--file-viewer-scrollbar-track)}.content[data-v-0e08cfcb]::-webkit-scrollbar-corner{background:var(--file-viewer-scrollbar-track)}.content[data-v-0e08cfcb] .file-render::-webkit-scrollbar-track{background:var(--file-viewer-scrollbar-track)}.content[data-v-0e08cfcb] .file-render::-webkit-scrollbar-corner{background:var(--file-viewer-scrollbar-track)}.content[data-v-0e08cfcb] .file-render-host::-webkit-scrollbar-track{background:var(--file-viewer-scrollbar-track)}.content[data-v-0e08cfcb] .file-render-host::-webkit-scrollbar-corner{background:var(--file-viewer-scrollbar-track)}.content[data-v-0e08cfcb]::-webkit-scrollbar-thumb{min-width:var(--file-viewer-scrollbar-thumb-min-size);min-height:var(--file-viewer-scrollbar-thumb-min-size);border:var(--file-viewer-scrollbar-thumb-border);border-radius:var(--file-viewer-scrollbar-thumb-radius);background-color:var(--file-viewer-scrollbar-thumb);background-clip:var(--file-viewer-scrollbar-thumb-clip)}.content[data-v-0e08cfcb] .file-render::-webkit-scrollbar-thumb{min-width:var(--file-viewer-scrollbar-thumb-min-size);min-height:var(--file-viewer-scrollbar-thumb-min-size);border:var(--file-viewer-scrollbar-thumb-border);border-radius:var(--file-viewer-scrollbar-thumb-radius);background-color:var(--file-viewer-scrollbar-thumb);background-clip:var(--file-viewer-scrollbar-thumb-clip)}.content[data-v-0e08cfcb] .file-render-host::-webkit-scrollbar-thumb{min-width:var(--file-viewer-scrollbar-thumb-min-size);min-height:var(--file-viewer-scrollbar-thumb-min-size);border:var(--file-viewer-scrollbar-thumb-border);border-radius:var(--file-viewer-scrollbar-thumb-radius);background-color:var(--file-viewer-scrollbar-thumb);background-clip:var(--file-viewer-scrollbar-thumb-clip)}.content[data-v-0e08cfcb]::-webkit-scrollbar-thumb:hover{background-color:var(--file-viewer-scrollbar-thumb-hover)}.content[data-v-0e08cfcb] .file-render::-webkit-scrollbar-thumb:hover{background-color:var(--file-viewer-scrollbar-thumb-hover)}.content[data-v-0e08cfcb] .file-render-host::-webkit-scrollbar-thumb:hover{background-color:var(--file-viewer-scrollbar-thumb-hover)}.content[data-v-0e08cfcb] .file-render,.content[data-v-0e08cfcb] .file-render-host{box-sizing:border-box;width:100%;min-width:0;height:100%;min-height:0;padding-top:var(--file-viewer-content-start-inset,0px)}.content.hidden[data-v-0e08cfcb]{visibility:hidden}.content[data-v-0e08cfcb] .flyfish-search-match{color:inherit;background:rgba(255,214,102,.72);border-radius:4px;padding:0 2px;box-shadow:0 0 0 1px rgba(185,128,0,.14)}.content[data-v-0e08cfcb] .flyfish-search-match--active{background:rgba(47,191,122,.82);box-shadow:0 0 0 2px rgba(30,132,83,.24)}.viewer-watermark[data-v-0e08cfcb]{z-index:20;pointer-events:none;background-repeat:repeat;position:absolute;top:0;bottom:0;left:0;right:0}.state-panel[data-v-0e08cfcb]{z-index:40;background:var(--file-viewer-bg,linear-gradient(180deg, rgba(255,255,255,.92), rgba(246,248,249,.98)));justify-content:center;align-items:center;padding:24px;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.loading-card[data-v-0e08cfcb],.error-card[data-v-0e08cfcb]{border:1px solid var(--file-viewer-border,rgba(19,36,55,.06));background:rgba(255,255,255,.92);border-radius:24px;align-items:center;gap:18px;width:min(100%,460px);padding:22px;display:flex;box-shadow:0 18px 42px rgba(15,31,47,.12)}.loading-icon[data-v-0e08cfcb]{background:linear-gradient(135deg, var(--viewer-accent) 0%, var(--viewer-accent) 100%);color:#fff;letter-spacing:.04em;border-radius:20px;flex-shrink:0;justify-content:center;align-items:center;min-width:70px;height:70px;padding:0 12px;font-size:22px;font-weight:800;display:inline-flex;box-shadow:0 14px 30px rgba(17,28,40,.14)}.loading-copy[data-v-0e08cfcb]{flex:1;min-width:0}.loading-kicker[data-v-0e08cfcb]{color:var(--viewer-accent);letter-spacing:.08em;text-transform:uppercase;font-size:12px;font-weight:700;display:block}.loading-copy strong[data-v-0e08cfcb],.error-card strong[data-v-0e08cfcb]{color:var(--file-viewer-text,#16283b);margin-top:4px;font-size:20px;line-height:1.2;display:block}.loading-copy p[data-v-0e08cfcb],.error-card p[data-v-0e08cfcb]{color:var(--file-viewer-muted,#6a7d90);margin:8px 0 0;line-height:1.6}.loading-ring[data-v-0e08cfcb]{border:3px solid var(--viewer-soft);border-top-color:var(--viewer-accent);border-radius:999px;flex-shrink:0;width:38px;height:38px;animation:.9s linear infinite viewer-spin-0e08cfcb}.error-card[data-v-0e08cfcb]{text-align:center;display:block}.error-card strong[data-v-0e08cfcb]{color:#b42318}.file-viewer[data-viewer-theme=dark] .viewer-actions--floating[data-v-0e08cfcb]{border-color:var(--file-viewer-toolbar-border,rgba(167,185,198,.16));background:var(--file-viewer-toolbar-bg,rgba(14,22,28,.94));box-shadow:var(--file-viewer-toolbar-shadow,0 20px 52px rgba(0,0,0,.34))}.file-viewer[data-viewer-theme=dark] .viewer-actions[data-v-0e08cfcb]{border-bottom-color:var(--file-viewer-toolbar-border,rgba(167,185,198,.12));background:var(--file-viewer-toolbar-bg,rgba(14,22,28,.94))}.file-viewer[data-viewer-theme=dark] .viewer-actions button[data-v-0e08cfcb]{color:var(--file-viewer-button-color,#b8c7d5)}.file-viewer[data-viewer-theme=dark] .viewer-actions-group[data-v-0e08cfcb]{border-color:var(--file-viewer-group-border,rgba(167,185,198,.13));background:var(--file-viewer-group-bg,rgba(167,185,198,.08))}.file-viewer[data-viewer-theme=dark] .viewer-actions button[data-v-0e08cfcb]:hover:not(:disabled){background:var(--file-viewer-button-hover-bg,rgba(45,212,154,.14));color:var(--file-viewer-button-hover-color,#5ee0ae)}.file-viewer[data-viewer-theme=dark] .viewer-actions button[data-v-0e08cfcb]:disabled{color:var(--file-viewer-button-disabled-color,#667888)}.file-viewer[data-viewer-theme=dark] .content[data-v-0e08cfcb]{background:var(--file-viewer-render-surface-background,var(--file-viewer-bg,#141c23))}.file-viewer[data-viewer-theme=dark] .state-panel[data-v-0e08cfcb]{background:linear-gradient(rgba(15,23,30,.92),rgba(11,17,22,.98))}.file-viewer[data-viewer-theme=dark] .loading-card[data-v-0e08cfcb],.file-viewer[data-viewer-theme=dark] .error-card[data-v-0e08cfcb]{background:rgba(19,29,37,.94);border-color:rgba(139,161,177,.16);box-shadow:0 22px 52px rgba(0,0,0,.34)}.file-viewer[data-viewer-theme=dark] .loading-copy strong[data-v-0e08cfcb],.file-viewer[data-viewer-theme=dark] .error-card strong[data-v-0e08cfcb]{color:#eff7fb}.file-viewer[data-viewer-theme=dark] .loading-copy p[data-v-0e08cfcb],.file-viewer[data-viewer-theme=dark] .error-card p[data-v-0e08cfcb]{color:#9eb0bf}.file-viewer[data-viewer-theme=dark] .error-card strong[data-v-0e08cfcb]{color:#ff9c91}@keyframes viewer-spin-0e08cfcb{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-color-scheme:dark){.file-viewer[data-viewer-theme=system][data-v-0e08cfcb]{background:var(--file-viewer-render-surface-background,var(--file-viewer-bg,#0f171d));color:var(--file-viewer-text,#e5eef8);--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}.file-viewer[data-viewer-theme=system] .viewer-actions--floating[data-v-0e08cfcb]{border-color:var(--file-viewer-toolbar-border,rgba(167,185,198,.16));background:var(--file-viewer-toolbar-bg,rgba(14,22,28,.94));box-shadow:var(--file-viewer-toolbar-shadow,0 20px 52px rgba(0,0,0,.34))}.file-viewer[data-viewer-theme=system] .viewer-actions[data-v-0e08cfcb]{border-bottom-color:var(--file-viewer-toolbar-border,rgba(167,185,198,.12));background:var(--file-viewer-toolbar-bg,rgba(14,22,28,.94))}.file-viewer[data-viewer-theme=system] .viewer-actions button[data-v-0e08cfcb]{color:var(--file-viewer-button-color,#b8c7d5)}.file-viewer[data-viewer-theme=system] .viewer-actions-group[data-v-0e08cfcb]{border-color:var(--file-viewer-group-border,rgba(167,185,198,.13));background:var(--file-viewer-group-bg,rgba(167,185,198,.08))}.file-viewer[data-viewer-theme=system] .viewer-actions button[data-v-0e08cfcb]:hover:not(:disabled){background:var(--file-viewer-button-hover-bg,rgba(45,212,154,.14));color:var(--file-viewer-button-hover-color,#5ee0ae)}.file-viewer[data-viewer-theme=system] .viewer-actions button[data-v-0e08cfcb]:disabled{color:var(--file-viewer-button-disabled-color,#667888)}.file-viewer[data-viewer-theme=system] .content[data-v-0e08cfcb]{background:var(--file-viewer-render-surface-background,var(--file-viewer-bg,#141c23))}.file-viewer[data-viewer-theme=system] .state-panel[data-v-0e08cfcb]{background:linear-gradient(rgba(15,23,30,.92),rgba(11,17,22,.98))}.file-viewer[data-viewer-theme=system] .loading-card[data-v-0e08cfcb],.file-viewer[data-viewer-theme=system] .error-card[data-v-0e08cfcb]{background:rgba(19,29,37,.94);border-color:rgba(139,161,177,.16);box-shadow:0 22px 52px rgba(0,0,0,.34)}.file-viewer[data-viewer-theme=system] .loading-copy strong[data-v-0e08cfcb],.file-viewer[data-viewer-theme=system] .error-card strong[data-v-0e08cfcb]{color:#eff7fb}.file-viewer[data-viewer-theme=system] .loading-copy p[data-v-0e08cfcb],.file-viewer[data-viewer-theme=system] .error-card p[data-v-0e08cfcb]{color:#9eb0bf}.file-viewer[data-viewer-theme=system] .error-card strong[data-v-0e08cfcb]{color:#ff9c91}}@media (max-width:767px){.viewer-actions--floating[data-v-0e08cfcb]{right:calc(10px + env(safe-area-inset-right,0px));bottom:calc(10px + env(safe-area-inset-bottom,0px));gap:4px;max-width:calc(100% - 20px);padding:5px;overflow:visible}.viewer-actions--floating .viewer-print-menu-panel[data-v-0e08cfcb]{min-width:min(148px,100vw - 32px);left:50%;right:auto;transform:translate(-50%)}.viewer-actions--floating button[data-v-0e08cfcb]{min-width:40px;height:30px;padding:0 9px}}
2
2
  /*$vite$:1*/
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@file-viewer/vue3",
3
- "version": "2.2.2",
3
+ "version": "2.2.4",
4
4
  "private": false,
5
5
  "type": "module",
6
- "description": "Standard Vue 3 package for Flyfish File Viewer",
6
+ "description": "Standard Vue 3 package for File Viewer",
7
7
  "keywords": [
8
8
  "file-viewer",
9
9
  "document-preview",
@@ -20,8 +20,8 @@
20
20
  "registry": "https://registry.npmjs.org/"
21
21
  },
22
22
  "author": {
23
- "name": "Wangyu",
24
- "email": "wybaby168@gmail.com"
23
+ "name": "Yu Wang",
24
+ "email": "admin@flyfish.dev"
25
25
  },
26
26
  "repository": {
27
27
  "type": "git",
@@ -52,7 +52,7 @@
52
52
  },
53
53
  "types": "dist/src/package/index.d.ts",
54
54
  "dependencies": {
55
- "@file-viewer/core": "2.2.2",
55
+ "@file-viewer/core": "2.2.4",
56
56
  "@lucide/vue": "^1.17.0",
57
57
  "vue": "^3.5.35"
58
58
  },