@atlaskit/editor-plugin-synced-block 5.3.33 → 5.3.35
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/CHANGELOG.md +15 -0
- package/dist/cjs/editor-commands/index.js +2 -4
- package/dist/cjs/nodeviews/bodiedSyncedBlock.js +14 -7
- package/dist/cjs/pm-plugins/main.js +273 -110
- package/dist/cjs/pm-plugins/utils/handle-bodied-sync-block-creation.js +2 -1
- package/dist/cjs/pm-plugins/utils/utils.js +13 -1
- package/dist/es2019/editor-commands/index.js +10 -10
- package/dist/es2019/nodeviews/bodiedSyncedBlock.js +14 -7
- package/dist/es2019/pm-plugins/main.js +263 -116
- package/dist/es2019/pm-plugins/utils/handle-bodied-sync-block-creation.js +2 -1
- package/dist/es2019/pm-plugins/utils/utils.js +13 -0
- package/dist/esm/editor-commands/index.js +3 -5
- package/dist/esm/nodeviews/bodiedSyncedBlock.js +13 -6
- package/dist/esm/pm-plugins/main.js +273 -110
- package/dist/esm/pm-plugins/utils/handle-bodied-sync-block-creation.js +2 -1
- package/dist/esm/pm-plugins/utils/utils.js +13 -0
- package/dist/types/nodeviews/bodiedSyncedBlock.d.ts +22 -1
- package/dist/types/pm-plugins/utils/utils.d.ts +5 -0
- package/dist/types-ts4.5/nodeviews/bodiedSyncedBlock.d.ts +22 -1
- package/dist/types-ts4.5/pm-plugins/utils/utils.d.ts +5 -0
- package/package.json +4 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
3
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
3
|
-
import type { ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
4
|
+
import type { ForwardRef, ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
4
5
|
import ReactNodeView, { type getPosHandler } from '@atlaskit/editor-common/react-node-view';
|
|
5
6
|
import type { ExtractInjectionAPI, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
6
7
|
import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
8
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
|
+
import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
8
10
|
import type { SyncedBlockPlugin, SyncedBlockPluginOptions } from '../syncedBlockPluginType';
|
|
9
11
|
export interface BodiedSyncBlockNodeViewProps extends ReactComponentProps {
|
|
10
12
|
api?: ExtractInjectionAPI<SyncedBlockPlugin>;
|
|
@@ -13,11 +15,30 @@ export interface BodiedSyncBlockNodeViewProps extends ReactComponentProps {
|
|
|
13
15
|
node: PMNode;
|
|
14
16
|
pluginOptions: SyncedBlockPluginOptions | undefined;
|
|
15
17
|
portalProviderAPI: PortalProviderAPI;
|
|
18
|
+
syncBlockStore?: SyncBlockStoreManager;
|
|
16
19
|
view: EditorView;
|
|
17
20
|
}
|
|
21
|
+
export declare class BodiedSyncBlock extends ReactNodeView<BodiedSyncBlockNodeViewProps> {
|
|
22
|
+
private cleanupConnectivityModeListener?;
|
|
23
|
+
private cleanupViewModeListener?;
|
|
24
|
+
private api?;
|
|
25
|
+
private syncBlockStore?;
|
|
26
|
+
constructor(props: BodiedSyncBlockNodeViewProps);
|
|
27
|
+
private updateContentEditable;
|
|
28
|
+
private handleConnectivityModeChange;
|
|
29
|
+
private handleViewModeChange;
|
|
30
|
+
createDomRef(): HTMLElement;
|
|
31
|
+
render(_props: never, forwardRef: ForwardRef): React.JSX.Element | null;
|
|
32
|
+
getContentDOM(): {
|
|
33
|
+
dom: HTMLElement;
|
|
34
|
+
contentDOM: HTMLElement | undefined;
|
|
35
|
+
} | undefined;
|
|
36
|
+
destroy(): void;
|
|
37
|
+
}
|
|
18
38
|
export interface BodiedSyncBlockNodeViewProperties {
|
|
19
39
|
api?: ExtractInjectionAPI<SyncedBlockPlugin>;
|
|
20
40
|
pluginOptions: SyncedBlockPluginOptions | undefined;
|
|
21
41
|
pmPluginFactoryParams: PMPluginFactoryParams;
|
|
42
|
+
syncBlockStore?: SyncBlockStoreManager;
|
|
22
43
|
}
|
|
23
44
|
export declare const bodiedSyncBlockNodeView: (props: BodiedSyncBlockNodeViewProperties) => (node: PMNode, view: EditorView, getPos: getPosHandler) => ReactNodeView<BodiedSyncBlockNodeViewProps>;
|
|
@@ -2,6 +2,11 @@ import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
|
2
2
|
import type { NodeType, Node as PMNode, Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { EditorState, Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
+
/**
|
|
6
|
+
* Defers a callback to the next microtask (when gated) or next macrotask via setTimeout(0).
|
|
7
|
+
* Used to avoid re-entrant ProseMirror dispatch cycles.
|
|
8
|
+
*/
|
|
9
|
+
export declare const deferDispatch: (fn: () => void) => void;
|
|
5
10
|
export declare const findSyncBlock: (schema: Schema, selection: Selection) => ContentNodeWithPos | undefined;
|
|
6
11
|
export declare const findBodiedSyncBlock: (schema: Schema, selection: Selection) => ContentNodeWithPos | undefined;
|
|
7
12
|
export declare const findSyncBlockOrBodiedSyncBlock: (schema: Schema, selection: Selection) => ContentNodeWithPos | undefined;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
2
3
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
3
|
-
import type { ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
4
|
+
import type { ForwardRef, ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
4
5
|
import ReactNodeView, { type getPosHandler } from '@atlaskit/editor-common/react-node-view';
|
|
5
6
|
import type { ExtractInjectionAPI, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
6
7
|
import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
7
8
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
9
|
+
import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
8
10
|
import type { SyncedBlockPlugin, SyncedBlockPluginOptions } from '../syncedBlockPluginType';
|
|
9
11
|
export interface BodiedSyncBlockNodeViewProps extends ReactComponentProps {
|
|
10
12
|
api?: ExtractInjectionAPI<SyncedBlockPlugin>;
|
|
@@ -13,11 +15,30 @@ export interface BodiedSyncBlockNodeViewProps extends ReactComponentProps {
|
|
|
13
15
|
node: PMNode;
|
|
14
16
|
pluginOptions: SyncedBlockPluginOptions | undefined;
|
|
15
17
|
portalProviderAPI: PortalProviderAPI;
|
|
18
|
+
syncBlockStore?: SyncBlockStoreManager;
|
|
16
19
|
view: EditorView;
|
|
17
20
|
}
|
|
21
|
+
export declare class BodiedSyncBlock extends ReactNodeView<BodiedSyncBlockNodeViewProps> {
|
|
22
|
+
private cleanupConnectivityModeListener?;
|
|
23
|
+
private cleanupViewModeListener?;
|
|
24
|
+
private api?;
|
|
25
|
+
private syncBlockStore?;
|
|
26
|
+
constructor(props: BodiedSyncBlockNodeViewProps);
|
|
27
|
+
private updateContentEditable;
|
|
28
|
+
private handleConnectivityModeChange;
|
|
29
|
+
private handleViewModeChange;
|
|
30
|
+
createDomRef(): HTMLElement;
|
|
31
|
+
render(_props: never, forwardRef: ForwardRef): React.JSX.Element | null;
|
|
32
|
+
getContentDOM(): {
|
|
33
|
+
dom: HTMLElement;
|
|
34
|
+
contentDOM: HTMLElement | undefined;
|
|
35
|
+
} | undefined;
|
|
36
|
+
destroy(): void;
|
|
37
|
+
}
|
|
18
38
|
export interface BodiedSyncBlockNodeViewProperties {
|
|
19
39
|
api?: ExtractInjectionAPI<SyncedBlockPlugin>;
|
|
20
40
|
pluginOptions: SyncedBlockPluginOptions | undefined;
|
|
21
41
|
pmPluginFactoryParams: PMPluginFactoryParams;
|
|
42
|
+
syncBlockStore?: SyncBlockStoreManager;
|
|
22
43
|
}
|
|
23
44
|
export declare const bodiedSyncBlockNodeView: (props: BodiedSyncBlockNodeViewProperties) => (node: PMNode, view: EditorView, getPos: getPosHandler) => ReactNodeView<BodiedSyncBlockNodeViewProps>;
|
|
@@ -2,6 +2,11 @@ import { Fragment } from '@atlaskit/editor-prosemirror/model';
|
|
|
2
2
|
import type { NodeType, Node as PMNode, Schema, Slice } from '@atlaskit/editor-prosemirror/model';
|
|
3
3
|
import type { EditorState, Selection, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
4
4
|
import type { ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
|
|
5
|
+
/**
|
|
6
|
+
* Defers a callback to the next microtask (when gated) or next macrotask via setTimeout(0).
|
|
7
|
+
* Used to avoid re-entrant ProseMirror dispatch cycles.
|
|
8
|
+
*/
|
|
9
|
+
export declare const deferDispatch: (fn: () => void) => void;
|
|
5
10
|
export declare const findSyncBlock: (schema: Schema, selection: Selection) => ContentNodeWithPos | undefined;
|
|
6
11
|
export declare const findBodiedSyncBlock: (schema: Schema, selection: Selection) => ContentNodeWithPos | undefined;
|
|
7
12
|
export declare const findSyncBlockOrBodiedSyncBlock: (schema: Schema, selection: Selection) => ContentNodeWithPos | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.35",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -107,6 +107,9 @@
|
|
|
107
107
|
"platform_synced_block_patch_3": {
|
|
108
108
|
"type": "boolean"
|
|
109
109
|
},
|
|
110
|
+
"platform_synced_block_patch_5": {
|
|
111
|
+
"type": "boolean"
|
|
112
|
+
},
|
|
110
113
|
"platform_editor_block_menu_v2_patch_3": {
|
|
111
114
|
"type": "boolean"
|
|
112
115
|
}
|