@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
@@ -31,6 +31,8 @@ export interface IFillStyleTabsEditorProps<T extends ItemValue = FillStyleType>
31
31
  noFillEditor?: ReactNode;
32
32
  pictureFillEditor?: ReactNode;
33
33
  renderColorIcon?: (color: string) => ReactNode;
34
+ /** Keep host text editing active while interacting with the nested color-picker portal. */
35
+ editorInteractionBoundary?: boolean;
34
36
  keepColorPickerOpenOnChange?: boolean;
35
37
  onChange?: (value: T) => void;
36
38
  onColorChange?: (color: string) => void;
@@ -1,31 +1,9 @@
1
1
  import type { IHostExternalReference } from '@univerjs-pro/engine-formula';
2
- import type { IBaseSnapshot, IWorkbookData, UniverInstanceType } from '@univerjs/core';
3
2
  export declare const SHAPE_EDITOR_UI_PLUGIN_CONFIG_KEY = "shape-editor-ui.config";
4
3
  export declare const configSymbol: unique symbol;
5
- export type FormulaBindingUnitType = UniverInstanceType.UNIVER_SHEET | UniverInstanceType.UNIVER_BASE;
6
- interface IFormulaBindingUnitResourceBase {
7
- unitId: string;
8
- name: string;
9
- }
10
- export type IFormulaBindingUnitResource = IFormulaBindingUnitResourceBase & ({
11
- type: UniverInstanceType.UNIVER_SHEET;
12
- loadSnapshot: () => Promise<IWorkbookData>;
13
- } | {
14
- type: UniverInstanceType.UNIVER_BASE;
15
- loadSnapshot: () => Promise<IBaseSnapshot>;
16
- });
17
- /**
18
- * Supplies remote source units visible to the current user.
19
- *
20
- * Loaded Sheet and Base units are included automatically. A provider only needs to return
21
- * additional units whose snapshots can be loaded into the read-only reference picker.
22
- */
23
- export interface IFormulaBindingUnitProvider {
24
- listUnits: () => Promise<IFormulaBindingUnitResource[]>;
25
- }
26
4
  export interface IUniverShapeEditorUIConfig {
27
- formulaUnitProvider?: IFormulaBindingUnitProvider;
28
- formulaViewerWorkerURL?: string | Worker;
5
+ /** Sets the initial visibility of Shape floating toolbars in supporting editors. */
6
+ floatingToolbar?: boolean;
29
7
  }
30
8
  export interface IFormulaBindingHost {
31
9
  unitId: string;
@@ -41,4 +19,3 @@ export interface IFormulaBindingEditorResult extends IFormulaBindingEditorValue
41
19
  externalReferences: readonly IHostExternalReference[];
42
20
  }
43
21
  export declare const defaultPluginConfig: IUniverShapeEditorUIConfig;
44
- export {};
@@ -1,7 +1,8 @@
1
1
  import { Disposable } from '@univerjs/core';
2
- import { IconManager } from '@univerjs/ui';
2
+ import { ComponentManager, IconManager } from '@univerjs/ui';
3
3
  export declare class ComponentsController extends Disposable {
4
4
  private readonly _iconManager;
5
- constructor(_iconManager: IconManager);
5
+ private readonly _componentManager;
6
+ constructor(_iconManager: IconManager, _componentManager: ComponentManager);
6
7
  private _registerIcons;
7
8
  }
@@ -1,13 +1,19 @@
1
1
  import './global.css';
2
+ export { ToggleShapeFloatingToolbarOperation } from './commands/operations/toggle-shape-floating-toolbar.operation';
2
3
  export { FillStyleTabsEditor } from './components/fill-style-tabs-editor/FillStyleTabsEditor';
3
4
  export { SHAPE_EDITOR_UI_PLUGIN_CONFIG_KEY } from './config/config';
4
- export type { FormulaBindingUnitType, IFormulaBindingEditorResult, IFormulaBindingEditorValue, IFormulaBindingHost, IFormulaBindingUnitProvider, IFormulaBindingUnitResource, IUniverShapeEditorUIConfig, } from './config/config';
5
+ export type { IFormulaBindingEditorResult, IFormulaBindingEditorValue, IFormulaBindingHost, IUniverShapeEditorUIConfig, } from './config/config';
6
+ export { ShapeFloatingToolbarToggleFactory } from './menu/shape-floating-toolbar.menu';
5
7
  export { UniverShapeEditorUIPlugin } from './plugin';
6
8
  export { applyFormulaBindingReferenceSelection, normalizeFormulaBindingFormula, } from './services/formula-binding-editor';
7
9
  export type { IFormulaBindingReferenceEditResult, IFormulaBindingReferenceSelectionChange, } from './services/formula-binding-editor';
