@atlaskit/editor-core 187.37.1 → 187.37.2
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/index.js +4 -0
- package/dist/cjs/plugins/extension/pm-plugins/main.js +4 -4
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/plugins/extension/index.js +4 -0
- package/dist/es2019/plugins/extension/pm-plugins/main.js +4 -4
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/plugins/extension/index.js +4 -0
- package/dist/esm/plugins/extension/pm-plugins/main.js +4 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/plugins/extension/extension-api.d.ts +2 -8
- package/dist/types/plugins/extension/index.d.ts +2 -22
- package/dist/types-ts4.5/plugins/extension/extension-api.d.ts +2 -8
- package/dist/types-ts4.5/plugins/extension/index.d.ts +2 -22
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 187.37.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`39fcb436aba`](https://bitbucket.org/atlassian/atlassian-frontend/commits/39fcb436aba) - ED-19617 Create editor-plugin-extension scaffold
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 187.37.1
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -11,6 +11,7 @@ var _keymap = _interopRequireDefault(require("./pm-plugins/keymap"));
|
|
|
11
11
|
var _uniqueId = require("./pm-plugins/unique-id");
|
|
12
12
|
var _toolbar = require("./toolbar");
|
|
13
13
|
var _contextPanel = require("./context-panel");
|
|
14
|
+
var _extensionApi = require("./extension-api");
|
|
14
15
|
var extensionPlugin = function extensionPlugin(_ref) {
|
|
15
16
|
var _api$featureFlags, _api$contextPanel2, _api$contextPanel3;
|
|
16
17
|
var _ref$config = _ref.config,
|
|
@@ -57,6 +58,9 @@ var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
57
58
|
}
|
|
58
59
|
}];
|
|
59
60
|
},
|
|
61
|
+
actions: {
|
|
62
|
+
createExtensionAPI: _extensionApi.createExtensionAPI
|
|
63
|
+
},
|
|
60
64
|
pluginsOptions: {
|
|
61
65
|
floatingToolbar: (0, _toolbar.getToolbarConfig)({
|
|
62
66
|
breakoutEnabled: options.breakoutEnabled,
|
|
@@ -228,13 +228,13 @@ var handleUpdate = function handleUpdate(_ref4) {
|
|
|
228
228
|
};
|
|
229
229
|
exports.handleUpdate = handleUpdate;
|
|
230
230
|
var createPlugin = function createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, pluginInjectionApi) {
|
|
231
|
-
var _pluginInjectionApi$c;
|
|
231
|
+
var _pluginInjectionApi$c, _pluginInjectionApi$c2;
|
|
232
232
|
var useLongPressSelection = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
233
233
|
var options = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : {};
|
|
234
234
|
var state = (0, _pluginFactory.createPluginState)(dispatch, {
|
|
235
235
|
showEditButton: false,
|
|
236
236
|
showContextPanel: false,
|
|
237
|
-
applyChangeToContextPanel: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c = pluginInjectionApi.contextPanel) === null || _pluginInjectionApi$c === void 0 ? void 0 : _pluginInjectionApi$c.actions.applyChange
|
|
237
|
+
applyChangeToContextPanel: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c = pluginInjectionApi.contextPanel) === null || _pluginInjectionApi$c === void 0 ? void 0 : (_pluginInjectionApi$c2 = _pluginInjectionApi$c.actions) === null || _pluginInjectionApi$c2 === void 0 ? void 0 : _pluginInjectionApi$c2.applyChange
|
|
238
238
|
});
|
|
239
239
|
var extensionNodeViewOptions = {
|
|
240
240
|
appearance: options.appearance
|
|
@@ -249,13 +249,13 @@ var createPlugin = function createPlugin(dispatch, providerFactory, extensionHan
|
|
|
249
249
|
providerFactory.subscribe('contextIdentificationProvider', contextIdentificationProviderHandler);
|
|
250
250
|
return {
|
|
251
251
|
update: function update(view, prevState) {
|
|
252
|
-
var _pluginInjectionApi$
|
|
252
|
+
var _pluginInjectionApi$c3;
|
|
253
253
|
handleUpdate({
|
|
254
254
|
view: view,
|
|
255
255
|
prevState: prevState,
|
|
256
256
|
domAtPos: domAtPos,
|
|
257
257
|
extensionHandlers: extensionHandlers,
|
|
258
|
-
applyChange: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
258
|
+
applyChange: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c3 = pluginInjectionApi.contextPanel) === null || _pluginInjectionApi$c3 === void 0 ? void 0 : _pluginInjectionApi$c3.actions.applyChange
|
|
259
259
|
});
|
|
260
260
|
},
|
|
261
261
|
destroy: function destroy() {
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = "@atlaskit/editor-core";
|
|
8
8
|
exports.name = name;
|
|
9
|
-
var version = "187.37.
|
|
9
|
+
var version = "187.37.2";
|
|
10
10
|
exports.version = version;
|
|
11
11
|
var nextMajorVersion = function nextMajorVersion() {
|
|
12
12
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
@@ -4,6 +4,7 @@ import keymapPlugin from './pm-plugins/keymap';
|
|
|
4
4
|
import { createPlugin as createUniqueIdPlugin } from './pm-plugins/unique-id';
|
|
5
5
|
import { getToolbarConfig } from './toolbar';
|
|
6
6
|
import { getContextPanel } from './context-panel';
|
|
7
|
+
import { createExtensionAPI } from './extension-api';
|
|
7
8
|
const extensionPlugin = ({
|
|
8
9
|
config: options = {},
|
|
9
10
|
api
|
|
@@ -49,6 +50,9 @@ const extensionPlugin = ({
|
|
|
49
50
|
plugin: () => createUniqueIdPlugin()
|
|
50
51
|
}];
|
|
51
52
|
},
|
|
53
|
+
actions: {
|
|
54
|
+
createExtensionAPI
|
|
55
|
+
},
|
|
52
56
|
pluginsOptions: {
|
|
53
57
|
floatingToolbar: getToolbarConfig({
|
|
54
58
|
breakoutEnabled: options.breakoutEnabled,
|
|
@@ -130,11 +130,11 @@ export const handleUpdate = ({
|
|
|
130
130
|
return true;
|
|
131
131
|
};
|
|
132
132
|
const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, pluginInjectionApi, useLongPressSelection = false, options = {}) => {
|
|
133
|
-
var _pluginInjectionApi$c;
|
|
133
|
+
var _pluginInjectionApi$c, _pluginInjectionApi$c2;
|
|
134
134
|
const state = createPluginState(dispatch, {
|
|
135
135
|
showEditButton: false,
|
|
136
136
|
showContextPanel: false,
|
|
137
|
-
applyChangeToContextPanel: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c = pluginInjectionApi.contextPanel) === null || _pluginInjectionApi$c === void 0 ? void 0 : _pluginInjectionApi$c.actions.applyChange
|
|
137
|
+
applyChangeToContextPanel: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c = pluginInjectionApi.contextPanel) === null || _pluginInjectionApi$c === void 0 ? void 0 : (_pluginInjectionApi$c2 = _pluginInjectionApi$c.actions) === null || _pluginInjectionApi$c2 === void 0 ? void 0 : _pluginInjectionApi$c2.applyChange
|
|
138
138
|
});
|
|
139
139
|
const extensionNodeViewOptions = {
|
|
140
140
|
appearance: options.appearance
|
|
@@ -149,13 +149,13 @@ const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProvid
|
|
|
149
149
|
providerFactory.subscribe('contextIdentificationProvider', contextIdentificationProviderHandler);
|
|
150
150
|
return {
|
|
151
151
|
update: (view, prevState) => {
|
|
152
|
-
var _pluginInjectionApi$
|
|
152
|
+
var _pluginInjectionApi$c3;
|
|
153
153
|
handleUpdate({
|
|
154
154
|
view,
|
|
155
155
|
prevState,
|
|
156
156
|
domAtPos,
|
|
157
157
|
extensionHandlers,
|
|
158
|
-
applyChange: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
158
|
+
applyChange: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c3 = pluginInjectionApi.contextPanel) === null || _pluginInjectionApi$c3 === void 0 ? void 0 : _pluginInjectionApi$c3.actions.applyChange
|
|
159
159
|
});
|
|
160
160
|
},
|
|
161
161
|
destroy: () => {
|
|
@@ -4,6 +4,7 @@ import keymapPlugin from './pm-plugins/keymap';
|
|
|
4
4
|
import { createPlugin as createUniqueIdPlugin } from './pm-plugins/unique-id';
|
|
5
5
|
import { getToolbarConfig } from './toolbar';
|
|
6
6
|
import { getContextPanel } from './context-panel';
|
|
7
|
+
import { createExtensionAPI } from './extension-api';
|
|
7
8
|
var extensionPlugin = function extensionPlugin(_ref) {
|
|
8
9
|
var _api$featureFlags, _api$contextPanel2, _api$contextPanel3;
|
|
9
10
|
var _ref$config = _ref.config,
|
|
@@ -50,6 +51,9 @@ var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
50
51
|
}
|
|
51
52
|
}];
|
|
52
53
|
},
|
|
54
|
+
actions: {
|
|
55
|
+
createExtensionAPI: createExtensionAPI
|
|
56
|
+
},
|
|
53
57
|
pluginsOptions: {
|
|
54
58
|
floatingToolbar: getToolbarConfig({
|
|
55
59
|
breakoutEnabled: options.breakoutEnabled,
|
|
@@ -199,13 +199,13 @@ export var handleUpdate = function handleUpdate(_ref4) {
|
|
|
199
199
|
return true;
|
|
200
200
|
};
|
|
201
201
|
var createPlugin = function createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, pluginInjectionApi) {
|
|
202
|
-
var _pluginInjectionApi$c;
|
|
202
|
+
var _pluginInjectionApi$c, _pluginInjectionApi$c2;
|
|
203
203
|
var useLongPressSelection = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : false;
|
|
204
204
|
var options = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : {};
|
|
205
205
|
var state = createPluginState(dispatch, {
|
|
206
206
|
showEditButton: false,
|
|
207
207
|
showContextPanel: false,
|
|
208
|
-
applyChangeToContextPanel: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c = pluginInjectionApi.contextPanel) === null || _pluginInjectionApi$c === void 0 ? void 0 : _pluginInjectionApi$c.actions.applyChange
|
|
208
|
+
applyChangeToContextPanel: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c = pluginInjectionApi.contextPanel) === null || _pluginInjectionApi$c === void 0 ? void 0 : (_pluginInjectionApi$c2 = _pluginInjectionApi$c.actions) === null || _pluginInjectionApi$c2 === void 0 ? void 0 : _pluginInjectionApi$c2.applyChange
|
|
209
209
|
});
|
|
210
210
|
var extensionNodeViewOptions = {
|
|
211
211
|
appearance: options.appearance
|
|
@@ -220,13 +220,13 @@ var createPlugin = function createPlugin(dispatch, providerFactory, extensionHan
|
|
|
220
220
|
providerFactory.subscribe('contextIdentificationProvider', contextIdentificationProviderHandler);
|
|
221
221
|
return {
|
|
222
222
|
update: function update(view, prevState) {
|
|
223
|
-
var _pluginInjectionApi$
|
|
223
|
+
var _pluginInjectionApi$c3;
|
|
224
224
|
handleUpdate({
|
|
225
225
|
view: view,
|
|
226
226
|
prevState: prevState,
|
|
227
227
|
domAtPos: domAtPos,
|
|
228
228
|
extensionHandlers: extensionHandlers,
|
|
229
|
-
applyChange: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$
|
|
229
|
+
applyChange: pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$c3 = pluginInjectionApi.contextPanel) === null || _pluginInjectionApi$c3 === void 0 ? void 0 : _pluginInjectionApi$c3.actions.applyChange
|
|
230
230
|
});
|
|
231
231
|
},
|
|
232
232
|
destroy: function destroy() {
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import type { ExtensionAPI } from '@atlaskit/editor-common/extensions';
|
|
2
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
2
|
import type { MacroProvider } from '../macro';
|
|
4
|
-
import type {
|
|
3
|
+
import type { CreateExtensionAPI } from '@atlaskit/editor-plugin-extension';
|
|
5
4
|
interface EditInLegacyMacroBrowserArgs {
|
|
6
5
|
view: EditorView;
|
|
7
6
|
macroProvider?: MacroProvider;
|
|
8
7
|
}
|
|
9
8
|
export declare const getEditInLegacyMacroBrowser: ({ view, macroProvider, }: EditInLegacyMacroBrowserArgs) => () => void;
|
|
10
|
-
|
|
11
|
-
editorView: EditorView;
|
|
12
|
-
applyChange: ApplyChangeHandler | undefined;
|
|
13
|
-
editInLegacyMacroBrowser?: () => void;
|
|
14
|
-
}
|
|
15
|
-
export declare const createExtensionAPI: (options: CreateExtensionAPIOptions) => ExtensionAPI;
|
|
9
|
+
export declare const createExtensionAPI: CreateExtensionAPI;
|
|
16
10
|
export {};
|
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
import type { NextEditorPlugin, EditorAppearance, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
6
|
-
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
7
|
-
import type { ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
8
|
-
interface ExtensionPluginOptions extends LongPressSelectionPluginOptions {
|
|
9
|
-
allowAutoSave?: boolean;
|
|
10
|
-
breakoutEnabled?: boolean;
|
|
11
|
-
extensionHandlers?: ExtensionHandlers;
|
|
12
|
-
appearance?: EditorAppearance;
|
|
13
|
-
}
|
|
14
|
-
declare const extensionPlugin: NextEditorPlugin<'extension', {
|
|
15
|
-
pluginConfiguration: ExtensionPluginOptions | undefined;
|
|
16
|
-
dependencies: [
|
|
17
|
-
FeatureFlagsPlugin,
|
|
18
|
-
WidthPlugin,
|
|
19
|
-
DecorationsPlugin,
|
|
20
|
-
OptionalPlugin<ContextPanelPlugin>
|
|
21
|
-
];
|
|
22
|
-
}>;
|
|
1
|
+
import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
2
|
+
declare const extensionPlugin: ExtensionPlugin;
|
|
23
3
|
export default extensionPlugin;
|
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import type { ExtensionAPI } from '@atlaskit/editor-common/extensions';
|
|
2
1
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
3
2
|
import type { MacroProvider } from '../macro';
|
|
4
|
-
import type {
|
|
3
|
+
import type { CreateExtensionAPI } from '@atlaskit/editor-plugin-extension';
|
|
5
4
|
interface EditInLegacyMacroBrowserArgs {
|
|
6
5
|
view: EditorView;
|
|
7
6
|
macroProvider?: MacroProvider;
|
|
8
7
|
}
|
|
9
8
|
export declare const getEditInLegacyMacroBrowser: ({ view, macroProvider, }: EditInLegacyMacroBrowserArgs) => () => void;
|
|
10
|
-
|
|
11
|
-
editorView: EditorView;
|
|
12
|
-
applyChange: ApplyChangeHandler | undefined;
|
|
13
|
-
editInLegacyMacroBrowser?: () => void;
|
|
14
|
-
}
|
|
15
|
-
export declare const createExtensionAPI: (options: CreateExtensionAPIOptions) => ExtensionAPI;
|
|
9
|
+
export declare const createExtensionAPI: CreateExtensionAPI;
|
|
16
10
|
export {};
|
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
import type { NextEditorPlugin, EditorAppearance, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
4
|
-
import type { LongPressSelectionPluginOptions } from '@atlaskit/editor-common/types';
|
|
5
|
-
import type { WidthPlugin } from '@atlaskit/editor-plugin-width';
|
|
6
|
-
import type { DecorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
7
|
-
import type { ContextPanelPlugin } from '@atlaskit/editor-plugin-context-panel';
|
|
8
|
-
interface ExtensionPluginOptions extends LongPressSelectionPluginOptions {
|
|
9
|
-
allowAutoSave?: boolean;
|
|
10
|
-
breakoutEnabled?: boolean;
|
|
11
|
-
extensionHandlers?: ExtensionHandlers;
|
|
12
|
-
appearance?: EditorAppearance;
|
|
13
|
-
}
|
|
14
|
-
declare const extensionPlugin: NextEditorPlugin<'extension', {
|
|
15
|
-
pluginConfiguration: ExtensionPluginOptions | undefined;
|
|
16
|
-
dependencies: [
|
|
17
|
-
FeatureFlagsPlugin,
|
|
18
|
-
WidthPlugin,
|
|
19
|
-
DecorationsPlugin,
|
|
20
|
-
OptionalPlugin<ContextPanelPlugin>
|
|
21
|
-
];
|
|
22
|
-
}>;
|
|
1
|
+
import type { ExtensionPlugin } from '@atlaskit/editor-plugin-extension';
|
|
2
|
+
declare const extensionPlugin: ExtensionPlugin;
|
|
23
3
|
export default extensionPlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "187.37.
|
|
3
|
+
"version": "187.37.2",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"@atlaskit/editor-plugin-decorations": "^0.2.0",
|
|
68
68
|
"@atlaskit/editor-plugin-editor-disabled": "^0.2.0",
|
|
69
69
|
"@atlaskit/editor-plugin-emoji": "^0.3.0",
|
|
70
|
+
"@atlaskit/editor-plugin-extension": "^0.1.0",
|
|
70
71
|
"@atlaskit/editor-plugin-feature-flags": "^1.0.0",
|
|
71
72
|
"@atlaskit/editor-plugin-floating-toolbar": "^0.4.0",
|
|
72
73
|
"@atlaskit/editor-plugin-focus": "^0.2.0",
|
|
@@ -115,7 +116,7 @@
|
|
|
115
116
|
"@atlaskit/textfield": "^5.6.0",
|
|
116
117
|
"@atlaskit/theme": "^12.6.0",
|
|
117
118
|
"@atlaskit/toggle": "^12.6.0",
|
|
118
|
-
"@atlaskit/tokens": "^1.
|
|
119
|
+
"@atlaskit/tokens": "^1.19.0",
|
|
119
120
|
"@atlaskit/tooltip": "^17.8.0",
|
|
120
121
|
"@atlaskit/width-detector": "^4.1.0",
|
|
121
122
|
"@babel/runtime": "^7.0.0",
|