@univerjs/docs-ui 0.6.6 → 0.6.7-nightly.202503261607
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 +34 -21
- package/lib/cjs/locale/en-US.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/ru-RU.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-TW.js +1 -1
- package/lib/es/index.js +3367 -3063
- package/lib/es/locale/en-US.js +1 -0
- package/lib/es/locale/fa-IR.js +1 -0
- package/lib/es/locale/fr-FR.js +1 -0
- package/lib/es/locale/ru-RU.js +1 -0
- package/lib/es/locale/vi-VN.js +1 -0
- package/lib/es/locale/zh-CN.js +1 -0
- package/lib/es/locale/zh-TW.js +1 -0
- package/lib/facade.js +105 -0
- package/lib/index.css +1 -1
- package/lib/index.js +11456 -0
- package/lib/locale/en-US.js +86 -0
- package/lib/locale/fa-IR.js +86 -0
- package/lib/locale/fr-FR.js +86 -0
- package/lib/locale/ru-RU.js +86 -0
- package/lib/locale/vi-VN.js +86 -0
- package/lib/locale/zh-CN.js +86 -0
- package/lib/locale/zh-TW.js +86 -0
- package/lib/types/commands/commands/break-line.command.d.ts +7 -3
- package/lib/types/commands/commands/doc-delete.command.d.ts +1 -0
- package/lib/types/commands/commands/doc-horizontal-line.command.d.ts +5 -0
- package/lib/types/commands/commands/insert-custom-range.command.d.ts +11 -0
- package/lib/types/commands/commands/list.command.d.ts +0 -2
- package/lib/types/commands/commands/set-heading.command.d.ts +5 -0
- package/lib/types/{views/doc-container/index.d.ts → components/float-toolbar/FloatToolbar.d.ts} +5 -1
- package/lib/types/components/float-toolbar/FloatToolbar.stories.d.ts +7 -0
- package/lib/types/controllers/float-menu.controller.d.ts +16 -0
- package/lib/types/controllers/menu/menu.d.ts +2 -0
- package/lib/types/index.d.ts +6 -4
- package/lib/types/locale/zh-CN.d.ts +1 -0
- package/lib/types/views/count-bar/CountBar.d.ts +1 -1
- package/lib/types/views/doc-container/DocContainer.d.ts +1 -7
- package/lib/types/views/doc-footer/DocFooter.d.ts +1 -1
- package/lib/types/views/paragraph-setting/hook/utils.d.ts +1 -1
- package/lib/umd/index.js +35 -22
- package/lib/umd/locale/en-US.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/ru-RU.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-TW.js +1 -1
- package/package.json +12 -13
- package/LICENSE +0 -176
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Disposable, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
+
import { DocSelectionManagerService } from '@univerjs/docs';
|
|
3
|
+
import { ComponentManager } from '@univerjs/ui';
|
|
4
|
+
import { DocCanvasPopManagerService } from '../services/doc-popup-manager.service';
|
|
5
|
+
export declare class FloatMenuController extends Disposable {
|
|
6
|
+
private readonly _docSelectionManagerService;
|
|
7
|
+
private readonly _docCanvasPopManagerService;
|
|
8
|
+
private readonly _componentManager;
|
|
9
|
+
private readonly _univerInstanceService;
|
|
10
|
+
private _floatMenu;
|
|
11
|
+
constructor(_docSelectionManagerService: DocSelectionManagerService, _docCanvasPopManagerService: DocCanvasPopManagerService, _componentManager: ComponentManager, _univerInstanceService: IUniverInstanceService);
|
|
12
|
+
private _registerFloatMenu;
|
|
13
|
+
private _initSelectionChange;
|
|
14
|
+
private _hideFloatMenu;
|
|
15
|
+
private _showFloatMenu;
|
|
16
|
+
}
|
|
@@ -8,6 +8,7 @@ export declare function SubscriptMenuItemFactory(accessor: IAccessor): IMenuButt
|
|
|
8
8
|
export declare function SuperscriptMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
9
9
|
export declare function FontFamilySelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string>;
|
|
10
10
|
export declare function FontSizeSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<number>;
|
|
11
|
+
export declare function HeadingSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<number>;
|
|
11
12
|
export declare function TextColorSelectorMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<string>;
|
|
12
13
|
export declare function HeaderFooterMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
13
14
|
export declare const TableIcon = "GridSingle";
|
|
@@ -18,6 +19,7 @@ export declare function AlignLeftMenuItemFactory(accessor: IAccessor): IMenuButt
|
|
|
18
19
|
export declare function AlignCenterMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
19
20
|
export declare function AlignRightMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
20
21
|
export declare function AlignJustifyMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
|
22
|
+
export declare function HorizontalLineFactory(accessor: IAccessor): IMenuButtonItem;
|
|
21
23
|
export declare function OrderListMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<PresetListType, PresetListType>;
|
|
22
24
|
export declare function BulletListMenuItemFactory(accessor: IAccessor): IMenuSelectorItem<PresetListType, PresetListType>;
|
|
23
25
|
export declare function CheckListMenuItemFactory(accessor: IAccessor): IMenuButtonItem;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -51,11 +51,12 @@ export { getCanvasOffsetByEngine } from './services/selection/selection-utils';
|
|
|
51
51
|
export { getAnchorBounding, getLineBounding, TEXT_RANGE_LAYER_INDEX, TextRange } from './services/selection/text-range';
|
|
52
52
|
export { whenDocAndEditorFocused } from './shortcuts/utils';
|
|
53
53
|
export { DOC_VERTICAL_PADDING } from './types/const/padding';
|
|
54
|
+
export { HorizontalLineCommand } from './commands/commands/doc-horizontal-line.command';
|
|
54
55
|
export { AfterSpaceCommand, EnterCommand, type ITabCommandParams, TabCommand } from './commands/commands/auto-format.command';
|
|
55
56
|
export { BreakLineCommand } from './commands/commands/break-line.command';
|
|
56
57
|
export { generateParagraphs } from './commands/commands/break-line.command';
|
|
57
58
|
export { DocCopyCommand, DocCutCommand, DocPasteCommand } from './commands/commands/clipboard.command';
|
|
58
|
-
export { CutContentCommand, InnerPasteCommand } from './commands/commands/clipboard.inner.command';
|
|
59
|
+
export { CutContentCommand, type IInnerPasteCommandParams, InnerPasteCommand } from './commands/commands/clipboard.inner.command';
|
|
59
60
|
export type { IInnerCutCommandParams } from './commands/commands/clipboard.inner.command';
|
|
60
61
|
export { getCustomBlockIdsInSelections, getCutActionsFromDocRanges } from './commands/commands/clipboard.inner.command';
|
|
61
62
|
export { DeleteCommand, EditorInsertTextCommandId, type ICoverCommandParams, type IDeleteCommandParams, type IInsertCommandParams, InsertCommand, type IUpdateCommandParams, UpdateCommand, } from './commands/commands/core-editing.command';
|
|
@@ -63,15 +64,15 @@ export { DeleteCustomBlockCommand, DeleteLeftCommand, DeleteRightCommand, type I
|
|
|
63
64
|
export { getCursorWhenDelete } from './commands/commands/doc-delete.command';
|
|
64
65
|
export { IMEInputCommand } from './commands/commands/ime-input.command';
|
|
65
66
|
export { ResetInlineFormatTextBackgroundColorCommand, SetInlineFormatBoldCommand, SetInlineFormatCommand, SetInlineFormatFontFamilyCommand, SetInlineFormatFontSizeCommand, SetInlineFormatItalicCommand, SetInlineFormatStrikethroughCommand, SetInlineFormatSubscriptCommand, SetInlineFormatSuperscriptCommand, SetInlineFormatTextBackgroundColorCommand, SetInlineFormatTextColorCommand, SetInlineFormatUnderlineCommand, } from './commands/commands/inline-format.command';
|
|
66
|
-
export { getParagraphsInRange, getParagraphsInRanges } from './commands/commands/list.command';
|
|
67
67
|
export { BulletListCommand, ChangeListNestingLevelCommand, ChangeListTypeCommand, CheckListCommand, ListOperationCommand, OrderListCommand, QuickListCommand, ToggleCheckListCommand, } from './commands/commands/list.command';
|
|
68
68
|
export { ChangeListNestingLevelType } from './commands/commands/list.command';
|
|
69
69
|
export { AlignCenterCommand, AlignJustifyCommand, AlignLeftCommand, AlignOperationCommand, AlignRightCommand, } from './commands/commands/paragraph-align.command';
|
|
70
70
|
export { ReplaceTextRunsCommand } from './commands/commands/replace-content.command';
|
|
71
|
-
export { CoverContentCommand, type IReplaceSelectionCommandParams, type IReplaceSnapshotCommandParams, ReplaceContentCommand, ReplaceSnapshotCommand } from './commands/commands/replace-content.command';
|
|
71
|
+
export { CoverContentCommand, type IReplaceSelectionCommandParams, type IReplaceSnapshotCommandParams, ReplaceContentCommand, ReplaceSelectionCommand, ReplaceSnapshotCommand } from './commands/commands/replace-content.command';
|
|
72
72
|
export { SetDocZoomRatioCommand } from './commands/commands/set-doc-zoom-ratio.command';
|
|
73
73
|
export { CreateDocTableCommand, type ICreateDocTableCommandParams } from './commands/commands/table/doc-table-create.command';
|
|
74
74
|
export { DocTableDeleteColumnsCommand, DocTableDeleteRowsCommand, DocTableDeleteTableCommand } from './commands/commands/table/doc-table-delete.command';
|
|
75
|
+
export { type IInsertCustomRangeCommandParams, InsertCustomRangeCommand } from './commands/commands/insert-custom-range.command';
|
|
75
76
|
export type { IDocTableDeleteColumnsCommandParams, IDocTableDeleteRowsCommandParams, IDocTableDeleteTableCommandParams, } from './commands/commands/table/doc-table-delete.command';
|
|
76
77
|
export type { IDocTableInsertColumnCommandParams, IDocTableInsertColumnLeftCommandParams, IDocTableInsertColumnRightCommandParams, IDocTableInsertRowAboveCommandParams, IDocTableInsertRowBellowCommandParams, IDocTableInsertRowCommandParams, } from './commands/commands/table/doc-table-insert.command';
|
|
77
78
|
export { DocTableInsertColumnCommand, DocTableInsertColumnLeftCommand, DocTableInsertColumnRightCommand, DocTableInsertRowAboveCommand, DocTableInsertRowBellowCommand, DocTableInsertRowCommand, } from './commands/commands/table/doc-table-insert.command';
|
|
@@ -79,7 +80,8 @@ export type { IDocTableTabCommandParams } from './commands/commands/table/doc-ta
|
|
|
79
80
|
export { DocTableTabCommand } from './commands/commands/table/doc-table-tab.command';
|
|
80
81
|
export { genTableSource, getEmptyTableCell, getEmptyTableRow, getTableColumn } from './commands/commands/table/table';
|
|
81
82
|
export { DocCreateTableOperation } from './commands/operations/doc-create-table.operation';
|
|
82
|
-
export { MoveSelectionOperation } from './commands/operations/doc-cursor.operation';
|
|
83
|
+
export { type IMoveCursorOperationParams, MoveSelectionOperation } from './commands/operations/doc-cursor.operation';
|
|
83
84
|
export { MoveCursorOperation } from './commands/operations/doc-cursor.operation';
|
|
84
85
|
export { DocSelectAllCommand } from './commands/commands/doc-select-all.command';
|
|
85
86
|
export { type ISetDocZoomRatioOperationParams, SetDocZoomRatioOperation } from './commands/operations/set-doc-zoom-ratio.operation';
|
|
87
|
+
export { SetParagraphNamedStyleCommand } from './commands/commands/set-heading.command';
|
|
@@ -17,5 +17,5 @@ interface ICountBarProps {
|
|
|
17
17
|
changeRatio?: (ratio: string) => void;
|
|
18
18
|
onChange?: (value: string) => void;
|
|
19
19
|
}
|
|
20
|
-
export declare function CountBar(
|
|
20
|
+
export declare function CountBar(_props: ICountBarProps): import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IUniverDocsUIConfig } from '../../controllers/config.schema';
|
|
2
1
|
import { default as React, Component } from 'react';
|
|
2
|
+
import { IUniverDocsUIConfig } from '../../controllers/config.schema';
|
|
3
3
|
interface IBaseDocContainerProps {
|
|
4
4
|
config: IUniverDocsUIConfig;
|
|
5
5
|
changeLocale: (locale: string) => void;
|
|
@@ -37,11 +37,5 @@ export declare class DocContainer extends Component<IBaseDocContainerProps> {
|
|
|
37
37
|
* Modify Dom Skin
|
|
38
38
|
*/
|
|
39
39
|
changeSkin(container: HTMLElement | string, skin: string): void;
|
|
40
|
-
/**
|
|
41
|
-
* Render the component's HTML
|
|
42
|
-
*
|
|
43
|
-
* @returns {void}
|
|
44
|
-
*/
|
|
45
|
-
render(): import("react/jsx-runtime").JSX.Element;
|
|
46
40
|
}
|
|
47
41
|
export {};
|
|
@@ -13,4 +13,4 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
export declare
|
|
16
|
+
export declare function DocFooter(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IParagraph, ISectionBreak, SpacingRule } from '@univerjs/core';
|
|
2
|
-
export declare const useCurrentParagraph: () =>
|
|
2
|
+
export declare const useCurrentParagraph: () => import('@univerjs/core').IParagraphRange[];
|
|
3
3
|
export declare const useCurrentSections: (currentParagraphs: IParagraph[]) => ISectionBreak[];
|
|
4
4
|
export declare const useFirstParagraphHorizontalAlign: (paragraph: IParagraph[], defaultValue: string) => readonly [string, (v: string) => Promise<boolean>];
|
|
5
5
|
export declare const useFirstParagraphIndentStart: (paragraph: IParagraph[]) => readonly [number, (v: number) => Promise<boolean>];
|