@atlaskit/editor-plugin-synced-block 5.4.3 → 5.4.5
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 +16 -0
- package/afm-cc/tsconfig.json +12 -0
- package/afm-jira/tsconfig.json +12 -0
- package/afm-products/tsconfig.json +12 -0
- package/dist/cjs/nodeviews/bodiedLazySyncedBlock.js +1 -0
- package/dist/cjs/nodeviews/bodiedSyncedBlock.js +137 -11
- package/dist/cjs/pm-plugins/main.js +27 -3
- package/dist/cjs/syncedBlockPlugin.js +8 -1
- package/dist/cjs/ui/BodiedSyncBlockWrapper.js +1 -0
- package/dist/cjs/ui/DeleteConfirmationModal.js +1 -1
- package/dist/cjs/ui/SyncBlockLabel.js +4 -1
- package/dist/cjs/ui/SyncedLocationDropdown.js +1 -1
- package/dist/cjs/ui/quick-insert.js +1 -1
- package/dist/es2019/nodeviews/bodiedLazySyncedBlock.js +1 -0
- package/dist/es2019/nodeviews/bodiedSyncedBlock.js +121 -6
- package/dist/es2019/pm-plugins/main.js +28 -4
- package/dist/es2019/syncedBlockPlugin.js +8 -1
- package/dist/es2019/ui/BodiedSyncBlockWrapper.js +1 -0
- package/dist/es2019/ui/DeleteConfirmationModal.js +1 -1
- package/dist/es2019/ui/SyncBlockLabel.js +4 -1
- package/dist/es2019/ui/SyncedLocationDropdown.js +1 -1
- package/dist/es2019/ui/quick-insert.js +1 -1
- package/dist/esm/nodeviews/bodiedLazySyncedBlock.js +1 -0
- package/dist/esm/nodeviews/bodiedSyncedBlock.js +137 -11
- package/dist/esm/pm-plugins/main.js +28 -4
- package/dist/esm/syncedBlockPlugin.js +8 -1
- package/dist/esm/ui/BodiedSyncBlockWrapper.js +1 -0
- package/dist/esm/ui/DeleteConfirmationModal.js +1 -1
- package/dist/esm/ui/SyncBlockLabel.js +4 -1
- package/dist/esm/ui/SyncedLocationDropdown.js +1 -1
- package/dist/esm/ui/quick-insert.js +1 -1
- package/dist/types/nodeviews/bodiedSyncedBlock.d.ts +27 -21
- package/dist/types/syncedBlockPluginType.d.ts +5 -1
- package/dist/types-ts4.5/nodeviews/bodiedSyncedBlock.d.ts +27 -21
- package/dist/types-ts4.5/syncedBlockPluginType.d.ts +5 -1
- package/package.json +8 -4
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { EventDispatcher } from '@atlaskit/editor-common/event-dispatcher';
|
|
3
2
|
import type { PortalProviderAPI } from '@atlaskit/editor-common/portal';
|
|
4
|
-
import type {
|
|
3
|
+
import type { ReactComponentProps } from '@atlaskit/editor-common/react-node-view';
|
|
5
4
|
import ReactNodeView, { type getPosHandler } from '@atlaskit/editor-common/react-node-view';
|
|
6
|
-
import type { ExtractInjectionAPI, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
5
|
+
import type { ExtractInjectionAPI, getPosHandlerNode, PMPluginFactoryParams } from '@atlaskit/editor-common/types';
|
|
7
6
|
import { type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
8
|
-
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
+
import type { EditorView, NodeView } from '@atlaskit/editor-prosemirror/view';
|
|
9
8
|
import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
10
9
|
import type { SyncedBlockPlugin, SyncedBlockPluginOptions } from '../syncedBlockPluginType';
|
|
11
10
|
export interface BodiedSyncBlockNodeViewProps extends ReactComponentProps {
|
|
@@ -18,27 +17,34 @@ export interface BodiedSyncBlockNodeViewProps extends ReactComponentProps {
|
|
|
18
17
|
syncBlockStore?: SyncBlockStoreManager;
|
|
19
18
|
view: EditorView;
|
|
20
19
|
}
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
export interface BodiedSyncBlockNodeViewProperties {
|
|
21
|
+
api?: ExtractInjectionAPI<SyncedBlockPlugin>;
|
|
22
|
+
pluginOptions: SyncedBlockPluginOptions | undefined;
|
|
23
|
+
pmPluginFactoryParams: PMPluginFactoryParams;
|
|
24
|
+
syncBlockStore?: SyncBlockStoreManager;
|
|
25
|
+
}
|
|
26
|
+
export declare const bodiedSyncBlockNodeViewOld: (props: BodiedSyncBlockNodeViewProperties) => (node: PMNode, view: EditorView, getPos: getPosHandler) => ReactNodeView<BodiedSyncBlockNodeViewProps>;
|
|
27
|
+
export declare class BodiedSyncBlock implements NodeView {
|
|
28
|
+
dom: HTMLElement;
|
|
29
|
+
contentDOM: HTMLElement;
|
|
30
|
+
node: PMNode;
|
|
31
|
+
view: EditorView;
|
|
32
|
+
getPos: getPosHandlerNode;
|
|
33
|
+
nodeViewPortalProviderAPI: PortalProviderAPI;
|
|
24
34
|
private api?;
|
|
25
35
|
private syncBlockStore?;
|
|
26
|
-
|
|
36
|
+
private cleanupConnectivityModeListener?;
|
|
37
|
+
private cleanupViewModeListener?;
|
|
38
|
+
private labelKey;
|
|
39
|
+
constructor(node: PMNode, view: EditorView, getPos: getPosHandlerNode, api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined, nodeViewPortalProviderAPI: PortalProviderAPI, syncBlockStore?: SyncBlockStoreManager);
|
|
27
40
|
private updateContentEditable;
|
|
28
41
|
private handleConnectivityModeChange;
|
|
29
42
|
private handleViewModeChange;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
} | undefined;
|
|
43
|
+
update(node: PMNode): boolean;
|
|
44
|
+
ignoreMutation(mutation: MutationRecord | {
|
|
45
|
+
target: Node;
|
|
46
|
+
type: 'selection';
|
|
47
|
+
}): boolean;
|
|
36
48
|
destroy(): void;
|
|
37
49
|
}
|
|
38
|
-
export
|
|
39
|
-
api?: ExtractInjectionAPI<SyncedBlockPlugin>;
|
|
40
|
-
pluginOptions: SyncedBlockPluginOptions | undefined;
|
|
41
|
-
pmPluginFactoryParams: PMPluginFactoryParams;
|
|
42
|
-
syncBlockStore?: SyncBlockStoreManager;
|
|
43
|
-
}
|
|
44
|
-
export declare const bodiedSyncBlockNodeView: (props: BodiedSyncBlockNodeViewProperties) => (node: PMNode, view: EditorView, getPos: getPosHandler) => ReactNodeView<BodiedSyncBlockNodeViewProps>;
|
|
50
|
+
export declare const bodiedSyncBlockNodeView: (props: BodiedSyncBlockNodeViewProperties) => ((node: PMNode, view: EditorView, getPos: getPosHandler) => NodeView);
|
|
@@ -10,8 +10,10 @@ import type { ContentFormatPlugin } from '@atlaskit/editor-plugin-content-format
|
|
|
10
10
|
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
11
11
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
12
12
|
import type { FloatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
13
|
+
import type { FocusPlugin } from '@atlaskit/editor-plugin-focus';
|
|
13
14
|
import type { SelectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
14
15
|
import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
|
|
16
|
+
import type { UserIntentPlugin } from '@atlaskit/editor-plugin-user-intent';
|
|
15
17
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
16
18
|
import type { SyncBlockDataProviderInterface, UseFetchSyncBlockDataResult } from '@atlaskit/editor-synced-block-provider';
|
|
17
19
|
import type { SyncedBlockSharedState } from './types';
|
|
@@ -79,7 +81,9 @@ export type SyncedBlockPlugin = NextEditorPlugin<'syncedBlock', {
|
|
|
79
81
|
OptionalPlugin<AnalyticsPlugin>,
|
|
80
82
|
OptionalPlugin<ConnectivityPlugin>,
|
|
81
83
|
OptionalPlugin<EditorViewModePlugin>,
|
|
82
|
-
OptionalPlugin<ContentFormatPlugin
|
|
84
|
+
OptionalPlugin<ContentFormatPlugin>,
|
|
85
|
+
OptionalPlugin<UserIntentPlugin>,
|
|
86
|
+
OptionalPlugin<FocusPlugin>
|
|
83
87
|
];
|
|
84
88
|
pluginConfiguration: SyncedBlockPluginOptions | undefined;
|
|
85
89
|
sharedState: SyncedBlockSharedState | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.5",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -28,16 +28,19 @@
|
|
|
28
28
|
"sideEffects": false,
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@atlaskit/adf-schema": "^52.
|
|
31
|
+
"@atlaskit/adf-schema": "^52.2.0",
|
|
32
32
|
"@atlaskit/button": "23.10.0",
|
|
33
33
|
"@atlaskit/dropdown-menu": "16.5.1",
|
|
34
34
|
"@atlaskit/editor-json-transformer": "^8.31.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^7.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-block-menu": "^6.1.0",
|
|
37
37
|
"@atlaskit/editor-plugin-connectivity": "7.0.1",
|
|
38
|
+
"@atlaskit/editor-plugin-content-format": "^1.0.0",
|
|
38
39
|
"@atlaskit/editor-plugin-decorations": "^7.0.0",
|
|
39
40
|
"@atlaskit/editor-plugin-floating-toolbar": "^9.1.0",
|
|
41
|
+
"@atlaskit/editor-plugin-focus": "^6.0.0",
|
|
40
42
|
"@atlaskit/editor-plugin-selection": "^7.0.0",
|
|
43
|
+
"@atlaskit/editor-plugin-user-intent": "^5.0.0",
|
|
41
44
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
42
45
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
43
46
|
"@atlaskit/editor-synced-block-provider": "^3.31.0",
|
|
@@ -51,17 +54,18 @@
|
|
|
51
54
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
52
55
|
"@atlaskit/primitives": "^18.0.0",
|
|
53
56
|
"@atlaskit/spinner": "19.0.11",
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^34.1.0",
|
|
54
58
|
"@atlaskit/tokens": "11.0.2",
|
|
55
59
|
"@atlaskit/tooltip": "^20.14.0",
|
|
56
60
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
57
61
|
"@babel/runtime": "^7.0.0",
|
|
58
|
-
"@compiled/react": "^0.
|
|
62
|
+
"@compiled/react": "^0.20.0",
|
|
59
63
|
"bind-event-listener": "^3.0.0",
|
|
60
64
|
"date-fns": "^2.17.0",
|
|
61
65
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
62
66
|
},
|
|
63
67
|
"peerDependencies": {
|
|
64
|
-
"@atlaskit/editor-common": "^111.
|
|
68
|
+
"@atlaskit/editor-common": "^111.28.0",
|
|
65
69
|
"react": "^18.2.0"
|
|
66
70
|
},
|
|
67
71
|
"devDependencies": {
|