8
- export { FormulaBindingUnitViewerService } from './services/formula-binding-unit-viewer.service';
9
- export type { FormulaBindingViewerUnit, IFormulaBindingViewerFormulaContext, } from './services/formula-binding-unit-viewer.service';
10
+ export { FormulaBindingService } from './services/formula-binding.service';
11
+ export type { IFormulaBinding, IFormulaBindingContext, IFormulaBindingOptions, } from './services/formula-binding.service';
12
+ export { ShapeFloatingToolbarService } from './services/shape-floating-toolbar.service';
10
13
  export { activateDrawingObject, clearActiveDrawingObjects } from './utils/activate-drawing-object';
14
+ export { getDrawingTypeNameKey } from './utils/drawing-type-name';
15
+ export type { DrawingTypeNameKey } from './utils/drawing-type-name';
16
+ export { resolveShapeContextualRibbonHostMode } from './utils/shape-contextual-ribbon-host';
11
17
  export { SHAPE_FLOATING_TOOLBAR_TOP_OFFSET, SHEET_DOC_SHAPE_FLOATING_TOOLBAR_TOP_OFFSET } from './utils/shape-floating-toolbar-config';
12
18
  export { SHAPE_EDITOR_TRANSFORMER_CONFIG } from './utils/shape-transformer-config';
13
19
  export { getTextModel, getTextStyle, normalizeShapeTextModel } from './utils/util';
@@ -25,28 +31,48 @@ export { getInitialShapeFillType, ShapeFillEditor, } from './views/shape-editor-
25
31
  export { ShapeImageFillEditor } from './views/shape-editor-panel/ShapeImageFillEditor';
26
32
  export { ShapeLineEditor } from './views/shape-editor-panel/ShapeLineEditor';
27
33
  export { ShapeTextBoxEditor } from './views/shape-editor-panel/ShapeTextBoxEditor';
34
+ export { keepFloatingToolbarPanelInteraction } from './views/shape-floating-toolbar/floating-toolbar-interaction';
35
+ export { SHAPE_FLOATING_TOOLBAR_DEFAULT_FILL_COLOR, SHAPE_FLOATING_TOOLBAR_DEFAULT_STROKE_COLOR, SHAPE_FLOATING_TOOLBAR_DEFAULT_TEXT_BACKGROUND_COLOR, SHAPE_FLOATING_TOOLBAR_DEFAULT_TEXT_COLOR, } from './views/shape-floating-toolbar/shape-floating-toolbar-constants';
28
36
  export { buildShapeTextDataUpdate } from './views/shape-floating-toolbar/shape-floating-toolbar-utils';
29
37
  export type { IShapeTextUpdateOptions } from './views/shape-floating-toolbar/shape-floating-toolbar-utils';
30
- export { SHAPE_FLOATING_TOOLBAR_DEFAULT_STROKE_COLOR, SHAPE_FLOATING_TOOLBAR_DEFAULT_TEXT_BACKGROUND_COLOR, SHAPE_FLOATING_TOOLBAR_DEFAULT_TEXT_COLOR, ShapeFillButton, ShapeFloatingToolbar, ShapeFloatingToolbarContent, ShapeFloatingToolbarDropdownTrigger, ShapeFloatingToolbarFontSizeSelect, ShapeFloatingToolbarIcon, ShapeFloatingToolbarMenuItem, ShapeFloatingToolbarMenuPanel, ShapeStrokePanelButton, ShapeStrokePanelContent, TextFillButton, TypographyPanelButton, } from './views/shape-floating-toolbar/ShapeFloatingToolbar';
38
+ export { ShapeFillButton } from './views/shape-floating-toolbar/ShapeFillControls';
39
+ export { ShapeFloatingToolbar, ShapeFloatingToolbarMenuItem, ShapeFloatingToolbarMenuPanel, } from './views/shape-floating-toolbar/ShapeFloatingToolbar';
31
40
  export type { IShapeFloatingToolbarExtensionGroup, IShapeFloatingToolbarLayerActions, } from './views/shape-floating-toolbar/ShapeFloatingToolbar';
