@univerjs-pro/sheets-shape-ui 1.0.0-alpha.1 → 1.0.0-alpha.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 (105) hide show
  1. package/README.md +5 -3
  2. package/lib/cjs/index.js +1 -1
  3. package/lib/cjs/locale/ar-SA.js +1 -1
  4. package/lib/cjs/locale/ca-ES.js +1 -1
  5. package/lib/cjs/locale/de-DE.js +1 -1
  6. package/lib/cjs/locale/en-US.js +1 -1
  7. package/lib/cjs/locale/es-ES.js +1 -1
  8. package/lib/cjs/locale/fa-IR.js +1 -1
  9. package/lib/cjs/locale/fr-FR.js +1 -1
  10. package/lib/cjs/locale/id-ID.js +1 -1
  11. package/lib/cjs/locale/it-IT.js +1 -1
  12. package/lib/cjs/locale/ja-JP.js +1 -1
  13. package/lib/cjs/locale/ko-KR.js +1 -1
  14. package/lib/cjs/locale/pl-PL.js +1 -1
  15. package/lib/cjs/locale/pt-BR.js +1 -1
  16. package/lib/cjs/locale/ru-RU.js +1 -1
  17. package/lib/cjs/locale/sk-SK.js +1 -1
  18. package/lib/cjs/locale/vi-VN.js +1 -1
  19. package/lib/cjs/locale/zh-CN.js +1 -1
  20. package/lib/cjs/locale/zh-HK.js +1 -1
  21. package/lib/cjs/locale/zh-TW.js +1 -1
  22. package/lib/es/index.js +1 -1
  23. package/lib/es/locale/ar-SA.js +1 -1
  24. package/lib/es/locale/ca-ES.js +1 -1
  25. package/lib/es/locale/de-DE.js +1 -1
  26. package/lib/es/locale/en-US.js +1 -1
  27. package/lib/es/locale/es-ES.js +1 -1
  28. package/lib/es/locale/fa-IR.js +1 -1
  29. package/lib/es/locale/fr-FR.js +1 -1
  30. package/lib/es/locale/id-ID.js +1 -1
  31. package/lib/es/locale/it-IT.js +1 -1
  32. package/lib/es/locale/ja-JP.js +1 -1
  33. package/lib/es/locale/ko-KR.js +1 -1
  34. package/lib/es/locale/pl-PL.js +1 -1
  35. package/lib/es/locale/pt-BR.js +1 -1
  36. package/lib/es/locale/ru-RU.js +1 -1
  37. package/lib/es/locale/sk-SK.js +1 -1
  38. package/lib/es/locale/vi-VN.js +1 -1
  39. package/lib/es/locale/zh-CN.js +1 -1
  40. package/lib/es/locale/zh-HK.js +1 -1
  41. package/lib/es/locale/zh-TW.js +1 -1
  42. package/lib/index.css +0 -300
  43. package/lib/index.js +1 -1
  44. package/lib/locale/ar-SA.js +1 -1
  45. package/lib/locale/ca-ES.js +1 -1
  46. package/lib/locale/de-DE.js +1 -1
  47. package/lib/locale/en-US.js +1 -1
  48. package/lib/locale/es-ES.js +1 -1
  49. package/lib/locale/fa-IR.js +1 -1
  50. package/lib/locale/fr-FR.js +1 -1
  51. package/lib/locale/id-ID.js +1 -1
  52. package/lib/locale/it-IT.js +1 -1
  53. package/lib/locale/ja-JP.js +1 -1
  54. package/lib/locale/ko-KR.js +1 -1
  55. package/lib/locale/pl-PL.js +1 -1
  56. package/lib/locale/pt-BR.js +1 -1
  57. package/lib/locale/ru-RU.js +1 -1
  58. package/lib/locale/sk-SK.js +1 -1
  59. package/lib/locale/vi-VN.js +1 -1
  60. package/lib/locale/zh-CN.js +1 -1
  61. package/lib/locale/zh-HK.js +1 -1
  62. package/lib/locale/zh-TW.js +1 -1
  63. package/lib/types/command-util.d.ts +9 -3
  64. package/lib/types/commands/menu/menu-dependencies.d.ts +2 -0
  65. package/lib/types/commands/menu/object-list.menu.d.ts +4 -0
  66. package/lib/types/commands/operations/open-object-list-panel.operation.d.ts +5 -0
  67. package/lib/types/const.d.ts +2 -1
  68. package/lib/types/controllers/shape-update.controller.d.ts +1 -2
  69. package/lib/types/controllers/sheet-shape-adjust.controller.d.ts +3 -6
  70. package/lib/types/controllers/sheet-shape-printing.controller.d.ts +12 -0
  71. package/lib/types/controllers/sheet-shape-render.controller.d.ts +8 -3
  72. package/lib/types/index.d.ts +1 -7
  73. package/lib/types/locale/en-US.d.ts +16 -289
  74. package/lib/types/services/shape-render-update.service.d.ts +7 -0
  75. package/lib/types/services/shape-text-editing.service.d.ts +8 -0
  76. package/lib/types/utils/shape-text-document.d.ts +1 -11
  77. package/lib/types/view-model/drawing-shape.d.ts +6 -2
  78. package/lib/types/view-model/shape-data-model.d.ts +7 -5
  79. package/lib/types/views/ShapePicker.d.ts +2 -0
  80. package/lib/types/views/object-list-panel/SheetDrawingObjectListPanel.d.ts +1 -0
  81. package/lib/types/views/shape-editor-panel/ShapeFillEditor.d.ts +1 -1
  82. package/lib/types/views/shape-editor-panel/ShapeImageFillEditor.d.ts +0 -1
  83. package/lib/umd/index.js +1 -1
  84. package/lib/umd/locale/ar-SA.js +1 -1
  85. package/lib/umd/locale/ca-ES.js +1 -1
  86. package/lib/umd/locale/de-DE.js +1 -1
  87. package/lib/umd/locale/en-US.js +1 -1
  88. package/lib/umd/locale/es-ES.js +1 -1
  89. package/lib/umd/locale/fa-IR.js +1 -1
  90. package/lib/umd/locale/fr-FR.js +1 -1
  91. package/lib/umd/locale/id-ID.js +1 -1
  92. package/lib/umd/locale/it-IT.js +1 -1
  93. package/lib/umd/locale/ja-JP.js +1 -1
  94. package/lib/umd/locale/ko-KR.js +1 -1
  95. package/lib/umd/locale/pl-PL.js +1 -1
  96. package/lib/umd/locale/pt-BR.js +1 -1
  97. package/lib/umd/locale/ru-RU.js +1 -1
  98. package/lib/umd/locale/sk-SK.js +1 -1
  99. package/lib/umd/locale/vi-VN.js +1 -1
  100. package/lib/umd/locale/zh-CN.js +1 -1
  101. package/lib/umd/locale/zh-HK.js +1 -1
  102. package/lib/umd/locale/zh-TW.js +1 -1
  103. package/package.json +20 -20
  104. package/lib/types/views/shape-text-editor/ShapeTextFloatToolbar.d.ts +0 -1
  105. package/lib/types/views/shapes.d.ts +0 -23
