@ones-editor/editor 1.1.17-beta.5 → 1.1.17-beta.7
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/@ones-editor/block-menu/src/block-menu/items/insert-block-items/index.d.ts +1 -1
- package/@ones-editor/core/src/core/types.d.ts +1 -0
- package/@ones-editor/core/src/utils/file.d.ts +2 -1
- package/@ones-editor/input-handlers/src/enforce-with-document-title/types.d.ts +2 -0
- package/@ones-editor/templates/src/index.d.ts +2 -2
- package/@ones-editor/templates/src/templates/select-template.d.ts +4 -0
- package/@ones-editor/templates/src/templates/types.d.ts +1 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/index.d.ts +2 -2
- package/@ones-editor/ui/src/quick-menu/quick-menu-items.d.ts +2 -1
- package/@ones-editor/ui/src/quick-menu/types.d.ts +1 -1
- package/@ones-editor/ui-base/src/command-bar/manual-menu.d.ts +1 -1
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +1 -0
- package/@ones-editor/ui-base/src/popup/popup.d.ts +1 -0
- package/@ones-editor/versions/src/types.d.ts +3 -1
- package/@ones-editor/versions/src/version-dialog/version-list.d.ts +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +185 -185
- package/dist/types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BlockElement, OnesEditor } from '../../../../../../@ones-editor/core';
|
|
2
2
|
import type { GetAllQuickMenuItemsOptions } from '../../../../../../@ones-editor/ui';
|
|
3
3
|
import type { BlockMenuItem } from '../types';
|
|
4
|
-
export declare function getAllInsertBlockItems(editor: OnesEditor, source: 'insert-block' | 'insert-block-before', options
|
|
4
|
+
export declare function getAllInsertBlockItems(editor: OnesEditor, source: 'insert-block' | 'insert-block-before', options: GetAllQuickMenuItemsOptions): BlockMenuItem[];
|
|
5
5
|
export declare function executeInsertBlockCommand(editor: OnesEditor, block: BlockElement, item: BlockMenuItem, insertAbove?: boolean): Promise<BlockElement | null> | undefined;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
interface SelectFileOptions {
|
|
2
2
|
multiple?: boolean;
|
|
3
|
+
container?: HTMLElement;
|
|
3
4
|
}
|
|
4
5
|
export declare function selectFile<T extends SelectFileOptions = SelectFileOptions>(accept: string, options?: T): Promise<T extends {
|
|
5
6
|
multiple: true;
|
|
6
|
-
} ? File[] : File>;
|
|
7
|
+
} ? (File[] | null) : (File | null)>;
|
|
7
8
|
export declare function isDraggingFiles(v: unknown): v is File[];
|
|
8
9
|
export declare function getFileExt(file: string): string;
|
|
9
10
|
export declare function requestDownload(downloadUrl: string, fileName?: string): void;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
1
2
|
export interface EnforceWithDocumentTitleHandlerOptions {
|
|
2
3
|
hideTitle?: boolean;
|
|
3
4
|
headingLevel?: number;
|
|
@@ -5,4 +6,5 @@ export interface EnforceWithDocumentTitleHandlerOptions {
|
|
|
5
6
|
contentPlaceholder?: string | Element;
|
|
6
7
|
readonlyTitlePlaceholder?: string;
|
|
7
8
|
addPlaceholderToAllCurrentEmptyBlock?: boolean;
|
|
9
|
+
applyContentPlaceholder?: (editor: OnesEditor) => boolean;
|
|
8
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import './locale';
|
|
2
|
-
import { autoShowHideTemplates } from './templates/select-template';
|
|
2
|
+
import { autoShowHideTemplates, hideTemplates, showTemplates } from './templates/select-template';
|
|
3
3
|
export * from './templates/types';
|
|
4
|
-
export { autoShowHideTemplates };
|
|
4
|
+
export { autoShowHideTemplates, hideTemplates, showTemplates };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
/// <reference types="lodash" />
|
|
1
2
|
import { OnesEditor } from '../../../../@ones-editor/core';
|
|
2
3
|
import './select-templates.scss';
|
|
3
4
|
interface ShowTemplatesOptions {
|
|
4
5
|
reset?: boolean;
|
|
5
6
|
}
|
|
7
|
+
declare function showTemplatesCore(editor: OnesEditor, options?: ShowTemplatesOptions): void;
|
|
8
|
+
export declare const showTemplates: import("lodash").DebouncedFunc<typeof showTemplatesCore>;
|
|
9
|
+
export declare function hideTemplates(editor: OnesEditor): void;
|
|
6
10
|
export declare function autoShowHideTemplates(editor: OnesEditor, options?: ShowTemplatesOptions): void;
|
|
7
11
|
export {};
|
|
@@ -11,4 +11,5 @@ export interface TemplateOptions {
|
|
|
11
11
|
onChooseTemplate?: (editor: OnesEditor) => void;
|
|
12
12
|
onApplyTemplate?: (editor: OnesEditor, template: DocTemplate) => Promise<void>;
|
|
13
13
|
onTemplateChooserStatusChanged?: (editor: OnesEditor, cardContainer: HTMLElement | null, status: 'visible' | 'hide') => void;
|
|
14
|
+
onBeforeTemplateShow?: (editor: OnesEditor) => boolean;
|
|
14
15
|
}
|