@atlaskit/editor-core 219.9.8 → 219.9.10
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 +17 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
- package/dist/cjs/ui/ChromeCollapsed/ChromeCollapsed-compiled.compiled.css +17 -0
- package/dist/cjs/ui/ChromeCollapsed/ChromeCollapsed-compiled.js +34 -0
- package/dist/cjs/ui/ChromeCollapsed/ChromeCollapsed-emotion.js +37 -0
- package/dist/cjs/ui/ChromeCollapsed/index.js +10 -11
- package/dist/cjs/ui/PluginSlot/index.js +70 -6
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
- package/dist/es2019/ui/ChromeCollapsed/ChromeCollapsed-compiled.compiled.css +17 -0
- package/dist/es2019/ui/ChromeCollapsed/ChromeCollapsed-compiled.js +23 -0
- package/dist/es2019/ui/ChromeCollapsed/ChromeCollapsed-emotion.js +27 -0
- package/dist/es2019/ui/ChromeCollapsed/index.js +7 -13
- package/dist/es2019/ui/PluginSlot/index.js +67 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +1 -1
- package/dist/esm/ui/ChromeCollapsed/ChromeCollapsed-compiled.compiled.css +17 -0
- package/dist/esm/ui/ChromeCollapsed/ChromeCollapsed-compiled.js +25 -0
- package/dist/esm/ui/ChromeCollapsed/ChromeCollapsed-emotion.js +29 -0
- package/dist/esm/ui/ChromeCollapsed/index.js +9 -13
- package/dist/esm/ui/PluginSlot/index.js +70 -6
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/types/markdown-mode.d.ts +1 -1
- package/dist/types/ui/Appearance/Chromeless-compiled.d.ts +1 -1
- package/dist/types/ui/ChromeCollapsed/ChromeCollapsed-compiled.d.ts +13 -0
- package/dist/types/ui/ChromeCollapsed/ChromeCollapsed-emotion.d.ts +13 -0
- package/dist/types/ui/ChromeCollapsed/index.d.ts +0 -4
- package/dist/types-ts4.5/types/markdown-mode.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/Chromeless-compiled.d.ts +1 -1
- package/dist/types-ts4.5/ui/ChromeCollapsed/ChromeCollapsed-compiled.d.ts +13 -0
- package/dist/types-ts4.5/ui/ChromeCollapsed/ChromeCollapsed-emotion.d.ts +13 -0
- package/dist/types-ts4.5/ui/ChromeCollapsed/index.d.ts +0 -4
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 219.9.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`96b390b511102`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/96b390b511102) -
|
|
8
|
+
Add the `platform_editor_per_plugin_error_boundary` experiment and use it to isolate editor
|
|
9
|
+
PluginSlot failures to the failing plugin.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 219.9.9
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [`6ac4a00689c60`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6ac4a00689c60) -
|
|
17
|
+
Migrate ui/ChromeCollapsed styles
|
|
18
|
+
- Updated dependencies
|
|
19
|
+
|
|
3
20
|
## 219.9.8
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -259,7 +259,7 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
259
259
|
var _states$markdownModeS2;
|
|
260
260
|
return (_states$markdownModeS2 = states.markdownModeState) === null || _states$markdownModeS2 === void 0 ? void 0 : _states$markdownModeS2.isMarkdownMode;
|
|
261
261
|
});
|
|
262
|
-
var shouldHideProseMirrorForMarkdownMode = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== '
|
|
262
|
+
var shouldHideProseMirrorForMarkdownMode = (0, _expValEqualsNoExposure.expValEqualsNoExposure)('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== 'preview' && markdownPluginCurrentIsMarkdownMode;
|
|
263
263
|
return (0, _react2.jsx)("div", {
|
|
264
264
|
css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
|
|
265
265
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
._19it19hj{border:1px solid var(--ds-border-input,#8c8f97)}
|
|
3
|
+
._2rkofajl{border-radius:var(--ds-radius-small,3px)}._19bvv47k{padding-left:var(--ds-space-250,20px)}
|
|
4
|
+
._1bsb1osq{width:100%}
|
|
5
|
+
._1dyzdjp5{letter-spacing:-.005em}
|
|
6
|
+
._1wyboxwj{font-size:.875rem}
|
|
7
|
+
._4t3i1ylp{height:40px}
|
|
8
|
+
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
9
|
+
._ca0qutpp{padding-top:var(--ds-space-150,9pt)}
|
|
10
|
+
._k48pi7a9{font-weight:var(--ds-font-weight-regular,400)}
|
|
11
|
+
._n3tdutpp{padding-bottom:var(--ds-space-150,9pt)}
|
|
12
|
+
._syaz1rpy{color:var(--ds-text-subtlest,#6b6e76)}
|
|
13
|
+
._vchhusvi{box-sizing:border-box}
|
|
14
|
+
._vwz41aog{line-height:1.42857142857143}
|
|
15
|
+
._4cvxrsbi:hover{border-color:var(--ds-border-input,#8c8f97)}
|
|
16
|
+
._d0al1kdv:hover{cursor:text}
|
|
17
|
+
._irr3l4ek:hover{background-color:var(--ds-background-input-hovered,#f8f8f8)}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/* ChromeCollapsed-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.ChromeCollapsedCompiled = void 0;
|
|
10
|
+
require("./ChromeCollapsed-compiled.compiled.css");
|
|
11
|
+
var _runtime = require("@compiled/react/runtime");
|
|
12
|
+
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
|
|
13
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
14
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
|
+
/**
|
|
17
|
+
* Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
18
|
+
* Used via `componentWithCondition` in `index.tsx`.
|
|
19
|
+
*
|
|
20
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
21
|
+
*/
|
|
22
|
+
var inputCompiledStyles = {
|
|
23
|
+
root: "_19it19hj _2rkofajl _bfhk1j9a _vchhusvi _4t3i1ylp _19bvv47k _ca0qutpp _n3tdutpp _1wyboxwj _1bsb1osq _k48pi7a9 _vwz41aog _1dyzdjp5 _syaz1rpy _4cvxrsbi _irr3l4ek _d0al1kdv"
|
|
24
|
+
};
|
|
25
|
+
var ChromeCollapsedCompiled = exports.ChromeCollapsedCompiled = /*#__PURE__*/(0, _react.forwardRef)(
|
|
26
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
27
|
+
function (_ref, ref) {
|
|
28
|
+
var rest = (0, _extends2.default)({}, ((0, _objectDestructuringEmpty2.default)(_ref), _ref));
|
|
29
|
+
return /*#__PURE__*/_react.default.createElement("input", (0, _extends2.default)({
|
|
30
|
+
ref: ref
|
|
31
|
+
}, rest, {
|
|
32
|
+
className: (0, _runtime.ax)([inputCompiledStyles.root])
|
|
33
|
+
}));
|
|
34
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ChromeCollapsedEmotion = void 0;
|
|
8
|
+
var _objectDestructuringEmpty2 = _interopRequireDefault(require("@babel/runtime/helpers/objectDestructuringEmpty"));
|
|
9
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _react = require("react");
|
|
11
|
+
var _react2 = require("@emotion/react");
|
|
12
|
+
var _styles = require("./styles");
|
|
13
|
+
/**
|
|
14
|
+
* @jsxRuntime classic
|
|
15
|
+
* @jsx jsx
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
/**
|
|
19
|
+
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
20
|
+
* Used via `componentWithCondition` in `index.tsx`.
|
|
21
|
+
*
|
|
22
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
23
|
+
**/
|
|
24
|
+
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
|
|
26
|
+
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- intentional: emotion fallback for compiled migration
|
|
28
|
+
|
|
29
|
+
var ChromeCollapsedEmotion = exports.ChromeCollapsedEmotion = /*#__PURE__*/(0, _react.forwardRef)(
|
|
30
|
+
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- intentional: emotion fallback for compiled migration
|
|
31
|
+
function (_ref, ref) {
|
|
32
|
+
var rest = (0, _extends2.default)({}, ((0, _objectDestructuringEmpty2.default)(_ref), _ref));
|
|
33
|
+
return (0, _react2.jsx)("input", (0, _extends2.default)({
|
|
34
|
+
ref: ref,
|
|
35
|
+
css: _styles.inputStyle
|
|
36
|
+
}, rest));
|
|
37
|
+
});
|
|
@@ -13,16 +13,18 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
13
13
|
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _react = _interopRequireWildcard(require("react"));
|
|
16
|
-
var _react2 = require("@emotion/react");
|
|
17
16
|
var _reactIntl = require("react-intl");
|
|
17
|
+
var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
|
|
18
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
19
|
+
var _ChromeCollapsedCompiled = require("./ChromeCollapsed-compiled");
|
|
20
|
+
var _ChromeCollapsedEmotion = require("./ChromeCollapsed-emotion");
|
|
18
21
|
var _messages = require("./messages");
|
|
19
|
-
var _styles = require("./styles");
|
|
20
22
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
21
23
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
|
22
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
25
|
+
var InputMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
26
|
+
return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
27
|
+
}, _ChromeCollapsedCompiled.ChromeCollapsedCompiled, _ChromeCollapsedEmotion.ChromeCollapsedEmotion);
|
|
26
28
|
// Ignored via go/ees005
|
|
27
29
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
28
30
|
var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
|
|
@@ -57,11 +59,8 @@ var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
|
|
|
57
59
|
key: "render",
|
|
58
60
|
value: function render() {
|
|
59
61
|
var placeholder = this.props.text || this.props.intl.formatMessage(_messages.messages.chromeCollapsedPlaceholder);
|
|
60
|
-
return
|
|
61
|
-
"data-testid": "chrome-collapsed"
|
|
62
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
63
|
-
,
|
|
64
|
-
css: _styles.inputStyle,
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement(InputMigration, {
|
|
63
|
+
"data-testid": "chrome-collapsed",
|
|
65
64
|
ref: this.handleInputRef,
|
|
66
65
|
onFocus: this.focusHandler,
|
|
67
66
|
placeholder: placeholder,
|
|
@@ -17,8 +17,8 @@ var _PluginSlotEmotion = require("./PluginSlot-emotion");
|
|
|
17
17
|
var PluginsComponentsWrapperMigration = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
|
|
18
18
|
return (0, _expValEquals.expValEquals)('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
19
19
|
}, _PluginSlotCompiled.PluginsComponentsWrapperCompiled, _PluginSlotEmotion.PluginsComponentsWrapperEmotion);
|
|
20
|
-
var
|
|
21
|
-
var
|
|
20
|
+
var PluginComponent = function PluginComponent(_ref) {
|
|
21
|
+
var component = _ref.component,
|
|
22
22
|
editorView = _ref.editorView,
|
|
23
23
|
editorActions = _ref.editorActions,
|
|
24
24
|
eventDispatcher = _ref.eventDispatcher,
|
|
@@ -30,11 +30,43 @@ var PluginSlot = function PluginSlot(_ref) {
|
|
|
30
30
|
containerElement = _ref.containerElement,
|
|
31
31
|
disabled = _ref.disabled,
|
|
32
32
|
dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
|
|
33
|
-
wrapperElement = _ref.wrapperElement
|
|
34
|
-
|
|
33
|
+
wrapperElement = _ref.wrapperElement;
|
|
34
|
+
return component({
|
|
35
|
+
editorView: editorView,
|
|
36
|
+
editorActions: editorActions,
|
|
37
|
+
eventDispatcher: eventDispatcher,
|
|
38
|
+
providerFactory: providerFactory,
|
|
39
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
40
|
+
// Ignored via go/ees005
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
42
|
+
appearance: appearance,
|
|
43
|
+
popupsMountPoint: popupsMountPoint,
|
|
44
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
45
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
46
|
+
containerElement: containerElement,
|
|
47
|
+
disabled: disabled,
|
|
48
|
+
wrapperElement: wrapperElement
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
var PluginSlot = function PluginSlot(_ref2) {
|
|
52
|
+
var items = _ref2.items,
|
|
53
|
+
editorView = _ref2.editorView,
|
|
54
|
+
editorActions = _ref2.editorActions,
|
|
55
|
+
eventDispatcher = _ref2.eventDispatcher,
|
|
56
|
+
providerFactory = _ref2.providerFactory,
|
|
57
|
+
appearance = _ref2.appearance,
|
|
58
|
+
popupsMountPoint = _ref2.popupsMountPoint,
|
|
59
|
+
popupsBoundariesElement = _ref2.popupsBoundariesElement,
|
|
60
|
+
popupsScrollableElement = _ref2.popupsScrollableElement,
|
|
61
|
+
containerElement = _ref2.containerElement,
|
|
62
|
+
disabled = _ref2.disabled,
|
|
63
|
+
dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
|
|
64
|
+
wrapperElement = _ref2.wrapperElement,
|
|
65
|
+
pluginHooks = _ref2.pluginHooks;
|
|
35
66
|
if (!items && !pluginHooks) {
|
|
36
67
|
return null;
|
|
37
68
|
}
|
|
69
|
+
var isolatePluginSlotFailures = Boolean(items === null || items === void 0 ? void 0 : items.length) && (0, _expValEquals.expValEquals)('platform_editor_per_plugin_error_boundary', 'isEnabled', true);
|
|
38
70
|
return /*#__PURE__*/_react.default.createElement(_ErrorBoundary.ErrorBoundary, {
|
|
39
71
|
component: _analytics.ACTION_SUBJECT.PLUGIN_SLOT,
|
|
40
72
|
fallbackComponent: null
|
|
@@ -44,9 +76,41 @@ var PluginSlot = function PluginSlot(_ref) {
|
|
|
44
76
|
containerElement: containerElement
|
|
45
77
|
}), /*#__PURE__*/_react.default.createElement(PluginsComponentsWrapperMigration, {
|
|
46
78
|
"data-testid": "plugins-components-wrapper"
|
|
47
|
-
}, items === null || items === void 0 ? void 0 : items.map(function (component,
|
|
79
|
+
}, items === null || items === void 0 ? void 0 : items.map(function (component, index) {
|
|
80
|
+
if (isolatePluginSlotFailures) {
|
|
81
|
+
return (
|
|
82
|
+
/*#__PURE__*/
|
|
83
|
+
// The wrapper adds a small amount of overhead, but moves the plugin factory call
|
|
84
|
+
// inside the per-plugin boundary while still invoking it as a factory.
|
|
85
|
+
_react.default.createElement(_ErrorBoundary.ErrorBoundary
|
|
86
|
+
// Switching to a data-derived key currently breaks editor-plugin-ai's
|
|
87
|
+
// Discard flow (which relies on positional remounts to reset modal
|
|
88
|
+
// state). Tracked for follow-up behind a separate gate.
|
|
89
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
90
|
+
, {
|
|
91
|
+
key: index,
|
|
92
|
+
component: _analytics.ACTION_SUBJECT.PLUGIN_SLOT,
|
|
93
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
94
|
+
fallbackComponent: null
|
|
95
|
+
}, /*#__PURE__*/_react.default.createElement(PluginComponent, {
|
|
96
|
+
component: component,
|
|
97
|
+
editorView: editorView,
|
|
98
|
+
editorActions: editorActions,
|
|
99
|
+
eventDispatcher: eventDispatcher,
|
|
100
|
+
providerFactory: providerFactory,
|
|
101
|
+
appearance: appearance,
|
|
102
|
+
popupsMountPoint: popupsMountPoint,
|
|
103
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
104
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
105
|
+
containerElement: containerElement,
|
|
106
|
+
disabled: disabled,
|
|
107
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
108
|
+
wrapperElement: wrapperElement
|
|
109
|
+
}))
|
|
110
|
+
);
|
|
111
|
+
}
|
|
48
112
|
var props = {
|
|
49
|
-
key:
|
|
113
|
+
key: index
|
|
50
114
|
};
|
|
51
115
|
var element = component({
|
|
52
116
|
editorView: editorView,
|
|
@@ -251,7 +251,7 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
251
251
|
var _states$markdownModeS2;
|
|
252
252
|
return (_states$markdownModeS2 = states.markdownModeState) === null || _states$markdownModeS2 === void 0 ? void 0 : _states$markdownModeS2.isMarkdownMode;
|
|
253
253
|
});
|
|
254
|
-
const shouldHideProseMirrorForMarkdownMode = expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== '
|
|
254
|
+
const shouldHideProseMirrorForMarkdownMode = expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== 'preview' && markdownPluginCurrentIsMarkdownMode;
|
|
255
255
|
return jsx("div", {
|
|
256
256
|
css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
|
|
257
257
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
._19it19hj{border:1px solid var(--ds-border-input,#8c8f97)}
|
|
3
|
+
._2rkofajl{border-radius:var(--ds-radius-small,3px)}._19bvv47k{padding-left:var(--ds-space-250,20px)}
|
|
4
|
+
._1bsb1osq{width:100%}
|
|
5
|
+
._1dyzdjp5{letter-spacing:-.005em}
|
|
6
|
+
._1wyboxwj{font-size:.875rem}
|
|
7
|
+
._4t3i1ylp{height:40px}
|
|
8
|
+
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
9
|
+
._ca0qutpp{padding-top:var(--ds-space-150,9pt)}
|
|
10
|
+
._k48pi7a9{font-weight:var(--ds-font-weight-regular,400)}
|
|
11
|
+
._n3tdutpp{padding-bottom:var(--ds-space-150,9pt)}
|
|
12
|
+
._syaz1rpy{color:var(--ds-text-subtlest,#6b6e76)}
|
|
13
|
+
._vchhusvi{box-sizing:border-box}
|
|
14
|
+
._vwz41aog{line-height:1.42857142857143}
|
|
15
|
+
._4cvxrsbi:hover{border-color:var(--ds-border-input,#8c8f97)}
|
|
16
|
+
._d0al1kdv:hover{cursor:text}
|
|
17
|
+
._irr3l4ek:hover{background-color:var(--ds-background-input-hovered,#f8f8f8)}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* ChromeCollapsed-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./ChromeCollapsed-compiled.compiled.css";
|
|
4
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
/**
|
|
6
|
+
* Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
7
|
+
* Used via `componentWithCondition` in `index.tsx`.
|
|
8
|
+
*
|
|
9
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
+
*/
|
|
11
|
+
import React, { forwardRef } from 'react';
|
|
12
|
+
const inputCompiledStyles = {
|
|
13
|
+
root: "_19it19hj _2rkofajl _bfhk1j9a _vchhusvi _4t3i1ylp _19bvv47k _ca0qutpp _n3tdutpp _1wyboxwj _1bsb1osq _k48pi7a9 _vwz41aog _1dyzdjp5 _syaz1rpy _4cvxrsbi _irr3l4ek _d0al1kdv"
|
|
14
|
+
};
|
|
15
|
+
export const ChromeCollapsedCompiled = /*#__PURE__*/forwardRef(
|
|
16
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
17
|
+
({
|
|
18
|
+
...rest
|
|
19
|
+
}, ref) => /*#__PURE__*/React.createElement("input", _extends({
|
|
20
|
+
ref: ref
|
|
21
|
+
}, rest, {
|
|
22
|
+
className: ax([inputCompiledStyles.root])
|
|
23
|
+
})));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
/**
|
|
8
|
+
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
9
|
+
* Used via `componentWithCondition` in `index.tsx`.
|
|
10
|
+
*
|
|
11
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
12
|
+
**/
|
|
13
|
+
|
|
14
|
+
import { forwardRef } from 'react';
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
|
|
16
|
+
import { jsx } from '@emotion/react';
|
|
17
|
+
|
|
18
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- intentional: emotion fallback for compiled migration
|
|
19
|
+
import { inputStyle } from './styles';
|
|
20
|
+
export const ChromeCollapsedEmotion = /*#__PURE__*/forwardRef(
|
|
21
|
+
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- intentional: emotion fallback for compiled migration
|
|
22
|
+
({
|
|
23
|
+
...rest
|
|
24
|
+
}, ref) => jsx("input", _extends({
|
|
25
|
+
ref: ref,
|
|
26
|
+
css: inputStyle
|
|
27
|
+
}, rest)));
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
/**
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
2
|
import React, { PureComponent } from 'react';
|
|
7
|
-
|
|
8
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
|
|
9
|
-
import { jsx } from '@emotion/react';
|
|
10
3
|
import { injectIntl } from 'react-intl';
|
|
4
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
5
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
|
+
import { ChromeCollapsedCompiled } from './ChromeCollapsed-compiled';
|
|
7
|
+
import { ChromeCollapsedEmotion } from './ChromeCollapsed-emotion';
|
|
11
8
|
import { messages } from './messages';
|
|
12
|
-
|
|
9
|
+
const InputMigration = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), ChromeCollapsedCompiled, ChromeCollapsedEmotion);
|
|
13
10
|
// Ignored via go/ees005
|
|
14
11
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
15
12
|
class ChromeCollapsed extends PureComponent {
|
|
@@ -35,11 +32,8 @@ class ChromeCollapsed extends PureComponent {
|
|
|
35
32
|
}
|
|
36
33
|
render() {
|
|
37
34
|
const placeholder = this.props.text || this.props.intl.formatMessage(messages.chromeCollapsedPlaceholder);
|
|
38
|
-
return
|
|
39
|
-
"data-testid": "chrome-collapsed"
|
|
40
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
41
|
-
,
|
|
42
|
-
css: inputStyle,
|
|
35
|
+
return /*#__PURE__*/React.createElement(InputMigration, {
|
|
36
|
+
"data-testid": "chrome-collapsed",
|
|
43
37
|
ref: this.handleInputRef,
|
|
44
38
|
onFocus: this.focusHandler,
|
|
45
39
|
placeholder: placeholder,
|
|
@@ -8,6 +8,38 @@ import { MountPluginHooks } from './mount-plugin-hooks';
|
|
|
8
8
|
import { PluginsComponentsWrapperCompiled } from './PluginSlot-compiled';
|
|
9
9
|
import { PluginsComponentsWrapperEmotion } from './PluginSlot-emotion';
|
|
10
10
|
const PluginsComponentsWrapperMigration = componentWithCondition(() => expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true), PluginsComponentsWrapperCompiled, PluginsComponentsWrapperEmotion);
|
|
11
|
+
const PluginComponent = ({
|
|
12
|
+
component,
|
|
13
|
+
editorView,
|
|
14
|
+
editorActions,
|
|
15
|
+
eventDispatcher,
|
|
16
|
+
providerFactory,
|
|
17
|
+
appearance,
|
|
18
|
+
popupsMountPoint,
|
|
19
|
+
popupsBoundariesElement,
|
|
20
|
+
popupsScrollableElement,
|
|
21
|
+
containerElement,
|
|
22
|
+
disabled,
|
|
23
|
+
dispatchAnalyticsEvent,
|
|
24
|
+
wrapperElement
|
|
25
|
+
}) => {
|
|
26
|
+
return component({
|
|
27
|
+
editorView: editorView,
|
|
28
|
+
editorActions: editorActions,
|
|
29
|
+
eventDispatcher: eventDispatcher,
|
|
30
|
+
providerFactory,
|
|
31
|
+
dispatchAnalyticsEvent,
|
|
32
|
+
// Ignored via go/ees005
|
|
33
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
34
|
+
appearance: appearance,
|
|
35
|
+
popupsMountPoint,
|
|
36
|
+
popupsBoundariesElement,
|
|
37
|
+
popupsScrollableElement,
|
|
38
|
+
containerElement,
|
|
39
|
+
disabled,
|
|
40
|
+
wrapperElement
|
|
41
|
+
});
|
|
42
|
+
};
|
|
11
43
|
const PluginSlot = ({
|
|
12
44
|
items,
|
|
13
45
|
editorView,
|
|
@@ -27,6 +59,7 @@ const PluginSlot = ({
|
|
|
27
59
|
if (!items && !pluginHooks) {
|
|
28
60
|
return null;
|
|
29
61
|
}
|
|
62
|
+
const isolatePluginSlotFailures = Boolean(items === null || items === void 0 ? void 0 : items.length) && expValEquals('platform_editor_per_plugin_error_boundary', 'isEnabled', true);
|
|
30
63
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
31
64
|
component: ACTION_SUBJECT.PLUGIN_SLOT,
|
|
32
65
|
fallbackComponent: null
|
|
@@ -36,9 +69,41 @@ const PluginSlot = ({
|
|
|
36
69
|
containerElement: containerElement
|
|
37
70
|
}), /*#__PURE__*/React.createElement(PluginsComponentsWrapperMigration, {
|
|
38
71
|
"data-testid": "plugins-components-wrapper"
|
|
39
|
-
}, items === null || items === void 0 ? void 0 : items.map((component,
|
|
72
|
+
}, items === null || items === void 0 ? void 0 : items.map((component, index) => {
|
|
73
|
+
if (isolatePluginSlotFailures) {
|
|
74
|
+
return (
|
|
75
|
+
/*#__PURE__*/
|
|
76
|
+
// The wrapper adds a small amount of overhead, but moves the plugin factory call
|
|
77
|
+
// inside the per-plugin boundary while still invoking it as a factory.
|
|
78
|
+
React.createElement(ErrorBoundary
|
|
79
|
+
// Switching to a data-derived key currently breaks editor-plugin-ai's
|
|
80
|
+
// Discard flow (which relies on positional remounts to reset modal
|
|
81
|
+
// state). Tracked for follow-up behind a separate gate.
|
|
82
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
83
|
+
, {
|
|
84
|
+
key: index,
|
|
85
|
+
component: ACTION_SUBJECT.PLUGIN_SLOT,
|
|
86
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
87
|
+
fallbackComponent: null
|
|
88
|
+
}, /*#__PURE__*/React.createElement(PluginComponent, {
|
|
89
|
+
component: component,
|
|
90
|
+
editorView: editorView,
|
|
91
|
+
editorActions: editorActions,
|
|
92
|
+
eventDispatcher: eventDispatcher,
|
|
93
|
+
providerFactory: providerFactory,
|
|
94
|
+
appearance: appearance,
|
|
95
|
+
popupsMountPoint: popupsMountPoint,
|
|
96
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
97
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
98
|
+
containerElement: containerElement,
|
|
99
|
+
disabled: disabled,
|
|
100
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
101
|
+
wrapperElement: wrapperElement
|
|
102
|
+
}))
|
|
103
|
+
);
|
|
104
|
+
}
|
|
40
105
|
const props = {
|
|
41
|
-
key
|
|
106
|
+
key: index
|
|
42
107
|
};
|
|
43
108
|
const element = component({
|
|
44
109
|
editorView: editorView,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const name = "@atlaskit/editor-core";
|
|
2
|
-
export const version = "219.9.
|
|
2
|
+
export const version = "219.9.9";
|
|
@@ -249,7 +249,7 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
|
249
249
|
var _states$markdownModeS2;
|
|
250
250
|
return (_states$markdownModeS2 = states.markdownModeState) === null || _states$markdownModeS2 === void 0 ? void 0 : _states$markdownModeS2.isMarkdownMode;
|
|
251
251
|
});
|
|
252
|
-
var shouldHideProseMirrorForMarkdownMode = expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== '
|
|
252
|
+
var shouldHideProseMirrorForMarkdownMode = expValEqualsNoExposure('cc-markdown-mode', 'isEnabled', true) && markdownPluginCurrentView !== 'preview' && markdownPluginCurrentIsMarkdownMode;
|
|
253
253
|
return jsx("div", {
|
|
254
254
|
css: [contentAreaNew, props.isEditorToolbarHidden && contentAreaHeightNoToolbar],
|
|
255
255
|
"data-testid": CONTENT_AREA_TEST_ID,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
._19it19hj{border:1px solid var(--ds-border-input,#8c8f97)}
|
|
3
|
+
._2rkofajl{border-radius:var(--ds-radius-small,3px)}._19bvv47k{padding-left:var(--ds-space-250,20px)}
|
|
4
|
+
._1bsb1osq{width:100%}
|
|
5
|
+
._1dyzdjp5{letter-spacing:-.005em}
|
|
6
|
+
._1wyboxwj{font-size:.875rem}
|
|
7
|
+
._4t3i1ylp{height:40px}
|
|
8
|
+
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
9
|
+
._ca0qutpp{padding-top:var(--ds-space-150,9pt)}
|
|
10
|
+
._k48pi7a9{font-weight:var(--ds-font-weight-regular,400)}
|
|
11
|
+
._n3tdutpp{padding-bottom:var(--ds-space-150,9pt)}
|
|
12
|
+
._syaz1rpy{color:var(--ds-text-subtlest,#6b6e76)}
|
|
13
|
+
._vchhusvi{box-sizing:border-box}
|
|
14
|
+
._vwz41aog{line-height:1.42857142857143}
|
|
15
|
+
._4cvxrsbi:hover{border-color:var(--ds-border-input,#8c8f97)}
|
|
16
|
+
._d0al1kdv:hover{cursor:text}
|
|
17
|
+
._irr3l4ek:hover{background-color:var(--ds-background-input-hovered,#f8f8f8)}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* ChromeCollapsed-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
3
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
4
|
+
import "./ChromeCollapsed-compiled.compiled.css";
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
/**
|
|
7
|
+
* Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
8
|
+
* Used via `componentWithCondition` in `index.tsx`.
|
|
9
|
+
*
|
|
10
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
11
|
+
*/
|
|
12
|
+
import React, { forwardRef } from 'react';
|
|
13
|
+
var inputCompiledStyles = {
|
|
14
|
+
root: "_19it19hj _2rkofajl _bfhk1j9a _vchhusvi _4t3i1ylp _19bvv47k _ca0qutpp _n3tdutpp _1wyboxwj _1bsb1osq _k48pi7a9 _vwz41aog _1dyzdjp5 _syaz1rpy _4cvxrsbi _irr3l4ek _d0al1kdv"
|
|
15
|
+
};
|
|
16
|
+
export var ChromeCollapsedCompiled = /*#__PURE__*/forwardRef(
|
|
17
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
18
|
+
function (_ref, ref) {
|
|
19
|
+
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
20
|
+
return /*#__PURE__*/React.createElement("input", _extends({
|
|
21
|
+
ref: ref
|
|
22
|
+
}, rest, {
|
|
23
|
+
className: ax([inputCompiledStyles.root])
|
|
24
|
+
}));
|
|
25
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import _objectDestructuringEmpty from "@babel/runtime/helpers/objectDestructuringEmpty";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
/**
|
|
9
|
+
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
10
|
+
* Used via `componentWithCondition` in `index.tsx`.
|
|
11
|
+
*
|
|
12
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
13
|
+
**/
|
|
14
|
+
|
|
15
|
+
import { forwardRef } from 'react';
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
|
|
17
|
+
import { jsx } from '@emotion/react';
|
|
18
|
+
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- intentional: emotion fallback for compiled migration
|
|
20
|
+
import { inputStyle } from './styles';
|
|
21
|
+
export var ChromeCollapsedEmotion = /*#__PURE__*/forwardRef(
|
|
22
|
+
// eslint-disable-next-line react/jsx-props-no-spreading, @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- intentional: emotion fallback for compiled migration
|
|
23
|
+
function (_ref, ref) {
|
|
24
|
+
var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
25
|
+
return jsx("input", _extends({
|
|
26
|
+
ref: ref,
|
|
27
|
+
css: inputStyle
|
|
28
|
+
}, rest));
|
|
29
|
+
});
|
|
@@ -6,17 +6,16 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
6
6
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
7
7
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
8
8
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
9
|
-
/**
|
|
10
|
-
* @jsxRuntime classic
|
|
11
|
-
* @jsx jsx
|
|
12
|
-
*/
|
|
13
9
|
import React, { PureComponent } from 'react';
|
|
14
|
-
|
|
15
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
|
|
16
|
-
import { jsx } from '@emotion/react';
|
|
17
10
|
import { injectIntl } from 'react-intl';
|
|
11
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
12
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
|
+
import { ChromeCollapsedCompiled } from './ChromeCollapsed-compiled';
|
|
14
|
+
import { ChromeCollapsedEmotion } from './ChromeCollapsed-emotion';
|
|
18
15
|
import { messages } from './messages';
|
|
19
|
-
|
|
16
|
+
var InputMigration = componentWithCondition(function () {
|
|
17
|
+
return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
18
|
+
}, ChromeCollapsedCompiled, ChromeCollapsedEmotion);
|
|
20
19
|
// Ignored via go/ees005
|
|
21
20
|
// eslint-disable-next-line @repo/internal/react/no-class-components
|
|
22
21
|
var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
|
|
@@ -51,11 +50,8 @@ var ChromeCollapsed = /*#__PURE__*/function (_PureComponent) {
|
|
|
51
50
|
key: "render",
|
|
52
51
|
value: function render() {
|
|
53
52
|
var placeholder = this.props.text || this.props.intl.formatMessage(messages.chromeCollapsedPlaceholder);
|
|
54
|
-
return
|
|
55
|
-
"data-testid": "chrome-collapsed"
|
|
56
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
57
|
-
,
|
|
58
|
-
css: inputStyle,
|
|
53
|
+
return /*#__PURE__*/React.createElement(InputMigration, {
|
|
54
|
+
"data-testid": "chrome-collapsed",
|
|
59
55
|
ref: this.handleInputRef,
|
|
60
56
|
onFocus: this.focusHandler,
|
|
61
57
|
placeholder: placeholder,
|
|
@@ -10,8 +10,8 @@ import { PluginsComponentsWrapperEmotion } from './PluginSlot-emotion';
|
|
|
10
10
|
var PluginsComponentsWrapperMigration = componentWithCondition(function () {
|
|
11
11
|
return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
12
12
|
}, PluginsComponentsWrapperCompiled, PluginsComponentsWrapperEmotion);
|
|
13
|
-
var
|
|
14
|
-
var
|
|
13
|
+
var PluginComponent = function PluginComponent(_ref) {
|
|
14
|
+
var component = _ref.component,
|
|
15
15
|
editorView = _ref.editorView,
|
|
16
16
|
editorActions = _ref.editorActions,
|
|
17
17
|
eventDispatcher = _ref.eventDispatcher,
|
|
@@ -23,11 +23,43 @@ var PluginSlot = function PluginSlot(_ref) {
|
|
|
23
23
|
containerElement = _ref.containerElement,
|
|
24
24
|
disabled = _ref.disabled,
|
|
25
25
|
dispatchAnalyticsEvent = _ref.dispatchAnalyticsEvent,
|
|
26
|
-
wrapperElement = _ref.wrapperElement
|
|
27
|
-
|
|
26
|
+
wrapperElement = _ref.wrapperElement;
|
|
27
|
+
return component({
|
|
28
|
+
editorView: editorView,
|
|
29
|
+
editorActions: editorActions,
|
|
30
|
+
eventDispatcher: eventDispatcher,
|
|
31
|
+
providerFactory: providerFactory,
|
|
32
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
33
|
+
// Ignored via go/ees005
|
|
34
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
35
|
+
appearance: appearance,
|
|
36
|
+
popupsMountPoint: popupsMountPoint,
|
|
37
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
38
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
39
|
+
containerElement: containerElement,
|
|
40
|
+
disabled: disabled,
|
|
41
|
+
wrapperElement: wrapperElement
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
var PluginSlot = function PluginSlot(_ref2) {
|
|
45
|
+
var items = _ref2.items,
|
|
46
|
+
editorView = _ref2.editorView,
|
|
47
|
+
editorActions = _ref2.editorActions,
|
|
48
|
+
eventDispatcher = _ref2.eventDispatcher,
|
|
49
|
+
providerFactory = _ref2.providerFactory,
|
|
50
|
+
appearance = _ref2.appearance,
|
|
51
|
+
popupsMountPoint = _ref2.popupsMountPoint,
|
|
52
|
+
popupsBoundariesElement = _ref2.popupsBoundariesElement,
|
|
53
|
+
popupsScrollableElement = _ref2.popupsScrollableElement,
|
|
54
|
+
containerElement = _ref2.containerElement,
|
|
55
|
+
disabled = _ref2.disabled,
|
|
56
|
+
dispatchAnalyticsEvent = _ref2.dispatchAnalyticsEvent,
|
|
57
|
+
wrapperElement = _ref2.wrapperElement,
|
|
58
|
+
pluginHooks = _ref2.pluginHooks;
|
|
28
59
|
if (!items && !pluginHooks) {
|
|
29
60
|
return null;
|
|
30
61
|
}
|
|
62
|
+
var isolatePluginSlotFailures = Boolean(items === null || items === void 0 ? void 0 : items.length) && expValEquals('platform_editor_per_plugin_error_boundary', 'isEnabled', true);
|
|
31
63
|
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
32
64
|
component: ACTION_SUBJECT.PLUGIN_SLOT,
|
|
33
65
|
fallbackComponent: null
|
|
@@ -37,9 +69,41 @@ var PluginSlot = function PluginSlot(_ref) {
|
|
|
37
69
|
containerElement: containerElement
|
|
38
70
|
}), /*#__PURE__*/React.createElement(PluginsComponentsWrapperMigration, {
|
|
39
71
|
"data-testid": "plugins-components-wrapper"
|
|
40
|
-
}, items === null || items === void 0 ? void 0 : items.map(function (component,
|
|
72
|
+
}, items === null || items === void 0 ? void 0 : items.map(function (component, index) {
|
|
73
|
+
if (isolatePluginSlotFailures) {
|
|
74
|
+
return (
|
|
75
|
+
/*#__PURE__*/
|
|
76
|
+
// The wrapper adds a small amount of overhead, but moves the plugin factory call
|
|
77
|
+
// inside the per-plugin boundary while still invoking it as a factory.
|
|
78
|
+
React.createElement(ErrorBoundary
|
|
79
|
+
// Switching to a data-derived key currently breaks editor-plugin-ai's
|
|
80
|
+
// Discard flow (which relies on positional remounts to reset modal
|
|
81
|
+
// state). Tracked for follow-up behind a separate gate.
|
|
82
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
83
|
+
, {
|
|
84
|
+
key: index,
|
|
85
|
+
component: ACTION_SUBJECT.PLUGIN_SLOT,
|
|
86
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
87
|
+
fallbackComponent: null
|
|
88
|
+
}, /*#__PURE__*/React.createElement(PluginComponent, {
|
|
89
|
+
component: component,
|
|
90
|
+
editorView: editorView,
|
|
91
|
+
editorActions: editorActions,
|
|
92
|
+
eventDispatcher: eventDispatcher,
|
|
93
|
+
providerFactory: providerFactory,
|
|
94
|
+
appearance: appearance,
|
|
95
|
+
popupsMountPoint: popupsMountPoint,
|
|
96
|
+
popupsBoundariesElement: popupsBoundariesElement,
|
|
97
|
+
popupsScrollableElement: popupsScrollableElement,
|
|
98
|
+
containerElement: containerElement,
|
|
99
|
+
disabled: disabled,
|
|
100
|
+
dispatchAnalyticsEvent: dispatchAnalyticsEvent,
|
|
101
|
+
wrapperElement: wrapperElement
|
|
102
|
+
}))
|
|
103
|
+
);
|
|
104
|
+
}
|
|
41
105
|
var props = {
|
|
42
|
-
key:
|
|
106
|
+
key: index
|
|
43
107
|
};
|
|
44
108
|
var element = component({
|
|
45
109
|
editorView: editorView,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "219.9.
|
|
2
|
+
export var version = "219.9.9";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
export type MarkdownModeView = 'syntax' | '
|
|
2
|
+
export type MarkdownModeView = 'syntax' | 'split-view' | 'preview';
|
|
3
3
|
export type MarkdownModePlugin = NextEditorPlugin<'markdownMode', {
|
|
4
4
|
actions: {
|
|
5
5
|
setView: (view: MarkdownModeView) => void;
|
|
@@ -15,4 +15,4 @@ export interface ChromelessEditorContainerProps extends HTMLAttributes<HTMLDivEl
|
|
|
15
15
|
maxHeight?: number;
|
|
16
16
|
minHeight: number;
|
|
17
17
|
}
|
|
18
|
-
export declare const ChromelessEditorContainerCompiled: ({ children, containerRef, maxHeight, minHeight }: ChromelessEditorContainerProps) => React.JSX.Element;
|
|
18
|
+
export declare const ChromelessEditorContainerCompiled: ({ children, containerRef, maxHeight, minHeight, }: ChromelessEditorContainerProps) => React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
7
|
+
* Used via `componentWithCondition` in `index.tsx`.
|
|
8
|
+
*
|
|
9
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import type { InputHTMLAttributes } from 'react';
|
|
13
|
+
export declare const ChromeCollapsedCompiled: React.ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
/**
|
|
7
|
+
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
8
|
+
* Used via `componentWithCondition` in `index.tsx`.
|
|
9
|
+
*
|
|
10
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
11
|
+
**/
|
|
12
|
+
import type { InputHTMLAttributes } from 'react';
|
|
13
|
+
export declare const ChromeCollapsedEmotion: React.ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
2
|
-
export type MarkdownModeView = 'syntax' | '
|
|
2
|
+
export type MarkdownModeView = 'syntax' | 'split-view' | 'preview';
|
|
3
3
|
export type MarkdownModePlugin = NextEditorPlugin<'markdownMode', {
|
|
4
4
|
actions: {
|
|
5
5
|
setView: (view: MarkdownModeView) => void;
|
|
@@ -15,4 +15,4 @@ export interface ChromelessEditorContainerProps extends HTMLAttributes<HTMLDivEl
|
|
|
15
15
|
maxHeight?: number;
|
|
16
16
|
minHeight: number;
|
|
17
17
|
}
|
|
18
|
-
export declare const ChromelessEditorContainerCompiled: ({ children, containerRef, maxHeight, minHeight }: ChromelessEditorContainerProps) => React.JSX.Element;
|
|
18
|
+
export declare const ChromelessEditorContainerCompiled: ({ children, containerRef, maxHeight, minHeight, }: ChromelessEditorContainerProps) => React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Compiled branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
7
|
+
* Used via `componentWithCondition` in `index.tsx`.
|
|
8
|
+
*
|
|
9
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import type { InputHTMLAttributes } from 'react';
|
|
13
|
+
export declare const ChromeCollapsedCompiled: React.ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
/**
|
|
7
|
+
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
8
|
+
* Used via `componentWithCondition` in `index.tsx`.
|
|
9
|
+
*
|
|
10
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
11
|
+
**/
|
|
12
|
+
import type { InputHTMLAttributes } from 'react';
|
|
13
|
+
export declare const ChromeCollapsedEmotion: React.ForwardRefExoticComponent<InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-core",
|
|
3
|
-
"version": "219.9.
|
|
3
|
+
"version": "219.9.10",
|
|
4
4
|
"description": "A package contains Atlassian editor core functionality",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@atlaskit/editor-toolbar-model": "^0.5.0",
|
|
67
67
|
"@atlaskit/emoji": "^70.10.0",
|
|
68
68
|
"@atlaskit/feature-gate-js-client": "^5.7.0",
|
|
69
|
-
"@atlaskit/icon": "^35.
|
|
69
|
+
"@atlaskit/icon": "^35.2.0",
|
|
70
70
|
"@atlaskit/link": "^3.4.0",
|
|
71
71
|
"@atlaskit/media-card": "^80.5.0",
|
|
72
72
|
"@atlaskit/mention": "^26.0.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"@atlaskit/platform-feature-flags-react": "^0.5.0",
|
|
75
75
|
"@atlaskit/react-ufo": "^6.1.0",
|
|
76
76
|
"@atlaskit/task-decision": "^20.1.0",
|
|
77
|
-
"@atlaskit/tmp-editor-statsig": "^83.
|
|
77
|
+
"@atlaskit/tmp-editor-statsig": "^83.1.0",
|
|
78
78
|
"@atlaskit/tokens": "^13.0.0",
|
|
79
79
|
"@atlaskit/tooltip": "^22.3.0",
|
|
80
80
|
"@atlaskit/width-detector": "^5.1.0",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"uuid": "^3.1.0"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"@atlaskit/editor-common": "^114.
|
|
95
|
+
"@atlaskit/editor-common": "^114.47.0",
|
|
96
96
|
"@atlaskit/link-provider": "^4.4.0",
|
|
97
97
|
"@atlaskit/media-core": "^37.1.0",
|
|
98
98
|
"react": "^18.2.0",
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"@atlaskit/editor-plugin-paste": "^11.2.0",
|
|
114
114
|
"@atlaskit/editor-test-helpers": "workspace:^",
|
|
115
115
|
"@atlaskit/link-provider": "^4.4.0",
|
|
116
|
-
"@atlaskit/linking-common": "^9.
|
|
116
|
+
"@atlaskit/linking-common": "^9.12.0",
|
|
117
117
|
"@atlaskit/logo": "^20.1.0",
|
|
118
118
|
"@atlaskit/media-core": "^37.1.0",
|
|
119
119
|
"@atlaskit/media-integration-test-helpers": "workspace:^",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"@atlaskit/renderer": "^131.1.0",
|
|
125
125
|
"@atlaskit/section-message": "^8.13.0",
|
|
126
126
|
"@atlaskit/synchrony-test-helpers": "workspace:^",
|
|
127
|
-
"@atlaskit/toggle": "^
|
|
127
|
+
"@atlaskit/toggle": "^16.0.0",
|
|
128
128
|
"@atlaskit/util-data-test": "^18.6.0",
|
|
129
129
|
"@atlassian/a11y-jest-testing": "^0.11.0",
|
|
130
130
|
"@atlassian/a11y-playwright-testing": "^0.10.0",
|