@univerjs-pro/shape-editor-ui 1.0.0-alpha.8 → 1.0.0-beta.1

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 (135) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/cjs/locale/ar-SA.js +1 -1
  3. package/lib/cjs/locale/ca-ES.js +1 -1
  4. package/lib/cjs/locale/de-DE.js +1 -1
  5. package/lib/cjs/locale/en-US.js +1 -1
  6. package/lib/cjs/locale/es-ES.js +1 -1
  7. package/lib/cjs/locale/fa-IR.js +1 -1
  8. package/lib/cjs/locale/fr-FR.js +1 -1
  9. package/lib/cjs/locale/id-ID.js +1 -1
  10. package/lib/cjs/locale/it-IT.js +1 -1
  11. package/lib/cjs/locale/ja-JP.js +1 -1
  12. package/lib/cjs/locale/ko-KR.js +1 -1
  13. package/lib/cjs/locale/pl-PL.js +1 -1
  14. package/lib/cjs/locale/pt-BR.js +1 -1
  15. package/lib/cjs/locale/ru-RU.js +1 -1
  16. package/lib/cjs/locale/sk-SK.js +1 -1
  17. package/lib/cjs/locale/vi-VN.js +1 -1
  18. package/lib/cjs/locale/zh-CN.js +1 -1
  19. package/lib/cjs/locale/zh-HK.js +1 -1
  20. package/lib/cjs/locale/zh-TW.js +1 -1
  21. package/lib/es/index.js +1 -1
  22. package/lib/es/locale/ar-SA.js +1 -1
  23. package/lib/es/locale/ca-ES.js +1 -1
  24. package/lib/es/locale/de-DE.js +1 -1
  25. package/lib/es/locale/en-US.js +1 -1
  26. package/lib/es/locale/es-ES.js +1 -1
  27. package/lib/es/locale/fa-IR.js +1 -1
  28. package/lib/es/locale/fr-FR.js +1 -1
  29. package/lib/es/locale/id-ID.js +1 -1
  30. package/lib/es/locale/it-IT.js +1 -1
  31. package/lib/es/locale/ja-JP.js +1 -1
  32. package/lib/es/locale/ko-KR.js +1 -1
  33. package/lib/es/locale/pl-PL.js +1 -1
  34. package/lib/es/locale/pt-BR.js +1 -1
  35. package/lib/es/locale/ru-RU.js +1 -1
  36. package/lib/es/locale/sk-SK.js +1 -1
  37. package/lib/es/locale/vi-VN.js +1 -1
  38. package/lib/es/locale/zh-CN.js +1 -1
  39. package/lib/es/locale/zh-HK.js +1 -1
  40. package/lib/es/locale/zh-TW.js +1 -1
  41. package/lib/index.css +456 -59
  42. package/lib/index.js +1 -1
  43. package/lib/locale/ar-SA.js +1 -1
  44. package/lib/locale/ca-ES.js +1 -1
  45. package/lib/locale/de-DE.js +1 -1
  46. package/lib/locale/en-US.js +1 -1
  47. package/lib/locale/es-ES.js +1 -1
  48. package/lib/locale/fa-IR.js +1 -1
  49. package/lib/locale/fr-FR.js +1 -1
  50. package/lib/locale/id-ID.js +1 -1
  51. package/lib/locale/it-IT.js +1 -1
  52. package/lib/locale/ja-JP.js +1 -1
  53. package/lib/locale/ko-KR.js +1 -1
  54. package/lib/locale/pl-PL.js +1 -1
  55. package/lib/locale/pt-BR.js +1 -1
  56. package/lib/locale/ru-RU.js +1 -1
  57. package/lib/locale/sk-SK.js +1 -1
  58. package/lib/locale/vi-VN.js +1 -1
  59. package/lib/locale/zh-CN.js +1 -1
  60. package/lib/locale/zh-HK.js +1 -1
  61. package/lib/locale/zh-TW.js +1 -1
  62. package/lib/types/commands/operations/toggle-shape-floating-toolbar.operation.d.ts +2 -0
  63. package/lib/types/common/formula-shape-en-us.d.ts +0 -19
  64. package/lib/types/components/fill-style-tabs-editor/FillStyleTabsEditor.d.ts +2 -0
  65. package/lib/types/config/config.d.ts +2 -25
  66. package/lib/types/controllers/components.controller.d.ts +3 -2
  67. package/lib/types/index.d.ts +32 -6
  68. package/lib/types/locale/en-US.d.ts +132 -21
  69. package/lib/types/menu/shape-floating-toolbar.menu.d.ts +3 -0
  70. package/lib/types/plugin.d.ts +3 -2
  71. package/lib/types/services/formula-binding.service.d.ts +34 -0
  72. package/lib/types/services/shape-floating-toolbar.service.d.ts +16 -0
  73. package/lib/types/utils/drawing-type-name.d.ts +3 -0
  74. package/lib/types/utils/shape-contextual-ribbon-host.d.ts +2 -0
  75. package/lib/types/utils/shape-floating-toolbar-config.d.ts +3 -3
  76. package/lib/types/views/FormulaBindingEditorDialog.d.ts +1 -1
  77. package/lib/types/views/formula-shape/UseFormulaShapeToolbar.d.ts +3 -0
  78. package/lib/types/views/shape-floating-toolbar/ShapeFillControls.d.ts +14 -0
  79. package/lib/types/views/shape-floating-toolbar/ShapeFloatingToolbar.d.ts +6 -129
  80. package/lib/types/views/shape-floating-toolbar/ShapeFloatingToolbarPrimitives.d.ts +48 -0
  81. package/lib/types/views/shape-floating-toolbar/ShapeStrokeControls.d.ts +41 -0
  82. package/lib/types/views/shape-floating-toolbar/ShapeTextControls.d.ts +33 -0
  83. package/lib/types/views/shape-floating-toolbar/floating-toolbar-interaction.d.ts +4 -0
  84. package/lib/types/views/shape-floating-toolbar/shape-floating-toolbar-constants.d.ts +11 -0
  85. package/lib/types/views/shape-floating-toolbar/shape-floating-toolbar-types.d.ts +12 -0
  86. package/lib/types/views/shape-floating-toolbar/shape-floating-toolbar-utils.d.ts +7 -1
  87. package/lib/types/views/shape-floating-toolbar/shape-floating-toolbar-wheel.util.d.ts +1 -0
  88. package/lib/types/views/shape-format-ribbon/ShapeEffectControls.d.ts +19 -0
  89. package/lib/types/views/shape-format-ribbon/ShapeEffectPresetIcon.d.ts +11 -0
  90. package/lib/types/views/shape-format-ribbon/ShapeFormatRibbonControls.d.ts +27 -0
  91. package/lib/types/views/shape-format-ribbon/shape-effect-reference-paths.generated.d.ts +6 -0
  92. package/lib/types/views/shape-picker/ShapeChangePicker.d.ts +7 -0
  93. package/lib/types/views/shape-quick-style/ShapeQuickStyleGallery.d.ts +10 -0
  94. package/lib/types/views/shape-text-editor/DocParagraphTypeDropdown.d.ts +1 -1
  95. package/lib/types/views/shape-text-editor/ShapeTextEditor.d.ts +2 -193
  96. package/lib/types/views/shape-text-editor/ShapeTextEditorSurface.d.ts +16 -0
  97. package/lib/types/views/shape-text-editor/ShapeTextFloatToolbar.d.ts +0 -1
  98. package/lib/types/views/shape-text-editor/ShapeTextPositionWrapper.d.ts +1 -0
  99. package/lib/types/views/shape-text-editor/shape-text-document.d.ts +17 -2
  100. package/lib/types/views/shape-text-editor/shape-text-keyboard.d.ts +31 -0
  101. package/lib/types/views/shape-text-editor/shape-text-layout.d.ts +190 -1
  102. package/lib/types/views/shape-text-editor/types.d.ts +2 -1
  103. package/lib/types/views/smart-art/SmartArtColorGallery.d.ts +6 -0
  104. package/lib/types/views/smart-art/SmartArtLayoutGallery.d.ts +6 -0
  105. package/lib/types/views/smart-art/SmartArtLayoutIcon.d.ts +6 -0
  106. package/lib/types/views/smart-art/SmartArtQuickStyleGallery.d.ts +10 -0
  107. package/lib/types/views/smart-art/SmartArtRibbonControl.d.ts +33 -0
  108. package/lib/types/views/smart-art/SmartArtTextPane.d.ts +14 -0
  109. package/lib/types/views/smart-art/smart-art-layout-catalog.generated.d.ts +35 -0
  110. package/lib/types/views/smart-art/smart-art-layout-gallery-catalog.generated.d.ts +5 -0
  111. package/lib/umd/index.js +1 -1
  112. package/lib/umd/locale/ar-SA.js +1 -1
  113. package/lib/umd/locale/ca-ES.js +1 -1
  114. package/lib/umd/locale/de-DE.js +1 -1
  115. package/lib/umd/locale/en-US.js +1 -1
  116. package/lib/umd/locale/es-ES.js +1 -1
  117. package/lib/umd/locale/fa-IR.js +1 -1
  118. package/lib/umd/locale/fr-FR.js +1 -1
  119. package/lib/umd/locale/id-ID.js +1 -1
  120. package/lib/umd/locale/it-IT.js +1 -1
  121. package/lib/umd/locale/ja-JP.js +1 -1
  122. package/lib/umd/locale/ko-KR.js +1 -1
  123. package/lib/umd/locale/pl-PL.js +1 -1
  124. package/lib/umd/locale/pt-BR.js +1 -1
  125. package/lib/umd/locale/ru-RU.js +1 -1
  126. package/lib/umd/locale/sk-SK.js +1 -1
  127. package/lib/umd/locale/vi-VN.js +1 -1
  128. package/lib/umd/locale/zh-CN.js +1 -1
  129. package/lib/umd/locale/zh-HK.js +1 -1
  130. package/lib/umd/locale/zh-TW.js +1 -1
  131. package/package.json +23 -26
  132. package/lib/cjs/formula-shape-en-us-B0fVf3OO.js +0 -1
  133. package/lib/es/formula-shape-en-us-BbvC914f.js +0 -1
  134. package/lib/formula-shape-en-us-BbvC914f.js +0 -1
  135. package/lib/types/services/formula-binding-unit-viewer.service.d.ts +0 -67
