@worm-print-platform/canvas 1.5.3 → 1.6.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.
Files changed (55) hide show
  1. package/README.md +9 -3
  2. package/dist/browser-bundle.d.ts +1 -1
  3. package/dist/canvas.css +1 -1
  4. package/dist/canvas.js +75 -63
  5. package/dist/core/default-template.d.ts +1 -1
  6. package/dist/core/element-definitions.d.ts +1 -1
  7. package/dist/core/format.d.ts +1 -1
  8. package/dist/core/h.d.ts +3 -17
  9. package/dist/core/icons.d.ts +1 -1
  10. package/dist/core/plugin.d.ts +1 -1
  11. package/dist/core/store.d.ts +1 -1
  12. package/dist/host-contract.d.ts +9 -3
  13. package/dist/index.cjs +22 -10
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.js +1712 -1666
  16. package/dist/print-designer.d.ts +7 -3
  17. package/dist/shell/binding.d.ts +2 -2
  18. package/dist/shell/canvas.d.ts +2 -2
  19. package/dist/shell/code.d.ts +3 -3
  20. package/dist/shell/color-picker.d.ts +3 -39
  21. package/dist/shell/controls.d.ts +14 -11
  22. package/dist/shell/crop-anchor.d.ts +2 -2
  23. package/dist/shell/elements.d.ts +2 -2
  24. package/dist/shell/expression-editor.d.ts +3 -28
  25. package/dist/shell/flow-list.d.ts +2 -2
  26. package/dist/shell/font-select.d.ts +1 -1
  27. package/dist/shell/format-bar.d.ts +2 -2
  28. package/dist/shell/help-content/advanced-settings.d.ts +1 -1
  29. package/dist/shell/help-content/changelog.d.ts +1 -1
  30. package/dist/shell/help-content/faq.d.ts +1 -1
  31. package/dist/shell/help-content/features.d.ts +1 -1
  32. package/dist/shell/help-content/getting-started.d.ts +1 -1
  33. package/dist/shell/help-content/index.d.ts +1 -1
  34. package/dist/shell/help-content/shortcuts.d.ts +1 -1
  35. package/dist/shell/help-modal.d.ts +1 -1
  36. package/dist/shell/page-extras.d.ts +1 -1
  37. package/dist/shell/panels.d.ts +4 -4
  38. package/dist/shell/plugin-ui.d.ts +1 -1
  39. package/dist/shell/prop-group.d.ts +1 -1
  40. package/dist/shell/property-panel.d.ts +1 -1
  41. package/dist/shell/property-search.d.ts +1 -1
  42. package/dist/shell/ruler.d.ts +1 -1
  43. package/dist/shell/table-props.d.ts +1 -1
  44. package/dist/shell/table.d.ts +1 -1
  45. package/dist/shell/toolbar-overflow.d.ts +2 -2
  46. package/dist/shell/toolbar.d.ts +2 -2
  47. package/dist/shell/watermark.d.ts +1 -1
  48. package/dist/theme-tokens.d.ts +1 -1
  49. package/dist/version.d.ts +2 -2
  50. package/dist/vue3/PrintDesigner.d.ts +1 -1
  51. package/dist/vue3/PrintHtmlPreview.d.ts +1 -1
  52. package/dist/vue3/index.d.ts +1 -1
  53. package/dist/vue3/previewStyle.d.ts +1 -1
  54. package/dist/vue3/toolbarOverflow.d.ts +1 -1
  55. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -7,6 +7,7 @@
7
7
  import type { UploadDesignBackgroundFn, UploadImageFn } from '@worm-print-platform/core/designer';
8
8
  import type { PrintFontDeclaration } from '@worm-print-platform/core';
9
9
  import type { PrintDesignerHostContract, PrintDesignerThemeConfig, PrintDesignerThemeMode } from './host-contract';
10
+ import type { FieldDisplayMode } from './shell/expression-editor';
10
11
  /**
11
12
  * 插件 UI 的设计态示例数据统一成「数组信封」(data[0] 即数据根对象)。
12
13
  * 宿主可传单个业务对象、对象数组或 JSON 字符串;非法/缺省值返回 undefined,
@@ -100,6 +101,9 @@ export declare class PrintDesignerElement extends HTMLElement {
100
101
  set showPreview(v: boolean);
101
102
  /** 工具栏「保存」按钮显隐;默认显示,隐藏只影响按钮出图,save() 与 save 事件不受影响 */
102
103
  set showSave(v: boolean);
