@atlaskit/editor-core 197.7.0 → 197.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/afm-cc/tsconfig.json +0 -3
- package/dist/cjs/create-editor/ReactEditorView.js +11 -2
- package/dist/cjs/editor.js +7 -0
- package/dist/cjs/ui/Addon/Dropdown/styles.js +2 -4
- package/dist/cjs/ui/Appearance/Comment/Comment.js +2 -4
- package/dist/cjs/ui/ChromeCollapsed/styles.js +3 -5
- package/dist/cjs/ui/ContentStyles/ai-panels.js +2 -3
- package/dist/cjs/ui/ContentStyles/code-block.js +1 -2
- package/dist/cjs/ui/ContentStyles/expand.js +4 -5
- package/dist/cjs/ui/ContentStyles/extension.js +1 -2
- package/dist/cjs/ui/ContentStyles/index.js +2 -3
- package/dist/cjs/ui/ContentStyles/layout.js +1 -2
- package/dist/cjs/ui/ContentStyles/media.js +1 -2
- package/dist/cjs/ui/ContextPanel/index.js +1 -2
- package/dist/cjs/ui/ToolbarFeedback/styles.js +5 -7
- package/dist/cjs/ui/WithFlash/index.js +3 -4
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/create-editor/ReactEditorView.js +12 -3
- package/dist/es2019/editor.js +7 -0
- package/dist/es2019/ui/Addon/Dropdown/styles.js +2 -4
- package/dist/es2019/ui/Appearance/Comment/Comment.js +2 -4
- package/dist/es2019/ui/ChromeCollapsed/styles.js +3 -5
- package/dist/es2019/ui/ContentStyles/ai-panels.js +4 -5
- package/dist/es2019/ui/ContentStyles/code-block.js +1 -2
- package/dist/es2019/ui/ContentStyles/expand.js +5 -6
- package/dist/es2019/ui/ContentStyles/extension.js +4 -5
- package/dist/es2019/ui/ContentStyles/index.js +4 -5
- package/dist/es2019/ui/ContentStyles/layout.js +2 -3
- package/dist/es2019/ui/ContentStyles/media.js +6 -7
- package/dist/es2019/ui/ContextPanel/index.js +1 -2
- package/dist/es2019/ui/ToolbarFeedback/styles.js +5 -7
- package/dist/es2019/ui/WithFlash/index.js +3 -4
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/create-editor/ReactEditorView.js +12 -3
- package/dist/esm/editor.js +7 -0
- package/dist/esm/ui/Addon/Dropdown/styles.js +2 -4
- package/dist/esm/ui/Appearance/Comment/Comment.js +2 -4
- package/dist/esm/ui/ChromeCollapsed/styles.js +3 -5
- package/dist/esm/ui/ContentStyles/ai-panels.js +2 -3
- package/dist/esm/ui/ContentStyles/code-block.js +1 -2
- package/dist/esm/ui/ContentStyles/expand.js +4 -5
- package/dist/esm/ui/ContentStyles/extension.js +1 -2
- package/dist/esm/ui/ContentStyles/index.js +2 -3
- package/dist/esm/ui/ContentStyles/layout.js +1 -2
- package/dist/esm/ui/ContentStyles/media.js +1 -2
- package/dist/esm/ui/ContextPanel/index.js +1 -2
- package/dist/esm/ui/ToolbarFeedback/styles.js +5 -7
- package/dist/esm/ui/WithFlash/index.js +3 -4
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/editor.d.ts +7 -0
- package/dist/types-ts4.5/editor.d.ts +7 -0
- package/package.json +12 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 197.7.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#140717](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/140717)
|
|
8
|
+
[`142a506a3f170`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/142a506a3f170) -
|
|
9
|
+
ED-24958 prevent confluence full page editor crashing when loading from draft doc
|
|
10
|
+
- [#140717](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/140717)
|
|
11
|
+
[`d3922f33f7268`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d3922f33f7268) -
|
|
12
|
+
[ux] Removing token fallbacks for styling. For apps supporting tokens this has no difference, for
|
|
13
|
+
those not there may be slight variations in colors to align with tokens.
|
|
14
|
+
- [#140665](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/140665)
|
|
15
|
+
[`a578027283b8c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a578027283b8c) -
|
|
16
|
+
added deprecation notice to the Legacy Editor Component
|
|
17
|
+
|
|
3
18
|
## 197.7.0
|
|
4
19
|
|
|
5
20
|
### Minor Changes
|
package/afm-cc/tsconfig.json
CHANGED
|
@@ -30,6 +30,7 @@ var _ufo = require("@atlaskit/editor-common/ufo");
|
|
|
30
30
|
var _analytics2 = require("@atlaskit/editor-common/utils/analytics");
|
|
31
31
|
var _state2 = require("@atlaskit/editor-prosemirror/state");
|
|
32
32
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
33
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
33
34
|
var _eventDispatcher = require("../event-dispatcher");
|
|
34
35
|
var _context = require("../presets/context");
|
|
35
36
|
var _findChangedNodesFromTransaction = require("../utils/findChangedNodesFromTransaction");
|
|
@@ -217,10 +218,18 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
|
|
|
217
218
|
});
|
|
218
219
|
_this.contentTransformer = contentTransformerProvider ? contentTransformerProvider(schema) : undefined;
|
|
219
220
|
var doc;
|
|
221
|
+
var api = _this.pluginInjectionAPI.api();
|
|
222
|
+
// If we have a doc prop, we need to process it into a PMNode
|
|
223
|
+
|
|
220
224
|
if (options.doc) {
|
|
221
|
-
|
|
225
|
+
// if the collabEdit API is set, skip this validation due to potential pm validation errors
|
|
226
|
+
// from docs that end up with invalid marks after processing (See #hot-111702 for more details)
|
|
227
|
+
if ((api === null || api === void 0 ? void 0 : api.collabEdit) !== undefined && (0, _platformFeatureFlags.fg)('editor_load_conf_collab_docs_without_checks')) {
|
|
228
|
+
doc = (0, _processRawValue.processRawValueWithoutTransformation)(schema, options.doc);
|
|
229
|
+
} else {
|
|
230
|
+
doc = (0, _processRawValue.processRawValue)(schema, options.doc, options.props.providerFactory, options.props.editorProps.sanitizePrivateContent, _this.contentTransformer, _this.dispatchAnalyticsEvent);
|
|
231
|
+
}
|
|
222
232
|
}
|
|
223
|
-
var api = _this.pluginInjectionAPI.api();
|
|
224
233
|
var isViewMode = (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.sharedState.currentState().mode) === 'view';
|
|
225
234
|
var selection;
|
|
226
235
|
if (doc) {
|
package/dist/cjs/editor.js
CHANGED
|
@@ -33,6 +33,13 @@ var ComposableEditorWrapper = function ComposableEditorWrapper(_ref) {
|
|
|
33
33
|
preset: preset
|
|
34
34
|
}, props));
|
|
35
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated - Please use the `ComposableEditor` component instead.
|
|
38
|
+
* We strongly encourage the use of custom presets, however your easiest migration path is to use the `useUniversalPreset` hook.
|
|
39
|
+
* The `ComposableEditor` component is a more flexible and customizable alternative to the `Editor` component.
|
|
40
|
+
* It allows you to create an editor with a custom set of plugins and configurations.
|
|
41
|
+
* For more information, see the documentation for the `ComposableEditor` component here: https://atlaskit.atlassian.com/packages/editor/editor-core
|
|
42
|
+
*/
|
|
36
43
|
var Editor = exports.default = /*#__PURE__*/function (_React$Component) {
|
|
37
44
|
(0, _inherits2.default)(Editor, _React$Component);
|
|
38
45
|
var _super = _createSuper(Editor);
|
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.dropdown = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
9
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
10
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
11
9
|
|
|
12
10
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -15,8 +13,8 @@ var dropdown = exports.dropdown = (0, _react.css)({
|
|
|
15
13
|
flexDirection: 'column',
|
|
16
14
|
background: "var(--ds-surface-overlay, white)",
|
|
17
15
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
18
|
-
borderRadius: "
|
|
19
|
-
boxShadow: "var(--ds-shadow-overlay,
|
|
16
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
17
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)",
|
|
20
18
|
boxSizing: 'border-box',
|
|
21
19
|
padding: "var(--ds-space-050, 4px)".concat(" 0")
|
|
22
20
|
});
|
|
@@ -20,8 +20,6 @@ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
|
20
20
|
var _commonStyles = require("@atlaskit/editor-plugins/table/ui/common-styles");
|
|
21
21
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
22
22
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
24
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
25
23
|
var _messages = _interopRequireDefault(require("../../../messages"));
|
|
26
24
|
var _Addon = require("../../Addon");
|
|
27
25
|
var _ContentStyles = require("../../ContentStyles");
|
|
@@ -49,10 +47,10 @@ var commentEditorStyles = (0, _react2.css)({
|
|
|
49
47
|
minWidth: '272px',
|
|
50
48
|
height: 'auto',
|
|
51
49
|
backgroundColor: "var(--ds-background-input, white)",
|
|
52
|
-
border: "1px solid ".concat("var(--ds-border-input,
|
|
50
|
+
border: "1px solid ".concat("var(--ds-border-input, #8590A2)"),
|
|
53
51
|
boxSizing: 'border-box',
|
|
54
52
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
55
|
-
borderRadius: "
|
|
53
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
56
54
|
maxWidth: 'inherit',
|
|
57
55
|
wordWrap: 'break-word'
|
|
58
56
|
});
|
|
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.inputStyle = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
9
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
10
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
11
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
10
|
|
|
13
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -18,7 +16,7 @@ var inputStyle = exports.inputStyle = (0, _react.css)({
|
|
|
18
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
19
17
|
border: "1px solid ".concat("var(--ds-border-input, ".concat(_editorSharedStyles.akEditorSubtleAccent, ")")),
|
|
20
18
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
21
|
-
borderRadius: "
|
|
19
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
22
20
|
boxSizing: 'border-box',
|
|
23
21
|
height: '40px',
|
|
24
22
|
paddingLeft: "var(--ds-space-250, 20px)",
|
|
@@ -30,10 +28,10 @@ var inputStyle = exports.inputStyle = (0, _react.css)({
|
|
|
30
28
|
fontWeight: 400,
|
|
31
29
|
lineHeight: 1.42857142857143,
|
|
32
30
|
letterSpacing: '-0.005em',
|
|
33
|
-
color: "var(--ds-text-subtlest,
|
|
31
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
34
32
|
'&:hover': {
|
|
35
33
|
backgroundColor: "var(--ds-background-input-hovered, white)",
|
|
36
|
-
borderColor: "var(--ds-border-input,
|
|
34
|
+
borderColor: "var(--ds-border-input, #8590A2)",
|
|
37
35
|
cursor: 'text'
|
|
38
36
|
}
|
|
39
37
|
}
|
|
@@ -8,7 +8,6 @@ exports.aiPanelStyles = void 0;
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
10
|
var _react = require("@emotion/react");
|
|
11
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
12
11
|
var _aiPrismColor, _templateObject;
|
|
13
12
|
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; }
|
|
14
13
|
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; } // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
@@ -69,7 +68,7 @@ var prismBorderStyles = function prismBorderStyles(colorMode, hover) {
|
|
|
69
68
|
borderRadius: "calc(".concat("var(--ds-border-radius-100, 3px)", " + 1px)"),
|
|
70
69
|
transform: 'translate3d(0, 0, 0)'
|
|
71
70
|
}, hover ? {
|
|
72
|
-
background: "var(--ds-border-input,
|
|
71
|
+
background: "var(--ds-border-input, #8590A2)"
|
|
73
72
|
} : isFirefox ? {
|
|
74
73
|
background: "linear-gradient(90deg,\n\t\t\t\t\t\t\t\t".concat(aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 0%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 12%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 24%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.4'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 48%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 64%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 80%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.1'][colorMode !== null && colorMode !== void 0 ? colorMode : 'light'], " 100%\n\t\t\t\t\t\t\t)"),
|
|
75
74
|
backgroundSize: '200%'
|
|
@@ -80,5 +79,5 @@ var prismBorderStyles = function prismBorderStyles(colorMode, hover) {
|
|
|
80
79
|
|
|
81
80
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
|
|
82
81
|
var aiPanelStyles = exports.aiPanelStyles = function aiPanelStyles(colorMode) {
|
|
83
|
-
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t@property --panel-gradient-angle {\n\t\tsyntax: '<angle>';\n\t\tinitial-value: 270deg;\n\t\tinherits: false;\n\t}\n\n\tdiv[extensionType='com.atlassian.ai-blocks'] {\n\t\t// This hides the label for the extension\n\t\t.extension-label {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t// This styles the ai panel correctly when its just sitting on the page and there\n\t\t// is no user interaction\n\t\t.extension-container {\n\t\t\tposition: relative;\n\t\t\tbox-shadow: none;\n\t\t\toverflow: unset;\n\t\t\tbackground-color: ", " !important;\n\t\t\t&::before,\n\t\t\t&::after {\n\t\t\t\t", "\n\t\t\t}\n\t\t\t&.with-hover-border {\n\t\t\t\t&::before,\n\t\t\t\t&::after {\n\t\t\t\t\t", "\n\t\t\t\t}\n\t\t\t}\n\t\t\t& .with-margin-styles {\n\t\t\t\tbackground-color: ", " !important;\n\t\t\t\tborder-radius: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t// This styles the ai panel correctly when its streaming\n\tdiv[extensionType='com.atlassian.ai-blocks']:has(.streaming) {\n\t\t.extension-container {\n\t\t\tbox-shadow: none;\n\t\t\toverflow: unset;\n\t\t\t", "\n\t\t\t&::before,\n\t\t\t&::after {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n\n\t// This styles the ai panel correctly when a user is hovering over the delete button in the floating panel\n\tdiv[extensionType='com.atlassian.ai-blocks'].danger {\n\t\t.extension-container {\n\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t}\n\t}\n\n\t// This removes the margin from the action list when inside an ai panel\n\tdiv[extensiontype='com.atlassian.ai-blocks'][extensionkey='ai-action-items-block:aiActionItemsBodiedExtension'] {\n\t\tdiv[data-node-type='actionList'] {\n\t\t\tmargin: 0 !important;\n\t\t}\n\t}\n"])), "var(--ds-surface,
|
|
82
|
+
return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t@property --panel-gradient-angle {\n\t\tsyntax: '<angle>';\n\t\tinitial-value: 270deg;\n\t\tinherits: false;\n\t}\n\n\tdiv[extensionType='com.atlassian.ai-blocks'] {\n\t\t// This hides the label for the extension\n\t\t.extension-label {\n\t\t\tdisplay: none;\n\t\t}\n\n\t\t// This styles the ai panel correctly when its just sitting on the page and there\n\t\t// is no user interaction\n\t\t.extension-container {\n\t\t\tposition: relative;\n\t\t\tbox-shadow: none;\n\t\t\toverflow: unset;\n\t\t\tbackground-color: ", " !important;\n\t\t\t&::before,\n\t\t\t&::after {\n\t\t\t\t", "\n\t\t\t}\n\t\t\t&.with-hover-border {\n\t\t\t\t&::before,\n\t\t\t\t&::after {\n\t\t\t\t\t", "\n\t\t\t\t}\n\t\t\t}\n\t\t\t& .with-margin-styles {\n\t\t\t\tbackground-color: ", " !important;\n\t\t\t\tborder-radius: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t// This styles the ai panel correctly when its streaming\n\tdiv[extensionType='com.atlassian.ai-blocks']:has(.streaming) {\n\t\t.extension-container {\n\t\t\tbox-shadow: none;\n\t\t\toverflow: unset;\n\t\t\t", "\n\t\t\t&::before,\n\t\t\t&::after {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n\n\t// This styles the ai panel correctly when a user is hovering over the delete button in the floating panel\n\tdiv[extensionType='com.atlassian.ai-blocks'].danger {\n\t\t.extension-container {\n\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t}\n\t}\n\n\t// This removes the margin from the action list when inside an ai panel\n\tdiv[extensiontype='com.atlassian.ai-blocks'][extensionkey='ai-action-items-block:aiActionItemsBodiedExtension'] {\n\t\tdiv[data-node-type='actionList'] {\n\t\t\tmargin: 0 !important;\n\t\t}\n\t}\n"])), "var(--ds-surface, #FFFFFF)", prismBorderStyles(colorMode), prismBorderStyles(colorMode, true), "var(--ds-surface, #FFFFFF)", "var(--ds-border-radius-100, 3px)", prismBorderAnimationStyles, prismBorderStyles(colorMode), "var(--ds-border-danger, #E2483D)");
|
|
84
83
|
};
|
|
@@ -9,7 +9,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
|
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
11
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
13
12
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
13
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
15
14
|
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression */
|
|
@@ -21,5 +20,5 @@ var GutterDangerOverlay = function GutterDangerOverlay() {
|
|
|
21
20
|
/* When code-block is inside the panel */
|
|
22
21
|
var firstCodeBlockWithNoMargin = (0, _experiments.editorExperiment)('nested-dnd', true) ? (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t.ak-editor-panel__content {\n\t\t\t\t> .code-block:first-child,\n\t\t\t\t> .ProseMirror-widget:first-child + .code-block,\n\t\t\t\t> .ProseMirror-widget:first-child + .ProseMirror-widget + .code-block {\n\t\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t\t}\n\t\t\t}\n\t\t"]))) : (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t.ak-editor-panel__content {\n\t\t\t\t> .code-block:first-child {\n\t\t\t\t\tmargin: 0 0 0 0 !important;\n\t\t\t\t}\n\t\t\t}\n\t\t"])));
|
|
23
22
|
var codeBlockStyles = exports.codeBlockStyles = function codeBlockStyles() {
|
|
24
|
-
return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t}\n\n\t.ProseMirror li {\n\t\t/* if same list item has multiple code blocks we need top margin for all but first */\n\t\t> .code-block {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\t\t> .code-block:first-child,\n\t\t> .ProseMirror-gapcursor:first-child + .code-block {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t> div:last-of-type.code-block {\n\t\t\tmargin-bottom: ", ";\n\t\t}\n\t}\n\n\t.ProseMirror .code-block.", ":not(.danger) {\n\t\t", "\n\t}\n\n\t/* Danger when top level node */\n\t.ProseMirror .danger.code-block {\n\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t", ";\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t/* Danger when nested node */\n\t.ProseMirror .danger .code-block {\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t", "\n"])), (0, _styles.codeBlockSharedStyles)(), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger,
|
|
23
|
+
return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t}\n\n\t.ProseMirror li {\n\t\t/* if same list item has multiple code blocks we need top margin for all but first */\n\t\t> .code-block {\n\t\t\tmargin: ", " 0 0 0;\n\t\t}\n\t\t> .code-block:first-child,\n\t\t> .ProseMirror-gapcursor:first-child + .code-block {\n\t\t\tmargin-top: 0;\n\t\t}\n\n\t\t> div:last-of-type.code-block {\n\t\t\tmargin-bottom: ", ";\n\t\t}\n\t}\n\n\t.ProseMirror .code-block.", ":not(.danger) {\n\t\t", "\n\t}\n\n\t/* Danger when top level node */\n\t.ProseMirror .danger.code-block {\n\t\tbox-shadow: 0 0 0 ", "px\n\t\t\t", ";\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t/* Danger when nested node */\n\t.ProseMirror .danger .code-block {\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t\t", ";\n\t\t}\n\n\t\t.", " {\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t", "\n"])), (0, _styles.codeBlockSharedStyles)(), _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.blockNodesVerticalMargin, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Blanket]), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, #FFECEB)", "var(--ds-text-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), GutterDangerOverlay(), _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER, "var(--ds-background-danger, rgba(255, 143, 115, 0.5))", "var(--ds-text-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), GutterDangerOverlay(), _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT, "var(--ds-blanket-danger, rgba(255, 189, 173, 0.5))", firstCodeBlockWithNoMargin);
|
|
25
24
|
};
|
|
@@ -10,17 +10,16 @@ var _react = require("@emotion/react");
|
|
|
10
10
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
11
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
12
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
13
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
14
13
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
15
14
|
var _templateObject, _templateObject2; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
15
|
var EXPAND_SELECTED_BACKGROUND = "var(--ds-background-neutral-subtle, rgba(255, 255, 255, 0.6))";
|
|
17
16
|
var EXPAND_ICON_COLOR = function EXPAND_ICON_COLOR() {
|
|
18
17
|
return (0, _react.css)({
|
|
19
|
-
color: "var(--ds-icon-subtle,
|
|
18
|
+
color: "var(--ds-icon-subtle, #626F86)"
|
|
20
19
|
});
|
|
21
20
|
};
|
|
22
|
-
var DANGER_STATE_BACKGROUND_COLOR = "var(--ds-background-danger,
|
|
23
|
-
var DANGER_STATE_BORDER_COLOR = "var(--ds-border-danger,
|
|
21
|
+
var DANGER_STATE_BACKGROUND_COLOR = "var(--ds-background-danger, #FFECEB)";
|
|
22
|
+
var DANGER_STATE_BORDER_COLOR = "var(--ds-border-danger, #E2483D)";
|
|
24
23
|
var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
25
24
|
return (0, _experiments.editorExperiment)('nested-dnd', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
26
25
|
(0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> div.ak-editor-expand[data-node-type='nestedExpand'] {\n\t\t\t\t\tmargin-top: ", ";\n\t\t\t\t}\n\t\t\t"])), "var(--ds-space-050, 0.25rem)") : '';
|
|
@@ -35,5 +34,5 @@ var expandStyles = exports.expandStyles = function expandStyles() {
|
|
|
35
34
|
})(), _styles.expandClassNames.iconContainer, EXPAND_ICON_COLOR(), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.Border]), DANGER_STATE_BACKGROUND_COLOR, DANGER_STATE_BORDER_COLOR, _styles.expandClassNames.type('expand'), _styles.BreakoutCssClassName.BREAKOUT_MARK_DOM, _styles.expandClassNames.type('expand'), _editorSharedStyles.akLayoutGutterOffset + ((0, _experiments.editorExperiment)('nested-dnd', true) ? 8 : 0), _editorSharedStyles.akLayoutGutterOffset + ((0, _experiments.editorExperiment)('nested-dnd', true) ? 8 : 0), _styles.expandClassNames.content, _styles.sharedExpandStyles.contentStyles({
|
|
36
35
|
expanded: false,
|
|
37
36
|
focused: false
|
|
38
|
-
})(), (0, _platformFeatureFlags.fg)('platform_editor_drag_and_drop_expand_style_fix') && "overflow-x: clip;", _styles.expandClassNames.titleInput, _styles.sharedExpandStyles.titleInputStyles(), _styles.expandClassNames.titleContainer, _styles.sharedExpandStyles.titleContainerStyles(), _styles.expandClassNames.expanded, EXPAND_SELECTED_BACKGROUND, "var(--ds-border,
|
|
37
|
+
})(), (0, _platformFeatureFlags.fg)('platform_editor_drag_and_drop_expand_style_fix') && "overflow-x: clip;", _styles.expandClassNames.titleInput, _styles.sharedExpandStyles.titleInputStyles(), _styles.expandClassNames.titleContainer, _styles.sharedExpandStyles.titleContainerStyles(), _styles.expandClassNames.expanded, EXPAND_SELECTED_BACKGROUND, "var(--ds-border, #091E4224)", _styles.expandClassNames.content, "var(--ds-space-100, 8px)", firstNodeWithNotMarginTop(), _styles.expandClassNames.inputContainer, _styles.expandClassNames.prefix, _styles.expandClassNames.expanded, _styles.expandClassNames.prefix, _styles.expandClassNames.expanded, _styles.expandClassNames.iconContainer, EXPAND_ICON_COLOR(), _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border, #091E4224)", EXPAND_SELECTED_BACKGROUND);
|
|
39
38
|
};
|
|
@@ -8,10 +8,9 @@ exports.extensionStyles = void 0;
|
|
|
8
8
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
9
|
var _react = require("@emotion/react");
|
|
10
10
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
12
11
|
var _templateObject, _templateObject2; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
12
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
14
|
-
var extensionLabelStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t&.danger > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t&:not(.danger).", " > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t// Targets the icon for bodied macro styling in button label\n\t&.danger > span > div > .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t&:not(.danger).", " > span > div .extension-label > span {\n\t\tdisplay: inline;\n\t}\n"])), "var(--ds-background-accent-red-subtler,
|
|
13
|
+
var extensionLabelStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t&.danger > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t&:not(.danger).", " > span > div > .extension-label {\n\t\tbackground-color: ", ";\n\t\tcolor: ", ";\n\t\topacity: 1;\n\t\tbox-shadow: none;\n\t}\n\n\t// Targets the icon for bodied macro styling in button label\n\t&.danger > span > div > .extension-label > span {\n\t\tdisplay: inline;\n\t}\n\n\t&:not(.danger).", " > span > div .extension-label > span {\n\t\tdisplay: inline;\n\t}\n"])), "var(--ds-background-accent-red-subtler, #FFD5D2)", "var(--ds-text-danger, #AE2E24)", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-background-selected, #E9F2FF)", "var(--ds-text-selected, #0C66E4)", _editorSharedStyles.akEditorSelectedNodeClassName);
|
|
15
14
|
var dangerOverlayStyles = (0, _react.css)({
|
|
16
15
|
opacity: 0.3,
|
|
17
16
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
@@ -22,7 +22,6 @@ var _styles4 = require("@atlaskit/editor-plugins/paste-options-toolbar/styles");
|
|
|
22
22
|
var _styles5 = require("@atlaskit/editor-plugins/placeholder-text/styles");
|
|
23
23
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
24
24
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
25
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
26
25
|
var _tokens = require("@atlaskit/tokens");
|
|
27
26
|
var _getInlineNodeViewProducer = require("../../nodeviews/getInlineNodeViewProducer.styles");
|
|
28
27
|
var _context = require("../../presets/context");
|
|
@@ -53,7 +52,7 @@ var linkStyles = exports.linkStyles = (0, _react2.css)(_templateObject || (_temp
|
|
|
53
52
|
var ruleStyles = function ruleStyles() {
|
|
54
53
|
return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", ";\n\n\t\thr {\n\t\t\tcursor: pointer;\n\t\t\tpadding: ", " 0;\n\t\t\tmargin: ", " 0;\n\t\t\tbackground-clip: content-box;\n\n\t\t\t&.", " {\n\t\t\t\toutline: none;\n\t\t\t\tbackground-color: ", ";\n\t\t\t}\n\t\t}\n\t}\n"])), (0, _styles.ruleSharedStyles)(), "var(--ds-space-050, 4px)", "var(--ds-space-300, 24px)", _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border-selected, ".concat(_editorSharedStyles.akEditorSelectedBorderColor, ")"));
|
|
55
54
|
};
|
|
56
|
-
var mentionsStyles = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\t&.", " [data-mention-id] > span {\n\t\t\t", "\n\n\t\t\t/* need to specify dark text colour because personal mentions\n (in dark blue) have white text by default */\n color: ", ";\n\t\t}\n\t}\n\n\t.danger {\n\t\t.", ".", "\n\t\t\t> span\n\t\t\t> span\n\t\t\t> span {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\t\t.", " > span > span > span {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t}\n\t}\n"])), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle,
|
|
55
|
+
var mentionsStyles = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\t&.", " [data-mention-id] > span {\n\t\t\t", "\n\n\t\t\t/* need to specify dark text colour because personal mentions\n (in dark blue) have white text by default */\n color: ", ";\n\t\t}\n\t}\n\n\t.danger {\n\t\t.", ".", "\n\t\t\t> span\n\t\t\t> span\n\t\t\t> span {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\t\t.", " > span > span > span {\n\t\t\tbackground-color: ", ";\n\t\t\tcolor: ", ";\n\t\t}\n\t}\n"])), _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow, _editorSharedStyles.SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)", _mention.MentionSharedCssClassName.MENTION_CONTAINER, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackgroundWithOpacity, ")"), _mention.MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, #091E420F)", "var(--ds-text-subtle, #44546F)");
|
|
57
56
|
var listsStyles = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\tli {\n\t\t\tposition: relative;\n\n\t\t\t> p:not(:first-child) {\n\t\t\t\tmargin: ", " 0 0 0;\n\t\t\t}\n\n\t\t\t// In SSR the above rule will apply to all p tags because first-child would be a style tag.\n\t\t\t// The following rule resets the first p tag back to its original margin\n\t\t\t// defined in packages/editor/editor-common/src/styles/shared/paragraph.ts\n\t\t\t> style:first-child + p {\n\t\t\t\tmargin-top: ", ";\n\t\t\t}\n\t\t}\n\n\t\t&:not([data-node-type='decisionList']) > li,\n // This prevents https://product-fabric.atlassian.net/browse/ED-20924\n &:not(.", ") > li {\n\t\t\t", "\n\t\t}\n\t}\n"])), "var(--ds-space-050, 4px)", _editorSharedStyles.blockNodesVerticalMargin, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _browser.browser.safari ? _styles.codeBlockInListSafariFix : '');
|
|
58
57
|
var emojiStyles = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\tdisplay: inline-block;\n\n\t\t.", " {\n\t\t\tcursor: pointer;\n\n\t\t\t&.", " > span {\n\t\t\t\t/** needed for selection style to cover custom emoji image properly */\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t}\n\n\t\t&.", " {\n\t\t\t.", ", .", " {\n\t\t\t\tborder-radius: 2px;\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n"])), _emoji.EmojiSharedCssClassName.EMOJI_CONTAINER, _emoji.EmojiSharedCssClassName.EMOJI_NODE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, _editorSharedStyles.akEditorSelectedNodeClassName, _emoji.EmojiSharedCssClassName.EMOJI_SPRITE, _emoji.EmojiSharedCssClassName.EMOJI_IMAGE, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket, _editorSharedStyles.SelectionStyle.BoxShadow]));
|
|
59
58
|
|
|
@@ -61,7 +60,7 @@ var emojiStyles = (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _
|
|
|
61
60
|
var placeholderStyles = exports.placeholderStyles = (0, _react2.css)({
|
|
62
61
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
63
62
|
'.ProseMirror .placeholder-decoration': {
|
|
64
|
-
color: "var(--ds-text-subtlest,
|
|
63
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
65
64
|
width: '100%',
|
|
66
65
|
pointerEvents: 'none',
|
|
67
66
|
userSelect: 'none',
|
|
@@ -23,7 +23,6 @@ var _styles = require("@atlaskit/editor-common/styles");
|
|
|
23
23
|
var _types = require("@atlaskit/editor-plugins/table/types");
|
|
24
24
|
var _consts = require("@atlaskit/editor-plugins/table/ui/consts");
|
|
25
25
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
26
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
27
26
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
28
27
|
var _templateObject, _templateObject2, _templateObject3; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
29
28
|
var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
@@ -34,5 +33,5 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
|
34
33
|
|
|
35
34
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
36
35
|
var layoutStyles = exports.layoutStyles = function layoutStyles(viewMode) {
|
|
37
|
-
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", " [data-layout-section] {\n\t\t\t// TODO: Migrate away from gridSize\n\t\t\t// Recommendation: Replace directly with 7px\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tmin-width: 0;\n\t\t\t\tborder: ", "px solid\n\t\t\t\t\t", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t[data-layout-column] + [data-layout-column] {\n\t\t\t\tmargin-left: ", "px;\n\t\t\t}\n\n\t\t\t@media screen and (max-width: ", "px) {\n\t\t\t\t[data-layout-column] + [data-layout-column] {\n\t\t\t\t\tmargin-left: 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.\n\t\t\t// This is because the default state already uses the same token and, as such, the hover style won't change anything.\n\t\t\t// https://product-fabric.atlassian.net/browse/DSP-4441\n\t\t\t/* Shows the border when cursor is inside a layout */\n\t\t\t&.selected [data-layout-column],\n\t\t\t&:hover [data-layout-column] {\n\t\t\t\tborder: ", "px solid\n\t\t\t\t\t", ";\n\t\t\t}\n\n\t\t\t&.selected.danger > [data-layout-column] {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\tborder-color: ", ";\n\t\t\t}\n\n\t\t\t&.", ":not(.danger) {\n\t\t\t\t[data-layout-column] {\n\t\t\t\t\t", "\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n"])), _styles.columnLayoutSharedStyle, "var(--ds-space-100, 8px)", _editorSharedStyles.akLayoutGutterOffset + ((0, _experiments.editorExperiment)('nested-dnd', true) ? 8 : 0), _editorSharedStyles.akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border,
|
|
36
|
+
return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", " [data-layout-section] {\n\t\t\t// TODO: Migrate away from gridSize\n\t\t\t// Recommendation: Replace directly with 7px\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tmin-width: 0;\n\t\t\t\tborder: ", "px solid\n\t\t\t\t\t", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t[data-layout-column] + [data-layout-column] {\n\t\t\t\tmargin-left: ", "px;\n\t\t\t}\n\n\t\t\t@media screen and (max-width: ", "px) {\n\t\t\t\t[data-layout-column] + [data-layout-column] {\n\t\t\t\t\tmargin-left: 0;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.\n\t\t\t// This is because the default state already uses the same token and, as such, the hover style won't change anything.\n\t\t\t// https://product-fabric.atlassian.net/browse/DSP-4441\n\t\t\t/* Shows the border when cursor is inside a layout */\n\t\t\t&.selected [data-layout-column],\n\t\t\t&:hover [data-layout-column] {\n\t\t\t\tborder: ", "px solid\n\t\t\t\t\t", ";\n\t\t\t}\n\n\t\t\t&.selected.danger > [data-layout-column] {\n\t\t\t\tbackground-color: ", ";\n\t\t\t\tborder-color: ", ";\n\t\t\t}\n\n\t\t\t&.", ":not(.danger) {\n\t\t\t\t[data-layout-column] {\n\t\t\t\t\t", "\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n"])), _styles.columnLayoutSharedStyle, "var(--ds-space-100, 8px)", _editorSharedStyles.akLayoutGutterOffset + ((0, _experiments.editorExperiment)('nested-dnd', true) ? 8 : 0), _editorSharedStyles.akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", _styles.LAYOUT_COLUMN_PADDING, _styles.LAYOUT_COLUMN_PADDING + ((0, _experiments.editorExperiment)('nested-dnd', true) ? 8 : 0), firstNodeWithNotMarginTop(), _styles.LAYOUT_SECTION_MARGIN, _editorSharedStyles.gridMediumMaxWidth, viewMode === 'view' ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Border, _editorSharedStyles.SelectionStyle.Blanket]), _types.TableCssClassName.TABLE_CONTAINER, _consts.tableMarginFullWidthMode);
|
|
38
37
|
};
|
|
@@ -11,10 +11,9 @@ var _mediaInline = require("@atlaskit/editor-common/media-inline");
|
|
|
11
11
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
12
12
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
13
13
|
var _mediaCard = require("@atlaskit/media-card");
|
|
14
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
15
14
|
var _templateObject; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
15
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
17
|
-
var mediaStyles = exports.mediaStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n\t\t\tmargin-left: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\n\t\t.media-extended-resize-experience[layout^='wrap-'] {\n\t\t\t// override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle\n\t\t\t// to prevent scroll bar\n\t\t\toverflow: visible !important;\n\t\t}\n\n\t\t& [layout^='wrap-'] + [layout^='wrap-'] {\n\t\t\tclear: none;\n\t\t\t& + p,\n\t\t\t& + div[class^='fabric-editor-align'],\n\t\t\t& + ul,\n\t\t\t& + ol,\n\t\t\t& + h1,\n\t\t\t& + h2,\n\t\t\t& + h3,\n\t\t\t& + h4,\n\t\t\t& + h5,\n\t\t\t& + h6 {\n\t\t\t\tclear: both !important;\n\t\t\t}\n\t\t\t& .", " {\n\t\t\t\tmargin-left: 0;\n\t\t\t\tmargin-right: 0;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t.mediaSingleView-content-wrap[layout^='wrap-'] {\n\t\t\tmax-width: 100%;\n\t\t\t// overwrite default Prosemirror setting making it clear: both\n\t\t\tclear: inherit;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-left'] {\n\t\t\tfloat: left;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-right'] {\n\t\t\tfloat: right;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-right']\n\t\t\t+ .mediaSingleView-content-wrap[layout='wrap-left'] {\n\t\t\tclear: both;\n\t\t}\n\n\t\t/* Larger margins for resize handlers when at depth 0 of the document */\n\t\t& > .mediaSingleView-content-wrap {\n\t\t\t.richMedia-resize-handle-right {\n\t\t\t\tmargin-right: -", "px;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-left {\n\t\t\t\tmargin-left: -", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t.richMedia-resize-handle-right,\n\t.richMedia-resize-handle-left {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\t/* vertical align */\n\t\tjustify-content: center;\n\t}\n\n\t.richMedia-resize-handle-right {\n\t\talign-items: flex-end;\n\t\tpadding-right: ", ";\n\t\tmargin-right: -", "px;\n\t}\n\n\t.richMedia-resize-handle-left {\n\t\talign-items: flex-start;\n\t\tpadding-left: ", ";\n\t\tmargin-left: -", "px;\n\t}\n\n\t.richMedia-resize-handle-right::after,\n\t.richMedia-resize-handle-left::after {\n\t\tcontent: ' ';\n\t\tdisplay: flex;\n\t\twidth: 3px;\n\t\theight: 64px;\n\n\t\tborder-radius: 6px;\n\t}\n\n\t.", ":hover .richMedia-resize-handle-left::after,\n\t.", ":hover .richMedia-resize-handle-right::after {\n\t\tbackground: ", ";\n\t}\n\n\t.", " .richMedia-resize-handle-right::after,\n\t.", " .richMedia-resize-handle-left::after,\n\t.", " .richMedia-resize-handle-right:hover::after,\n\t.", " .richMedia-resize-handle-left:hover::after,\n\t.", ".is-resizing .richMedia-resize-handle-right::after,\n\t.", ".is-resizing .richMedia-resize-handle-left::after {\n\t\tbackground: ", ";\n\t}\n\n\t.__resizable_base__ {\n\t\tleft: unset !important;\n\t\twidth: auto !important;\n\t\theight: auto !important;\n\t}\n\n\t/* Danger when top level node for smart cards / inline links */\n\t.danger > div > div > .media-card-frame,\n\t.danger > span > a {\n\t\tbackground-color: ", ";\n\t\tbox-shadow: 0px 0px 0px ", "px\n\t\t\t", ";\n\t\ttransition:\n\t\t\tbackground-color 0s,\n\t\t\tbox-shadow 0s;\n\t}\n\t/* Danger when nested node or common */\n\t.danger {\n\t\t/* Media single */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t/* Media single video player */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t/* New file experience */\n\t\t.", " .", " {\n\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t}\n\t\t/* Media resize legacy handlers */\n\t\t.richMedia-resize-handle-right::after,\n\t\t.richMedia-resize-handle-left::after {\n\t\t\tbackground: ", " !important;\n\t\t}\n\t\t/* Media resize new handlers */\n\t\t.resizer-handle-thumb {\n\t\t\tbackground: ", " !important;\n\t\t}\n\n\t\t/* Smart cards */\n\t\tdiv div .media-card-frame,\n\t\t.inlineCardView-content-wrap > span > a {\n\t\t\tbackground-color: ", "; /* R75 with 50% opactiy */\n\t\t\ttransition: background-color 0s;\n\t\t}\n\n\t\tdiv div .media-card-frame::after {\n\t\t\tbox-shadow: none;\n\t\t}\n\t}\n\n\t.warning {\n\t\t/* Media single */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t.", " .", " {\n\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t}\n\n\t\t.resizer-handle-thumb {\n\t\t\tbackground: ", " !important;\n\t\t}\n\t}\n\n\t/* When clicking drag handle, mediaGroup node will be selected. Hence we need to apply selected style to each media node */\n\t.mediaGroupView-content-wrap.", " #newFileExperienceWrapper {\n\t\tbox-shadow: ", ";\n\t}\n"])), _styles.mediaSingleSharedStyle, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _mediaInline.mediaInlineImageStyles, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, "var(--ds-space-150, 12px)", _editorSharedStyles.akEditorMediaResizeHandlerPadding, "var(--ds-space-150, 12px)", _editorSharedStyles.akEditorMediaResizeHandlerPadding, _styles.richMediaClassName, _styles.richMediaClassName, "var(--ds-border,
|
|
16
|
+
var mediaStyles = exports.mediaStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", " & [layout='full-width'] .", ",\n & [layout='wide'] .", " {\n\t\t\tmargin-left: 50%;\n\t\t\ttransform: translateX(-50%);\n\t\t}\n\n\t\t.media-extended-resize-experience[layout^='wrap-'] {\n\t\t\t// override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle\n\t\t\t// to prevent scroll bar\n\t\t\toverflow: visible !important;\n\t\t}\n\n\t\t& [layout^='wrap-'] + [layout^='wrap-'] {\n\t\t\tclear: none;\n\t\t\t& + p,\n\t\t\t& + div[class^='fabric-editor-align'],\n\t\t\t& + ul,\n\t\t\t& + ol,\n\t\t\t& + h1,\n\t\t\t& + h2,\n\t\t\t& + h3,\n\t\t\t& + h4,\n\t\t\t& + h5,\n\t\t\t& + h6 {\n\t\t\t\tclear: both !important;\n\t\t\t}\n\t\t\t& .", " {\n\t\t\t\tmargin-left: 0;\n\t\t\t\tmargin-right: 0;\n\t\t\t}\n\t\t}\n\n\t\t", "\n\n\t\t.mediaSingleView-content-wrap[layout^='wrap-'] {\n\t\t\tmax-width: 100%;\n\t\t\t// overwrite default Prosemirror setting making it clear: both\n\t\t\tclear: inherit;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-left'] {\n\t\t\tfloat: left;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-right'] {\n\t\t\tfloat: right;\n\t\t}\n\n\t\t.mediaSingleView-content-wrap[layout='wrap-right']\n\t\t\t+ .mediaSingleView-content-wrap[layout='wrap-left'] {\n\t\t\tclear: both;\n\t\t}\n\n\t\t/* Larger margins for resize handlers when at depth 0 of the document */\n\t\t& > .mediaSingleView-content-wrap {\n\t\t\t.richMedia-resize-handle-right {\n\t\t\t\tmargin-right: -", "px;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-left {\n\t\t\t\tmargin-left: -", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t.richMedia-resize-handle-right,\n\t.richMedia-resize-handle-left {\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\t/* vertical align */\n\t\tjustify-content: center;\n\t}\n\n\t.richMedia-resize-handle-right {\n\t\talign-items: flex-end;\n\t\tpadding-right: ", ";\n\t\tmargin-right: -", "px;\n\t}\n\n\t.richMedia-resize-handle-left {\n\t\talign-items: flex-start;\n\t\tpadding-left: ", ";\n\t\tmargin-left: -", "px;\n\t}\n\n\t.richMedia-resize-handle-right::after,\n\t.richMedia-resize-handle-left::after {\n\t\tcontent: ' ';\n\t\tdisplay: flex;\n\t\twidth: 3px;\n\t\theight: 64px;\n\n\t\tborder-radius: 6px;\n\t}\n\n\t.", ":hover .richMedia-resize-handle-left::after,\n\t.", ":hover .richMedia-resize-handle-right::after {\n\t\tbackground: ", ";\n\t}\n\n\t.", " .richMedia-resize-handle-right::after,\n\t.", " .richMedia-resize-handle-left::after,\n\t.", " .richMedia-resize-handle-right:hover::after,\n\t.", " .richMedia-resize-handle-left:hover::after,\n\t.", ".is-resizing .richMedia-resize-handle-right::after,\n\t.", ".is-resizing .richMedia-resize-handle-left::after {\n\t\tbackground: ", ";\n\t}\n\n\t.__resizable_base__ {\n\t\tleft: unset !important;\n\t\twidth: auto !important;\n\t\theight: auto !important;\n\t}\n\n\t/* Danger when top level node for smart cards / inline links */\n\t.danger > div > div > .media-card-frame,\n\t.danger > span > a {\n\t\tbackground-color: ", ";\n\t\tbox-shadow: 0px 0px 0px ", "px\n\t\t\t", ";\n\t\ttransition:\n\t\t\tbackground-color 0s,\n\t\t\tbox-shadow 0s;\n\t}\n\t/* Danger when nested node or common */\n\t.danger {\n\t\t/* Media single */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t/* Media single video player */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\t\t/* New file experience */\n\t\t.", " .", " {\n\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t}\n\t\t/* Media resize legacy handlers */\n\t\t.richMedia-resize-handle-right::after,\n\t\t.richMedia-resize-handle-left::after {\n\t\t\tbackground: ", " !important;\n\t\t}\n\t\t/* Media resize new handlers */\n\t\t.resizer-handle-thumb {\n\t\t\tbackground: ", " !important;\n\t\t}\n\n\t\t/* Smart cards */\n\t\tdiv div .media-card-frame,\n\t\t.inlineCardView-content-wrap > span > a {\n\t\t\tbackground-color: ", "; /* R75 with 50% opactiy */\n\t\t\ttransition: background-color 0s;\n\t\t}\n\n\t\tdiv div .media-card-frame::after {\n\t\t\tbox-shadow: none;\n\t\t}\n\t}\n\n\t.warning {\n\t\t/* Media single */\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t.", " .", "::after {\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t.", " .", " {\n\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t}\n\n\t\t.resizer-handle-thumb {\n\t\t\tbackground: ", " !important;\n\t\t}\n\t}\n\n\t/* When clicking drag handle, mediaGroup node will be selected. Hence we need to apply selected style to each media node */\n\t.mediaGroupView-content-wrap.", " #newFileExperienceWrapper {\n\t\tbox-shadow: ", ";\n\t}\n"])), _styles.mediaSingleSharedStyle, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _mediaInline.mediaInlineImageStyles, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, _editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, "var(--ds-space-150, 12px)", _editorSharedStyles.akEditorMediaResizeHandlerPadding, "var(--ds-space-150, 12px)", _editorSharedStyles.akEditorMediaResizeHandlerPadding, _styles.richMediaClassName, _styles.richMediaClassName, "var(--ds-border, #091E4224)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedNodeClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, _styles.richMediaClassName, "var(--ds-border-focused, #388BFF)", "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _editorSharedStyles.akEditorSelectedBorderBoldSize, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _styles.richMediaClassName, _mediaCard.fileCardImageViewSelector, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _styles.richMediaClassName, _mediaCard.inlinePlayerClassName, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), _styles.richMediaClassName, _mediaCard.newFileExperienceClassName, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-icon-danger, ".concat(_editorSharedStyles.akEditorDeleteIconColor, ")"), "var(--ds-blanket-danger, rgb(255, 189, 173, 0.5))", _styles.richMediaClassName, _mediaCard.fileCardImageViewSelector, "var(--ds-border-warning, #E56910)", _styles.richMediaClassName, _mediaCard.inlinePlayerClassName, "var(--ds-border-warning, #E56910)", _styles.richMediaClassName, _mediaCard.newFileExperienceClassName, "var(--ds-border-warning, #E56910)", "var(--ds-icon-warning, #E56910)", _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBoxShadow);
|
|
18
17
|
|
|
19
18
|
/* `left: unset` above is to work around Chrome bug where rendering a div with
|
|
20
19
|
* that style applied inside a container that has a scroll, causes any svgs on
|
|
@@ -20,7 +20,6 @@ var _Transition = _interopRequireDefault(require("react-transition-group/Transit
|
|
|
20
20
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
21
21
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
22
22
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
23
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
24
23
|
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; }
|
|
25
24
|
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; }
|
|
26
25
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
@@ -41,7 +40,7 @@ var panel = exports.panel = (0, _react2.css)({
|
|
|
41
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
42
41
|
transition: "width ".concat(ANIM_SPEED_MS, "ms ").concat(_editorSharedStyles.akEditorSwoopCubicBezier),
|
|
43
42
|
overflow: 'hidden',
|
|
44
|
-
boxShadow: "inset 2px 0 0 0 ".concat("var(--ds-border,
|
|
43
|
+
boxShadow: "inset 2px 0 0 0 ".concat("var(--ds-border, #091E4224)")
|
|
45
44
|
});
|
|
46
45
|
|
|
47
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -6,8 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.wrapper = exports.confirmationText = exports.confirmationPopup = exports.confirmationImg = exports.confirmationHeader = exports.buttonContent = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
9
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
10
|
-
var _constants = require("@atlaskit/theme/constants");
|
|
11
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
12
10
|
|
|
13
11
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
@@ -26,10 +24,10 @@ var wrapper = exports.wrapper = (0, _react.css)({
|
|
|
26
24
|
|
|
27
25
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
28
26
|
var confirmationPopup = exports.confirmationPopup = (0, _react.css)({
|
|
29
|
-
background: "var(--ds-surface-overlay, #
|
|
27
|
+
background: "var(--ds-surface-overlay, #FFFFFF)",
|
|
30
28
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
31
|
-
borderRadius: "
|
|
32
|
-
boxShadow: "var(--ds-shadow-overlay,
|
|
29
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
30
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)",
|
|
33
31
|
display: 'flex',
|
|
34
32
|
flexDirection: 'column',
|
|
35
33
|
boxSizing: 'border-box',
|
|
@@ -45,7 +43,7 @@ var confirmationText = exports.confirmationText = (0, _react.css)({
|
|
|
45
43
|
fontSize: (0, _editorSharedStyles.relativeFontSizeToBase16)(14),
|
|
46
44
|
wordSpacing: '4px',
|
|
47
45
|
lineHeight: '22px',
|
|
48
|
-
color: "var(--ds-text-subtle,
|
|
46
|
+
color: "var(--ds-text-subtle, #44546F)",
|
|
49
47
|
marginTop: "var(--ds-space-400, 32px)",
|
|
50
48
|
padding: "var(--ds-space-250, 20px)",
|
|
51
49
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -64,7 +62,7 @@ var confirmationText = exports.confirmationText = (0, _react.css)({
|
|
|
64
62
|
|
|
65
63
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
66
64
|
var confirmationHeader = exports.confirmationHeader = (0, _react.css)({
|
|
67
|
-
backgroundColor: "var(--ds-background-discovery-bold,
|
|
65
|
+
backgroundColor: "var(--ds-background-discovery-bold, #6E5DC6)",
|
|
68
66
|
height: '100px',
|
|
69
67
|
width: '100%',
|
|
70
68
|
display: 'inline-block'
|
|
@@ -14,7 +14,6 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
|
|
|
14
14
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
15
|
var _react = _interopRequireDefault(require("react"));
|
|
16
16
|
var _react2 = require("@emotion/react");
|
|
17
|
-
var _colors = require("@atlaskit/theme/colors");
|
|
18
17
|
function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = (0, _getPrototypeOf2.default)(t); if (r) { var s = (0, _getPrototypeOf2.default)(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return (0, _possibleConstructorReturn2.default)(this, e); }; }
|
|
19
18
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /**
|
|
20
19
|
* @jsxRuntime classic
|
|
@@ -22,18 +21,18 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
22
21
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
23
22
|
var pulseBackground = (0, _react2.keyframes)({
|
|
24
23
|
'50%': {
|
|
25
|
-
backgroundColor: "var(--ds-blanket-danger,
|
|
24
|
+
backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
|
|
26
25
|
}
|
|
27
26
|
});
|
|
28
27
|
var pulseBackgroundReverse = (0, _react2.keyframes)({
|
|
29
28
|
'0%': {
|
|
30
|
-
backgroundColor: "var(--ds-blanket-danger,
|
|
29
|
+
backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
|
|
31
30
|
},
|
|
32
31
|
'50%': {
|
|
33
32
|
backgroundColor: 'auto'
|
|
34
33
|
},
|
|
35
34
|
'100%': {
|
|
36
|
-
backgroundColor: "var(--ds-blanket-danger,
|
|
35
|
+
backgroundColor: "var(--ds-blanket-danger, #EF5C4814)"
|
|
37
36
|
}
|
|
38
37
|
});
|
|
39
38
|
var flashWrapper = (0, _react2.css)({
|
|
@@ -11,11 +11,12 @@ import { startMeasure, stopMeasure } from '@atlaskit/editor-common/performance-m
|
|
|
11
11
|
import { measureRender } from '@atlaskit/editor-common/performance/measure-render';
|
|
12
12
|
import { getResponseEndTime } from '@atlaskit/editor-common/performance/navigation';
|
|
13
13
|
import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
|
|
14
|
-
import { processRawValue } from '@atlaskit/editor-common/process-raw-value';
|
|
14
|
+
import { processRawValue, processRawValueWithoutTransformation } from '@atlaskit/editor-common/process-raw-value';
|
|
15
15
|
import { EditorExperience, ExperienceStore, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
|
|
16
16
|
import { analyticsEventKey, getAnalyticsEventSeverity } from '@atlaskit/editor-common/utils/analytics';
|
|
17
17
|
import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
18
18
|
import { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
19
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
20
|
import { createDispatch, EventDispatcher } from '../event-dispatcher';
|
|
20
21
|
import { EditorAPIContext } from '../presets/context';
|
|
21
22
|
import { findChangedNodesFromTransaction } from '../utils/findChangedNodesFromTransaction';
|
|
@@ -214,10 +215,18 @@ export class ReactEditorView extends React.Component {
|
|
|
214
215
|
});
|
|
215
216
|
this.contentTransformer = contentTransformerProvider ? contentTransformerProvider(schema) : undefined;
|
|
216
217
|
let doc;
|
|
218
|
+
const api = this.pluginInjectionAPI.api();
|
|
219
|
+
// If we have a doc prop, we need to process it into a PMNode
|
|
220
|
+
|
|
217
221
|
if (options.doc) {
|
|
218
|
-
|
|
222
|
+
// if the collabEdit API is set, skip this validation due to potential pm validation errors
|
|
223
|
+
// from docs that end up with invalid marks after processing (See #hot-111702 for more details)
|
|
224
|
+
if ((api === null || api === void 0 ? void 0 : api.collabEdit) !== undefined && fg('editor_load_conf_collab_docs_without_checks')) {
|
|
225
|
+
doc = processRawValueWithoutTransformation(schema, options.doc);
|
|
226
|
+
} else {
|
|
227
|
+
doc = processRawValue(schema, options.doc, options.props.providerFactory, options.props.editorProps.sanitizePrivateContent, this.contentTransformer, this.dispatchAnalyticsEvent);
|
|
228
|
+
}
|
|
219
229
|
}
|
|
220
|
-
const api = this.pluginInjectionAPI.api();
|
|
221
230
|
const isViewMode = (api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.sharedState.currentState().mode) === 'view';
|
|
222
231
|
let selection;
|
|
223
232
|
if (doc) {
|
package/dist/es2019/editor.js
CHANGED
|
@@ -23,6 +23,13 @@ const ComposableEditorWrapper = ({
|
|
|
23
23
|
preset: preset
|
|
24
24
|
}, props));
|
|
25
25
|
};
|
|
26
|
+
/**
|
|
27
|
+
* @deprecated - Please use the `ComposableEditor` component instead.
|
|
28
|
+
* We strongly encourage the use of custom presets, however your easiest migration path is to use the `useUniversalPreset` hook.
|
|
29
|
+
* The `ComposableEditor` component is a more flexible and customizable alternative to the `Editor` component.
|
|
30
|
+
* It allows you to create an editor with a custom set of plugins and configurations.
|
|
31
|
+
* For more information, see the documentation for the `ComposableEditor` component here: https://atlaskit.atlassian.com/packages/editor/editor-core
|
|
32
|
+
*/
|
|
26
33
|
export default class Editor extends React.Component {
|
|
27
34
|
constructor(props) {
|
|
28
35
|
super(props);
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
2
|
import { css } from '@emotion/react';
|
|
3
|
-
import { N60A } from '@atlaskit/theme/colors';
|
|
4
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
5
3
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
6
4
|
export const dropdown = css({
|
|
7
5
|
display: 'flex',
|
|
8
6
|
flexDirection: 'column',
|
|
9
7
|
background: "var(--ds-surface-overlay, white)",
|
|
10
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
11
|
-
borderRadius:
|
|
12
|
-
boxShadow:
|
|
9
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
10
|
+
boxShadow: "var(--ds-shadow-overlay, 0px 8px 12px #091E4226, 0px 0px 1px #091E424f)",
|
|
13
11
|
boxSizing: 'border-box',
|
|
14
12
|
padding: `${"var(--ds-space-050, 4px)"} 0`
|
|
15
13
|
});
|
|
@@ -17,8 +17,6 @@ import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-me
|
|
|
17
17
|
import { tableCommentEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
18
18
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
19
19
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
|
-
import { N100 } from '@atlaskit/theme/colors';
|
|
21
|
-
import { borderRadius } from '@atlaskit/theme/constants';
|
|
22
20
|
import messages from '../../../messages';
|
|
23
21
|
import { ClickAreaBlock } from '../../Addon';
|
|
24
22
|
import { createEditorContentStyle } from '../../ContentStyles';
|
|
@@ -37,10 +35,10 @@ const commentEditorStyles = css({
|
|
|
37
35
|
minWidth: '272px',
|
|
38
36
|
height: 'auto',
|
|
39
37
|
backgroundColor: "var(--ds-background-input, white)",
|
|
40
|
-
border: `1px solid ${
|
|
38
|
+
border: `1px solid ${"var(--ds-border-input, #8590A2)"}`,
|
|
41
39
|
boxSizing: 'border-box',
|
|
42
40
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
43
|
-
borderRadius:
|
|
41
|
+
borderRadius: "var(--ds-border-radius, 3px)",
|
|
44
42
|
maxWidth: 'inherit',
|
|
45
43
|
wordWrap: 'break-word'
|
|
46
44
|
});
|