@univerjs-pro/shape-editor-ui 1.0.0-beta.0 → 1.0.0-beta.2

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 (130) 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 +498 -47
  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/commands/shape-text-hyper-link.command.d.ts +43 -0
  64. package/lib/types/common/formula-shape-en-us.d.ts +0 -19
  65. package/lib/types/config/config.d.ts +2 -25
  66. package/lib/types/controllers/components.controller.d.ts +4 -2
  67. package/lib/types/index.d.ts +26 -4
  68. package/lib/types/locale/en-US.d.ts +306 -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/services/shape-text-hyper-link-popup.service.d.ts +27 -0
  74. package/lib/types/utils/render-transformer-lifecycle.d.ts +4 -0
  75. package/lib/types/utils/shape-contextual-ribbon-host.d.ts +2 -0
  76. package/lib/types/utils/shape-floating-toolbar-config.d.ts +3 -3
  77. package/lib/types/utils/shape-transformer-config.d.ts +21 -21
  78. package/lib/types/views/FormulaBindingEditorDialog.d.ts +1 -1
  79. package/lib/types/views/formula-shape/UseFormulaShapeToolbar.d.ts +3 -0
  80. package/lib/types/views/shape-floating-toolbar/ShapeFillControls.d.ts +2 -0
  81. package/lib/types/views/shape-floating-toolbar/ShapeFloatingToolbar.d.ts +1 -2
  82. package/lib/types/views/shape-floating-toolbar/ShapeFloatingToolbarPrimitives.d.ts +11 -2
  83. package/lib/types/views/shape-floating-toolbar/ShapeStrokeControls.d.ts +5 -0
  84. package/lib/types/views/shape-floating-toolbar/ShapeTextControls.d.ts +3 -0
  85. package/lib/types/views/shape-floating-toolbar/shape-floating-toolbar-utils.d.ts +7 -1
  86. package/lib/types/views/shape-floating-toolbar/shape-floating-toolbar-wheel.util.d.ts +1 -0
  87. package/lib/types/views/shape-format-ribbon/ShapeEffectControls.d.ts +19 -0
  88. package/lib/types/views/shape-format-ribbon/ShapeEffectPresetIcon.d.ts +11 -0
  89. package/lib/types/views/shape-format-ribbon/ShapeFormatRibbonControls.d.ts +27 -0
  90. package/lib/types/views/shape-format-ribbon/shape-effect-reference-paths.generated.d.ts +6 -0
  91. package/lib/types/views/shape-picker/ShapeChangePicker.d.ts +7 -0
  92. package/lib/types/views/shape-quick-style/ShapeQuickStyleGallery.d.ts +10 -0
  93. package/lib/types/views/shape-text-editor/DocParagraphTypeDropdown.d.ts +1 -1
  94. package/lib/types/views/shape-text-editor/ShapeTextFloatToolbar.d.ts +0 -1
  95. package/lib/types/views/shape-text-editor/ShapeTextHyperLinkPopup.d.ts +8 -0
  96. package/lib/types/views/shape-text-editor/ShapeTextPositionWrapper.d.ts +4 -0
  97. package/lib/types/views/shape-text-editor/shape-text-editor-commands.d.ts +0 -1
  98. package/lib/types/views/shape-text-editor/shape-text-float-menu-render-controller-base.d.ts +13 -4
  99. package/lib/types/views/shape-text-editor/shape-text-keyboard.d.ts +4 -0
  100. package/lib/types/views/shape-text-editor/types.d.ts +1 -0
  101. package/lib/types/views/smart-art/SmartArtColorGallery.d.ts +6 -0
  102. package/lib/types/views/smart-art/SmartArtLayoutGallery.d.ts +6 -0
  103. package/lib/types/views/smart-art/SmartArtLayoutIcon.d.ts +6 -0
  104. package/lib/types/views/smart-art/SmartArtQuickStyleGallery.d.ts +10 -0
  105. package/lib/types/views/smart-art/SmartArtRibbonControl.d.ts +33 -0
  106. package/lib/types/views/smart-art/SmartArtTextPane.d.ts +14 -0
  107. package/lib/types/views/smart-art/smart-art-layout-catalog.generated.d.ts +35 -0
  108. package/lib/types/views/smart-art/smart-art-layout-gallery-catalog.generated.d.ts +5 -0
  109. package/lib/umd/index.js +1 -1
  110. package/lib/umd/locale/ar-SA.js +1 -1
  111. package/lib/umd/locale/ca-ES.js +1 -1
  112. package/lib/umd/locale/de-DE.js +1 -1
  113. package/lib/umd/locale/en-US.js +1 -1
  114. package/lib/umd/locale/es-ES.js +1 -1
  115. package/lib/umd/locale/fa-IR.js +1 -1
  116. package/lib/umd/locale/fr-FR.js +1 -1
  117. package/lib/umd/locale/id-ID.js +1 -1
  118. package/lib/umd/locale/it-IT.js +1 -1
  119. package/lib/umd/locale/ja-JP.js +1 -1
  120. package/lib/umd/locale/ko-KR.js +1 -1
  121. package/lib/umd/locale/pl-PL.js +1 -1
  122. package/lib/umd/locale/pt-BR.js +1 -1
  123. package/lib/umd/locale/ru-RU.js +1 -1
  124. package/lib/umd/locale/sk-SK.js +1 -1
  125. package/lib/umd/locale/vi-VN.js +1 -1
  126. package/lib/umd/locale/zh-CN.js +1 -1
  127. package/lib/umd/locale/zh-HK.js +1 -1
  128. package/lib/umd/locale/zh-TW.js +1 -1
  129. package/package.json +23 -26
  130. package/lib/types/services/formula-binding-unit-viewer.service.d.ts +0 -67
