@guodun/antdv 1.7.3 → 1.7.5

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.
Files changed (42) hide show
  1. package/dist/es/components/contract-signing-location/src/ContractSigningLocation.vue.mjs +313 -308
  2. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateAuthoringBar.vue.mjs +1 -1
  3. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.mjs +5 -0
  4. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.mjs +796 -0
  5. package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +16 -5
  6. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +3 -1
  7. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.mjs +123 -710
  8. package/dist/es/components/pro-contract-template-designer/src/composables/use-renderer-files.mjs +80 -0
  9. package/dist/es/components/pro-contract-template-designer/src/composables/use-template-designer.mjs +172 -134
  10. package/dist/es/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.mjs +11 -9
  11. package/dist/es/components/pro-contract-template-designer/src/extensions/editor-extensions.mjs +37 -35
  12. package/dist/es/components/pro-contract-template-designer/src/extensions/paragraph-enter.mjs +28 -0
  13. package/dist/es/components/pro-contract-template-designer/src/utils/template-renderer.mjs +136 -76
  14. package/dist/es/components/pro-contract-template-designer/src/utils/toolbar-overflow.mjs +10 -9
  15. package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
  16. package/dist/lib/components/contract-signing-location/src/ContractSigningLocation.vue.cjs +1 -1
  17. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateAuthoringBar.vue.cjs +1 -1
  18. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.cjs +1 -0
  19. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.cjs +1 -0
  20. package/dist/lib/components/pro-contract-template-designer/src/DesignerPage.vue.cjs +2 -2
  21. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.cjs +1 -1
  22. package/dist/lib/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.cjs +1 -1
  23. package/dist/lib/components/pro-contract-template-designer/src/composables/use-renderer-files.cjs +1 -0
  24. package/dist/lib/components/pro-contract-template-designer/src/composables/use-template-designer.cjs +4 -4
  25. package/dist/lib/components/pro-contract-template-designer/src/composables/use-toolbar-overflow.cjs +1 -1
  26. package/dist/lib/components/pro-contract-template-designer/src/extensions/editor-extensions.cjs +1 -1
  27. package/dist/lib/components/pro-contract-template-designer/src/extensions/paragraph-enter.cjs +1 -0
  28. package/dist/lib/components/pro-contract-template-designer/src/utils/template-renderer.cjs +3 -3
  29. package/dist/lib/components/pro-contract-template-designer/src/utils/toolbar-overflow.cjs +1 -1
  30. package/dist/lib/components/pro-contract-template-designer/style/index.css +1 -1
  31. package/dist/theme/icon.css +1 -1
  32. package/dist/theme/index.css +1 -1
  33. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateSingleRenderer.vue.d.ts +89 -0
  34. package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +2 -0
  35. package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateRenderer.vue.d.ts +388 -10
  36. package/dist/types/components/pro-contract-template-designer/src/composables/use-renderer-files.d.ts +14 -0
  37. package/dist/types/components/pro-contract-template-designer/src/composables/use-template-designer.d.ts +9 -2
  38. package/dist/types/components/pro-contract-template-designer/src/extensions/paragraph-enter.d.ts +6 -0
  39. package/dist/types/components/pro-contract-template-designer/src/types.d.ts +16 -2
  40. package/dist/types/components/pro-contract-template-designer/src/utils/template-renderer.d.ts +3 -3
  41. package/dist/types/components/pro-contract-template-designer/src/utils/toolbar-overflow.d.ts +2 -0
  42. package/package.json +3 -3
