@univerjs-pro/shape-editor-ui 1.0.0-beta.0 → 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.
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ar-SA.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/de-DE.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/id-ID.js +1 -1
- package/lib/cjs/locale/it-IT.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/pl-PL.js +1 -1
- package/lib/cjs/locale/pt-BR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-HK.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ar-SA.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/de-DE.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/id-ID.js +1 -1
- package/lib/es/locale/it-IT.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/pl-PL.js +1 -1
- package/lib/es/locale/pt-BR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-HK.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/index.css +455 -49
- package/lib/index.js +1 -1
- package/lib/locale/ar-SA.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/de-DE.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/id-ID.js +1 -1
- package/lib/locale/it-IT.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/pl-PL.js +1 -1
- package/lib/locale/pt-BR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-HK.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/commands/operations/toggle-shape-floating-toolbar.operation.d.ts +2 -0
- package/lib/types/common/formula-shape-en-us.d.ts +0 -19
- package/lib/types/config/config.d.ts +2 -25
- package/lib/types/controllers/components.controller.d.ts +3 -2
- package/lib/types/index.d.ts +21 -4
- package/lib/types/locale/en-US.d.ts +132 -21
- package/lib/types/menu/shape-floating-toolbar.menu.d.ts +3 -0
- package/lib/types/plugin.d.ts +3 -2
- package/lib/types/services/formula-binding.service.d.ts +34 -0
- package/lib/types/services/shape-floating-toolbar.service.d.ts +16 -0
- package/lib/types/utils/shape-contextual-ribbon-host.d.ts +2 -0
- package/lib/types/utils/shape-floating-toolbar-config.d.ts +3 -3
- package/lib/types/views/FormulaBindingEditorDialog.d.ts +1 -1
- package/lib/types/views/formula-shape/UseFormulaShapeToolbar.d.ts +3 -0
- package/lib/types/views/shape-floating-toolbar/ShapeFillControls.d.ts +2 -0
- package/lib/types/views/shape-floating-toolbar/ShapeFloatingToolbar.d.ts +1 -2
- package/lib/types/views/shape-floating-toolbar/ShapeFloatingToolbarPrimitives.d.ts +11 -2
- package/lib/types/views/shape-floating-toolbar/ShapeStrokeControls.d.ts +5 -0
- package/lib/types/views/shape-floating-toolbar/ShapeTextControls.d.ts +3 -0
- package/lib/types/views/shape-floating-toolbar/shape-floating-toolbar-utils.d.ts +7 -1
- package/lib/types/views/shape-floating-toolbar/shape-floating-toolbar-wheel.util.d.ts +1 -0
- package/lib/types/views/shape-format-ribbon/ShapeEffectControls.d.ts +19 -0
- package/lib/types/views/shape-format-ribbon/ShapeEffectPresetIcon.d.ts +11 -0
- package/lib/types/views/shape-format-ribbon/ShapeFormatRibbonControls.d.ts +27 -0
- package/lib/types/views/shape-format-ribbon/shape-effect-reference-paths.generated.d.ts +6 -0
- package/lib/types/views/shape-picker/ShapeChangePicker.d.ts +7 -0
- package/lib/types/views/shape-quick-style/ShapeQuickStyleGallery.d.ts +10 -0
- package/lib/types/views/shape-text-editor/DocParagraphTypeDropdown.d.ts +1 -1
- package/lib/types/views/shape-text-editor/ShapeTextFloatToolbar.d.ts +0 -1
- package/lib/types/views/shape-text-editor/shape-text-keyboard.d.ts +4 -0
- package/lib/types/views/shape-text-editor/types.d.ts +1 -0
- package/lib/types/views/smart-art/SmartArtColorGallery.d.ts +6 -0
- package/lib/types/views/smart-art/SmartArtLayoutGallery.d.ts +6 -0
- package/lib/types/views/smart-art/SmartArtLayoutIcon.d.ts +6 -0
- package/lib/types/views/smart-art/SmartArtQuickStyleGallery.d.ts +10 -0
- package/lib/types/views/smart-art/SmartArtRibbonControl.d.ts +33 -0
- package/lib/types/views/smart-art/SmartArtTextPane.d.ts +14 -0
- package/lib/types/views/smart-art/smart-art-layout-catalog.generated.d.ts +35 -0
- package/lib/types/views/smart-art/smart-art-layout-gallery-catalog.generated.d.ts +5 -0
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ar-SA.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/de-DE.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/id-ID.js +1 -1
- package/lib/umd/locale/it-IT.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/pl-PL.js +1 -1
- package/lib/umd/locale/pt-BR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +21 -24
- package/lib/types/services/formula-binding-unit-viewer.service.d.ts +0 -67
|
@@ -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
|
-
|
|
403
|
-
|
|
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;
|
package/lib/types/plugin.d.ts
CHANGED
|
@@ -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
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
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 =
|
|
5
|
-
export declare const SHEET_DOC_SHAPE_FLOATING_TOOLBAR_TOP_OFFSET =
|
|
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): {
|
|
@@ -2,11 +2,13 @@ import type { IShapeData } from '@univerjs-pro/engine-shape';
|
|
|
2
2
|
import type { ShapeDataUpdateHandler } from './shape-floating-toolbar-types';
|
|
3
3
|
export declare function ShapeFillButton(props: {
|
|
4
4
|
title: string;
|
|
5
|
+
label?: string;
|
|
5
6
|
shapeData: IShapeData;
|
|
6
7
|
open?: boolean;
|
|
7
8
|
disabled?: boolean;
|
|
8
9
|
fallbackColor?: string;
|
|
9
10
|
fallbackGradientEndColor?: string;
|
|
11
|
+
dropdownSide?: 'top' | 'bottom';
|
|
10
12
|
onOpenChange?: (open: boolean) => void;
|
|
11
13
|
onUpdateShapeData: ShapeDataUpdateHandler;
|
|
12
14
|
}): import("react").JSX.Element;
|
|
@@ -40,6 +40,7 @@ export interface IShapeFloatingToolbarExtensionGroup {
|
|
|
40
40
|
actions: IShapeFloatingToolbarExtensionAction[];
|
|
41
41
|
}
|
|
42
42
|
export interface IShapeFloatingToolbarProps {
|
|
43
|
+
canvasElement: HTMLCanvasElement;
|
|
43
44
|
shapeData?: IShapeData;
|
|
44
45
|
shapeType?: ShapeTypeEnum;
|
|
45
46
|
textStyle: ITextStyle;
|
|
@@ -59,8 +60,6 @@ export interface IShapeFloatingToolbarProps {
|
|
|
59
60
|
groupAction?: IShapeFloatingToolbarGroupAction;
|
|
60
61
|
layerActions?: IShapeFloatingToolbarLayerActions;
|
|
61
62
|
extensionGroups?: IShapeFloatingToolbarExtensionGroup[];
|
|
62
|
-
collapseLabel?: string;
|
|
63
|
-
expandLabel?: string;
|
|
64
63
|
deleteLabel?: string;
|
|
65
64
|
onOpenPanel?: () => void;
|
|
66
65
|
onDelete?: () => void;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import type { MouseEvent, PointerEvent, ReactNode } from 'react';
|
|
1
|
+
import type { ComponentProps, MouseEvent, PointerEvent, ReactNode } from 'react';
|
|
2
|
+
import { Dropdown, Tooltip } from '@univerjs/design';
|
|
3
|
+
export declare function ShapeFloatingToolbarTooltip(props: Omit<ComponentProps<typeof Tooltip>, 'visible' | 'onVisibleChange'> & {
|
|
4
|
+
popupOpen: boolean;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
type ShapeFloatingToolbarDropdownProps = Omit<ComponentProps<typeof Dropdown>, 'avoidCollisions'>;
|
|
7
|
+
export declare function ShapeFloatingToolbarDropdown(props: ShapeFloatingToolbarDropdownProps): import("react").JSX.Element;
|
|
2
8
|
export declare function ShapeFloatingToolbarIcon(props: {
|
|
3
9
|
children: ReactNode;
|
|
4
10
|
className?: string;
|
|
@@ -16,7 +22,7 @@ export declare function ShapeFloatingToolbarButton(props: {
|
|
|
16
22
|
children: ReactNode;
|
|
17
23
|
className?: string;
|
|
18
24
|
sizeClassName?: string;
|
|
19
|
-
|
|
25
|
+
popupOpen?: boolean;
|
|
20
26
|
ariaExpanded?: boolean;
|
|
21
27
|
onClick?: () => void;
|
|
22
28
|
onMouseDown?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
@@ -24,6 +30,7 @@ export declare function ShapeFloatingToolbarButton(props: {
|
|
|
24
30
|
}): import("react").JSX.Element;
|
|
25
31
|
export declare function ShapeFloatingToolbarDropdownTrigger(props: {
|
|
26
32
|
title?: string;
|
|
33
|
+
label?: string;
|
|
27
34
|
icon: ReactNode;
|
|
28
35
|
active?: boolean;
|
|
29
36
|
className?: string;
|
|
@@ -34,6 +41,8 @@ export declare function ShapeFloatingToolbarDropdownTrigger(props: {
|
|
|
34
41
|
export declare function ShapeFloatingToolbarFontSizeSelect(props: {
|
|
35
42
|
value: string | number;
|
|
36
43
|
className?: string;
|
|
44
|
+
dropdownSide?: 'top' | 'bottom';
|
|
37
45
|
onChange: (fontSize: number) => void;
|
|
38
46
|
onAfterChange?: () => void;
|
|
39
47
|
}): import("react").JSX.Element;
|
|
48
|
+
export {};
|
|
@@ -20,17 +20,22 @@ export interface IShapeStrokePanelContentProps {
|
|
|
20
20
|
};
|
|
21
21
|
onReset?: () => void;
|
|
22
22
|
onRequestClose?: () => void;
|
|
23
|
+
closeOnColorChange?: boolean;
|
|
23
24
|
onUpdateShapeData: ShapeDataUpdateHandler;
|
|
24
25
|
}
|
|
25
26
|
export declare function ShapeStrokePanelContent(props: IShapeStrokePanelContentProps): import("react").JSX.Element;
|
|
26
27
|
export declare function ShapeStrokePanelButton(props: {
|
|
27
28
|
title: string;
|
|
29
|
+
label?: string;
|
|
28
30
|
shapeData: IShapeData;
|
|
29
31
|
open?: boolean;
|
|
30
32
|
disabled?: boolean;
|
|
31
33
|
resetLabel?: string;
|
|
32
34
|
fallbackColor?: string;
|
|
35
|
+
dropdownSide?: 'top' | 'bottom';
|
|
33
36
|
onReset?: () => void;
|
|
34
37
|
onOpenChange?: (open: boolean) => void;
|
|
38
|
+
closeOnColorChange?: boolean;
|
|
39
|
+
keepOpenOnInternalInteraction?: boolean;
|
|
35
40
|
onUpdateShapeData: ShapeDataUpdateHandler;
|
|
36
41
|
}): import("react").JSX.Element;
|
|
@@ -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,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;
|
|
@@ -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;
|
|
@@ -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 {};
|