@@ -1,5 +1,9 @@
1
+ import type { IShapeRect } from '@univerjs-pro/engine-shape';
2
+ import type { IDocumentData, Nullable } from '@univerjs/core';
1
3
  import type { DocumentSkeleton } from '@univerjs/engine-render';
2
- import { VerticalAlign } from '@univerjs/core';
4
+ import type { CSSProperties } from 'react';
5
+ import type { IShapeTextEditingParams, IShapeTextEditorAdapter, IShapeTextEditorModel } from './types';
6
+ import { HorizontalAlign, VerticalAlign } from '@univerjs/core';
3
7
  export interface IResolveShapeTextVerticalOffsetOptions {
4
8
  contentHeight: number;
5
9
  verticalAlign?: VerticalAlign;
@@ -17,8 +21,193 @@ export interface IResolveShapeTextDocumentRenderLayoutOptions extends IResolveSh
17
21
  opticalVerticalOffset?: number;
18
22
  verticalOffset?: number;
19
23
  }
24
+ export declare function normalizeShapeTextRect(textRect: IShapeRect, fallbackRect: IShapeRect): IShapeRect;
20
25
  export declare function isShapeTextOpticalVerticalAlignEnabled(value: unknown): boolean;
26
+ export declare function getShapeTextVisibleInkHeight(skeleton: DocumentSkeleton): number | undefined;
21
27
  export declare function resolveShapeTextVerticalOffset(options: IResolveShapeTextVerticalOffsetOptions): number;