104
+ /** 字段行显示模式:label / key / both(默认 both);非法值静默回退 both */
105
+ set fieldDisplay(v: unknown);
106
+ get fieldDisplay(): FieldDisplayMode;
103
107
  /** 主题预设:auto(默认)跟随系统 prefers-color-scheme,light/dark 强制 */
104
108
  set theme(v: PrintDesignerThemeMode | undefined);
105
109
  get theme(): PrintDesignerThemeMode;
@@ -110,12 +114,12 @@ export declare class PrintDesignerElement extends HTMLElement {
110
114
  * 宿主契约版本(机器可读);宿主可在挂载前用 `PrintDesignerElement.contractVersion`
111
115
  * 判断是否需要降级或提示升级,避免把版本号埋在文档里。
112
116
  */
113
- static readonly contractVersion = "1.2.0";
117
+ static readonly contractVersion = "1.3.0";
114
118
  /** 返回完整契约快照(attributes / properties / methods / 事件 / parts / 主题令牌) */
115
119
  static getHostContract(): PrintDesignerHostContract;
116
120
  /** 实例侧同款读取入口,便于 `document.querySelector('print-designer').getHostContract()` */
117
121
  getHostContract(): PrintDesignerHostContract;
118
- static get observedAttributes(): ("template" | "fields" | "name" | "fonts" | "design-data" | "theme" | "theme-config")[];
122
+ static get observedAttributes(): ("fields" | "name" | "fonts" | "template" | "design-data" | "theme" | "theme-config" | "field-display")[];
119
123
  attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
120
124
  connectedCallback(): void;
121
125
  /** 仅 auto 模式需要监听系统深浅色;matchMedia 缺失的环境(部分测试宿主)保持浅色 */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -18,4 +18,4 @@ export declare function readBindingValue(element: RuntimeElement, targetPath: st
18
18
  export declare function writeBindingValue(store: DesignerStore, element: RuntimeElement, targetPath: string, value: string): void;
19
19
  /** 当前应渲染的绑定项:表格有选区时只出选中单元格,否则按注册表(与 Vue 3 轨同口径) */
20
20
  export declare function bindingDescriptorsFor(ctx: ShellCtx, el: RuntimeElement): BindingDescriptor[];
21
- export declare function bindingGroup(ctx: ShellCtx, el: RuntimeElement): import("../core/h").El;
21
+ export declare function bindingGroup(ctx: ShellCtx, el: RuntimeElement): import("@worm-print-platform/plugin-kit/dom").El;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -58,4 +58,4 @@ export declare function zoneRectsMM(t: TemplateData, paper: {
58
58
  };
59
59
  /** 清徽标与锁存意图(drop 与拖拽会话结束时各调一次) */
60
60
  export declare function clearDropDrag(area: HTMLElement | null | undefined): void;
61
- export declare function renderCanvasArea(ctx: ShellCtx, ui: CanvasUI): import("../core/h").El;
61
+ export declare function renderCanvasArea(ctx: ShellCtx, ui: CanvasUI): import("@worm-print-platform/plugin-kit/dom").El;
@@ -1,11 +1,11 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
- export declare function renderQrcode(el: RuntimeElement): import("../core/h").El;
9
- export declare function renderBarcode(el: RuntimeElement): import("../core/h").El;
8
+ export declare function renderQrcode(el: RuntimeElement): import("@worm-print-platform/plugin-kit/dom").El;
9
+ export declare function renderBarcode(el: RuntimeElement): import("@worm-print-platform/plugin-kit/dom").El;
10
10
  /** DOM 落位后绘制所有码类元素;listSource 为宿主注入的设计态数据(画布文本、插件元素同源) */
11
11
  export declare function hydrateCodes(root: ShadowRoot, elements: RuntimeElement[], listSource?: readonly Record<string, unknown>[]): void;
@@ -1,44 +1,8 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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 { El } from '../core/h';
8
- export interface ColorPickerOptions {
9
- /** 当前色值;空串/undefined 均视为「未设置」 */
10
- value?: string;
11
- /** 是否允许清除(Vue 3 轨 边框等必填场景传 false),默认 true */
12
- clearable?: boolean;
13
- /** 触发按钮 title(Vue 3 轨 侧为色值或「自动」,本包保留调用方传入的字段名语义) */
14
- title?: string;
15
- /** 追加在触发钮上的类名(Vue 3 轨 给组件根挂的 class 会与其自身类名合并,如 `page-bg-picker`) */
16
- triggerClass?: string;
17
- /** 选中回调;undefined 表示清除(Vue 3 轨 emit '' 的等价归一) */
18
- onChange: (value: string | undefined) => void;
19
- }
20
- export declare function parseHex(color: string): {
21
- r: number;
22
- g: number;
23
- b: number;
24
- } | null;
25
- export declare function normalizeHex(color: string): string;
26
- export declare function rgbToHex({ r, g, b }: {
27
- r: number;
28
- g: number;
29
- b: number;
30
- }): string;
31
- export declare function rgbToHsv(r: number, g: number, b: number): {
32
- h: number;
33
- s: number;
34
- v: number;
35
- };
36
- export declare function hsvToRgb(h_: number, s: number, v: number): {
37
- r: number;
38
- g: number;
39
- b: number;
40
- };
41
- /** 触发按钮(对应 Vue 3 轨 的 button.preset-color-trigger);点击在挂载根上开/关面板 */
42
- export declare function colorPicker(opts: ColorPickerOptions): El;
43
- /** 关闭当前打开的面板并解除全部监听(宿主 disconnectedCallback 亦可用) */
44
- export declare function closeColorPicker(): void;
7
+ export { parseHex, normalizeHex, rgbToHex, rgbToHsv, hsvToRgb, colorPicker, closeColorPicker, } from '@worm-print-platform/plugin-kit/controls';
8
+ export type { ColorPickerOptions } from '@worm-print-platform/plugin-kit/controls';
@@ -1,11 +1,12 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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 { PrintFontDeclaration } from '@worm-print-platform/core';
8
8
  import type { PrintBusinessField } from '@worm-print-platform/core/designer';
9
+ import type { FieldDisplayMode } from '@worm-print-platform/plugin-kit/expression-editor';
9
10
  import type { DesignerStore } from '../core/store';
10
11
  /** 外壳局部 UI 状态(不落模板数据,仅影响渲染) */
11
12
  export interface ShellState {
@@ -23,6 +24,8 @@ export interface ShellState {
23
24
  openMore?: boolean;
24
25
  /** 字段搜索关键字(仅影响左栏字段树) */
25
26
  fieldSearch?: string;
27
+ /** 宿主注入的字段行显示模式(field-display attribute / property),缺省 both */
28
+ fieldDisplay?: FieldDisplayMode;
26
29
  /** 折叠的字段分组 key */
27
30
  collapsedGroups: Set<string>;
28
31
  /** 最近一次复制成功的字段 key:素材台行内「已复制」提示,1.2s 后清空重绘(对齐 canvas) */
@@ -73,7 +76,7 @@ export declare function tbIconBtn(ctx: ShellCtx, iconName: string, action: strin
73
76
  danger?: boolean;
74
77
  arg?: unknown;
75
78
  test?: string;
76
- }): import("../core/h").El;
79
+ }): import("@worm-print-platform/plugin-kit/dom").El;
77
80
  /** 下拉壳:触发钮 + 面板,面板内容由调用方给出(对应 Vue 3 轨 的 ToolbarDropdown) */
78
81
  export declare function dropdown(ctx: ShellCtx, id: string, opts: {
79
82
  tip: string;
@@ -83,7 +86,7 @@ export declare function dropdown(ctx: ShellCtx, id: string, opts: {
83
86
  disabled?: boolean;
84
87
  testId?: string;
85
88
  panelClass?: string;
86
- }, panel: unknown[]): import("../core/h").El;
89
+ }, panel: unknown[]): import("@worm-print-platform/plugin-kit/dom").El;
87
90
  /** 步进数字输入(对应 Vue 3 轨 的 property/StepperInput) */
88
91
  export declare function stepper(opts: {
89
92
  value?: number;
@@ -93,13 +96,13 @@ export declare function stepper(opts: {
93
96
  placeholder?: string;
94
97
  disabled?: boolean;
95
98
  onCommit: (v: number) => void;
96
- }): import("../core/h").El;
99
+ }): import("@worm-print-platform/plugin-kit/dom").El;
97
100
  /** 属性行:pd-field > pd-label(.pd-label-t + 恢复默认值) + 控件 */
98
- export declare function field(label: string, control: unknown, hint?: string, reset?: unknown): import("../core/h").El;
101
+ export declare function field(label: string, control: unknown, hint?: string, reset?: unknown): import("@worm-print-platform/plugin-kit/dom").El;
99
102
  /** 字段说明图标:说明不常驻行内,悬浮或点击聚焦时才浮出(对应 Vue 3 轨 的 button.pd-help) */
100
- export declare const labelHelp: (tip: string) => import("../core/h").El;
103
+ export declare const labelHelp: (tip: string) => import("@worm-print-platform/plugin-kit/dom").El;
101
104
  /** 带说明图标的属性行:与 field() 同结构,差别只在说明挂图标而非常驻 .pd-hint 段落 */
102
- export declare function fieldHelp(label: string, control: unknown, tip: string, reset?: unknown): import("../core/h").El;
105
+ export declare function fieldHelp(label: string, control: unknown, tip: string, reset?: unknown): import("@worm-print-platform/plugin-kit/dom").El;
103
106
  /**
104
107
  * 「恢复默认值」按钮,与 Vue 3 轨的 property/ResetButton.vue 逐字同构。
105
108
  * 落点派生自 base[propKey]:判据一律 === 比出厂值,base 里取到 undefined 即「未设」,
@@ -122,18 +125,18 @@ export declare function resetButton(o: {
122
125
  onReset?: () => void;
123
126
  /** 多选批量档:不显示"已改"脏点(判据取自单格会误导),但按钮恒可点,写回整选区 */
124
127
  force?: boolean;
125
- }): import("../core/h").El;
128
+ }): import("@worm-print-platform/plugin-kit/dom").El;
126
129
  /** 分节标题(对应 Vue 3 轨 的 h3.pd-divider) */
