@guodun/antdv 1.4.2 → 1.4.3

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 (34) hide show
  1. package/dist/es/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.mjs +304 -293
  2. package/dist/es/components/contract-signing-location/src/coordinates.mjs +23 -23
  3. package/dist/es/components/contract-signing-location/src/location-rules.mjs +20 -10
  4. package/dist/es/components/contract-signing-location/src/page-layout.mjs +12 -9
  5. package/dist/es/components/contract-signing-location/src/template-source.mjs +2 -0
  6. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.mjs +186 -148
  7. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.mjs +5 -0
  8. package/dist/es/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.mjs +179 -0
  9. package/dist/es/components/pro-contract-template-designer/src/DesignerPage.vue.mjs +104 -81
  10. package/dist/es/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.mjs +1205 -1035
  11. package/dist/es/components/pro-contract-template-designer/style/index.css +1 -1
  12. package/dist/lib/components/contract-signing-location/src/ContractSigningLocationCanvas.vue.cjs +1 -1
  13. package/dist/lib/components/contract-signing-location/src/coordinates.cjs +1 -1
  14. package/dist/lib/components/contract-signing-location/src/location-rules.cjs +1 -1
  15. package/dist/lib/components/contract-signing-location/src/page-layout.cjs +1 -1
  16. package/dist/lib/components/contract-signing-location/src/template-source.cjs +1 -1
  17. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.cjs +1 -1
  18. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.cjs +1 -0
  19. package/dist/lib/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.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/style/index.css +1 -1
  23. package/dist/theme/icon.css +1 -1
  24. package/dist/theme/index.css +1 -1
  25. package/dist/types/components/contract-signing-location/src/coordinates.d.ts +2 -2
  26. package/dist/types/components/contract-signing-location/src/page-layout.d.ts +2 -2
  27. package/dist/types/components/contract-signing-location/src/template-source.d.ts +2 -0
  28. package/dist/types/components/contract-signing-location/src/types.d.ts +3 -0
  29. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateDesignerWorkspaceHeader.vue.d.ts +10 -0
  30. package/dist/types/components/pro-contract-template-designer/src/ContractTemplateTextBubbleMenu.vue.d.ts +43 -0
  31. package/dist/types/components/pro-contract-template-designer/src/DesignerPage.vue.d.ts +22 -0
  32. package/dist/types/components/pro-contract-template-designer/src/ProContractTemplateDesigner.vue.d.ts +90 -0
  33. package/dist/types/components/pro-contract-template-designer/src/utils/context-menu-viewport.d.ts +3 -0
  34. package/package.json +3 -3
@@ -17,6 +17,19 @@ type __VLS_Props = {
17
17
  selectedSigningPlacementId?: string;
18
18
  processImageFile?: (file: File) => Promise<string | null>;
19
19
  };
20
+ /**
21
+ * 选区在视口坐标下的包围盒;供选区气泡工具条定位。
22
+ *
23
+ * 「哪种选区不配气泡」的判断收在这里:空选区、`CellSelection`、`NodeSelection`
24
+ * 一律返回 `undefined`,父组件就不用再去猜 `isTableActive` 的语义
25
+ * (光标只是落在表格里时它也为真,那种情况气泡应该照常出现)。
26
+ */
27
+ declare function getSelectionViewportRect(): {
28
+ top: number;
29
+ bottom: number;
30
+ left: number;
31
+ right: number;
32
+ } | undefined;
20
33
  /**
21
34
  * 探测每个表格命令当前是否可用,用于禁用右键菜单里不适用的项。
22
35
  *
@@ -31,6 +44,13 @@ declare function getTableCommandCapabilities(): ContractTemplateTableCommandCapa
31
44
  * 但事务不会被提交到 view,因此这里只是「试算」,编辑器内容保持不变。
32
45
  */
33
46
  declare function getAffectedVariableCount(action: 'delete-table-row' | 'delete-table-column' | 'delete-table'): number;