@@ -4,11 +4,13 @@ export declare function TextFillButton(props: {
4
4
  title: string;
5
5
  textStyle: ITextStyle;
6
6
  fallbackColor: string;
7
+ dropdownSide?: 'top' | 'bottom';
7
8
  onChange: (textStyle: ITextStyle) => void;
8
9
  }): import("react").JSX.Element;
9
10
  export declare function TextBackgroundColorButton(props: {
10
11
  title: string;
11
12
  color: string;
13
+ dropdownSide?: 'top' | 'bottom';
12
14
  onApply: () => void;
13
15
  onReset?: () => void;
14
16
  onChange: (color: string) => void;
@@ -26,5 +28,6 @@ export declare function TypographyPanelButton(props: {
26
28
  verticalAlign: VerticalAlign;
27
29
  horizontalAlignOptions: Array<IToolbarDropdownOption<HorizontalAlign>>;
28
30
  verticalAlignOptions: Array<IToolbarDropdownOption<VerticalAlign>>;
31
+ dropdownSide?: 'top' | 'bottom';
29
32
  onUpdateText: ShapeTextUpdateHandler;
30
33
  }): import("react").JSX.Element;
@@ -1,11 +1,17 @@
1
1
  import type { IShapeData, IShapeTextDataModel } from '@univerjs-pro/engine-shape';
2
- import type { IDocumentData, ITextStyle } from '@univerjs/core';
2
+ import type { IDocumentData, ITextStyle, PresetListType } from '@univerjs/core';
3
3
  import { HorizontalAlign, VerticalAlign } from '@univerjs/core';
4
4
  export interface IShapeTextUpdateOptions {
5
5
  textStyle?: ITextStyle;
6
6
  verticalAlign?: VerticalAlign;
7
7
  horizontalAlign?: HorizontalAlign;
8
+ listType?: PresetListType | null;
8
9
  }
9
10
  export declare function createDefaultShapeTextDocument(textStyle?: ITextStyle, horizontalAlign?: HorizontalAlign, text?: string): IDocumentData;
10
11
  export declare function getShapeTextModel(shapeData: IShapeData, options: IShapeTextUpdateOptions): IShapeTextDataModel;
12
+ export declare function getShapeTextListState(shapeData: IShapeData, family: PresetListType.ORDER_LIST | PresetListType.BULLET_LIST): {
13
+ active: boolean;
14
+ mixed: boolean;
15
+ value?: PresetListType;
16
+ };
11
17
  export declare function buildShapeTextDataUpdate(shapeData: IShapeData, options: IShapeTextUpdateOptions): IShapeData;
@@ -0,0 +1 @@
1
+ export declare function forwardShapeFloatingToolbarWheel(source: WheelEvent, canvasElement: HTMLCanvasElement): boolean;
@@ -0,0 +1,19 @@
1
+ import type { IShapeData, ShapeBevelPresetEnum } from '@univerjs-pro/engine-shape';
2
+ import { ShapeCameraPresetEnum } from '@univerjs-pro/engine-shape';
3
+ export type ShapeEffectCategory = 'shadow' | 'reflection' | 'glow' | 'softEdge' | 'bevel' | 'rotation3d';
4
+ /**
5
+ * Values observed by applying the native PowerPoint gallery to a newly inserted rectangle.
6
+ * Existing 3D properties not owned by the selected gallery remain intact through mergeEffectPatch.
7
+ */
8
+ export declare function createBevelPresetPatch(preset: ShapeBevelPresetEnum): IShapeData;
9
+ export declare function createRotationPresetPatch(preset: ShapeCameraPresetEnum): IShapeData;
10
+ export declare const ROTATION_GROUPS: Record<string, ShapeCameraPresetEnum[]>;
11
+ export declare function mergeEffectPatch(shapeData: IShapeData, patch: IShapeData): IShapeData;
12
+ export declare function ShapeEffectButton(props: {
13
+ categories?: ShapeEffectCategory[];
14
+ shapeData: IShapeData;
15
+ disabled?: boolean;
16
+ dropdownSide?: 'top' | 'bottom';
17
+ titleKey?: string;
18
+ onUpdateShapeData: (patch: IShapeData) => void;
19
+ }): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { IShapeScene3D } from '@univerjs-pro/engine-shape';
2
+ import { ShapeBevelPresetEnum, ShapeCameraPresetEnum } from '@univerjs-pro/engine-shape';
3
+ export declare const BEVEL_PRESET_ORDER: readonly [ShapeBevelPresetEnum.RelaxedInset, ShapeBevelPresetEnum.Circle, ShapeBevelPresetEnum.Slope, ShapeBevelPresetEnum.Cross, ShapeBevelPresetEnum.Angle, ShapeBevelPresetEnum.SoftRound, ShapeBevelPresetEnum.Convex, ShapeBevelPresetEnum.CoolSlant, ShapeBevelPresetEnum.Divot, ShapeBevelPresetEnum.Riblet, ShapeBevelPresetEnum.HardEdge, ShapeBevelPresetEnum.ArtDeco];
4
+ export declare function BevelPresetIcon(props: {
5
+ preset: ShapeBevelPresetEnum;
6
+ }): import("react").JSX.Element;
7
+ export declare function RotationPresetIcon(props: {
8
+ group: string;
9
+ preset: ShapeCameraPresetEnum;
10
+ scene3d: IShapeScene3D;
11
+ }): import("react").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import type { IShapeData, ShapeTypeEnum } from '@univerjs-pro/engine-shape';
2
+ import type { ReactNode } from 'react';
3
+ import type { IShapeFloatingToolbarExtensionAction } from '../shape-floating-toolbar/ShapeFloatingToolbar';
4
+ export interface IShapeStyleRibbonControlProps {
5
+ shapeData: IShapeData;
6
+ shapeType?: ShapeTypeEnum;
7
+ onUpdateShapeData: (patch: IShapeData) => void;
8
+ }
9
+ export type IShapeEffectsRibbonControlProps = IShapeStyleRibbonControlProps;
10
+ export interface IShapeTextRibbonControlProps {
11
+ fontFamilyPopupDataComponent: string;
12
+ shapeData: IShapeData;
13
+ onUpdateShapeData: (patch: IShapeData) => void;
14
+ }
15
+ export interface IShapeTextEffectsRibbonControlProps {
16
+ shapeData: IShapeData;
17
+ onUpdateShapeData: (patch: IShapeData) => void;
18
+ }
19
+ export interface IShapeFormulaRibbonControlProps {
20
+ actions: IShapeFloatingToolbarExtensionAction[];
21
+ panel?: ReactNode;
22
+ }
23
+ export declare function ShapeStyleRibbonControl(props: IShapeStyleRibbonControlProps): import("react").JSX.Element;
24
+ export declare function ShapeEffectsRibbonControl(props: IShapeEffectsRibbonControlProps): import("react").JSX.Element;
25
+ export declare function ShapeTextEffectsRibbonControl(props: IShapeTextEffectsRibbonControlProps): import("react").JSX.Element;
26
+ export declare function ShapeFormulaRibbonControl(props: IShapeFormulaRibbonControlProps): import("react").JSX.Element | null;
27
+ export declare function ShapeTextRibbonControl(props: IShapeTextRibbonControlProps): import("react").JSX.Element;
@@ -0,0 +1,6 @@
1
+ export interface IReferenceIconLayer {
2
+ fill: string;
3
+ d: string;
4
+ }
5
+ export declare const BEVEL_REFERENCE_PATHS: readonly IReferenceIconLayer[][];
6
+ export declare const ROTATION_REFERENCE_PATHS: readonly IReferenceIconLayer[][];
@@ -0,0 +1,7 @@
1
+ import type { ShapeTypeEnum } from '@univerjs-pro/engine-shape';
2
+ export declare const SHAPE_CHANGE_PICKER_COMPONENT = "shape-editor-ui.change-shape-picker";
3
+ interface IShapeChangePickerProps {
4
+ onChange?: (value: ShapeTypeEnum) => void;
5
+ }
6
+ export declare function ShapeChangePicker(props: IShapeChangePickerProps): import("react").JSX.Element;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import { getShapeQuickStylePresets } from '@univerjs-pro/shape-editor';
2
+ type ShapeQuickStyleType = Parameters<typeof getShapeQuickStylePresets>[0];
3
+ export interface IShapeQuickStyleGalleryProps {
4
+ type: ShapeQuickStyleType;
5
+ ariaLabel: string;
6
+ activePresetId?: string | null;
7
+ onSelect: (presetId: string) => void;
8
+ }
9
+ export declare function ShapeQuickStyleGallery(props: IShapeQuickStyleGalleryProps): import("react").JSX.Element;
10
+ export {};
@@ -1,8 +1,8 @@
1
1
  import type { MouseEvent as ReactMouseEvent } from 'react';
2
2
  export interface IDocParagraphTypeDropdownProps {
3
- buttonClassName?: string;
4
3
  className?: string;
5
4
  popupDataComponent?: string;
5
+ size?: 'small' | 'middle';
6
6
  title?: string;
7
7
  onAfterCommand?: () => void;
8
8
  onBeforeCommand?: () => void;
@@ -2,7 +2,6 @@ export declare const STYLE_COMMAND_IDS: string[];
2
2
  export declare const SHAPE_TEXT_FLOAT_TOOLBAR_CLASSES: {
3
3
  root: string;
4
4
  group: string;
5
- button: string;
6
5
  select: string;
7
6
  };
8
7
  export declare function ShapeTextFloatToolbar(): import("react").JSX.Element;
@@ -0,0 +1,8 @@
1
+ export declare function ShapeTextHyperLinkEdit(): import("react").JSX.Element | null;
2
+ export declare namespace ShapeTextHyperLinkEdit {
3
+ var componentKey: string;
4
+ }
5
+ export declare function ShapeTextHyperLinkInfo(): import("react").JSX.Element | null;
6
+ export declare namespace ShapeTextHyperLinkInfo {
7
+ var componentKey: string;
8
+ }
@@ -50,6 +50,10 @@ export declare function resolveShapeTextEditorPositionTransform(options: {
50
50
  scene: Nullable<Scene>;
51
51
  }): Nullable<IShapeObjectLike>;
52
52
  export declare function resolveShapeTextEditorPositionRoot(editorElement: HTMLElement | null): Element | null;
53
+ export declare function resolveEmbeddedShapeTextEditorPositionOffset(canvasElement: Element | null | undefined, positionRoot: Element | null): {
54
+ left: number;
55
+ top: number;
56
+ } | null;
53
57
  /**
54
58
  * Position wrapper component that handles shape positioning in DOM.
55
59
  * This is the first layer DOM that tracks shape position with scroll.
@@ -1,4 +1,3 @@
1
- export declare const SHAPE_TEXT_EDITOR_HYPERLINK_EDIT_OPERATION_ID = "doc.operation.show-hyper-link-edit-popup";
2
1
  export declare const SHAPE_TEXT_EDITOR_CALLOUT_COMMAND_ID = "docs-callout.command.insert";
3
2
  export declare const SHAPE_TEXT_EDITOR_CODE_COMMAND_ID = "docs-code.command.insert";
4
3
  export declare const SHAPE_TEXT_EDITOR_QUOTE_COMMAND_ID = "docs-quote.command.insert";
@@ -1,7 +1,8 @@
1
- import type { DocumentDataModel } from '@univerjs/core';
2
- import type { DocSelectionManagerService } from '@univerjs/docs';
3
- import type { DocCanvasPopManagerService, DocSelectionRenderService } from '@univerjs/docs-ui';
1
+ import type { DocumentDataModel, ICommandService } from '@univerjs/core';
2
+ import type { DocInterceptorService, DocSelectionManagerService } from '@univerjs/docs';
3
+ import type { DocCanvasPopManagerService, DocEventManagerService, DocRenderController, DocSelectionRenderService } from '@univerjs/docs-ui';
4
4
  import type { IRenderContext, IRenderModule } from '@univerjs/engine-render';
5
+ import type { ShapeTextHyperLinkPopupService } from '../../services/shape-text-hyper-link-popup.service';
5
6
  import { Disposable } from '@univerjs/core';
6
7
  export interface IShapeTextFloatMenuRenderControllerConfig {
7
8
  componentKey: string;
@@ -12,9 +13,17 @@ export declare class ShapeTextFloatMenuRenderControllerBase extends Disposable i
12
13
  private readonly _docSelectionManagerService;
13
14
  private readonly _docCanvasPopManagerService;
14
15
  private readonly _docSelectionRenderService;
16
+ private readonly _commandService;
17
+ private readonly _eventManagerService;
18
+ private readonly _popupService;
19
+ private readonly _interceptorService;
20
+ private readonly _renderController;
15
21
  private readonly _config;
16
22
  private _floatMenu;
17
- constructor(_context: IRenderContext<DocumentDataModel>, _docSelectionManagerService: DocSelectionManagerService, _docCanvasPopManagerService: DocCanvasPopManagerService, _docSelectionRenderService: DocSelectionRenderService, _config: IShapeTextFloatMenuRenderControllerConfig);
23
+ constructor(_context: IRenderContext<DocumentDataModel>, _docSelectionManagerService: DocSelectionManagerService, _docCanvasPopManagerService: DocCanvasPopManagerService, _docSelectionRenderService: DocSelectionRenderService, _commandService: ICommandService, _eventManagerService: DocEventManagerService, _popupService: ShapeTextHyperLinkPopupService, _interceptorService: DocInterceptorService, _renderController: DocRenderController, _config: IShapeTextFloatMenuRenderControllerConfig);
24
+ dispose(): void;
25
+ private _initHyperLinkInteraction;
26
+ private _initHyperLinkRendering;
18
27
  private _initSelectionChange;
19
28
  private _hideFloatMenu;
20
29
  private _showFloatMenu;
@@ -6,6 +6,10 @@ interface IShapeTextEditorKeyboardRange {
6
6
  endOffset?: number;
7
7
  collapsed?: boolean;
8
8
  }
9
+ export declare function getShapeTextEditorSelectAllRange(dataStreamLength: number): {
10
+ startOffset: number;
11
+ endOffset: number;
12
+ };
9
13
  export declare function isShapeTextEditorKeyboardFocusActive(isInputFocusing: boolean, textRanges: readonly IShapeTextEditorKeyboardRange[] | null | undefined): boolean;
10
14
  interface IShapeTextEditorKeyboardOptions {
11
15
  commitOnEnter?: boolean;
@@ -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>>;
@@ -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 { SmartArtInsertPositionEnum } from '@univerjs-pro/engine-shape';
3
+ import type { ISmartArtLayoutCatalogItem } from './smart-art-layout-catalog.generated';
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[];