@worm-vue3-print/common 1.3.7-beta.0 → 1.4.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 +189 -11
- package/dist/browser-bundle.d.ts +3 -1
- package/dist/common.css +65 -1
- package/dist/common.js +184 -77
- package/dist/core/default-template.d.ts +1 -1
- package/dist/core/format.d.ts +34 -14
- package/dist/core/h.d.ts +1 -1
- package/dist/core/icons.d.ts +1 -1
- package/dist/core/store.d.ts +1 -1
- package/dist/index.cjs +112 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3752 -3113
- package/dist/print-designer.d.ts +11 -6
- 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 +42 -5
- package/dist/shell/crop-anchor.d.ts +29 -0
- package/dist/shell/elements.d.ts +3 -3
- package/dist/shell/expression-editor.d.ts +1 -1
- package/dist/shell/flow-list.d.ts +11 -0
- package/dist/shell/font-select.d.ts +4 -4
- package/dist/shell/format-bar.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 +4 -3
- package/dist/shell/panels.d.ts +1 -1
- package/dist/shell/prop-group.d.ts +1 -1
- package/dist/shell/property-panel.d.ts +4 -3
- 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 +1 -1
- package/dist/shell/toolbar.d.ts +1 -1
- package/dist/shell/watermark.d.ts +3 -2
- package/package.json +7 -3
- package/dist/core/font-catalog.d.ts +0 -30
package/dist/core/format.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @worm-vue3-print/common v1.
|
|
2
|
+
* @worm-vue3-print/common v1.4.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, TextAlign, VerticalAlign, TableCellBorder } from '@worm-vue3-print/core/designer';
|
|
8
|
-
import { type BorderPreset } from '@worm-vue3-print/core/designer';
|
|
8
|
+
import { type BorderPreset, type ElementBorderSpec } from '@worm-vue3-print/core/designer';
|
|
9
9
|
import type { DesignerStore } from './store';
|
|
10
10
|
/** 多选目标间字段值不一致的哨兵 */
|
|
11
11
|
export declare const MIXED: unique symbol;
|
|
@@ -20,17 +20,25 @@ export interface FormatStylePatch {
|
|
|
20
20
|
textAlign?: TextAlign;
|
|
21
21
|
verticalAlign?: VerticalAlign;
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
style: string;
|
|
26
|
-
color: string;
|
|
27
|
-
}
|
|
23
|
+
/** 元素边框规格:类型与写入口径都在 core,本包不再自造一份 */
|
|
24
|
+
export type { ElementBorderSpec };
|
|
28
25
|
type BorderSide = 'top' | 'right' | 'bottom' | 'left';
|
|
29
26
|
export declare class FormatToolbar {
|
|
30
27
|
private store;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
/** 线型草稿:null = 一个格式都没选中(线型=无,点预设/单边即按「无」落盘) */
|
|
29
|
+
borderStyle: 'solid' | 'dashed' | 'dotted' | 'double' | null;
|
|
30
|
+
/** 多选/混合态允许留空;批写时按缺省档兜底 */
|
|
31
|
+
borderWidth: number | undefined;
|
|
32
|
+
borderColor: string | undefined;
|
|
33
|
+
/** 单元格四边规格不一致的字段:留空、不谎报;未选时批写按缺省档 */
|
|
34
|
+
borderMixed: {
|
|
35
|
+
style: boolean;
|
|
36
|
+
width: boolean;
|
|
37
|
+
color: boolean;
|
|
38
|
+
};
|
|
39
|
+
/** 最近一次已回读的单元格选区标识:只在新选区回填,避免每次重绘冲掉用户草稿 */
|
|
40
|
+
private borderDraftKey;
|
|
41
|
+
get borderMixedAny(): boolean;
|
|
34
42
|
painterActive: boolean;
|
|
35
43
|
painterLocked: boolean;
|
|
36
44
|
painterSource: string | null;
|
|
@@ -67,8 +75,19 @@ export declare class FormatToolbar {
|
|
|
67
75
|
private toggleDecoration;
|
|
68
76
|
toggleUnderline(): void;
|
|
69
77
|
toggleStrike(): void;
|
|
70
|
-
/**
|
|
78
|
+
/**
|
|
79
|
+
* 单元格上下文的三行回读:单格取该格真实规格(四边不一致的字段留空并标 mixed);
|
|
80
|
+
* 多选按上一轮口径不取单格,落缺省档作批写源。只在选区变化时回填,用户改草稿不会被打断。
|
|
81
|
+
*/
|
|
82
|
+
syncBorderDraft(): void;
|
|
83
|
+
/** 当前面板草稿对应的边框规格(Vue 版组件内 borderSpec());混合/留空项按缺省档兜底 */
|
|
71
84
|
borderSpec(): TableCellBorder;
|
|
85
|
+
setBorderWidth(v: number | undefined): void;
|
|
86
|
+
setBorderColor(v: string | undefined): void;
|
|
87
|
+
/** 单元格批写落盘后本次规格已统一:混合标记与留空项落定为实际写入值 */
|
|
88
|
+
private settleBorderDraft;
|
|
89
|
+
/** 再点已选中的线型=取消该格式(图标全不亮=线型无) */
|
|
90
|
+
toggleBorderStyle(key: 'solid' | 'dashed' | 'dotted' | 'double'): void;
|
|
72
91
|
private applyElementBorder;
|
|
73
92
|
private applyCellBorderPreset;
|
|
74
93
|
private applyCellBorderEdges;
|
|
@@ -76,14 +95,16 @@ export declare class FormatToolbar {
|
|
|
76
95
|
get cellEdges(): Record<BorderSide, MixedOr<boolean>> | null;
|
|
77
96
|
/** 单边切换:未全有则补齐该边,全有再点则移除该边(与 Word/WPS 一致) */
|
|
78
97
|
private toggleCellEdge;
|
|
79
|
-
/**
|
|
98
|
+
/** 元素选中集的分边激活态:看「这条边到底有没有线」(整圈生效=四边都有),与属性台勾选框同一判据 */
|
|
80
99
|
get elementEdges(): Record<BorderSide, MixedOr<boolean>> | null;
|
|
81
|
-
/**
|
|
100
|
+
/** 元素分边切换:勾上用面板草稿;整圈生效时撤一边会把其余三边展开成分边 */
|
|
82
101
|
private toggleElementEdge;
|
|
83
102
|
/** 边框预设(Vue 版组件 onPreset 的路由口径):单元格上下文走表格预设,否则走元素整圈 */
|
|
84
103
|
applyBorderPreset(preset: BorderPreset): void;
|
|
85
104
|
/** 单边按钮(Vue 版组件 onEdge 的路由口径):按上下文落到单元格边或元素分边 */
|
|
86
105
|
applyEdge(side: BorderSide): void;
|
|
106
|
+
/** 撤掉一条边(线型=无时工具栏的单边走这条):整圈生效时其余三边展开成单边 */
|
|
107
|
+
private clearElementEdge;
|
|
87
108
|
/** 单边按下态(Vue 版组件 edgeOn 口径) */
|
|
88
109
|
edgeOn(side: BorderSide): boolean;
|
|
89
110
|
/** 仅选中单个未锁定元素时可作为格式源 */
|
|
@@ -99,4 +120,3 @@ export declare class FormatToolbar {
|
|
|
99
120
|
/** Esc 退出连续刷:shell 绑定 keydown 后转发(输入控件聚焦时忽略,与 Vue 版一致) */
|
|
100
121
|
handlePainterKeydown(e: KeyboardEvent): void;
|
|
101
122
|
}
|
|
102
|
-
export {};
|
package/dist/core/h.d.ts
CHANGED
package/dist/core/icons.d.ts
CHANGED
package/dist/core/store.d.ts
CHANGED