@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.
- package/README.md +9 -3
- package/dist/browser-bundle.d.ts +1 -1
- package/dist/canvas.css +1 -1
- package/dist/canvas.js +75 -63
- 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 +3 -17
- package/dist/core/icons.d.ts +1 -1
- package/dist/core/plugin.d.ts +1 -1
- package/dist/core/store.d.ts +1 -1
- package/dist/host-contract.d.ts +9 -3
- package/dist/index.cjs +22 -10
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1712 -1666
- package/dist/print-designer.d.ts +7 -3
- package/dist/shell/binding.d.ts +2 -2
- package/dist/shell/canvas.d.ts +2 -2
- package/dist/shell/code.d.ts +3 -3
- package/dist/shell/color-picker.d.ts +3 -39
- package/dist/shell/controls.d.ts +14 -11
- package/dist/shell/crop-anchor.d.ts +2 -2
- package/dist/shell/elements.d.ts +2 -2
- package/dist/shell/expression-editor.d.ts +3 -28
- package/dist/shell/flow-list.d.ts +2 -2
- package/dist/shell/font-select.d.ts +1 -1
- package/dist/shell/format-bar.d.ts +2 -2
- package/dist/shell/help-content/advanced-settings.d.ts +1 -1
- package/dist/shell/help-content/changelog.d.ts +1 -1
- package/dist/shell/help-content/faq.d.ts +1 -1
- package/dist/shell/help-content/features.d.ts +1 -1
- package/dist/shell/help-content/getting-started.d.ts +1 -1
- package/dist/shell/help-content/index.d.ts +1 -1
- package/dist/shell/help-content/shortcuts.d.ts +1 -1
- package/dist/shell/help-modal.d.ts +1 -1
- package/dist/shell/page-extras.d.ts +1 -1
- package/dist/shell/panels.d.ts +4 -4
- 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 +2 -2
- package/dist/shell/toolbar.d.ts +2 -2
- package/dist/shell/watermark.d.ts +1 -1
- package/dist/theme-tokens.d.ts +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/vue3/PrintDesigner.d.ts +1 -1
- package/dist/vue3/PrintHtmlPreview.d.ts +1 -1
- package/dist/vue3/index.d.ts +1 -1
- package/dist/vue3/previewStyle.d.ts +1 -1
- package/dist/vue3/toolbarOverflow.d.ts +1 -1
- package/package.json +3 -3
package/dist/core/format.d.ts
CHANGED
package/dist/core/h.d.ts
CHANGED
|
@@ -1,22 +1,8 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/canvas v1.
|
|
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
|
-
export
|
|
8
|
-
export
|
|
9
|
-
node: Node;
|
|
10
|
-
}
|
|
11
|
-
export interface El {
|
|
12
|
-
tag: string;
|
|
13
|
-
props: Record<string, unknown>;
|
|
14
|
-
children: unknown[];
|
|
15
|
-
}
|
|
16
|
-
/** h('div', { class, style, onClick, html, ... }, [...]) */
|
|
17
|
-
export declare function h(tag: string, props?: Record<string, unknown>, children?: unknown[]): El;
|
|
18
|
-
export declare function render(node: El | string | Node, parent: Element | ShadowRoot): Element | Text;
|
|
19
|
-
/** 清空容器(重渲染前调用) */
|
|
20
|
-
export declare function clear(node: Element | ShadowRoot): void;
|
|
21
|
-
export declare function mm(v: number): string;
|
|
22
|
-
export declare const SVG_NS_CONST = "http://www.w3.org/2000/svg";
|
|
7
|
+
export { h, render, clear, mm, SVG_NS_CONST } from '@worm-print-platform/plugin-kit/dom';
|
|
8
|
+
export type { AttrValue, Child, El } from '@worm-print-platform/plugin-kit/dom';
|
package/dist/core/icons.d.ts
CHANGED
package/dist/core/plugin.d.ts
CHANGED
package/dist/core/store.d.ts
CHANGED
package/dist/host-contract.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-print-platform/canvas v1.
|
|
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 { MultiPageTemplateData, PrintBusinessField, TemplateData } from '@worm-print-platform/core/designer';
|
|
8
8
|
import type { PrintFontDeclaration } from '@worm-print-platform/core';
|
|
9
|
+
import type { FieldDisplayMode } from '@worm-print-platform/plugin-kit/expression-editor';
|
|
9
10
|
/** 宿主契约版本;每次改动可观察面必须同步升号 */
|
|
10
|
-
export declare const PRINT_DESIGNER_CONTRACT_VERSION = "1.
|
|
11
|
+
export declare const PRINT_DESIGNER_CONTRACT_VERSION = "1.3.0";
|
|
11
12
|
/** 自定义元素标签名 */
|
|
12
13
|
export declare const PRINT_DESIGNER_TAG: "print-designer";
|
|
13
14
|
/** 会触发 attributeChangedCallback 的声明式 attribute(字符串形态) */
|
|
14
|
-
export declare const PRINT_DESIGNER_ATTRIBUTES: readonly ["template", "fields", "name", "fonts", "design-data", "theme", "theme-config"];
|
|
15
|
+
export declare const PRINT_DESIGNER_ATTRIBUTES: readonly ["template", "fields", "name", "fonts", "design-data", "theme", "theme-config", "field-display"];
|
|
15
16
|
export type PrintDesignerAttribute = typeof PRINT_DESIGNER_ATTRIBUTES[number];
|
|
16
17
|
/** 只走 property 的开关(不进 observedAttributes,写 setAttribute 只影响样式/语义) */
|
|
17
18
|
export declare const PRINT_DESIGNER_BOOLEAN_ATTRIBUTES: readonly ["is-edit", "show-help", "show-preview", "show-save"];
|
|
@@ -44,6 +45,11 @@ export interface PrintDesignerProperties {
|
|
|
44
45
|
uploadImage?: (file: File) => Promise<string> | string;
|
|
45
46
|
/** 宿主提供的设计背景上传回调 */
|
|
46
47
|
uploadDesignBackground?: (file: File) => Promise<string> | string;
|
|
48
|
+
/**
|
|
49
|
+
* 素材台字段行与表达式弹窗「字段」页签的显示模式:'label' 只显中文名 / 'key' 只显 key / 'both' 两者(默认)。
|
|
50
|
+
* 分组名、搜索、复制、插入与拖拽语义不受影响;非法值静默回退 both。
|
|
51
|
+
*/
|
|
52
|
+
fieldDisplay: FieldDisplayMode;
|
|
47
53
|
}
|
|
48
54
|
/** 方法的返回类型契约 */
|
|
49
55
|
export interface PrintDesignerMethods {
|