@@ -54,296 +54,23 @@ declare const locale: {
54
54
  rotateRight90: string;
55
55
  rotateLeft90: string;
56
56
  toggleTextVertical: string;
57
- fill: {
57
+ objectListPanel: {
58
58
  title: string;
59
- noFill: string;
60
- solidFill: string;
61
- gradientFill: string;
62
- pictureFill: string;
63
- patternFill: string;
64
- color: string;
65
- transparency: string;
66
- picture: {
67
- source: string;
68
- insert: string;
69
- tileAsTexture: string;
70
- offsetX: string;
71
- offsetY: string;
72
- scaleX: string;
73
- scaleY: string;
74
- alignment: string;
75
- rotateWithShape: string;
76
- align: {
77
- tl: string;
78
- t: string;
79
- tr: string;
80
- l: string;
81
- ctr: string;
82
- r: string;
83
- bl: string;
84
- b: string;
85
- br: string;
86
- };
87
- };
88
- };
89
- line: {
90
- title: string;
91
- noLine: string;
92
- solidLine: string;
93
- gradientLine: string;
94
- color: string;
95
- transparency: string;
96
- width: string;
97
- dashType: {
98
- title: string;
99
- solid: string;
100
- roundDot: string;
101
- squareDot: string;
102
- dash: string;
103
- dashDot: string;
104
- longDash: string;
105
- longDashDot: string;
106
- longDashDotDot: string;
107
- };
108
- capType: {
109
- title: string;
110
- flat: string;
111
- round: string;
112
- square: string;
113
- };
114
- joinType: {
115
- title: string;
116
- miter: string;
117
- round: string;
118
- bevel: string;
119
- };
120
- beginArrowType: string;
121
- beginArrowSize: string;
122
- endArrowType: string;
123
- endArrowSize: string;
124
- arrowType: {
125
- none: string;
126
- arrow: string;
127
- openArrow: string;
128
- stealthArrow: string;
129
- diamondArrow: string;
130
- ovalArrow: string;
131
- };
132
- arrowSize: {
133
- small: string;
134
- medium: string;
135
- large: string;
136
- };
137
- sketchType: {
138
- title: string;
139
- none: string;
140
- curved: string;
141
- freehand: string;
142
- handDrawn: string;
143
- };
144
- };
145
- shape: {
146
- group: {
147
- line: string;
148
- rectangle: string;
149
- basicShape: string;
150
- blockArrow: string;
151
- equationShape: string;
152
- flowchart: string;
153
- starAndBanner: string;
154
- callout: string;
155
- other: string;
156
- };
157
- type: {
158
- line: string;
159
- 'straight-connector1': string;
160
- 'straight-connector2': string;
161
- 'bent-connector3': string;
162
- 'bent-connector3-arrow1': string;
163
- 'bent-connector3-arrow2': string;
164
- 'curved-connector3': string;
165
- 'curved-connector3-arrow1': string;
166
- 'curved-connector3-arrow2': string;
167
- rect: string;
168
- 'round-rect': string;
169
- 'snip1-rect': string;
170
- 'snip2-same-rect': string;
171
- 'snip2-diag-rect': string;
172
- 'snip-round-rect': string;
173
- 'round1-rect': string;
174
- 'round2-same-rect': string;
175
- 'round2-diag-rect': string;
176
- 'rect-textbox-horizontal': string;
177
- 'rect-textbox-vertical': string;
178
- ellipse: string;
179
- triangle: string;
180
- 'rt-triangle': string;
181
- parallelogram: string;
182
- trapezoid: string;
183
- 'non-isosceles-trapezoid': string;
184
- diamond: string;
185
- pentagon: string;
186
- hexagon: string;
187
- heptagon: string;
188
- octagon: string;
189
- decagon: string;
190
- dodecagon: string;
191
- pie: string;
192
- chord: string;
193
- teardrop: string;
194
- frame: string;
195
- 'half-frame': string;
196
- corner: string;
197
- 'diag-stripe': string;
198
- plus: string;
199
- plaque: string;
200
- can: string;
201
- cube: string;
202
- bevel: string;
203
- donut: string;
204
- 'no-smoking': string;
205
- 'block-arc': string;
206
- 'folder-corner': string;
207
- 'smiley-face': string;
208
- heart: string;
209
- 'lightning-bolt': string;
210
- sun: string;
211
- moon: string;
212
- cloud: string;
213
- arc: string;
214
- 'bracket-pair': string;
215
- 'brace-pair': string;
216
- 'left-bracket': string;
217
- 'right-bracket': string;
218
- 'left-brace': string;
219
- 'right-brace': string;
220
- 'right-arrow': string;
221
- 'left-arrow': string;
222
- 'up-arrow': string;
223
- 'down-arrow': string;
224
- 'left-right-arrow': string;
225
- 'up-down-arrow': string;
226
- 'quad-arrow': string;
227
- 'left-right-up-arrow': string;
228
- 'bent-arrow': string;
229
- 'uturn-arrow': string;
230
- 'left-up-arrow': string;
231
- 'bent-up-arrow': string;
232
- 'curved-right-arrow': string;
233
- 'curved-left-arrow': string;
234
- 'curved-up-arrow': string;
235
- 'curved-down-arrow': string;
236
- 'striped-right-arrow': string;
237
- 'notched-right-arrow': string;
238
- 'home-plate': string;
239
- chevron: string;
240
- 'right-arrow-callout': string;
241
- 'down-arrow-callout': string;
242
- 'left-arrow-callout': string;
243
- 'up-arrow-callout': string;
244
- 'left-right-arrow-callout': string;
245
- 'quad-arrow-callout': string;
246
- 'circular-arrow': string;
247
- 'math-plus': string;
248
- 'math-minus': string;
249
- 'math-multiply': string;
250
- 'math-divide': string;
251
- 'math-equal': string;
252
- 'math-not-equal': string;
253
- 'flow-chart-process': string;
254
- 'flow-chart-alternate-process': string;
255
- 'flow-chart-decision': string;
256
- 'flow-chart-input-output': string;
257
- 'flow-chart-predefined-process': string;
258
- 'flow-chart-internal-storage': string;
259
- 'flow-chart-document': string;
260
- 'flow-chart-multidocument': string;
261
- 'flow-chart-terminator': string;
262
- 'flow-chart-preparation': string;
263
- 'flow-chart-manual-input': string;
264
- 'flow-chart-manual-operation': string;
265
- 'flow-chart-connector': string;
266
- 'flow-chart-offpage-connector': string;
267
- 'flow-chart-punched-card': string;
268
- 'flow-chart-punched-tape': string;
269
- 'flow-chart-summing-junction': string;
270
- 'flow-chart-or': string;
271
- 'flow-chart-collate': string;
272
- 'flow-chart-sort': string;
273
- 'flow-chart-extract': string;
274
- 'flow-chart-merge': string;
275
- 'flow-chart-online-storage': string;
276
- 'flow-chart-delay': string;
277
- 'flow-chart-magnetic-tape': string;
278
- 'flow-chart-magnetic-disk': string;
279
- 'flow-chart-magnetic-drum': string;
280
- 'flow-chart-display': string;
281
- 'irregular-seal1': string;
282
- 'irregular-seal2': string;
283
- star4: string;
284
- star5: string;
285
- star6: string;
286
- star7: string;
287
- star8: string;
288
- star10: string;
289
- star12: string;
290
- star16: string;
291
- star24: string;
292
- star32: string;
293
- ribbon2: string;
294
- ribbon: string;
295
- 'ellipse-ribbon2': string;
296
- 'ellipse-ribbon': string;
297
- 'vertical-scroll': string;
298
- 'horizontal-scroll': string;
299
- wave: string;
300
- 'double-wave': string;
301
- 'wedge-rect-callout': string;
302
- 'wedge-round-rect-callout': string;
303
- 'wedge-ellipse-callout': string;
304
- 'cloud-callout': string;
305
- 'border-callout1': string;
306
- 'border-callout2': string;
307
- 'border-callout3': string;
308
- 'accent-callout1': string;
309
- 'accent-callout2': string;
310
- 'accent-callout3': string;
311
- callout1: string;
312
- callout2: string;
313
- callout3: string;
314
- 'accent-border-callout1': string;
315
- 'accent-border-callout2': string;
316
- 'accent-border-callout3': string;
317
- 'left-circular-arrow': string;
318
- 'left-right-circular-arrow': string;
319
- 'swoosh-arrow': string;
320
- 'left-right-ribbon': string;
321
- 'pie-wedge': string;
322
- funnel: string;
323
- gear6: string;
324
- gear9: string;
325
- 'corner-tabs': string;
326
- 'action-button-back-previous': string;
327
- 'action-button-forward-next': string;
328
- 'action-button-beginning': string;
329
- 'action-button-end': string;
330
- 'action-button-home': string;
331
- 'action-button-information': string;
332
- 'action-button-return': string;
333
- 'action-button-movie': string;
334
- 'action-button-document': string;
335
- 'action-button-sound': string;
336
- 'action-button-help': string;
337
- 'action-button-blank': string;
338
- 'chart-plus': string;
339
- 'chart-star': string;
340
- 'chart-x': string;
341
- 'flow-chart-offline-storage': string;
342
- 'line-inv': string;
343
- 'plaque-tabs': string;
344
- 'square-tabs': string;
345
- 'up-down-arrow-callout': string;
346
- };
59
+ open: string;
60
+ empty: string;
61
+ showAll: string;
62
+ hideAll: string;
63
+ show: string;
64
+ hide: string;
65
+ moveForward: string;
66
+ moveBackward: string;
67
+ close: string;
68
+ name: string;
69
+ nameInput: string;
70
+ description: string;
71
+ descriptionPlaceholder: string;
72
+ details: string;
73
+ noSelection: string;
347
74
  };
348
75
  };
349
76
  };
