@atlaskit/editor-plugin-extension 1.18.6 → 2.0.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 +26 -0
- package/dist/cjs/plugin.js +1 -1
- package/dist/cjs/pm-plugins/main.js +3 -3
- package/dist/cjs/ui/ConfigPanel/Header.js +8 -18
- package/dist/es2019/plugin.js +1 -1
- package/dist/es2019/pm-plugins/main.js +3 -3
- package/dist/es2019/ui/ConfigPanel/Header.js +8 -16
- package/dist/esm/plugin.js +1 -1
- package/dist/esm/pm-plugins/main.js +3 -3
- package/dist/esm/ui/ConfigPanel/Header.js +8 -18
- package/dist/types/pm-plugins/main.d.ts +2 -2
- package/dist/types/types.d.ts +5 -1
- package/dist/types-ts4.5/pm-plugins/main.d.ts +2 -2
- package/dist/types-ts4.5/types.d.ts +5 -1
- package/package.json +7 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-extension
|
|
2
2
|
|
|
3
|
+
## 2.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#173426](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/173426)
|
|
8
|
+
[`2ce125017f62d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/2ce125017f62d) -
|
|
9
|
+
cleanup platform_editor_react18_phase2_loadable
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 2.0.0
|
|
13
|
+
|
|
14
|
+
### Major Changes
|
|
15
|
+
|
|
16
|
+
- [#166906](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/166906)
|
|
17
|
+
[`aac76c4a54baf`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/aac76c4a54baf) -
|
|
18
|
+
added **rendererExtensionOptions option to pass renderer extension handlers to extensions in
|
|
19
|
+
editor to allow displaying of renderer view for bodiedExtensions—optional not required. To use for
|
|
20
|
+
extension plugin, pass **rendererExtensionOptions to universal preset via its
|
|
21
|
+
initialPluginConfiguration prop. To use for referentialityPlugin, use \_\_rendererExtensionOptions
|
|
22
|
+
option. In a future release, changes will be added to use this new option. Note: option is not
|
|
23
|
+
fully supported currently and is intended for use for confluence live pages
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies
|
|
28
|
+
|
|
3
29
|
## 1.18.6
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -70,7 +70,7 @@ var extensionPlugin = exports.extensionPlugin = function extensionPlugin(_ref) {
|
|
|
70
70
|
var extensionHandlers = options.extensionHandlers || {};
|
|
71
71
|
return (0, _main.createPlugin)(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, _api, options.useLongPressSelection, {
|
|
72
72
|
appearance: options.appearance
|
|
73
|
-
}, featureFlags, options.allowDragAndDrop, options === null || options === void 0 ? void 0 : options.
|
|
73
|
+
}, featureFlags, options.allowDragAndDrop, options === null || options === void 0 ? void 0 : options.__rendererExtensionOptions);
|
|
74
74
|
}
|
|
75
75
|
}, {
|
|
76
76
|
name: 'extensionKeymap',
|
|
@@ -192,7 +192,7 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
|
|
|
192
192
|
var options = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : {};
|
|
193
193
|
var featureFlags = arguments.length > 8 ? arguments[8] : undefined;
|
|
194
194
|
var allowDragAndDrop = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : true;
|
|
195
|
-
var
|
|
195
|
+
var __rendererExtensionOptions = arguments.length > 10 ? arguments[10] : undefined;
|
|
196
196
|
var state = (0, _pluginFactory.createPluginState)(dispatch, {
|
|
197
197
|
showEditButton: false,
|
|
198
198
|
showContextPanel: false
|
|
@@ -204,7 +204,7 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
|
|
|
204
204
|
showMacroInteractionDesignUpdates: (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false,
|
|
205
205
|
showMacroButtonUpdates: (_featureFlags$macroIn2 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionButtonUpdates) !== null && _featureFlags$macroIn2 !== void 0 ? _featureFlags$macroIn2 : false
|
|
206
206
|
};
|
|
207
|
-
var showLivePagesBodiedMacrosRendererView =
|
|
207
|
+
var showLivePagesBodiedMacrosRendererView = __rendererExtensionOptions === null || __rendererExtensionOptions === void 0 ? void 0 : __rendererExtensionOptions.isAllowedToUseRendererView;
|
|
208
208
|
return new _safePlugin.SafePlugin({
|
|
209
209
|
state: state,
|
|
210
210
|
view: function view(editorView) {
|
|
@@ -317,7 +317,7 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, provid
|
|
|
317
317
|
// WARNING: referentiality-plugin also creates these nodeviews
|
|
318
318
|
extension: (0, _lazyExtension.lazyExtensionNodeView)('extension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
|
|
319
319
|
// WARNING: referentiality-plugin also creates these nodeviews
|
|
320
|
-
bodiedExtension: (0, _lazyExtension.lazyExtensionNodeView)('bodiedExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags, showLivePagesBodiedMacrosRendererView),
|
|
320
|
+
bodiedExtension: (0, _lazyExtension.lazyExtensionNodeView)('bodiedExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags, showLivePagesBodiedMacrosRendererView, __rendererExtensionOptions === null || __rendererExtensionOptions === void 0 ? void 0 : __rendererExtensionOptions.rendererExtensionHandlers),
|
|
321
321
|
// WARNING: referentiality-plugin also creates these nodeviews
|
|
322
322
|
inlineExtension: (0, _lazyExtension.lazyExtensionNodeView)('inlineExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
|
|
323
323
|
multiBodiedExtension: (0, _lazyExtension.lazyExtensionNodeView)('multiBodiedExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags)
|
|
@@ -8,12 +8,10 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
10
|
var _reactIntlNext = require("react-intl-next");
|
|
11
|
-
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
12
11
|
var _new = require("@atlaskit/button/new");
|
|
13
12
|
var _extensions = require("@atlaskit/editor-common/extensions");
|
|
14
13
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
14
|
var _cross = _interopRequireDefault(require("@atlaskit/icon/glyph/cross"));
|
|
16
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
17
15
|
var _primitives = require("@atlaskit/primitives");
|
|
18
16
|
var _colors = require("@atlaskit/theme/colors");
|
|
19
17
|
var _constants = require("@atlaskit/theme/constants");
|
|
@@ -99,23 +97,15 @@ var Header = function Header(_ref) {
|
|
|
99
97
|
onClose = _ref.onClose,
|
|
100
98
|
intl = _ref.intl;
|
|
101
99
|
var ResolvedIcon = (0, _react.useMemo)(function () {
|
|
102
|
-
|
|
103
|
-
return
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
};
|
|
111
|
-
});
|
|
100
|
+
return /*#__PURE__*/(0, _react.lazy)(function () {
|
|
101
|
+
return icon().then(function (Cmp) {
|
|
102
|
+
if ('default' in Cmp) {
|
|
103
|
+
return Cmp;
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
default: Cmp
|
|
107
|
+
};
|
|
112
108
|
});
|
|
113
|
-
}
|
|
114
|
-
return (0, _reactLoadable.default)({
|
|
115
|
-
loader: icon,
|
|
116
|
-
loading: function loading() {
|
|
117
|
-
return null;
|
|
118
|
-
}
|
|
119
109
|
});
|
|
120
110
|
}, [icon]);
|
|
121
111
|
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -64,7 +64,7 @@ export const extensionPlugin = ({
|
|
|
64
64
|
const extensionHandlers = options.extensionHandlers || {};
|
|
65
65
|
return createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, api, options.useLongPressSelection, {
|
|
66
66
|
appearance: options.appearance
|
|
67
|
-
}, featureFlags, options.allowDragAndDrop, options === null || options === void 0 ? void 0 : options.
|
|
67
|
+
}, featureFlags, options.allowDragAndDrop, options === null || options === void 0 ? void 0 : options.__rendererExtensionOptions);
|
|
68
68
|
}
|
|
69
69
|
}, {
|
|
70
70
|
name: 'extensionKeymap',
|
|
@@ -115,7 +115,7 @@ export const handleUpdate = ({
|
|
|
115
115
|
}
|
|
116
116
|
return true;
|
|
117
117
|
};
|
|
118
|
-
const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, pluginInjectionApi, useLongPressSelection = false, options = {}, featureFlags, allowDragAndDrop = true,
|
|
118
|
+
const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, pluginInjectionApi, useLongPressSelection = false, options = {}, featureFlags, allowDragAndDrop = true, __rendererExtensionOptions) => {
|
|
119
119
|
var _featureFlags$macroIn, _featureFlags$macroIn2;
|
|
120
120
|
const state = createPluginState(dispatch, {
|
|
121
121
|
showEditButton: false,
|
|
@@ -128,7 +128,7 @@ const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProvid
|
|
|
128
128
|
showMacroInteractionDesignUpdates: (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false,
|
|
129
129
|
showMacroButtonUpdates: (_featureFlags$macroIn2 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionButtonUpdates) !== null && _featureFlags$macroIn2 !== void 0 ? _featureFlags$macroIn2 : false
|
|
130
130
|
};
|
|
131
|
-
const showLivePagesBodiedMacrosRendererView =
|
|
131
|
+
const showLivePagesBodiedMacrosRendererView = __rendererExtensionOptions === null || __rendererExtensionOptions === void 0 ? void 0 : __rendererExtensionOptions.isAllowedToUseRendererView;
|
|
132
132
|
return new SafePlugin({
|
|
133
133
|
state,
|
|
134
134
|
view: editorView => {
|
|
@@ -250,7 +250,7 @@ const createPlugin = (dispatch, providerFactory, extensionHandlers, portalProvid
|
|
|
250
250
|
// WARNING: referentiality-plugin also creates these nodeviews
|
|
251
251
|
extension: lazyExtensionNodeView('extension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
|
|
252
252
|
// WARNING: referentiality-plugin also creates these nodeviews
|
|
253
|
-
bodiedExtension: lazyExtensionNodeView('bodiedExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags, showLivePagesBodiedMacrosRendererView),
|
|
253
|
+
bodiedExtension: lazyExtensionNodeView('bodiedExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags, showLivePagesBodiedMacrosRendererView, __rendererExtensionOptions === null || __rendererExtensionOptions === void 0 ? void 0 : __rendererExtensionOptions.rendererExtensionHandlers),
|
|
254
254
|
// WARNING: referentiality-plugin also creates these nodeviews
|
|
255
255
|
inlineExtension: lazyExtensionNodeView('inlineExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
|
|
256
256
|
multiBodiedExtension: lazyExtensionNodeView('multiBodiedExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags)
|
|
@@ -7,12 +7,10 @@ import { Fragment, lazy, Suspense, useMemo } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { injectIntl } from 'react-intl-next';
|
|
10
|
-
import Loadable from 'react-loadable';
|
|
11
10
|
import { IconButton } from '@atlaskit/button/new';
|
|
12
11
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
13
12
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
14
13
|
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
14
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
17
15
|
import { N200 } from '@atlaskit/theme/colors';
|
|
18
16
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
@@ -92,20 +90,14 @@ const Header = ({
|
|
|
92
90
|
intl
|
|
93
91
|
}) => {
|
|
94
92
|
const ResolvedIcon = useMemo(() => {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}));
|
|
104
|
-
}
|
|
105
|
-
return Loadable({
|
|
106
|
-
loader: icon,
|
|
107
|
-
loading: () => null
|
|
108
|
-
});
|
|
93
|
+
return /*#__PURE__*/lazy(() => icon().then(Cmp => {
|
|
94
|
+
if ('default' in Cmp) {
|
|
95
|
+
return Cmp;
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
default: Cmp
|
|
99
|
+
};
|
|
100
|
+
}));
|
|
109
101
|
}, [icon]);
|
|
110
102
|
return jsx(Fragment, null, jsx("div", {
|
|
111
103
|
css: itemStyles
|
package/dist/esm/plugin.js
CHANGED
|
@@ -63,7 +63,7 @@ export var extensionPlugin = function extensionPlugin(_ref) {
|
|
|
63
63
|
var extensionHandlers = options.extensionHandlers || {};
|
|
64
64
|
return createPlugin(dispatch, providerFactory, extensionHandlers, portalProviderAPI, eventDispatcher, _api, options.useLongPressSelection, {
|
|
65
65
|
appearance: options.appearance
|
|
66
|
-
}, featureFlags, options.allowDragAndDrop, options === null || options === void 0 ? void 0 : options.
|
|
66
|
+
}, featureFlags, options.allowDragAndDrop, options === null || options === void 0 ? void 0 : options.__rendererExtensionOptions);
|
|
67
67
|
}
|
|
68
68
|
}, {
|
|
69
69
|
name: 'extensionKeymap',
|
|
@@ -166,7 +166,7 @@ var createPlugin = function createPlugin(dispatch, providerFactory, extensionHan
|
|
|
166
166
|
var options = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : {};
|
|
167
167
|
var featureFlags = arguments.length > 8 ? arguments[8] : undefined;
|
|
168
168
|
var allowDragAndDrop = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : true;
|
|
169
|
-
var
|
|
169
|
+
var __rendererExtensionOptions = arguments.length > 10 ? arguments[10] : undefined;
|
|
170
170
|
var state = createPluginState(dispatch, {
|
|
171
171
|
showEditButton: false,
|
|
172
172
|
showContextPanel: false
|
|
@@ -178,7 +178,7 @@ var createPlugin = function createPlugin(dispatch, providerFactory, extensionHan
|
|
|
178
178
|
showMacroInteractionDesignUpdates: (_featureFlags$macroIn = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionUpdates) !== null && _featureFlags$macroIn !== void 0 ? _featureFlags$macroIn : false,
|
|
179
179
|
showMacroButtonUpdates: (_featureFlags$macroIn2 = featureFlags === null || featureFlags === void 0 ? void 0 : featureFlags.macroInteractionButtonUpdates) !== null && _featureFlags$macroIn2 !== void 0 ? _featureFlags$macroIn2 : false
|
|
180
180
|
};
|
|
181
|
-
var showLivePagesBodiedMacrosRendererView =
|
|
181
|
+
var showLivePagesBodiedMacrosRendererView = __rendererExtensionOptions === null || __rendererExtensionOptions === void 0 ? void 0 : __rendererExtensionOptions.isAllowedToUseRendererView;
|
|
182
182
|
return new SafePlugin({
|
|
183
183
|
state: state,
|
|
184
184
|
view: function view(editorView) {
|
|
@@ -291,7 +291,7 @@ var createPlugin = function createPlugin(dispatch, providerFactory, extensionHan
|
|
|
291
291
|
// WARNING: referentiality-plugin also creates these nodeviews
|
|
292
292
|
extension: lazyExtensionNodeView('extension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
|
|
293
293
|
// WARNING: referentiality-plugin also creates these nodeviews
|
|
294
|
-
bodiedExtension: lazyExtensionNodeView('bodiedExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags, showLivePagesBodiedMacrosRendererView),
|
|
294
|
+
bodiedExtension: lazyExtensionNodeView('bodiedExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags, showLivePagesBodiedMacrosRendererView, __rendererExtensionOptions === null || __rendererExtensionOptions === void 0 ? void 0 : __rendererExtensionOptions.rendererExtensionHandlers),
|
|
295
295
|
// WARNING: referentiality-plugin also creates these nodeviews
|
|
296
296
|
inlineExtension: lazyExtensionNodeView('inlineExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags),
|
|
297
297
|
multiBodiedExtension: lazyExtensionNodeView('multiBodiedExtension', portalProviderAPI, eventDispatcher, providerFactory, extensionHandlers, extensionNodeViewOptions, pluginInjectionApi, macroInteractionDesignFeatureFlags)
|
|
@@ -7,12 +7,10 @@ import { Fragment, lazy, Suspense, useMemo } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { injectIntl } from 'react-intl-next';
|
|
10
|
-
import Loadable from 'react-loadable';
|
|
11
10
|
import { IconButton } from '@atlaskit/button/new';
|
|
12
11
|
import { configPanelMessages as messages } from '@atlaskit/editor-common/extensions';
|
|
13
12
|
import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
|
|
14
13
|
import CrossIcon from '@atlaskit/icon/glyph/cross';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
14
|
import { Box, Text, xcss } from '@atlaskit/primitives';
|
|
17
15
|
import { N200 } from '@atlaskit/theme/colors';
|
|
18
16
|
import { borderRadius } from '@atlaskit/theme/constants';
|
|
@@ -91,23 +89,15 @@ var Header = function Header(_ref) {
|
|
|
91
89
|
onClose = _ref.onClose,
|
|
92
90
|
intl = _ref.intl;
|
|
93
91
|
var ResolvedIcon = useMemo(function () {
|
|
94
|
-
|
|
95
|
-
return
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
};
|
|
103
|
-
});
|
|
92
|
+
return /*#__PURE__*/lazy(function () {
|
|
93
|
+
return icon().then(function (Cmp) {
|
|
94
|
+
if ('default' in Cmp) {
|
|
95
|
+
return Cmp;
|
|
96
|
+
}
|
|
97
|
+
return {
|
|
98
|
+
default: Cmp
|
|
99
|
+
};
|
|
104
100
|
});
|
|
105
|
-
}
|
|
106
|
-
return Loadable({
|
|
107
|
-
loader: icon,
|
|
108
|
-
loading: function loading() {
|
|
109
|
-
return null;
|
|
110
|
-
}
|
|
111
101
|
});
|
|
112
102
|
}, [icon]);
|
|
113
103
|
return jsx(Fragment, null, jsx("div", {
|
|
@@ -9,7 +9,7 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
10
|
import { createCommand, getPluginState } from '../plugin-factory';
|
|
11
11
|
import { pluginKey } from '../plugin-key';
|
|
12
|
-
import type { ExtensionPlugin } from '../types';
|
|
12
|
+
import type { ExtensionPlugin, ExtensionPluginOptions } from '../types';
|
|
13
13
|
export declare const createExtensionProviderHandler: (view: EditorView) => (name: string, provider?: Promise<ExtensionProvider>) => Promise<void>;
|
|
14
14
|
export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandlers, applyChange, }: {
|
|
15
15
|
view: EditorView;
|
|
@@ -20,5 +20,5 @@ export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandle
|
|
|
20
20
|
}) => true | undefined;
|
|
21
21
|
declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginInjectionApi: ExtractInjectionAPI<ExtensionPlugin> | undefined, useLongPressSelection?: boolean, options?: {
|
|
22
22
|
appearance?: EditorAppearance;
|
|
23
|
-
}, featureFlags?: FeatureFlags, allowDragAndDrop?: boolean,
|
|
23
|
+
}, featureFlags?: FeatureFlags, allowDragAndDrop?: boolean, __rendererExtensionOptions?: ExtensionPluginOptions['__rendererExtensionOptions']) => SafePlugin<import("../types").ExtensionState>;
|
|
24
24
|
export { pluginKey, createPlugin, createCommand, getPluginState };
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
1
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
3
|
import type { ExtensionAPI, ExtensionHandlers, ExtensionProvider, Parameters, TransformAfter, TransformBefore, UpdateExtension } from '@atlaskit/editor-common/extensions';
|
|
3
4
|
import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -42,7 +43,10 @@ export interface ExtensionPluginOptions extends LongPressSelectionPluginOptions
|
|
|
42
43
|
extensionHandlers?: ExtensionHandlers;
|
|
43
44
|
appearance?: EditorAppearance;
|
|
44
45
|
allowDragAndDrop?: boolean;
|
|
45
|
-
|
|
46
|
+
__rendererExtensionOptions?: {
|
|
47
|
+
rendererExtensionHandlers?: ExtensionHandlers;
|
|
48
|
+
isAllowedToUseRendererView: (node: ADFEntity) => boolean;
|
|
49
|
+
};
|
|
46
50
|
}
|
|
47
51
|
type InsertMacroFromMacroBrowser = (macroProvider: MacroProvider, macroNode?: PmNode, isEditing?: boolean) => (view: EditorView) => Promise<boolean>;
|
|
48
52
|
export type RunMacroAutoConvert = (state: EditorState, text: string) => PmNode | null;
|
|
@@ -9,7 +9,7 @@ import type { EditorState } from '@atlaskit/editor-prosemirror/state';
|
|
|
9
9
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
10
10
|
import { createCommand, getPluginState } from '../plugin-factory';
|
|
11
11
|
import { pluginKey } from '../plugin-key';
|
|
12
|
-
import type { ExtensionPlugin } from '../types';
|
|
12
|
+
import type { ExtensionPlugin, ExtensionPluginOptions } from '../types';
|
|
13
13
|
export declare const createExtensionProviderHandler: (view: EditorView) => (name: string, provider?: Promise<ExtensionProvider>) => Promise<void>;
|
|
14
14
|
export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandlers, applyChange, }: {
|
|
15
15
|
view: EditorView;
|
|
@@ -20,5 +20,5 @@ export declare const handleUpdate: ({ view, prevState, domAtPos, extensionHandle
|
|
|
20
20
|
}) => true | undefined;
|
|
21
21
|
declare const createPlugin: (dispatch: Dispatch, providerFactory: ProviderFactory, extensionHandlers: ExtensionHandlers, portalProviderAPI: PortalProviderAPI, eventDispatcher: EventDispatcher, pluginInjectionApi: ExtractInjectionAPI<ExtensionPlugin> | undefined, useLongPressSelection?: boolean, options?: {
|
|
22
22
|
appearance?: EditorAppearance;
|
|
23
|
-
}, featureFlags?: FeatureFlags, allowDragAndDrop?: boolean,
|
|
23
|
+
}, featureFlags?: FeatureFlags, allowDragAndDrop?: boolean, __rendererExtensionOptions?: ExtensionPluginOptions['__rendererExtensionOptions']) => SafePlugin<import("../types").ExtensionState>;
|
|
24
24
|
export { pluginKey, createPlugin, createCommand, getPluginState };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ADFEntity } from '@atlaskit/adf-utils/types';
|
|
1
2
|
import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
|
|
2
3
|
import type { ExtensionAPI, ExtensionHandlers, ExtensionProvider, Parameters, TransformAfter, TransformBefore, UpdateExtension } from '@atlaskit/editor-common/extensions';
|
|
3
4
|
import type { MacroProvider } from '@atlaskit/editor-common/provider-factory';
|
|
@@ -42,7 +43,10 @@ export interface ExtensionPluginOptions extends LongPressSelectionPluginOptions
|
|
|
42
43
|
extensionHandlers?: ExtensionHandlers;
|
|
43
44
|
appearance?: EditorAppearance;
|
|
44
45
|
allowDragAndDrop?: boolean;
|
|
45
|
-
|
|
46
|
+
__rendererExtensionOptions?: {
|
|
47
|
+
rendererExtensionHandlers?: ExtensionHandlers;
|
|
48
|
+
isAllowedToUseRendererView: (node: ADFEntity) => boolean;
|
|
49
|
+
};
|
|
46
50
|
}
|
|
47
51
|
type InsertMacroFromMacroBrowser = (macroProvider: MacroProvider, macroNode?: PmNode, isEditing?: boolean) => (view: EditorView) => Promise<boolean>;
|
|
48
52
|
export type RunMacroAutoConvert = (state: EditorState, text: string) => PmNode | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-extension",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "editor-plugin-extension plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@atlaskit/button": "^20.3.0",
|
|
31
31
|
"@atlaskit/checkbox": "^15.2.0",
|
|
32
32
|
"@atlaskit/datetime-picker": "^15.9.0",
|
|
33
|
-
"@atlaskit/editor-common": "^
|
|
33
|
+
"@atlaskit/editor-common": "^96.2.0",
|
|
34
34
|
"@atlaskit/editor-json-transformer": "^8.21.0",
|
|
35
35
|
"@atlaskit/editor-plugin-analytics": "^1.10.0",
|
|
36
36
|
"@atlaskit/editor-plugin-context-identifier": "^1.3.0",
|
|
@@ -49,14 +49,14 @@
|
|
|
49
49
|
"@atlaskit/primitives": "^13.3.0",
|
|
50
50
|
"@atlaskit/radio": "^6.6.0",
|
|
51
51
|
"@atlaskit/section-message": "^6.8.0",
|
|
52
|
-
"@atlaskit/select": "^18.
|
|
52
|
+
"@atlaskit/select": "^18.8.0",
|
|
53
53
|
"@atlaskit/smart-user-picker": "^6.11.0",
|
|
54
54
|
"@atlaskit/spinner": "^16.3.0",
|
|
55
|
-
"@atlaskit/tabs": "^
|
|
56
|
-
"@atlaskit/textarea": "^5.
|
|
57
|
-
"@atlaskit/textfield": "^6.
|
|
55
|
+
"@atlaskit/tabs": "^17.0.0",
|
|
56
|
+
"@atlaskit/textarea": "^5.7.0",
|
|
57
|
+
"@atlaskit/textfield": "^6.7.0",
|
|
58
58
|
"@atlaskit/theme": "^14.0.0",
|
|
59
|
-
"@atlaskit/tmp-editor-statsig": "^2.
|
|
59
|
+
"@atlaskit/tmp-editor-statsig": "^2.23.0",
|
|
60
60
|
"@atlaskit/toggle": "^13.4.0",
|
|
61
61
|
"@atlaskit/tokens": "^2.4.0",
|
|
62
62
|
"@atlaskit/tooltip": "^18.9.0",
|
|
@@ -112,9 +112,6 @@
|
|
|
112
112
|
},
|
|
113
113
|
"platform_editor_legacy_content_macro": {
|
|
114
114
|
"type": "boolean"
|
|
115
|
-
},
|
|
116
|
-
"platform_editor_react18_phase2_loadable": {
|
|
117
|
-
"type": "boolean"
|
|
118
115
|
}
|
|
119
116
|
},
|
|
120
117
|
"stricter": {
|