127
- export declare const divider: (text: string) => import("../core/h").El;
130
+ export declare const divider: (text: string) => import("@worm-print-platform/plugin-kit/dom").El;
128
131
  /** 颜色触发钮:预设色板面板(移植 Vue 3 轨的 PresetColorPicker.vue,面板实现见 shell/color-picker.ts)。
129
132
  * onPick 收到的 undefined 表示「清除颜色」:Vue 3 轨侧 emit '' 后由消费方归一化为未设置,
130
133
  * 本包在触发器层直接归一后透传,调用方 patch 即删除该颜色属性(签名保持 (v: string) 不变)。 */
131
- export declare function colorTrigger(value: string | undefined, onPick: (v: string) => void, title?: string, triggerClass?: string): import("../core/h").El;
134
+ export declare function colorTrigger(value: string | undefined, onPick: (v: string) => void, title?: string, triggerClass?: string): import("@worm-print-platform/plugin-kit/dom").El;
132
135
  /** 单选组(对应 Vue 3 轨 的 .pd-radio-group) */
133
136
  export declare function radioGroup(name: string, options: {
134
137
  value: string;
135
138
  label: string;
136
- }[], current: string, onChange: (v: string) => void, twoCol?: boolean): import("../core/h").El;
139
+ }[], current: string, onChange: (v: string) => void, twoCol?: boolean): import("@worm-print-platform/plugin-kit/dom").El;
137
140
  /**
138
141
  * 裸下拉(无 label 包裹,用于 .border-style-row 这类横向控件行)。
139
142
  * 不能只靠 <option selected> 属性:happy-dom/部分内核在"首项未选中、第三项选中"时会回落到第二项,
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -26,4 +26,4 @@ export interface CropAnchorOpts {
26
26
  onCommit: (value: string | undefined) => void;
27
27
  onScaleCommit: (value: number | undefined) => void;
28
28
  }
29
- export declare function cropAnchorField(ctx: ShellCtx, o: CropAnchorOpts): import("../core/h").El;
29
+ export declare function cropAnchorField(ctx: ShellCtx, o: CropAnchorOpts): import("@worm-print-platform/plugin-kit/dom").El;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -25,6 +25,6 @@ export declare function positionLabel(o: {
25
25
  width: number;
26
26
  height: number;
27
27
  }): string;
28
- export declare function renderDesignElement(ctx: ShellCtx, el: RuntimeElement, followMemberIds?: Set<string>): import("../core/h").El;
28
+ export declare function renderDesignElement(ctx: ShellCtx, el: RuntimeElement, followMemberIds?: Set<string>): import("@worm-print-platform/plugin-kit/dom").El;
29
29
  /** mm → px(供画布几何换算复用同一口径) */