@@ -0,0 +1,7 @@
1
+ import type { ISheetShapeDrawingParam } from '@univerjs-pro/sheets-shape';
2
+ import { IRenderManagerService } from '@univerjs/engine-render';
3
+ export declare class ShapeRenderUpdateService {
4
+ private readonly _renderManagerService;
5
+ constructor(_renderManagerService: IRenderManagerService);
6
+ updateShapeFillImage(param: Pick<ISheetShapeDrawingParam, 'unitId' | 'subUnitId' | 'drawingId'>, image: HTMLImageElement | undefined): void;
7
+ }
@@ -17,4 +17,12 @@ export declare class ShapeTextEditingService extends Disposable {
17
17
  setEditing(params: Nullable<IEditingParams>): void;
18
18
  setOnSavingEditorData(params: Nullable<boolean>): void;
19
19
  getEditing(): Nullable<IEditingParams>;
20
+ /**
21
+ * Keep the session mounted for one frame after raising the save signal.
22
+ * The shared shape-text editor persists its document while that signal is true;
23
+ * clearing the session first would discard newly entered text on external click.
24
+ */
25
+ completeEditing(_event?: PointerEvent): void;
26
+ /** Cancel without raising the save signal, for example when Escape is pressed. */
27
+ cancelEditing(): void;
20
28
  }