22
28
  export declare function resolveShapeTextDocumentRenderLayout(options: IResolveShapeTextDocumentRenderLayoutOptions): IShapeTextDocumentRenderLayout;
23
29
  export declare function getShapeTextContentHeight(skeleton: DocumentSkeleton, fallbackHeight?: number): number;
24
30
  export declare function getShapeTextOpticalVerticalOffset(skeleton: DocumentSkeleton, targetHeight: number, verticalAlign?: VerticalAlign): number;
31
+ export interface IContentLayout {
32
+ documentMarginTop: number;
33
+ editorLeft: number;
34
+ editorTop: number;
35
+ editorWidth: number;
36
+ editorHeight: number;
37
+ editorSurfaceWidth?: number;
38
+ }
39
+ export declare function resolveShapeTextEditingContentHeight(measuredContentHeight: number, caretHeight?: number): number;
40
+ export declare function getShapeTextEditingCaretHeight(activeRange?: {
41
+ getAbsolutePosition(): Nullable<{
42
+ height?: number;
43
+ }>;
44
+ }): number | undefined;
45
+ export declare function areShapeTextEditorLayoutsEqual(a: IContentLayout, b: IContentLayout): boolean;
46
+ interface IShapeTextEditorLayoutOptions {
47
+ actualHeight: number;
48
+ contentWidth?: number;
49
+ scaleX: number;
50
+ scaleY: number;
51
+ textRect: {
52
+ left: number;
53
+ top: number;
54
+ width: number;
55
+ height: number;
56
+ };
57
+ verticalAlign: VerticalAlign;
58
+ opticalVerticalOffset?: number;
59
+ }
60
+ interface IShapeTextEditorLayout {
61
+ documentMarginTop: number;
62
+ editorLeft: number;
63
+ editorTop: number;
64
+ editorWidth: number;
65
+ editorHeight: number;
66
+ pageHeight: number;
67
+ }
68
+ interface IShapeTextEditorHostHeightOptions {
69
+ hostHeight: number;
70
+ textRect: {
71
+ left: number;
72
+ top: number;
73
+ width: number;
74
+ height: number;
75
+ };
76
+ contentHeight: number;
77
+ }
78
+ interface IShapeTextEditorHostSizeOptions {
79
+ hostWidth: number;
80
+ hostHeight: number;
81
+ textRect: {
82
+ left: number;
83
+ top: number;
84
+ width: number;
85
+ height: number;
86
+ };
87
+ contentWidth: number;
88
+ contentHeight: number;
89
+ allowShrink?: boolean;
90
+ }
91
+ interface IShapeTextEditorHostSizeChangeOptions {
92
+ nextWidth: number;
93
+ nextHeight: number;
94
+ baselineWidth: number;
95
+ baselineHeight: number;
96
+ tolerance?: number;
97
+ }
98
+ export declare function resolveShapeTextEditorTextRect(options: {
99
+ shapeModel: Pick<IShapeTextEditorModel, 'getShapeTextRect'>;
100
+ hostRect: IShapeRect;
101
+ }): IShapeRect;
102
+ export declare function resolveShapeTextEditorRenderScale(options: {
103
+ ancestorScale?: {
104
+ scaleX?: number;
105
+ scaleY?: number;
106
+ };
107
+ canvasClientWidth: number;
108
+ declaredCanvasWidth: number;
109
+ fallbackScaleX: number;
110
+ fallbackScaleY: number;
111
+ }): {
112
+ scaleAdjust: number;
113
+ renderScaleX: number;
114
+ renderScaleY: number;
115
+ };
116
+ export declare function resolveShapeTextEditorEmptyTextBoxMinSize(options: {
117
+ isHorizontal: boolean;
118
+ placeholderWidth: number;
119
+ }): {
120
+ width: number;
121
+ height: number;
122
+ };
123
+ export declare function measureShapeTextEditorPlaceholderWidth(documentData: IDocumentData, placeholder: string): number;
124
+ export declare function resolveShapeTextEditorMeasurePageWidth(options: {
125
+ autoFitNoWrap: boolean;
126
+ maxAutoFitWidth?: number;
127
+ textRectWidth: number;
128
+ }): number;
129
+ export declare function measureShapeTextEditorNoWrapContentWidth(documentData: IDocumentData | null | undefined): number;
130
+ export declare function resolveShapeTextEditorRenderedContentWidth(options: {
131
+ actualWidth: number;
132
+ autoFitNoWrap: boolean;
133
+ measuredContentWidth?: number;
134
+ textRectWidth: number;
135
+ }): number;
136
+ export declare function resolveShapeTextEditorHostContentWidth(options: {
137
+ actualWidth: number;
138
+ allowShrink: boolean;
139
+ autoFitNoWrap: boolean;
140
+ measuredContentWidth?: number;
141
+ renderedContentWidth: number;
142
+ }): number;
143
+ export declare function resolveShapeTextEditorFinalPageWidth(options: {
144
+ autoFitNoWrap: boolean;
145
+ measurePageWidth?: number;
146
+ renderedContentWidth: number;
147
+ textRectWidth: number;
148
+ }): number;
149
+ export declare function resolveShapeTextEditorRenderSurfaceWidth(options: {
150
+ autoFitNoWrap: boolean;
151
+ editorWidth: number;
152
+ measurePageWidth: number;
153
+ renderedContentWidth?: number;
154
+ scaleX: number;
155
+ }): number;
156
+ export declare function hasShapeTextEditorHostSizeChanged(options: IShapeTextEditorHostSizeChangeOptions): boolean;
157
+ export declare function resolveShapeTextEditorShouldShrinkHostSize(options: {
158
+ adapter: Pick<IShapeTextEditorAdapter, 'allowHostSizeShrink' | 'updateHostSize'>;
159
+ editingParams: Nullable<IShapeTextEditingParams>;
160
+ }): boolean;
161
+ export declare function shouldDeferShapeTextEditorHostSizeUpdateDuringEditing(options: {
162
+ adapter: Pick<IShapeTextEditorAdapter, 'deferHostSizeUpdateDuringEditing'>;
163
+ editingParams: Nullable<IShapeTextEditingParams>;
164
+ }): boolean;
165
+ export declare function resolveShapeTextEditorDocumentVerticalAlign(options: {
166
+ opticalVerticalAlign: boolean;
167
+ verticalAlign: VerticalAlign;
168
+ }): VerticalAlign;
169
+ export declare function resolveShapeTextEditorLayout(options: IShapeTextEditorLayoutOptions): IShapeTextEditorLayout;
170
+ export declare function resolveShapeTextEditorPlaceholderLayout(options: {
171
+ documentMarginTop: number;
172
+ editorLeft: number;
173
+ editorSurfaceWidth?: number;
174
+ editorTop: number;
175
+ editorWidth: number;
176
+ horizontalAlign: HorizontalAlign;
177
+ }): {
178
+ left: number;
179
+ textAlign: 'center' | 'left' | 'right';
180
+ top: number;
181
+ width: number;
182
+ };
183
+ export declare function resolveShapeTextEditorHostHeight(options: IShapeTextEditorHostHeightOptions): number;
184
+ export declare function resolveShapeTextEditorHostSize(options: IShapeTextEditorHostSizeOptions): {
185
+ width: number;
186
+ height: number;
187
+ };
188
+ export declare function resolveShapeTextEditorPhysicalContentSize(options: {
189
+ crossAxisLength: number;
190
+ flowAxis: 'width' | 'height';
191
+ flowAxisLength: number;
192
+ }): {
193
+ height: number;
194
+ width: number;
195
+ };
196
+ export declare function getShapeTextEditorContentStyle(leftOrWidth: number, topOrHeight: number, width?: number, height?: number): CSSProperties;
197
+ export declare function applyShapeTextEditorContentLayout(element: HTMLElement | null | undefined, layout: IContentLayout): void;
198
+ export declare function applyShapeTextEditorCanvasTransparency(renderer: {
199
+ engine?: {
200
+ getCanvasElement?: () => HTMLElement | null;
201
+ };
202
+ } | null | undefined | void): void;
203
+ export declare function resetShapeTextEditorDocumentMargins(renderer: {
204
+ mainComponent?: unknown;
205
+ components?: {
206
+ forEach?: (callback: (component: unknown) => void) => void;
207
+ };
208
+ } | null | undefined | void): void;
209
+ export declare function refreshShapeTextEditorRenderer(renderer: {
210
+ mainComponent?: unknown;
211
+ scene?: unknown;
212
+ } | null | undefined | void): void;
213
+ export {};
@@ -9,6 +9,7 @@ export interface IShapeTextEditingParams {
9
9
  shapeId: string;
10
10
  shapeKey: string;
11
11
  visible: boolean;
12
+ selectAllOnFocus?: boolean;
12
13
  }