30
30
  export { mmToPx };
@@ -1,33 +1,8 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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 { PrintBusinessField } from '@worm-print-platform/core/designer';
8
- import type { El } from '../core/h';
9
- export interface ExpressionEditorTarget {
10
- /** 元素 id(表格单元格时用于定位) */
11
- elementId: string;
12
- /** 要写回的目标路径,如 'options.formatter' 或 'cell:<rowId>:<colIndex>' */
13
- targetPath: string;
14
- /** 当前表达式文本 */
15
- value: string;
16
- /** 可选:字段绑定模式的初始字段 key */
17
- binding?: string;
18
- }
19
- export interface ExpressionEditorOptions {
20
- fields: PrintBusinessField[];
21
- /** 求值预览用的样例行数据 */
22
- demoData?: Record<string, any>;
23
- /** 关闭弹窗 */
24
- onClose: () => void;
25
- /** 点确定:把最终表达式回写 */
26
- onApply: (next: {
27
- formatter?: string;
28
- binding?: string;
29
- title?: string;
30
- }) => void;
31
- }
32
- /** 渲染表达式编辑器弹窗的 DOM 描述(内部已含遮罩层,render 进 shadow 根下即可) */
33
- export declare function renderExpressionEditor(opts: ExpressionEditorOptions, target: ExpressionEditorTarget): El;
7
+ export { renderExpressionEditor, normalizeFieldDisplay } from '@worm-print-platform/plugin-kit/expression-editor';
8
+ export type { ExpressionEditorTarget, ExpressionEditorOptions, FieldDisplayMode } from '@worm-print-platform/plugin-kit/expression-editor';
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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,4 +9,4 @@ import type { DesignerStore } from '../core/store';
9
9
  /** 与 Vue 3 轨 FlowListElement 的 DESIGN_FALLBACK_ITEMS 逐字一致:新拖入的元素也要看得见形状 */
