@eternalheart/vue-file-preview 1.3.4 → 1.3.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 +4 -0
- package/README.zh-CN.md +4 -0
- package/lib/FilePreviewContent.vue.d.ts +7 -1
- package/lib/FilePreviewContent.vue.d.ts.map +1 -1
- package/lib/FilePreviewEmbed.vue.d.ts +7 -1
- package/lib/FilePreviewEmbed.vue.d.ts.map +1 -1
- package/lib/FilePreviewModal.vue.d.ts +7 -1
- package/lib/FilePreviewModal.vue.d.ts.map +1 -1
- package/lib/index.cjs +42 -42
- package/lib/index.cjs.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.mjs +6321 -6239
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -269,6 +269,8 @@ Differences from `FilePreviewModal`:
|
|
|
269
269
|
| `customRenderers` | `CustomRenderer[]` | ❌ | Custom renderers for specific file types |
|
|
270
270
|
| `locale` | `Locale` | ❌ | UI language (`'zh-CN'` default, `'en-US'` built-in) |
|
|
271
271
|
| `messages` | `Partial<Record<Locale, Partial<Messages>>>` | ❌ | Custom translation overrides |
|
|
272
|
+
| `headless` | `boolean` | ❌ | Headless mode — hides toolbar and navigation arrows |
|
|
273
|
+
| `theme` | `Theme` | ❌ | Theme mode: `'auto' \| 'dark' \| 'light'` (default `'dark'`) |
|
|
272
274
|
|
|
273
275
|
### FilePreviewModal Events
|
|
274
276
|
|
|
@@ -288,6 +290,8 @@ Differences from `FilePreviewModal`:
|
|
|
288
290
|
| `height` | `number \| string` | ❌ | `'100%'` | Container height |
|
|
289
291
|
| `locale` | `Locale` | ❌ | `'zh-CN'` | UI language (`'zh-CN'` or `'en-US'`) |
|
|
290
292
|
| `messages` | `Partial<Record<Locale, Partial<Messages>>>` | ❌ | - | Custom translation overrides |
|
|
293
|
+
| `headless` | `boolean` | ❌ | `false` | Headless mode — hides toolbar and navigation arrows |
|
|
294
|
+
| `theme` | `Theme` | ❌ | `'dark'` | Theme mode: `'auto' \| 'dark' \| 'light'` |
|
|
291
295
|
|
|
292
296
|
### FilePreviewEmbed Events
|
|
293
297
|
|
package/README.zh-CN.md
CHANGED
|
@@ -269,6 +269,8 @@ const files = [
|
|
|
269
269
|
| `customRenderers` | `CustomRenderer[]` | ❌ | 自定义渲染器 |
|
|
270
270
|
| `locale` | `Locale` | ❌ | 界面语言(默认 `'zh-CN'`,内置 `'en-US'`) |
|
|
271
271
|
| `messages` | `Partial<Record<Locale, Partial<Messages>>>` | ❌ | 自定义翻译覆盖 |
|
|
272
|
+
| `headless` | `boolean` | ❌ | 无头模式,隐藏工具栏和导航箭头 |
|
|
273
|
+
| `theme` | `Theme` | ❌ | 主题模式: `'auto' \| 'dark' \| 'light'`(默认 `'dark'`) |
|
|
272
274
|
|
|
273
275
|
### FilePreviewModal 事件
|
|
274
276
|
|
|
@@ -288,6 +290,8 @@ const files = [
|
|
|
288
290
|
| `height` | `number \| string` | ❌ | `'100%'` | 容器高度 |
|
|
289
291
|
| `locale` | `Locale` | ❌ | `'zh-CN'` | 界面语言(`'zh-CN'` 或 `'en-US'`) |
|
|
290
292
|
| `messages` | `Partial<Record<Locale, Partial<Messages>>>` | ❌ | - | 自定义翻译覆盖 |
|
|
293
|
+
| `headless` | `boolean` | ❌ | `false` | 无头模式,隐藏工具栏和导航箭头 |
|
|
294
|
+
| `theme` | `Theme` | ❌ | `'dark'` | 主题模式: `'auto' \| 'dark' \| 'light'` |
|
|
291
295
|
|
|
292
296
|
### FilePreviewEmbed 事件
|
|
293
297
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PreviewFileInput, type Locale, type Messages } from '@eternalheart/file-preview-core';
|
|
1
|
+
import { type PreviewFileInput, type Locale, type Messages, type Theme } from '@eternalheart/file-preview-core';
|
|
2
2
|
import type { CustomRenderer } from './types';
|
|
3
3
|
interface Props {
|
|
4
4
|
files: PreviewFileInput[];
|
|
@@ -12,6 +12,10 @@ interface Props {
|
|
|
12
12
|
locale?: Locale;
|
|
13
13
|
/** 自定义翻译字典 */
|
|
14
14
|
messages?: Partial<Record<Locale, Partial<Messages>>>;
|
|
15
|
+
/** 无头模式:隐藏工具栏和导航箭头,仅渲染文件内容 */
|
|
16
|
+
headless?: boolean;
|
|
17
|
+
/** 主题模式,默认 'dark' */
|
|
18
|
+
theme?: Theme;
|
|
15
19
|
}
|
|
16
20
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
17
21
|
close: () => any;
|
|
@@ -21,10 +25,12 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
21
25
|
onNavigate?: ((index: number) => any) | undefined;
|
|
22
26
|
}>, {
|
|
23
27
|
mode: "modal" | "embed";
|
|
28
|
+
theme: Theme;
|
|
24
29
|
customRenderers: CustomRenderer[];
|
|
25
30
|
zipNestingDepth: number;
|
|
26
31
|
locale: Locale;
|
|
27
32
|
messages: Partial<Record<Locale, Partial<Messages>>>;
|
|
33
|
+
headless: boolean;
|
|
28
34
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
29
35
|
export default _default;
|
|
30
36
|
//# sourceMappingURL=FilePreviewContent.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePreviewContent.vue.d.ts","sourceRoot":"","sources":["../src/FilePreviewContent.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilePreviewContent.vue.d.ts","sourceRoot":"","sources":["../src/FilePreviewContent.vue"],"names":[],"mappings":"AAkuBA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACX,KAAK,QAAQ,EACb,KAAK,KAAK,EACX,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA+B9C,UAAU,KAAK;IACb,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,kCAAkC;IAClC,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACzB,qCAAqC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,SAAS;IACT,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtD,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;;;;;;;;UAXQ,OAAO,GAAG,OAAO;WAUhB,KAAK;qBAZK,cAAc,EAAE;qBAIhB,MAAM;YAEf,MAAM;cAEJ,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;cAE1C,OAAO;;AA4jCpB,wBAQG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PreviewFileInput, Locale, Messages } from '@eternalheart/file-preview-core';
|
|
1
|
+
import type { PreviewFileInput, Locale, Messages, Theme } from '@eternalheart/file-preview-core';
|
|
2
2
|
import type { CustomRenderer } from './types';
|
|
3
3
|
interface Props {
|
|
4
4
|
files: PreviewFileInput[];
|
|
@@ -12,6 +12,10 @@ interface Props {
|
|
|
12
12
|
locale?: Locale;
|
|
13
13
|
/** 自定义翻译字典 */
|
|
14
14
|
messages?: Partial<Record<Locale, Partial<Messages>>>;
|
|
15
|
+
/** 无头模式:隐藏工具栏和导航箭头 */
|
|
16
|
+
headless?: boolean;
|
|
17
|
+
/** 主题模式,默认 'dark' */
|
|
18
|
+
theme?: Theme;
|
|
15
19
|
}
|
|
16
20
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
17
21
|
navigate: (index: number) => any;
|
|
@@ -20,10 +24,12 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
20
24
|
}>, {
|
|
21
25
|
height: number | string;
|
|
22
26
|
width: number | string;
|
|
27
|
+
theme: Theme;
|
|
23
28
|
currentIndex: number;
|
|
24
29
|
customRenderers: CustomRenderer[];
|
|
25
30
|
locale: Locale;
|
|
26
31
|
messages: Partial<Record<Locale, Partial<Messages>>>;
|
|
32
|
+
headless: boolean;
|
|
27
33
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
34
|
export default _default;
|
|
29
35
|
//# sourceMappingURL=FilePreviewEmbed.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePreviewEmbed.vue.d.ts","sourceRoot":"","sources":["../src/FilePreviewEmbed.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilePreviewEmbed.vue.d.ts","sourceRoot":"","sources":["../src/FilePreviewEmbed.vue"],"names":[],"mappings":"AAqGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACjG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAG9C,UAAU,KAAK;IACb,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,uBAAuB;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,SAAS;IACT,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtD,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;;;;;;YATU,MAAM,GAAG,MAAM;WAFhB,MAAM,GAAG,MAAM;WAUf,KAAK;kBAbE,MAAM;qBACH,cAAc,EAAE;YAMzB,MAAM;cAEJ,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;cAE1C,OAAO;;AAgJpB,wBAQG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PreviewFileInput, Locale, Messages } from '@eternalheart/file-preview-core';
|
|
1
|
+
import type { PreviewFileInput, Locale, Messages, Theme } from '@eternalheart/file-preview-core';
|
|
2
2
|
import type { CustomRenderer } from './types';
|
|
3
3
|
interface Props {
|
|
4
4
|
files: PreviewFileInput[];
|
|
@@ -9,6 +9,10 @@ interface Props {
|
|
|
9
9
|
locale?: Locale;
|
|
10
10
|
/** 自定义翻译字典 */
|
|
11
11
|
messages?: Partial<Record<Locale, Partial<Messages>>>;
|
|
12
|
+
/** 无头模式:隐藏工具栏和导航箭头 */
|
|
13
|
+
headless?: boolean;
|
|
14
|
+
/** 主题模式,默认 'dark' */
|
|
15
|
+
theme?: Theme;
|
|
12
16
|
}
|
|
13
17
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
14
18
|
close: () => any;
|
|
@@ -17,9 +21,11 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
17
21
|
onClose?: (() => any) | undefined;
|
|
18
22
|
onNavigate?: ((index: number) => any) | undefined;
|
|
19
23
|
}>, {
|
|
24
|
+
theme: Theme;
|
|
20
25
|
customRenderers: CustomRenderer[];
|
|
21
26
|
locale: Locale;
|
|
22
27
|
messages: Partial<Record<Locale, Partial<Messages>>>;
|
|
28
|
+
headless: boolean;
|
|
23
29
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
24
30
|
export default _default;
|
|
25
31
|
//# sourceMappingURL=FilePreviewModal.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilePreviewModal.vue.d.ts","sourceRoot":"","sources":["../src/FilePreviewModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FilePreviewModal.vue.d.ts","sourceRoot":"","sources":["../src/FilePreviewModal.vue"],"names":[],"mappings":"AAmHA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AACjG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAI9C,UAAU,KAAK;IACb,KAAK,EAAE,gBAAgB,EAAE,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,eAAe,CAAC,EAAE,cAAc,EAAE,CAAC;IACnC,SAAS;IACT,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACtD,sBAAsB;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qBAAqB;IACrB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;;;;;;;;WADS,KAAK;qBARK,cAAc,EAAE;YAEzB,MAAM;cAEJ,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;cAE1C,OAAO;;AA6LpB,wBAQG"}
|