41
+ export { ShapeFloatingToolbarContent, ShapeFloatingToolbarDropdown, ShapeFloatingToolbarDropdownTrigger, ShapeFloatingToolbarFontSizeSelect, ShapeFloatingToolbarIcon, } from './views/shape-floating-toolbar/ShapeFloatingToolbarPrimitives';
42
+ export { buildShapeStrokeDataUpdate, ShapeStrokePanelButton, ShapeStrokePanelContent, } from './views/shape-floating-toolbar/ShapeStrokeControls';
43
+ export type { IShapeStrokePanelContentProps, ShapeStrokePanelMode, } from './views/shape-floating-toolbar/ShapeStrokeControls';
44
+ export { TextBackgroundColorButton, TextFillButton, TypographyPanelButton, } from './views/shape-floating-toolbar/ShapeTextControls';
45
+ export { ShapeEffectsRibbonControl, ShapeFormulaRibbonControl, ShapeStyleRibbonControl, ShapeTextEffectsRibbonControl, ShapeTextRibbonControl, } from './views/shape-format-ribbon/ShapeFormatRibbonControls';
46
+ export { SHAPE_CHANGE_PICKER_COMPONENT } from './views/shape-picker/ShapeChangePicker';
32
47
  export { ShapePickerDropdown, ShapePickerPanel } from './views/shape-picker/ShapePickerGrid';
33
48
  export { ShapeGroupEnum, shapeTypeOptions } from './views/shape-picker/shapes';
34
49
  export type { ShapeTypeOption } from './views/shape-picker/shapes';
50
+ export { ShapeQuickStyleGallery } from './views/shape-quick-style/ShapeQuickStyleGallery';
35
51
  export { DocParagraphTypeDropdown } from './views/shape-text-editor/DocParagraphTypeDropdown';
36
52
  export { resolveShapeTextEditorBehaviorShapeData, resolveShapeTextEditorFlowAxis, resolveShapeTextEditorWrapStrategy, shouldAllowShapeTextEditorHostSizeShrink, shouldAutoFitShapeTextEditorNoWrap, shouldClipShapeTextDocument, } from './views/shape-text-editor/shape-text-behavior';
37
53
  export type { ShapeTextFlowAxis } from './views/shape-text-editor/shape-text-behavior';
38
54
  export { plainShapeTextToDocumentData, prepareShapeTextDocumentData, resolveShapeTextDocumentAlignment, resolveShapeTextDocumentPageHeight, stripShapeTextDocumentLayout, } from './views/shape-text-editor/shape-text-document';
39
55
  export { SHAPE_TEXT_EDITOR_QUOTE_COMMAND_ID } from './views/shape-text-editor/shape-text-editor-commands';
40
56
  export { ShapeTextFloatMenuRenderControllerBase, } from './views/shape-text-editor/shape-text-float-menu-render-controller-base';
41
- export { getShapeTextOpticalVerticalOffset, isShapeTextOpticalVerticalAlignEnabled, resolveShapeTextDocumentRenderLayout, resolveShapeTextVerticalOffset, } from './views/shape-text-editor/shape-text-layout';
57
+ export { getShapeTextOpticalVerticalOffset, getShapeTextVisibleInkHeight, isShapeTextOpticalVerticalAlignEnabled, normalizeShapeTextRect, resolveShapeTextDocumentRenderLayout, resolveShapeTextVerticalOffset, } from './views/shape-text-editor/shape-text-layout';
42
58
  export type { IShapeTextDocumentRenderLayout } from './views/shape-text-editor/shape-text-layout';
59
+ export { resolveShapeTextEditorTextRect } from './views/shape-text-editor/shape-text-layout';
43
60
  export { resolveShapeTextNoWrapLayout } from './views/shape-text-editor/shape-text-no-wrap-layout';
44
61
  export type { IResolveShapeTextNoWrapLayoutOptions, IShapeTextNoWrapLayout, IShapeTextNoWrapRect, } from './views/shape-text-editor/shape-text-no-wrap-layout';
45
62
  export { createShapeTextPlaceholderDocumentData, isShapeTextEditorDocumentEmpty, } from './views/shape-text-editor/shape-text-placeholder';
46
63
  export { resolveShapeTextBoxResizePolicy } from './views/shape-text-editor/shape-text-resize-policy';
47
64
  export type { IShapeTextBoxResizePolicyResult, IShapeTextBoxResizeRect, } from './views/shape-text-editor/shape-text-resize-policy';
48
- export { resolveShapeTextEditorTextRect } from './views/shape-text-editor/ShapeTextEditor';
49
65
  export { ShapeTextEditorContainer } from './views/shape-text-editor/ShapeTextEditorContainer';
50
66
  export { ShapeTextFloatToolbar } from './views/shape-text-editor/ShapeTextFloatToolbar';
51
67
  export type { IShapeTextEditingParams, IShapeTextEditorAdapter, IShapeTextEditorModel, IShapeTextEditorPositionOptions, IShapeTextHostHeightUpdateParams, IShapeTextHostSizeUpdateParams, IShapeTextUpdateParams, } from './views/shape-text-editor/types';
52
68
  export { stripShapeTextPlainMarker } from './views/shape-text-editor/types';