10
10
  export declare const FLOW_LIST_DEMO_ITEMS: string[];
11
11
  export declare function flowListCells(el: RuntimeElement, data?: Record<string, any>[]): string[];
12
- export declare function renderFlowListElement(el: RuntimeElement, data?: Record<string, any>[], store?: DesignerStore): import("../core/h").El;
12
+ 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.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -10,6 +10,6 @@ import type { FormatToolbar } from '../core/format';
10
10
  type FormatCtx = ShellCtx & {
11
11
  format: FormatToolbar;
12
12
  };
13
- export declare function renderFormatBar(ctx: FormatCtx): import("../core/h").El;
13
+ export declare function renderFormatBar(ctx: FormatCtx): import("@worm-print-platform/plugin-kit/dom").El;
14
14
  /** 供状态栏/属性面板复用的排版行(保持与 Vue 3 轨同类名) */
15
15
  export { field as formatField };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -15,6 +15,6 @@ export declare const ELEMENT_TYPES: {
15
15
  label: string;
16
16
  icon: string;
17
17
  }[];
18
- export declare function renderLeftPanel(ctx: ShellCtx): import("../core/h").El;
19
- export declare function renderPageTabs(ctx: ShellCtx): import("../core/h").El;
20
- export declare function renderStatusBar(ctx: ShellCtx): import("../core/h").El;
18
+ export declare function renderLeftPanel(ctx: ShellCtx): import("@worm-print-platform/plugin-kit/dom").El;
19
+ export declare function renderPageTabs(ctx: ShellCtx): import("@worm-print-platform/plugin-kit/dom").El;
20
+ export declare function renderStatusBar(ctx: ShellCtx): import("@worm-print-platform/plugin-kit/dom").El;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -21,7 +21,7 @@ export declare const TOOLBAR_UNITS: ToolbarUnitDef[];
21
21
  * 「更多」分组节点:触发钮 + 常驻面板(收起时 .is-hidden,不能用条件渲染,
22
22
  * 否则落位槽不存在,被收纳的单元会退回行内显示)。
23
23
  */
24
- export declare function renderMoreGroup(ctx: ShellCtx): import("../core/h").El;
24
+ export declare function renderMoreGroup(ctx: ShellCtx): import("@worm-print-platform/plugin-kit/dom").El;
25
25
  export declare function applyToolbarOverflow(scope: ParentNode): {
26
26
  movedIds: string[];
27
27
  overflowRemains: boolean;
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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 { ShellCtx } from './controls';
8
- export declare function renderToolbar(ctx: ShellCtx, formatSection: unknown): import("../core/h").El;
8
+ export declare function renderToolbar(ctx: ShellCtx, formatSection: unknown): import("@worm-print-platform/plugin-kit/dom").El;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
package/dist/version.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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.5.3";
8
+ export declare const CANVAS_VERSION = "1.6.0";
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @worm-print-platform/canvas v1.5.3
2
+ * @worm-print-platform/canvas v1.6.0
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worm-print-platform/canvas",
3
- "version": "1.5.3",
3
+ "version": "1.6.0",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -54,8 +54,8 @@
54
54
  "pretest": "npm run typecheck"
55
55
  },
56
56
  "dependencies": {
57
- "@worm-print-platform/core": "^1.5.3",
58
- "@worm-print-platform/plugin-kit": "^1.5.3",
57
+ "@worm-print-platform/core": "^1.6.0",
58
+ "@worm-print-platform/plugin-kit": "^1.6.0",
59
59
  "dompurify": "^3.4.12",
60
60
  "jsbarcode": "^3.12.3",
61
61
  "qrcode": "^1.5.4"