@@ -1,11 +1 @@
1
- import type { IShapeRect } from '@univerjs-pro/engine-shape';
2
- import type { HorizontalAlign, IDocumentData, VerticalAlign } from '@univerjs/core';
3
- interface IPrepareShapeTextDocumentOptions {
4
- isHorizontal: boolean;
5
- textRect: IShapeRect;
6
- verticalAlign?: VerticalAlign;
7
- horizontalAlign?: HorizontalAlign;
8
- }
9
- export declare function prepareShapeTextDocumentData(documentData: IDocumentData, options: IPrepareShapeTextDocumentOptions): IDocumentData;
10
- export declare function stripShapeTextDocumentLayout(documentData: IDocumentData): IDocumentData;
11
- export {};
1
+ export { prepareShapeTextDocumentData, stripShapeTextDocumentLayout, } from '@univerjs-pro/shape-editor-ui';
@@ -1,5 +1,5 @@
1
- import type { ShapeModel } from '@univerjs-pro/engine-shape';
2
- import type { IDrawingParam, ISrcRect, LocaleService, Nullable } from '@univerjs/core';
1
+ import type { ICustomShapeTextData, IShapeData, ShapeModel } from '@univerjs-pro/engine-shape';
2
+ import type { IDocumentData, IDrawingParam, ISrcRect, LocaleService, Nullable } from '@univerjs/core';
3
3
  import type { IShapeProps, IViewportInfo, UniverRenderingContext, Vector2 } from '@univerjs/engine-render';
