@worm-print-platform/canvas 1.6.0 → 1.6.2
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 -2
- package/dist/browser-bundle.d.ts +1 -1
- package/dist/canvas.css +5 -0
- package/dist/canvas.js +1183 -120
- package/dist/core/default-template.d.ts +1 -1
- package/dist/core/element-definitions.d.ts +1 -1
- package/dist/core/format.d.ts +1 -1
- package/dist/core/h.d.ts +1 -1
- package/dist/core/icons.d.ts +1 -1
- package/dist/core/plugin.d.ts +4 -3
- package/dist/core/store.d.ts +3 -2
- package/dist/host-contract.d.ts +10 -3
- package/dist/index.cjs +1052 -13
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6418 -5179
- package/dist/print-designer.d.ts +18 -3
- package/dist/shell/binding.d.ts +1 -1
- package/dist/shell/canvas.d.ts +1 -1
- package/dist/shell/code.d.ts +1 -1
- package/dist/shell/color-picker.d.ts +1 -1
- package/dist/shell/controls.d.ts +16 -1
- package/dist/shell/crop-anchor.d.ts +1 -1
- package/dist/shell/elements.d.ts +1 -1
- package/dist/shell/expression-editor.d.ts +1 -1
- package/dist/shell/flow-list.d.ts +1 -3
- package/dist/shell/font-select.d.ts +1 -1
- package/dist/shell/format-bar.d.ts +1 -1
- package/dist/shell/help-content/{advanced-settings.d.ts → en-US/advanced-settings.d.ts} +1 -1
- package/dist/shell/help-content/{changelog.d.ts → en-US/changelog.d.ts} +1 -1
- package/dist/shell/help-content/{faq.d.ts → en-US/faq.d.ts} +1 -1
- package/dist/shell/help-content/{features.d.ts → en-US/features.d.ts} +1 -1
- package/dist/shell/help-content/{getting-started.d.ts → en-US/getting-started.d.ts} +1 -1
- package/dist/shell/help-content/{shortcuts.d.ts → en-US/shortcuts.d.ts} +1 -1
- package/dist/shell/help-content/index.d.ts +4 -1
- package/dist/shell/help-content/th-TH/advanced-settings.d.ts +12 -0
- package/dist/shell/help-content/th-TH/changelog.d.ts +12 -0
- package/dist/shell/help-content/th-TH/faq.d.ts +12 -0
- package/dist/shell/help-content/th-TH/features.d.ts +12 -0
- package/dist/shell/help-content/th-TH/getting-started.d.ts +12 -0
- package/dist/shell/help-content/th-TH/shortcuts.d.ts +12 -0
- package/dist/shell/help-content/zh-CN/advanced-settings.d.ts +12 -0
- package/dist/shell/help-content/zh-CN/changelog.d.ts +12 -0
- package/dist/shell/help-content/zh-CN/faq.d.ts +12 -0
- package/dist/shell/help-content/zh-CN/features.d.ts +12 -0
- package/dist/shell/help-content/zh-CN/getting-started.d.ts +12 -0
- package/dist/shell/help-content/zh-CN/shortcuts.d.ts +12 -0
- package/dist/shell/help-modal.d.ts +6 -1
- package/dist/shell/page-extras.d.ts +1 -1
- package/dist/shell/panels.d.ts +1 -1
- package/dist/shell/plugin-ui.d.ts +1 -1
- package/dist/shell/prop-group.d.ts +1 -1
- package/dist/shell/property-panel.d.ts +1 -1
- package/dist/shell/property-search.d.ts +1 -1
- package/dist/shell/ruler.d.ts +1 -1
- package/dist/shell/table-props.d.ts +1 -1
- package/dist/shell/table.d.ts +1 -1
- package/dist/shell/toolbar-overflow.d.ts +3 -3
- package/dist/shell/toolbar.d.ts +1 -1
- package/dist/shell/watermark.d.ts +1 -1
- package/dist/test-setup.d.ts +7 -0
- package/dist/theme-tokens.d.ts +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/vue3/PrintDesigner.d.ts +24 -1
- package/dist/vue3/PrintHtmlPreview.d.ts +1 -1
- package/dist/vue3/index.cjs +2 -2
- package/dist/vue3/index.d.ts +1 -1
- package/dist/vue3/index.js +85 -75
- package/dist/vue3/previewStyle.d.ts +1 -1
- package/dist/vue3/toolbarOverflow.d.ts +1 -1
- package/package.json +3 -3
package/dist/print-designer.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/canvas v1.6.
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
3
|
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
4
|
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
6
6
|
*/
|
|
7
|
+
import type { CustomLocaleMessages } from '@worm-print-platform/core/i18n';
|
|
7
8
|
import type { UploadDesignBackgroundFn, UploadImageFn } from '@worm-print-platform/core/designer';
|
|
8
9
|
import type { PrintFontDeclaration } from '@worm-print-platform/core';
|
|
9
10
|
import type { PrintDesignerHostContract, PrintDesignerThemeConfig, PrintDesignerThemeMode } from './host-contract';
|
|
@@ -27,6 +28,12 @@ export declare class PrintDesignerElement extends HTMLElement {
|
|
|
27
28
|
private pluginStyleEls;
|
|
28
29
|
/** 实例级监听登记:卸载时成对摘除,避免 SPA 反复挂载累积 window/document 监听并持有整个实例 */
|
|
29
30
|
private instanceDisposers;
|
|
31
|
+
/** 实例显式语言;未设置时跟随 core 全局 locale */
|
|
32
|
+
private _lang;
|
|
33
|
+
/** 当前实例用户语言包:交给 scoped translator 使用,不注册到全局 */
|
|
34
|
+
private _messages;
|
|
35
|
+
/** 全局 locale 变化订阅;仅未显式设置 lang 的实例重绘 */
|
|
36
|
+
private unsubI18n;
|
|
30
37
|
/** 首挂标尺测量的 rAF 句柄:卸载后取消,避免对已销毁实例回调 */
|
|
31
38
|
private measureRaf;
|
|
32
39
|
private state;
|
|
@@ -104,6 +111,13 @@ export declare class PrintDesignerElement extends HTMLElement {
|
|
|
104
111
|
/** 字段行显示模式:label / key / both(默认 both);非法值静默回退 both */
|
|
105
112
|
set fieldDisplay(v: unknown);
|
|
106
113
|
get fieldDisplay(): FieldDisplayMode;
|
|
114
|
+
/** 界面语言;未设置时跟随 core 全局 locale(浏览器按 navigator.language 探测) */
|
|
115
|
+
set lang(v: string | undefined);
|
|
116
|
+
get lang(): string;
|
|
117
|
+
/** 自定义语言包(对象注入):只作用于本实例的 scoped translator,不污染全局 */
|
|
118
|
+
set messages(v: CustomLocaleMessages | undefined);
|
|
119
|
+
/** 切换当前实例语言并即时重绘;不影响全局 locale */
|
|
120
|
+
setLocale(locale: string): void;
|
|
107
121
|
/** 主题预设:auto(默认)跟随系统 prefers-color-scheme,light/dark 强制 */
|
|
108
122
|
set theme(v: PrintDesignerThemeMode | undefined);
|
|
109
123
|
get theme(): PrintDesignerThemeMode;
|
|
@@ -114,12 +128,12 @@ export declare class PrintDesignerElement extends HTMLElement {
|
|
|
114
128
|
* 宿主契约版本(机器可读);宿主可在挂载前用 `PrintDesignerElement.contractVersion`
|
|
115
129
|
* 判断是否需要降级或提示升级,避免把版本号埋在文档里。
|
|
116
130
|
*/
|
|
117
|
-
static readonly contractVersion = "1.
|
|
131
|
+
static readonly contractVersion = "1.4.0";
|
|
118
132
|
/** 返回完整契约快照(attributes / properties / methods / 事件 / parts / 主题令牌) */
|
|
119
133
|
static getHostContract(): PrintDesignerHostContract;
|
|
120
134
|
/** 实例侧同款读取入口,便于 `document.querySelector('print-designer').getHostContract()` */
|
|
121
135
|
getHostContract(): PrintDesignerHostContract;
|
|
122
|
-
static get observedAttributes(): ("fields" | "name" | "fonts" | "template" | "design-data" | "theme" | "theme-config" | "field-display")[];
|
|
136
|
+
static get observedAttributes(): ("fields" | "name" | "fonts" | "template" | "design-data" | "theme" | "theme-config" | "field-display" | "lang")[];
|
|
123
137
|
attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
|
|
124
138
|
connectedCallback(): void;
|
|
125
139
|
/** 仅 auto 模式需要监听系统深浅色;matchMedia 缺失的环境(部分测试宿主)保持浅色 */
|
|
@@ -177,6 +191,7 @@ export declare class PrintDesignerElement extends HTMLElement {
|
|
|
177
191
|
private canvasUi;
|
|
178
192
|
private repaint;
|
|
179
193
|
private paint;
|
|
194
|
+
private paintInternal;
|
|
180
195
|
/**
|
|
181
196
|
* 每次整树重建后补 `::part` 标记。派生的 designer.css 只认类名,
|
|
182
197
|
* 因此这里只给顶层容器加属性,不改动任何 DOM 结构与 class。
|
package/dist/shell/binding.d.ts
CHANGED
package/dist/shell/canvas.d.ts
CHANGED
package/dist/shell/code.d.ts
CHANGED
package/dist/shell/controls.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/canvas v1.6.
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
3
|
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
4
|
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
6
6
|
*/
|
|
7
|
+
import type { Translate } from '@worm-print-platform/core/i18n';
|
|
7
8
|
import type { PrintFontDeclaration } from '@worm-print-platform/core';
|
|
8
9
|
import type { PrintBusinessField } from '@worm-print-platform/core/designer';
|
|
9
10
|
import type { FieldDisplayMode } from '@worm-print-platform/plugin-kit/expression-editor';
|
|
@@ -56,6 +57,10 @@ export interface ShellCtx {
|
|
|
56
57
|
showPreview?: boolean;
|
|
57
58
|
showSave?: boolean;
|
|
58
59
|
isEdit: boolean;
|
|
60
|
+
/** 当前实例 locale 的翻译函数;由 print-designer 注入,缺省用全局 t */
|
|
61
|
+
t?: import('@worm-print-platform/core/i18n').Translate;
|
|
62
|
+
/** 当前实例 locale BCP47(模块级常量 label 翻译用) */
|
|
63
|
+
lang?: string;
|
|
59
64
|
/** 宿主注入能力(图片上传、设计背景上传、字体清单),未注入时相关入口置灰 */
|
|
60
65
|
host: {
|
|
61
66
|
uploadImage?: (file: File) => Promise<string>;
|
|
@@ -68,6 +73,16 @@ export interface ShellCtx {
|
|
|
68
73
|
fields?: readonly PrintBusinessField[];
|
|
69
74
|
};
|
|
70
75
|
}
|
|
76
|
+
/** 外壳文案翻译:优先实例 translator,缺省回退 core 全局 t */
|
|
77
|
+
export declare function tr(ctx: {
|
|
78
|
+
t?: import('@worm-print-platform/core/i18n').Translate;
|
|
79
|
+
}, key: string, params?: Record<string, string | number>): string;
|
|
80
|
+
export declare function withRenderTranslator(t: Translate, paint: () => void): void;
|
|
81
|
+
/**
|
|
82
|
+
* 无 ctx 作用域(模块级常量与工具函数)的翻译:
|
|
83
|
+
* 绘制期间优先取实例 translator,其余场景回落 core 全局 locale。
|
|
84
|
+
*/
|
|
85
|
+
export declare function trG(key: string, params?: Record<string, string | number>): string;
|
|
71
86
|
/** 带图标的工具栏按钮(对应 Vue 3 轨 的 .tb-btn.tb-icon) */
|
|
72
87
|
export declare function tbIconBtn(ctx: ShellCtx, iconName: string, action: string, opts: {
|
|
73
88
|
tip: string;
|
package/dist/shell/elements.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/canvas v1.6.
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
3
|
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
4
|
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
6
6
|
*/
|
|
7
7
|
import type { RuntimeElement } from '@worm-print-platform/core/designer';
|
|
8
8
|
import type { DesignerStore } from '../core/store';
|
|
9
|
-
/** 与 Vue 3 轨 FlowListElement 的 DESIGN_FALLBACK_ITEMS 逐字一致:新拖入的元素也要看得见形状 */
|
|
10
|
-
export declare const FLOW_LIST_DEMO_ITEMS: string[];
|
|
11
9
|
export declare function flowListCells(el: RuntimeElement, data?: Record<string, any>[]): string[];
|
|
12
10
|
export declare function renderFlowListElement(el: RuntimeElement, data?: Record<string, any>[], store?: DesignerStore): import("@worm-print-platform/plugin-kit/dom").El;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/canvas v1.6.
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
3
|
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
4
|
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
@@ -9,5 +9,8 @@ export type HelpSection = {
|
|
|
9
9
|
title: string;
|
|
10
10
|
content: string;
|
|
11
11
|
};
|
|
12
|
+
/** 未指定语言时默认中文;en-* 走英文;th-* 走泰语;其余回退中文 */
|
|
13
|
+
export declare function getHelpSections(locale?: string): HelpSection[];
|
|
14
|
+
/** zh-CN 别名,供旧的直接引用保持兼容 */
|
|
12
15
|
export declare const helpSections: HelpSection[];
|
|
13
16
|
export type { HelpSection as default };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
|
+
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
|
+
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
|
+
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
|
+
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
|
+
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
|
+
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
|
+
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
|
+
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
|
+
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
|
+
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
|
+
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
|
+
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
|
+
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
|
+
* SPDX-License-Identifier: MIT
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: {
|
|
8
|
+
id: string;
|
|
9
|
+
title: string;
|
|
10
|
+
content: string;
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/canvas v1.6.
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
3
|
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
4
|
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
6
6
|
*/
|
|
7
|
+
import type { Translate } from '@worm-print-platform/core/i18n';
|
|
7
8
|
import type { El } from '../core/h';
|
|
8
9
|
export interface HelpModalOptions {
|
|
9
10
|
/** 首次打开的页签(Vue 3 轨 的 initialTab,默认「快速入门」) */
|
|
10
11
|
initialTab?: string;
|
|
12
|
+
/** 语言包标识;en-* 显示英文帮助,其余中文(正文/页签本期静态,自定义语言回退中文) */
|
|
13
|
+
locale?: string;
|
|
14
|
+
/** 外壳标题/关闭按钮的实例取词器;未传时按 locale 取全局 */
|
|
15
|
+
t?: Translate;
|
|
11
16
|
onClose: () => void;
|
|
12
17
|
}
|
|
13
18
|
/** 渲染帮助弹窗(调用方负责挂到 shadow root 上) */
|
package/dist/shell/panels.d.ts
CHANGED
package/dist/shell/ruler.d.ts
CHANGED
package/dist/shell/table.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/canvas v1.6.
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
3
|
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
4
|
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
@@ -12,8 +12,8 @@ export interface ToolbarUnitDef {
|
|
|
12
12
|
id: string;
|
|
13
13
|
/** 数值小者先被收进「更多」 */
|
|
14
14
|
order: number;
|
|
15
|
-
/**
|
|
16
|
-
|
|
15
|
+
/** 面板内分组标题的语言包 key:渲染时按实例 locale 取词,避免模块级常量冻结语言 */
|
|
16
|
+
labelKey: string;
|
|
17
17
|
}
|
|
18
18
|
/** 收纳优先级链:与 Vue 3 轨的 DesignerToolbar / FormatToolbar 声明逐条对应 */
|
|
19
19
|
export declare const TOOLBAR_UNITS: ToolbarUnitDef[];
|
package/dist/shell/toolbar.d.ts
CHANGED
package/dist/theme-tokens.d.ts
CHANGED
package/dist/version.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/canvas v1.6.
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
3
|
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
4
|
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
6
6
|
*/
|
|
7
7
|
/** 设计器(@worm-print-platform/canvas)当前版本,用于状态栏等 UI 展示 */
|
|
8
|
-
export declare const CANVAS_VERSION = "1.6.
|
|
8
|
+
export declare const CANVAS_VERSION = "1.6.2";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/canvas v1.6.
|
|
2
|
+
* @worm-print-platform/canvas v1.6.2
|
|
3
3
|
* Copyright (c) 2026 worm <liu_long_qqcom@qq.com>
|
|
4
4
|
* SPDX-FileCopyrightText: 2026 worm <liu_long_qqcom@qq.com>
|
|
5
5
|
* SPDX-License-Identifier: MIT
|
|
6
6
|
*/
|
|
7
7
|
import type { PropType } from 'vue';
|
|
8
8
|
import type { PrintFontDeclaration } from '@worm-print-platform/core';
|
|
9
|
+
import type { CustomLocaleMessages } from '@worm-print-platform/core/i18n';
|
|
9
10
|
import type { MultiPageTemplateData, PrintBusinessField, RuntimeElement, TemplateData, UploadDesignBackgroundFn, UploadImageFn } from '@worm-print-platform/core/designer';
|
|
10
11
|
import type { PrintDesignerElement } from '../print-designer';
|
|
11
12
|
import type { PrintDesignerThemeConfig, PrintDesignerThemeMode } from '../host-contract';
|
|
@@ -77,6 +78,16 @@ declare const component: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
77
78
|
type: PropType<PrintDesignerThemeConfig>;
|
|
78
79
|
default: undefined;
|
|
79
80
|
};
|
|
81
|
+
/** 界面语言(BCP47,如 en-US);未传时跟随全局 locale */
|
|
82
|
+
lang: {
|
|
83
|
+
type: StringConstructor;
|
|
84
|
+
default: undefined;
|
|
85
|
+
};
|
|
86
|
+
/** 自定义语言包(对象注入),覆盖内置与插件译文 */
|
|
87
|
+
messages: {
|
|
88
|
+
type: PropType<CustomLocaleMessages>;
|
|
89
|
+
default: undefined;
|
|
90
|
+
};
|
|
80
91
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
81
92
|
[key: string]: any;
|
|
82
93
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
@@ -144,6 +155,16 @@ declare const component: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
144
155
|
type: PropType<PrintDesignerThemeConfig>;
|
|
145
156
|
default: undefined;
|
|
146
157
|
};
|
|
158
|
+
/** 界面语言(BCP47,如 en-US);未传时跟随全局 locale */
|
|
159
|
+
lang: {
|
|
160
|
+
type: StringConstructor;
|
|
161
|
+
default: undefined;
|
|
162
|
+
};
|
|
163
|
+
/** 自定义语言包(对象注入),覆盖内置与插件译文 */
|
|
164
|
+
messages: {
|
|
165
|
+
type: PropType<CustomLocaleMessages>;
|
|
166
|
+
default: undefined;
|
|
167
|
+
};
|
|
147
168
|
}>> & Readonly<{
|
|
148
169
|
onSave?: ((json: string) => any) | undefined;
|
|
149
170
|
onPreview?: (() => any) | undefined;
|
|
@@ -152,6 +173,7 @@ declare const component: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
152
173
|
fonts: readonly PrintFontDeclaration[];
|
|
153
174
|
designData: Record<string, unknown> | readonly Record<string, unknown>[];
|
|
154
175
|
theme: PrintDesignerThemeMode;
|
|
176
|
+
lang: string;
|
|
155
177
|
isEdit: boolean;
|
|
156
178
|
showHelp: boolean;
|
|
157
179
|
showPreview: boolean;
|
|
@@ -159,6 +181,7 @@ declare const component: import("vue").DefineComponent<import("vue").ExtractProp
|
|
|
159
181
|
themeConfig: PrintDesignerThemeConfig;
|
|
160
182
|
uploadImage: UploadImageFn;
|
|
161
183
|
uploadDesignBackground: UploadDesignBackgroundFn;
|
|
184
|
+
messages: CustomLocaleMessages;
|
|
162
185
|
initialTemplate: TemplateData | MultiPageTemplateData;
|
|
163
186
|
initialElements: RuntimeElement[];
|
|
164
187
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|