@atlaskit/editor-core 242.3.6 → 243.0.0
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 +10 -0
- package/dist/cjs/utils/extensions.js +13 -12
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/utils/extensions.js +9 -11
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/utils/extensions.js +12 -12
- package/dist/esm/version-wrapper.js +1 -1
- package/package.json +44 -44
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 243.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c1ec527d3ad2f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c1ec527d3ad2f) -
|
|
8
|
+
Use React.lazy with explicit loading and error boundaries for extension Quick Insert icons and
|
|
9
|
+
Element Browser when platform_editor_loosely_lazy_migration is enabled. Keep react-loadable when
|
|
10
|
+
the experiment is disabled.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 242.3.6
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -10,16 +10,16 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
10
10
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _reactLoadable = _interopRequireDefault(require("react-loadable"));
|
|
13
|
-
var _reactLooselyLazy = require("react-loosely-lazy");
|
|
14
13
|
var _fireAnalyticsEvent = require("@atlaskit/editor-common/analytics/fire-analytics-event");
|
|
15
14
|
var _enums = require("@atlaskit/editor-common/analytics/types/enums");
|
|
15
|
+
var _errorBoundary = require("@atlaskit/editor-common/error-boundary");
|
|
16
16
|
var _manifestHelpers = require("@atlaskit/editor-common/extensions/manifest-helpers");
|
|
17
17
|
var _moduleHelpers = require("@atlaskit/editor-common/extensions/module-helpers");
|
|
18
18
|
var _analytics = require("@atlaskit/editor-common/utils/analytics");
|
|
19
19
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
20
20
|
var _getExtensionQuickInsertComponents = require("../ui/quick-insert/getExtensionQuickInsertComponents");
|
|
21
21
|
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; }
|
|
22
|
-
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) { (0, _defineProperty2.default)(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; }
|
|
22
|
+
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) { (0, _defineProperty2.default)(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; }
|
|
23
23
|
// Structural shape of the markdown-mode plugin's slice of the injection API.
|
|
24
24
|
// Used to read `isMarkdownMode` without importing the `MarkdownModePlugin`
|
|
25
25
|
// type — that would pull editor-plugin-markdown-mode into editor-core's
|
|
@@ -80,22 +80,23 @@ var dummyExtensionAPI = {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
};
|
|
83
|
-
// Keep lazy icon component identities stable across menu unmounts and remounts.
|
|
84
|
-
var lazyExtensionIconCache = new WeakMap();
|
|
85
83
|
var LazyExtensionIcon = function LazyExtensionIcon(_ref) {
|
|
86
84
|
var iconLoader = _ref.iconLoader;
|
|
87
|
-
var Icon =
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
85
|
+
var Icon = /*#__PURE__*/_react.default.lazy(function () {
|
|
86
|
+
return (0, _manifestHelpers.resolveImport)(iconLoader()).then(function (Component) {
|
|
87
|
+
return {
|
|
88
|
+
default: Component
|
|
89
|
+
};
|
|
91
90
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
});
|
|
92
|
+
return /*#__PURE__*/_react.default.createElement(_errorBoundary.ErrorBoundary, {
|
|
93
|
+
component: _enums.ACTION_SUBJECT.EDITOR,
|
|
94
|
+
fallbackComponent: null
|
|
95
|
+
}, /*#__PURE__*/_react.default.createElement(_react.default.Suspense, {
|
|
95
96
|
fallback: null
|
|
96
97
|
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
|
97
98
|
label: ""
|
|
98
|
-
}));
|
|
99
|
+
})));
|
|
99
100
|
};
|
|
100
101
|
|
|
101
102
|
/** Creates legacy and registered Quick Insert representations for extensions. */
|
|
@@ -6,4 +6,4 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.version = exports.name = void 0;
|
|
7
7
|
var name = exports.name = "@atlaskit/editor-core";
|
|
8
8
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
9
|
-
var version = exports.version = "242.3.
|
|
9
|
+
var version = exports.version = "242.3.6";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Loadable from 'react-loadable';
|
|
3
|
-
// oxlint-disable-next-line @atlassian/no-restricted-imports
|
|
4
|
-
import { lazy, LazySuspense } from 'react-loosely-lazy';
|
|
5
3
|
import { fireAnalyticsEvent } from '@atlaskit/editor-common/analytics/fire-analytics-event';
|
|
6
4
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
5
|
+
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
7
6
|
import { resolveImport } from '@atlaskit/editor-common/extensions/manifest-helpers';
|
|
8
7
|
import { getQuickInsertItemsFromModule } from '@atlaskit/editor-common/extensions/module-helpers';
|
|
9
8
|
import { findInsertLocation } from '@atlaskit/editor-common/utils/analytics';
|
|
@@ -59,21 +58,20 @@ const dummyExtensionAPI = {
|
|
|
59
58
|
update: () => showDummyAPIWarning('doc:update')
|
|
60
59
|
}
|
|
61
60
|
};
|
|
62
|
-
// Keep lazy icon component identities stable across menu unmounts and remounts.
|
|
63
|
-
const lazyExtensionIconCache = new WeakMap();
|
|
64
61
|
const LazyExtensionIcon = ({
|
|
65
62
|
iconLoader
|
|
66
63
|
}) => {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
const Icon = /*#__PURE__*/React.lazy(() => resolveImport(iconLoader()).then(Component => ({
|
|
65
|
+
default: Component
|
|
66
|
+
})));
|
|
67
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
68
|
+
component: ACTION_SUBJECT.EDITOR,
|
|
69
|
+
fallbackComponent: null
|
|
70
|
+
}, /*#__PURE__*/React.createElement(React.Suspense, {
|
|
73
71
|
fallback: null
|
|
74
72
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
75
73
|
label: ""
|
|
76
|
-
}));
|
|
74
|
+
})));
|
|
77
75
|
};
|
|
78
76
|
|
|
79
77
|
/** Creates legacy and registered Quick Insert representations for extensions. */
|
|
@@ -5,10 +5,9 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
|
|
|
5
5
|
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; }
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import Loadable from 'react-loadable';
|
|
8
|
-
// oxlint-disable-next-line @atlassian/no-restricted-imports
|
|
9
|
-
import { lazy, LazySuspense } from 'react-loosely-lazy';
|
|
10
8
|
import { fireAnalyticsEvent } from '@atlaskit/editor-common/analytics/fire-analytics-event';
|
|
11
9
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
|
|
10
|
+
import { ErrorBoundary } from '@atlaskit/editor-common/error-boundary';
|
|
12
11
|
import { resolveImport } from '@atlaskit/editor-common/extensions/manifest-helpers';
|
|
13
12
|
import { getQuickInsertItemsFromModule } from '@atlaskit/editor-common/extensions/module-helpers';
|
|
14
13
|
import { findInsertLocation } from '@atlaskit/editor-common/utils/analytics';
|
|
@@ -75,22 +74,23 @@ var dummyExtensionAPI = {
|
|
|
75
74
|
}
|
|
76
75
|
}
|
|
77
76
|
};
|
|
78
|
-
// Keep lazy icon component identities stable across menu unmounts and remounts.
|
|
79
|
-
var lazyExtensionIconCache = new WeakMap();
|
|
80
77
|
var LazyExtensionIcon = function LazyExtensionIcon(_ref) {
|
|
81
78
|
var iconLoader = _ref.iconLoader;
|
|
82
|
-
var Icon =
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
var Icon = /*#__PURE__*/React.lazy(function () {
|
|
80
|
+
return resolveImport(iconLoader()).then(function (Component) {
|
|
81
|
+
return {
|
|
82
|
+
default: Component
|
|
83
|
+
};
|
|
86
84
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
});
|
|
86
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
87
|
+
component: ACTION_SUBJECT.EDITOR,
|
|
88
|
+
fallbackComponent: null
|
|
89
|
+
}, /*#__PURE__*/React.createElement(React.Suspense, {
|
|
90
90
|
fallback: null
|
|
91
91
|
}, /*#__PURE__*/React.createElement(Icon, {
|
|
92
92
|
label: ""
|
|
93
|
-
}));
|
|
93
|
+
})));
|
|
94
94
|
};
|
|
95
95
|
|
|
96
96
|
/** Creates legacy and registered Quick Insert representations for extensions. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "243.0.0",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
"@atlaskit/button": "^25.8.0",
|
|
51
51
|
"@atlaskit/css": "^1.1.0",
|
|
52
52
|
"@atlaskit/editor-json-transformer": "^10.0.0",
|
|
53
|
-
"@atlaskit/editor-plugin-block-menu": "^
|
|
54
|
-
"@atlaskit/editor-plugin-connectivity": "^
|
|
55
|
-
"@atlaskit/editor-plugin-quick-insert": "^
|
|
56
|
-
"@atlaskit/editor-plugin-selection-extension": "^
|
|
57
|
-
"@atlaskit/editor-plugin-user-preferences": "^
|
|
53
|
+
"@atlaskit/editor-plugin-block-menu": "^30.0.0",
|
|
54
|
+
"@atlaskit/editor-plugin-connectivity": "^31.0.0",
|
|
55
|
+
"@atlaskit/editor-plugin-quick-insert": "^31.0.0",
|
|
56
|
+
"@atlaskit/editor-plugin-selection-extension": "^34.0.0",
|
|
57
|
+
"@atlaskit/editor-plugin-user-preferences": "^29.0.0",
|
|
58
58
|
"@atlaskit/editor-plugins": "^17.0.0",
|
|
59
59
|
"@atlaskit/editor-prosemirror": "^9.0.0",
|
|
60
60
|
"@atlaskit/editor-shared-styles": "^5.1.0",
|
|
61
|
-
"@atlaskit/editor-ssr-renderer": "^
|
|
61
|
+
"@atlaskit/editor-ssr-renderer": "^26.0.0",
|
|
62
62
|
"@atlaskit/editor-toolbar": "^2.11.0",
|
|
63
63
|
"@atlaskit/editor-toolbar-model": "^1.2.0",
|
|
64
64
|
"@atlaskit/emoji": "^73.6.0",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"uuid": "^11.1.1"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
|
-
"@atlaskit/editor-common": "^
|
|
94
|
+
"@atlaskit/editor-common": "^135.0.0",
|
|
95
95
|
"@atlaskit/link-provider": "^6.1.0",
|
|
96
96
|
"@atlaskit/media-core": "^39.0.0",
|
|
97
97
|
"react": "^18.2.0 || ^19.2.0",
|
|
@@ -108,41 +108,41 @@
|
|
|
108
108
|
"@atlaskit/analytics-gas-types": "^6.2.0",
|
|
109
109
|
"@atlaskit/analytics-listeners": "^11.4.0",
|
|
110
110
|
"@atlaskit/code": "^20.0.0",
|
|
111
|
-
"@atlaskit/collab-provider": "^
|
|
111
|
+
"@atlaskit/collab-provider": "^40.0.0",
|
|
112
112
|
"@atlaskit/docs": "^12.3.0",
|
|
113
113
|
"@atlaskit/drawer": "^14.3.0",
|
|
114
|
-
"@atlaskit/editor-common": "^
|
|
115
|
-
"@atlaskit/editor-plugin-alignment": "^
|
|
116
|
-
"@atlaskit/editor-plugin-annotation": "^
|
|
117
|
-
"@atlaskit/editor-plugin-base": "^
|
|
118
|
-
"@atlaskit/editor-plugin-card": "^
|
|
119
|
-
"@atlaskit/editor-plugin-code-block-advanced": "^
|
|
120
|
-
"@atlaskit/editor-plugin-collab-edit": "^
|
|
121
|
-
"@atlaskit/editor-plugin-content-insertion": "^
|
|
122
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
123
|
-
"@atlaskit/editor-plugin-extension": "^
|
|
124
|
-
"@atlaskit/editor-plugin-grid": "^
|
|
125
|
-
"@atlaskit/editor-plugin-guideline": "^
|
|
126
|
-
"@atlaskit/editor-plugin-highlight": "^
|
|
127
|
-
"@atlaskit/editor-plugin-hyperlink": "^
|
|
128
|
-
"@atlaskit/editor-plugin-insert-block": "^
|
|
129
|
-
"@atlaskit/editor-plugin-layout": "^
|
|
130
|
-
"@atlaskit/editor-plugin-list": "^
|
|
131
|
-
"@atlaskit/editor-plugin-media": "^
|
|
132
|
-
"@atlaskit/editor-plugin-media-insert": "^
|
|
133
|
-
"@atlaskit/editor-plugin-paste": "^
|
|
134
|
-
"@atlaskit/editor-plugin-selection-marker": "^
|
|
135
|
-
"@atlaskit/editor-plugin-show-diff": "^
|
|
136
|
-
"@atlaskit/editor-plugin-synced-block": "^
|
|
137
|
-
"@atlaskit/editor-plugin-table": "^
|
|
138
|
-
"@atlaskit/editor-plugin-tasks-and-decisions": "^
|
|
139
|
-
"@atlaskit/editor-plugin-text-color": "^
|
|
140
|
-
"@atlaskit/editor-plugin-text-formatting": "^
|
|
141
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
142
|
-
"@atlaskit/editor-plugin-toolbar-lists-indentation": "^
|
|
143
|
-
"@atlaskit/editor-plugin-track-changes": "^
|
|
144
|
-
"@atlaskit/editor-synced-block-provider": "^
|
|
145
|
-
"@atlaskit/editor-synced-block-renderer": "^
|
|
114
|
+
"@atlaskit/editor-common": "^135.0.0",
|
|
115
|
+
"@atlaskit/editor-plugin-alignment": "^32.0.0",
|
|
116
|
+
"@atlaskit/editor-plugin-annotation": "^31.0.0",
|
|
117
|
+
"@atlaskit/editor-plugin-base": "^32.0.0",
|
|
118
|
+
"@atlaskit/editor-plugin-card": "^37.0.0",
|
|
119
|
+
"@atlaskit/editor-plugin-code-block-advanced": "^31.0.0",
|
|
120
|
+
"@atlaskit/editor-plugin-collab-edit": "^33.0.0",
|
|
121
|
+
"@atlaskit/editor-plugin-content-insertion": "^31.0.0",
|
|
122
|
+
"@atlaskit/editor-plugin-editor-viewmode": "^33.0.0",
|
|
123
|
+
"@atlaskit/editor-plugin-extension": "^34.0.0",
|
|
124
|
+
"@atlaskit/editor-plugin-grid": "^31.0.0",
|
|
125
|
+
"@atlaskit/editor-plugin-guideline": "^31.0.0",
|
|
126
|
+
"@atlaskit/editor-plugin-highlight": "^31.0.0",
|
|
127
|
+
"@atlaskit/editor-plugin-hyperlink": "^33.0.0",
|
|
128
|
+
"@atlaskit/editor-plugin-insert-block": "^32.0.0",
|
|
129
|
+
"@atlaskit/editor-plugin-layout": "^32.0.0",
|
|
130
|
+
"@atlaskit/editor-plugin-list": "^33.0.0",
|
|
131
|
+
"@atlaskit/editor-plugin-media": "^33.0.0",
|
|
132
|
+
"@atlaskit/editor-plugin-media-insert": "^49.0.0",
|
|
133
|
+
"@atlaskit/editor-plugin-paste": "^32.0.0",
|
|
134
|
+
"@atlaskit/editor-plugin-selection-marker": "^31.0.0",
|
|
135
|
+
"@atlaskit/editor-plugin-show-diff": "^31.0.0",
|
|
136
|
+
"@atlaskit/editor-plugin-synced-block": "^29.0.0",
|
|
137
|
+
"@atlaskit/editor-plugin-table": "^43.0.0",
|
|
138
|
+
"@atlaskit/editor-plugin-tasks-and-decisions": "^34.0.0",
|
|
139
|
+
"@atlaskit/editor-plugin-text-color": "^31.0.0",
|
|
140
|
+
"@atlaskit/editor-plugin-text-formatting": "^32.0.0",
|
|
141
|
+
"@atlaskit/editor-plugin-toolbar": "^28.0.0",
|
|
142
|
+
"@atlaskit/editor-plugin-toolbar-lists-indentation": "^32.0.0",
|
|
143
|
+
"@atlaskit/editor-plugin-track-changes": "^30.0.0",
|
|
144
|
+
"@atlaskit/editor-synced-block-provider": "^27.0.0",
|
|
145
|
+
"@atlaskit/editor-synced-block-renderer": "^29.0.0",
|
|
146
146
|
"@atlaskit/editor-tables": "^3.2.0",
|
|
147
147
|
"@atlaskit/editor-test-helpers": "workspace:^",
|
|
148
148
|
"@atlaskit/form": "^18.3.0",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"@atlaskit/popper": "^9.4.0",
|
|
160
160
|
"@atlaskit/portal": "^7.1.0",
|
|
161
161
|
"@atlaskit/profilecard": "^27.10.0",
|
|
162
|
-
"@atlaskit/renderer": "^
|
|
162
|
+
"@atlaskit/renderer": "^154.0.0",
|
|
163
163
|
"@atlaskit/section-message": "^10.3.0",
|
|
164
164
|
"@atlaskit/spinner": "^20.4.0",
|
|
165
165
|
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
@@ -170,12 +170,12 @@
|
|
|
170
170
|
"@atlassian/a11y-jest-testing": "^0.17.0",
|
|
171
171
|
"@atlassian/a11y-playwright-testing": "^0.13.0",
|
|
172
172
|
"@atlassian/adf-schema-json": "^1.35.0",
|
|
173
|
-
"@atlassian/editor-rovo-bridge": "^
|
|
173
|
+
"@atlassian/editor-rovo-bridge": "^30.0.0",
|
|
174
174
|
"@atlassian/experiment-test-utils": "^0.2.0",
|
|
175
175
|
"@atlassian/feature-flags-storybook-utils": "^0.5.0",
|
|
176
176
|
"@atlassian/feature-flags-test-utils": "^1.3.0",
|
|
177
177
|
"@atlassian/search-client": "^3.14.0",
|
|
178
|
-
"@atlassian/search-provider": "^
|
|
178
|
+
"@atlassian/search-provider": "^32.0.0",
|
|
179
179
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
180
180
|
"@atlassian/testing-library": "^0.12.0",
|
|
181
181
|
"@atlassian/user-profile-card": "^1.56.0",
|