47
+ /**
48
+ * 由选区气泡的「更多」调起完整正文右键菜单。
49
+ *
50
+ * 走同一条 `emitTextContextMenu` 通道,选区宽度与前置文字仍在页面内一次算好,
51
+ * 父组件不需要为气泡再拼一份会漂移的载荷。
52
+ */
53
+ declare function requestTextContextMenu(clientX: number, clientY: number): void;
34
54
  /**
35
55
  * 汇总工具栏需要的编辑器状态。
36
56
  *
@@ -122,6 +142,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {
122
142
  insertContentImage: typeof insertContentImage;
123
143
  updateSelectedContentImage: typeof updateSelectedContentImage;
124
144
  getSelectionRange: typeof getSelectionRange;
145
+ getSelectionViewportRect: typeof getSelectionViewportRect;
146
+ requestTextContextMenu: typeof requestTextContextMenu;
125
147
  hasOverflowContent: typeof hasOverflowContent;
126
148
  updateVariable: typeof updateVariable;
127
149
  removeVariable: typeof removeVariable;
@@ -114,6 +114,7 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
114
114
  zoomOutDisabled: boolean;
115
115
  zoomInDisabled: boolean;
116
116
  isFullscreen: boolean;
117
+ immersive: boolean;
117
118
  pageDecorationsOpen: boolean;
118
119
  pageDecorationsStudioId: string;
119
120
  pageDecorationsPresetLabel: string;
@@ -123,6 +124,7 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
123
124
  footer: boolean;
124
125
  watermark: boolean;
125
126
  };
127
+ chromeControlsId: string;
126
128
  }> & Readonly<{
127
129
  onClear?: (() => any) | undefined;
128
130
  onValidate?: (() => any) | undefined;
@@ -132,10 +134,14 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
132
134
  onZoomIn?: (() => any) | undefined;
133
135
  onResetZoom?: (() => any) | undefined;
134
136
  onToggleFullscreen?: (() => any) | undefined;
137
+ onToggleImmersive?: (() => any) | undefined;
135
138
  onSubmitData?: (() => any) | undefined;
136
139
  onTogglePageDecorations?: (() => any) | undefined;
140
+ onToggleChrome?: (() => any) | undefined;
137
141
  }>, {
138
142
  focusPageDecorations: () => void | undefined;
143
+ focusImmersive: () => void | undefined;
144
+ focusChromeToggle: () => void | undefined;
139
145
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
140
146
  clear: () => any;
141
147
  validate: () => any;
@@ -145,8 +151,10 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
145
151
  zoomIn: () => any;
146
152
  resetZoom: () => any;
147
153
  toggleFullscreen: () => any;
154
+ toggleImmersive: () => any;
148
155
  submitData: () => any;
149
156
  togglePageDecorations: () => any;
157
+ toggleChrome: () => any;
150
158
  }, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
151
159
  workspaceHeader: HTMLElement;
152
160
  }, HTMLElement, import('vue').ComponentProvideOptions, {
@@ -168,6 +176,7 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
168
176
  zoomOutDisabled: boolean;
169
177
  zoomInDisabled: boolean;
170
178
  isFullscreen: boolean;
179
+ immersive: boolean;
171
180
  pageDecorationsOpen: boolean;
172
181
  pageDecorationsStudioId: string;
173
182
  pageDecorationsPresetLabel: string;
@@ -177,6 +186,7 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
177
186
  footer: boolean;
178
187
  watermark: boolean;
179
188
  };
189
+ chromeControlsId: string;
180
190
  }> & Readonly<{
181
191
  onClear?: (() => any) | undefined;
182
192
  onValidate?: (() => any) | undefined;
@@ -186,11 +196,17 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
186
196
  onZoomIn?: (() => any) | undefined;
187
197
  onResetZoom?: (() => any) | undefined;
188
198
  onToggleFullscreen?: (() => any) | undefined;
199
+ onToggleImmersive?: (() => any) | undefined;
189
200
  onSubmitData?: (() => any) | undefined;
190
201
  onTogglePageDecorations?: (() => any) | undefined;
202
+ onToggleChrome?: (() => any) | undefined;
191
203
  }>, {
192
204
  focusPageDecorations: () => void | undefined;
205
+ focusImmersive: () => void | undefined;
206
+ focusChromeToggle: () => void | undefined;
193
207
  }, {}, {}, {}, {}> | null;
208
+ workspaceChromeHandleElement: HTMLButtonElement;
209
+ immersiveExitElement: HTMLButtonElement;
194
210
  canvasElement: HTMLDivElement;
195
211
  pageDecorationsStudioElement: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
196
212
  id?: string;
@@ -496,6 +512,80 @@ declare const _default: import('vue').DefineComponent<ContractTemplateDesignerPr
496
512
  focusBindSearch: () => void;
497
513
  focusFirstButton: () => void;
498
514
  }, {}, {}, {}, {}> | null;
515
+ textBubbleElement: import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
516
+ x: number;
517
+ y: number;
518
+ editorState: ContractTemplateEditorState;
519
+ fontSizePresetOptions: Array<{
520
+ label: string;
521
+ value: number | string;
522
+ }>;
523
+ currentEditorFontSize: number;
524
+ editorFontSizeSearchValue: string;
525
+ currentEditorTextColor: string;
526
+ textAlignOptions: Array<{
527
+ label: string;
528
+ value: ContractTemplateEditorTextAlign;
529
+ }>;
530
+ }> & Readonly<{
531
+ onMore?: ((clientX: number, clientY: number) => any) | undefined;
532
+ onCommand?: ((command: ContractTemplateEditorCommand) => any) | undefined;
533
+ "onPatch-font-size"?: ((value: unknown) => any) | undefined;
534
+ "onPatch-color"?: ((value: string) => any) | undefined;
535
+ "onPatch-text-align"?: ((value: unknown) => any) | undefined;
536
+ "onFont-size-search"?: ((value: string) => any) | undefined;
537
+ "onFont-size-commit"?: (() => any) | undefined;
538
+ "onFont-size-dropdown-change"?: ((open: boolean) => any) | undefined;
539
+ "onFont-size-keydown"?: ((event: KeyboardEvent) => any) | undefined;
540
+ }>, {
541
+ getMenuElement: () => HTMLElement | undefined;
542
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
543
+ more: (clientX: number, clientY: number) => any;
544
+ command: (command: ContractTemplateEditorCommand) => any;
545
+ "patch-font-size": (value: unknown) => any;
546
+ "patch-color": (value: string) => any;
547
+ "patch-text-align": (value: unknown) => any;
548
+ "font-size-search": (value: string) => any;
549
+ "font-size-commit": () => any;
550
+ "font-size-dropdown-change": (open: boolean) => any;
551
+ "font-size-keydown": (event: KeyboardEvent) => any;
552
+ }, import('vue').PublicProps, {}, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
553
+ menuElement: HTMLDivElement;
554
+ }, HTMLDivElement, import('vue').ComponentProvideOptions, {
555
+ P: {};
556
+ B: {};
557
+ D: {};
558
+ C: {};
559
+ M: {};
560
+ Defaults: {};
561
+ }, Readonly<{
562
+ x: number;
563
+ y: number;
564
+ editorState: ContractTemplateEditorState;
565
+ fontSizePresetOptions: Array<{
566
+ label: string;
567
+ value: number | string;
568
+ }>;
569
+ currentEditorFontSize: number;
570
+ editorFontSizeSearchValue: string;
571
+ currentEditorTextColor: string;
572
+ textAlignOptions: Array<{
573
+ label: string;
574
+ value: ContractTemplateEditorTextAlign;
575
+ }>;
576
+ }> & Readonly<{
577
+ onMore?: ((clientX: number, clientY: number) => any) | undefined;
578
+ onCommand?: ((command: ContractTemplateEditorCommand) => any) | undefined;
579
+ "onPatch-font-size"?: ((value: unknown) => any) | undefined;
580
+ "onPatch-color"?: ((value: string) => any) | undefined;
581
+ "onPatch-text-align"?: ((value: unknown) => any) | undefined;
582
+ "onFont-size-search"?: ((value: string) => any) | undefined;
583
+ "onFont-size-commit"?: (() => any) | undefined;
584
+ "onFont-size-dropdown-change"?: ((open: boolean) => any) | undefined;
585
+ "onFont-size-keydown"?: ((event: KeyboardEvent) => any) | undefined;
586
+ }>, {
587
+ getMenuElement: () => HTMLElement | undefined;
588
+ }, {}, {}, {}, {}> | null;
499
589
  imageFileInputElement: HTMLInputElement;
500
590
  }, HTMLDivElement>;
501
591
  export default _default;
@@ -6,6 +6,9 @@ export declare const IMAGE_CONTEXT_MENU_ESTIMATED_WIDTH = 288;
6
6
  export declare const IMAGE_CONTEXT_MENU_ESTIMATED_HEIGHT = 196;
7
7
  export declare const TABLE_CONTEXT_MENU_ESTIMATED_WIDTH = 248;
8
8
  export declare const TABLE_CONTEXT_MENU_ESTIMATED_HEIGHT = 400;
9
+ /** 选区气泡是紧凑单行工具条,首帧按这组估算值夹位,渲染后再按实测尺寸校正。 */
10
+ export declare const TEXT_BUBBLE_MENU_ESTIMATED_WIDTH = 380;
11
+ export declare const TEXT_BUBBLE_MENU_ESTIMATED_HEIGHT = 40;
9
12
  /**
10
13
  * 把菜单左上角夹进视口。
11
14
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guodun/antdv",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "CHANGELOG.md",
@@ -52,8 +52,8 @@
52
52
  "vite": "^8.0.1",
53
53
  "vite-plugin-dts": "^4.5.4",
54
54
  "vue-tsc": "^3.2.5",
55
- "@guodun/tsconfig": "^1.0.0",
56
- "@guodun/theme": "^1.0.1"
55
+ "@guodun/theme": "^1.0.1",
56
+ "@guodun/tsconfig": "^1.0.0"
57
57
  },
58
58
  "dependencies": {
59
59
  "@ant-design/icons-vue": "^7.0.1",