4
4
  import { DrawingTypeEnum } from '@univerjs/core';
5
5
  import { RENDER_CLASS_TYPE, Shape, Transform } from '@univerjs/engine-render';
@@ -47,6 +47,10 @@ export interface IDrawingShapeData extends IDrawingParam {
47
47
  */
48
48
  prstGeom?: Nullable<string>;
49
49
  }
50
+ export declare function resolveDrawingShapeTextRenderPolicy(shapeData: IShapeData, customTextData: ICustomShapeTextData, documentData?: IDocumentData): {
51
+ clip: boolean;
52
+ wrapStrategy: import("@univerjs/core").WrapStrategy;
53
+ };
50
54
  export declare class DrawingShape extends Shape<IDrawingShapeProps> {
51
55
  protected _props: IDrawingShapeProps;
52
56
  private _transformCalculateSrcRect;
@@ -1,6 +1,8 @@
1
+ import type { IShapeTextDataModel } from '@univerjs-pro/engine-shape';
1
2
  import type { HorizontalAlign, IDocumentData, VerticalAlign } from '@univerjs/core';
2
- export interface IShapeTextModel {
3
- va: VerticalAlign;
4
- ha: HorizontalAlign;
5
- doc: IDocumentData;
6
- }
3
+ /**
4
+ * @deprecated Use `IShapeTextDataModel<IDocumentData, HorizontalAlign, VerticalAlign>`
5
+ * from `@univerjs-pro/engine-shape`. This alias is kept for legacy sheets-shape
6
+ * callers while shape text is converging across products.
7
+ */
8
+ export type IShapeTextModel = IShapeTextDataModel<IDocumentData, HorizontalAlign, VerticalAlign>;
@@ -1,5 +1,7 @@
1
1
  import { IMAGE_CLIP_SHAPE_PICKER_COMPONENT } from '@univerjs/drawing-ui';
2
2
  export declare const SHAPE_PICKER_COMPONENT = "sheet.shape.picker.component";
3
+ export declare const SHEET_IMAGE_CLIP_SHAPE_PICKER_COMPONENT = "sheet.image-clip.shape-picker.component";
3
4
  export { IMAGE_CLIP_SHAPE_PICKER_COMPONENT };
4
5
  export declare function ImageClipShapePicker(): import("react").JSX.Element;
6
+ export declare function ImageClipShapePickerBridge(): import("react").JSX.Element | null;
5
7
  export declare function ShapePicker(): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function SheetDrawingObjectListPanel(): import("react").JSX.Element;
@@ -7,5 +7,5 @@ interface IShapeFillProps {
7
7
  isLineShape: boolean;
8
8
  disableShapeOption: boolean;
9
9
  }
10
- export declare function ShapeFillEditor(props: IShapeFillProps): import("react").JSX.Element | null;
10
+ export declare function ShapeFillEditor(props: IShapeFillProps): import("react").JSX.Element;
11
11
  export {};
@@ -5,7 +5,6 @@ interface IShapeImageFillEditorProps {
5
5
  shapeId: string;
6
6
  shapeData: IShapeData;
7
7
  disableShapeOption: boolean;
8
- compact?: boolean;
9
8
  }
10
9
  export declare function ShapeImageFillEditor(props: IShapeImageFillEditorProps): import("react").JSX.Element;
11
10
  export {};