@atlaskit/editor-core 189.0.5 → 189.0.9
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 +12 -0
- package/dist/cjs/{labs/CollapsedEditor → CollapsedEditor}/index.js +2 -2
- package/dist/cjs/{labs/EditorWithActions → EditorWithActions}/index.js +3 -3
- package/dist/cjs/create-editor/create-preset.js +1 -1
- package/dist/cjs/editor.js +1 -1
- package/dist/cjs/labs-next.js +1 -1
- package/dist/cjs/plugins/extension/ui/Extension/Extension/index.js +8 -1
- package/dist/cjs/preset-default.js +1 -1
- package/dist/cjs/preset-universal.js +1 -1
- package/dist/cjs/{labs/next/presets → presets}/default.js +7 -7
- package/dist/cjs/{labs/next/presets → presets}/universal.js +2 -2
- package/dist/cjs/{labs/next/presets → presets}/useUniversalPreset.js +2 -2
- package/dist/cjs/ui/CollapsedEditor/index.js +1 -1
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/{labs/CollapsedEditor → CollapsedEditor}/index.js +2 -2
- package/dist/es2019/{labs/EditorWithActions → EditorWithActions}/index.js +3 -3
- package/dist/es2019/create-editor/create-preset.js +1 -1
- package/dist/es2019/editor.js +1 -1
- package/dist/es2019/labs-next.js +1 -1
- package/dist/es2019/plugins/extension/ui/Extension/Extension/index.js +8 -1
- package/dist/es2019/preset-default.js +1 -1
- package/dist/es2019/preset-universal.js +1 -1
- package/dist/es2019/{labs/next/presets → presets}/default.js +7 -7
- package/dist/es2019/{labs/next/presets → presets}/universal.js +2 -2
- package/dist/es2019/{labs/next/presets → presets}/useUniversalPreset.js +2 -2
- package/dist/es2019/ui/CollapsedEditor/index.js +1 -1
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/{labs/CollapsedEditor → CollapsedEditor}/index.js +2 -2
- package/dist/esm/{labs/EditorWithActions → EditorWithActions}/index.js +3 -3
- package/dist/esm/create-editor/create-preset.js +1 -1
- package/dist/esm/editor.js +1 -1
- package/dist/esm/labs-next.js +1 -1
- package/dist/esm/plugins/extension/ui/Extension/Extension/index.js +8 -1
- package/dist/esm/preset-default.js +1 -1
- package/dist/esm/preset-universal.js +1 -1
- package/dist/esm/{labs/next/presets → presets}/default.js +7 -7
- package/dist/esm/{labs/next/presets → presets}/universal.js +2 -2
- package/dist/esm/{labs/next/presets → presets}/useUniversalPreset.js +2 -2
- package/dist/esm/ui/CollapsedEditor/index.js +1 -1
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/{labs/CollapsedEditor → CollapsedEditor}/index.d.ts +1 -1
- package/dist/{types-ts4.5/labs → types}/EditorWithActions/index.d.ts +2 -2
- package/dist/types/create-editor/create-plugins-list.d.ts +2 -2
- package/dist/types/labs-next.d.ts +1 -1
- package/dist/types/preset-default.d.ts +1 -1
- package/dist/types/preset-universal.d.ts +1 -1
- package/dist/types/{labs/next/presets → presets}/default.d.ts +4 -4
- package/dist/types/{labs/next/presets → presets}/types.d.ts +1 -1
- package/dist/types/{labs/next/presets → presets}/universal.d.ts +2 -2
- package/dist/types/{labs/next/presets → presets}/useUniversalPreset.d.ts +1 -1
- package/dist/types-ts4.5/{labs/CollapsedEditor → CollapsedEditor}/index.d.ts +1 -1
- package/dist/{types/labs → types-ts4.5}/EditorWithActions/index.d.ts +2 -2
- package/dist/types-ts4.5/create-editor/create-plugins-list.d.ts +2 -2
- package/dist/types-ts4.5/labs-next.d.ts +1 -1
- package/dist/types-ts4.5/preset-default.d.ts +1 -1
- package/dist/types-ts4.5/preset-universal.d.ts +1 -1
- package/dist/types-ts4.5/{labs/next/presets → presets}/default.d.ts +4 -4
- package/dist/types-ts4.5/{labs/next/presets → presets}/types.d.ts +1 -1
- package/dist/types-ts4.5/{labs/next/presets → presets}/universal.d.ts +2 -2
- package/dist/types-ts4.5/{labs/next/presets → presets}/useUniversalPreset.d.ts +1 -1
- package/package.json +6 -3
- /package/dist/cjs/{labs/next/presets → presets}/types.js +0 -0
- /package/dist/es2019/{labs/next/presets → presets}/types.js +0 -0
- /package/dist/esm/{labs/next/presets → presets}/types.js +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 189.0.9
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#42137](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/42137) [`88058fc0fcb`](https://bitbucket.org/atlassian/atlassian-frontend/commits/88058fc0fcb) - ED-20197 moved editor preset and other prod code out of labs
|
|
8
|
+
|
|
9
|
+
## 189.0.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#41805](https://bitbucket.org/atlassian/atlassian-frontend/pull-requests/41805) [`2d24da18c8e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2d24da18c8e) - ED-20043: Added feature flag for Editor Multi-bodied extension feature
|
|
14
|
+
|
|
3
15
|
## 189.0.5
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -15,7 +15,7 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
15
15
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
16
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
17
17
|
var _react = _interopRequireDefault(require("react"));
|
|
18
|
-
var _ChromeCollapsed = _interopRequireDefault(require("
|
|
18
|
+
var _ChromeCollapsed = _interopRequireDefault(require("../ui/ChromeCollapsed"));
|
|
19
19
|
var _excluded = ["Editor"];
|
|
20
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
21
21
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -48,7 +48,7 @@ var CollapsedEditor = exports.default = /*#__PURE__*/function (_React$Component)
|
|
|
48
48
|
value: function loadEditorModules() {
|
|
49
49
|
var _this2 = this;
|
|
50
50
|
Promise.resolve().then(function () {
|
|
51
|
-
return _interopRequireWildcard(require( /* webpackChunkName:"@atlaskit-internal_editor-core-async" */'
|
|
51
|
+
return _interopRequireWildcard(require( /* webpackChunkName:"@atlaskit-internal_editor-core-async" */'../'));
|
|
52
52
|
}).then(function (modules) {
|
|
53
53
|
CollapsedEditor.editorModules = modules;
|
|
54
54
|
_this2.setState({
|
|
@@ -15,9 +15,9 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
15
15
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
18
|
-
var _editor = _interopRequireDefault(require("
|
|
19
|
-
var _EditorContext = _interopRequireDefault(require("
|
|
20
|
-
var _WithEditorActions = _interopRequireDefault(require("
|
|
18
|
+
var _editor = _interopRequireDefault(require("../editor"));
|
|
19
|
+
var _EditorContext = _interopRequireDefault(require("../ui/EditorContext"));
|
|
20
|
+
var _WithEditorActions = _interopRequireDefault(require("../ui/WithEditorActions"));
|
|
21
21
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
22
22
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
23
|
var EditorWithActions = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.createPreset = createPreset;
|
|
8
|
-
var _universal = _interopRequireDefault(require("../
|
|
8
|
+
var _universal = _interopRequireDefault(require("../presets/universal"));
|
|
9
9
|
var _createPluginsList = require("./create-plugins-list");
|
|
10
10
|
var _featureFlagsFromProps = require("./feature-flags-from-props");
|
|
11
11
|
// Separate file, we should not accidentally import this into the `ComposableEditor`
|
package/dist/cjs/editor.js
CHANGED
|
@@ -16,7 +16,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
17
|
var _editorDeprecationWarnings = _interopRequireDefault(require("./utils/editorDeprecationWarnings"));
|
|
18
18
|
var _composableEditor = require("./composable-editor");
|
|
19
|
-
var _useUniversalPreset = _interopRequireDefault(require("./
|
|
19
|
+
var _useUniversalPreset = _interopRequireDefault(require("./presets/useUniversalPreset"));
|
|
20
20
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
21
21
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
|
|
22
22
|
var ComposableEditorWrapper = function ComposableEditorWrapper(_ref) {
|
package/dist/cjs/labs-next.js
CHANGED
|
@@ -17,6 +17,7 @@ var _styles2 = require("../styles");
|
|
|
17
17
|
var _Lozenge = _interopRequireDefault(require("../Lozenge"));
|
|
18
18
|
var _classnames2 = _interopRequireDefault(require("classnames"));
|
|
19
19
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
20
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
20
21
|
var _withPluginState = require("@atlaskit/editor-common/with-plugin-state");
|
|
21
22
|
var _excluded = ["type"];
|
|
22
23
|
/** @jsx jsx */
|
|
@@ -34,7 +35,13 @@ function ExtensionWithPluginState(props) {
|
|
|
34
35
|
shadowClassNames = props.shadowClassNames,
|
|
35
36
|
hideFrame = props.hideFrame,
|
|
36
37
|
editorAppearance = props.editorAppearance;
|
|
37
|
-
var
|
|
38
|
+
var isMultiBodiedExtension = false;
|
|
39
|
+
if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.multi-bodied-extension_0rygg')) {
|
|
40
|
+
isMultiBodiedExtension = true;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
//TODO: clean-up after removing multi-bodied-extension FF
|
|
44
|
+
var hasBody = node.type.name === 'bodiedExtension' || isMultiBodiedExtension && node.type.name === 'multiBodiedExtension';
|
|
38
45
|
var isMobile = editorAppearance === 'mobile';
|
|
39
46
|
var hasChildren = !!children;
|
|
40
47
|
var removeBorder = hideFrame && !isMobile && !hasBody || false;
|
|
@@ -10,4 +10,4 @@ Object.defineProperty(exports, "useUniversalPreset", {
|
|
|
10
10
|
return _useUniversalPreset.default;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
-
var _useUniversalPreset = _interopRequireDefault(require("./
|
|
13
|
+
var _useUniversalPreset = _interopRequireDefault(require("./presets/useUniversalPreset"));
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.createDefaultPreset = createDefaultPreset;
|
|
8
8
|
exports.useDefaultPreset = useDefaultPreset;
|
|
9
|
-
var _paste = _interopRequireDefault(require("
|
|
9
|
+
var _paste = _interopRequireDefault(require("../plugins/paste"));
|
|
10
10
|
var _editorPluginBlockType = require("@atlaskit/editor-plugin-block-type");
|
|
11
|
-
var _clearMarksOnChangeToEmptyDocument = _interopRequireDefault(require("
|
|
11
|
+
var _clearMarksOnChangeToEmptyDocument = _interopRequireDefault(require("../plugins/clear-marks-on-change-to-empty-document"));
|
|
12
12
|
var _editorPluginHyperlink = require("@atlaskit/editor-plugin-hyperlink");
|
|
13
13
|
var _editorPluginTextFormatting = require("@atlaskit/editor-plugin-text-formatting");
|
|
14
14
|
var _editorPluginBetterTypeHistory = require("@atlaskit/editor-plugin-better-type-history");
|
|
@@ -19,20 +19,20 @@ var _editorPluginFocus = require("@atlaskit/editor-plugin-focus");
|
|
|
19
19
|
var _editorPluginEditorDisabled = require("@atlaskit/editor-plugin-editor-disabled");
|
|
20
20
|
var _editorPluginTypeAhead = require("@atlaskit/editor-plugin-type-ahead");
|
|
21
21
|
var _editorPluginSubmitEditor = require("@atlaskit/editor-plugin-submit-editor");
|
|
22
|
-
var _fakeTextCursor = _interopRequireDefault(require("
|
|
22
|
+
var _fakeTextCursor = _interopRequireDefault(require("../plugins/fake-text-cursor"));
|
|
23
23
|
var _editorPluginFeatureFlags = require("@atlaskit/editor-plugin-feature-flags");
|
|
24
24
|
var _editorPluginCopyButton = require("@atlaskit/editor-plugin-copy-button");
|
|
25
25
|
var _editorPluginFloatingToolbar = require("@atlaskit/editor-plugin-floating-toolbar");
|
|
26
26
|
var _editorPluginClipboard = require("@atlaskit/editor-plugin-clipboard");
|
|
27
|
-
var _plugins = require("
|
|
27
|
+
var _plugins = require("../plugins");
|
|
28
28
|
var _editorPluginAnalytics = require("@atlaskit/editor-plugin-analytics");
|
|
29
29
|
var _editorPluginPlaceholder = require("@atlaskit/editor-plugin-placeholder");
|
|
30
|
-
var _annotation = _interopRequireDefault(require("
|
|
30
|
+
var _annotation = _interopRequireDefault(require("../plugins/annotation"));
|
|
31
31
|
var _editorPluginComposition = require("@atlaskit/editor-plugin-composition");
|
|
32
32
|
var _editorPluginQuickInsert = require("@atlaskit/editor-plugin-quick-insert");
|
|
33
33
|
var _editorPluginSelection = require("@atlaskit/editor-plugin-selection");
|
|
34
|
-
var _codeBlock = _interopRequireDefault(require("
|
|
35
|
-
var _undoRedo = _interopRequireDefault(require("
|
|
34
|
+
var _codeBlock = _interopRequireDefault(require("../plugins/code-block"));
|
|
35
|
+
var _undoRedo = _interopRequireDefault(require("../plugins/undo-redo"));
|
|
36
36
|
var _editorPluginDecorations = require("@atlaskit/editor-plugin-decorations");
|
|
37
37
|
var _preset = require("@atlaskit/editor-common/preset");
|
|
38
38
|
// #region Imports
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.default = createUniversalPreset;
|
|
8
8
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
-
var _plugins = require("
|
|
10
|
+
var _plugins = require("../plugins");
|
|
11
11
|
var _editorPluginHistory = require("@atlaskit/editor-plugin-history");
|
|
12
12
|
var _editorPluginStatus = require("@atlaskit/editor-plugin-status");
|
|
13
13
|
var _editorPluginDate = require("@atlaskit/editor-plugin-date");
|
|
@@ -31,7 +31,7 @@ var _editorPluginSaveOnEnter = require("@atlaskit/editor-plugin-save-on-enter");
|
|
|
31
31
|
var _editorPluginScrollIntoView = require("@atlaskit/editor-plugin-scroll-into-view");
|
|
32
32
|
var _editorPluginMentions = require("@atlaskit/editor-plugin-mentions");
|
|
33
33
|
var _editorPluginSelectionToolbar = require("@atlaskit/editor-plugin-selection-toolbar");
|
|
34
|
-
var _isFullPage = require("
|
|
34
|
+
var _isFullPage = require("../utils/is-full-page");
|
|
35
35
|
var _mediaCommon = require("@atlaskit/media-common");
|
|
36
36
|
var _default = require("./default");
|
|
37
37
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
@@ -8,8 +8,8 @@ exports.default = useUniversalPreset;
|
|
|
8
8
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
11
|
-
var _createPreset = require("
|
|
12
|
-
var _presetUtils = require("
|
|
11
|
+
var _createPreset = require("../create-editor/create-preset");
|
|
12
|
+
var _presetUtils = require("../create-editor/preset-utils");
|
|
13
13
|
function useUniversalPreset(_ref) {
|
|
14
14
|
var props = _ref.props;
|
|
15
15
|
var previousEditorProps = (0, _hooks.usePreviousState)(props);
|
|
@@ -16,7 +16,7 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
16
16
|
var _react = _interopRequireDefault(require("react"));
|
|
17
17
|
var _editor = _interopRequireDefault(require("../../editor"));
|
|
18
18
|
var _composableEditor = require("../../composable-editor");
|
|
19
|
-
var _EditorWithActions = _interopRequireDefault(require("../../
|
|
19
|
+
var _EditorWithActions = _interopRequireDefault(require("../../EditorWithActions"));
|
|
20
20
|
var _ChromeCollapsed = _interopRequireDefault(require("../ChromeCollapsed"));
|
|
21
21
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
22
22
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.nextMajorVersion = exports.name = void 0;
|
|
7
7
|
var name = exports.name = "@atlaskit/editor-core";
|
|
8
|
-
var version = exports.version = "189.0.
|
|
8
|
+
var version = exports.version = "189.0.9";
|
|
9
9
|
var nextMajorVersion = exports.nextMajorVersion = function nextMajorVersion() {
|
|
10
10
|
return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
|
|
11
11
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import ChromeCollapsed from '
|
|
3
|
+
import ChromeCollapsed from '../ui/ChromeCollapsed';
|
|
4
4
|
export default class CollapsedEditor extends React.Component {
|
|
5
5
|
constructor(...args) {
|
|
6
6
|
super(...args);
|
|
@@ -14,7 +14,7 @@ export default class CollapsedEditor extends React.Component {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
loadEditorModules() {
|
|
17
|
-
import( /* webpackChunkName:"@atlaskit-internal_editor-core-async" */'
|
|
17
|
+
import( /* webpackChunkName:"@atlaskit-internal_editor-core-async" */'../').then(modules => {
|
|
18
18
|
CollapsedEditor.editorModules = modules;
|
|
19
19
|
this.setState({
|
|
20
20
|
editorModules: modules
|
|
@@ -2,9 +2,9 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
-
import Editor from '
|
|
6
|
-
import EditorContext from '
|
|
7
|
-
import WithEditorActions from '
|
|
5
|
+
import Editor from '../editor';
|
|
6
|
+
import EditorContext from '../ui/EditorContext';
|
|
7
|
+
import WithEditorActions from '../ui/WithEditorActions';
|
|
8
8
|
export default class EditorWithActions extends React.Component {
|
|
9
9
|
constructor(...args) {
|
|
10
10
|
super(...args);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import createUniversalPreset from '../
|
|
1
|
+
import createUniversalPreset from '../presets/universal';
|
|
2
2
|
import { getDefaultPresetOptionsFromEditorProps } from './create-plugins-list';
|
|
3
3
|
import { createFeatureFlagsFromProps } from './feature-flags-from-props';
|
|
4
4
|
// Separate file, we should not accidentally import this into the `ComposableEditor`
|
package/dist/es2019/editor.js
CHANGED
|
@@ -5,7 +5,7 @@ import React from 'react';
|
|
|
5
5
|
import { jsx } from '@emotion/react';
|
|
6
6
|
import editorDeprecationWarnings from './utils/editorDeprecationWarnings';
|
|
7
7
|
import { ComposableEditor } from './composable-editor';
|
|
8
|
-
import useUniversalPreset from './
|
|
8
|
+
import useUniversalPreset from './presets/useUniversalPreset';
|
|
9
9
|
const ComposableEditorWrapper = ({
|
|
10
10
|
props
|
|
11
11
|
}) => {
|
package/dist/es2019/labs-next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultPreset } from './
|
|
1
|
+
export { createDefaultPreset } from './presets/default';
|
|
@@ -10,6 +10,7 @@ import { overlay } from '../styles';
|
|
|
10
10
|
import ExtensionLozenge from '../Lozenge';
|
|
11
11
|
import classnames from 'classnames';
|
|
12
12
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
13
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
13
14
|
function ExtensionWithPluginState(props) {
|
|
14
15
|
const {
|
|
15
16
|
node,
|
|
@@ -23,7 +24,13 @@ function ExtensionWithPluginState(props) {
|
|
|
23
24
|
hideFrame,
|
|
24
25
|
editorAppearance
|
|
25
26
|
} = props;
|
|
26
|
-
|
|
27
|
+
let isMultiBodiedExtension = false;
|
|
28
|
+
if (getBooleanFF('platform.editor.multi-bodied-extension_0rygg')) {
|
|
29
|
+
isMultiBodiedExtension = true;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
//TODO: clean-up after removing multi-bodied-extension FF
|
|
33
|
+
const hasBody = node.type.name === 'bodiedExtension' || isMultiBodiedExtension && node.type.name === 'multiBodiedExtension';
|
|
27
34
|
const isMobile = editorAppearance === 'mobile';
|
|
28
35
|
const hasChildren = !!children;
|
|
29
36
|
const removeBorder = hideFrame && !isMobile && !hasBody || false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultPreset } from './
|
|
1
|
+
export { createDefaultPreset } from './presets/default';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as useUniversalPreset } from './
|
|
1
|
+
export { default as useUniversalPreset } from './presets/useUniversalPreset';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// #region Imports
|
|
2
2
|
|
|
3
|
-
import pastePlugin from '
|
|
3
|
+
import pastePlugin from '../plugins/paste';
|
|
4
4
|
import { blockTypePlugin } from '@atlaskit/editor-plugin-block-type';
|
|
5
|
-
import clearMarksOnChangeToEmptyDocumentPlugin from '
|
|
5
|
+
import clearMarksOnChangeToEmptyDocumentPlugin from '../plugins/clear-marks-on-change-to-empty-document';
|
|
6
6
|
import { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
7
7
|
import { textFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
|
|
8
8
|
import { betterTypeHistoryPlugin } from '@atlaskit/editor-plugin-better-type-history';
|
|
@@ -13,20 +13,20 @@ import { focusPlugin } from '@atlaskit/editor-plugin-focus';
|
|
|
13
13
|
import { editorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
14
14
|
import { typeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
15
15
|
import { submitEditorPlugin } from '@atlaskit/editor-plugin-submit-editor';
|
|
16
|
-
import fakeTextCursorPlugin from '
|
|
16
|
+
import fakeTextCursorPlugin from '../plugins/fake-text-cursor';
|
|
17
17
|
import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
18
18
|
import { copyButtonPlugin } from '@atlaskit/editor-plugin-copy-button';
|
|
19
19
|
import { floatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
20
20
|
import { clipboardPlugin } from '@atlaskit/editor-plugin-clipboard';
|
|
21
|
-
import { analyticsPlugin as deprecatedAnalyticsPlugin } from '
|
|
21
|
+
import { analyticsPlugin as deprecatedAnalyticsPlugin } from '../plugins';
|
|
22
22
|
import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
23
23
|
import { placeholderPlugin } from '@atlaskit/editor-plugin-placeholder';
|
|
24
|
-
import annotationPlugin from '
|
|
24
|
+
import annotationPlugin from '../plugins/annotation';
|
|
25
25
|
import { compositionPlugin } from '@atlaskit/editor-plugin-composition';
|
|
26
26
|
import { quickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
27
27
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
28
|
-
import codeBlockPlugin from '
|
|
29
|
-
import undoRedoPlugin from '
|
|
28
|
+
import codeBlockPlugin from '../plugins/code-block';
|
|
29
|
+
import undoRedoPlugin from '../plugins/undo-redo';
|
|
30
30
|
import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
31
31
|
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
32
32
|
// #endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, panelPlugin, placeholderTextPlugin, tasksAndDecisionsPlugin, textColorPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '
|
|
1
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, panelPlugin, placeholderTextPlugin, tasksAndDecisionsPlugin, textColorPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
|
|
2
2
|
import { historyPlugin } from '@atlaskit/editor-plugin-history';
|
|
3
3
|
import { statusPlugin } from '@atlaskit/editor-plugin-status';
|
|
4
4
|
import { datePlugin } from '@atlaskit/editor-plugin-date';
|
|
@@ -22,7 +22,7 @@ import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
|
|
|
22
22
|
import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
|
|
23
23
|
import { mentionsPlugin } from '@atlaskit/editor-plugin-mentions';
|
|
24
24
|
import { selectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
25
|
-
import { isFullPage as fullPageCheck } from '
|
|
25
|
+
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
26
26
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
27
27
|
import { createDefaultPreset } from './default';
|
|
28
28
|
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useLayoutEffect, useState } from 'react';
|
|
2
2
|
import { usePreviousState } from '@atlaskit/editor-common/hooks';
|
|
3
|
-
import { createPreset } from '
|
|
4
|
-
import { shouldRecreatePreset } from '
|
|
3
|
+
import { createPreset } from '../create-editor/create-preset';
|
|
4
|
+
import { shouldRecreatePreset } from '../create-editor/preset-utils';
|
|
5
5
|
export default function useUniversalPreset({
|
|
6
6
|
props
|
|
7
7
|
}) {
|
|
@@ -3,7 +3,7 @@ import { IntlProviderIfMissingWrapper } from '@atlaskit/editor-common/ui';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Editor from '../../editor';
|
|
5
5
|
import { ComposableEditor } from '../../composable-editor';
|
|
6
|
-
import EditorWithActions from '../../
|
|
6
|
+
import EditorWithActions from '../../EditorWithActions';
|
|
7
7
|
import ChromeCollapsed from '../ChromeCollapsed';
|
|
8
8
|
export default class CollapsedEditor extends React.Component {
|
|
9
9
|
constructor(...args) {
|
|
@@ -10,7 +10,7 @@ var _excluded = ["Editor"];
|
|
|
10
10
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
11
11
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import ChromeCollapsed from '
|
|
13
|
+
import ChromeCollapsed from '../ui/ChromeCollapsed';
|
|
14
14
|
var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
|
|
15
15
|
_inherits(CollapsedEditor, _React$Component);
|
|
16
16
|
var _super = _createSuper(CollapsedEditor);
|
|
@@ -37,7 +37,7 @@ var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
|
|
|
37
37
|
key: "loadEditorModules",
|
|
38
38
|
value: function loadEditorModules() {
|
|
39
39
|
var _this2 = this;
|
|
40
|
-
import( /* webpackChunkName:"@atlaskit-internal_editor-core-async" */'
|
|
40
|
+
import( /* webpackChunkName:"@atlaskit-internal_editor-core-async" */'../').then(function (modules) {
|
|
41
41
|
CollapsedEditor.editorModules = modules;
|
|
42
42
|
_this2.setState({
|
|
43
43
|
editorModules: modules
|
|
@@ -10,9 +10,9 @@ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflec
|
|
|
10
10
|
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import PropTypes from 'prop-types';
|
|
13
|
-
import Editor from '
|
|
14
|
-
import EditorContext from '
|
|
15
|
-
import WithEditorActions from '
|
|
13
|
+
import Editor from '../editor';
|
|
14
|
+
import EditorContext from '../ui/EditorContext';
|
|
15
|
+
import WithEditorActions from '../ui/WithEditorActions';
|
|
16
16
|
var EditorWithActions = /*#__PURE__*/function (_React$Component) {
|
|
17
17
|
_inherits(EditorWithActions, _React$Component);
|
|
18
18
|
var _super = _createSuper(EditorWithActions);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import createUniversalPreset from '../
|
|
1
|
+
import createUniversalPreset from '../presets/universal';
|
|
2
2
|
import { getDefaultPresetOptionsFromEditorProps } from './create-plugins-list';
|
|
3
3
|
import { createFeatureFlagsFromProps } from './feature-flags-from-props';
|
|
4
4
|
// Separate file, we should not accidentally import this into the `ComposableEditor`
|
package/dist/esm/editor.js
CHANGED
|
@@ -12,7 +12,7 @@ import React from 'react';
|
|
|
12
12
|
import { jsx } from '@emotion/react';
|
|
13
13
|
import editorDeprecationWarnings from './utils/editorDeprecationWarnings';
|
|
14
14
|
import { ComposableEditor } from './composable-editor';
|
|
15
|
-
import useUniversalPreset from './
|
|
15
|
+
import useUniversalPreset from './presets/useUniversalPreset';
|
|
16
16
|
var ComposableEditorWrapper = function ComposableEditorWrapper(_ref) {
|
|
17
17
|
var props = _ref.props;
|
|
18
18
|
var preset = useUniversalPreset({
|
package/dist/esm/labs-next.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultPreset } from './
|
|
1
|
+
export { createDefaultPreset } from './presets/default';
|
|
@@ -15,6 +15,7 @@ import { overlay } from '../styles';
|
|
|
15
15
|
import ExtensionLozenge from '../Lozenge';
|
|
16
16
|
import classnames from 'classnames';
|
|
17
17
|
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
18
|
+
import { getBooleanFF } from '@atlaskit/platform-feature-flags';
|
|
18
19
|
function ExtensionWithPluginState(props) {
|
|
19
20
|
var node = props.node,
|
|
20
21
|
handleContentDOMRef = props.handleContentDOMRef,
|
|
@@ -27,7 +28,13 @@ function ExtensionWithPluginState(props) {
|
|
|
27
28
|
shadowClassNames = props.shadowClassNames,
|
|
28
29
|
hideFrame = props.hideFrame,
|
|
29
30
|
editorAppearance = props.editorAppearance;
|
|
30
|
-
var
|
|
31
|
+
var isMultiBodiedExtension = false;
|
|
32
|
+
if (getBooleanFF('platform.editor.multi-bodied-extension_0rygg')) {
|
|
33
|
+
isMultiBodiedExtension = true;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
//TODO: clean-up after removing multi-bodied-extension FF
|
|
37
|
+
var hasBody = node.type.name === 'bodiedExtension' || isMultiBodiedExtension && node.type.name === 'multiBodiedExtension';
|
|
31
38
|
var isMobile = editorAppearance === 'mobile';
|
|
32
39
|
var hasChildren = !!children;
|
|
33
40
|
var removeBorder = hideFrame && !isMobile && !hasBody || false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultPreset } from './
|
|
1
|
+
export { createDefaultPreset } from './presets/default';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as useUniversalPreset } from './
|
|
1
|
+
export { default as useUniversalPreset } from './presets/useUniversalPreset';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
// #region Imports
|
|
2
2
|
|
|
3
|
-
import pastePlugin from '
|
|
3
|
+
import pastePlugin from '../plugins/paste';
|
|
4
4
|
import { blockTypePlugin } from '@atlaskit/editor-plugin-block-type';
|
|
5
|
-
import clearMarksOnChangeToEmptyDocumentPlugin from '
|
|
5
|
+
import clearMarksOnChangeToEmptyDocumentPlugin from '../plugins/clear-marks-on-change-to-empty-document';
|
|
6
6
|
import { hyperlinkPlugin } from '@atlaskit/editor-plugin-hyperlink';
|
|
7
7
|
import { textFormattingPlugin } from '@atlaskit/editor-plugin-text-formatting';
|
|
8
8
|
import { betterTypeHistoryPlugin } from '@atlaskit/editor-plugin-better-type-history';
|
|
@@ -13,20 +13,20 @@ import { focusPlugin } from '@atlaskit/editor-plugin-focus';
|
|
|
13
13
|
import { editorDisabledPlugin } from '@atlaskit/editor-plugin-editor-disabled';
|
|
14
14
|
import { typeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
15
15
|
import { submitEditorPlugin } from '@atlaskit/editor-plugin-submit-editor';
|
|
16
|
-
import fakeTextCursorPlugin from '
|
|
16
|
+
import fakeTextCursorPlugin from '../plugins/fake-text-cursor';
|
|
17
17
|
import { featureFlagsPlugin } from '@atlaskit/editor-plugin-feature-flags';
|
|
18
18
|
import { copyButtonPlugin } from '@atlaskit/editor-plugin-copy-button';
|
|
19
19
|
import { floatingToolbarPlugin } from '@atlaskit/editor-plugin-floating-toolbar';
|
|
20
20
|
import { clipboardPlugin } from '@atlaskit/editor-plugin-clipboard';
|
|
21
|
-
import { analyticsPlugin as deprecatedAnalyticsPlugin } from '
|
|
21
|
+
import { analyticsPlugin as deprecatedAnalyticsPlugin } from '../plugins';
|
|
22
22
|
import { analyticsPlugin } from '@atlaskit/editor-plugin-analytics';
|
|
23
23
|
import { placeholderPlugin } from '@atlaskit/editor-plugin-placeholder';
|
|
24
|
-
import annotationPlugin from '
|
|
24
|
+
import annotationPlugin from '../plugins/annotation';
|
|
25
25
|
import { compositionPlugin } from '@atlaskit/editor-plugin-composition';
|
|
26
26
|
import { quickInsertPlugin } from '@atlaskit/editor-plugin-quick-insert';
|
|
27
27
|
import { selectionPlugin } from '@atlaskit/editor-plugin-selection';
|
|
28
|
-
import codeBlockPlugin from '
|
|
29
|
-
import undoRedoPlugin from '
|
|
28
|
+
import codeBlockPlugin from '../plugins/code-block';
|
|
29
|
+
import undoRedoPlugin from '../plugins/undo-redo';
|
|
30
30
|
import { decorationsPlugin } from '@atlaskit/editor-plugin-decorations';
|
|
31
31
|
import { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
32
32
|
// #endregion
|
|
@@ -2,7 +2,7 @@ import _typeof from "@babel/runtime/helpers/typeof";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
|
-
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, panelPlugin, placeholderTextPlugin, tasksAndDecisionsPlugin, textColorPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '
|
|
5
|
+
import { breakoutPlugin, collabEditPlugin, dataConsumerMarkPlugin, extensionPlugin, fragmentMarkPlugin, insertBlockPlugin, jiraIssuePlugin, layoutPlugin, toolbarListsIndentationPlugin, macroPlugin, maxContentSizePlugin, panelPlugin, placeholderTextPlugin, tasksAndDecisionsPlugin, textColorPlugin, alignmentPlugin, indentationPlugin, customAutoformatPlugin, feedbackDialogPlugin, expandPlugin, isExpandInsertionEnabled, mobileDimensionsPlugin, findReplacePlugin, mobileSelectionPlugin, annotationPlugin, avatarGroupPlugin, viewUpdateSubscriptionPlugin, beforePrimaryToolbarPlugin, codeBidiWarningPlugin } from '../plugins';
|
|
6
6
|
import { historyPlugin } from '@atlaskit/editor-plugin-history';
|
|
7
7
|
import { statusPlugin } from '@atlaskit/editor-plugin-status';
|
|
8
8
|
import { datePlugin } from '@atlaskit/editor-plugin-date';
|
|
@@ -26,7 +26,7 @@ import { saveOnEnterPlugin } from '@atlaskit/editor-plugin-save-on-enter';
|
|
|
26
26
|
import { scrollIntoViewPlugin } from '@atlaskit/editor-plugin-scroll-into-view';
|
|
27
27
|
import { mentionsPlugin } from '@atlaskit/editor-plugin-mentions';
|
|
28
28
|
import { selectionToolbarPlugin } from '@atlaskit/editor-plugin-selection-toolbar';
|
|
29
|
-
import { isFullPage as fullPageCheck } from '
|
|
29
|
+
import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
30
30
|
import { getMediaFeatureFlag } from '@atlaskit/media-common';
|
|
31
31
|
import { createDefaultPreset } from './default';
|
|
32
32
|
import { shouldForceTracking } from '@atlaskit/editor-common/utils';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
2
|
import { useLayoutEffect, useState } from 'react';
|
|
3
3
|
import { usePreviousState } from '@atlaskit/editor-common/hooks';
|
|
4
|
-
import { createPreset } from '
|
|
5
|
-
import { shouldRecreatePreset } from '
|
|
4
|
+
import { createPreset } from '../create-editor/create-preset';
|
|
5
|
+
import { shouldRecreatePreset } from '../create-editor/preset-utils';
|
|
6
6
|
export default function useUniversalPreset(_ref) {
|
|
7
7
|
var props = _ref.props;
|
|
8
8
|
var previousEditorProps = usePreviousState(props);
|
|
@@ -11,7 +11,7 @@ import { IntlProviderIfMissingWrapper } from '@atlaskit/editor-common/ui';
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import Editor from '../../editor';
|
|
13
13
|
import { ComposableEditor } from '../../composable-editor';
|
|
14
|
-
import EditorWithActions from '../../
|
|
14
|
+
import EditorWithActions from '../../EditorWithActions';
|
|
15
15
|
import ChromeCollapsed from '../ChromeCollapsed';
|
|
16
16
|
var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
|
|
17
17
|
_inherits(CollapsedEditor, _React$Component);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { EditorProps } from '
|
|
4
|
-
import EditorActions from '
|
|
3
|
+
import type { EditorProps } from '../editor';
|
|
4
|
+
import type EditorActions from '../actions';
|
|
5
5
|
export interface EditorWithActionsPropsOverride extends EditorProps {
|
|
6
6
|
onSave?: any;
|
|
7
7
|
onChange?: any;
|
|
@@ -2,8 +2,8 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
2
2
|
import type { EditorPlugin, EditorProps } from '../types';
|
|
3
3
|
import type { EditorPluginFeatureProps } from '../types/editor-props';
|
|
4
4
|
import type { ScrollGutterPluginOptions } from '@atlaskit/editor-plugin-base';
|
|
5
|
-
import type { DefaultPresetPluginOptions } from '../
|
|
6
|
-
import type { EditorPresetProps } from '../
|
|
5
|
+
import type { DefaultPresetPluginOptions } from '../presets/default';
|
|
6
|
+
import type { EditorPresetProps } from '../presets/types';
|
|
7
7
|
import type { EditorPresetBuilder, EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
8
8
|
export declare function getScrollGutterOptions(props: EditorProps): ScrollGutterPluginOptions | undefined;
|
|
9
9
|
export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPresetProps & DefaultPresetPluginOptions & EditorPluginFeatureProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultPreset } from './
|
|
1
|
+
export { createDefaultPreset } from './presets/default';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultPreset } from './
|
|
1
|
+
export { createDefaultPreset } from './presets/default';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as useUniversalPreset } from './
|
|
1
|
+
export { default as useUniversalPreset } from './presets/useUniversalPreset';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import type { PastePluginOptions } from '
|
|
2
|
+
import type { PastePluginOptions } from '../plugins/paste';
|
|
3
3
|
import type { BasePluginOptions } from '@atlaskit/editor-plugin-base';
|
|
4
|
-
import type { EditorProps } from '
|
|
4
|
+
import type { EditorProps } from '../types/editor-props';
|
|
5
5
|
import type { EditorPresetProps } from './types';
|
|
6
6
|
import type { BlockTypePluginOptions } from '@atlaskit/editor-plugin-block-type';
|
|
7
7
|
import type { PlaceholderPluginOptions } from '@atlaskit/editor-plugin-placeholder';
|
|
8
|
-
import type { AnnotationProviders } from '
|
|
8
|
+
import type { AnnotationProviders } from '../plugins/annotation';
|
|
9
9
|
import type { TextFormattingOptions, HyperlinkPluginOptions, QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
|
|
10
|
-
import type { CodeBlockOptions } from '
|
|
10
|
+
import type { CodeBlockOptions } from '../plugins/code-block/types';
|
|
11
11
|
import type { SelectionPluginOptions } from '@atlaskit/editor-common/selection';
|
|
12
12
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
13
13
|
import type { TypeAheadPluginOptions } from '@atlaskit/editor-plugin-type-ahead';
|
|
@@ -2,8 +2,8 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
2
2
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { DefaultPresetPluginOptions } from './default';
|
|
4
4
|
import type { EditorPresetProps } from './types';
|
|
5
|
-
import type { EditorSharedPropsWithPlugins, EditorPluginFeatureProps, EditorProviderProps } from '
|
|
6
|
-
import type { FeatureFlags } from '
|
|
5
|
+
import type { EditorSharedPropsWithPlugins, EditorPluginFeatureProps, EditorProviderProps } from '../types/editor-props';
|
|
6
|
+
import type { FeatureFlags } from '../types/feature-flags';
|
|
7
7
|
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
8
8
|
type UniversalPresetProps = EditorPresetProps & DefaultPresetPluginOptions & EditorSharedPropsWithPlugins & EditorPluginFeatureProps & EditorProviderProps;
|
|
9
9
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { EditorProps } from '
|
|
4
|
-
import EditorActions from '
|
|
3
|
+
import type { EditorProps } from '../editor';
|
|
4
|
+
import type EditorActions from '../actions';
|
|
5
5
|
export interface EditorWithActionsPropsOverride extends EditorProps {
|
|
6
6
|
onSave?: any;
|
|
7
7
|
onChange?: any;
|
|
@@ -2,8 +2,8 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
2
2
|
import type { EditorPlugin, EditorProps } from '../types';
|
|
3
3
|
import type { EditorPluginFeatureProps } from '../types/editor-props';
|
|
4
4
|
import type { ScrollGutterPluginOptions } from '@atlaskit/editor-plugin-base';
|
|
5
|
-
import type { DefaultPresetPluginOptions } from '../
|
|
6
|
-
import type { EditorPresetProps } from '../
|
|
5
|
+
import type { DefaultPresetPluginOptions } from '../presets/default';
|
|
6
|
+
import type { EditorPresetProps } from '../presets/types';
|
|
7
7
|
import type { EditorPresetBuilder, EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
8
8
|
export declare function getScrollGutterOptions(props: EditorProps): ScrollGutterPluginOptions | undefined;
|
|
9
9
|
export declare function getDefaultPresetOptionsFromEditorProps(props: EditorProps, createAnalyticsEvent?: CreateUIAnalyticsEvent): EditorPresetProps & DefaultPresetPluginOptions & EditorPluginFeatureProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultPreset } from './
|
|
1
|
+
export { createDefaultPreset } from './presets/default';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDefaultPreset } from './
|
|
1
|
+
export { createDefaultPreset } from './presets/default';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as useUniversalPreset } from './
|
|
1
|
+
export { default as useUniversalPreset } from './presets/useUniversalPreset';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
2
|
-
import type { PastePluginOptions } from '
|
|
2
|
+
import type { PastePluginOptions } from '../plugins/paste';
|
|
3
3
|
import type { BasePluginOptions } from '@atlaskit/editor-plugin-base';
|
|
4
|
-
import type { EditorProps } from '
|
|
4
|
+
import type { EditorProps } from '../types/editor-props';
|
|
5
5
|
import type { EditorPresetProps } from './types';
|
|
6
6
|
import type { BlockTypePluginOptions } from '@atlaskit/editor-plugin-block-type';
|
|
7
7
|
import type { PlaceholderPluginOptions } from '@atlaskit/editor-plugin-placeholder';
|
|
8
|
-
import type { AnnotationProviders } from '
|
|
8
|
+
import type { AnnotationProviders } from '../plugins/annotation';
|
|
9
9
|
import type { TextFormattingOptions, HyperlinkPluginOptions, QuickInsertPluginOptions } from '@atlaskit/editor-common/types';
|
|
10
|
-
import type { CodeBlockOptions } from '
|
|
10
|
+
import type { CodeBlockOptions } from '../plugins/code-block/types';
|
|
11
11
|
import type { SelectionPluginOptions } from '@atlaskit/editor-common/selection';
|
|
12
12
|
import type { CardOptions } from '@atlaskit/editor-common/card';
|
|
13
13
|
import type { TypeAheadPluginOptions } from '@atlaskit/editor-plugin-type-ahead';
|
|
@@ -2,8 +2,8 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
|
2
2
|
import type { EditorAppearance } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { DefaultPresetPluginOptions } from './default';
|
|
4
4
|
import type { EditorPresetProps } from './types';
|
|
5
|
-
import type { EditorSharedPropsWithPlugins, EditorPluginFeatureProps, EditorProviderProps } from '
|
|
6
|
-
import type { FeatureFlags } from '
|
|
5
|
+
import type { EditorSharedPropsWithPlugins, EditorPluginFeatureProps, EditorProviderProps } from '../types/editor-props';
|
|
6
|
+
import type { FeatureFlags } from '../types/feature-flags';
|
|
7
7
|
import type { EditorPresetBuilder } from '@atlaskit/editor-common/preset';
|
|
8
8
|
type UniversalPresetProps = EditorPresetProps & DefaultPresetPluginOptions & EditorSharedPropsWithPlugins & EditorPluginFeatureProps & EditorProviderProps;
|
|
9
9
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "189.0.
|
|
3
|
+
"version": "189.0.9",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
"@atlaskit/radio": "^5.6.0",
|
|
121
121
|
"@atlaskit/section-message": "^6.4.0",
|
|
122
122
|
"@atlaskit/select": "^16.7.0",
|
|
123
|
-
"@atlaskit/smart-card": "^26.
|
|
123
|
+
"@atlaskit/smart-card": "^26.38.0",
|
|
124
124
|
"@atlaskit/smart-user-picker": "^6.3.0",
|
|
125
125
|
"@atlaskit/spinner": "^15.6.0",
|
|
126
126
|
"@atlaskit/tabs": "^13.4.0",
|
|
@@ -329,6 +329,9 @@
|
|
|
329
329
|
},
|
|
330
330
|
"platform.editor.paste-options-toolbar": {
|
|
331
331
|
"type": "boolean"
|
|
332
|
+
},
|
|
333
|
+
"platform.editor.multi-bodied-extension_0rygg": {
|
|
334
|
+
"type": "boolean"
|
|
332
335
|
}
|
|
333
336
|
}
|
|
334
|
-
}
|
|
337
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|