@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,104 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
designer: {
|
|
3
|
+
save: string;
|
|
4
|
+
preview: string;
|
|
5
|
+
editTemplate: string;
|
|
6
|
+
editPrintData: string;
|
|
7
|
+
exportFile: string;
|
|
8
|
+
importFile: string;
|
|
9
|
+
print: string;
|
|
10
|
+
pdf: string;
|
|
11
|
+
image: string;
|
|
12
|
+
close: string;
|
|
13
|
+
confirm: string;
|
|
14
|
+
apply: string;
|
|
15
|
+
clear: string;
|
|
16
|
+
copy: string;
|
|
17
|
+
cancel: string;
|
|
18
|
+
invalidJson: string;
|
|
19
|
+
printDataBasic: string;
|
|
20
|
+
printDataTable: string;
|
|
21
|
+
printDataEmpty: string;
|
|
22
|
+
printDataAddRow: string;
|
|
23
|
+
printDataDeleteRow: string;
|
|
24
|
+
printDataFieldKey: string;
|
|
25
|
+
paper: string;
|
|
26
|
+
};
|
|
27
|
+
header: {
|
|
28
|
+
title: string;
|
|
29
|
+
};
|
|
30
|
+
panel: {
|
|
31
|
+
draggableEls: string;
|
|
32
|
+
miniMap: string;
|
|
33
|
+
pageStructure: string;
|
|
34
|
+
pageHistory: string;
|
|
35
|
+
properties: string;
|
|
36
|
+
fold: string;
|
|
37
|
+
expand: string;
|
|
38
|
+
minimize: string;
|
|
39
|
+
show: string;
|
|
40
|
+
hide: string;
|
|
41
|
+
empty: string;
|
|
42
|
+
add: string;
|
|
43
|
+
};
|
|
44
|
+
history: {
|
|
45
|
+
move: string;
|
|
46
|
+
align: string;
|
|
47
|
+
param: string;
|
|
48
|
+
initial: string;
|
|
49
|
+
deleteRecord: string;
|
|
50
|
+
zoom: string;
|
|
51
|
+
};
|
|
52
|
+
tool: {
|
|
53
|
+
undo: string;
|
|
54
|
+
redo: string;
|
|
55
|
+
alignLeft: string;
|
|
56
|
+
alignCenter: string;
|
|
57
|
+
alignRight: string;
|
|
58
|
+
alignTop: string;
|
|
59
|
+
alignMiddle: string;
|
|
60
|
+
alignBottom: string;
|
|
61
|
+
moveTop: string;
|
|
62
|
+
moveUp: string;
|
|
63
|
+
moveDown: string;
|
|
64
|
+
moveBottom: string;
|
|
65
|
+
flipH: string;
|
|
66
|
+
flipV: string;
|
|
67
|
+
fontInc: string;
|
|
68
|
+
fontDec: string;
|
|
69
|
+
fontBold: string;
|
|
70
|
+
fontUnbold: string;
|
|
71
|
+
lock: string;
|
|
72
|
+
unlock: string;
|
|
73
|
+
clone: string;
|
|
74
|
+
copy: string;
|
|
75
|
+
cut: string;
|
|
76
|
+
paste: string;
|
|
77
|
+
delete: string;
|
|
78
|
+
zoomOut: string;
|
|
79
|
+
zoomIn: string;
|
|
80
|
+
rotate: string;
|
|
81
|
+
clear: string;
|
|
82
|
+
togglePanels: string;
|
|
83
|
+
};
|
|
84
|
+
category: {
|
|
85
|
+
base: string;
|
|
86
|
+
text: string;
|
|
87
|
+
image: string;
|
|
88
|
+
qrcode: string;
|
|
89
|
+
barcode: string;
|
|
90
|
+
longText: string;
|
|
91
|
+
table: string;
|
|
92
|
+
html: string;
|
|
93
|
+
};
|
|
94
|
+
group: {
|
|
95
|
+
regular: string;
|
|
96
|
+
helper: string;
|
|
97
|
+
};
|
|
98
|
+
locale: {
|
|
99
|
+
switch: string;
|
|
100
|
+
zhCN: string;
|
|
101
|
+
enUS: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
export default _default;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* vue3-print-designer — public entry.
|
|
3
|
+
*
|
|
4
|
+
* The package ships two builds (`dist/vue2/` and `dist/vue3/`); both compile
|
|
5
|
+
* from this same source file thanks to `vue-demi`.
|
|
6
|
+
*/
|
|
7
|
+
import './core/register-icons';
|
|
8
|
+
import './styles/app.scss';
|
|
9
|
+
export { default as Designer } from './components/Designer.vue';
|
|
10
|
+
export { default as Header } from './components/Header.vue';
|
|
11
|
+
export { default as Toolbar } from './components/Toolbar.vue';
|
|
12
|
+
export { default as Preview } from './components/Preview.vue';
|
|
13
|
+
export { default as Ruler } from './components/Ruler.vue';
|
|
14
|
+
export { default as DragBox } from './components/DragBox.vue';
|
|
15
|
+
export { default as SvpIcon } from './components/SvpIcon.vue';
|
|
16
|
+
export { default as DraggableElsPanel } from './components/panels/DraggableElsPanel.vue';
|
|
17
|
+
export { default as MiniMapPanel } from './components/panels/MiniMapPanel.vue';
|
|
18
|
+
export { default as PageStructurePanel } from './components/panels/PageStructurePanel.vue';
|
|
19
|
+
export { default as PageHistoryPanel } from './components/panels/PageHistoryPanel.vue';
|
|
20
|
+
export { default as PropertiesPanel } from './components/panels/PropertiesPanel.vue';
|
|
21
|
+
export { default as DesignerUtils } from './core/designer-utils';
|
|
22
|
+
export { PluginManager } from './core/plugins';
|
|
23
|
+
export { HistoryController } from './core/history';
|
|
24
|
+
export { HISTORY_MOVE, HISTORY_ALIGN, HISTORY_PARAM, HISTORY_INITIAL, normalizeHistoryLabel, } from './core/history-labels';
|
|
25
|
+
export { ShortcutsController } from './core/shortcuts';
|
|
26
|
+
export { hiprint, initHiprint, buildByHtml, defaultElementTypeProvider, } from './core/hiprint-bridge';
|
|
27
|
+
export { SvpElementTypeProvider } from './core/svp-element-provider';
|
|
28
|
+
export { applyStyleOption, resolveShowOption, DESIGNER_UI_INJECTION_KEY, } from './core/designer-options';
|
|
29
|
+
export { extractTemplateFields, buildPrintDataFromForm, createPrintDataFormState, type TemplateFieldSchema, type BasicFieldDef, type TableFieldDef, } from './core/template-fields';
|
|
30
|
+
export { headerElementsFromCatalogue } from './constants/header-elements';
|
|
31
|
+
export { DEFAULT_TABLE_COLUMNS, DEFAULT_TABLE_ELEMENT_TYPE, DEFAULT_TABLE_FIELDS, } from './constants/default-table-element';
|
|
32
|
+
export { designerStore, setZoom, setPanelVisibility, togglePanel, toggleAllPanels, setSelection, } from './core/stores';
|
|
33
|
+
export { readJSON, writeJSON, removeKey } from './core/storage';
|
|
34
|
+
export { useDesigner, provideDesigner, DESIGNER_INJECTION_KEY } from './composables/useDesigner';
|
|
35
|
+
export { useDesignerUi } from './composables/useDesignerUi';
|
|
36
|
+
export { useDragBox } from './composables/useDragBox';
|
|
37
|
+
export { useRuler } from './composables/useRuler';
|
|
38
|
+
export { useI18n, setLocale, getLocaleList } from './i18n';
|
|
39
|
+
export { default as zhCN } from './i18n/zh-CN';
|
|
40
|
+
export { default as enUS } from './i18n/en-US';
|
|
41
|
+
export * from './constants';
|
|
42
|
+
export * from './constants/icons';
|
|
43
|
+
export * from './types';
|
|
44
|
+
export { pluginApiPdf } from '../plugins/plugin-api-pdf/src';
|
|
45
|
+
export { pluginApiImage } from '../plugins/plugin-api-image/src';
|
|
46
|
+
export { pluginViewCodeEdit } from '../plugins/plugin-view-code-edit/src';
|
|
47
|
+
/** Convenience Vue plugin: `app.use(Vue3PrintDesigner)`. */
|
|
48
|
+
import type { App as Vue3App } from 'vue-demi';
|
|
49
|
+
declare const _default: {
|
|
50
|
+
install(app: Vue3App): void;
|
|
51
|
+
};
|
|
52
|
+
export default _default;
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public types for vue3-print-designer.
|
|
3
|
+
*
|
|
4
|
+
* These mirror the shape of the sv-print component contract so that
|
|
5
|
+
* existing templates and plugin authors can migrate with minimal friction.
|
|
6
|
+
*/
|
|
7
|
+
/** A daisyUI-style theme descriptor. */
|
|
8
|
+
export interface ThemeType {
|
|
9
|
+
/** Theme name. When omitted a stable hash of the colors is used. */
|
|
10
|
+
theme?: string;
|
|
11
|
+
primaryColor: string;
|
|
12
|
+
primaryContent?: string;
|
|
13
|
+
secondaryColor?: string;
|
|
14
|
+
secondaryContent?: string;
|
|
15
|
+
accentColor?: string;
|
|
16
|
+
accentContent?: string;
|
|
17
|
+
neutralColor?: string;
|
|
18
|
+
neutralContent?: string;
|
|
19
|
+
base100?: string;
|
|
20
|
+
base200?: string;
|
|
21
|
+
base300?: string;
|
|
22
|
+
baseContent?: string;
|
|
23
|
+
info?: string;
|
|
24
|
+
infoContent?: string;
|
|
25
|
+
success?: string;
|
|
26
|
+
successContent?: string;
|
|
27
|
+
warning?: string;
|
|
28
|
+
warningContent?: string;
|
|
29
|
+
error?: string;
|
|
30
|
+
errorContent?: string;
|
|
31
|
+
}
|
|
32
|
+
/** Configures how a single floating panel (DragBox) shows up. */
|
|
33
|
+
export type DragBoxMode = 'default' | 'top' | 'left' | 'bottom' | 'right' | 'fixed';
|
|
34
|
+
export interface DragBoxStyleOptions {
|
|
35
|
+
mode?: DragBoxMode;
|
|
36
|
+
/** Inline css string. */
|
|
37
|
+
style?: string;
|
|
38
|
+
/** Initial visibility. */
|
|
39
|
+
show?: boolean;
|
|
40
|
+
/** Title shown in the header. */
|
|
41
|
+
title?: string;
|
|
42
|
+
/** Other free-form payload available in slots. */
|
|
43
|
+
other?: Record<string, unknown>;
|
|
44
|
+
}
|
|
45
|
+
/** Per-panel style/visibility overrides. */
|
|
46
|
+
export interface StyleOption {
|
|
47
|
+
paperBox?: DragBoxStyleOptions;
|
|
48
|
+
panels?: DragBoxStyleOptions;
|
|
49
|
+
draggableEls?: DragBoxStyleOptions;
|
|
50
|
+
options?: DragBoxStyleOptions;
|
|
51
|
+
pageStructure?: DragBoxStyleOptions;
|
|
52
|
+
history?: DragBoxStyleOptions;
|
|
53
|
+
miniMap?: DragBoxStyleOptions;
|
|
54
|
+
editableTools?: DragBoxStyleOptions;
|
|
55
|
+
zIndexTools?: DragBoxStyleOptions;
|
|
56
|
+
fontTools?: DragBoxStyleOptions;
|
|
57
|
+
zoomTools?: DragBoxStyleOptions;
|
|
58
|
+
rotateTools?: DragBoxStyleOptions;
|
|
59
|
+
}
|
|
60
|
+
/** Header / toolbar / footer visibility switches. */
|
|
61
|
+
export interface ShowOption {
|
|
62
|
+
showHeader?: boolean;
|
|
63
|
+
showToolbar?: boolean;
|
|
64
|
+
showFooter?: boolean;
|
|
65
|
+
showPower?: boolean;
|
|
66
|
+
}
|
|
67
|
+
export interface PaperType {
|
|
68
|
+
type: string;
|
|
69
|
+
width: number;
|
|
70
|
+
height: number;
|
|
71
|
+
}
|
|
72
|
+
export interface ProviderMap {
|
|
73
|
+
/** CSS selector hiprint should fill with draggable items. */
|
|
74
|
+
container: string;
|
|
75
|
+
/** Provider value (typically the tid prefix). */
|
|
76
|
+
value: string;
|
|
77
|
+
render?: (e: any[]) => any;
|
|
78
|
+
}
|
|
79
|
+
export interface PreviewOptions {
|
|
80
|
+
showPdf?: boolean;
|
|
81
|
+
showImg?: boolean;
|
|
82
|
+
showPrint2?: boolean;
|
|
83
|
+
}
|
|
84
|
+
export type Hook = 'init' | 'ready' | 'documentShortcutKeys' | 'shortcutKeys' | 'createPrintElement' | 'beforePrint' | 'beforePrint2' | 'getOptionItem' | 'onDesigned' | 'onPreview' | 'newPrintTemplate' | 'newPanel' | (string & {});
|
|
85
|
+
export interface HookOptions {
|
|
86
|
+
hook: Hook;
|
|
87
|
+
name: string;
|
|
88
|
+
description?: string;
|
|
89
|
+
priority?: number;
|
|
90
|
+
run: (...args: any[]) => any | Promise<any>;
|
|
91
|
+
}
|
|
92
|
+
export interface PluginOptions {
|
|
93
|
+
name: string;
|
|
94
|
+
description?: string;
|
|
95
|
+
init?: (input: any) => any;
|
|
96
|
+
hooks: HookOptions[];
|
|
97
|
+
config?: Record<string, unknown>;
|
|
98
|
+
leastHiprintVersion?: string;
|
|
99
|
+
}
|
|
100
|
+
/** Convenience factory typing for plugin authors. */
|
|
101
|
+
export type PluginFactory<T = unknown> = (opts?: T) => PluginOptions;
|
|
102
|
+
/** A `Provider` adds custom draggable element types into hiprint. */
|
|
103
|
+
export declare abstract class Provider {
|
|
104
|
+
abstract addElementTypes(ctx: any): void;
|
|
105
|
+
}
|
|
106
|
+
export interface Events {
|
|
107
|
+
onSave?: (key: string, data: any) => boolean | void;
|
|
108
|
+
onEdit?: (data: any) => boolean | void;
|
|
109
|
+
onEditData?: (data: any) => boolean | void;
|
|
110
|
+
onKeyDownEvent?: (e: KeyboardEvent, utils: any) => boolean | void;
|
|
111
|
+
}
|
|
112
|
+
export interface DesignOptions {
|
|
113
|
+
grid?: boolean;
|
|
114
|
+
activePanel?: boolean;
|
|
115
|
+
adaptToSize?: boolean;
|
|
116
|
+
}
|
|
117
|
+
export interface DesignerPrintTemplateOptions {
|
|
118
|
+
template: any;
|
|
119
|
+
fontList?: any[];
|
|
120
|
+
fields?: any[];
|
|
121
|
+
onImageChooseClick?: (target: any) => void;
|
|
122
|
+
onZoomChange?: (scale: number) => void;
|
|
123
|
+
onPanelAddClick?: (panel: any, createPanel: any) => void;
|
|
124
|
+
onFunctionClick?: (option: any, printElement: any, event: any) => void;
|
|
125
|
+
dataMode?: 1 | 2;
|
|
126
|
+
history?: boolean;
|
|
127
|
+
onDataChanged?: (type: string, json: any) => void;
|
|
128
|
+
onUpdateError?: (e: any) => void;
|
|
129
|
+
settingContainer?: string;
|
|
130
|
+
designContainer?: string;
|
|
131
|
+
paginationContainer?: string;
|
|
132
|
+
}
|
|
133
|
+
export interface RulerStyle {
|
|
134
|
+
show?: boolean;
|
|
135
|
+
scale?: number;
|
|
136
|
+
backgroundColor?: string;
|
|
137
|
+
fontColor?: string;
|
|
138
|
+
fontSize?: number;
|
|
139
|
+
tickColor?: string;
|
|
140
|
+
paperRectColor?: string;
|
|
141
|
+
}
|
|
142
|
+
/** Public props accepted by <Designer />. */
|
|
143
|
+
export interface DesignerProps {
|
|
144
|
+
autoConnect?: boolean;
|
|
145
|
+
config?: any;
|
|
146
|
+
providers?: Provider[];
|
|
147
|
+
providerMap?: ProviderMap | ProviderMap[];
|
|
148
|
+
plugins?: PluginOptions[];
|
|
149
|
+
/** Either a template JSON or template options object. */
|
|
150
|
+
template?: any;
|
|
151
|
+
templateOptions?: DesignerPrintTemplateOptions;
|
|
152
|
+
designOptions?: DesignOptions;
|
|
153
|
+
printData?: any;
|
|
154
|
+
templateKey?: string;
|
|
155
|
+
title?: string;
|
|
156
|
+
authKey?: string;
|
|
157
|
+
headerLogoHtml?: string;
|
|
158
|
+
headerTitle?: string;
|
|
159
|
+
headerNewEle?: boolean;
|
|
160
|
+
headerEleList?: HeaderEle[];
|
|
161
|
+
headerNewMenu?: boolean;
|
|
162
|
+
headerMenuList?: HeaderMenu[];
|
|
163
|
+
events?: Events;
|
|
164
|
+
tags?: string[];
|
|
165
|
+
styleOption?: StyleOption;
|
|
166
|
+
showOption?: ShowOption;
|
|
167
|
+
paperList?: PaperType[];
|
|
168
|
+
theme?: string | ThemeType | ThemeType[];
|
|
169
|
+
themeList?: string[];
|
|
170
|
+
pageStructureGridMode?: boolean;
|
|
171
|
+
miniMapOriginMode?: boolean;
|
|
172
|
+
rulerStyle?: RulerStyle;
|
|
173
|
+
previewOptions?: PreviewOptions;
|
|
174
|
+
onPreviewClick?: (e: MouseEvent) => boolean | void;
|
|
175
|
+
onZoomChange?: (scale: number) => void;
|
|
176
|
+
onImageChooseClick?: (target: any) => void;
|
|
177
|
+
customDataFun?: (data: any, field: string, printData?: any) => string | number | object;
|
|
178
|
+
onPanelAddClick?: (panel: any, createPanel: any) => void;
|
|
179
|
+
onFunctionClick?: (option: any, printElement: any, event: any) => void;
|
|
180
|
+
onBeforeDragIn?: (printTemplate: any, panel: any, printElement: any) => boolean | void;
|
|
181
|
+
}
|
|
182
|
+
/** Custom item inside the Header element-category bar. */
|
|
183
|
+
export interface HeaderEle {
|
|
184
|
+
key: string;
|
|
185
|
+
label: string;
|
|
186
|
+
/** Iconify icon id or legacy inline SVG. */
|
|
187
|
+
icon?: string;
|
|
188
|
+
tid?: string;
|
|
189
|
+
onClick?: (e: MouseEvent) => void;
|
|
190
|
+
}
|
|
191
|
+
/** Header dropdown menu entry. */
|
|
192
|
+
export interface HeaderMenu {
|
|
193
|
+
key: string;
|
|
194
|
+
label: string;
|
|
195
|
+
icon?: string;
|
|
196
|
+
onClick?: () => void;
|
|
197
|
+
children?: HeaderMenu[];
|
|
198
|
+
}
|
|
199
|
+
/** Internal: tool descriptor used by Toolbar.vue. */
|
|
200
|
+
export interface ToolDescriptor {
|
|
201
|
+
key: string;
|
|
202
|
+
/** i18n key for tooltip. */
|
|
203
|
+
i18n?: string;
|
|
204
|
+
/** Direct label, takes precedence over `i18n`. */
|
|
205
|
+
label?: string;
|
|
206
|
+
/** Iconify icon id (e.g. `lucide:copy`) or legacy inline SVG markup. */
|
|
207
|
+
icon: string;
|
|
208
|
+
/** When true the tool is rendered as a separator. */
|
|
209
|
+
separator?: boolean;
|
|
210
|
+
/** Hide the tool. */
|
|
211
|
+
hidden?: boolean;
|
|
212
|
+
/** Disabled when there is no current selection. */
|
|
213
|
+
needSelection?: boolean;
|
|
214
|
+
/** Only on mobile. */
|
|
215
|
+
mobileOnly?: boolean;
|
|
216
|
+
/** Hidden on mobile. */
|
|
217
|
+
desktopOnly?: boolean;
|
|
218
|
+
/** Toggle a floating panel's visibility. */
|
|
219
|
+
panelKey?: 'draggableEls' | 'miniMap' | 'pageStructure' | 'pageHistory' | 'properties';
|
|
220
|
+
/** Render as a read-only label instead of a button. */
|
|
221
|
+
display?: 'zoomPercent' | 'langSelect' | 'lockToggle';
|
|
222
|
+
/** Click handler runs against DesignerUtils. */
|
|
223
|
+
onClick?: (utils: any, ev: MouseEvent) => void;
|
|
224
|
+
}
|
|
225
|
+
export type Lang = 'zh-CN' | 'en-US' | (string & {});
|
|
226
|
+
export interface DesignedEventPayload {
|
|
227
|
+
hiprint: any;
|
|
228
|
+
designerUtils: any;
|
|
229
|
+
}
|