@eternalheart/vue-file-preview 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -1
- package/README.zh-CN.md +25 -1
- package/lib/FilePreviewContent.vue.d.ts +10 -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/components/ResizableSplit.vue.d.ts +35 -0
- package/lib/components/ResizableSplit.vue.d.ts.map +1 -0
- package/lib/composables/useTranslator.d.ts +14 -0
- package/lib/composables/useTranslator.d.ts.map +1 -0
- package/lib/i18n/localeKey.d.ts +8 -0
- package/lib/i18n/localeKey.d.ts.map +1 -0
- package/lib/index.cjs +223 -48
- package/lib/index.cjs.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.mjs +29162 -36416
- package/lib/index.mjs.map +1 -1
- package/lib/renderers/Audio/index.vue.d.ts.map +1 -1
- package/lib/renderers/Csv/index.vue.d.ts +7 -0
- package/lib/renderers/Csv/index.vue.d.ts.map +1 -0
- package/lib/renderers/Docx/index.vue.d.ts.map +1 -1
- package/lib/renderers/Epub/index.vue.d.ts +2 -2
- package/lib/renderers/Epub/index.vue.d.ts.map +1 -1
- package/lib/renderers/Epub/toolbar.d.ts +4 -2
- package/lib/renderers/Epub/toolbar.d.ts.map +1 -1
- package/lib/renderers/Image/index.vue.d.ts.map +1 -1
- package/lib/renderers/Image/toolbar.d.ts +2 -0
- package/lib/renderers/Image/toolbar.d.ts.map +1 -1
- package/lib/renderers/Json/index.vue.d.ts +5 -3
- package/lib/renderers/Json/index.vue.d.ts.map +1 -1
- package/lib/renderers/Markdown/index.vue.d.ts.map +1 -1
- package/lib/renderers/Mobi/index.vue.d.ts +19 -0
- package/lib/renderers/Mobi/index.vue.d.ts.map +1 -0
- package/lib/renderers/Mobi/toolbar.d.ts +16 -0
- package/lib/renderers/Mobi/toolbar.d.ts.map +1 -0
- package/lib/renderers/Msg/index.vue.d.ts.map +1 -1
- package/lib/renderers/Pdf/index.vue.d.ts.map +1 -1
- package/lib/renderers/Pdf/toolbar.d.ts +2 -0
- package/lib/renderers/Pdf/toolbar.d.ts.map +1 -1
- package/lib/renderers/Pptx/index.vue.d.ts.map +1 -1
- package/lib/renderers/Subtitle/index.vue.d.ts +7 -0
- package/lib/renderers/Subtitle/index.vue.d.ts.map +1 -0
- package/lib/renderers/Text/index.vue.d.ts +6 -1
- package/lib/renderers/Text/index.vue.d.ts.map +1 -1
- package/lib/renderers/Text/toolbar.d.ts +12 -0
- package/lib/renderers/Text/toolbar.d.ts.map +1 -0
- package/lib/renderers/Unsupported/index.vue.d.ts.map +1 -1
- package/lib/renderers/Video/index.vue.d.ts.map +1 -1
- package/lib/renderers/Xlsx/index.vue.d.ts.map +1 -1
- package/lib/renderers/Xml/index.vue.d.ts +7 -0
- package/lib/renderers/Xml/index.vue.d.ts.map +1 -0
- package/lib/renderers/Zip/TreeItem.vue.d.ts +24 -0
- package/lib/renderers/Zip/TreeItem.vue.d.ts.map +1 -0
- package/lib/renderers/Zip/index.vue.d.ts +15 -0
- package/lib/renderers/Zip/index.vue.d.ts.map +1 -0
- package/lib/renderers/Zip/toolbar.d.ts +13 -0
- package/lib/renderers/Zip/toolbar.d.ts.map +1 -0
- package/package.json +5 -3
- package/lib/__vite-browser-external-BcPniuRQ.cjs +0 -2
- package/lib/__vite-browser-external-BcPniuRQ.cjs.map +0 -1
- package/lib/__vite-browser-external-DYxpcVy9.js +0 -5
- package/lib/__vite-browser-external-DYxpcVy9.js.map +0 -1
package/README.md
CHANGED
|
@@ -235,7 +235,27 @@ Differences from `FilePreviewModal`:
|
|
|
235
235
|
### Code & Text
|
|
236
236
|
- **Markdown**: GitHub Flavored Markdown, code highlighting
|
|
237
237
|
- **Code Files**: JS, TS, Python, Java, C++, Go, Rust, and 40+ languages
|
|
238
|
-
- **
|
|
238
|
+
- **Config/Logs**: YAML, TOML, INI, ENV, LOG, DIFF, PATCH, etc.
|
|
239
|
+
|
|
240
|
+
### Structured Data
|
|
241
|
+
- **JSON**: Auto formatting + syntax highlighting
|
|
242
|
+
- **CSV/TSV**: Zero-dependency parser, table view with headers and row/column stats
|
|
243
|
+
- **XML**: `DOMParser` validation + pretty print + syntax highlighting
|
|
244
|
+
|
|
245
|
+
### Subtitles & Lyrics
|
|
246
|
+
- **SRT / WebVTT**: Zero-dependency parser, structured cue list (index, time range, text)
|
|
247
|
+
- **LRC / Enhanced LRC**: Lyric files with `[mm:ss.xx]` line stamps (and inline `<mm:ss.xx>` per-word stamps for ELRC), with `[ti:][ar:][al:]` metadata header
|
|
248
|
+
- **ASS / SSA**: Advanced SubStation Alpha — extracts Dialogue events, strips `\N` `\h` and `{...}` override codes, surfaces Style names
|
|
249
|
+
- **TTML / DFXP**: W3C / Apple Music XML captions, supports `begin` / `end` / `dur` and `<br/>`
|
|
250
|
+
|
|
251
|
+
### Archives
|
|
252
|
+
- **ZIP**: Tree view + inline preview for text/code/image entries, download fallback for other types
|
|
253
|
+
|
|
254
|
+
### Outlook Email
|
|
255
|
+
- **MSG**: Headers, body rendering, attachment list
|
|
256
|
+
|
|
257
|
+
### E-books
|
|
258
|
+
- **EPUB**: Chapter navigation, pagination
|
|
239
259
|
|
|
240
260
|
## 🎮 API Reference
|
|
241
261
|
|
|
@@ -247,6 +267,8 @@ Differences from `FilePreviewModal`:
|
|
|
247
267
|
| `currentIndex` | `number` | ✅ | Current file index |
|
|
248
268
|
| `isOpen` | `boolean` | ✅ | Whether the modal is open |
|
|
249
269
|
| `customRenderers` | `CustomRenderer[]` | ❌ | Custom renderers for specific file types |
|
|
270
|
+
| `locale` | `Locale` | ❌ | UI language (`'zh-CN'` default, `'en-US'` built-in) |
|
|
271
|
+
| `messages` | `Partial<Record<Locale, Partial<Messages>>>` | ❌ | Custom translation overrides |
|
|
250
272
|
|
|
251
273
|
### FilePreviewModal Events
|
|
252
274
|
|
|
@@ -264,6 +286,8 @@ Differences from `FilePreviewModal`:
|
|
|
264
286
|
| `customRenderers` | `CustomRenderer[]` | ❌ | - | Custom renderers |
|
|
265
287
|
| `width` | `number \| string` | ❌ | `'100%'` | Container width |
|
|
266
288
|
| `height` | `number \| string` | ❌ | `'100%'` | Container height |
|
|
289
|
+
| `locale` | `Locale` | ❌ | `'zh-CN'` | UI language (`'zh-CN'` or `'en-US'`) |
|
|
290
|
+
| `messages` | `Partial<Record<Locale, Partial<Messages>>>` | ❌ | - | Custom translation overrides |
|
|
267
291
|
|
|
268
292
|
### FilePreviewEmbed Events
|
|
269
293
|
|
package/README.zh-CN.md
CHANGED
|
@@ -235,7 +235,27 @@ const files = [
|
|
|
235
235
|
### 代码 & 文本
|
|
236
236
|
- **Markdown**: GitHub Flavored Markdown,代码高亮
|
|
237
237
|
- **代码文件**: JS, TS, Python, Java, C++, Go, Rust 等 40+ 种语言
|
|
238
|
-
-
|
|
238
|
+
- **配置 / 日志**: YAML, TOML, INI, ENV, LOG, DIFF, PATCH 等
|
|
239
|
+
|
|
240
|
+
### 结构化数据
|
|
241
|
+
- **JSON**: 自动格式化 + 语法高亮
|
|
242
|
+
- **CSV / TSV**: 零依赖解析,表格视图 + 行列统计
|
|
243
|
+
- **XML**: `DOMParser` 校验 + 自动缩进 + 语法高亮
|
|
244
|
+
|
|
245
|
+
### 字幕 / 歌词
|
|
246
|
+
- **SRT / WebVTT**: 零依赖解析,结构化 cue 列表(索引、时间区间、文本)
|
|
247
|
+
- **LRC / Enhanced LRC**: 歌词文件,`[mm:ss.xx]` 行时间戳(ELRC 额外支持行内 `<mm:ss.xx>` 逐字时间戳),自动解析 `[ti:][ar:][al:]` 等元数据
|
|
248
|
+
- **ASS / SSA**: Advanced SubStation Alpha,提取 Dialogue 事件,自动剥离 `\N` `\h` 与 `{...}` 样式覆盖码,展示 Style 标签
|
|
249
|
+
- **TTML / DFXP**: W3C / Apple Music 使用的 XML 字幕,支持 `begin` / `end` / `dur` 与 `<br/>`
|
|
250
|
+
|
|
251
|
+
### 压缩包
|
|
252
|
+
- **ZIP**: 树形目录 + 内嵌预览文本/代码/图片,其他类型可下载导出
|
|
253
|
+
|
|
254
|
+
### Outlook 邮件
|
|
255
|
+
- **MSG**: 邮件头、正文、附件列表
|
|
256
|
+
|
|
257
|
+
### 电子书
|
|
258
|
+
- **EPUB**: 章节导航、翻页
|
|
239
259
|
|
|
240
260
|
## 🎮 API 参考
|
|
241
261
|
|
|
@@ -247,6 +267,8 @@ const files = [
|
|
|
247
267
|
| `currentIndex` | `number` | ✅ | 当前文件索引 |
|
|
248
268
|
| `isOpen` | `boolean` | ✅ | 是否打开预览 |
|
|
249
269
|
| `customRenderers` | `CustomRenderer[]` | ❌ | 自定义渲染器 |
|
|
270
|
+
| `locale` | `Locale` | ❌ | 界面语言(默认 `'zh-CN'`,内置 `'en-US'`) |
|
|
271
|
+
| `messages` | `Partial<Record<Locale, Partial<Messages>>>` | ❌ | 自定义翻译覆盖 |
|
|
250
272
|
|
|
251
273
|
### FilePreviewModal 事件
|
|
252
274
|
|
|
@@ -264,6 +286,8 @@ const files = [
|
|
|
264
286
|
| `customRenderers` | `CustomRenderer[]` | ❌ | - | 自定义渲染器 |
|
|
265
287
|
| `width` | `number \| string` | ❌ | `'100%'` | 容器宽度 |
|
|
266
288
|
| `height` | `number \| string` | ❌ | `'100%'` | 容器高度 |
|
|
289
|
+
| `locale` | `Locale` | ❌ | `'zh-CN'` | 界面语言(`'zh-CN'` 或 `'en-US'`) |
|
|
290
|
+
| `messages` | `Partial<Record<Locale, Partial<Messages>>>` | ❌ | - | 自定义翻译覆盖 |
|
|
267
291
|
|
|
268
292
|
### FilePreviewEmbed 事件
|
|
269
293
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PreviewFileInput } from '@eternalheart/file-preview-core';
|
|
1
|
+
import { type PreviewFileInput, type Locale, type Messages } from '@eternalheart/file-preview-core';
|
|
2
2
|
import type { CustomRenderer } from './types';
|
|
3
3
|
interface Props {
|
|
4
4
|
files: PreviewFileInput[];
|
|
@@ -6,6 +6,12 @@ interface Props {
|
|
|
6
6
|
customRenderers?: CustomRenderer[];
|
|
7
7
|
/** 运行模式: modal(弹窗) 或 embed(嵌入) */
|
|
8
8
|
mode?: 'modal' | 'embed';
|
|
9
|
+
/** ZIP 嵌套深度(内部使用),超过上限时不再递归渲染 ZIP */
|
|
10
|
+
zipNestingDepth?: number;
|
|
11
|
+
/** 语言 */
|
|
12
|
+
locale?: Locale;
|
|
13
|
+
/** 自定义翻译字典 */
|
|
14
|
+
messages?: Partial<Record<Locale, Partial<Messages>>>;
|
|
9
15
|
}
|
|
10
16
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
11
17
|
close: () => any;
|
|
@@ -16,6 +22,9 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
16
22
|
}>, {
|
|
17
23
|
mode: "modal" | "embed";
|
|
18
24
|
customRenderers: CustomRenderer[];
|
|
25
|
+
zipNestingDepth: number;
|
|
26
|
+
locale: Locale;
|
|
27
|
+
messages: Partial<Record<Locale, Partial<Messages>>>;
|
|
19
28
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
20
29
|
export default _default;
|
|
21
30
|
//# 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":"AAiqBA,OAAO,EAGL,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACX,KAAK,QAAQ,EACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AA8B9C,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;CACvD;;;;;;;;UAPQ,OAAO,GAAG,OAAO;qBAFN,cAAc,EAAE;qBAIhB,MAAM;YAEf,MAAM;cAEJ,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;;AA2kCvD,wBAQG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PreviewFileInput } from '@eternalheart/file-preview-core';
|
|
1
|
+
import type { PreviewFileInput, Locale, Messages } from '@eternalheart/file-preview-core';
|
|
2
2
|
import type { CustomRenderer } from './types';
|
|
3
3
|
interface Props {
|
|
4
4
|
files: PreviewFileInput[];
|
|
@@ -8,6 +8,10 @@ interface Props {
|
|
|
8
8
|
width?: number | string;
|
|
9
9
|
/** 高度,默认 100% 填充父容器 */
|
|
10
10
|
height?: number | string;
|
|
11
|
+
/** 语言 */
|
|
12
|
+
locale?: Locale;
|
|
13
|
+
/** 自定义翻译字典 */
|
|
14
|
+
messages?: Partial<Record<Locale, Partial<Messages>>>;
|
|
11
15
|
}
|
|
12
16
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
13
17
|
navigate: (index: number) => any;
|
|
@@ -18,6 +22,8 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
18
22
|
width: number | string;
|
|
19
23
|
currentIndex: number;
|
|
20
24
|
customRenderers: CustomRenderer[];
|
|
25
|
+
locale: Locale;
|
|
26
|
+
messages: Partial<Record<Locale, Partial<Messages>>>;
|
|
21
27
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
28
|
export default _default;
|
|
23
29
|
//# 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":"AAyDA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC1F,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;CACvD;;;;;;YALU,MAAM,GAAG,MAAM;WAFhB,MAAM,GAAG,MAAM;kBAHR,MAAM;qBACH,cAAc,EAAE;YAMzB,MAAM;cAEJ,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;;AAsGvD,wBAQG"}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type { PreviewFileInput } from '@eternalheart/file-preview-core';
|
|
1
|
+
import type { PreviewFileInput, Locale, Messages } from '@eternalheart/file-preview-core';
|
|
2
2
|
import type { CustomRenderer } from './types';
|
|
3
3
|
interface Props {
|
|
4
4
|
files: PreviewFileInput[];
|
|
5
5
|
currentIndex: number;
|
|
6
6
|
isOpen: boolean;
|
|
7
7
|
customRenderers?: CustomRenderer[];
|
|
8
|
+
/** 语言 */
|
|
9
|
+
locale?: Locale;
|
|
10
|
+
/** 自定义翻译字典 */
|
|
11
|
+
messages?: Partial<Record<Locale, Partial<Messages>>>;
|
|
8
12
|
}
|
|
9
13
|
declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
10
14
|
close: () => any;
|
|
@@ -14,6 +18,8 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
|
|
|
14
18
|
onNavigate?: ((index: number) => any) | undefined;
|
|
15
19
|
}>, {
|
|
16
20
|
customRenderers: CustomRenderer[];
|
|
21
|
+
locale: Locale;
|
|
22
|
+
messages: Partial<Record<Locale, Partial<Messages>>>;
|
|
17
23
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
24
|
export default _default;
|
|
19
25
|
//# 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":"AAyEA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC1F,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;CACvD;;;;;;;;qBALmB,cAAc,EAAE;YAEzB,MAAM;cAEJ,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;;AAuJvD,wBAQG"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** 左侧初始宽度(px);传入 storageKey 时会从 localStorage 读取 */
|
|
3
|
+
initialLeftWidth?: number;
|
|
4
|
+
/** 左侧最小宽度(px) */
|
|
5
|
+
minLeftWidth?: number;
|
|
6
|
+
/** 左侧最大宽度(px) */
|
|
7
|
+
maxLeftWidth?: number;
|
|
8
|
+
/** 右侧至少保留的宽度(px) */
|
|
9
|
+
minRightWidth?: number;
|
|
10
|
+
/** localStorage 持久化 key */
|
|
11
|
+
storageKey?: string;
|
|
12
|
+
/** 启用横向拖动的媒体查询 */
|
|
13
|
+
desktopMedia?: string;
|
|
14
|
+
}
|
|
15
|
+
declare var __VLS_1: {}, __VLS_3: {};
|
|
16
|
+
type __VLS_Slots = {} & {
|
|
17
|
+
left?: (props: typeof __VLS_1) => any;
|
|
18
|
+
} & {
|
|
19
|
+
right?: (props: typeof __VLS_3) => any;
|
|
20
|
+
};
|
|
21
|
+
declare const __VLS_component: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
22
|
+
initialLeftWidth: number;
|
|
23
|
+
minLeftWidth: number;
|
|
24
|
+
maxLeftWidth: number;
|
|
25
|
+
minRightWidth: number;
|
|
26
|
+
desktopMedia: string;
|
|
27
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=ResizableSplit.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResizableSplit.vue.d.ts","sourceRoot":"","sources":["../../src/components/ResizableSplit.vue"],"names":[],"mappings":"AA8JA,UAAU,KAAK;IACb,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAgLD,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC3C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACzC;IAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB7C,QAAA,MAAM,eAAe;sBAvNA,MAAM;kBAEV,MAAM;kBAEN,MAAM;mBAEL,MAAM;kBAIP,MAAM;6EAoNrB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type Ref, type MaybeRef, type ComputedRef } from 'vue';
|
|
2
|
+
import { type Locale, type Messages, type Translator } from '@eternalheart/file-preview-core';
|
|
3
|
+
/**
|
|
4
|
+
* 在主组件中调用,向子树注入 locale context
|
|
5
|
+
*/
|
|
6
|
+
export declare function provideLocale(locale: MaybeRef<Locale | undefined>, messages?: MaybeRef<Partial<Record<Locale, Partial<Messages>>> | undefined>): void;
|
|
7
|
+
/**
|
|
8
|
+
* 获取翻译函数。在 provider 外使用时自动 fallback 到 zh-CN。
|
|
9
|
+
*/
|
|
10
|
+
export declare function useTranslator(): {
|
|
11
|
+
locale: Ref<Locale>;
|
|
12
|
+
t: ComputedRef<Translator>;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useTranslator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTranslator.d.ts","sourceRoot":"","sources":["../../src/composables/useTranslator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,GAAG,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,KAAK,CAAC;AAClG,OAAO,EAAoB,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAGhH;;GAEG;AACH,wBAAgB,aAAa,CAC3B,MAAM,EAAE,QAAQ,CAAC,MAAM,GAAG,SAAS,CAAC,EACpC,QAAQ,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,GAC1E,IAAI,CAMN;AASD;;GAEG;AACH,wBAAgB,aAAa,IAAI;IAAE,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAAC,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAA;CAAE,CAOnF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { InjectionKey, Ref, ComputedRef } from 'vue';
|
|
2
|
+
import type { Locale, Translator } from '@eternalheart/file-preview-core';
|
|
3
|
+
export interface LocaleInjection {
|
|
4
|
+
locale: Ref<Locale>;
|
|
5
|
+
t: ComputedRef<Translator>;
|
|
6
|
+
}
|
|
7
|
+
export declare const LOCALE_KEY: InjectionKey<LocaleInjection>;
|
|
8
|
+
//# sourceMappingURL=localeKey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"localeKey.d.ts","sourceRoot":"","sources":["../../src/i18n/localeKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAE1E,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACpB,CAAC,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;CAC5B;AAED,eAAO,MAAM,UAAU,EAAE,YAAY,CAAC,eAAe,CAAiC,CAAC"}
|