@atlaskit/editor-core 219.9.6 → 219.9.7
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 +14 -0
- package/dist/cjs/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.compiled.css +2 -0
- package/dist/cjs/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.js +31 -0
- package/dist/cjs/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.js +36 -0
- package/dist/cjs/ui/Addon/ClickAreaBlock/index.js +8 -14
- package/dist/cjs/ui/Appearance/Chromeless-compiled.compiled.css +27 -0
- package/dist/cjs/ui/Appearance/Chromeless-compiled.js +40 -0
- package/dist/cjs/ui/Appearance/Chromeless-emotion.js +91 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +21 -81
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer-emotion.js +1 -1
- package/dist/cjs/ui/PluginSlot/PluginSlot-compiled.compiled.css +1 -0
- package/dist/cjs/ui/PluginSlot/PluginSlot-compiled.js +33 -0
- package/dist/cjs/ui/PluginSlot/PluginSlot-emotion.js +35 -0
- package/dist/cjs/ui/PluginSlot/index.js +10 -15
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.compiled.css +2 -0
- package/dist/es2019/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.js +19 -0
- package/dist/es2019/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.js +26 -0
- package/dist/es2019/ui/Addon/ClickAreaBlock/index.js +6 -13
- package/dist/es2019/ui/Appearance/Chromeless-compiled.compiled.css +27 -0
- package/dist/es2019/ui/Appearance/Chromeless-compiled.js +32 -0
- package/dist/es2019/ui/Appearance/Chromeless-emotion.js +82 -0
- package/dist/es2019/ui/Appearance/Chromeless.js +17 -82
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer-emotion.js +1 -1
- package/dist/es2019/ui/PluginSlot/PluginSlot-compiled.compiled.css +1 -0
- package/dist/es2019/ui/PluginSlot/PluginSlot-compiled.js +21 -0
- package/dist/es2019/ui/PluginSlot/PluginSlot-emotion.js +25 -0
- package/dist/es2019/ui/PluginSlot/index.js +8 -14
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.compiled.css +2 -0
- package/dist/esm/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.js +22 -0
- package/dist/esm/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.js +30 -0
- package/dist/esm/ui/Addon/ClickAreaBlock/index.js +8 -13
- package/dist/esm/ui/Appearance/Chromeless-compiled.compiled.css +27 -0
- package/dist/esm/ui/Appearance/Chromeless-compiled.js +33 -0
- package/dist/esm/ui/Appearance/Chromeless-emotion.js +85 -0
- package/dist/esm/ui/Appearance/Chromeless.js +19 -81
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer-emotion.js +1 -1
- package/dist/esm/ui/PluginSlot/PluginSlot-compiled.compiled.css +1 -0
- package/dist/esm/ui/PluginSlot/PluginSlot-compiled.js +24 -0
- package/dist/esm/ui/PluginSlot/PluginSlot-emotion.js +29 -0
- package/dist/esm/ui/PluginSlot/index.js +10 -14
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.d.ts +10 -0
- package/dist/types/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.d.ts +12 -0
- package/dist/types/ui/Addon/ClickAreaBlock/index.d.ts +1 -6
- package/dist/types/ui/Appearance/Chromeless-compiled.d.ts +18 -0
- package/dist/types/ui/Appearance/Chromeless-emotion.d.ts +18 -0
- package/dist/types/ui/Appearance/Chromeless.d.ts +10 -14
- package/dist/types/ui/PluginSlot/PluginSlot-compiled.d.ts +12 -0
- package/dist/types/ui/PluginSlot/PluginSlot-emotion.d.ts +12 -0
- package/dist/types/ui/PluginSlot/index.d.ts +0 -4
- package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/clickAreaBlock-compiled.d.ts +10 -0
- package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/clickAreaBlock-emotion.d.ts +12 -0
- package/dist/types-ts4.5/ui/Addon/ClickAreaBlock/index.d.ts +1 -6
- package/dist/types-ts4.5/ui/Appearance/Chromeless-compiled.d.ts +18 -0
- package/dist/types-ts4.5/ui/Appearance/Chromeless-emotion.d.ts +18 -0
- package/dist/types-ts4.5/ui/Appearance/Chromeless.d.ts +10 -14
- package/dist/types-ts4.5/ui/PluginSlot/PluginSlot-compiled.d.ts +12 -0
- package/dist/types-ts4.5/ui/PluginSlot/PluginSlot-emotion.d.ts +12 -0
- package/dist/types-ts4.5/ui/PluginSlot/index.d.ts +0 -4
- package/editor-core.docs.tsx +55 -53
- package/package.json +10 -10
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
2
|
+
var _excluded = ["children", "containerRef", "maxHeight", "minHeight"];
|
|
3
|
+
/**
|
|
4
|
+
* @jsxRuntime classic
|
|
5
|
+
* @jsx jsx
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
9
|
+
* Used via `componentWithCondition` in `Chromeless.tsx`.
|
|
10
|
+
*
|
|
11
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- intentional: emotion fallback; jsx required at runtime for @jsxRuntime classic
|
|
15
|
+
import { css, jsx } from '@emotion/react';
|
|
16
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
17
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
18
|
+
var scrollbarStylesNew = css({
|
|
19
|
+
msOverflowStyle: '-ms-autohiding-scrollbar',
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
21
|
+
'&::-webkit-scrollbar-corner': {
|
|
22
|
+
display: 'none'
|
|
23
|
+
},
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
25
|
+
'&::-webkit-scrollbar-thumb': {
|
|
26
|
+
backgroundColor: "var(--ds-background-neutral-subtle, #00000000)"
|
|
27
|
+
},
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
29
|
+
'&:hover::-webkit-scrollbar-thumb': {
|
|
30
|
+
backgroundColor: "var(--ds-background-neutral-bold, #292A2E)",
|
|
31
|
+
borderRadius: "var(--ds-radius-large, 8px)"
|
|
32
|
+
},
|
|
33
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
34
|
+
'&::-webkit-scrollbar-thumb:hover': {
|
|
35
|
+
backgroundColor: "var(--ds-background-neutral-bold-hovered, #3B3D42)"
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
var chromelessEditorStylesNew = css({
|
|
39
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
40
|
+
lineHeight: '20px',
|
|
41
|
+
height: 'auto',
|
|
42
|
+
overflowX: 'hidden',
|
|
43
|
+
overflowY: 'auto',
|
|
44
|
+
maxWidth: 'inherit',
|
|
45
|
+
boxSizing: 'border-box',
|
|
46
|
+
wordWrap: 'break-word',
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
48
|
+
'div > .ProseMirror': {
|
|
49
|
+
outline: 'none',
|
|
50
|
+
whiteSpace: 'pre-wrap',
|
|
51
|
+
padding: 0,
|
|
52
|
+
margin: 0,
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
54
|
+
'& > :last-child': {
|
|
55
|
+
paddingBottom: "var(--ds-space-100, 8px)"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
59
|
+
'.ProseMirror': {
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
61
|
+
'& > p:last-of-type': {
|
|
62
|
+
marginBottom: "var(--ds-space-0, 0px)"
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
export var ChromelessEditorContainerEmotion = function ChromelessEditorContainerEmotion(_ref) {
|
|
67
|
+
var children = _ref.children,
|
|
68
|
+
containerRef = _ref.containerRef,
|
|
69
|
+
maxHeight = _ref.maxHeight,
|
|
70
|
+
minHeight = _ref.minHeight,
|
|
71
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
72
|
+
return jsx("div", {
|
|
73
|
+
css: [chromelessEditorStylesNew, scrollbarStylesNew]
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
75
|
+
,
|
|
76
|
+
className: fg('platform_editor_chromeless_akeditor_class') || expValEquals('create_work_item_modernization_exp', 'isEnabled', true) ? 'akEditor' : undefined,
|
|
77
|
+
style: {
|
|
78
|
+
maxHeight: maxHeight ? "".concat(maxHeight, "px") : undefined,
|
|
79
|
+
minHeight: "".concat(minHeight, "px")
|
|
80
|
+
},
|
|
81
|
+
ref: containerRef,
|
|
82
|
+
"data-testid": "chromeless-editor",
|
|
83
|
+
id: "chromeless-editor"
|
|
84
|
+
}, children);
|
|
85
|
+
};
|
|
@@ -6,68 +6,15 @@ 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, { Fragment } 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 { css, jsx } from '@emotion/react';
|
|
17
10
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
18
|
-
import {
|
|
11
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
19
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
13
|
import EditorContentContainer from '../EditorContentContainer/EditorContentContainer';
|
|
21
14
|
import PluginSlot from '../PluginSlot';
|
|
22
15
|
import WithFlash from '../WithFlash';
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
26
|
-
'&::-webkit-scrollbar-corner': {
|
|
27
|
-
display: 'none'
|
|
28
|
-
},
|
|
29
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
30
|
-
'&::-webkit-scrollbar-thumb': {
|
|
31
|
-
backgroundColor: "var(--ds-background-neutral-subtle, #00000000)"
|
|
32
|
-
},
|
|
33
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
34
|
-
'&:hover::-webkit-scrollbar-thumb': {
|
|
35
|
-
backgroundColor: "var(--ds-background-neutral-bold, #292A2E)",
|
|
36
|
-
borderRadius: "var(--ds-radius-large, 8px)"
|
|
37
|
-
},
|
|
38
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
39
|
-
'&::-webkit-scrollbar-thumb:hover': {
|
|
40
|
-
backgroundColor: "var(--ds-background-neutral-bold-hovered, #3B3D42)"
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
var chromelessEditorStylesNew = css({
|
|
44
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
45
|
-
lineHeight: '20px',
|
|
46
|
-
height: 'auto',
|
|
47
|
-
overflowX: 'hidden',
|
|
48
|
-
overflowY: 'auto',
|
|
49
|
-
maxWidth: 'inherit',
|
|
50
|
-
boxSizing: 'border-box',
|
|
51
|
-
wordWrap: 'break-word',
|
|
52
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
53
|
-
'div > .ProseMirror': {
|
|
54
|
-
outline: 'none',
|
|
55
|
-
whiteSpace: 'pre-wrap',
|
|
56
|
-
padding: 0,
|
|
57
|
-
margin: 0,
|
|
58
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
59
|
-
'& > :last-child': {
|
|
60
|
-
paddingBottom: "var(--ds-space-100, 8px)"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
64
|
-
'.ProseMirror': {
|
|
65
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
66
|
-
'& > p:last-of-type': {
|
|
67
|
-
marginBottom: "var(--ds-space-0, 0px)"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
});
|
|
16
|
+
import { ChromelessEditorContainerCompiled } from './Chromeless-compiled';
|
|
17
|
+
import { ChromelessEditorContainerEmotion } from './Chromeless-emotion';
|
|
71
18
|
/**
|
|
72
19
|
* Render the editor in a chromeless appearance.
|
|
73
20
|
* Example use is the inline comment editor, which doesn't have editor toolbar
|
|
@@ -115,20 +62,20 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
115
62
|
var containerRef = expValEquals('platform_editor_perf_lint_cleanup', 'isEnabled', true) ? _this.setContainerElement : function (ref) {
|
|
116
63
|
return _this.containerElement = ref;
|
|
117
64
|
};
|
|
118
|
-
return
|
|
65
|
+
return /*#__PURE__*/React.createElement(WithFlash, {
|
|
119
66
|
animate: maxContentSizeReached
|
|
120
|
-
},
|
|
67
|
+
}, /*#__PURE__*/React.createElement(ChromelessEditorContainer, {
|
|
121
68
|
maxHeight: maxHeight,
|
|
122
69
|
minHeight: minHeight,
|
|
123
70
|
containerRef: containerRef
|
|
124
|
-
},
|
|
71
|
+
}, /*#__PURE__*/React.createElement(EditorContentContainer
|
|
125
72
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
126
73
|
, {
|
|
127
74
|
className: "ak-editor-content-area",
|
|
128
75
|
featureFlags: featureFlags,
|
|
129
76
|
viewMode: editorViewMode,
|
|
130
77
|
appearance: _this.appearance
|
|
131
|
-
}, customContentComponents && 'before' in customContentComponents ? customContentComponents.before : customContentComponents,
|
|
78
|
+
}, customContentComponents && 'before' in customContentComponents ? customContentComponents.before : customContentComponents, /*#__PURE__*/React.createElement(PluginSlot, {
|
|
132
79
|
editorView: editorView,
|
|
133
80
|
editorActions: editorActions,
|
|
134
81
|
eventDispatcher: eventDispatcher,
|
|
@@ -151,7 +98,7 @@ var Editor = /*#__PURE__*/function (_React$Component) {
|
|
|
151
98
|
return _createClass(Editor, [{
|
|
152
99
|
key: "render",
|
|
153
100
|
value: function render() {
|
|
154
|
-
return
|
|
101
|
+
return /*#__PURE__*/React.createElement(RenderWithPluginState, {
|
|
155
102
|
editorAPI: this.props.editorAPI,
|
|
156
103
|
renderChrome: this.renderChrome
|
|
157
104
|
});
|
|
@@ -173,26 +120,17 @@ function RenderWithPluginState(_ref2) {
|
|
|
173
120
|
var maxContentSize = maxContentSizeReached === undefined ? undefined : {
|
|
174
121
|
maxContentSizeReached: maxContentSizeReached
|
|
175
122
|
};
|
|
176
|
-
return
|
|
123
|
+
return /*#__PURE__*/React.createElement(Fragment, null, renderChrome({
|
|
177
124
|
maxContentSize: maxContentSize
|
|
178
125
|
}));
|
|
179
126
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
style: {
|
|
191
|
-
maxHeight: maxHeight ? "".concat(maxHeight, "px") : undefined,
|
|
192
|
-
minHeight: "".concat(minHeight, "px")
|
|
193
|
-
},
|
|
194
|
-
"data-testid": "chromeless-editor",
|
|
195
|
-
id: "chromeless-editor",
|
|
196
|
-
ref: containerRef
|
|
197
|
-
}, children);
|
|
198
|
-
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Container for the chromeless editor appearance. This is used to set the max and min height
|
|
130
|
+
* of the editor content area, and to provide a ref to the container element for the popups.
|
|
131
|
+
* @param param0 props for the chromeless editor container
|
|
132
|
+
* @returns JSX element representing the chromeless editor container
|
|
133
|
+
*/
|
|
134
|
+
export var ChromelessEditorContainer = componentWithCondition(function () {
|
|
135
|
+
return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
136
|
+
}, ChromelessEditorContainerCompiled, ChromelessEditorContainerEmotion);
|
|
@@ -365,7 +365,7 @@ export var EditorContentContainerEmotion = /*#__PURE__*/React.forwardRef(functio
|
|
|
365
365
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
366
366
|
unsupportedStyles,
|
|
367
367
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
368
|
-
resizerStyles, expValEquals('databases-native-embeds-v2', 'isEnabled', true) &&
|
|
368
|
+
resizerStyles, expValEqualsNoExposure('cc-maui-experiment', 'isEnabled', true) && expValEquals('databases-native-embeds-v2', 'isEnabled', true) &&
|
|
369
369
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
370
370
|
resizerBottomHandleStyles,
|
|
371
371
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._1e0c1txw{display:flex}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/* PluginSlot-compiled.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["children"];
|
|
5
|
+
import "./PluginSlot-compiled.compiled.css";
|
|
6
|
+
import * as React from 'react';
|
|
7
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
8
|
+
/**
|
|
9
|
+
* Compiled 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
|
+
var pluginsComponentsWrapperCompiledStyles = {
|
|
16
|
+
root: "_1e0c1txw"
|
|
17
|
+
};
|
|
18
|
+
export var PluginsComponentsWrapperCompiled = function PluginsComponentsWrapperCompiled(_ref) {
|
|
19
|
+
var children = _ref.children,
|
|
20
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, rest, {
|
|
22
|
+
className: ax([pluginsComponentsWrapperCompiledStyles.root])
|
|
23
|
+
}), children);
|
|
24
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["children"];
|
|
4
|
+
/**
|
|
5
|
+
* @jsxRuntime classic
|
|
6
|
+
* @jsx jsx
|
|
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
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- intentional: emotion fallback for compiled migration
|
|
16
|
+
import { css, jsx } from '@emotion/react';
|
|
17
|
+
var pluginsComponentsWrapperEmotionStyles = css({
|
|
18
|
+
display: 'flex'
|
|
19
|
+
});
|
|
20
|
+
export var PluginsComponentsWrapperEmotion = function PluginsComponentsWrapperEmotion(_ref) {
|
|
21
|
+
var children = _ref.children,
|
|
22
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
return (
|
|
24
|
+
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
25
|
+
jsx("div", _extends({
|
|
26
|
+
css: pluginsComponentsWrapperEmotionStyles
|
|
27
|
+
}, rest), children)
|
|
28
|
+
);
|
|
29
|
+
};
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
1
|
import React from 'react';
|
|
6
|
-
|
|
7
|
-
// 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
|
|
8
|
-
import { css, jsx } from '@emotion/react';
|
|
9
2
|
import isEqual from 'lodash/isEqual';
|
|
10
3
|
import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
5
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
6
|
import { ErrorBoundary } from '../ErrorBoundary';
|
|
12
7
|
import { MountPluginHooks } from './mount-plugin-hooks';
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
import { PluginsComponentsWrapperCompiled } from './PluginSlot-compiled';
|
|
9
|
+
import { PluginsComponentsWrapperEmotion } from './PluginSlot-emotion';
|
|
10
|
+
var PluginsComponentsWrapperMigration = componentWithCondition(function () {
|
|
11
|
+
return expValEquals('platform_editor_core_non_ecc_static_css', 'isEnabled', true);
|
|
12
|
+
}, PluginsComponentsWrapperCompiled, PluginsComponentsWrapperEmotion);
|
|
16
13
|
var PluginSlot = function PluginSlot(_ref) {
|
|
17
14
|
var items = _ref.items,
|
|
18
15
|
editorView = _ref.editorView,
|
|
@@ -31,15 +28,14 @@ var PluginSlot = function PluginSlot(_ref) {
|
|
|
31
28
|
if (!items && !pluginHooks) {
|
|
32
29
|
return null;
|
|
33
30
|
}
|
|
34
|
-
return
|
|
31
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, {
|
|
35
32
|
component: ACTION_SUBJECT.PLUGIN_SLOT,
|
|
36
33
|
fallbackComponent: null
|
|
37
|
-
},
|
|
34
|
+
}, /*#__PURE__*/React.createElement(MountPluginHooks, {
|
|
38
35
|
editorView: editorView,
|
|
39
36
|
pluginHooks: pluginHooks,
|
|
40
37
|
containerElement: containerElement
|
|
41
|
-
}),
|
|
42
|
-
css: pluginsComponentsWrapper,
|
|
38
|
+
}), /*#__PURE__*/React.createElement(PluginsComponentsWrapperMigration, {
|
|
43
39
|
"data-testid": "plugins-components-wrapper"
|
|
44
40
|
}, items === null || items === void 0 ? void 0 : items.map(function (component, key) {
|
|
45
41
|
var props = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export var name = "@atlaskit/editor-core";
|
|
2
|
-
export var version = "219.9.
|
|
2
|
+
export var version = "219.9.6";
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
import type { HTMLAttributes } from 'react';
|
|
10
|
+
export declare const ClickAreaBlockContainerCompiled: ({ children, ...rest }: HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Emotion fallback 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 type { HTMLAttributes } from 'react';
|
|
12
|
+
export declare const ClickAreaBlockContainerEmotion: ({ children, ...rest }: HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
1
|
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
3
|
export interface Props {
|
|
9
4
|
children?: React.ReactNode;
|
|
10
5
|
editorDisabled?: boolean;
|
|
11
6
|
editorView?: EditorView;
|
|
12
7
|
}
|
|
13
|
-
export declare const ClickAreaBlock: ({ editorView, editorDisabled, children, }: Props) =>
|
|
8
|
+
export declare const ClickAreaBlock: ({ editorView, editorDisabled, children, }: Props) => React.JSX.Element;
|
|
14
9
|
export default ClickAreaBlock;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 `Chromeless.tsx`.
|
|
8
|
+
*
|
|
9
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import type { HTMLAttributes } from 'react';
|
|
13
|
+
export interface ChromelessEditorContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
containerRef?: (ref: HTMLElement | null) => void;
|
|
15
|
+
maxHeight?: number;
|
|
16
|
+
minHeight: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const ChromelessEditorContainerCompiled: ({ children, containerRef, maxHeight, minHeight }: ChromelessEditorContainerProps) => React.JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
7
|
+
* Used via `componentWithCondition` in `Chromeless.tsx`.
|
|
8
|
+
*
|
|
9
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
+
*/
|
|
11
|
+
import type { HTMLAttributes } from 'react';
|
|
12
|
+
import { jsx } from '@emotion/react';
|
|
13
|
+
export interface ChromelessEditorContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
containerRef?: (ref: HTMLElement | null) => void;
|
|
15
|
+
maxHeight?: number;
|
|
16
|
+
minHeight: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const ChromelessEditorContainerEmotion: ({ children, containerRef, maxHeight, minHeight, ...rest }: ChromelessEditorContainerProps) => jsx.JSX.Element;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React, { type FC } from 'react';
|
|
7
2
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
8
3
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
9
4
|
import type { MaxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
|
|
10
5
|
import type { EditorAppearanceComponentProps } from '../../types';
|
|
6
|
+
import { type ChromelessEditorContainerProps } from './Chromeless-emotion';
|
|
11
7
|
type AppearanceProps = EditorAppearanceComponentProps<[
|
|
12
8
|
OptionalPlugin<MaxContentSizePlugin>,
|
|
13
9
|
OptionalPlugin<EditorViewModePlugin>
|
|
@@ -22,13 +18,13 @@ export default class Editor extends React.Component<AppearanceProps> {
|
|
|
22
18
|
private containerElement;
|
|
23
19
|
private setContainerElement;
|
|
24
20
|
private renderChrome;
|
|
25
|
-
render():
|
|
26
|
-
}
|
|
27
|
-
interface ChromelessEditorContainerProps {
|
|
28
|
-
children: React.ReactNode;
|
|
29
|
-
containerRef?: (ref: HTMLElement | null) => void;
|
|
30
|
-
maxHeight?: number;
|
|
31
|
-
minHeight: number;
|
|
21
|
+
render(): React.JSX.Element;
|
|
32
22
|
}
|
|
33
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Container for the chromeless editor appearance. This is used to set the max and min height
|
|
25
|
+
* of the editor content area, and to provide a ref to the container element for the popups.
|
|
26
|
+
* @param param0 props for the chromeless editor container
|
|
27
|
+
* @returns JSX element representing the chromeless editor container
|
|
28
|
+
*/
|
|
29
|
+
export declare const ChromelessEditorContainer: FC<ChromelessEditorContainerProps & ChromelessEditorContainerProps>;
|
|
34
30
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
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 type { HTMLAttributes } from 'react';
|
|
12
|
+
export declare const PluginsComponentsWrapperCompiled: ({ children, ...rest }: HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Emotion fallback 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 type { HTMLAttributes } from 'react';
|
|
12
|
+
export declare const PluginsComponentsWrapperEmotion: ({ children, ...rest }: HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
+
import type { HTMLAttributes } from 'react';
|
|
10
|
+
export declare const ClickAreaBlockContainerCompiled: ({ children, ...rest }: HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Emotion fallback 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 type { HTMLAttributes } from 'react';
|
|
12
|
+
export declare const ClickAreaBlockContainerEmotion: ({ children, ...rest }: HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
1
|
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
7
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
8
3
|
export interface Props {
|
|
9
4
|
children?: React.ReactNode;
|
|
10
5
|
editorDisabled?: boolean;
|
|
11
6
|
editorView?: EditorView;
|
|
12
7
|
}
|
|
13
|
-
export declare const ClickAreaBlock: ({ editorView, editorDisabled, children, }: Props) =>
|
|
8
|
+
export declare const ClickAreaBlock: ({ editorView, editorDisabled, children, }: Props) => React.JSX.Element;
|
|
14
9
|
export default ClickAreaBlock;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 `Chromeless.tsx`.
|
|
8
|
+
*
|
|
9
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import type { HTMLAttributes } from 'react';
|
|
13
|
+
export interface ChromelessEditorContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
containerRef?: (ref: HTMLElement | null) => void;
|
|
15
|
+
maxHeight?: number;
|
|
16
|
+
minHeight: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const ChromelessEditorContainerCompiled: ({ children, containerRef, maxHeight, minHeight }: ChromelessEditorContainerProps) => React.JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Emotion fallback branch of the `platform_editor_core_non_ecc_static_css` experiment.
|
|
7
|
+
* Used via `componentWithCondition` in `Chromeless.tsx`.
|
|
8
|
+
*
|
|
9
|
+
* Cleanup: delete this file once the experiment has shipped.
|
|
10
|
+
*/
|
|
11
|
+
import type { HTMLAttributes } from 'react';
|
|
12
|
+
import { jsx } from '@emotion/react';
|
|
13
|
+
export interface ChromelessEditorContainerProps extends HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
containerRef?: (ref: HTMLElement | null) => void;
|
|
15
|
+
maxHeight?: number;
|
|
16
|
+
minHeight: number;
|
|
17
|
+
}
|
|
18
|
+
export declare const ChromelessEditorContainerEmotion: ({ children, containerRef, maxHeight, minHeight, ...rest }: ChromelessEditorContainerProps) => jsx.JSX.Element;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
import React, { type FC } from 'react';
|
|
7
2
|
import type { OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
8
3
|
import type { EditorViewModePlugin } from '@atlaskit/editor-plugins/editor-viewmode';
|
|
9
4
|
import type { MaxContentSizePlugin } from '@atlaskit/editor-plugins/max-content-size';
|
|
10
5
|
import type { EditorAppearanceComponentProps } from '../../types';
|
|
6
|
+
import { type ChromelessEditorContainerProps } from './Chromeless-emotion';
|
|
11
7
|
type AppearanceProps = EditorAppearanceComponentProps<[
|
|
12
8
|
OptionalPlugin<MaxContentSizePlugin>,
|
|
13
9
|
OptionalPlugin<EditorViewModePlugin>
|
|
@@ -22,13 +18,13 @@ export default class Editor extends React.Component<AppearanceProps> {
|
|
|
22
18
|
private containerElement;
|
|
23
19
|
private setContainerElement;
|
|
24
20
|
private renderChrome;
|
|
25
|
-
render():
|
|
26
|
-
}
|
|
27
|
-
interface ChromelessEditorContainerProps {
|
|
28
|
-
children: React.ReactNode;
|
|
29
|
-
containerRef?: (ref: HTMLElement | null) => void;
|
|
30
|
-
maxHeight?: number;
|
|
31
|
-
minHeight: number;
|
|
21
|
+
render(): React.JSX.Element;
|
|
32
22
|
}
|
|
33
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Container for the chromeless editor appearance. This is used to set the max and min height
|
|
25
|
+
* of the editor content area, and to provide a ref to the container element for the popups.
|
|
26
|
+
* @param param0 props for the chromeless editor container
|
|
27
|
+
* @returns JSX element representing the chromeless editor container
|
|
28
|
+
*/
|
|
29
|
+
export declare const ChromelessEditorContainer: FC<ChromelessEditorContainerProps & ChromelessEditorContainerProps>;
|
|
34
30
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
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 type { HTMLAttributes } from 'react';
|
|
12
|
+
export declare const PluginsComponentsWrapperCompiled: ({ children, ...rest }: HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Emotion fallback 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 type { HTMLAttributes } from 'react';
|
|
12
|
+
export declare const PluginsComponentsWrapperEmotion: ({ children, ...rest }: HTMLAttributes<HTMLDivElement>) => React.JSX.Element;
|