@atlaskit/editor-core 207.1.2 → 207.2.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 +18 -0
- package/afm-jira/tsconfig.json +3 -0
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +28 -234
- package/dist/cjs/ui/EditorContentContainer/styles/ai-panel.js +97 -0
- package/dist/cjs/ui/EditorContentContainer/styles/backgroundColorStyles.js +32 -0
- package/dist/cjs/ui/EditorContentContainer/styles/layout.js +126 -0
- package/dist/cjs/ui/EditorContentContainer/styles/link.js +32 -0
- package/dist/cjs/ui/EditorContentContainer/styles/rule.js +29 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +21 -773
- package/dist/es2019/ui/EditorContentContainer/styles/ai-panel.js +213 -0
- package/dist/es2019/ui/EditorContentContainer/styles/backgroundColorStyles.js +26 -0
- package/dist/es2019/ui/EditorContentContainer/styles/layout.js +517 -0
- package/dist/es2019/ui/EditorContentContainer/styles/link.js +26 -0
- package/dist/es2019/ui/EditorContentContainer/styles/rule.js +22 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +30 -237
- package/dist/esm/ui/EditorContentContainer/styles/ai-panel.js +91 -0
- package/dist/esm/ui/EditorContentContainer/styles/backgroundColorStyles.js +26 -0
- package/dist/esm/ui/EditorContentContainer/styles/layout.js +120 -0
- package/dist/esm/ui/EditorContentContainer/styles/link.js +26 -0
- package/dist/esm/ui/EditorContentContainer/styles/rule.js +21 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/EditorContentContainer/EditorContentContainer.d.ts +0 -11
- package/dist/types/ui/EditorContentContainer/styles/ai-panel.d.ts +2 -0
- package/dist/types/ui/EditorContentContainer/styles/backgroundColorStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/layout.d.ts +2 -0
- package/dist/types/ui/EditorContentContainer/styles/link.d.ts +2 -0
- package/dist/types/ui/EditorContentContainer/styles/rule.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/EditorContentContainer.d.ts +0 -11
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/ai-panel.d.ts +2 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/backgroundColorStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/layout.d.ts +2 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/link.d.ts +2 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/rule.d.ts +1 -0
- package/package.json +2 -6
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.backgroundColorStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
11
|
+
var backgroundColorStyles = exports.backgroundColorStyles = (0, _react.css)({
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
13
|
+
'.fabric-background-color-mark': {
|
|
14
|
+
backgroundColor: 'var(--custom-palette-color, inherit)',
|
|
15
|
+
borderRadius: 2,
|
|
16
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
17
|
+
paddingTop: 1,
|
|
18
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
19
|
+
paddingBottom: 2,
|
|
20
|
+
boxDecorationBreak: 'clone'
|
|
21
|
+
},
|
|
22
|
+
// Don't show text highlight styling when there is a hyperlink
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
24
|
+
'a .fabric-background-color-mark': {
|
|
25
|
+
backgroundColor: 'unset'
|
|
26
|
+
},
|
|
27
|
+
// Don't show text highlight styling when there is an inline comment
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
29
|
+
'.fabric-background-color-mark .ak-editor-annotation': {
|
|
30
|
+
backgroundColor: 'unset'
|
|
31
|
+
}
|
|
32
|
+
});
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.layoutViewStyles = exports.layoutBaseStyles = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _react = require("@emotion/react");
|
|
11
|
+
var _styles = require("@atlaskit/editor-common/styles");
|
|
12
|
+
var _types = require("@atlaskit/editor-plugins/table/types");
|
|
13
|
+
var _consts = require("@atlaskit/editor-plugins/table/ui/consts");
|
|
14
|
+
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14, _templateObject15, _templateObject16, _templateObject17, _templateObject18, _templateObject19, _templateObject20; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
18
|
+
var columnLayoutSharedStyle = (0, _react.css)({
|
|
19
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
20
|
+
'[data-layout-section]': (0, _defineProperty2.default)({
|
|
21
|
+
position: 'relative',
|
|
22
|
+
display: 'flex',
|
|
23
|
+
flexDirection: 'row',
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
25
|
+
'& > *': {
|
|
26
|
+
flex: 1,
|
|
27
|
+
minWidth: 0
|
|
28
|
+
},
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
30
|
+
'& > .unsupportedBlockView-content-wrap': {
|
|
31
|
+
minWidth: 'initial'
|
|
32
|
+
}
|
|
33
|
+
}, "@media screen and (max-width: ".concat(_editorSharedStyles.gridMediumMaxWidth, "px)"), {
|
|
34
|
+
flexDirection: 'column'
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
var columnLayoutResponsiveSharedStyle = (0, _react.css)({
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
39
|
+
'[data-layout-section]': {
|
|
40
|
+
display: 'flex',
|
|
41
|
+
flexDirection: 'row',
|
|
42
|
+
gap: "var(--ds-space-100, 8px)",
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
44
|
+
'& > *': {
|
|
45
|
+
flex: 1,
|
|
46
|
+
minWidth: 0
|
|
47
|
+
},
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
49
|
+
'& > .unsupportedBlockView-content-wrap': {
|
|
50
|
+
minWidth: 'initial'
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
54
|
+
'.layout-section-container': {
|
|
55
|
+
containerType: 'inline-size',
|
|
56
|
+
containerName: 'layout-area'
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
60
|
+
return (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
61
|
+
(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\t\t\t"]))) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
62
|
+
(0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :not(style):first-child,\n\t\t\t\t> style:first-child + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"])));
|
|
63
|
+
};
|
|
64
|
+
var layoutColumnStyles = function layoutColumnStyles() {
|
|
65
|
+
return (0, _experiments.editorExperiment)('advanced_layouts', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
66
|
+
(0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> [data-layout-column] {\n\t\t\t\t\tmargin: 0 ", "px;\n\t\t\t\t}\n\n\t\t\t\t> [data-layout-column]:first-of-type {\n\t\t\t\t\tmargin-left: 0;\n\t\t\t\t}\n\n\t\t\t\t> [data-layout-column]:last-of-type {\n\t\t\t\t\tmargin-right: 0;\n\t\t\t\t}\n\n\t\t\t\t@media screen and (max-width: ", "px) {\n\t\t\t\t\t[data-layout-column] + [data-layout-column] {\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t> [data-layout-column].", ":not(.danger) {\n\t\t\t\t\t", ";\n\t\t\t\t\t/* layout column selection shorter after layout border has been removed */\n\t\t\t\t\t::before {\n\t\t\t\t\t\twidth: calc(100% - 8px);\n\t\t\t\t\t\tleft: 4px;\n\t\t\t\t\t\tborder-radius: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"])), _styles.LAYOUT_SECTION_MARGIN / 2, _editorSharedStyles.gridMediumMaxWidth, _editorSharedStyles.akEditorSelectedNodeClassName, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket]), "var(--ds-border-radius, 3px)") : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
67
|
+
(0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t[data-layout-column] + [data-layout-column] {\n\t\t\t\t\tmargin-left: ", "px;\n\t\t\t\t}\n\n\t\t\t\t@media screen and (max-width: ", "px) {\n\t\t\t\t\t[data-layout-column] + [data-layout-column] {\n\t\t\t\t\t\tmargin-left: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"])), _styles.LAYOUT_SECTION_MARGIN, _editorSharedStyles.gridMediumMaxWidth);
|
|
68
|
+
};
|
|
69
|
+
var layoutSectionStyles = function layoutSectionStyles() {
|
|
70
|
+
return (0, _experiments.editorExperiment)('advanced_layouts', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
71
|
+
(0, _react.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t", ";\n\t\t\t\t.layout-section-container [data-layout-section] {\n\t\t\t\t\t> .ProseMirror-widget {\n\t\t\t\t\t\tflex: none;\n\t\t\t\t\t\tdisplay: contents !important;\n\n\t\t\t\t\t\t&[data-blocks-drag-handle-container] div {\n\t\t\t\t\t\t\tdisplay: contents !important;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t&[data-blocks-drop-target-container] {\n\t\t\t\t\t\t\tdisplay: block !important;\n\t\t\t\t\t\t\tmargin: ", ";\n\n\t\t\t\t\t\t\t[data-drop-target-for-element] {\n\t\t\t\t\t\t\t\tposition: absolute;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t& + [data-layout-column] {\n\t\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t> [data-layout-column] {\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"])), columnLayoutResponsiveSharedStyle, "var(--ds-space-negative-050, -4px)") : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
72
|
+
(0, _react.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t", "\n\t\t\t"])), columnLayoutSharedStyle);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
76
|
+
var layoutBorderBaseStyles = (0, _react.css)(_templateObject7 || (_templateObject7 = (0, _taggedTemplateLiteral2.default)(["\n\t/* TODO: Remove the border styles below once design tokens have been enabled and fallbacks are no longer triggered.\n\tThis is because the default state already uses the same token and, as such, the hover style won't change anything.\n\thttps://product-fabric.atlassian.net/browse/DSP-4441 */\n\t/* Shows the border when cursor is inside a layout */\n\t&.selected [data-layout-column],\n\t&:hover [data-layout-column] {\n\t\tborder: ", "px solid ", ";\n\t}\n\n\t&.selected.danger [data-layout-column] {\n\t\tbackground-color: ", ";\n\t\tborder-color: ", ";\n\t}\n\n\t&.", ":not(.danger) {\n\t\t[data-layout-column] {\n\t\t\t", "\n\t\t\t::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t}\n\t}\n"])), _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]));
|
|
77
|
+
|
|
78
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
79
|
+
var layoutBorderViewStyles = (0, _react.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\n\t&.selected [data-layout-column],\n\t&:hover [data-layout-column] {\n\t\tborder: 0;\n\t}\n"])));
|
|
80
|
+
|
|
81
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
82
|
+
var columnSeparatorBaseStyles = (0, _react.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t[data-layout-content]::before {\n\t\tcontent: '';\n\t\tborder-left: ", "px solid ", ";\n\t\tposition: absolute;\n\t\theight: calc(100% - 24px);\n\t\tmargin-left: -25px;\n\t}\n"])), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)");
|
|
83
|
+
|
|
84
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
85
|
+
var columnSeparatorViewStyles = (0, _react.css)(_templateObject10 || (_templateObject10 = (0, _taggedTemplateLiteral2.default)(["\n\t[data-layout-content]::before {\n\t\tborder-left: 0;\n\t}\n"])));
|
|
86
|
+
|
|
87
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
88
|
+
var rowSeparatorBaseStyles = (0, _react.css)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n\t[data-layout-content]::before {\n\t\tcontent: '';\n\t\tborder-top: ", "px solid ", ";\n\t\tposition: absolute;\n\t\twidth: calc(100% - 32px);\n\t\tmargin-top: -13px;\n\n\t\t/* clear styles for column separator */\n\t\tborder-left: unset;\n\t\tmargin-left: unset;\n\t\theight: unset;\n\t}\n"])), _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)");
|
|
89
|
+
|
|
90
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
91
|
+
var rowSeparatorViewStyles = (0, _react.css)(_templateObject12 || (_templateObject12 = (0, _taggedTemplateLiteral2.default)(["\n\t[data-layout-content]::before {\n\t\tborder-top: 0;\n\t}\n"])));
|
|
92
|
+
|
|
93
|
+
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
94
|
+
var layoutWithSeparatorBorderResponsiveBaseStyles = function layoutWithSeparatorBorderResponsiveBaseStyles(breakpoint
|
|
95
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
96
|
+
) {
|
|
97
|
+
return (0, _react.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n\t&.selected,\n\t&:hover,\n\t&.selected.danger,\n\t&.", ":not(.danger) {\n\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t@container editor-area (max-width:", "px) {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, breakpoint, rowSeparatorBaseStyles);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
101
|
+
var layoutWithSeparatorBorderResponsiveViewStyles = function layoutWithSeparatorBorderResponsiveViewStyles(breakpoint
|
|
102
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
103
|
+
) {
|
|
104
|
+
return (0, _react.css)(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n\t&.selected,\n\t&:hover,\n\t&.selected.danger,\n\t&.", ":not(.danger) {\n\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t@container editor-area (max-width:", "px) {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\t}\n"])), _editorSharedStyles.akEditorSelectedNodeClassName, breakpoint, rowSeparatorViewStyles);
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
108
|
+
var layoutWithSeparatorBorderBaseStyles = (0, _react.css)(_templateObject15 || (_templateObject15 = (0, _taggedTemplateLiteral2.default)(["\n\t&.selected [data-layout-column]:not(:first-of-type),\n\t[data-empty-layout='true'] [data-layout-column]:not(:first-of-type),\n\t&:hover [data-layout-column]:not(:first-of-type) {\n\t\t", "\n\t}\n\n\t&.selected.danger [data-layout-section] {\n\t\tbackground-color: ", ";\n\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\tborder-radius: 4px;\n\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&.", ":not(.danger) [data-layout-section] {\n\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\tborder-radius: 4px;\n\t\tbackground-color: ", ";\n\t\t[data-layout-column] {\n\t\t\t", "\n\t\t\tborder: 0px;\n\t\t\t::before {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t}\n\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t", "\n\t\t}\n\t}\n"])), columnSeparatorBaseStyles, "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), _editorSharedStyles.akEditorSelectedBorderSize, _editorSharedStyles.akEditorDeleteBorder, columnSeparatorBaseStyles, _editorSharedStyles.akEditorSelectedNodeClassName, _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border-selected, #0C66E4)", "var(--ds-background-selected, #E9F2FF)", (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.Blanket]), columnSeparatorBaseStyles);
|
|
109
|
+
|
|
110
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
111
|
+
var layoutWithSeparatorBorderViewStyles = (0, _react.css)(_templateObject16 || (_templateObject16 = (0, _taggedTemplateLiteral2.default)(["\n\t&.selected [data-layout-column]:not(:first-of-type),\n\t[data-empty-layout='true'] [data-layout-column]:not(:first-of-type),\n\t&:hover [data-layout-column]:not(:first-of-type) {\n\t\t", "\n\t}\n\n\t&.selected.danger [data-layout-section] {\n\t\tbox-shadow: 0 0 0 0 ", ";\n\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t", "\n\t\t}\n\t}\n\n\t&.", ":not(.danger) [data-layout-section] {\n\t\tbox-shadow: 0 0 0 0 ", ";\n\t\t[data-layout-column]:not(:first-of-type) {\n\t\t\t", "\n\t\t}\n\t}\n"])), columnSeparatorViewStyles, _editorSharedStyles.akEditorDeleteBorder, columnSeparatorViewStyles, _editorSharedStyles.akEditorSelectedNodeClassName, "var(--ds-border-selected, #0C66E4)", columnSeparatorViewStyles);
|
|
112
|
+
|
|
113
|
+
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
114
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
115
|
+
var layoutResponsiveBaseStyles = (0, _react.css)(_templateObject17 || (_templateObject17 = (0, _taggedTemplateLiteral2.default)(["\n\t/* chosen breakpoints in container queries are to make sure layout responsiveness in editor aligns with renderer */\n\t/* not resized layout in full-width editor */\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t> .layoutSectionView-content-wrap {\n\t\t\t[data-layout-section] {\n\t\t\t\t@container editor-area (max-width:724px) {\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\t}\n\n\t/* not resized layout in fixed-width editor */\n\t.ak-editor-content-area:not(.fabric-editor--full-width-mode) .ProseMirror {\n\t\t> .layoutSectionView-content-wrap {\n\t\t\t[data-layout-section] {\n\t\t\t\t@container editor-area (max-width:788px) {\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\t}\n\n\t/* resized layout in full/fixed-width editor */\n\t.ProseMirror .fabric-editor-breakout-mark {\n\t\t.layoutSectionView-content-wrap {\n\t\t\t[data-layout-section] {\n\t\t\t\t@container editor-area (max-width:820px) {\n\t\t\t\t\tflex-direction: column;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\t}\n"])), layoutWithSeparatorBorderResponsiveBaseStyles(724), layoutWithSeparatorBorderResponsiveBaseStyles(788), layoutWithSeparatorBorderResponsiveBaseStyles(820));
|
|
116
|
+
|
|
117
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
118
|
+
var layoutResponsiveViewStyles = (0, _react.css)(_templateObject18 || (_templateObject18 = (0, _taggedTemplateLiteral2.default)(["\n\t/* chosen breakpoints in container queries are to make sure layout responsiveness in editor aligns with renderer */\n\t/* not resized layout in full-width editor */\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t> .layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t/* not resized layout in fixed-width editor */\n\t.ak-editor-content-area:not(.fabric-editor--full-width-mode) .ProseMirror {\n\t\t> .layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t/* resized layout in full/fixed-width editor */\n\t.ProseMirror .fabric-editor-breakout-mark {\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n"])), layoutWithSeparatorBorderResponsiveViewStyles(724), layoutWithSeparatorBorderResponsiveViewStyles(788), layoutWithSeparatorBorderResponsiveViewStyles(820));
|
|
119
|
+
|
|
120
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
121
|
+
var layoutBaseStyles = exports.layoutBaseStyles = function layoutBaseStyles() {
|
|
122
|
+
return (0, _react.css)(_templateObject19 || (_templateObject19 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t/* Ignored via go/ees007\n\t\t\tTODO: Migrate away from gridSize\n\t\t\tRecommendation: Replace directly with 7px */\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: pointer;\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\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\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\t\t\t 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\t\t 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", "\n\t\t}\n\n\t\t/* styles to support borders for layout */\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t/* hide separator when element is dragging on top of a layout column */\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\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\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", _editorSharedStyles.akLayoutGutterOffset + ((0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? 8 : 0), _editorSharedStyles.akEditorSwoopCubicBezier, (0, _experiments.editorExperiment)('advanced_layouts', true) ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", _styles.LAYOUT_COLUMN_PADDING, _styles.LAYOUT_COLUMN_PADDING + ((0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), (0, _experiments.editorExperiment)('advanced_layouts', true) ? layoutWithSeparatorBorderBaseStyles : layoutBorderBaseStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) && layoutResponsiveBaseStyles, _types.TableCssClassName.TABLE_CONTAINER, _consts.tableMarginFullWidthMode, (0, _experiments.editorExperiment)('advanced_layouts', false) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", _editorSharedStyles.akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Needs manual remediation
|
|
126
|
+
var layoutViewStyles = exports.layoutViewStyles = (0, _react.css)(_templateObject20 || (_templateObject20 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t[data-layout-section] {\n\t\t\tcursor: default;\n\t\t\t[data-layout-column] {\n\t\t\t\tborder: 0;\n\t\t\t}\n\t\t}\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n"])), (0, _experiments.editorExperiment)('advanced_layouts', true) ? layoutWithSeparatorBorderViewStyles : layoutBorderViewStyles, (0, _experiments.editorExperiment)('advanced_layouts', true) && layoutResponsiveViewStyles);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.linkStylesOld = exports.linkStyles = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
9
|
+
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
11
|
+
var linkStyles = exports.linkStyles = (0, _react.css)({
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
13
|
+
'.ProseMirror a.blockLink': {
|
|
14
|
+
display: 'block'
|
|
15
|
+
},
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
17
|
+
'.ProseMirror a[data-prosemirror-mark-name="link"]': {
|
|
18
|
+
textDecoration: 'underline'
|
|
19
|
+
},
|
|
20
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
21
|
+
'.ProseMirror a[data-prosemirror-mark-name="link"]:hover': {
|
|
22
|
+
textDecoration: 'none'
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
27
|
+
var linkStylesOld = exports.linkStylesOld = (0, _react.css)({
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
29
|
+
'.ProseMirror a.blockLink': {
|
|
30
|
+
display: 'block'
|
|
31
|
+
}
|
|
32
|
+
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.ruleStyles = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
11
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
12
|
+
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
14
|
+
var ruleStyles = exports.ruleStyles = (0, _react.css)((0, _defineProperty2.default)({
|
|
15
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
16
|
+
'.ProseMirror hr': {
|
|
17
|
+
border: 'none',
|
|
18
|
+
backgroundColor: "var(--ds-border, #091E4224)",
|
|
19
|
+
height: '2px',
|
|
20
|
+
borderRadius: '1px',
|
|
21
|
+
cursor: 'pointer',
|
|
22
|
+
padding: "var(--ds-space-050, 4px)".concat(" 0"),
|
|
23
|
+
margin: "var(--ds-space-300, 24px)".concat(" 0"),
|
|
24
|
+
backgroundClip: 'content-box'
|
|
25
|
+
}
|
|
26
|
+
}, ".ProseMirror hr.".concat(_editorSharedStyles.akEditorSelectedNodeClassName), {
|
|
27
|
+
outline: 'none',
|
|
28
|
+
backgroundColor: "var(--ds-border-selected, #0C66E4)"
|
|
29
|
+
}));
|