@atlaskit/editor-plugin-synced-block 4.4.0 → 4.4.1
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 +8 -0
- package/afm-cc/tsconfig.json +2 -1
- package/afm-jira/tsconfig.json +2 -1
- package/afm-products/tsconfig.json +2 -1
- package/dist/cjs/pm-plugins/main.js +21 -34
- package/dist/cjs/pm-plugins/utils/handle-bodied-sync-block-removal.js +87 -0
- package/dist/cjs/syncedBlockPlugin.js +6 -4
- package/dist/cjs/types/index.js +1 -0
- package/dist/cjs/ui/DeleteConfirmationModal.js +53 -12
- package/dist/cjs/ui/Flag.js +44 -17
- package/dist/es2019/pm-plugins/main.js +21 -32
- package/dist/es2019/pm-plugins/utils/handle-bodied-sync-block-removal.js +74 -0
- package/dist/es2019/syncedBlockPlugin.js +6 -4
- package/dist/es2019/types/index.js +1 -0
- package/dist/es2019/ui/DeleteConfirmationModal.js +56 -12
- package/dist/es2019/ui/Flag.js +43 -13
- package/dist/esm/pm-plugins/main.js +21 -34
- package/dist/esm/pm-plugins/utils/handle-bodied-sync-block-removal.js +80 -0
- package/dist/esm/syncedBlockPlugin.js +6 -4
- package/dist/esm/types/index.js +1 -0
- package/dist/esm/ui/DeleteConfirmationModal.js +53 -12
- package/dist/esm/ui/Flag.js +44 -17
- package/dist/types/pm-plugins/main.d.ts +3 -2
- package/dist/types/pm-plugins/utils/handle-bodied-sync-block-removal.d.ts +9 -0
- package/dist/types/pm-plugins/utils/track-sync-blocks.d.ts +2 -11
- package/dist/types/syncedBlockPluginType.d.ts +0 -4
- package/dist/types/types/index.d.ts +28 -2
- package/dist/types/ui/CreateSyncedBlockButton.d.ts +1 -1
- package/dist/types/ui/OverflowMenuSection.d.ts +1 -1
- package/dist/types-ts4.5/pm-plugins/main.d.ts +3 -2
- package/dist/types-ts4.5/pm-plugins/utils/handle-bodied-sync-block-removal.d.ts +9 -0
- package/dist/types-ts4.5/pm-plugins/utils/track-sync-blocks.d.ts +2 -11
- package/dist/types-ts4.5/syncedBlockPluginType.d.ts +0 -4
- package/dist/types-ts4.5/types/index.d.ts +28 -2
- package/dist/types-ts4.5/ui/CreateSyncedBlockButton.d.ts +1 -1
- package/dist/types-ts4.5/ui/OverflowMenuSection.d.ts +1 -1
- package/package.json +7 -7
package/dist/esm/ui/Flag.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2
4
|
import React from 'react';
|
|
3
5
|
import { useIntl } from 'react-intl-next';
|
|
4
6
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
5
7
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
6
8
|
import AkFlag, { FlagGroup } from '@atlaskit/flag';
|
|
7
|
-
import
|
|
9
|
+
import StatusWarningIcon from '@atlaskit/icon/core/status-warning';
|
|
8
10
|
import { syncedBlockPluginKey } from '../pm-plugins/main';
|
|
9
11
|
import { FLAG_ID } from '../types';
|
|
10
|
-
var flagMap = _defineProperty(_defineProperty(_defineProperty({}, FLAG_ID.CANNOT_DELETE_WHEN_OFFLINE, {
|
|
12
|
+
var flagMap = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, FLAG_ID.CANNOT_DELETE_WHEN_OFFLINE, {
|
|
11
13
|
title: messages.failToDeleteTitle,
|
|
12
14
|
description: messages.failToDeleteWhenOfflineDescription
|
|
13
15
|
}), FLAG_ID.CANNOT_EDIT_WHEN_OFFLINE, {
|
|
@@ -16,43 +18,68 @@ var flagMap = _defineProperty(_defineProperty(_defineProperty({}, FLAG_ID.CANNOT
|
|
|
16
18
|
}), FLAG_ID.CANNOT_CREATE_WHEN_OFFLINE, {
|
|
17
19
|
title: messages.failToCreateTitle,
|
|
18
20
|
description: messages.failToCreateWhenOfflineDescription
|
|
21
|
+
}), FLAG_ID.FAIL_TO_DELETE, {
|
|
22
|
+
title: messages.cannotDeleteTitle,
|
|
23
|
+
description: messages.cannotDeleteDescription
|
|
19
24
|
});
|
|
20
25
|
export var Flag = function Flag(_ref) {
|
|
21
26
|
var api = _ref.api;
|
|
22
|
-
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['syncedBlock'], function (states) {
|
|
23
|
-
var _states$syncedBlockSt;
|
|
27
|
+
var _useSharedPluginState = useSharedPluginStateWithSelector(api, ['syncedBlock', 'connectivity'], function (states) {
|
|
28
|
+
var _states$syncedBlockSt, _states$connectivityS;
|
|
24
29
|
return {
|
|
25
|
-
|
|
30
|
+
activeFlag: (_states$syncedBlockSt = states.syncedBlockState) === null || _states$syncedBlockSt === void 0 ? void 0 : _states$syncedBlockSt.activeFlag,
|
|
31
|
+
mode: (_states$connectivityS = states.connectivityState) === null || _states$connectivityS === void 0 ? void 0 : _states$connectivityS.mode
|
|
26
32
|
};
|
|
27
33
|
}),
|
|
28
|
-
|
|
34
|
+
activeFlag = _useSharedPluginState.activeFlag,
|
|
35
|
+
mode = _useSharedPluginState.mode;
|
|
29
36
|
var _useIntl = useIntl(),
|
|
30
37
|
formatMessage = _useIntl.formatMessage;
|
|
31
|
-
if (!
|
|
38
|
+
if (!activeFlag) {
|
|
32
39
|
return;
|
|
33
40
|
}
|
|
34
|
-
var _flagMap$
|
|
35
|
-
title = _flagMap$
|
|
36
|
-
description = _flagMap$
|
|
37
|
-
var
|
|
41
|
+
var _flagMap$activeFlag$i = flagMap[activeFlag.id],
|
|
42
|
+
title = _flagMap$activeFlag$i.title,
|
|
43
|
+
description = _flagMap$activeFlag$i.description;
|
|
44
|
+
var onRetry = activeFlag.onRetry,
|
|
45
|
+
onDismissedCallback = activeFlag.onDismissed;
|
|
46
|
+
|
|
47
|
+
// Retry button often involves network request, hence we dismiss the flag in offline mode to avoid retry
|
|
48
|
+
if (mode === 'offline' && !!onRetry) {
|
|
38
49
|
api === null || api === void 0 || api.core.actions.execute(function (_ref2) {
|
|
39
50
|
var tr = _ref2.tr;
|
|
40
51
|
tr.setMeta(syncedBlockPluginKey, {
|
|
41
|
-
|
|
52
|
+
activeFlag: false
|
|
42
53
|
});
|
|
43
54
|
return tr;
|
|
44
55
|
});
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
var onDismissed = function onDismissed() {
|
|
59
|
+
api === null || api === void 0 || api.core.actions.execute(function (_ref3) {
|
|
60
|
+
var tr = _ref3.tr;
|
|
61
|
+
onDismissedCallback === null || onDismissedCallback === void 0 || onDismissedCallback(tr);
|
|
62
|
+
var oldMeta = tr.getMeta(syncedBlockPluginKey);
|
|
63
|
+
tr.setMeta(syncedBlockPluginKey, _objectSpread(_objectSpread({}, oldMeta), {}, {
|
|
64
|
+
activeFlag: false
|
|
65
|
+
}));
|
|
66
|
+
return tr;
|
|
67
|
+
});
|
|
45
68
|
api === null || api === void 0 || api.core.actions.focus();
|
|
46
69
|
};
|
|
47
70
|
return /*#__PURE__*/React.createElement(FlagGroup, null, /*#__PURE__*/React.createElement(AkFlag, {
|
|
48
71
|
onDismissed: onDismissed,
|
|
49
72
|
title: formatMessage(title),
|
|
50
73
|
description: formatMessage(description),
|
|
51
|
-
id:
|
|
52
|
-
testId:
|
|
53
|
-
icon: /*#__PURE__*/React.createElement(
|
|
74
|
+
id: activeFlag.id,
|
|
75
|
+
testId: activeFlag.id,
|
|
76
|
+
icon: /*#__PURE__*/React.createElement(StatusWarningIcon, {
|
|
54
77
|
label: "",
|
|
55
|
-
color: "var(--ds-icon-
|
|
56
|
-
})
|
|
78
|
+
color: "var(--ds-icon-warning, #E06C00)"
|
|
79
|
+
}),
|
|
80
|
+
actions: onRetry ? [{
|
|
81
|
+
content: formatMessage(messages.deleteRetryButton),
|
|
82
|
+
onClick: onRetry
|
|
83
|
+
}] : undefined
|
|
57
84
|
}));
|
|
58
85
|
};
|
|
@@ -4,11 +4,12 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
|
4
4
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import { type SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
6
6
|
import type { SyncedBlockPlugin, SyncedBlockPluginOptions } from '../syncedBlockPluginType';
|
|
7
|
-
import {
|
|
7
|
+
import { type ActiveFlag, type BodiedSyncBlockDeletionStatus } from '../types';
|
|
8
8
|
export declare const syncedBlockPluginKey: PluginKey<any>;
|
|
9
9
|
type SyncedBlockPluginState = {
|
|
10
|
+
activeFlag: ActiveFlag;
|
|
11
|
+
bodiedSyncBlockDeletionStatus?: BodiedSyncBlockDeletionStatus;
|
|
10
12
|
selectionDecorationSet: DecorationSet;
|
|
11
|
-
showFlag: FLAG_ID | false;
|
|
12
13
|
syncBlockStore: SyncBlockStoreManager;
|
|
13
14
|
};
|
|
14
15
|
export declare const createPlugin: (options: SyncedBlockPluginOptions | undefined, pmPluginFactoryParams: PMPluginFactoryParams, syncBlockStore: SyncBlockStoreManager, api?: ExtractInjectionAPI<SyncedBlockPlugin>) => SafePlugin<SyncedBlockPluginState>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
4
|
+
import type { SyncedBlockPlugin } from '../../syncedBlockPluginType';
|
|
5
|
+
import { type SyncBlockInfo } from '../../types';
|
|
6
|
+
export type ConfirmationTransactionRef = {
|
|
7
|
+
current: Transaction | undefined;
|
|
8
|
+
};
|
|
9
|
+
export declare const handleBodiedSyncBlockRemoval: (tr: Transaction, bodiedSyncBlockRemoved: SyncBlockInfo[], syncBlockStore: SyncBlockStoreManager, api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined, confirmationTransactionRef: ConfirmationTransactionRef) => boolean;
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { SyncBlockAttrs } from '../../syncedBlockPluginType';
|
|
4
3
|
export declare const trackSyncBlocks: (predicate: (node: PMNode) => boolean, tr: Transaction, state: EditorState) => {
|
|
5
|
-
removed:
|
|
6
|
-
|
|
7
|
-
from?: number;
|
|
8
|
-
to?: number;
|
|
9
|
-
}[];
|
|
10
|
-
added: {
|
|
11
|
-
attrs: SyncBlockAttrs;
|
|
12
|
-
from?: number;
|
|
13
|
-
to?: number;
|
|
14
|
-
}[];
|
|
4
|
+
removed: import("../../types").SyncBlockInfo[];
|
|
5
|
+
added: import("../../types").SyncBlockInfo[];
|
|
15
6
|
};
|
|
16
7
|
/**
|
|
17
8
|
*
|
|
@@ -71,7 +71,3 @@ export type SyncedBlockPlugin = NextEditorPlugin<'syncedBlock', {
|
|
|
71
71
|
pluginConfiguration: SyncedBlockPluginOptions | undefined;
|
|
72
72
|
sharedState: SyncedBlockSharedState | undefined;
|
|
73
73
|
}>;
|
|
74
|
-
export type SyncBlockAttrs = {
|
|
75
|
-
localId: string;
|
|
76
|
-
resourceId: string;
|
|
77
|
-
};
|
|
@@ -1,16 +1,42 @@
|
|
|
1
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
1
2
|
import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
2
3
|
export declare enum FLAG_ID {
|
|
3
4
|
CANNOT_DELETE_WHEN_OFFLINE = "cannot-delete-when-offline",
|
|
4
5
|
CANNOT_EDIT_WHEN_OFFLINE = "cannot-edit-when-offline",
|
|
5
|
-
CANNOT_CREATE_WHEN_OFFLINE = "cannot-create-when-offline"
|
|
6
|
+
CANNOT_CREATE_WHEN_OFFLINE = "cannot-create-when-offline",
|
|
7
|
+
FAIL_TO_DELETE = "fail-to-delete"
|
|
6
8
|
}
|
|
9
|
+
type FlagConfig = {
|
|
10
|
+
id: FLAG_ID;
|
|
11
|
+
onDismissed?: (tr: Transaction) => Transaction | void;
|
|
12
|
+
onRetry?: () => void;
|
|
13
|
+
};
|
|
14
|
+
export type BodiedSyncBlockDeletionStatus = 'none' | 'processing' | 'completed';
|
|
15
|
+
export type ActiveFlag = FlagConfig | false;
|
|
7
16
|
export type SyncedBlockSharedState = {
|
|
8
17
|
/**
|
|
9
18
|
* Whether to show a flag (usually for errors, e.g. fail to delete)
|
|
10
19
|
*/
|
|
11
|
-
|
|
20
|
+
activeFlag: ActiveFlag;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the plugin is currently saving bodiedSyncBlock deletion to backend
|
|
23
|
+
*/
|
|
24
|
+
bodiedSyncBlockDeletionStatus?: BodiedSyncBlockDeletionStatus;
|
|
12
25
|
/**
|
|
13
26
|
* The current sync block store manager, used to manage fetching and updating sync block data
|
|
14
27
|
*/
|
|
15
28
|
syncBlockStore: SyncBlockStoreManager;
|
|
16
29
|
};
|
|
30
|
+
export type SyncBlockAttrs = {
|
|
31
|
+
localId: string;
|
|
32
|
+
resourceId: string;
|
|
33
|
+
};
|
|
34
|
+
export type SyncBlockInfo = {
|
|
35
|
+
attrs: SyncBlockAttrs;
|
|
36
|
+
from?: number;
|
|
37
|
+
to?: number;
|
|
38
|
+
};
|
|
39
|
+
export type SyncBlockMap = {
|
|
40
|
+
[key: string]: SyncBlockInfo;
|
|
41
|
+
};
|
|
42
|
+
export {};
|
|
@@ -4,5 +4,5 @@ import type { SyncedBlockPlugin } from '../syncedBlockPluginType';
|
|
|
4
4
|
type CreateSyncedBlockButtonProps = {
|
|
5
5
|
api?: ExtractInjectionAPI<SyncedBlockPlugin>;
|
|
6
6
|
};
|
|
7
|
-
export declare const CreateSyncedBlockButton: ({ api }: CreateSyncedBlockButtonProps) => React.JSX.Element;
|
|
7
|
+
export declare const CreateSyncedBlockButton: ({ api, }: CreateSyncedBlockButtonProps) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
type OverflowMenuSectionProps = {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
};
|
|
5
|
-
export declare const OverflowMenuSection: ({ children }: OverflowMenuSectionProps) => React.JSX.Element | null;
|
|
5
|
+
export declare const OverflowMenuSection: ({ children, }: OverflowMenuSectionProps) => React.JSX.Element | null;
|
|
6
6
|
export {};
|
|
@@ -4,11 +4,12 @@ import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
|
4
4
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
5
5
|
import { type SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
6
6
|
import type { SyncedBlockPlugin, SyncedBlockPluginOptions } from '../syncedBlockPluginType';
|
|
7
|
-
import {
|
|
7
|
+
import { type ActiveFlag, type BodiedSyncBlockDeletionStatus } from '../types';
|
|
8
8
|
export declare const syncedBlockPluginKey: PluginKey<any>;
|
|
9
9
|
type SyncedBlockPluginState = {
|
|
10
|
+
activeFlag: ActiveFlag;
|
|
11
|
+
bodiedSyncBlockDeletionStatus?: BodiedSyncBlockDeletionStatus;
|
|
10
12
|
selectionDecorationSet: DecorationSet;
|
|
11
|
-
showFlag: FLAG_ID | false;
|
|
12
13
|
syncBlockStore: SyncBlockStoreManager;
|
|
13
14
|
};
|
|
14
15
|
export declare const createPlugin: (options: SyncedBlockPluginOptions | undefined, pmPluginFactoryParams: PMPluginFactoryParams, syncBlockStore: SyncBlockStoreManager, api?: ExtractInjectionAPI<SyncedBlockPlugin>) => SafePlugin<SyncedBlockPluginState>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
2
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
4
|
+
import type { SyncedBlockPlugin } from '../../syncedBlockPluginType';
|
|
5
|
+
import { type SyncBlockInfo } from '../../types';
|
|
6
|
+
export type ConfirmationTransactionRef = {
|
|
7
|
+
current: Transaction | undefined;
|
|
8
|
+
};
|
|
9
|
+
export declare const handleBodiedSyncBlockRemoval: (tr: Transaction, bodiedSyncBlockRemoved: SyncBlockInfo[], syncBlockStore: SyncBlockStoreManager, api: ExtractInjectionAPI<SyncedBlockPlugin> | undefined, confirmationTransactionRef: ConfirmationTransactionRef) => boolean;
|
|
@@ -1,17 +1,8 @@
|
|
|
1
1
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
-
import type { SyncBlockAttrs } from '../../syncedBlockPluginType';
|
|
4
3
|
export declare const trackSyncBlocks: (predicate: (node: PMNode) => boolean, tr: Transaction, state: EditorState) => {
|
|
5
|
-
removed:
|
|
6
|
-
|
|
7
|
-
from?: number;
|
|
8
|
-
to?: number;
|
|
9
|
-
}[];
|
|
10
|
-
added: {
|
|
11
|
-
attrs: SyncBlockAttrs;
|
|
12
|
-
from?: number;
|
|
13
|
-
to?: number;
|
|
14
|
-
}[];
|
|
4
|
+
removed: import("../../types").SyncBlockInfo[];
|
|
5
|
+
added: import("../../types").SyncBlockInfo[];
|
|
15
6
|
};
|
|
16
7
|
/**
|
|
17
8
|
*
|
|
@@ -71,7 +71,3 @@ export type SyncedBlockPlugin = NextEditorPlugin<'syncedBlock', {
|
|
|
71
71
|
pluginConfiguration: SyncedBlockPluginOptions | undefined;
|
|
72
72
|
sharedState: SyncedBlockSharedState | undefined;
|
|
73
73
|
}>;
|
|
74
|
-
export type SyncBlockAttrs = {
|
|
75
|
-
localId: string;
|
|
76
|
-
resourceId: string;
|
|
77
|
-
};
|
|
@@ -1,16 +1,42 @@
|
|
|
1
|
+
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
1
2
|
import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
2
3
|
export declare enum FLAG_ID {
|
|
3
4
|
CANNOT_DELETE_WHEN_OFFLINE = "cannot-delete-when-offline",
|
|
4
5
|
CANNOT_EDIT_WHEN_OFFLINE = "cannot-edit-when-offline",
|
|
5
|
-
CANNOT_CREATE_WHEN_OFFLINE = "cannot-create-when-offline"
|
|
6
|
+
CANNOT_CREATE_WHEN_OFFLINE = "cannot-create-when-offline",
|
|
7
|
+
FAIL_TO_DELETE = "fail-to-delete"
|
|
6
8
|
}
|
|
9
|
+
type FlagConfig = {
|
|
10
|
+
id: FLAG_ID;
|
|
11
|
+
onDismissed?: (tr: Transaction) => Transaction | void;
|
|
12
|
+
onRetry?: () => void;
|
|
13
|
+
};
|
|
14
|
+
export type BodiedSyncBlockDeletionStatus = 'none' | 'processing' | 'completed';
|
|
15
|
+
export type ActiveFlag = FlagConfig | false;
|
|
7
16
|
export type SyncedBlockSharedState = {
|
|
8
17
|
/**
|
|
9
18
|
* Whether to show a flag (usually for errors, e.g. fail to delete)
|
|
10
19
|
*/
|
|
11
|
-
|
|
20
|
+
activeFlag: ActiveFlag;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the plugin is currently saving bodiedSyncBlock deletion to backend
|
|
23
|
+
*/
|
|
24
|
+
bodiedSyncBlockDeletionStatus?: BodiedSyncBlockDeletionStatus;
|
|
12
25
|
/**
|
|
13
26
|
* The current sync block store manager, used to manage fetching and updating sync block data
|
|
14
27
|
*/
|
|
15
28
|
syncBlockStore: SyncBlockStoreManager;
|
|
16
29
|
};
|
|
30
|
+
export type SyncBlockAttrs = {
|
|
31
|
+
localId: string;
|
|
32
|
+
resourceId: string;
|
|
33
|
+
};
|
|
34
|
+
export type SyncBlockInfo = {
|
|
35
|
+
attrs: SyncBlockAttrs;
|
|
36
|
+
from?: number;
|
|
37
|
+
to?: number;
|
|
38
|
+
};
|
|
39
|
+
export type SyncBlockMap = {
|
|
40
|
+
[key: string]: SyncBlockInfo;
|
|
41
|
+
};
|
|
42
|
+
export {};
|
|
@@ -4,5 +4,5 @@ import type { SyncedBlockPlugin } from '../syncedBlockPluginType';
|
|
|
4
4
|
type CreateSyncedBlockButtonProps = {
|
|
5
5
|
api?: ExtractInjectionAPI<SyncedBlockPlugin>;
|
|
6
6
|
};
|
|
7
|
-
export declare const CreateSyncedBlockButton: ({ api }: CreateSyncedBlockButtonProps) => React.JSX.Element;
|
|
7
|
+
export declare const CreateSyncedBlockButton: ({ api, }: CreateSyncedBlockButtonProps) => React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -2,5 +2,5 @@ import React from 'react';
|
|
|
2
2
|
type OverflowMenuSectionProps = {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
};
|
|
5
|
-
export declare const OverflowMenuSection: ({ children }: OverflowMenuSectionProps) => React.JSX.Element | null;
|
|
5
|
+
export declare const OverflowMenuSection: ({ children, }: OverflowMenuSectionProps) => React.JSX.Element | null;
|
|
6
6
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-synced-block",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.1",
|
|
4
4
|
"description": "SyncedBlock plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -29,25 +29,25 @@
|
|
|
29
29
|
"atlaskit:src": "src/index.ts",
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@atlaskit/adf-schema": "^51.5.1",
|
|
32
|
-
"@atlaskit/button": "23.
|
|
32
|
+
"@atlaskit/button": "23.7.0",
|
|
33
33
|
"@atlaskit/editor-json-transformer": "^8.31.0",
|
|
34
34
|
"@atlaskit/editor-plugin-analytics": "^6.2.0",
|
|
35
|
-
"@atlaskit/editor-plugin-block-menu": "^5.
|
|
35
|
+
"@atlaskit/editor-plugin-block-menu": "^5.2.0",
|
|
36
36
|
"@atlaskit/editor-plugin-connectivity": "6.0.0",
|
|
37
37
|
"@atlaskit/editor-plugin-decorations": "^6.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-floating-toolbar": "^8.2.0",
|
|
39
39
|
"@atlaskit/editor-plugin-selection": "^6.1.0",
|
|
40
40
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^3.10.0",
|
|
42
|
-
"@atlaskit/editor-synced-block-provider": "^2.
|
|
42
|
+
"@atlaskit/editor-synced-block-provider": "^2.14.0",
|
|
43
43
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
44
44
|
"@atlaskit/editor-toolbar": "^0.18.0",
|
|
45
|
-
"@atlaskit/flag": "^17.
|
|
45
|
+
"@atlaskit/flag": "^17.6.0",
|
|
46
46
|
"@atlaskit/icon": "29.0.2",
|
|
47
47
|
"@atlaskit/icon-lab": "^5.12.0",
|
|
48
48
|
"@atlaskit/logo": "^19.9.0",
|
|
49
49
|
"@atlaskit/lozenge": "^13.1.0",
|
|
50
|
-
"@atlaskit/modal-dialog": "^14.
|
|
50
|
+
"@atlaskit/modal-dialog": "^14.8.0",
|
|
51
51
|
"@atlaskit/primitives": "^16.4.0",
|
|
52
52
|
"@atlaskit/tokens": "8.4.1",
|
|
53
53
|
"@atlaskit/tooltip": "^20.11.0",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
57
57
|
},
|
|
58
58
|
"peerDependencies": {
|
|
59
|
-
"@atlaskit/editor-common": "^110.
|
|
59
|
+
"@atlaskit/editor-common": "^110.41.0",
|
|
60
60
|
"react": "^18.2.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|