@atlaskit/editor-core 189.3.25 → 189.3.26
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 +7 -0
- package/dist/cjs/plugins/extension/actions.js +15 -1
- package/dist/cjs/plugins/extension/index.js +7 -2
- package/dist/cjs/ui/ConfigPanel/LoadingState.js +3 -2
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/extension/actions.js +16 -0
- package/dist/es2019/plugins/extension/index.js +7 -2
- package/dist/es2019/ui/ConfigPanel/LoadingState.js +3 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/extension/actions.js +14 -0
- package/dist/esm/plugins/extension/index.js +7 -2
- package/dist/esm/ui/ConfigPanel/LoadingState.js +3 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/extension/actions.d.ts +6 -0
- package/dist/types/presets/default.d.ts +4 -0
- package/dist/types-ts4.5/plugins/extension/actions.d.ts +6 -0
- package/dist/types-ts4.5/presets/default.d.ts +4 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 189.3.26
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#43164](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/43164) [`3aeedf55e29`](https://bitbucket.org/atlassian/atlassian-frontend/commits/3aeedf55e29) - [ED-20068] Move editSelectedExtension to ExtensionPluginActions
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 189.3.25
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.performNodeUpdate = exports.editSelectedExtension = exports.editExtension = exports.buildExtensionNode = void 0;
|
|
7
|
+
exports.performNodeUpdate = exports.editSelectedExtension = exports.editExtension = exports.createEditSelectedExtensionAction = exports.buildExtensionNode = void 0;
|
|
8
8
|
Object.defineProperty(exports, "transformSliceToRemoveOpenBodiedExtension", {
|
|
9
9
|
enumerable: true,
|
|
10
10
|
get: function get() {
|
|
@@ -216,4 +216,18 @@ var editExtension = exports.editExtension = function editExtension(macroProvider
|
|
|
216
216
|
}
|
|
217
217
|
return true;
|
|
218
218
|
};
|
|
219
|
+
};
|
|
220
|
+
var createEditSelectedExtensionAction = exports.createEditSelectedExtensionAction = function createEditSelectedExtensionAction(_ref2) {
|
|
221
|
+
var editorViewRef = _ref2.editorViewRef,
|
|
222
|
+
editorAnalyticsAPI = _ref2.editorAnalyticsAPI;
|
|
223
|
+
return function () {
|
|
224
|
+
var view = editorViewRef.current;
|
|
225
|
+
if (!view) {
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
var _getPluginState3 = (0, _main.getPluginState)(view.state),
|
|
229
|
+
updateExtension = _getPluginState3.updateExtension,
|
|
230
|
+
applyChangeToContextPanel = _getPluginState3.applyChangeToContextPanel;
|
|
231
|
+
return editExtension(null, applyChangeToContextPanel, editorAnalyticsAPI, updateExtension)(view.state, view.dispatch, view);
|
|
232
|
+
};
|
|
219
233
|
};
|
|
@@ -15,8 +15,9 @@ var _uniqueId = require("./pm-plugins/unique-id");
|
|
|
15
15
|
var _toolbar = require("./toolbar");
|
|
16
16
|
var _contextPanel = require("./context-panel");
|
|
17
17
|
var _extensionApi = require("./extension-api");
|
|
18
|
+
var _actions2 = require("./actions");
|
|
18
19
|
var extensionPlugin = function extensionPlugin(_ref) {
|
|
19
|
-
var _api$featureFlags, _api$analytics2, _api$contextPanel3, _api$
|
|
20
|
+
var _api$featureFlags, _api$analytics2, _api$analytics3, _api$contextPanel3, _api$analytics4, _api$contextPanel4;
|
|
20
21
|
var _ref$config = _ref.config,
|
|
21
22
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
22
23
|
_api = _ref.api;
|
|
@@ -97,6 +98,10 @@ var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
97
98
|
});
|
|
98
99
|
},
|
|
99
100
|
insertMacroFromMacroBrowser: (0, _actions.insertMacroFromMacroBrowser)(_api === null || _api === void 0 || (_api$analytics2 = _api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions),
|
|
101
|
+
editSelectedExtension: (0, _actions2.createEditSelectedExtensionAction)({
|
|
102
|
+
editorViewRef: editorViewRef,
|
|
103
|
+
editorAnalyticsAPI: _api === null || _api === void 0 || (_api$analytics3 = _api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions
|
|
104
|
+
}),
|
|
100
105
|
runMacroAutoConvert: _actions.runMacroAutoConvert
|
|
101
106
|
},
|
|
102
107
|
pluginsOptions: {
|
|
@@ -104,7 +109,7 @@ var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
104
109
|
breakoutEnabled: options.breakoutEnabled,
|
|
105
110
|
hoverDecoration: _api === null || _api === void 0 ? void 0 : _api.decorations.actions.hoverDecoration,
|
|
106
111
|
applyChangeToContextPanel: _api === null || _api === void 0 || (_api$contextPanel3 = _api.contextPanel) === null || _api$contextPanel3 === void 0 ? void 0 : _api$contextPanel3.actions.applyChange,
|
|
107
|
-
editorAnalyticsAPI: _api === null || _api === void 0 || (_api$
|
|
112
|
+
editorAnalyticsAPI: _api === null || _api === void 0 || (_api$analytics4 = _api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions
|
|
108
113
|
}),
|
|
109
114
|
contextPanel: (0, _contextPanel.getContextPanel)(function () {
|
|
110
115
|
var _editorViewRef$curren;
|
|
@@ -10,10 +10,11 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
|
|
11
11
|
var _templateObject;
|
|
12
12
|
/** @jsx jsx */
|
|
13
|
-
var spinnerWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n margin-top:
|
|
13
|
+
var spinnerWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n justify-content: center;\n margin-top: ", ";\n"])), "var(--ds-space-800, 64px)");
|
|
14
14
|
var LoadingState = function LoadingState() {
|
|
15
15
|
return (0, _react.jsx)("div", {
|
|
16
|
-
css: spinnerWrapper
|
|
16
|
+
css: spinnerWrapper,
|
|
17
|
+
"data-testid": "ConfigPanelLoading"
|
|
17
18
|
}, (0, _react.jsx)(_spinner.default, {
|
|
18
19
|
size: "small"
|
|
19
20
|
}));
|
|
@@ -181,4 +181,20 @@ export const editExtension = (macroProvider, applyChangeToContextPanel, editorAn
|
|
|
181
181
|
editInLegacyMacroBrowser();
|
|
182
182
|
}
|
|
183
183
|
return true;
|
|
184
|
+
};
|
|
185
|
+
export const createEditSelectedExtensionAction = ({
|
|
186
|
+
editorViewRef,
|
|
187
|
+
editorAnalyticsAPI
|
|
188
|
+
}) => () => {
|
|
189
|
+
const {
|
|
190
|
+
current: view
|
|
191
|
+
} = editorViewRef;
|
|
192
|
+
if (!view) {
|
|
193
|
+
return false;
|
|
194
|
+
}
|
|
195
|
+
const {
|
|
196
|
+
updateExtension,
|
|
197
|
+
applyChangeToContextPanel
|
|
198
|
+
} = getPluginState(view.state);
|
|
199
|
+
return editExtension(null, applyChangeToContextPanel, editorAnalyticsAPI, updateExtension)(view.state, view.dispatch, view);
|
|
184
200
|
};
|
|
@@ -8,11 +8,12 @@ import { createPlugin as createUniqueIdPlugin } from './pm-plugins/unique-id';
|
|
|
8
8
|
import { getToolbarConfig } from './toolbar';
|
|
9
9
|
import { getContextPanel } from './context-panel';
|
|
10
10
|
import { createExtensionAPI } from './extension-api';
|
|
11
|
+
import { createEditSelectedExtensionAction } from './actions';
|
|
11
12
|
const extensionPlugin = ({
|
|
12
13
|
config: options = {},
|
|
13
14
|
api
|
|
14
15
|
}) => {
|
|
15
|
-
var _api$featureFlags, _api$analytics2, _api$contextPanel3, _api$
|
|
16
|
+
var _api$featureFlags, _api$analytics2, _api$analytics3, _api$contextPanel3, _api$analytics4, _api$contextPanel4;
|
|
16
17
|
const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
|
|
17
18
|
//Note: This is a hack to get the editor view reference in the plugin. Copied from table plugin.
|
|
18
19
|
//This is needed to get the current selection in the editor
|
|
@@ -88,6 +89,10 @@ const extensionPlugin = ({
|
|
|
88
89
|
});
|
|
89
90
|
},
|
|
90
91
|
insertMacroFromMacroBrowser: insertMacroFromMacroBrowser(api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions),
|
|
92
|
+
editSelectedExtension: createEditSelectedExtensionAction({
|
|
93
|
+
editorViewRef,
|
|
94
|
+
editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions
|
|
95
|
+
}),
|
|
91
96
|
runMacroAutoConvert
|
|
92
97
|
},
|
|
93
98
|
pluginsOptions: {
|
|
@@ -95,7 +100,7 @@ const extensionPlugin = ({
|
|
|
95
100
|
breakoutEnabled: options.breakoutEnabled,
|
|
96
101
|
hoverDecoration: api === null || api === void 0 ? void 0 : api.decorations.actions.hoverDecoration,
|
|
97
102
|
applyChangeToContextPanel: api === null || api === void 0 ? void 0 : (_api$contextPanel3 = api.contextPanel) === null || _api$contextPanel3 === void 0 ? void 0 : _api$contextPanel3.actions.applyChange,
|
|
98
|
-
editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$
|
|
103
|
+
editorAnalyticsAPI: api === null || api === void 0 ? void 0 : (_api$analytics4 = api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions
|
|
99
104
|
}),
|
|
100
105
|
contextPanel: getContextPanel(() => {
|
|
101
106
|
var _editorViewRef$curren;
|
|
@@ -4,10 +4,11 @@ import Spinner from '@atlaskit/spinner';
|
|
|
4
4
|
const spinnerWrapper = css`
|
|
5
5
|
display: flex;
|
|
6
6
|
justify-content: center;
|
|
7
|
-
margin-top: 64px;
|
|
7
|
+
margin-top: ${"var(--ds-space-800, 64px)"};
|
|
8
8
|
`;
|
|
9
9
|
const LoadingState = () => jsx("div", {
|
|
10
|
-
css: spinnerWrapper
|
|
10
|
+
css: spinnerWrapper,
|
|
11
|
+
"data-testid": "ConfigPanelLoading"
|
|
11
12
|
}, jsx(Spinner, {
|
|
12
13
|
size: "small"
|
|
13
14
|
}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "189.3.
|
|
2
|
+
export const version = "189.3.26";
|
|
@@ -203,4 +203,18 @@ export var editExtension = function editExtension(macroProvider, applyChangeToCo
|
|
|
203
203
|
}
|
|
204
204
|
return true;
|
|
205
205
|
};
|
|
206
|
+
};
|
|
207
|
+
export var createEditSelectedExtensionAction = function createEditSelectedExtensionAction(_ref2) {
|
|
208
|
+
var editorViewRef = _ref2.editorViewRef,
|
|
209
|
+
editorAnalyticsAPI = _ref2.editorAnalyticsAPI;
|
|
210
|
+
return function () {
|
|
211
|
+
var view = editorViewRef.current;
|
|
212
|
+
if (!view) {
|
|
213
|
+
return false;
|
|
214
|
+
}
|
|
215
|
+
var _getPluginState3 = getPluginState(view.state),
|
|
216
|
+
updateExtension = _getPluginState3.updateExtension,
|
|
217
|
+
applyChangeToContextPanel = _getPluginState3.applyChangeToContextPanel;
|
|
218
|
+
return editExtension(null, applyChangeToContextPanel, editorAnalyticsAPI, updateExtension)(view.state, view.dispatch, view);
|
|
219
|
+
};
|
|
206
220
|
};
|
|
@@ -8,8 +8,9 @@ import { createPlugin as createUniqueIdPlugin } from './pm-plugins/unique-id';
|
|
|
8
8
|
import { getToolbarConfig } from './toolbar';
|
|
9
9
|
import { getContextPanel } from './context-panel';
|
|
10
10
|
import { createExtensionAPI } from './extension-api';
|
|
11
|
+
import { createEditSelectedExtensionAction } from './actions';
|
|
11
12
|
var extensionPlugin = function extensionPlugin(_ref) {
|
|
12
|
-
var _api$featureFlags, _api$analytics2, _api$contextPanel3, _api$
|
|
13
|
+
var _api$featureFlags, _api$analytics2, _api$analytics3, _api$contextPanel3, _api$analytics4, _api$contextPanel4;
|
|
13
14
|
var _ref$config = _ref.config,
|
|
14
15
|
options = _ref$config === void 0 ? {} : _ref$config,
|
|
15
16
|
_api = _ref.api;
|
|
@@ -90,6 +91,10 @@ var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
90
91
|
});
|
|
91
92
|
},
|
|
92
93
|
insertMacroFromMacroBrowser: insertMacroFromMacroBrowser(_api === null || _api === void 0 || (_api$analytics2 = _api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions),
|
|
94
|
+
editSelectedExtension: createEditSelectedExtensionAction({
|
|
95
|
+
editorViewRef: editorViewRef,
|
|
96
|
+
editorAnalyticsAPI: _api === null || _api === void 0 || (_api$analytics3 = _api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions
|
|
97
|
+
}),
|
|
93
98
|
runMacroAutoConvert: runMacroAutoConvert
|
|
94
99
|
},
|
|
95
100
|
pluginsOptions: {
|
|
@@ -97,7 +102,7 @@ var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
97
102
|
breakoutEnabled: options.breakoutEnabled,
|
|
98
103
|
hoverDecoration: _api === null || _api === void 0 ? void 0 : _api.decorations.actions.hoverDecoration,
|
|
99
104
|
applyChangeToContextPanel: _api === null || _api === void 0 || (_api$contextPanel3 = _api.contextPanel) === null || _api$contextPanel3 === void 0 ? void 0 : _api$contextPanel3.actions.applyChange,
|
|
100
|
-
editorAnalyticsAPI: _api === null || _api === void 0 || (_api$
|
|
105
|
+
editorAnalyticsAPI: _api === null || _api === void 0 || (_api$analytics4 = _api.analytics) === null || _api$analytics4 === void 0 ? void 0 : _api$analytics4.actions
|
|
101
106
|
}),
|
|
102
107
|
contextPanel: getContextPanel(function () {
|
|
103
108
|
var _editorViewRef$curren;
|
|
@@ -3,10 +3,11 @@ var _templateObject;
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { css, jsx } from '@emotion/react';
|
|
5
5
|
import Spinner from '@atlaskit/spinner';
|
|
6
|
-
var spinnerWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n margin-top:
|
|
6
|
+
var spinnerWrapper = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n justify-content: center;\n margin-top: ", ";\n"])), "var(--ds-space-800, 64px)");
|
|
7
7
|
var LoadingState = function LoadingState() {
|
|
8
8
|
return jsx("div", {
|
|
9
|
-
css: spinnerWrapper
|
|
9
|
+
css: spinnerWrapper,
|
|
10
|
+
"data-testid": "ConfigPanelLoading"
|
|
10
11
|
}, jsx(Spinner, {
|
|
11
12
|
size: "small"
|
|
12
13
|
}));
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "189.3.
|
|
2
|
+
export var version = "189.3.26";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
1
2
|
import type { Schema, Node as PmNode, Fragment, Mark } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import type { UpdateExtension } from '@atlaskit/editor-common/extensions';
|
|
3
4
|
import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -10,3 +11,8 @@ export declare const buildExtensionNode: <S extends Schema<any, any>>(type: 'inl
|
|
|
10
11
|
export declare const performNodeUpdate: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (type: 'inlineExtension' | 'extension' | 'bodiedExtension', newAttrs: object, content: Fragment, marks: readonly Mark[], shouldScrollIntoView: boolean) => Command;
|
|
11
12
|
export declare const editSelectedExtension: (editorActions: EditorActions) => boolean;
|
|
12
13
|
export declare const editExtension: (macroProvider: MacroProvider | null | undefined, applyChangeToContextPanel: ApplyChangeHandler | undefined, editorAnalyticsAPI: EditorAnalyticsAPI | undefined, updateExtension?: Promise<UpdateExtension<object> | void>) => Command;
|
|
14
|
+
type Props = {
|
|
15
|
+
editorViewRef: Record<'current', EditorView | null>;
|
|
16
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
17
|
+
};
|
|
18
|
+
export declare const createEditSelectedExtensionAction: ({ editorViewRef, editorAnalyticsAPI }: Props) => () => boolean;
|
|
@@ -112,6 +112,7 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
112
112
|
};
|
|
113
113
|
}, undefined>>];
|
|
114
114
|
actions: {
|
|
115
|
+
editSelectedExtension: () => boolean;
|
|
115
116
|
api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
|
|
116
117
|
insertMacroFromMacroBrowser: (macroProvider: import("@atlaskit/editor-common/provider-factory").MacroProvider, macroNode?: import("prosemirror-model").Node | undefined, isEditing?: boolean | undefined) => (view: import("prosemirror-view").EditorView) => Promise<boolean>;
|
|
117
118
|
runMacroAutoConvert: import("@atlaskit/editor-plugin-extension").RunMacroAutoConvert;
|
|
@@ -253,6 +254,7 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
253
254
|
};
|
|
254
255
|
}, undefined>>];
|
|
255
256
|
actions: {
|
|
257
|
+
editSelectedExtension: () => boolean;
|
|
256
258
|
api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
|
|
257
259
|
insertMacroFromMacroBrowser: (macroProvider: import("@atlaskit/editor-common/provider-factory").MacroProvider, macroNode?: import("prosemirror-model").Node | undefined, isEditing?: boolean | undefined) => (view: import("prosemirror-view").EditorView) => Promise<boolean>;
|
|
258
260
|
runMacroAutoConvert: import("@atlaskit/editor-plugin-extension").RunMacroAutoConvert;
|
|
@@ -601,6 +603,7 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
601
603
|
};
|
|
602
604
|
}, undefined>>];
|
|
603
605
|
actions: {
|
|
606
|
+
editSelectedExtension: () => boolean;
|
|
604
607
|
api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
|
|
605
608
|
insertMacroFromMacroBrowser: (macroProvider: import("@atlaskit/editor-common/provider-factory").MacroProvider, macroNode?: import("prosemirror-model").Node | undefined, isEditing?: boolean | undefined) => (view: import("prosemirror-view").EditorView) => Promise<boolean>;
|
|
606
609
|
runMacroAutoConvert: import("@atlaskit/editor-plugin-extension").RunMacroAutoConvert;
|
|
@@ -742,6 +745,7 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
742
745
|
};
|
|
743
746
|
}, undefined>>];
|
|
744
747
|
actions: {
|
|
748
|
+
editSelectedExtension: () => boolean;
|
|
745
749
|
api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
|
|
746
750
|
insertMacroFromMacroBrowser: (macroProvider: import("@atlaskit/editor-common/provider-factory").MacroProvider, macroNode?: import("prosemirror-model").Node | undefined, isEditing?: boolean | undefined) => (view: import("prosemirror-view").EditorView) => Promise<boolean>;
|
|
747
751
|
runMacroAutoConvert: import("@atlaskit/editor-plugin-extension").RunMacroAutoConvert;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
1
2
|
import type { Schema, Node as PmNode, Fragment, Mark } from '@atlaskit/editor-prosemirror/model';
|
|
2
3
|
import type { UpdateExtension } from '@atlaskit/editor-common/extensions';
|
|
3
4
|
import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -10,3 +11,8 @@ export declare const buildExtensionNode: <S extends Schema<any, any>>(type: 'inl
|
|
|
10
11
|
export declare const performNodeUpdate: (editorAnalyticsAPI: EditorAnalyticsAPI | undefined) => (type: 'inlineExtension' | 'extension' | 'bodiedExtension', newAttrs: object, content: Fragment, marks: readonly Mark[], shouldScrollIntoView: boolean) => Command;
|
|
11
12
|
export declare const editSelectedExtension: (editorActions: EditorActions) => boolean;
|
|
12
13
|
export declare const editExtension: (macroProvider: MacroProvider | null | undefined, applyChangeToContextPanel: ApplyChangeHandler | undefined, editorAnalyticsAPI: EditorAnalyticsAPI | undefined, updateExtension?: Promise<UpdateExtension<object> | void>) => Command;
|
|
14
|
+
type Props = {
|
|
15
|
+
editorViewRef: Record<'current', EditorView | null>;
|
|
16
|
+
editorAnalyticsAPI: EditorAnalyticsAPI | undefined;
|
|
17
|
+
};
|
|
18
|
+
export declare const createEditSelectedExtensionAction: ({ editorViewRef, editorAnalyticsAPI }: Props) => () => boolean;
|
|
@@ -148,6 +148,7 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
148
148
|
}, undefined>>
|
|
149
149
|
];
|
|
150
150
|
actions: {
|
|
151
|
+
editSelectedExtension: () => boolean;
|
|
151
152
|
api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
|
|
152
153
|
insertMacroFromMacroBrowser: (macroProvider: import("@atlaskit/editor-common/provider-factory").MacroProvider, macroNode?: import("prosemirror-model").Node | undefined, isEditing?: boolean | undefined) => (view: import("prosemirror-view").EditorView) => Promise<boolean>;
|
|
153
154
|
runMacroAutoConvert: import("@atlaskit/editor-plugin-extension").RunMacroAutoConvert;
|
|
@@ -328,6 +329,7 @@ export declare function createDefaultPreset(options: EditorPresetProps & Default
|
|
|
328
329
|
}, undefined>>
|
|
329
330
|
];
|
|
330
331
|
actions: {
|
|
332
|
+
editSelectedExtension: () => boolean;
|
|
331
333
|
api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
|
|
332
334
|
insertMacroFromMacroBrowser: (macroProvider: import("@atlaskit/editor-common/provider-factory").MacroProvider, macroNode?: import("prosemirror-model").Node | undefined, isEditing?: boolean | undefined) => (view: import("prosemirror-view").EditorView) => Promise<boolean>;
|
|
333
335
|
runMacroAutoConvert: import("@atlaskit/editor-plugin-extension").RunMacroAutoConvert;
|
|
@@ -761,6 +763,7 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
761
763
|
}, undefined>>
|
|
762
764
|
];
|
|
763
765
|
actions: {
|
|
766
|
+
editSelectedExtension: () => boolean;
|
|
764
767
|
api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
|
|
765
768
|
insertMacroFromMacroBrowser: (macroProvider: import("@atlaskit/editor-common/provider-factory").MacroProvider, macroNode?: import("prosemirror-model").Node | undefined, isEditing?: boolean | undefined) => (view: import("prosemirror-view").EditorView) => Promise<boolean>;
|
|
766
769
|
runMacroAutoConvert: import("@atlaskit/editor-plugin-extension").RunMacroAutoConvert;
|
|
@@ -941,6 +944,7 @@ export declare function useDefaultPreset(props: EditorPresetProps & DefaultPrese
|
|
|
941
944
|
}, undefined>>
|
|
942
945
|
];
|
|
943
946
|
actions: {
|
|
947
|
+
editSelectedExtension: () => boolean;
|
|
944
948
|
api: () => import("@atlaskit/editor-common/extensions").ExtensionAPI<import("@atlaskit/editor-common/extensions").Parameters>;
|
|
945
949
|
insertMacroFromMacroBrowser: (macroProvider: import("@atlaskit/editor-common/provider-factory").MacroProvider, macroNode?: import("prosemirror-model").Node | undefined, isEditing?: boolean | undefined) => (view: import("prosemirror-view").EditorView) => Promise<boolean>;
|
|
946
950
|
runMacroAutoConvert: import("@atlaskit/editor-plugin-extension").RunMacroAutoConvert;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "189.3.
|
|
3
|
+
"version": "189.3.26",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"@atlaskit/editor-plugin-editor-disabled": "^0.2.0",
|
|
74
74
|
"@atlaskit/editor-plugin-emoji": "^0.4.0",
|
|
75
75
|
"@atlaskit/editor-plugin-expand": "^0.1.0",
|
|
76
|
-
"@atlaskit/editor-plugin-extension": "^0.
|
|
76
|
+
"@atlaskit/editor-plugin-extension": "^0.4.0",
|
|
77
77
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
78
78
|
"@atlaskit/editor-plugin-floating-toolbar": "^0.7.0",
|
|
79
79
|
"@atlaskit/editor-plugin-focus": "^0.2.0",
|