@univerjs/docs-ui 1.0.0-alpha.8 → 1.0.0-beta.0
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 +708 -877
- package/lib/cjs/locale/zh-HK.js +2 -2
- package/lib/cjs/locale/zh-TW.js +2 -2
- package/lib/es/index.js +708 -877
- package/lib/es/locale/zh-HK.js +2 -2
- package/lib/es/locale/zh-TW.js +2 -2
- package/lib/index.css +11 -1
- package/lib/index.js +708 -877
- package/lib/locale/zh-HK.js +2 -2
- package/lib/locale/zh-TW.js +2 -2
- package/lib/types/commands/commands/break-line.command.d.ts +5 -1
- package/lib/types/commands/commands/doc-horizontal-line.command.d.ts +2 -1
- package/lib/types/embed-docs-custom-block-bleed.d.ts +2 -0
- package/lib/types/embed-host-anchor.d.ts +2 -0
- package/lib/types/index.d.ts +0 -1
- package/lib/types/menu/paragraph-menu.d.ts +1 -1
- package/lib/types/services/editor/editor-manager.service.d.ts +1 -0
- package/lib/types/services/editor/editor.d.ts +2 -0
- package/lib/types/views/RichTextEditor.d.ts +2 -0
- package/lib/types/views/rich-text-editor/hooks/use-editor.d.ts +1 -0
- package/lib/umd/index.js +9 -9
- package/lib/umd/locale/zh-HK.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +10 -10
package/lib/locale/zh-HK.js
CHANGED
|
@@ -23,7 +23,7 @@ const locale = { "docs-ui": {
|
|
|
23
23
|
order: "有序列表",
|
|
24
24
|
unorder: "無序列表",
|
|
25
25
|
checklist: "任務列表",
|
|
26
|
-
documentFlavor: "
|
|
26
|
+
documentFlavor: "現代模式",
|
|
27
27
|
alignLeft: "左對齊",
|
|
28
28
|
alignCenter: "居中對齊",
|
|
29
29
|
alignRight: "右對齊",
|
|
@@ -152,7 +152,7 @@ const locale = { "docs-ui": {
|
|
|
152
152
|
noBackground: "無背景色"
|
|
153
153
|
},
|
|
154
154
|
"page-settings": {
|
|
155
|
-
"document-setting": "
|
|
155
|
+
"document-setting": "文件設定",
|
|
156
156
|
mode: "模式",
|
|
157
157
|
"modern-mode": "現代模式",
|
|
158
158
|
"classic-mode": "經典模式",
|
package/lib/locale/zh-TW.js
CHANGED
|
@@ -23,7 +23,7 @@ const locale = { "docs-ui": {
|
|
|
23
23
|
order: "有序列表",
|
|
24
24
|
unorder: "無序列表",
|
|
25
25
|
checklist: "任務列表",
|
|
26
|
-
documentFlavor: "
|
|
26
|
+
documentFlavor: "現代模式",
|
|
27
27
|
alignLeft: "左對齊",
|
|
28
28
|
alignCenter: "居中對齊",
|
|
29
29
|
alignRight: "右對齊",
|
|
@@ -152,7 +152,7 @@ const locale = { "docs-ui": {
|
|
|
152
152
|
noBackground: "無背景色"
|
|
153
153
|
},
|
|
154
154
|
"page-settings": {
|
|
155
|
-
"document-setting": "
|
|
155
|
+
"document-setting": "文件設定",
|
|
156
156
|
mode: "模式",
|
|
157
157
|
"modern-mode": "現代模式",
|
|
158
158
|
"classic-mode": "經典模式",
|
|
@@ -16,9 +16,13 @@
|
|
|
16
16
|
import type { ICommand, IParagraphBorder, ITextRangeParam } from '@univerjs/core';
|
|
17
17
|
import { generateParagraphs } from '@univerjs/docs';
|
|
18
18
|
export { generateParagraphs };
|
|
19
|
+
export declare enum BreakLineInsertionMode {
|
|
20
|
+
SplitParagraph = "split-paragraph",
|
|
21
|
+
InsertGap = "insert-gap"
|
|
22
|
+
}
|
|
19
23
|
interface IBreakLineCommandParams {
|
|
20
24
|
horizontalLine?: IParagraphBorder;
|
|
21
|
-
insertionMode?:
|
|
25
|
+
insertionMode?: BreakLineInsertionMode;
|
|
22
26
|
textRange?: ITextRangeParam;
|
|
23
27
|
}
|
|
24
28
|
export declare const BreakLineCommand: ICommand<IBreakLineCommandParams>;
|
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import type { ICommand, ITextRangeParam } from '@univerjs/core';
|
|
17
|
+
import { BreakLineInsertionMode } from './break-line.command';
|
|
17
18
|
interface IHorizontalCommandParams {
|
|
18
|
-
insertionMode?:
|
|
19
|
+
insertionMode?: BreakLineInsertionMode;
|
|
19
20
|
insertRange?: ITextRangeParam;
|
|
20
21
|
}
|
|
21
22
|
export declare const HorizontalLineCommand: ICommand<IHorizontalCommandParams>;
|
|
@@ -21,8 +21,10 @@ export interface IDocsCustomBlockBleedViewport {
|
|
|
21
21
|
virtualWidth: number;
|
|
22
22
|
}
|
|
23
23
|
export interface IDocsCustomBlockBleedViewportHint {
|
|
24
|
+
authoritativeContentWidth?: boolean;
|
|
24
25
|
bleedLeft?: number;
|
|
25
26
|
bleedWidth?: number;
|
|
27
|
+
viewScale?: number;
|
|
26
28
|
}
|
|
27
29
|
export declare function createDefaultDocsTableLikeCustomBlockBleedViewport(): IDocsCustomBlockBleedViewport;
|
|
28
30
|
export declare function resolveDocsTableLikeCustomBlockBleedViewport(root: HTMLElement, contentWidth: number, hint?: IDocsCustomBlockBleedViewportHint): IDocsCustomBlockBleedViewport;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -121,4 +121,3 @@ export { createEditorUndoRedoKeyboardConfig, executeEditorUndoRedoCommand, useEd
|
|
|
121
121
|
export type { ICreateEditorUndoRedoKeyboardConfigOptions, IExecuteEditorUndoRedoCommandOptions, IKeyboardEventConfig, } from './views/rich-text-editor/hooks';
|
|
122
122
|
export { RichTextEditor } from './views/RichTextEditor';
|
|
123
123
|
export type { IRichTextEditorProps } from './views/RichTextEditor';
|
|
124
|
-
export type { IDocsCustomBlockMutationParams, IEmbedDocsCustomBlockData } from '@univerjs/docs';
|
|
@@ -18,7 +18,7 @@ import type { IMenuButtonItem, IMenuItem, IMenuSelectorItem } from '@univerjs/ui
|
|
|
18
18
|
import type { LocaleKey } from '../locale/types';
|
|
19
19
|
export declare const TEXT_COLORS: string[];
|
|
20
20
|
export declare const TEXT_COLOR_SWATCH_ICONS: readonly ["DocParagraphTextColorSwatchIcon.0", "DocParagraphTextColorSwatchIcon.1", "DocParagraphTextColorSwatchIcon.2", "DocParagraphTextColorSwatchIcon.3", "DocParagraphTextColorSwatchIcon.4", "DocParagraphTextColorSwatchIcon.5", "DocParagraphTextColorSwatchIcon.6"];
|
|
21
|
-
export declare const BACKGROUND_COLOR_SWATCH_ICONS: readonly ["DocParagraphBackgroundColorSwatchIcon.0", "DocParagraphBackgroundColorSwatchIcon.1", "DocParagraphBackgroundColorSwatchIcon.2", "DocParagraphBackgroundColorSwatchIcon.3", "DocParagraphBackgroundColorSwatchIcon.4", "DocParagraphBackgroundColorSwatchIcon.5", "DocParagraphBackgroundColorSwatchIcon.6", "DocParagraphBackgroundColorSwatchIcon.7", "DocParagraphBackgroundColorSwatchIcon.8", "DocParagraphBackgroundColorSwatchIcon.9", "DocParagraphBackgroundColorSwatchIcon.10", "DocParagraphBackgroundColorSwatchIcon.11", "DocParagraphBackgroundColorSwatchIcon.12", "DocParagraphBackgroundColorSwatchIcon.13", "DocParagraphBackgroundColorSwatchIcon.14"
|
|
21
|
+
export declare const BACKGROUND_COLOR_SWATCH_ICONS: readonly ["DocParagraphBackgroundColorSwatchIcon.0", "DocParagraphBackgroundColorSwatchIcon.1", "DocParagraphBackgroundColorSwatchIcon.2", "DocParagraphBackgroundColorSwatchIcon.3", "DocParagraphBackgroundColorSwatchIcon.4", "DocParagraphBackgroundColorSwatchIcon.5", "DocParagraphBackgroundColorSwatchIcon.6", "DocParagraphBackgroundColorSwatchIcon.7", "DocParagraphBackgroundColorSwatchIcon.8", "DocParagraphBackgroundColorSwatchIcon.9", "DocParagraphBackgroundColorSwatchIcon.10", "DocParagraphBackgroundColorSwatchIcon.11", "DocParagraphBackgroundColorSwatchIcon.12", "DocParagraphBackgroundColorSwatchIcon.13", "DocParagraphBackgroundColorSwatchIcon.14"];
|
|
22
22
|
export declare function H1HeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
|
|
23
23
|
export declare function H2HeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
|
|
24
24
|
export declare function H3HeadingMenuItemFactory(accessor: IAccessor): IMenuItem<LocaleKey>;
|
|
@@ -23,6 +23,7 @@ import { IRenderManagerService } from '@univerjs/engine-render';
|
|
|
23
23
|
import { Editor } from './editor';
|
|
24
24
|
export interface IEditorRenderConfig {
|
|
25
25
|
canvasStyle: IEditorCanvasStyle;
|
|
26
|
+
preserveHostFocus?: boolean;
|
|
26
27
|
scrollBar?: boolean;
|
|
27
28
|
backScrollOffset?: number;
|
|
28
29
|
}
|
|
@@ -55,6 +55,8 @@ export interface IEditorCanvasStyle {
|
|
|
55
55
|
}
|
|
56
56
|
export interface IEditorConfigParams {
|
|
57
57
|
initialSnapshot: IDocumentData;
|
|
58
|
+
/** Keep the globally focused unit on the editor's host while this editor receives input focus. */
|
|
59
|
+
preserveHostFocus?: boolean;
|
|
58
60
|
cancelDefaultResizeListener?: boolean;
|
|
59
61
|
canvasStyle?: IEditorCanvasStyle;
|
|
60
62
|
autofocus?: boolean;
|
|
@@ -23,6 +23,8 @@ export interface IRichTextEditorProps {
|
|
|
23
23
|
onFocusChange?: (isFocus: boolean, newValue?: string) => void;
|
|
24
24
|
initialValue?: IDocumentData | string;
|
|
25
25
|
onClickOutside?: () => void;
|
|
26
|
+
/** Keep the globally focused unit on the editor's host while this editor receives input focus. */
|
|
27
|
+
preserveHostFocus?: boolean;
|
|
26
28
|
keyboardEventConfig?: IKeyboardEventConfig;
|
|
27
29
|
moveCursor?: boolean;
|
|
28
30
|
style?: CSSProperties;
|
|
@@ -20,6 +20,7 @@ export interface IUseEditorProps {
|
|
|
20
20
|
editorId: string;
|
|
21
21
|
initialValue: Nullable<IDocumentData | string>;
|
|
22
22
|
container: RefObject<HTMLDivElement>;
|
|
23
|
+
preserveHostFocus?: boolean;
|
|
23
24
|
autoFocus?: boolean;
|
|
24
25
|
isSingle?: boolean;
|
|
25
26
|
canvasStyle?: IEditorCanvasStyle;
|