69
+ export { SMART_ART_LAYOUT_CATALOG } from './views/smart-art/smart-art-layout-catalog.generated';
70
+ export type { ISmartArtLayoutCatalogItem, SmartArtLayoutIconElement } from './views/smart-art/smart-art-layout-catalog.generated';
71
+ export { SMART_ART_LAYOUT_GALLERY_CATALOG } from './views/smart-art/smart-art-layout-gallery-catalog.generated';
72
+ export { SmartArtColorGallery } from './views/smart-art/SmartArtColorGallery';
73
+ export { SmartArtLayoutGallery } from './views/smart-art/SmartArtLayoutGallery';
74
+ export { SmartArtLayoutIcon } from './views/smart-art/SmartArtLayoutIcon';
75
+ export { SmartArtQuickStyleGallery, SmartArtQuickStylePreview } from './views/smart-art/SmartArtQuickStyleGallery';
76
+ export { SmartArtCreateGraphicRibbonControl, SmartArtLayoutRibbonControl, SmartArtResetRibbonControl, SmartArtRibbonControl, SmartArtStyleRibbonControl, } from './views/smart-art/SmartArtRibbonControl';
77
+ export type { ISmartArtRibbonControlProps } from './views/smart-art/SmartArtRibbonControl';
78
+ export { flattenSmartArtTextPaneRows, SmartArtTextPane } from './views/smart-art/SmartArtTextPane';
@@ -1,5 +1,108 @@
1
1
  declare const locale: {
2
2
  'shape-editor-ui': {
3
+ effects: {
4
+ title: string;
5
+ shadow: string;
6
+ reflection: string;
7
+ glow: string;
8
+ softEdge: string;
9
+ bevel: string;
10
+ rotation3d: string;
11
+ none: string;
12
+ menu: {
13
+ shadow: string;
14
+ reflection: string;
15
+ glow: string;
16
+ softEdge: string;
17
+ bevel: string;
18
+ rotation3d: string;
19
+ };
20
+ groups: {
21
+ outer: string;
22
+ perspective: string;
23
+ reflectionVariations: string;
24
+ glowVariations: string;
25
+ softEdgeVariations: string;
26
+ bevelVariations: string;
27
+ parallel: string;
28
+ oblique: string;
29
+ };
30
+ textTitle: string;
31
+ };
32
+ smartArt: {
33
+ addAfter: string;
34
+ addAssistant: string;
35
+ addBelow: string;
36
+ convertToShapes: string;
37
+ deleteNode: string;
38
+ demote: string;
39
+ direction: string;
40
+ layout: string;
41
+ moveDown: string;
42
+ moveUp: string;
43
+ promote: string;
44
+ reset: string;
45
+ styles: string;
46
+ textPane: string;
47
+ title: string;
48
+ category: {
49
+ all: string;
50
+ list: string;
51
+ process: string;
52
+ cycle: string;
53
+ hierarchy: string;
54
+ relationship: string;
55
+ matrix: string;
56
+ pyramid: string;
57
+ picture: string;
58
+ timeline: string;
59
+ team: string;
60
+ textCard: string;
61
+ };
62
+ addShape: string;
63
+ addBullet: string;
64
+ createGraphic: string;
65
+ layoutGroup: string;
66
+ moveForward: string;
67
+ moveBackward: string;
68
+ resetGroup: string;
69
+ styleGroup: string;
70
+ changeColors: string;
71
+ quickStyle: {
72
+ section: {
73
+ bestMatch: string;
74
+ threeDimensional: string;
75
+ };
76
+ name: {
77
+ simple1: string;
78
+ simple2: string;
79
+ simple3: string;
80
+ simple4: string;
81
+ simple5: string;
82
+ '3d1': string;
83
+ '3d2': string;
84
+ '3d3': string;
85
+ '3d4': string;
86
+ '3d5': string;
87
+ '3d6': string;
88
+ '3d7': string;
89
+ '3d8': string;
90
+ '3d9': string;
91
+ };
92
+ };
93
+ colorStyle: {
94
+ section: {
95
+ theme: string;
96
+ colorful: string;
97
+ accent1: string;
98
+ accent2: string;
99
+ accent3: string;
100
+ accent4: string;
101
+ accent5: string;
102
+ accent6: string;
103
+ };
104
+ };
105
+ };
3
106
  formulaBinding: {
4
107
  accountingDescription: string;
5
108
  baseUnit: string;
@@ -18,9 +121,18 @@ declare const locale: {
18
121
  currency: string;
19
122
  custom: string;
20
123
  date: string;
124
+ dateTime: string;
125
+ durationTime: string;
126
+ financial: string;
21
127
  general: string;
22
128
  more: string;
129
+ number: string;
130
+ percentage: string;
131
+ roundingCurrency: string;
132
+ scientific: string;
133
+ text: string;
23
134
  thousandSeparator: string;
135
+ time: string;
24
136
  };
25
137
  formulaPlaceholder: string;
26
138
  generalDescription: string;
@@ -57,25 +169,6 @@ declare const locale: {
57
169
  confirm: string;
58
170
  cancel: string;
59
171
  animation: string;
60
- formats: {
61
- general: string;
62
- text: string;
63
- number: string;
64
- percent: string;
65
- percentage: string;
66
- scientific: string;
67
- accounting: string;
68
- financial: string;
69
- currency: string;
70
- roundingCurrency: string;
71
- date: string;
72
- time: string;
73
- dateTime: string;
74
- durationTime: string;
75
- thousandSeparator: string;
76
- custom: string;
77
- more: string;
78
- };
79
172
  };
80
173
  insertShape: string;
81
174
  openPanel: string;
@@ -112,6 +205,12 @@ declare const locale: {
112
205
  solidFill: string;
113
206
  gradientFill: string;
114
207
  pictureFill: string;
208
+ tabs: {
209
+ noFill: string;
210
+ solidFill: string;
211
+ gradientFill: string;
212
+ pictureFill: string;
213
+ };
115
214
  patternFill: string;
116
215
  color: string;
117
216
  transparency: string;
@@ -399,8 +498,13 @@ declare const locale: {
399
498
  };
400
499
  };
401
500
  toolbar: {
402
- expandShapeToolbar: string;
403
- hideMenu: string;
501
+ fontFamily: string;
502
+ fontSize: string;
503
+ increaseFontSize: string;
504
+ decreaseFontSize: string;
505
+ floatingToolbar: string;
506
+ quickStyles: string;
507
+ changeShape: string;
404
508
  alignLeft: string;
405
509
  alignCenter: string;
406
510
  alignRight: string;
@@ -418,6 +522,13 @@ declare const locale: {
418
522
  typography: string;
419
523
  more: string;
420
524
  };
525
+ arrange: {
526
+ title: string;
527
+ forward: string;
528
+ backward: string;
529
+ front: string;
530
+ back: string;
531
+ };
421
532
  align: {
422
533
  top: string;
423
534
  middle: string;
@@ -0,0 +1,3 @@
1
+ import type { IAccessor } from '@univerjs/core';
2
+ import type { IMenuButtonItem } from '@univerjs/ui';
3
+ export declare function ShapeFloatingToolbarToggleFactory(accessor: IAccessor): IMenuButtonItem<string, boolean>;
@@ -1,13 +1,14 @@
1
1
  import type { IUniverShapeEditorUIConfig } from './config/config';
2
- import { IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
2
+ import { ICommandService, IConfigService, Injector, Plugin, UniverInstanceType } from '@univerjs/core';
3
3
  export declare class UniverShapeEditorUIPlugin extends Plugin {
4
4
  private readonly _config;
5
5
  protected readonly _injector: Injector;
6
6
  private readonly _configService;
7
+ private readonly _commandService;
7
8
  static type: UniverInstanceType;
8
9
  static pluginName: string;
9
10
  static packageName: string;
10
11
  static version: string;
11
- constructor(_config: IUniverShapeEditorUIConfig | undefined, _injector: Injector, _configService: IConfigService);
12
+ constructor(_config: IUniverShapeEditorUIConfig | undefined, _injector: Injector, _configService: IConfigService, _commandService: ICommandService);
12
13
  onStarting(): void;
13
14
  }
@@ -0,0 +1,34 @@
1
+ import type { IReferencedUnitCatalogService, IResourceRef } from '@univerjs-pro/embed';
2
+ import type { IReferencedUnitViewerSession } from '@univerjs-pro/embed-unit-ui';
3
+ import type { IDisposable } from '@univerjs/core';
4
+ import type { FormulaSequenceNode, IFormulaRefSelection } from '@univerjs/engine-formula';
5
+ import type { IFormulaBindingHost } from '../config/config';
6
+ import type { IFormulaBindingReferenceSelectionChange } from './formula-binding-editor';
7
+ import { HostExternalReferenceModel } from '@univerjs-pro/engine-formula';
8
+ import { IUniverInstanceService, ThemeService } from '@univerjs/core';
9
+ export interface IFormulaBindingContext {
10
+ formula: string;
11
+ refSelections: IFormulaRefSelection[];
12
+ selectionEnd: number;
13
+ selectionStart: number;
14
+ sequenceNodes: FormulaSequenceNode[];
15
+ }
16
+ export interface IFormulaBindingOptions {
17
+ host: IFormulaBindingHost;
18
+ onSelectReferences(change: IFormulaBindingReferenceSelectionChange): void;
19
+ }
20
+ export interface IFormulaBinding extends IDisposable {
21
+ updateFormulaContext(context: IFormulaBindingContext): void;
22
+ }
23
+ export declare class FormulaBindingService {
24
+ private readonly _catalog;
25
+ private readonly _themeService;
26
+ private readonly _externalReferenceModel;
27
+ private readonly _instanceService;
28
+ constructor(_catalog: IReferencedUnitCatalogService, _themeService: ThemeService, _externalReferenceModel: HostExternalReferenceModel, _instanceService: IUniverInstanceService);
29
+ resolveInitialResourceRef(host: IFormulaBindingHost, sequenceNodes: FormulaSequenceNode[]): {
30
+ ref?: IResourceRef;
31
+ required: boolean;
32
+ };
33
+ bind(session: IReferencedUnitViewerSession, options: IFormulaBindingOptions): IFormulaBinding;
34
+ }
@@ -0,0 +1,16 @@
1
+ import type { Observable } from 'rxjs';
2
+ import { Disposable, IConfigService } from '@univerjs/core';
3
+ export declare class ShapeFloatingToolbarService extends Disposable {
4
+ private readonly _enabled$;
5
+ private readonly _fallbackVisible$;
6
+ private readonly _fallbackVisibleSources;
7
+ readonly enabled$: Observable<boolean>;
8
+ readonly visible$: Observable<boolean>;
9
+ constructor(configService: IConfigService);
10
+ getEnabled(): boolean;
11
+ setEnabled(enabled: boolean): void;
12
+ getVisible(): boolean;
13
+ setFallbackVisible(visible: boolean, source?: string): void;
14
+ toggle(): void;
15
+ dispose(): void;
16
+ }
@@ -0,0 +1,3 @@
1
+ import { DrawingTypeEnum } from '@univerjs/core';
2
+ export type DrawingTypeNameKey = 'chart' | 'dom' | 'group' | 'image' | 'object' | 'shape' | 'smartArt' | 'table' | 'unit' | 'video';
3
+ export declare function getDrawingTypeNameKey(drawingType: DrawingTypeEnum): DrawingTypeNameKey;
@@ -0,0 +1,2 @@
1
+ export type ShapeContextualRibbonHostMode = 'regular' | 'tab' | 'isolated';
2
+ export declare function resolveShapeContextualRibbonHostMode(canvasElement: HTMLElement | null | undefined): ShapeContextualRibbonHostMode;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Extra top clearance for shape toolbars, so they do not visually touch selection affordances.
2
+ * Symmetric vertical clearance for shape toolbars, including the rotation affordance around a selection.
3
3
  */
4
- export declare const SHAPE_FLOATING_TOOLBAR_TOP_OFFSET = 16;
5
- export declare const SHEET_DOC_SHAPE_FLOATING_TOOLBAR_TOP_OFFSET = 16;
4
+ export declare const SHAPE_FLOATING_TOOLBAR_TOP_OFFSET = 64;
5
+ export declare const SHEET_DOC_SHAPE_FLOATING_TOOLBAR_TOP_OFFSET = 64;
@@ -8,4 +8,4 @@ export interface IFormulaBindingEditorDialogProps {
8
8
  onClose: () => void;
9
9
  onConfirm: (result: IFormulaBindingEditorResult) => void;
10
10
  }
11
- export declare function FormulaBindingEditorDialog(props: IFormulaBindingEditorDialogProps): import("react").JSX.Element;
11
+ export declare function FormulaBindingEditorDialog(props: IFormulaBindingEditorDialogProps): import("react").JSX.Element | null;
@@ -4,6 +4,9 @@ import type { ReactNode } from 'react';
4
4
  import type { IShapeFloatingToolbarExtensionGroup } from '../shape-floating-toolbar/ShapeFloatingToolbar';
5
5
  interface IUseFormulaShapeToolbarOptions extends IShapeFormulaIdentity {
6
6
  shapeData?: IShapeData;
7
+ registerBinding?: boolean;
8
+ showLabels?: boolean;
9
+ dropdownSide?: 'top' | 'bottom';
7
10
  onUpdateBinding: (binding: IShapeFormulaBinding) => void;
8
11
  }
9
12
  export declare function useFormulaShapeToolbar(options: IUseFormulaShapeToolbarOptions): {
@@ -0,0 +1,14 @@
1
+ import type { IShapeData } from '@univerjs-pro/engine-shape';
2
+ import type { ShapeDataUpdateHandler } from './shape-floating-toolbar-types';
3
+ export declare function ShapeFillButton(props: {
4
+ title: string;
5
+ label?: string;
6
+ shapeData: IShapeData;
7
+ open?: boolean;
8
+ disabled?: boolean;
9
+ fallbackColor?: string;
10
+ fallbackGradientEndColor?: string;
11
+ dropdownSide?: 'top' | 'bottom';
12
+ onOpenChange?: (open: boolean) => void;
13
+ onUpdateShapeData: ShapeDataUpdateHandler;
14
+ }): import("react").JSX.Element;
@@ -1,22 +1,13 @@
1
1
  import type { IShapeData, ShapeTypeEnum } from '@univerjs-pro/engine-shape';
2
2
  import type { ITextStyle } from '@univerjs/core';
3
- import type { MouseEvent, PointerEvent, ReactNode } from 'react';
4
- import type { IShapeTextUpdateOptions } from './shape-floating-toolbar-utils';
3
+ import type { ReactNode } from 'react';
4
+ import type { IToolbarDropdownOption, ShapeDataUpdateHandler, ShapeTextUpdateHandler } from './shape-floating-toolbar-types';
5
5
  import { HorizontalAlign, VerticalAlign } from '@univerjs/core';
6
- export declare const SHAPE_FLOATING_TOOLBAR_DEFAULT_FILL_COLOR = "#3B82F6";
7
- export declare const SHAPE_FLOATING_TOOLBAR_DEFAULT_STROKE_COLOR = "#2563EB";
8
- export declare const SHAPE_FLOATING_TOOLBAR_DEFAULT_TEXT_COLOR = "#111827";
9
- export declare const SHAPE_FLOATING_TOOLBAR_DEFAULT_TEXT_BACKGROUND_COLOR = "#ffffff";
10
6
  export type IShapeFloatingToolbarWrappingStyle = string | number;
11
7
  export interface IShapeFloatingToolbarTextModel {
12
8
  ha?: HorizontalAlign;
13
9
  va?: VerticalAlign;
14
10
  }
15
- export interface IToolbarDropdownOption<T extends string | number> {
16
- label: string;
17
- value: T;
18
- icon: ReactNode;
19
- }
20
11
  export interface IShapeFloatingToolbarGroupAction {
21
12
  type: 'group' | 'ungroup';
22
13
  label: string;
@@ -49,6 +40,7 @@ export interface IShapeFloatingToolbarExtensionGroup {
49
40
  actions: IShapeFloatingToolbarExtensionAction[];
50
41
  }
51
42
  export interface IShapeFloatingToolbarProps {
43
+ canvasElement: HTMLCanvasElement;
52
44
  shapeData?: IShapeData;
53
45
  shapeType?: ShapeTypeEnum;
54
46
  textStyle: ITextStyle;
@@ -62,130 +54,16 @@ export interface IShapeFloatingToolbarProps {
62
54
  defaultFillColor?: string;
63
55
  defaultGradientEndColor?: string;
64
56
  defaultStrokeColor?: string;
65
- onUpdateShapeData: (oldShapeJSON: {
66
- oldShapeData?: IShapeData;
67
- }, shapeData?: IShapeData, patch?: IShapeData) => void;
68
- onUpdateText: (params: IShapeTextUpdateOptions) => void;
57
+ onUpdateShapeData: ShapeDataUpdateHandler;
58
+ onUpdateText: ShapeTextUpdateHandler;
69
59
  onUpdateWrappingStyle?: (value: IShapeFloatingToolbarWrappingStyle) => void;
70
60
  groupAction?: IShapeFloatingToolbarGroupAction;
71
61
  layerActions?: IShapeFloatingToolbarLayerActions;
72
62
  extensionGroups?: IShapeFloatingToolbarExtensionGroup[];
73
- collapseLabel?: string;
74
- expandLabel?: string;
75
63
  deleteLabel?: string;
76
64
  onOpenPanel?: () => void;
77
65
  onDelete?: () => void;
78
66
  }
79
- export declare function ShapeFloatingToolbarIcon(props: {
80
- children: ReactNode;
81
- className?: string;
82
- }): import("react").JSX.Element;
83
- export declare function ShapeFloatingToolbarContent(props: {
84
- children: ReactNode;
85
- className?: string;
86
- maxWidthClassName?: string;
87
- onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
88
- }): import("react").JSX.Element;
89
- export declare function ShapeFloatingToolbarButton(props: {
90
- title?: string;
91
- active?: boolean;
92
- disabled?: boolean;
93
- children: ReactNode;
94
- className?: string;
95
- sizeClassName?: string;
96
- tooltipVisible?: boolean;
97
- ariaExpanded?: boolean;
98
- onClick?: () => void;
99
- onMouseDown?: (event: MouseEvent<HTMLButtonElement>) => void;
100
- onPointerDown?: (event: PointerEvent<HTMLButtonElement>) => void;
101
- }): import("react").JSX.Element;
102
- export declare function ShapeFloatingToolbarDropdownTrigger(props: {
103
- title?: string;
104
- icon: ReactNode;
105
- active?: boolean;
106
- className?: string;
107
- sizeClassName?: string;
108
- onMouseDown?: (event: MouseEvent<HTMLButtonElement>) => void;
109
- onPointerDown?: (event: PointerEvent<HTMLButtonElement>) => void;
110
- }): import("react").JSX.Element;
111
- export declare function ShapeFloatingToolbarFontSizeSelect(props: {
112
- value: string | number;
113
- className?: string;
114
- onChange: (fontSize: number) => void;
115
- onAfterChange?: () => void;
116
- }): import("react").JSX.Element;
117
- export type ShapeStrokePanelMode = 'none' | 'solid' | 'dash' | 'dot';
118
- export declare function buildShapeStrokeDataUpdate(currentStroke: IShapeData['stroke'], resolvedStroke: NonNullable<IShapeData['stroke']>, partial: Partial<NonNullable<IShapeData['stroke']>>): {
119
- nextShapeData: IShapeData;
120
- patch: IShapeData;
121
- };
122
- export interface IShapeStrokePanelContentProps {
123
- title: string;
124
- shapeData: IShapeData;
125
- disabled?: boolean;
126
- resetLabel?: string;
127
- modeOptions?: ShapeStrokePanelMode[];
128
- showDashDropdown?: boolean;
129
- fallbackColor?: string;
130
- widthRange?: {
131
- min: number;
132
- max: number;
133
- step: number;
134
- };
135
- onReset?: () => void;
136
- onRequestClose?: () => void;
137
- onUpdateShapeData: IShapeFloatingToolbarProps['onUpdateShapeData'];
138
- }
139
- export declare function ShapeStrokePanelContent(props: IShapeStrokePanelContentProps): import("react").JSX.Element;
140
- export declare function ShapeStrokePanelButton(props: {
141
- title: string;
142
- shapeData: IShapeData;
143
- open?: boolean;
144
- disabled?: boolean;
145
- resetLabel?: string;
146
- fallbackColor?: string;
147
- onReset?: () => void;
148
- onOpenChange?: (open: boolean) => void;
149
- onUpdateShapeData: IShapeFloatingToolbarProps['onUpdateShapeData'];
150
- }): import("react").JSX.Element;
151
- export declare function ShapeFillButton(props: {
152
- title: string;
153
- shapeData: IShapeData;
154
- open?: boolean;
155
- disabled?: boolean;
156
- fallbackColor?: string;
157
- fallbackGradientEndColor?: string;
158
- onOpenChange?: (open: boolean) => void;
159
- onUpdateShapeData: IShapeFloatingToolbarProps['onUpdateShapeData'];
160
- }): import("react").JSX.Element;
161
- export declare function TextFillButton(props: {
162
- title: string;
163
- textStyle: ITextStyle;
164
- fallbackColor: string;
165
- onChange: (textStyle: ITextStyle) => void;
166
- }): import("react").JSX.Element;
167
- export declare function TextBackgroundColorButton(props: {
168
- title: string;
169
- color: string;
170
- onApply: () => void;
171
- onReset?: () => void;
172
- onChange: (color: string) => void;
173
- }): import("react").JSX.Element;
174
- export declare function TypographyPanelButton(props: {
175
- title: string;
176
- fontFamily: string;
177
- textStyle: {
178
- isBold: boolean;
179
- isItalic: boolean;
180
- isUnderline: boolean;
181
- isStrike: boolean;
182
- };
183
- horizontalAlign: HorizontalAlign;
184
- verticalAlign: VerticalAlign;
185
- horizontalAlignOptions: Array<IToolbarDropdownOption<HorizontalAlign>>;
186
- verticalAlignOptions: Array<IToolbarDropdownOption<VerticalAlign>>;
187
- onUpdateText: IShapeFloatingToolbarProps['onUpdateText'];
188
- }): import("react").JSX.Element;
189
67
  export declare function ShapeFloatingToolbarMenuPanel(props: {
190
68
  title?: string;
191
69
  children: ReactNode;
@@ -193,8 +71,7 @@ export declare function ShapeFloatingToolbarMenuPanel(props: {
193
71
  minWidthClassName?: string;
194
72
  }): import("react").JSX.Element;
195
73
  export declare function ShapeFloatingToolbarMenuItem(props: {
196
- label?: string;
197
- labelKey?: string;
74
+ label: string;
198
75
  shortcut?: string;
199
76
  disabled?: boolean;
200
77
  danger?: boolean;