@@ -0,0 +1,89 @@
1
+ import { VNode } from 'vue';
2
+ import { ContractTemplateRenderValues, ContractTemplateRendererFieldSlotProps, ContractTemplateRendererProps, ContractTemplateValidationError, ContractTemplateControlWarning } from './types';
3
+ declare function __VLS_template(): {
4
+ attrs: Partial<{}>;
5
+ slots: Readonly<{
6
+ field?: (props: ContractTemplateRendererFieldSlotProps) => VNode[] | undefined;
7
+ headerExtra?: () => VNode[] | undefined;
8
+ fileBar?: () => VNode[] | undefined;
9
+ }> & {
10
+ field?: (props: ContractTemplateRendererFieldSlotProps) => VNode[] | undefined;
11
+ headerExtra?: () => VNode[] | undefined;
12
+ fileBar?: () => VNode[] | undefined;
13
+ };
14
+ refs: {
15
+ rendererElement: HTMLElement;
16
+ pagesViewportElement: HTMLDivElement;
17
+ fieldListElement: HTMLDivElement;
18
+ };
19
+ rootEl: HTMLElement;
20
+ };
21
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
22
+ declare const __VLS_component: import('vue').DefineComponent<ContractTemplateRendererProps, {
23
+ validate: () => ContractTemplateValidationError[];
24
+ submit: () => false | ContractTemplateRenderValues;
25
+ fitWidth: () => number;
26
+ scrollToPage: (pageId: string) => void;
27
+ setZoom: (value: number) => number;
28
+ getZoom: () => number;
29
+ resetZoom: () => number;
30
+ scrollToVariable: (variableKey: string) => void;
31
+ getValues: () => ContractTemplateRenderValues;
32
+ setValues: (values: ContractTemplateRenderValues) => void;
33
+ resetValues: () => ContractTemplateRenderValues;
34
+ showValidation: (errors: ContractTemplateValidationError[]) => void;
35
+ focusError: (error: ContractTemplateValidationError) => void;
36
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
37
+ validate: (errors: ContractTemplateValidationError[]) => any;
38
+ change: (value: ContractTemplateRenderValues) => any;
39
+ submit: (value: ContractTemplateRenderValues) => any;
40
+ "update:zoom": (value: number) => any;
41
+ "update:activeFileId": (value: string) => any;
42
+ "update:valuesByFile": (value: import('./types').ContractTemplateRenderValuesByFile) => any;
43
+ "update:values": (value: ContractTemplateRenderValues) => any;
44
+ "control-warning": (warning: ContractTemplateControlWarning) => any;
45
+ }, string, import('vue').PublicProps, Readonly<ContractTemplateRendererProps> & Readonly<{
46
+ onValidate?: ((errors: ContractTemplateValidationError[]) => any) | undefined;
47
+ onChange?: ((value: ContractTemplateRenderValues) => any) | undefined;
48
+ onSubmit?: ((value: ContractTemplateRenderValues) => any) | undefined;
49
+ "onUpdate:zoom"?: ((value: number) => any) | undefined;
50
+ "onUpdate:activeFileId"?: ((value: string) => any) | undefined;
51
+ "onUpdate:valuesByFile"?: ((value: import('./types').ContractTemplateRenderValuesByFile) => any) | undefined;
52
+ "onUpdate:values"?: ((value: ContractTemplateRenderValues) => any) | undefined;
53
+ "onControl-warning"?: ((warning: ContractTemplateControlWarning) => any) | undefined;
54
+ }>, {
55
+ values: ContractTemplateRenderValues;
56
+ disabled: boolean;
57
+ title: string;
58
+ template: import('./types').ContractTemplateData;
59
+ readonly: boolean;
60
+ zoom: number;
61
+ showToolbar: boolean;
62
+ showSubmitButton: boolean;
63
+ contractFontBaseUrl: string;
64
+ selectorHttp: undefined;
65
+ selectorUrlPrefix: string;
66
+ showValidateButton: boolean;
67
+ showResetButton: boolean;
68
+ interactionMode: import('./types').ContractTemplateRendererMode;
69
+ validateOnSubmit: boolean;
70
+ showPageMeta: boolean;
71
+ collapsiblePanel: boolean;
72
+ controlRegistry: import('./types').ContractTemplateControlRegistry;
73
+ optionResolver: import('./types').ContractTemplateOptionResolver;
74
+ requester: import('./types').ContractTemplateControlRequester;
75
+ allowedRemoteOrigins: string[];
76
+ remoteRequestTimeoutMs: number;
77
+ remoteOptionsCacheTtlMs: number;
78
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
79
+ rendererElement: HTMLElement;
80
+ pagesViewportElement: HTMLDivElement;
81
+ fieldListElement: HTMLDivElement;
82
+ }, HTMLElement>;
83
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
84
+ export default _default;
85
+ type __VLS_WithTemplateSlots<T, S> = T & {
86
+ new (): {
87
+ $slots: S;
88
+ };
89
+ };
@@ -151,6 +151,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
151
151
  "variable-select": (variableKey: string) => any;
152
152
  "variable-move-blocked": (pageId: string) => any;
153
153
  "editor-focus": (pageId: string) => any;
154
+ "editor-ready": (pageId: string) => any;
154
155
  "editor-state-change": (pageId: string, state: ContractTemplateEditorState) => any;
155
156
  "editor-context-menu": (payload: ContractTemplateEditorContextMenuPayload) => any;
