@ones-editor/editor 0.0.3-beta.60 → 0.0.3-beta.61
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/core/src/utils/dom.d.ts +1 -0
- package/@ones-editor/drawio-embed/src/helper/index.d.ts +3 -3
- package/@ones-editor/drawio-embed/types/index.d.ts +2 -2
- package/@ones-editor/exclusive-block/package.json +6 -0
- package/@ones-editor/exclusive-block/src/exclusive-block-hook.d.ts +6 -0
- package/@ones-editor/exclusive-block/src/exclusive-block.d.ts +22 -0
- package/@ones-editor/exclusive-block/src/exclusive-dom.d.ts +5 -0
- package/@ones-editor/exclusive-block/src/handle-remote-exclusive-message.d.ts +3 -0
- package/@ones-editor/exclusive-block/src/index.d.ts +5 -0
- package/@ones-editor/exclusive-block/src/types.d.ts +7 -0
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/ui/src/toolbar/toolbar-handler.d.ts +1 -0
- package/@ones-editor/ui-base/src/command-bar/types.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +145 -145
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { OnesEditor,
|
|
1
|
+
import type { OnesEditor, BlockElement } from '../../../../@ones-editor/core';
|
|
2
2
|
import { type EmbedElement, DrawIoData, GraphDataType, XmlData, XmlSvgData, SrcData, DrawIoOptions } from '../../types';
|
|
3
3
|
import '../../types/window.d';
|
|
4
4
|
export declare function getDrawioOptions(editor: OnesEditor): DrawIoOptions;
|
|
@@ -11,8 +11,8 @@ export declare function initializeDrawioIframe(editor: OnesEditor): Promise<{
|
|
|
11
11
|
drawioIframe: HTMLIFrameElement;
|
|
12
12
|
exit: () => void;
|
|
13
13
|
}>;
|
|
14
|
-
export declare function contactWithIframe(editor: OnesEditor, block:
|
|
15
|
-
export declare function editGraph(editor: OnesEditor, block:
|
|
14
|
+
export declare function contactWithIframe(editor: OnesEditor, block: BlockElement, drawIoData: DrawIoData, iframe: HTMLIFrameElement, loaded: () => void, exit: () => void, isInitializationCompleted: boolean): void;
|
|
15
|
+
export declare function editGraph(editor: OnesEditor, block: BlockElement, data: DrawIoData, isInitializationCompleted: boolean): Promise<void>;
|
|
16
16
|
export declare function initDrawIo(editor: OnesEditor): Promise<void>;
|
|
17
17
|
export declare function removeDrawioEmptyStatus(el: HTMLElement): void;
|
|
18
18
|
export declare function addDrawioEmptyStatus(el: HTMLElement): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type OnesEditor,
|
|
1
|
+
import { type OnesEditor, BlockElement } from '@ones-editor/core';
|
|
2
2
|
export type WithNull<T> = T | null;
|
|
3
3
|
export type EmbedElement = HTMLElement & {
|
|
4
4
|
__neverUse: 'EmbedElement';
|
|
@@ -34,6 +34,6 @@ export interface DrawIoOptions {
|
|
|
34
34
|
onError?: (editor: OnesEditor, error: Error) => void;
|
|
35
35
|
onCreateDrawIoFrame?: (editor: OnesEditor) => Promise<HTMLIFrameElement>;
|
|
36
36
|
onCloseDrawIoFrame?: (editor: OnesEditor, iframe: HTMLIFrameElement) => boolean;
|
|
37
|
-
onBeginInitDrawIo?: (editor: OnesEditor, block:
|
|
37
|
+
onBeginInitDrawIo?: (editor: OnesEditor, block: BlockElement) => void;
|
|
38
38
|
};
|
|
39
39
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BlockElement, BlockPath, ContainerElement, DocBlock, OnesEditor, OnesEditorBlockHook } from '../../../@ones-editor/core';
|
|
2
|
+
export default class BlockExclusiveHook implements OnesEditorBlockHook {
|
|
3
|
+
writable(editor: OnesEditor, blockElement: BlockElement): boolean | undefined;
|
|
4
|
+
create(editor: OnesEditor, path: BlockPath, container: ContainerElement, blockElement: BlockElement, blockData: DocBlock): void;
|
|
5
|
+
update(editor: OnesEditor, path: BlockPath, container: ContainerElement, blockElement: BlockElement, blockData: DocBlock): void;
|
|
6
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BlockElement, OnesEditor, OnesEditorCustom, OnesEditorDocCallbacks } from '../../../@ones-editor/core';
|
|
2
|
+
import { ExclusiveBlockMessage } from './types';
|
|
3
|
+
export declare class OnesEditorExclusiveBlock implements OnesEditorCustom, OnesEditorDocCallbacks {
|
|
4
|
+
private editor;
|
|
5
|
+
exclusiveBlockIds: Set<string>;
|
|
6
|
+
exclusiveBlockTimer: number;
|
|
7
|
+
remoteExclusiveBlockIds: Map<string, ExclusiveBlockMessage>;
|
|
8
|
+
constructor(editor: OnesEditor);
|
|
9
|
+
destroy(): void;
|
|
10
|
+
onCustomMessage(msg: unknown): void;
|
|
11
|
+
handleUserChanged: () => void;
|
|
12
|
+
getExclusiveMessage(blockId: string): ExclusiveBlockMessage | undefined;
|
|
13
|
+
broadcastExclusiveBlockMessage(blocks: BlockElement[], exclusive: boolean): void;
|
|
14
|
+
exclusiveBlock(block: BlockElement): void;
|
|
15
|
+
unexclusiveBlock(block: BlockElement): void;
|
|
16
|
+
startExclusiveBlockTimer(): void;
|
|
17
|
+
stopExclusiveBlockTimer(): void;
|
|
18
|
+
static get(editor: OnesEditor): OnesEditorExclusiveBlock;
|
|
19
|
+
static register(editor: OnesEditor): OnesEditorExclusiveBlock;
|
|
20
|
+
}
|
|
21
|
+
export declare function exclusiveBlock(editor: OnesEditor, block: BlockElement): void;
|
|
22
|
+
export declare function unexclusiveBlock(editor: OnesEditor, block: BlockElement): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BlockElement, OnesEditor } from '../../../@ones-editor/core';
|
|
2
|
+
export declare function addExclusiveStyle(block: BlockElement, userId: string, displayName: string): void;
|
|
3
|
+
export declare function removeExclusiveStyle(block: BlockElement): void;
|
|
4
|
+
export declare function updateBlockExclusive(editor: OnesEditor, block: BlockElement, exclusive: boolean, userId: string, displayName: string): void;
|
|
5
|
+
export declare function isExclusiveBlock(block: BlockElement): boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { OnesEditorExclusiveBlock } from './exclusive-block';
|
|
2
|
+
import BlockExclusiveHook from './exclusive-block-hook';
|
|
3
|
+
import './exclusive-block-styles.scss';
|
|
4
|
+
export { exclusiveBlock, unexclusiveBlock } from './exclusive-block';
|
|
5
|
+
export { BlockExclusiveHook, OnesEditorExclusiveBlock };
|