13
14
  export interface IShapeTextEditingService {
14
15
  editingParams$: Observable<Nullable<IShapeTextEditingParams>>;
@@ -83,5 +84,5 @@ export interface IShapeTextEditorPositionOptions {
83
84
  viewportKeys: IShapeTextEditorViewportKeys;
84
85
  getSkeleton?: (renderUnit: IRender, editingParams: IShapeTextEditingParams) => unknown;
85
86
  getHostTransform?: (renderUnit: IRender, editingParams: IShapeTextEditingParams) => Nullable<ITransformState>;
86
- getPositionOffset?: (renderUnit: IRender, editingParams: IShapeTextEditingParams) => Nullable<IShapeTextEditorPositionOffset>;
87
+ getPositionOffset?: (renderUnit: IRender, editingParams: IShapeTextEditingParams, positionRoot?: Element | null) => Nullable<IShapeTextEditorPositionOffset>;
87
88
  }
@@ -0,0 +1,6 @@
1
+ import type { ISmartArtColorStyleCatalogItem } from '@univerjs-pro/engine-shape';
2
+ export interface ISmartArtColorGalleryProps {
3
+ selectedColorStyleId?: string;
4
+ onSelect: (style: ISmartArtColorStyleCatalogItem) => void;
5
+ }
6
+ export declare function SmartArtColorGallery(props: ISmartArtColorGalleryProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { ISmartArtLayoutCatalogItem } from './smart-art-layout-catalog.generated';
2
+ export interface ISmartArtLayoutGalleryProps {
3
+ selectedLayoutId?: string;
4
+ onSelect: (layout: ISmartArtLayoutCatalogItem) => void;
5
+ }
6
+ export declare function SmartArtLayoutGallery(props: ISmartArtLayoutGalleryProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ import type { SmartArtLayoutIconElement } from './smart-art-layout-catalog.generated';
2
+ export interface ISmartArtLayoutIconProps {
3
+ elements: readonly SmartArtLayoutIconElement[];
4
+ className?: string;
5
+ }
6
+ export declare function SmartArtLayoutIcon(props: ISmartArtLayoutIconProps): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import type { ISmartArtQuickStyleCatalogItem } from '@univerjs-pro/engine-shape';
2
+ export interface ISmartArtQuickStyleGalleryProps {
3
+ selectedStyleId?: string;
4
+ onSelect: (style: ISmartArtQuickStyleCatalogItem) => void;
5
+ }
6
+ export declare function SmartArtQuickStyleGallery(props: ISmartArtQuickStyleGalleryProps): import("react").JSX.Element;
7
+ export declare function SmartArtQuickStylePreview(props: {
8
+ style: ISmartArtQuickStyleCatalogItem;
9
+ compact?: boolean;
10
+ }): import("react").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import type { ISmartArtColorStyleCatalogItem, ISmartArtData, ISmartArtQuickStyleCatalogItem } from '@univerjs-pro/engine-shape';
2
+ import type { ISmartArtLayoutCatalogItem } from './smart-art-layout-catalog.generated';
3
+ import { SmartArtInsertPositionEnum } from '@univerjs-pro/engine-shape';
4
+ export interface ISmartArtRibbonControlProps {
5
+ data: ISmartArtData;
6
+ onOpenTextPane: () => void;
7
+ onAddNode: (position: SmartArtInsertPositionEnum) => void;
8
+ onPromoteNode: () => void;
9
+ onDemoteNode: () => void;
10
+ onMoveNode: (position: SmartArtInsertPositionEnum.Before | SmartArtInsertPositionEnum.After) => void;
11
+ onDeleteNode: () => void;
12
+ onToggleDirection: () => void;
13
+ onReset: () => void;
14
+ onSelectLayout: (layout: ISmartArtLayoutCatalogItem) => void;
15
+ onSelectStyle: (style: ISmartArtQuickStyleCatalogItem) => void;
16
+ onSelectColor: (style: ISmartArtColorStyleCatalogItem) => void;
17
+ onConvertToShapes: () => void;
18
+ canAddAfter?: boolean;
19
+ canAddBelow?: boolean;
20
+ canAddAssistant?: boolean;
21
+ canPromote?: boolean;
22
+ canDemote?: boolean;
23
+ canMoveUp?: boolean;
24
+ canMoveDown?: boolean;
25
+ canDelete?: boolean;
26
+ }
27
+ type CreateGraphicProps = Pick<ISmartArtRibbonControlProps, 'data' | 'onOpenTextPane' | 'onAddNode' | 'onPromoteNode' | 'onDemoteNode' | 'onMoveNode' | 'onDeleteNode' | 'onToggleDirection' | 'canAddAfter' | 'canAddBelow' | 'canAddAssistant' | 'canPromote' | 'canDemote' | 'canMoveUp' | 'canMoveDown' | 'canDelete'>;
28
+ export declare function SmartArtCreateGraphicRibbonControl(props: CreateGraphicProps): import("react").JSX.Element;
29
+ export declare function SmartArtLayoutRibbonControl(props: Pick<ISmartArtRibbonControlProps, 'data' | 'onSelectLayout'>): import("react").JSX.Element;
30
+ export declare function SmartArtStyleRibbonControl(props: Pick<ISmartArtRibbonControlProps, 'data' | 'onSelectStyle' | 'onSelectColor'>): import("react").JSX.Element;
31
+ export declare function SmartArtResetRibbonControl(props: Pick<ISmartArtRibbonControlProps, 'onReset' | 'onConvertToShapes'>): import("react").JSX.Element;
32
+ export declare function SmartArtRibbonControl(props: ISmartArtRibbonControlProps): import("react").JSX.Element;
33
+ export {};
@@ -0,0 +1,14 @@
1
+ import type { ISmartArtData, ISmartArtDataNode, SmartArtOperation } from '@univerjs-pro/engine-shape';
2
+ export interface ISmartArtTextPaneProps {
3
+ data: ISmartArtData;
4
+ onOperation: (operation: SmartArtOperation, focusedNodeId?: string) => void;
5
+ selectedNodeId?: string;
6
+ onSelectNode?: (nodeId: string | undefined) => void;
7
+ showToolbar?: boolean;
8
+ }
9
+ export interface ISmartArtTextPaneRow {
10
+ depth: number;
11
+ node: ISmartArtDataNode;
12
+ }
13
+ export declare function flattenSmartArtTextPaneRows(data: ISmartArtData): ISmartArtTextPaneRow[];
14
+ export declare function SmartArtTextPane(props: ISmartArtTextPaneProps): import("react").JSX.Element;
@@ -0,0 +1,35 @@
1
+ export type SmartArtLayoutIconElement = {
2
+ kind: 'ellipse';
3
+ cx: number;
4
+ cy: number;
5
+ rx: number;
6
+ ry: number;
7
+ transform?: string;
8
+ } | {
9
+ kind: 'line';
10
+ x1: number;
11
+ y1: number;
12
+ x2: number;
13
+ y2: number;
14
+ transform?: string;
15
+ } | {
16
+ kind: 'path';
17
+ d: string;
18
+ transform?: string;
19
+ } | {
20
+ kind: 'rect';
21
+ x: number;
22
+ y: number;
23
+ width: number;
24
+ height: number;
25
+ rx?: number;
26
+ transform?: string;
27
+ };
28
+ export interface ISmartArtLayoutCatalogItem {
29
+ category: string;
30
+ iconElements: SmartArtLayoutIconElement[];
31
+ iconFile: string;
32
+ id: string;
33
+ name: string;
34
+ }
35
+ export declare const SMART_ART_LAYOUT_CATALOG: readonly ISmartArtLayoutCatalogItem[];
@@ -0,0 +1,5 @@
1
+ import type { ISmartArtLayoutCatalogItem } from './smart-art-layout-catalog.generated';
2
+ export interface ISmartArtLayoutGalleryItem extends ISmartArtLayoutCatalogItem {
3
+ galleryId: string;
4
+ }
5
+ export declare const SMART_ART_LAYOUT_GALLERY_CATALOG: readonly ISmartArtLayoutGalleryItem[];