156
157
  "word-paste": (payload: {
@@ -162,6 +163,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
162
163
  "onVariable-select"?: ((variableKey: string) => any) | undefined;
163
164
  "onVariable-move-blocked"?: ((pageId: string) => any) | undefined;
164
165
  "onEditor-focus"?: ((pageId: string) => any) | undefined;
166
+ "onEditor-ready"?: ((pageId: string) => any) | undefined;
165
167
  "onEditor-state-change"?: ((pageId: string, state: ContractTemplateEditorState) => any) | undefined;
166
168
  "onEditor-context-menu"?: ((payload: ContractTemplateEditorContextMenuPayload) => any) | undefined;
167
169
  "onWord-paste"?: ((payload: {
@@ -1,5 +1,5 @@
1
- import { VNode } from 'vue';
2
- import { ContractTemplateRenderValues, ContractTemplateRendererFieldSlotProps, ContractTemplateRendererProps, ContractTemplateValidationError, ContractTemplateControlWarning } from './types';
1
+ import { nextTick, VNode } from 'vue';
2
+ import { ContractTemplateRendererFieldSlotProps, ContractTemplateRendererProps, ContractTemplateRenderValues, ContractTemplateValidationError } from './types';
3
3
  declare function __VLS_template(): {
4
4
  attrs: Partial<{}>;
5
5
  slots: Readonly<{
@@ -10,14 +10,202 @@ declare function __VLS_template(): {
10
10
  headerExtra?: () => VNode[] | undefined;
11
11
  };
12
12
  refs: {
13
- rendererElement: HTMLElement;
14
- pagesViewportElement: HTMLDivElement;
15
- fieldListElement: HTMLDivElement;
13
+ renderer: ({
14
+ $: import('vue').ComponentInternalInstance;
15
+ $data: {};
16
+ $props: {
17
+ readonly files?: import('./types').ContractTemplateFile[] | undefined;
18
+ readonly activeFileId?: string | undefined;
19
+ readonly valuesByFile?: import('./types').ContractTemplateRenderValuesByFile | undefined;
20
+ readonly template?: import('./types').ContractTemplateData | undefined;
21
+ readonly values?: ContractTemplateRenderValues | undefined;
22
+ readonly interactionMode?: import('./types').ContractTemplateRendererMode | undefined;
23
+ readonly readonly?: boolean | undefined;
24
+ readonly disabled?: boolean | undefined;
25
+ readonly title?: string | undefined;
26
+ readonly showSubmitButton?: boolean | undefined;
27
+ readonly validateOnSubmit?: boolean | undefined;
28
+ readonly showValidateButton?: boolean | undefined;
29
+ readonly showResetButton?: boolean | undefined;
30
+ readonly showToolbar?: boolean | undefined;
31
+ readonly showPageMeta?: boolean | undefined;
32
+ readonly collapsiblePanel?: boolean | undefined;
33
+ readonly zoom?: number | undefined;
34
+ readonly controlRegistry?: import('./types').ContractTemplateControlRegistry | undefined;
35
+ readonly optionResolver?: import('./types').ContractTemplateOptionResolver | undefined;
36
+ readonly requester?: import('./types').ContractTemplateControlRequester | undefined;
37
+ readonly allowedRemoteOrigins?: string[] | undefined;
38
+ readonly remoteRequestTimeoutMs?: number | undefined;
39
+ readonly remoteOptionsCacheTtlMs?: number | undefined;
40
+ readonly selectorHttp?: unknown;
41
+ readonly selectorUrlPrefix?: string | undefined;
42
+ readonly contractFontBaseUrl?: string | undefined;
43
+ readonly onValidate?: ((errors: ContractTemplateValidationError[]) => any) | undefined;
44
+ readonly onChange?: ((value: ContractTemplateRenderValues) => any) | undefined;
45
+ readonly onSubmit?: ((value: ContractTemplateRenderValues) => any) | undefined;
46
+ readonly "onUpdate:zoom"?: ((value: number) => any) | undefined;
47
+ readonly "onUpdate:activeFileId"?: ((value: string) => any) | undefined;
48
+ readonly "onUpdate:valuesByFile"?: ((value: import('./types').ContractTemplateRenderValuesByFile) => any) | undefined;
49
+ readonly "onUpdate:values"?: ((value: ContractTemplateRenderValues) => any) | undefined;
50
+ readonly "onControl-warning"?: ((warning: import('./types').ContractTemplateControlWarning) => any) | undefined;
51
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
52
+ $attrs: import('vue').Attrs;
53
+ $refs: {
54
+ [x: string]: unknown;
55
+ } & {
56
+ rendererElement: HTMLElement;
57
+ pagesViewportElement: HTMLDivElement;
58
+ fieldListElement: HTMLDivElement;
59
+ };
60
+ $slots: Readonly<{
61
+ [name: string]: import('vue').Slot<any> | undefined;
62
+ }>;
63
+ $root: import('vue').ComponentPublicInstance | null;
64
+ $parent: import('vue').ComponentPublicInstance | null;
65
+ $host: Element | null;
66
+ $emit: ((event: "validate", errors: ContractTemplateValidationError[]) => void) & ((event: "change", value: ContractTemplateRenderValues) => void) & ((event: "submit", value: ContractTemplateRenderValues) => void) & ((event: "update:zoom", value: number) => void) & ((event: "update:activeFileId", value: string) => void) & ((event: "update:valuesByFile", value: import('./types').ContractTemplateRenderValuesByFile) => void) & ((event: "update:values", value: ContractTemplateRenderValues) => void) & ((event: "control-warning", warning: import('./types').ContractTemplateControlWarning) => void);
67
+ $el: HTMLElement;
68
+ $options: import('vue').ComponentOptionsBase<Readonly<ContractTemplateRendererProps> & Readonly<{
69
+ onValidate?: ((errors: ContractTemplateValidationError[]) => any) | undefined;
70
+ onChange?: ((value: ContractTemplateRenderValues) => any) | undefined;
71
+ onSubmit?: ((value: ContractTemplateRenderValues) => any) | undefined;
72
+ "onUpdate:zoom"?: ((value: number) => any) | undefined;
73
+ "onUpdate:activeFileId"?: ((value: string) => any) | undefined;
74
+ "onUpdate:valuesByFile"?: ((value: import('./types').ContractTemplateRenderValuesByFile) => any) | undefined;
75
+ "onUpdate:values"?: ((value: ContractTemplateRenderValues) => any) | undefined;
76
+ "onControl-warning"?: ((warning: import('./types').ContractTemplateControlWarning) => any) | undefined;
77
+ }>, {
78
+ validate: () => ContractTemplateValidationError[];
79
+ submit: () => false | ContractTemplateRenderValues;
80
+ fitWidth: () => number;
81
+ scrollToPage: (pageId: string) => void;
82
+ setZoom: (value: number) => number;
83
+ getZoom: () => number;
84
+ resetZoom: () => number;
85
+ scrollToVariable: (variableKey: string) => void;
86
+ getValues: () => ContractTemplateRenderValues;
87
+ setValues: (values: ContractTemplateRenderValues) => void;
88
+ resetValues: () => ContractTemplateRenderValues;
89
+ showValidation: (errors: ContractTemplateValidationError[]) => void;
90
+ focusError: (error: ContractTemplateValidationError) => void;
91
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
92
+ validate: (errors: ContractTemplateValidationError[]) => any;
93
+ change: (value: ContractTemplateRenderValues) => any;
94
+ submit: (value: ContractTemplateRenderValues) => any;
95
+ "update:zoom": (value: number) => any;
96
+ "update:activeFileId": (value: string) => any;
97
+ "update:valuesByFile": (value: import('./types').ContractTemplateRenderValuesByFile) => any;
98
+ "update:values": (value: ContractTemplateRenderValues) => any;
99
+ "control-warning": (warning: import('./types').ContractTemplateControlWarning) => any;
100
+ }, string, {
101
+ values: ContractTemplateRenderValues;
102
+ disabled: boolean;
103
+ title: string;
104
+ template: import('./types').ContractTemplateData;
105
+ readonly: boolean;
106
+ zoom: number;
107
+ showToolbar: boolean;
108
+ showSubmitButton: boolean;
109
+ contractFontBaseUrl: string;
110
+ selectorHttp: undefined;
111
+ selectorUrlPrefix: string;
112
+ showValidateButton: boolean;
113
+ showResetButton: boolean;
114
+ interactionMode: import('./types').ContractTemplateRendererMode;
115
+ validateOnSubmit: boolean;
116
+ showPageMeta: boolean;
117
+ collapsiblePanel: boolean;
118
+ controlRegistry: import('./types').ContractTemplateControlRegistry;
119
+ optionResolver: import('./types').ContractTemplateOptionResolver;
120
+ requester: import('./types').ContractTemplateControlRequester;
121
+ allowedRemoteOrigins: string[];
122
+ remoteRequestTimeoutMs: number;
123
+ remoteOptionsCacheTtlMs: number;
124
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
125
+ beforeCreate?: (() => void) | (() => void)[];
126
+ created?: (() => void) | (() => void)[];
127
+ beforeMount?: (() => void) | (() => void)[];
128
+ mounted?: (() => void) | (() => void)[];
129
+ beforeUpdate?: (() => void) | (() => void)[];
130
+ updated?: (() => void) | (() => void)[];
131
+ activated?: (() => void) | (() => void)[];
132
+ deactivated?: (() => void) | (() => void)[];
133
+ beforeDestroy?: (() => void) | (() => void)[];
134
+ beforeUnmount?: (() => void) | (() => void)[];
135
+ destroyed?: (() => void) | (() => void)[];
136
+ unmounted?: (() => void) | (() => void)[];
137
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
138
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
139
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
140
+ };
141
+ $forceUpdate: () => void;
142
+ $nextTick: typeof nextTick;
143
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
144
+ } & Readonly<{
145
+ values: ContractTemplateRenderValues;
146
+ disabled: boolean;
147
+ title: string;
148
+ template: import('./types').ContractTemplateData;
149
+ readonly: boolean;
150
+ zoom: number;
151
+ showToolbar: boolean;
152
+ showSubmitButton: boolean;
153
+ contractFontBaseUrl: string;
154
+ selectorHttp: undefined;
155
+ selectorUrlPrefix: string;
156
+ showValidateButton: boolean;
157
+ showResetButton: boolean;
158
+ interactionMode: import('./types').ContractTemplateRendererMode;
159
+ validateOnSubmit: boolean;
160
+ showPageMeta: boolean;
161
+ collapsiblePanel: boolean;
162
+ controlRegistry: import('./types').ContractTemplateControlRegistry;
163
+ optionResolver: import('./types').ContractTemplateOptionResolver;
164
+ requester: import('./types').ContractTemplateControlRequester;
165
+ allowedRemoteOrigins: string[];
166
+ remoteRequestTimeoutMs: number;
167
+ remoteOptionsCacheTtlMs: number;
168
+ }> & Omit<Readonly<ContractTemplateRendererProps> & Readonly<{
169
+ onValidate?: ((errors: ContractTemplateValidationError[]) => any) | undefined;
170
+ onChange?: ((value: ContractTemplateRenderValues) => any) | undefined;
171
+ onSubmit?: ((value: ContractTemplateRenderValues) => any) | undefined;
172
+ "onUpdate:zoom"?: ((value: number) => any) | undefined;
173
+ "onUpdate:activeFileId"?: ((value: string) => any) | undefined;
174
+ "onUpdate:valuesByFile"?: ((value: import('./types').ContractTemplateRenderValuesByFile) => any) | undefined;
175
+ "onUpdate:values"?: ((value: ContractTemplateRenderValues) => any) | undefined;
176
+ "onControl-warning"?: ((warning: import('./types').ContractTemplateControlWarning) => any) | undefined;
177
+ }>, "validate" | "submit" | "fitWidth" | "scrollToPage" | "setZoom" | "getZoom" | "resetZoom" | "scrollToVariable" | "focusError" | "getValues" | "setValues" | "resetValues" | "showValidation" | ("values" | "disabled" | "title" | "template" | "readonly" | "zoom" | "showToolbar" | "showSubmitButton" | "contractFontBaseUrl" | "selectorHttp" | "selectorUrlPrefix" | "showValidateButton" | "showResetButton" | "interactionMode" | "validateOnSubmit" | "showPageMeta" | "collapsiblePanel" | "controlRegistry" | "optionResolver" | "requester" | "allowedRemoteOrigins" | "remoteRequestTimeoutMs" | "remoteOptionsCacheTtlMs")> & {
178
+ validate: () => ContractTemplateValidationError[];
179
+ submit: () => false | ContractTemplateRenderValues;
180
+ fitWidth: () => number;
181
+ scrollToPage: (pageId: string) => void;
182
+ setZoom: (value: number) => number;
183
+ getZoom: () => number;
184
+ resetZoom: () => number;
185
+ scrollToVariable: (variableKey: string) => void;
186
+ getValues: () => ContractTemplateRenderValues;
187
+ setValues: (values: ContractTemplateRenderValues) => void;
188
+ resetValues: () => ContractTemplateRenderValues;
189
+ showValidation: (errors: ContractTemplateValidationError[]) => void;
190
+ focusError: (error: ContractTemplateValidationError) => void;
191
+ } & {} & import('vue').ComponentCustomProperties & {} & {
192
+ $slots: Readonly<{
193
+ field?: (props: ContractTemplateRendererFieldSlotProps) => VNode[] | undefined;
194
+ headerExtra?: () => VNode[] | undefined;
195
+ fileBar?: () => VNode[] | undefined;
196
+ }> & {
197
+ field?: (props: ContractTemplateRendererFieldSlotProps) => VNode[] | undefined;
198
+ headerExtra?: () => VNode[] | undefined;
199
+ fileBar?: () => VNode[] | undefined;
200
+ };
201
+ }) | null;
16
202
  };
17
203
  rootEl: HTMLElement;
18
204
  };
19
205
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
206
  declare const __VLS_component: import('vue').DefineComponent<ContractTemplateRendererProps, {
207
+ getAllValues: () => import('./types').ContractTemplateRenderValuesByFile;
208
+ validateAll: () => ContractTemplateValidationError[];
21
209
  getValues: () => ContractTemplateRenderValues;
22
210
  setValues: (values: ContractTemplateRenderValues) => void;
23
211
  validate: () => ContractTemplateValidationError[];
@@ -34,15 +222,19 @@ declare const __VLS_component: import('vue').DefineComponent<ContractTemplateRen
34
222
  change: (value: ContractTemplateRenderValues) => any;
35
223
  submit: (value: ContractTemplateRenderValues) => any;
36
224
  "update:zoom": (value: number) => any;
225
+ "update:activeFileId": (value: string) => any;
226
+ "update:valuesByFile": (value: import('./types').ContractTemplateRenderValuesByFile) => any;
37
227
  "update:values": (value: ContractTemplateRenderValues) => any;
38
- "control-warning": (warning: ContractTemplateControlWarning) => any;
228
+ "control-warning": (warning: import('./types').ContractTemplateControlWarning) => any;
39
229
  }, string, import('vue').PublicProps, Readonly<ContractTemplateRendererProps> & Readonly<{
40
230
  onValidate?: ((errors: ContractTemplateValidationError[]) => any) | undefined;
41
231
  onChange?: ((value: ContractTemplateRenderValues) => any) | undefined;
42
232
  onSubmit?: ((value: ContractTemplateRenderValues) => any) | undefined;
43
233
  "onUpdate:zoom"?: ((value: number) => any) | undefined;
234
+ "onUpdate:activeFileId"?: ((value: string) => any) | undefined;
235
+ "onUpdate:valuesByFile"?: ((value: import('./types').ContractTemplateRenderValuesByFile) => any) | undefined;
44
236
  "onUpdate:values"?: ((value: ContractTemplateRenderValues) => any) | undefined;
45
- "onControl-warning"?: ((warning: ContractTemplateControlWarning) => any) | undefined;
237
+ "onControl-warning"?: ((warning: import('./types').ContractTemplateControlWarning) => any) | undefined;
46
238
  }>, {
47
239
  values: ContractTemplateRenderValues;
48
240
  disabled: boolean;
@@ -68,9 +260,195 @@ declare const __VLS_component: import('vue').DefineComponent<ContractTemplateRen
68
260
  remoteRequestTimeoutMs: number;
69
261
  remoteOptionsCacheTtlMs: number;
70
262
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
71
- rendererElement: HTMLElement;
72
- pagesViewportElement: HTMLDivElement;
73
- fieldListElement: HTMLDivElement;
263
+ renderer: ({
264
+ $: import('vue').ComponentInternalInstance;
265
+ $data: {};
266
+ $props: {
267
+ readonly files?: import('./types').ContractTemplateFile[] | undefined;
268
+ readonly activeFileId?: string | undefined;
269
+ readonly valuesByFile?: import('./types').ContractTemplateRenderValuesByFile | undefined;
270
+ readonly template?: import('./types').ContractTemplateData | undefined;
271
+ readonly values?: ContractTemplateRenderValues | undefined;
272
+ readonly interactionMode?: import('./types').ContractTemplateRendererMode | undefined;
273
+ readonly readonly?: boolean | undefined;
274
+ readonly disabled?: boolean | undefined;
275
+ readonly title?: string | undefined;
276
+ readonly showSubmitButton?: boolean | undefined;
277
+ readonly validateOnSubmit?: boolean | undefined;
278
+ readonly showValidateButton?: boolean | undefined;
279
+ readonly showResetButton?: boolean | undefined;
280
+ readonly showToolbar?: boolean | undefined;
281
+ readonly showPageMeta?: boolean | undefined;
282
+ readonly collapsiblePanel?: boolean | undefined;
283
+ readonly zoom?: number | undefined;
284
+ readonly controlRegistry?: import('./types').ContractTemplateControlRegistry | undefined;
285
+ readonly optionResolver?: import('./types').ContractTemplateOptionResolver | undefined;
286
+ readonly requester?: import('./types').ContractTemplateControlRequester | undefined;
287
+ readonly allowedRemoteOrigins?: string[] | undefined;
288
+ readonly remoteRequestTimeoutMs?: number | undefined;
289
+ readonly remoteOptionsCacheTtlMs?: number | undefined;
290
+ readonly selectorHttp?: unknown;
291
+ readonly selectorUrlPrefix?: string | undefined;
292
+ readonly contractFontBaseUrl?: string | undefined;
293
+ readonly onValidate?: ((errors: ContractTemplateValidationError[]) => any) | undefined;
294
+ readonly onChange?: ((value: ContractTemplateRenderValues) => any) | undefined;
295
+ readonly onSubmit?: ((value: ContractTemplateRenderValues) => any) | undefined;
296
+ readonly "onUpdate:zoom"?: ((value: number) => any) | undefined;
297
+ readonly "onUpdate:activeFileId"?: ((value: string) => any) | undefined;
298
+ readonly "onUpdate:valuesByFile"?: ((value: import('./types').ContractTemplateRenderValuesByFile) => any) | undefined;
299
+ readonly "onUpdate:values"?: ((value: ContractTemplateRenderValues) => any) | undefined;
300
+ readonly "onControl-warning"?: ((warning: import('./types').ContractTemplateControlWarning) => any) | undefined;
301
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps;
302
+ $attrs: import('vue').Attrs;
303
+ $refs: {
304
+ [x: string]: unknown;
305
+ } & {
306
+ rendererElement: HTMLElement;
307
+ pagesViewportElement: HTMLDivElement;
308
+ fieldListElement: HTMLDivElement;
309
+ };
310
+ $slots: Readonly<{
311
+ [name: string]: import('vue').Slot<any> | undefined;
312
+ }>;
313
+ $root: import('vue').ComponentPublicInstance | null;
314
+ $parent: import('vue').ComponentPublicInstance | null;
315
+ $host: Element | null;
316
+ $emit: ((event: "validate", errors: ContractTemplateValidationError[]) => void) & ((event: "change", value: ContractTemplateRenderValues) => void) & ((event: "submit", value: ContractTemplateRenderValues) => void) & ((event: "update:zoom", value: number) => void) & ((event: "update:activeFileId", value: string) => void) & ((event: "update:valuesByFile", value: import('./types').ContractTemplateRenderValuesByFile) => void) & ((event: "update:values", value: ContractTemplateRenderValues) => void) & ((event: "control-warning", warning: import('./types').ContractTemplateControlWarning) => void);
317
+ $el: HTMLElement;
318
+ $options: import('vue').ComponentOptionsBase<Readonly<ContractTemplateRendererProps> & Readonly<{
319
+ onValidate?: ((errors: ContractTemplateValidationError[]) => any) | undefined;
320
+ onChange?: ((value: ContractTemplateRenderValues) => any) | undefined;
321
+ onSubmit?: ((value: ContractTemplateRenderValues) => any) | undefined;
322
+ "onUpdate:zoom"?: ((value: number) => any) | undefined;
323
+ "onUpdate:activeFileId"?: ((value: string) => any) | undefined;
324
+ "onUpdate:valuesByFile"?: ((value: import('./types').ContractTemplateRenderValuesByFile) => any) | undefined;
325
+ "onUpdate:values"?: ((value: ContractTemplateRenderValues) => any) | undefined;
326
+ "onControl-warning"?: ((warning: import('./types').ContractTemplateControlWarning) => any) | undefined;
327
+ }>, {
328
+ validate: () => ContractTemplateValidationError[];
329
+ submit: () => false | ContractTemplateRenderValues;
330
+ fitWidth: () => number;
331
+ scrollToPage: (pageId: string) => void;
332
+ setZoom: (value: number) => number;
333
+ getZoom: () => number;
334
+ resetZoom: () => number;
335
+ scrollToVariable: (variableKey: string) => void;
336
+ getValues: () => ContractTemplateRenderValues;
337
+ setValues: (values: ContractTemplateRenderValues) => void;
338
+ resetValues: () => ContractTemplateRenderValues;
339
+ showValidation: (errors: ContractTemplateValidationError[]) => void;
340
+ focusError: (error: ContractTemplateValidationError) => void;
341
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
342
+ validate: (errors: ContractTemplateValidationError[]) => any;
343
+ change: (value: ContractTemplateRenderValues) => any;
344
+ submit: (value: ContractTemplateRenderValues) => any;
345
+ "update:zoom": (value: number) => any;
346
+ "update:activeFileId": (value: string) => any;
347
+ "update:valuesByFile": (value: import('./types').ContractTemplateRenderValuesByFile) => any;
348
+ "update:values": (value: ContractTemplateRenderValues) => any;
349
+ "control-warning": (warning: import('./types').ContractTemplateControlWarning) => any;
350
+ }, string, {
351
+ values: ContractTemplateRenderValues;
352
+ disabled: boolean;
353
+ title: string;
354
+ template: import('./types').ContractTemplateData;
355
+ readonly: boolean;
356
+ zoom: number;
357
+ showToolbar: boolean;
358
+ showSubmitButton: boolean;
359
+ contractFontBaseUrl: string;
360
+ selectorHttp: undefined;
361
+ selectorUrlPrefix: string;
362
+ showValidateButton: boolean;
363
+ showResetButton: boolean;
364
+ interactionMode: import('./types').ContractTemplateRendererMode;
365
+ validateOnSubmit: boolean;
366
+ showPageMeta: boolean;
367
+ collapsiblePanel: boolean;
368
+ controlRegistry: import('./types').ContractTemplateControlRegistry;
369
+ optionResolver: import('./types').ContractTemplateOptionResolver;
370
+ requester: import('./types').ContractTemplateControlRequester;
371
+ allowedRemoteOrigins: string[];
372
+ remoteRequestTimeoutMs: number;
373
+ remoteOptionsCacheTtlMs: number;
374
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & {
375
+ beforeCreate?: (() => void) | (() => void)[];
376
+ created?: (() => void) | (() => void)[];
377
+ beforeMount?: (() => void) | (() => void)[];
378
+ mounted?: (() => void) | (() => void)[];
379
+ beforeUpdate?: (() => void) | (() => void)[];
380
+ updated?: (() => void) | (() => void)[];
381
+ activated?: (() => void) | (() => void)[];
382
+ deactivated?: (() => void) | (() => void)[];
383
+ beforeDestroy?: (() => void) | (() => void)[];
384
+ beforeUnmount?: (() => void) | (() => void)[];
385
+ destroyed?: (() => void) | (() => void)[];
386
+ unmounted?: (() => void) | (() => void)[];
387
+ renderTracked?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
388
+ renderTriggered?: ((e: import('vue').DebuggerEvent) => void) | ((e: import('vue').DebuggerEvent) => void)[];
389
+ errorCaptured?: ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void) | ((err: unknown, instance: import('vue').ComponentPublicInstance | null, info: string) => boolean | void)[];
390
+ };
391
+ $forceUpdate: () => void;
392
+ $nextTick: typeof nextTick;
393
+ $watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (...args: [R, R, import('@vue/reactivity').OnCleanup]) => any : (...args: [any, any, import('@vue/reactivity').OnCleanup]) => any, options?: import('vue').WatchOptions): import('vue').WatchStopHandle;
394
+ } & Readonly<{
395
+ values: ContractTemplateRenderValues;
396
+ disabled: boolean;
397
+ title: string;
398
+ template: import('./types').ContractTemplateData;
399
+ readonly: boolean;
400
+ zoom: number;
401
+ showToolbar: boolean;
402
+ showSubmitButton: boolean;
403
+ contractFontBaseUrl: string;
404
+ selectorHttp: undefined;
405
+ selectorUrlPrefix: string;
406
+ showValidateButton: boolean;
407
+ showResetButton: boolean;
408
+ interactionMode: import('./types').ContractTemplateRendererMode;
409
+ validateOnSubmit: boolean;
410
+ showPageMeta: boolean;
411
+ collapsiblePanel: boolean;
412
+ controlRegistry: import('./types').ContractTemplateControlRegistry;
413
+ optionResolver: import('./types').ContractTemplateOptionResolver;
414
+ requester: import('./types').ContractTemplateControlRequester;
415
+ allowedRemoteOrigins: string[];
416
+ remoteRequestTimeoutMs: number;
417
+ remoteOptionsCacheTtlMs: number;
418
+ }> & Omit<Readonly<ContractTemplateRendererProps> & Readonly<{
419
+ onValidate?: ((errors: ContractTemplateValidationError[]) => any) | undefined;
420
+ onChange?: ((value: ContractTemplateRenderValues) => any) | undefined;
421
+ onSubmit?: ((value: ContractTemplateRenderValues) => any) | undefined;
422
+ "onUpdate:zoom"?: ((value: number) => any) | undefined;
423
+ "onUpdate:activeFileId"?: ((value: string) => any) | undefined;
424
+ "onUpdate:valuesByFile"?: ((value: import('./types').ContractTemplateRenderValuesByFile) => any) | undefined;
425
+ "onUpdate:values"?: ((value: ContractTemplateRenderValues) => any) | undefined;
426
+ "onControl-warning"?: ((warning: import('./types').ContractTemplateControlWarning) => any) | undefined;
427
+ }>, "validate" | "submit" | "fitWidth" | "scrollToPage" | "setZoom" | "getZoom" | "resetZoom" | "scrollToVariable" | "focusError" | "getValues" | "setValues" | "resetValues" | "showValidation" | ("values" | "disabled" | "title" | "template" | "readonly" | "zoom" | "showToolbar" | "showSubmitButton" | "contractFontBaseUrl" | "selectorHttp" | "selectorUrlPrefix" | "showValidateButton" | "showResetButton" | "interactionMode" | "validateOnSubmit" | "showPageMeta" | "collapsiblePanel" | "controlRegistry" | "optionResolver" | "requester" | "allowedRemoteOrigins" | "remoteRequestTimeoutMs" | "remoteOptionsCacheTtlMs")> & {
428
+ validate: () => ContractTemplateValidationError[];
429
+ submit: () => false | ContractTemplateRenderValues;
430
+ fitWidth: () => number;
431
+ scrollToPage: (pageId: string) => void;
432
+ setZoom: (value: number) => number;
433
+ getZoom: () => number;
434
+ resetZoom: () => number;
435
+ scrollToVariable: (variableKey: string) => void;
436
+ getValues: () => ContractTemplateRenderValues;
437
+ setValues: (values: ContractTemplateRenderValues) => void;
438
+ resetValues: () => ContractTemplateRenderValues;
439
+ showValidation: (errors: ContractTemplateValidationError[]) => void;
440
+ focusError: (error: ContractTemplateValidationError) => void;
441
+ } & {} & import('vue').ComponentCustomProperties & {} & {
442
+ $slots: Readonly<{
443
+ field?: (props: ContractTemplateRendererFieldSlotProps) => VNode[] | undefined;
444
+ headerExtra?: () => VNode[] | undefined;
445
+ fileBar?: () => VNode[] | undefined;
446
+ }> & {
447
+ field?: (props: ContractTemplateRendererFieldSlotProps) => VNode[] | undefined;
448
+ headerExtra?: () => VNode[] | undefined;
449
+ fileBar?: () => VNode[] | undefined;
450
+ };
451
+ }) | null;
74
452
  }, HTMLElement>;
75
453
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
76
454
  export default _default;
@@ -0,0 +1,14 @@
1
+ import { ContractTemplateFile, ContractTemplateRendererProps, ContractTemplateRenderValues, ContractTemplateRenderValuesByFile, ContractTemplateValidationError } from '../types';
2
+ /** 填写端只识别持久化 id,不使用设计器会补造文件/id 的编辑态归一化。 */
3
+ export declare function useRendererFiles(props: ContractTemplateRendererProps, onSelect: (id: string) => void, onValues: (values: ContractTemplateRenderValuesByFile) => void): {
4
+ enabled: import('vue').ComputedRef<boolean>;
5
+ files: import('vue').ComputedRef<ContractTemplateFile[]>;
6
+ activeId: import('vue').Ref<string, string>;
7
+ activeFile: import('vue').ComputedRef<ContractTemplateFile | undefined>;
8
+ values: import('vue').Ref<ContractTemplateRenderValuesByFile, ContractTemplateRenderValuesByFile>;
9
+ fileErrors: import('vue').ComputedRef<ContractTemplateValidationError[]>;
10
+ select: (id: string) => void;
11
+ update: (value: ContractTemplateRenderValues) => void;
12
+ getAllValues: () => ContractTemplateRenderValuesByFile;
13
+ validateAll: () => ContractTemplateValidationError[];
14
+ };
@@ -137,10 +137,17 @@ export declare function collectTemplateValueVariableKeys(value: Pick<ContractTem
137
137
  * 一并裁掉,外部脏模板会在首次正文同步后静默变成合法数据,用户反而看不到可定位错误。
138
138
  */
139
139
  export declare function syncTemplateVariablesWithPages(value: ContractTemplateData): ContractTemplateData;
140
+ /** 自动分页用的表格行测量结果,坐标相对正文容器顶部。 */
141
+ export interface ContractTemplateTableRowMeasurement {
142
+ top: number;
143
+ height: number;
144
+ }
140
145
  /** 自动分页用的单个顶层块测量结果,坐标相对正文容器顶部。 */
141
146
  export interface ContractTemplateBlockMeasurement {
142
147
  top: number;
143
148
  height: number;
149
+ tableRows?: ContractTemplateTableRowMeasurement[];
150
+ trailingTextBlockHeight?: number;
144
151
  }
145
152
  /** 自动分页结果:`splitIndex` 为溢出块下标,`-1` 表示当前页无需拆分。 */
146
153
  export interface ContractTemplateContentSplitResult {
@@ -151,8 +158,8 @@ export interface ContractTemplateContentSplitResult {
151
158
  /**
152
159
  * 依据实测块高决定当前页在哪个顶层块处溢出。
153
160
  *
154
- * 只按块边界拆分:找到第一个底边超出可用高度(留 1px 容差抵消亚像素误差)的块,
155
- * 把它及之后的内容整体挪到下一页。返回 `undefined` 表示无需分页。
161
+ * 普通块仍在顶层边界整体迁移;表格是唯一允许内部拆分的块,按完整行分页并避开
162
+ * rowspan。返回 `undefined` 表示无需分页,或首个超高非表格块无法安全拆分。
156
163
  */
157
164
  export declare function splitPageContentByMeasurements(content: JSONContent[] | undefined, measurements: ContractTemplateBlockMeasurement[], maxContentHeight: number): ContractTemplateContentSplitResult | undefined;
158
165
  /**
@@ -0,0 +1,6 @@
1
+ import { Extension } from '@tiptap/core';
2
+ /**
3
+ * Enter 拆分块级正文时,Tiptap 会复制原段落的 `textAlign` 属性。
4
+ * 仅接管顶层正文段落/标题,避免改变列表、表格及其它嵌套块的既有键盘行为。
5
+ */
6
+ export declare const ContractParagraphEnter: Extension<any, any>;