@bluechaine/print-designer 0.1.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.en.md +154 -0
- package/README.md +151 -0
- package/README.zh-CN.md +5 -0
- package/dist/plugins/api-image.cjs +2 -0
- package/dist/plugins/api-image.cjs.map +1 -0
- package/dist/plugins/api-image.mjs +28 -0
- package/dist/plugins/api-image.mjs.map +1 -0
- package/dist/plugins/api-pdf.cjs +2 -0
- package/dist/plugins/api-pdf.cjs.map +1 -0
- package/dist/plugins/api-pdf.mjs +35 -0
- package/dist/plugins/api-pdf.mjs.map +1 -0
- package/dist/plugins/view-code-edit.cjs +11 -0
- package/dist/plugins/view-code-edit.cjs.map +1 -0
- package/dist/plugins/view-code-edit.mjs +55 -0
- package/dist/plugins/view-code-edit.mjs.map +1 -0
- package/dist/types/plugins/plugin-api-image/src/index.d.ts +11 -0
- package/dist/types/plugins/plugin-api-pdf/src/index.d.ts +15 -0
- package/dist/types/plugins/plugin-view-code-edit/src/index.d.ts +15 -0
- package/dist/types/src/components/Designer.vue.d.ts +2016 -0
- package/dist/types/src/components/DragBox.vue.d.ts +223 -0
- package/dist/types/src/components/Header.vue.d.ts +96 -0
- package/dist/types/src/components/JsonEditorModal.vue.d.ts +25 -0
- package/dist/types/src/components/Preview.vue.d.ts +27 -0
- package/dist/types/src/components/PrintDataEditorModal.vue.d.ts +86 -0
- package/dist/types/src/components/Ruler.vue.d.ts +16 -0
- package/dist/types/src/components/SvpIcon.vue.d.ts +31 -0
- package/dist/types/src/components/Toolbar.vue.d.ts +116 -0
- package/dist/types/src/components/panels/DraggableElsPanel.vue.d.ts +322 -0
- package/dist/types/src/components/panels/LocationExchangePanel.vue.d.ts +226 -0
- package/dist/types/src/components/panels/MiniMapPanel.vue.d.ts +278 -0
- package/dist/types/src/components/panels/PageHistoryPanel.vue.d.ts +345 -0
- package/dist/types/src/components/panels/PageStructurePanel.vue.d.ts +262 -0
- package/dist/types/src/components/panels/PageTabsPanel.vue.d.ts +267 -0
- package/dist/types/src/components/panels/PaperProperties.vue.d.ts +52 -0
- package/dist/types/src/components/panels/PropertiesPanel.vue.d.ts +225 -0
- package/dist/types/src/composables/useDesigner.d.ts +9 -0
- package/dist/types/src/composables/useDesignerUi.d.ts +2 -0
- package/dist/types/src/composables/useDragBox.d.ts +41 -0
- package/dist/types/src/composables/useRuler.d.ts +10 -0
- package/dist/types/src/constants/default-table-element.d.ts +151 -0
- package/dist/types/src/constants/header-elements.d.ts +3 -0
- package/dist/types/src/constants/icons.d.ts +61 -0
- package/dist/types/src/constants/panel-layout.d.ts +74 -0
- package/dist/types/src/constants.d.ts +37 -0
- package/dist/types/src/core/designer-options.d.ts +34 -0
- package/dist/types/src/core/designer-utils.d.ts +209 -0
- package/dist/types/src/core/hiprint-bridge.d.ts +24 -0
- package/dist/types/src/core/hiprint-paper-list.d.ts +20 -0
- package/dist/types/src/core/history-labels.d.ts +8 -0
- package/dist/types/src/core/history.d.ts +24 -0
- package/dist/types/src/core/json-editor-modal.d.ts +15 -0
- package/dist/types/src/core/plugins.d.ts +17 -0
- package/dist/types/src/core/preview-html.d.ts +2 -0
- package/dist/types/src/core/print-data-editor-modal.d.ts +19 -0
- package/dist/types/src/core/providers.d.ts +5 -0
- package/dist/types/src/core/register-icons.d.ts +1 -0
- package/dist/types/src/core/shortcuts.d.ts +20 -0
- package/dist/types/src/core/storage.d.ts +3 -0
- package/dist/types/src/core/stores.d.ts +77 -0
- package/dist/types/src/core/svp-element-provider.d.ts +8 -0
- package/dist/types/src/core/template-fields.d.ts +28 -0
- package/dist/types/src/core/theme.d.ts +1 -0
- package/dist/types/src/i18n/en-US.d.ts +104 -0
- package/dist/types/src/i18n/index.d.ts +12 -0
- package/dist/types/src/i18n/zh-CN.d.ts +104 -0
- package/dist/types/src/index.d.ts +52 -0
- package/dist/types/src/types.d.ts +229 -0
- package/dist/vue2/index.cjs +10329 -0
- package/dist/vue2/index.cjs.map +1 -0
- package/dist/vue2/index.mjs +10324 -0
- package/dist/vue2/index.mjs.map +1 -0
- package/dist/vue2/index.umd.cjs +10330 -0
- package/dist/vue2/index.umd.cjs.map +1 -0
- package/dist/vue2/style.css +2657 -0
- package/dist/vue3/index.cjs +10062 -0
- package/dist/vue3/index.cjs.map +1 -0
- package/dist/vue3/index.mjs +10057 -0
- package/dist/vue3/index.mjs.map +1 -0
- package/dist/vue3/index.umd.cjs +10063 -0
- package/dist/vue3/index.umd.cjs.map +1 -0
- package/dist/vue3/style.css +2657 -0
- package/package.json +129 -0
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
t: (key: string, fallback?: string) => string;
|
|
3
|
+
SETTING_CONTAINER_ID: string;
|
|
4
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {
|
|
5
|
+
DragBox: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
title: {
|
|
7
|
+
type: StringConstructor;
|
|
8
|
+
default: string;
|
|
9
|
+
};
|
|
10
|
+
storageKey: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
default: string;
|
|
13
|
+
};
|
|
14
|
+
layoutKey: {
|
|
15
|
+
type: import("vue").PropType<import("../../constants/panel-layout.js").SvpPanelLayoutKey>;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
styleOptionKey: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
panelKey: {
|
|
23
|
+
type: import("vue").PropType<keyof import("../../core/stores").PanelVisibility>;
|
|
24
|
+
default: string;
|
|
25
|
+
};
|
|
26
|
+
defaultX: {
|
|
27
|
+
type: NumberConstructor;
|
|
28
|
+
default: number;
|
|
29
|
+
};
|
|
30
|
+
defaultY: {
|
|
31
|
+
type: NumberConstructor;
|
|
32
|
+
default: number;
|
|
33
|
+
};
|
|
34
|
+
width: {
|
|
35
|
+
type: NumberConstructor;
|
|
36
|
+
default: number;
|
|
37
|
+
};
|
|
38
|
+
height: {
|
|
39
|
+
type: NumberConstructor;
|
|
40
|
+
default: number;
|
|
41
|
+
};
|
|
42
|
+
visible: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: boolean;
|
|
45
|
+
};
|
|
46
|
+
folded: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
foldable: {
|
|
51
|
+
type: BooleanConstructor;
|
|
52
|
+
default: boolean;
|
|
53
|
+
};
|
|
54
|
+
closable: {
|
|
55
|
+
type: BooleanConstructor;
|
|
56
|
+
default: undefined;
|
|
57
|
+
};
|
|
58
|
+
bodyPadding: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: string;
|
|
61
|
+
};
|
|
62
|
+
boundsSelector: {
|
|
63
|
+
type: StringConstructor;
|
|
64
|
+
default: string;
|
|
65
|
+
};
|
|
66
|
+
bodyStyleExtra: {
|
|
67
|
+
type: import("vue").PropType<Record<string, string>>;
|
|
68
|
+
default: () => {};
|
|
69
|
+
};
|
|
70
|
+
}>, {
|
|
71
|
+
boxRef: import("vue").Ref<HTMLElement | null, HTMLElement | null>;
|
|
72
|
+
state: {
|
|
73
|
+
x: number;
|
|
74
|
+
y: number;
|
|
75
|
+
width: number;
|
|
76
|
+
height: number;
|
|
77
|
+
folded: boolean;
|
|
78
|
+
visible: boolean;
|
|
79
|
+
};
|
|
80
|
+
show: import("vue").ComputedRef<boolean>;
|
|
81
|
+
showFold: import("vue").ComputedRef<boolean>;
|
|
82
|
+
showClose: import("vue").ComputedRef<boolean>;
|
|
83
|
+
toggleFolded: () => void;
|
|
84
|
+
boxStyle: import("vue").ComputedRef<{
|
|
85
|
+
left: string;
|
|
86
|
+
top: string;
|
|
87
|
+
width: string;
|
|
88
|
+
height: string;
|
|
89
|
+
}>;
|
|
90
|
+
bodyStyle: import("vue").ComputedRef<{
|
|
91
|
+
padding: string | undefined;
|
|
92
|
+
}>;
|
|
93
|
+
onClose: () => void;
|
|
94
|
+
resolvedTitle: import("vue").ComputedRef<string>;
|
|
95
|
+
draggable: import("vue").ComputedRef<boolean>;
|
|
96
|
+
t: (key: string, fallback?: string) => string;
|
|
97
|
+
UI_ICONS: {
|
|
98
|
+
readonly save: "lucide:save";
|
|
99
|
+
readonly preview: "lucide:eye";
|
|
100
|
+
readonly editTemplate: "lucide:file-json-2";
|
|
101
|
+
readonly editPrintData: "lucide:database";
|
|
102
|
+
readonly exportFile: "lucide:download";
|
|
103
|
+
readonly importFile: "lucide:upload";
|
|
104
|
+
readonly chevronDown: "lucide:chevron-down";
|
|
105
|
+
readonly close: "lucide:x";
|
|
106
|
+
};
|
|
107
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:visible")[], "close" | "update:visible", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
108
|
+
title: {
|
|
109
|
+
type: StringConstructor;
|
|
110
|
+
default: string;
|
|
111
|
+
};
|
|
112
|
+
storageKey: {
|
|
113
|
+
type: StringConstructor;
|
|
114
|
+
default: string;
|
|
115
|
+
};
|
|
116
|
+
layoutKey: {
|
|
117
|
+
type: import("vue").PropType<import("../../constants/panel-layout.js").SvpPanelLayoutKey>;
|
|
118
|
+
default: string;
|
|
119
|
+
};
|
|
120
|
+
styleOptionKey: {
|
|
121
|
+
type: StringConstructor;
|
|
122
|
+
default: string;
|
|
123
|
+
};
|
|
124
|
+
panelKey: {
|
|
125
|
+
type: import("vue").PropType<keyof import("../../core/stores").PanelVisibility>;
|
|
126
|
+
default: string;
|
|
127
|
+
};
|
|
128
|
+
defaultX: {
|
|
129
|
+
type: NumberConstructor;
|
|
130
|
+
default: number;
|
|
131
|
+
};
|
|
132
|
+
defaultY: {
|
|
133
|
+
type: NumberConstructor;
|
|
134
|
+
default: number;
|
|
135
|
+
};
|
|
136
|
+
width: {
|
|
137
|
+
type: NumberConstructor;
|
|
138
|
+
default: number;
|
|
139
|
+
};
|
|
140
|
+
height: {
|
|
141
|
+
type: NumberConstructor;
|
|
142
|
+
default: number;
|
|
143
|
+
};
|
|
144
|
+
visible: {
|
|
145
|
+
type: BooleanConstructor;
|
|
146
|
+
default: boolean;
|
|
147
|
+
};
|
|
148
|
+
folded: {
|
|
149
|
+
type: BooleanConstructor;
|
|
150
|
+
default: boolean;
|
|
151
|
+
};
|
|
152
|
+
foldable: {
|
|
153
|
+
type: BooleanConstructor;
|
|
154
|
+
default: boolean;
|
|
155
|
+
};
|
|
156
|
+
closable: {
|
|
157
|
+
type: BooleanConstructor;
|
|
158
|
+
default: undefined;
|
|
159
|
+
};
|
|
160
|
+
bodyPadding: {
|
|
161
|
+
type: StringConstructor;
|
|
162
|
+
default: string;
|
|
163
|
+
};
|
|
164
|
+
boundsSelector: {
|
|
165
|
+
type: StringConstructor;
|
|
166
|
+
default: string;
|
|
167
|
+
};
|
|
168
|
+
bodyStyleExtra: {
|
|
169
|
+
type: import("vue").PropType<Record<string, string>>;
|
|
170
|
+
default: () => {};
|
|
171
|
+
};
|
|
172
|
+
}>> & Readonly<{
|
|
173
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
174
|
+
"onUpdate:visible"?: ((...args: any[]) => any) | undefined;
|
|
175
|
+
}>, {
|
|
176
|
+
title: string;
|
|
177
|
+
width: number;
|
|
178
|
+
height: number;
|
|
179
|
+
panelKey: keyof import("../../core/stores").PanelVisibility;
|
|
180
|
+
visible: boolean;
|
|
181
|
+
folded: boolean;
|
|
182
|
+
storageKey: string;
|
|
183
|
+
layoutKey: "draggableEls" | "miniMap" | "pageStructure" | "pageHistory" | "properties";
|
|
184
|
+
styleOptionKey: string;
|
|
185
|
+
defaultX: number;
|
|
186
|
+
defaultY: number;
|
|
187
|
+
foldable: boolean;
|
|
188
|
+
closable: boolean;
|
|
189
|
+
bodyPadding: string;
|
|
190
|
+
boundsSelector: string;
|
|
191
|
+
bodyStyleExtra: Record<string, string>;
|
|
192
|
+
}, {}, {
|
|
193
|
+
SvpIcon: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
194
|
+
icon: {
|
|
195
|
+
type: StringConstructor;
|
|
196
|
+
required: true;
|
|
197
|
+
};
|
|
198
|
+
size: {
|
|
199
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
200
|
+
default: number;
|
|
201
|
+
};
|
|
202
|
+
}>, {
|
|
203
|
+
isSvg: import("vue").ComputedRef<boolean>;
|
|
204
|
+
sizePx: import("vue").ComputedRef<number>;
|
|
205
|
+
wrapStyle: import("vue").ComputedRef<{
|
|
206
|
+
width: string;
|
|
207
|
+
height: string;
|
|
208
|
+
}>;
|
|
209
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
210
|
+
icon: {
|
|
211
|
+
type: StringConstructor;
|
|
212
|
+
required: true;
|
|
213
|
+
};
|
|
214
|
+
size: {
|
|
215
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
216
|
+
default: number;
|
|
217
|
+
};
|
|
218
|
+
}>> & Readonly<{}>, {
|
|
219
|
+
size: string | number;
|
|
220
|
+
}, {}, {
|
|
221
|
+
Icon: import("vue").DefineSetupFnComponent<import("@iconify/vue").IconProps, {}, {}, import("@iconify/vue").IconProps, import("vue").PublicProps>;
|
|
222
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
223
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
224
|
+
}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
225
|
+
export default _default;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type InjectionKey } from 'vue-demi';
|
|
2
|
+
import DesignerUtils from '../core/designer-utils';
|
|
3
|
+
export declare const DESIGNER_INJECTION_KEY: InjectionKey<DesignerUtils>;
|
|
4
|
+
export declare function provideDesigner(utils: DesignerUtils): DesignerUtils;
|
|
5
|
+
/**
|
|
6
|
+
* Get the current DesignerUtils from the Vue injection chain.
|
|
7
|
+
* Falls back to the global singleton when no provider is present.
|
|
8
|
+
*/
|
|
9
|
+
export declare function useDesigner(): DesignerUtils;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { type PanelLayoutSpec, type SvpPanelLayoutKey } from '../constants/panel-layout';
|
|
2
|
+
export interface DragBoxState {
|
|
3
|
+
x: number;
|
|
4
|
+
y: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
folded: boolean;
|
|
8
|
+
visible: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface UseDragBoxOptions {
|
|
11
|
+
key?: string;
|
|
12
|
+
defaultX?: number;
|
|
13
|
+
defaultY?: number;
|
|
14
|
+
defaultWidth?: number;
|
|
15
|
+
defaultHeight?: number;
|
|
16
|
+
defaultFolded?: boolean;
|
|
17
|
+
defaultVisible?: boolean;
|
|
18
|
+
/** Apply sv-print default layout (recomputed on workspace resize). */
|
|
19
|
+
layoutKey?: SvpPanelLayoutKey;
|
|
20
|
+
/** Override or extend the sv-print layout spec. */
|
|
21
|
+
layoutSpec?: PanelLayoutSpec;
|
|
22
|
+
handleSelector?: string;
|
|
23
|
+
boundsSelector?: string;
|
|
24
|
+
/** When false the panel cannot be dragged. */
|
|
25
|
+
draggable?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function useDragBox(boxEl: () => HTMLElement | null, opts?: UseDragBoxOptions): {
|
|
28
|
+
state: {
|
|
29
|
+
x: number;
|
|
30
|
+
y: number;
|
|
31
|
+
width: number;
|
|
32
|
+
height: number;
|
|
33
|
+
folded: boolean;
|
|
34
|
+
visible: boolean;
|
|
35
|
+
};
|
|
36
|
+
toggleFolded: () => void;
|
|
37
|
+
setVisible: (v: boolean) => void;
|
|
38
|
+
persist: () => void;
|
|
39
|
+
applyLayout: (force?: boolean) => void;
|
|
40
|
+
dragging: () => boolean;
|
|
41
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface UseRulerOptions {
|
|
2
|
+
canvasX: () => HTMLCanvasElement | null;
|
|
3
|
+
canvasY: () => HTMLCanvasElement | null;
|
|
4
|
+
scrollerEl: () => HTMLElement | null;
|
|
5
|
+
/** Workspace container — observed for vertical ruler height changes. */
|
|
6
|
+
workspaceEl?: () => HTMLElement | null;
|
|
7
|
+
}
|
|
8
|
+
export declare function useRuler(opts: UseRulerOptions): {
|
|
9
|
+
redraw: () => void;
|
|
10
|
+
};
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/** Table field list used when dragging a new table onto the canvas. */
|
|
2
|
+
export declare const DEFAULT_TABLE_FIELDS: readonly [{
|
|
3
|
+
readonly text: "id";
|
|
4
|
+
readonly field: "id";
|
|
5
|
+
}, {
|
|
6
|
+
readonly text: "姓名";
|
|
7
|
+
readonly field: "name";
|
|
8
|
+
}, {
|
|
9
|
+
readonly text: "性别";
|
|
10
|
+
readonly field: "gender";
|
|
11
|
+
}, {
|
|
12
|
+
readonly text: "数量";
|
|
13
|
+
readonly field: "count";
|
|
14
|
+
}];
|
|
15
|
+
/** Column layout from `template.json` — applied to `defaultModule.table`. */
|
|
16
|
+
export declare const DEFAULT_TABLE_COLUMNS: readonly [readonly [{
|
|
17
|
+
readonly width: 102.30000000000001;
|
|
18
|
+
readonly checked: true;
|
|
19
|
+
readonly fixed: false;
|
|
20
|
+
readonly rowspan: 1;
|
|
21
|
+
readonly colspan: 1;
|
|
22
|
+
}, {
|
|
23
|
+
readonly width: 102.30000000000001;
|
|
24
|
+
readonly title: "姓名";
|
|
25
|
+
readonly field: "name";
|
|
26
|
+
readonly checked: true;
|
|
27
|
+
readonly columnId: "name";
|
|
28
|
+
readonly fixed: false;
|
|
29
|
+
readonly rowspan: 1;
|
|
30
|
+
readonly colspan: 1;
|
|
31
|
+
readonly align: "center";
|
|
32
|
+
readonly tableSummary: "count";
|
|
33
|
+
}, {
|
|
34
|
+
readonly width: 102.30000000000001;
|
|
35
|
+
readonly title: "数量";
|
|
36
|
+
readonly field: "count";
|
|
37
|
+
readonly checked: true;
|
|
38
|
+
readonly columnId: "count";
|
|
39
|
+
readonly fixed: false;
|
|
40
|
+
readonly rowspan: 1;
|
|
41
|
+
readonly colspan: 1;
|
|
42
|
+
readonly align: "center";
|
|
43
|
+
readonly tableSummary: "sum";
|
|
44
|
+
}, {
|
|
45
|
+
readonly width: 102.30000000000001;
|
|
46
|
+
readonly checked: true;
|
|
47
|
+
readonly fixed: false;
|
|
48
|
+
readonly rowspan: 1;
|
|
49
|
+
readonly colspan: 1;
|
|
50
|
+
}, {
|
|
51
|
+
readonly width: 102.30000000000001;
|
|
52
|
+
readonly checked: true;
|
|
53
|
+
readonly fixed: false;
|
|
54
|
+
readonly rowspan: 1;
|
|
55
|
+
readonly colspan: 1;
|
|
56
|
+
}, {
|
|
57
|
+
readonly width: 85.25;
|
|
58
|
+
readonly title: "性别";
|
|
59
|
+
readonly field: "gender";
|
|
60
|
+
readonly checked: false;
|
|
61
|
+
readonly columnId: "gender";
|
|
62
|
+
readonly fixed: false;
|
|
63
|
+
readonly rowspan: 1;
|
|
64
|
+
readonly colspan: 1;
|
|
65
|
+
}]];
|
|
66
|
+
/** Overrides merged into hiprint `defaultModule.table` element type. */
|
|
67
|
+
export declare const DEFAULT_TABLE_ELEMENT_TYPE: {
|
|
68
|
+
tid: string;
|
|
69
|
+
title: string;
|
|
70
|
+
type: string;
|
|
71
|
+
field: string;
|
|
72
|
+
tableFooterRepeat: string;
|
|
73
|
+
fields: ({
|
|
74
|
+
text: "id";
|
|
75
|
+
field: "id";
|
|
76
|
+
} | {
|
|
77
|
+
text: "姓名";
|
|
78
|
+
field: "name";
|
|
79
|
+
} | {
|
|
80
|
+
text: "性别";
|
|
81
|
+
field: "gender";
|
|
82
|
+
} | {
|
|
83
|
+
text: "数量";
|
|
84
|
+
field: "count";
|
|
85
|
+
})[];
|
|
86
|
+
columns: ({
|
|
87
|
+
width: 102.30000000000001;
|
|
88
|
+
checked: true;
|
|
89
|
+
fixed: false;
|
|
90
|
+
rowspan: 1;
|
|
91
|
+
colspan: 1;
|
|
92
|
+
} | {
|
|
93
|
+
width: 102.30000000000001;
|
|
94
|
+
title: "姓名";
|
|
95
|
+
field: "name";
|
|
96
|
+
checked: true;
|
|
97
|
+
columnId: "name";
|
|
98
|
+
fixed: false;
|
|
99
|
+
rowspan: 1;
|
|
100
|
+
colspan: 1;
|
|
101
|
+
align: "center";
|
|
102
|
+
tableSummary: "count";
|
|
103
|
+
} | {
|
|
104
|
+
width: 102.30000000000001;
|
|
105
|
+
title: "数量";
|
|
106
|
+
field: "count";
|
|
107
|
+
checked: true;
|
|
108
|
+
columnId: "count";
|
|
109
|
+
fixed: false;
|
|
110
|
+
rowspan: 1;
|
|
111
|
+
colspan: 1;
|
|
112
|
+
align: "center";
|
|
113
|
+
tableSummary: "sum";
|
|
114
|
+
} | {
|
|
115
|
+
width: 102.30000000000001;
|
|
116
|
+
checked: true;
|
|
117
|
+
fixed: false;
|
|
118
|
+
rowspan: 1;
|
|
119
|
+
colspan: 1;
|
|
120
|
+
} | {
|
|
121
|
+
width: 102.30000000000001;
|
|
122
|
+
checked: true;
|
|
123
|
+
fixed: false;
|
|
124
|
+
rowspan: 1;
|
|
125
|
+
colspan: 1;
|
|
126
|
+
} | {
|
|
127
|
+
width: 85.25;
|
|
128
|
+
title: "性别";
|
|
129
|
+
field: "gender";
|
|
130
|
+
checked: false;
|
|
131
|
+
columnId: "gender";
|
|
132
|
+
fixed: false;
|
|
133
|
+
rowspan: 1;
|
|
134
|
+
colspan: 1;
|
|
135
|
+
})[][];
|
|
136
|
+
editable: boolean;
|
|
137
|
+
columnDisplayEditable: boolean;
|
|
138
|
+
columnDisplayIndexEditable: boolean;
|
|
139
|
+
columnTitleEditable: boolean;
|
|
140
|
+
columnResizable: boolean;
|
|
141
|
+
columnAlignEditable: boolean;
|
|
142
|
+
isEnableEditField: boolean;
|
|
143
|
+
isEnableContextMenu: boolean;
|
|
144
|
+
isEnableInsertRow: boolean;
|
|
145
|
+
isEnableDeleteRow: boolean;
|
|
146
|
+
isEnableInsertColumn: boolean;
|
|
147
|
+
isEnableDeleteColumn: boolean;
|
|
148
|
+
isEnableMergeCell: boolean;
|
|
149
|
+
groupFields: string[];
|
|
150
|
+
groupFooterFormatter: undefined;
|
|
151
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/** Iconify icon ids (Lucide set). */
|
|
2
|
+
export declare const ICON_DELETE = "lucide:trash-2";
|
|
3
|
+
export declare const TOOL_ICONS: {
|
|
4
|
+
readonly undo: "lucide:undo-2";
|
|
5
|
+
readonly redo: "lucide:redo-2";
|
|
6
|
+
readonly alignLeft: "lucide:align-left";
|
|
7
|
+
readonly alignCenter: "lucide:align-center";
|
|
8
|
+
readonly alignRight: "lucide:align-right";
|
|
9
|
+
readonly alignTop: "lucide:align-start-vertical";
|
|
10
|
+
readonly alignMiddle: "lucide:align-center-vertical";
|
|
11
|
+
readonly alignBottom: "lucide:align-end-vertical";
|
|
12
|
+
readonly moveTop: "lucide:arrow-up-to-line";
|
|
13
|
+
readonly moveUp: "lucide:arrow-up";
|
|
14
|
+
readonly moveDown: "lucide:arrow-down";
|
|
15
|
+
readonly moveBottom: "lucide:arrow-down-to-line";
|
|
16
|
+
readonly flipH: "lucide:flip-horizontal";
|
|
17
|
+
readonly flipV: "lucide:flip-vertical";
|
|
18
|
+
readonly fontInc: "lucide:plus";
|
|
19
|
+
readonly fontDec: "lucide:minus";
|
|
20
|
+
readonly fontBold: "lucide:bold";
|
|
21
|
+
readonly fontUnbold: "lucide:bold";
|
|
22
|
+
readonly lock: "lucide:lock";
|
|
23
|
+
readonly unlock: "lucide:unlock";
|
|
24
|
+
readonly clone: "lucide:copy-plus";
|
|
25
|
+
readonly copy: "lucide:copy";
|
|
26
|
+
readonly cut: "lucide:scissors";
|
|
27
|
+
readonly paste: "lucide:clipboard-paste";
|
|
28
|
+
readonly delete: "lucide:trash-2";
|
|
29
|
+
readonly zoomOut: "lucide:zoom-out";
|
|
30
|
+
readonly zoomIn: "lucide:zoom-in";
|
|
31
|
+
readonly rotate: "lucide:rotate-cw";
|
|
32
|
+
readonly clear: "lucide:eraser";
|
|
33
|
+
readonly toggle: "lucide:panel-left";
|
|
34
|
+
};
|
|
35
|
+
export declare const PANEL_ICONS: {
|
|
36
|
+
readonly draggableEls: "lucide:boxes";
|
|
37
|
+
readonly miniMap: "lucide:scan-eye";
|
|
38
|
+
readonly pageStructure: "lucide:list-tree";
|
|
39
|
+
readonly pageHistory: "lucide:history";
|
|
40
|
+
readonly properties: "lucide:sliders-horizontal";
|
|
41
|
+
};
|
|
42
|
+
export declare const ELEMENT_ICON_NAMES: Record<string, string>;
|
|
43
|
+
export declare const HEADER_TAB_ICONS: Record<string, string>;
|
|
44
|
+
export declare const UI_ICONS: {
|
|
45
|
+
readonly save: "lucide:save";
|
|
46
|
+
readonly preview: "lucide:eye";
|
|
47
|
+
readonly editTemplate: "lucide:file-json-2";
|
|
48
|
+
readonly editPrintData: "lucide:database";
|
|
49
|
+
readonly exportFile: "lucide:download";
|
|
50
|
+
readonly importFile: "lucide:upload";
|
|
51
|
+
readonly chevronDown: "lucide:chevron-down";
|
|
52
|
+
readonly close: "lucide:x";
|
|
53
|
+
};
|
|
54
|
+
/** Icons for normalized history step labels. */
|
|
55
|
+
export declare const HISTORY_ICONS: Record<string, string>;
|
|
56
|
+
export declare function iconForHistoryLabel(label: string, rawType?: string): string;
|
|
57
|
+
export declare function isIconifyName(value: string): boolean;
|
|
58
|
+
export declare function elementTypeKey(item: any): string;
|
|
59
|
+
export declare function iconForElement(item: any): string;
|
|
60
|
+
export declare function iconForElementKey(key: string): string;
|
|
61
|
+
export declare function iconForHeaderTab(key: string): string;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default floating-panel layout — mirrors sv-print `styleOption` defaults.
|
|
3
|
+
* Coordinates are relative to `.svp-workspace` (below header + toolbar).
|
|
4
|
+
*/
|
|
5
|
+
export declare const SVP_CHROME_TOP = 82;
|
|
6
|
+
/** Matches `--svp-ruler-size`; panels must not overlap ruler strips. */
|
|
7
|
+
export declare const SVP_RULER_INSET = 24;
|
|
8
|
+
/** Gap between stacked panels in the same column. */
|
|
9
|
+
export declare const SVP_PANEL_GAP = 8;
|
|
10
|
+
/** Bottom margin for bottom-anchored panels (miniMap, pageHistory). */
|
|
11
|
+
export declare const SVP_PANEL_BOTTOM = 30;
|
|
12
|
+
/** Fixed height of bottom-docked panels. */
|
|
13
|
+
export declare const SVP_PANEL_DOCK_HEIGHT = 200;
|
|
14
|
+
/** Top-anchored panels share the workspace with a bottom-docked panel below. */
|
|
15
|
+
export declare const SVP_STACKED_HEIGHT_INSET: number;
|
|
16
|
+
export interface PanelLayoutSpec {
|
|
17
|
+
width: number;
|
|
18
|
+
height?: number;
|
|
19
|
+
left?: number;
|
|
20
|
+
top?: number;
|
|
21
|
+
right?: number;
|
|
22
|
+
bottom?: number;
|
|
23
|
+
/** height = boundsHeight - heightInset */
|
|
24
|
+
heightInset?: number;
|
|
25
|
+
}
|
|
26
|
+
export declare const SVP_PANEL_LAYOUT: {
|
|
27
|
+
readonly draggableEls: {
|
|
28
|
+
readonly left: 28;
|
|
29
|
+
readonly top: 28;
|
|
30
|
+
readonly width: 240;
|
|
31
|
+
readonly heightInset: number;
|
|
32
|
+
};
|
|
33
|
+
readonly miniMap: {
|
|
34
|
+
readonly left: 28;
|
|
35
|
+
readonly bottom: 30;
|
|
36
|
+
readonly width: 200;
|
|
37
|
+
readonly height: 200;
|
|
38
|
+
};
|
|
39
|
+
readonly properties: {
|
|
40
|
+
readonly right: 0;
|
|
41
|
+
readonly top: 28;
|
|
42
|
+
readonly width: 270;
|
|
43
|
+
readonly heightInset: 46;
|
|
44
|
+
};
|
|
45
|
+
readonly pageStructure: {
|
|
46
|
+
readonly right: 280;
|
|
47
|
+
readonly top: 28;
|
|
48
|
+
readonly width: 200;
|
|
49
|
+
readonly heightInset: number;
|
|
50
|
+
};
|
|
51
|
+
readonly pageHistory: {
|
|
52
|
+
readonly right: 280;
|
|
53
|
+
readonly bottom: 30;
|
|
54
|
+
readonly width: 200;
|
|
55
|
+
readonly height: 200;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export type SvpPanelLayoutKey = keyof typeof SVP_PANEL_LAYOUT;
|
|
59
|
+
export interface PanelRect {
|
|
60
|
+
x: number;
|
|
61
|
+
y: number;
|
|
62
|
+
width: number;
|
|
63
|
+
height: number;
|
|
64
|
+
}
|
|
65
|
+
export declare function resolvePanelLayout(spec: PanelLayoutSpec, bounds: {
|
|
66
|
+
width: number;
|
|
67
|
+
height: number;
|
|
68
|
+
}): PanelRect;
|
|
69
|
+
/** Resolve all default panel rects and verify they do not overlap. */
|
|
70
|
+
export declare function resolveAllPanelLayouts(bounds: {
|
|
71
|
+
width: number;
|
|
72
|
+
height: number;
|
|
73
|
+
}, keys?: SvpPanelLayoutKey[]): Record<SvpPanelLayoutKey, PanelRect>;
|
|
74
|
+
export declare function findPanelOverlaps(layouts: Record<string, PanelRect>, gap?: number): Array<[string, string]>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { PaperType, ToolDescriptor } from './types';
|
|
2
|
+
export declare const DESIGN_CONTAINER_ID = "hiprint-printTemplate";
|
|
3
|
+
export declare const SETTING_CONTAINER_ID = "PrintElementOptionSetting";
|
|
4
|
+
export declare const PAGINATION_CLASS = "hiprint-printPagination";
|
|
5
|
+
export declare const PAGINATION_SELECTOR = ".hiprint-printPagination";
|
|
6
|
+
export declare const DRAGGABLE_ITEM_CLASS = "ep-draggable-item";
|
|
7
|
+
/** Empty hiprint template JSON used by the JSON editor reset action. */
|
|
8
|
+
export declare const EMPTY_TEMPLATE_JSON: {
|
|
9
|
+
panels: any[];
|
|
10
|
+
};
|
|
11
|
+
/** Canvas zoom limits (fraction of 100%). */
|
|
12
|
+
export declare const ZOOM_MIN = 0.1;
|
|
13
|
+
export declare const ZOOM_MAX = 2;
|
|
14
|
+
export declare const ZOOM_STEP = 0.1;
|
|
15
|
+
/** Standard ISO paper sizes (in mm). "自定义" (Custom) keeps the current size. */
|
|
16
|
+
export declare const DEFAULT_PAPER_LIST: PaperType[];
|
|
17
|
+
export declare const DEFAULT_FONT_LIST: {
|
|
18
|
+
title: string;
|
|
19
|
+
value: string;
|
|
20
|
+
}[];
|
|
21
|
+
/** Default drag-element catalogue rendered inside the DraggableEls panel. */
|
|
22
|
+
export interface ElementCatalogueItem {
|
|
23
|
+
group: string;
|
|
24
|
+
key: string;
|
|
25
|
+
label: string;
|
|
26
|
+
/** Maps to the `tid` consumed by hiprint provider. */
|
|
27
|
+
tid: string;
|
|
28
|
+
/** Iconify icon id for the drag tile. */
|
|
29
|
+
icon?: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const DEFAULT_ELEMENT_CATALOGUE: ElementCatalogueItem[];
|
|
32
|
+
/**
|
|
33
|
+
* 28 toolbar actions as required by `print设计器功能.md`.
|
|
34
|
+
* Click handlers are wired against DesignerUtils, see Toolbar.vue.
|
|
35
|
+
*/
|
|
36
|
+
export declare const DEFAULT_TOOLBAR: ToolDescriptor[];
|
|
37
|
+
export declare const STORAGE_PREFIX = "svp:";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { InjectionKey, Ref } from 'vue-demi';
|
|
2
|
+
import { type PanelLayoutSpec, type SvpPanelLayoutKey } from '../constants/panel-layout';
|
|
3
|
+
import { type PanelVisibility } from './stores';
|
|
4
|
+
import type { ShowOption, StyleOption } from '../types';
|
|
5
|
+
/** Maps `styleOption` keys to floating panel store keys. */
|
|
6
|
+
export declare const STYLE_OPTION_PANEL_KEYS: Record<string, keyof PanelVisibility>;
|
|
7
|
+
/** Maps `styleOption` keys to default layout keys. */
|
|
8
|
+
export declare const STYLE_OPTION_LAYOUT_KEYS: Record<string, SvpPanelLayoutKey>;
|
|
9
|
+
/** Toolbar buttons controlled by `styleOption.*.show`. */
|
|
10
|
+
export declare const TOOL_STYLE_GROUP: Record<string, keyof StyleOption>;
|
|
11
|
+
export interface ResolvedShowOption {
|
|
12
|
+
showHeader: boolean;
|
|
13
|
+
showToolbar: boolean;
|
|
14
|
+
showFooter: boolean;
|
|
15
|
+
showPower: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface DesignerUiContext {
|
|
18
|
+
styleOption: Ref<StyleOption | undefined>;
|
|
19
|
+
showOption: Ref<ResolvedShowOption>;
|
|
20
|
+
}
|
|
21
|
+
export declare const DESIGNER_UI_INJECTION_KEY: InjectionKey<DesignerUiContext>;
|
|
22
|
+
export declare function resolveShowOption(showOption?: ShowOption, showToolbarFallback?: boolean): ResolvedShowOption;
|
|
23
|
+
export declare function parseInlineStyle(style?: string): Record<string, string>;
|
|
24
|
+
export declare function resolvePanelDragBoxOptions(styleKey: string, styleOption?: StyleOption): {
|
|
25
|
+
panelKey?: keyof PanelVisibility;
|
|
26
|
+
layoutKey?: SvpPanelLayoutKey;
|
|
27
|
+
layoutSpec?: PanelLayoutSpec;
|
|
28
|
+
boxStyleExtra: Record<string, string>;
|
|
29
|
+
bodyStyleExtra: Record<string, string>;
|
|
30
|
+
draggable: boolean;
|
|
31
|
+
title?: string;
|
|
32
|
+
};
|
|
33
|
+
export declare function applyStyleOption(styleOption?: StyleOption): void;
|
|
34
|
+
export declare function isToolGroupVisible(toolKey: string, styleOption?: StyleOption): boolean;
|