@worm-vue3-print/canvas 1.2.1 → 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 +12 -5
- package/dist/canvas.css +1 -1
- package/dist/components/CanvasArea.vue.d.ts +10 -7
- package/dist/components/CanvasPaper.vue.d.ts +3 -3
- package/dist/components/DesignerToolbar.vue.d.ts +0 -4
- package/dist/components/ExpressionEditor.vue.d.ts +1 -1
- package/dist/components/FieldTreePanel.vue.d.ts +1 -1
- package/dist/components/LayerPanel.vue.d.ts +1 -1
- package/dist/components/LeftPanel.vue.d.ts +1 -1
- package/dist/components/PageTabs.vue.d.ts +26 -0
- package/dist/components/PresetColorPicker.vue.d.ts +5 -1
- package/dist/components/PrintDesigner.vue.d.ts +21 -5
- package/dist/components/PrintHtmlPreview.vue.d.ts +8 -2
- package/dist/components/PropertyPanel.vue.d.ts +3 -1
- package/dist/components/WatermarkConfig.vue.d.ts +1 -1
- package/dist/components/elements/BarcodeElement.vue.d.ts +1 -1
- package/dist/components/elements/BaseElement.vue.d.ts +3 -3
- package/dist/components/elements/CellBarcode.vue.d.ts +14 -0
- package/dist/components/elements/HtmlElement.vue.d.ts +1 -1
- package/dist/components/elements/ImageElement.vue.d.ts +1 -1
- package/dist/components/elements/LineElement.vue.d.ts +1 -1
- package/dist/components/elements/LongTextElement.vue.d.ts +1 -1
- package/dist/components/elements/PageNumberElement.vue.d.ts +1 -1
- package/dist/components/elements/QrcodeElement.vue.d.ts +1 -1
- package/dist/components/elements/ShapeElement.vue.d.ts +1 -1
- package/dist/components/elements/TableContextMenu.vue.d.ts +1 -1
- package/dist/components/elements/TableElement.vue.d.ts +1 -1
- package/dist/components/elements/TextElement.vue.d.ts +1 -1
- package/dist/components/property/AdvancedGroup.vue.d.ts +1 -1
- package/dist/components/property/AppearanceGroup.vue.d.ts +1 -1
- package/dist/components/property/BindingControl.vue.d.ts +1 -1
- package/dist/components/property/BorderBgGroup.vue.d.ts +1 -1
- package/dist/components/property/CodeGroup.vue.d.ts +1 -1
- package/dist/components/property/DesignBackgroundConfig.vue.d.ts +11 -0
- package/dist/components/property/FontSelect.vue.d.ts +15 -0
- package/dist/components/property/PaginationGroup.vue.d.ts +1 -1
- package/dist/components/property/PositionSizeGroup.vue.d.ts +1 -1
- package/dist/components/property/TableCellGroup.vue.d.ts +1 -1
- package/dist/components/property/TableRowGroup.vue.d.ts +1 -1
- package/dist/components/property/TableSettingsGroup.vue.d.ts +1 -1
- package/dist/components/property/TilingConfig.vue.d.ts +14 -0
- package/dist/composables/useAdsorb.d.ts +3 -7
- package/dist/composables/useAdsorbManager.d.ts +2 -2
- package/dist/composables/useClipboard.d.ts +37 -15
- package/dist/composables/useDesignerState.d.ts +1453 -47
- package/dist/composables/useDocumentFontFace.d.ts +2 -0
- package/dist/composables/useDrag.d.ts +1 -1
- package/dist/composables/useFontCatalog.d.ts +30 -0
- package/dist/composables/useGuides.d.ts +1 -1
- package/dist/composables/useHistory.d.ts +5 -1
- package/dist/composables/useHostAdapter.d.ts +6 -1
- package/dist/composables/useSelection.d.ts +1 -1
- package/dist/composables/useShrinkFit.d.ts +6 -0
- package/dist/composables/useTableSelection.d.ts +1 -1
- package/dist/index.cjs +66 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +5284 -4701
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/composables/useAlign.d.ts +0 -5
- package/dist/composables/useBindingDisplay.d.ts +0 -11
- package/dist/composables/useGroup.d.ts +0 -7
- package/dist/composables/useKeyboard.d.ts +0 -22
- package/dist/composables/useResize.d.ts +0 -26
- package/dist/render/browser-code-renderer.d.ts +0 -3
- package/dist/render/browser-pagination.d.ts +0 -17
- package/dist/types.d.ts +0 -287
- package/dist/utils/binding-registry.d.ts +0 -8
- package/dist/utils/binding.d.ts +0 -16
- package/dist/utils/default-config.d.ts +0 -13
- package/dist/utils/demo-data.d.ts +0 -2
- package/dist/utils/element-factory.d.ts +0 -4
- package/dist/utils/engine.d.ts +0 -2
- package/dist/utils/expression-eval.d.ts +0 -30
- package/dist/utils/field-groups.d.ts +0 -21
- package/dist/utils/migrate.d.ts +0 -2
- package/dist/utils/preset-colors.d.ts +0 -2
- package/dist/utils/property-search.d.ts +0 -18
- package/dist/utils/ruler.d.ts +0 -29
- package/dist/utils/scale.d.ts +0 -15
- package/dist/utils/table-matrix.d.ts +0 -69
- package/dist/utils/units.d.ts +0 -6
- package/dist/utils/zone-layout.d.ts +0 -27
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DesignBackground } from '@worm-vue3-print/core/designer';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue?: DesignBackground;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: DesignBackground | undefined) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
"onUpdate:modelValue"?: ((value: DesignBackground | undefined) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** 当前族名;undefined 表示未设置,走全局兜底字体栈 */
|
|
3
|
+
modelValue?: string;
|
|
4
|
+
/** 空值行文案(同时用作输入框 placeholder) */
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
"update:model-value": (value: string | undefined) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
10
|
+
"onUpdate:model-value"?: ((value: string | undefined) => any) | undefined;
|
|
11
|
+
}>, {
|
|
12
|
+
placeholder: string;
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RuntimeElement, TableSelection, PrintBusinessField } from '
|
|
1
|
+
import type { RuntimeElement, TableSelection, PrintBusinessField } from '@worm-vue3-print/core/designer';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
element: RuntimeElement;
|
|
4
4
|
selection: TableSelection;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TemplateData } from '@worm-vue3-print/core/designer';
|
|
2
|
+
import type { TilingOptions } from '@worm-vue3-print/core';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
modelValue?: TilingOptions;
|
|
5
|
+
/** 完整模板:校验与摘要都需要标签纸尺寸/朝向,必须传 */
|
|
6
|
+
templateData?: TemplateData;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: TilingOptions) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
"onUpdate:modelValue"?: ((value: TilingOptions) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { type Ref } from 'vue';
|
|
2
|
-
import type
|
|
3
|
-
export
|
|
4
|
-
adsorbMin?: number;
|
|
5
|
-
adsorbLineMin?: number;
|
|
6
|
-
showAdsorbLine?: boolean;
|
|
7
|
-
}
|
|
2
|
+
import { type AdsorbConfig, type ElementRect, type AlignLine, type AdsorbResult } from '@worm-vue3-print/core/designer';
|
|
3
|
+
export type { AdsorbConfig };
|
|
8
4
|
export declare function useAdsorb(config?: AdsorbConfig): {
|
|
9
|
-
check: (movingRect: ElementRect, others: ElementRect[],
|
|
5
|
+
check: (movingRect: ElementRect, others: ElementRect[], guides?: {
|
|
10
6
|
vertical: number[];
|
|
11
7
|
horizontal: number[];
|
|
12
8
|
}) => AdsorbResult;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RuntimeElement, ElementRect, AdsorbResult } from '
|
|
1
|
+
import type { RuntimeElement, ElementRect, AdsorbResult } from '@worm-vue3-print/core/designer';
|
|
2
2
|
import { type AdsorbConfig } from './useAdsorb';
|
|
3
3
|
export interface AdsorbManagerOptions {
|
|
4
4
|
getElements: () => RuntimeElement[];
|
|
@@ -17,7 +17,7 @@ export interface AdsorbManagerOptions {
|
|
|
17
17
|
export declare function useAdsorbManager(options: AdsorbManagerOptions): {
|
|
18
18
|
requestAdsorb: (movingRect: ElementRect) => AdsorbResult;
|
|
19
19
|
clearGuides: () => void;
|
|
20
|
-
guideLines: import("vue").Ref<import("
|
|
20
|
+
guideLines: import("vue").Ref<import("@worm-vue3-print/core/designer").AlignLine[], import("@worm-vue3-print/core/designer").AlignLine[]>;
|
|
21
21
|
paperSize: import("vue").Ref<{
|
|
22
22
|
width: number;
|
|
23
23
|
height: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { RuntimeElement, PrintElementData } from '
|
|
1
|
+
import type { RuntimeElement, PrintElementData } from '@worm-vue3-print/core/designer';
|
|
2
2
|
export declare function useClipboard(): {
|
|
3
3
|
clipboard: import("vue").Ref<{
|
|
4
4
|
id?: string | undefined;
|
|
5
|
-
type?: import("
|
|
5
|
+
type?: import("@worm-vue3-print/core/designer").ElementType | undefined;
|
|
6
6
|
options: {
|
|
7
7
|
left: number;
|
|
8
8
|
top: number;
|
|
@@ -15,10 +15,13 @@ export declare function useClipboard(): {
|
|
|
15
15
|
fontFamily?: string | undefined;
|
|
16
16
|
color?: string | undefined;
|
|
17
17
|
backgroundColor?: string | undefined;
|
|
18
|
-
textAlign?: import("
|
|
19
|
-
verticalAlign?: import("
|
|
18
|
+
textAlign?: import("@worm-vue3-print/core/designer").TextAlign | undefined;
|
|
19
|
+
verticalAlign?: import("@worm-vue3-print/core/designer").VerticalAlign | undefined;
|
|
20
20
|
lineHeight?: number | undefined;
|
|
21
21
|
letterSpacing?: number | undefined;
|
|
22
|
+
textFit?: import("@worm-vue3-print/core").TextFit | undefined;
|
|
23
|
+
shrinkMinFontSize?: number | undefined;
|
|
24
|
+
wordWrap?: boolean | undefined;
|
|
22
25
|
fixed?: boolean | undefined;
|
|
23
26
|
locked?: boolean | undefined;
|
|
24
27
|
visible?: boolean | undefined;
|
|
@@ -34,9 +37,12 @@ export declare function useClipboard(): {
|
|
|
34
37
|
barcodeType?: string | undefined;
|
|
35
38
|
barWidth?: number | undefined;
|
|
36
39
|
barAutoWidth?: string | undefined;
|
|
40
|
+
printerDpi?: number | undefined;
|
|
37
41
|
qrCodeLevel?: string | undefined;
|
|
38
42
|
src?: string | undefined;
|
|
39
43
|
fit?: string | undefined;
|
|
44
|
+
maxWidth?: number | undefined;
|
|
45
|
+
maxHeight?: number | undefined;
|
|
40
46
|
hideTitle?: boolean | undefined;
|
|
41
47
|
draggable?: boolean | undefined;
|
|
42
48
|
axis?: string | undefined;
|
|
@@ -53,20 +59,23 @@ export declare function useClipboard(): {
|
|
|
53
59
|
tableMode?: "dynamic" | "static" | undefined;
|
|
54
60
|
tableRows?: {
|
|
55
61
|
id: string;
|
|
56
|
-
type: import("
|
|
62
|
+
type: import("@worm-vue3-print/core/designer").TableRowType;
|
|
57
63
|
height: number;
|
|
58
64
|
repeatOnPage?: boolean | undefined;
|
|
59
65
|
cells: {
|
|
60
66
|
id: string;
|
|
61
67
|
formatter?: string | undefined;
|
|
62
|
-
cellType?: import("
|
|
68
|
+
cellType?: import("@worm-vue3-print/core/designer").TableCellType | undefined;
|
|
63
69
|
barcodeType?: string | undefined;
|
|
64
70
|
qrCodeLevel?: string | undefined;
|
|
65
71
|
showBarcodeText?: boolean | undefined;
|
|
72
|
+
printerDpi?: number | undefined;
|
|
73
|
+
barWidth?: number | undefined;
|
|
74
|
+
barFontSize?: number | undefined;
|
|
66
75
|
rowspan?: number | undefined;
|
|
67
76
|
colspan?: number | undefined;
|
|
68
77
|
merged?: boolean | undefined;
|
|
69
|
-
align?: import("
|
|
78
|
+
align?: import("@worm-vue3-print/core/designer").TextAlign | undefined;
|
|
70
79
|
valign?: "top" | "middle" | "bottom" | undefined;
|
|
71
80
|
fontFamily?: string | undefined;
|
|
72
81
|
fontSize?: number | undefined;
|
|
@@ -97,6 +106,8 @@ export declare function useClipboard(): {
|
|
|
97
106
|
} | undefined;
|
|
98
107
|
padding?: number | undefined;
|
|
99
108
|
wordWrap?: boolean | undefined;
|
|
109
|
+
textFit?: import("@worm-vue3-print/core").TextFit | undefined;
|
|
110
|
+
shrinkMinFontSize?: number | undefined;
|
|
100
111
|
fit?: "contain" | "cover" | "fill" | "none" | "scale-down" | undefined;
|
|
101
112
|
maxWidth?: number | undefined;
|
|
102
113
|
maxHeight?: number | undefined;
|
|
@@ -120,14 +131,14 @@ export declare function useClipboard(): {
|
|
|
120
131
|
};
|
|
121
132
|
printElementType: {
|
|
122
133
|
title?: string | undefined;
|
|
123
|
-
type: import("
|
|
134
|
+
type: import("@worm-vue3-print/core/designer").ElementType;
|
|
124
135
|
editable?: boolean | undefined;
|
|
125
136
|
formatter?: string | undefined;
|
|
126
137
|
styler?: string | undefined;
|
|
127
138
|
};
|
|
128
139
|
}[] | null, PrintElementData[] | {
|
|
129
140
|
id?: string | undefined;
|
|
130
|
-
type?: import("
|
|
141
|
+
type?: import("@worm-vue3-print/core/designer").ElementType | undefined;
|
|
131
142
|
options: {
|
|
132
143
|
left: number;
|
|
133
144
|
top: number;
|
|
@@ -140,10 +151,13 @@ export declare function useClipboard(): {
|
|
|
140
151
|
fontFamily?: string | undefined;
|
|
141
152
|
color?: string | undefined;
|
|
142
153
|
backgroundColor?: string | undefined;
|
|
143
|
-
textAlign?: import("
|
|
144
|
-
verticalAlign?: import("
|
|
154
|
+
textAlign?: import("@worm-vue3-print/core/designer").TextAlign | undefined;
|
|
155
|
+
verticalAlign?: import("@worm-vue3-print/core/designer").VerticalAlign | undefined;
|
|
145
156
|
lineHeight?: number | undefined;
|
|
146
157
|
letterSpacing?: number | undefined;
|
|
158
|
+
textFit?: import("@worm-vue3-print/core").TextFit | undefined;
|
|
159
|
+
shrinkMinFontSize?: number | undefined;
|
|
160
|
+
wordWrap?: boolean | undefined;
|
|
147
161
|
fixed?: boolean | undefined;
|
|
148
162
|
locked?: boolean | undefined;
|
|
149
163
|
visible?: boolean | undefined;
|
|
@@ -159,9 +173,12 @@ export declare function useClipboard(): {
|
|
|
159
173
|
barcodeType?: string | undefined;
|
|
160
174
|
barWidth?: number | undefined;
|
|
161
175
|
barAutoWidth?: string | undefined;
|
|
176
|
+
printerDpi?: number | undefined;
|
|
162
177
|
qrCodeLevel?: string | undefined;
|
|
163
178
|
src?: string | undefined;
|
|
164
179
|
fit?: string | undefined;
|
|
180
|
+
maxWidth?: number | undefined;
|
|
181
|
+
maxHeight?: number | undefined;
|
|
165
182
|
hideTitle?: boolean | undefined;
|
|
166
183
|
draggable?: boolean | undefined;
|
|
167
184
|
axis?: string | undefined;
|
|
@@ -178,20 +195,23 @@ export declare function useClipboard(): {
|
|
|
178
195
|
tableMode?: "dynamic" | "static" | undefined;
|
|
179
196
|
tableRows?: {
|
|
180
197
|
id: string;
|
|
181
|
-
type: import("
|
|
198
|
+
type: import("@worm-vue3-print/core/designer").TableRowType;
|
|
182
199
|
height: number;
|
|
183
200
|
repeatOnPage?: boolean | undefined;
|
|
184
201
|
cells: {
|
|
185
202
|
id: string;
|
|
186
203
|
formatter?: string | undefined;
|
|
187
|
-
cellType?: import("
|
|
204
|
+
cellType?: import("@worm-vue3-print/core/designer").TableCellType | undefined;
|
|
188
205
|
barcodeType?: string | undefined;
|
|
189
206
|
qrCodeLevel?: string | undefined;
|
|
190
207
|
showBarcodeText?: boolean | undefined;
|
|
208
|
+
printerDpi?: number | undefined;
|
|
209
|
+
barWidth?: number | undefined;
|
|
210
|
+
barFontSize?: number | undefined;
|
|
191
211
|
rowspan?: number | undefined;
|
|
192
212
|
colspan?: number | undefined;
|
|
193
213
|
merged?: boolean | undefined;
|
|
194
|
-
align?: import("
|
|
214
|
+
align?: import("@worm-vue3-print/core/designer").TextAlign | undefined;
|
|
195
215
|
valign?: "top" | "middle" | "bottom" | undefined;
|
|
196
216
|
fontFamily?: string | undefined;
|
|
197
217
|
fontSize?: number | undefined;
|
|
@@ -222,6 +242,8 @@ export declare function useClipboard(): {
|
|
|
222
242
|
} | undefined;
|
|
223
243
|
padding?: number | undefined;
|
|
224
244
|
wordWrap?: boolean | undefined;
|
|
245
|
+
textFit?: import("@worm-vue3-print/core").TextFit | undefined;
|
|
246
|
+
shrinkMinFontSize?: number | undefined;
|
|
225
247
|
fit?: "contain" | "cover" | "fill" | "none" | "scale-down" | undefined;
|
|
226
248
|
maxWidth?: number | undefined;
|
|
227
249
|
maxHeight?: number | undefined;
|
|
@@ -245,7 +267,7 @@ export declare function useClipboard(): {
|
|
|
245
267
|
};
|
|
246
268
|
printElementType: {
|
|
247
269
|
title?: string | undefined;
|
|
248
|
-
type: import("
|
|
270
|
+
type: import("@worm-vue3-print/core/designer").ElementType;
|
|
249
271
|
editable?: boolean | undefined;
|
|
250
272
|
formatter?: string | undefined;
|
|
251
273
|
styler?: string | undefined;
|