@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
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
1
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
3
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12
|
|
4
|
-
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; }
|
|
5
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
2
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
6
3
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
7
4
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
8
5
|
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Requires manual remediation over time due to use of unsafe nested mixins */
|
|
@@ -13,22 +10,20 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
13
10
|
import React from 'react';
|
|
14
11
|
|
|
15
12
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
16
|
-
import { css, jsx,
|
|
13
|
+
import { css, jsx, useTheme } from '@emotion/react';
|
|
17
14
|
import { browser } from '@atlaskit/editor-common/browser';
|
|
18
15
|
import { telepointerStyle, telepointerStyleWithInitialOnly } from '@atlaskit/editor-common/collab';
|
|
19
16
|
import { EmojiSharedCssClassName, defaultEmojiHeight } from '@atlaskit/editor-common/emoji';
|
|
20
17
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
21
18
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
22
19
|
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
23
|
-
import { CodeBlockSharedCssClassName, GRID_GUTTER,
|
|
20
|
+
import { CodeBlockSharedCssClassName, GRID_GUTTER, MediaSharedClassNames, SmartCardSharedCssClassName, annotationSharedStyles, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, embedCardStyles, expandClassNames, getSmartCardSharedStyles, gridStyles, indentationSharedStyles, listsSharedStyles, paragraphSharedStyles, resizerStyles, pragmaticResizerStyles, shadowSharedStyle, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
|
|
24
21
|
import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
|
|
25
22
|
import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
|
|
26
23
|
import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
|
|
27
24
|
import { placeholderTextStyles } from '@atlaskit/editor-plugins/placeholder-text/styles';
|
|
28
|
-
import { TableCssClassName } from '@atlaskit/editor-plugins/table/types';
|
|
29
25
|
import { tableCommentEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
30
|
-
import {
|
|
31
|
-
import { SelectionStyle, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorDefaultLayoutWidth, akEditorDeleteBackground, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorSelectedBorderColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSwoopCubicBezier, akLayoutGutterOffset, blockNodesVerticalMargin, editorFontSize, getSelectionStyles, gridMediumMaxWidth } from '@atlaskit/editor-shared-styles';
|
|
26
|
+
import { SelectionStyle, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorDefaultLayoutWidth, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles } from '@atlaskit/editor-shared-styles';
|
|
32
27
|
import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
33
28
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
34
29
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -42,12 +37,11 @@ import { mediaStyles } from '../ContentStyles/media';
|
|
|
42
37
|
import { panelStyles } from '../ContentStyles/panel';
|
|
43
38
|
import { statusStyles, vanillaStatusStyles } from '../ContentStyles/status';
|
|
44
39
|
import { taskDecisionStyles, vanillaTaskDecisionIconWithoutVisualRefresh as vanillaDecisionIconWithoutVisualRefresh, vanillaTaskDecisionIconWithVisualRefresh as vanillaDecisionIconWithVisualRefresh, vanillaTaskDecisionStyles as vanillaDecisionStyles, vanillaTaskItemStyles } from '../ContentStyles/tasks-and-decisions';
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
};
|
|
40
|
+
import { aiPanelBaseStyles, aiPanelDarkStyles } from './styles/ai-panel';
|
|
41
|
+
import { backgroundColorStyles } from './styles/backgroundColorStyles';
|
|
42
|
+
import { layoutBaseStyles, layoutViewStyles } from './styles/layout';
|
|
43
|
+
import { linkStyles, linkStylesOld } from './styles/link';
|
|
44
|
+
import { ruleStyles } from './styles/rule';
|
|
51
45
|
var vanillaMentionsStyles = css({
|
|
52
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
53
47
|
'.editor-mention-primitive': {
|
|
@@ -92,11 +86,11 @@ var vanillaMentionsStyles = css({
|
|
|
92
86
|
}
|
|
93
87
|
}
|
|
94
88
|
});
|
|
95
|
-
var vanillaSelectionStyles = css(
|
|
96
|
-
var mentionsStyles = css(
|
|
97
|
-
var listsStyles = css(
|
|
98
|
-
var reactEmojiStyles = css(
|
|
99
|
-
var emojiStyles = css(
|
|
89
|
+
var vanillaSelectionStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t.danger {\n\t\t.editor-mention-primitive {\n\t\t\tbox-shadow: 0 0 0 ", "px ", ";\n\t\t\tbackground-color: ", ";\n\t\t}\n\t}\n\n\t.", " > .editor-mention-primitive,\n\t.", " > .editor-mention-primitive.mention-self,\n\t.", " > .editor-mention-primitive.mention-restricted {\n\t\t", "\n\t\t/* need to specify dark text colour because personal mentions\n\t\t (in dark blue) have white text by default */\n\t\tcolor: ", "\n\t}\n"])), akEditorSelectedBorderSize, akEditorDeleteBorder, "var(--ds-background-danger, ".concat(akEditorDeleteBackgroundWithOpacity, ")"), akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)");
|
|
90
|
+
var mentionsStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\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\t\t (in dark blue) have white text by default */\n\t 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"])), MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.BoxShadow, SelectionStyle.Background]), "var(--ds-text-subtle, #44546F)", MentionSharedCssClassName.MENTION_CONTAINER, akEditorSelectedNodeClassName, akEditorSelectedBorderSize, akEditorDeleteBorder, "var(--ds-background-danger, ".concat(akEditorDeleteBackgroundWithOpacity, ")"), MentionSharedCssClassName.MENTION_CONTAINER, "var(--ds-background-neutral, #091E420F)", "var(--ds-text-subtle, #44546F)");
|
|
91
|
+
var listsStyles = css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\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\t// This prevents https://product-fabric.atlassian.net/browse/ED-20924\n\t&:not(.", ") > li {\n\t\t\t", "\n\t\t}\n\t}\n"])), "var(--ds-space-050, 4px)", blockNodesVerticalMargin, SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, browser.safari ? codeBlockInListSafariFix : '');
|
|
92
|
+
var reactEmojiStyles = css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\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"])), EmojiSharedCssClassName.EMOJI_CONTAINER, EmojiSharedCssClassName.EMOJI_NODE, EmojiSharedCssClassName.EMOJI_IMAGE, akEditorSelectedNodeClassName, EmojiSharedCssClassName.EMOJI_SPRITE, EmojiSharedCssClassName.EMOJI_IMAGE, getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.BoxShadow]));
|
|
93
|
+
var emojiStyles = css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n\t[data-prosemirror-node-view-type='vanilla'] {\n\t\t.", " {\n\t\t\tdisplay: inline-block;\n\t\t}\n\n\t\t.", ", .", " {\n\t\t\tbackground: no-repeat transparent;\n\t\t\tdisplay: inline-block;\n\t\t\theight: ", "px;\n\t\t\tmax-height: ", "px;\n\t\t\tcursor: pointer;\n\t\t\tvertical-align: middle;\n\t\t\tuser-select: all;\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"])), EmojiSharedCssClassName.EMOJI_CONTAINER, EmojiSharedCssClassName.EMOJI_SPRITE, EmojiSharedCssClassName.EMOJI_IMAGE, defaultEmojiHeight, defaultEmojiHeight, akEditorSelectedNodeClassName, EmojiSharedCssClassName.EMOJI_SPRITE, EmojiSharedCssClassName.EMOJI_IMAGE, getSelectionStyles([SelectionStyle.Blanket, SelectionStyle.BoxShadow]));
|
|
100
94
|
|
|
101
95
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
102
96
|
export var placeholderStyles = css({
|
|
@@ -131,228 +125,27 @@ var placeholderWrapStyles = css({
|
|
|
131
125
|
whiteSpace: 'nowrap'
|
|
132
126
|
}
|
|
133
127
|
});
|
|
134
|
-
var firstBlockNodeStyles = css(
|
|
135
|
-
var firstBlockNodeStylesNew = css(
|
|
128
|
+
var firstBlockNodeStyles = css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t> .", ",\n\t\t\t> .", ",\n\t\t\t> .", ",\n\t\t\t> div[data-task-list-local-id],\n\t\t> div[data-layout-section],\n\t\t> .", " {\n\t\t\t&:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\n\t\t> hr:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n"])), PanelSharedCssClassName.prefix, CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, expandClassNames.prefix);
|
|
129
|
+
var firstBlockNodeStylesNew = css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t> .", ",\n\t\t\t> .", ",\n\t\t\t> .", ",\n\t\t\t> div[data-task-list-local-id],\n\t\t> div[data-layout-section],\n\t\t> .", " {\n\t\t\t&:first-child {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t}\n\n\t\t> hr:first-child,\n\t\t> .ProseMirror-widget:first-child + hr {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n"])), PanelSharedCssClassName.prefix, CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, expandClassNames.prefix);
|
|
136
130
|
export var fixBlockControlStylesSSR = function fixBlockControlStylesSSR() {
|
|
137
131
|
if (fg('platform_editor_element_dnd_nested_fix_patch_6')) {
|
|
138
132
|
return firstBlockNodeStylesNew;
|
|
139
133
|
}
|
|
140
134
|
return firstBlockNodeStyles;
|
|
141
135
|
};
|
|
142
|
-
var columnLayoutSharedStyle = css({
|
|
143
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
144
|
-
'[data-layout-section]': _defineProperty({
|
|
145
|
-
position: 'relative',
|
|
146
|
-
display: 'flex',
|
|
147
|
-
flexDirection: 'row',
|
|
148
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
149
|
-
'& > *': {
|
|
150
|
-
flex: 1,
|
|
151
|
-
minWidth: 0
|
|
152
|
-
},
|
|
153
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
154
|
-
'& > .unsupportedBlockView-content-wrap': {
|
|
155
|
-
minWidth: 'initial'
|
|
156
|
-
}
|
|
157
|
-
}, "@media screen and (max-width: ".concat(gridMediumMaxWidth, "px)"), {
|
|
158
|
-
flexDirection: 'column'
|
|
159
|
-
})
|
|
160
|
-
});
|
|
161
|
-
var columnLayoutResponsiveSharedStyle = css({
|
|
162
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
163
|
-
'[data-layout-section]': {
|
|
164
|
-
display: 'flex',
|
|
165
|
-
flexDirection: 'row',
|
|
166
|
-
gap: "var(--ds-space-100, 8px)",
|
|
167
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
168
|
-
'& > *': {
|
|
169
|
-
flex: 1,
|
|
170
|
-
minWidth: 0
|
|
171
|
-
},
|
|
172
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
173
|
-
'& > .unsupportedBlockView-content-wrap': {
|
|
174
|
-
minWidth: 'initial'
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
178
|
-
'.layout-section-container': {
|
|
179
|
-
containerType: 'inline-size',
|
|
180
|
-
containerName: 'layout-area'
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
/**
|
|
185
|
-
* layout styles
|
|
186
|
-
* was imported from packages/editor/editor-core/src/ui/ContentStyles/layout.ts
|
|
187
|
-
* @example
|
|
188
|
-
* @returns {string}
|
|
189
|
-
*/
|
|
190
|
-
var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
|
|
191
|
-
return fg('platform_editor_nested_dnd_styles_changes') ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
192
|
-
css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\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
|
|
193
|
-
css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\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"])));
|
|
194
|
-
};
|
|
195
|
-
var layoutColumnStyles = function layoutColumnStyles() {
|
|
196
|
-
return editorExperiment('advanced_layouts', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
197
|
-
css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\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"])), LAYOUT_SECTION_MARGIN / 2, gridMediumMaxWidth, akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Blanket]), "var(--ds-border-radius, 3px)") : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
198
|
-
css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\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"])), LAYOUT_SECTION_MARGIN, gridMediumMaxWidth);
|
|
199
|
-
};
|
|
200
|
-
var layoutSectionStyles = function layoutSectionStyles() {
|
|
201
|
-
return editorExperiment('advanced_layouts', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
202
|
-
css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\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
|
|
203
|
-
css(_templateObject15 || (_templateObject15 = _taggedTemplateLiteral(["\n\t\t\t\t", "\n\t\t\t"])), columnLayoutSharedStyle);
|
|
204
|
-
};
|
|
205
|
-
|
|
206
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
207
|
-
var layoutBorderBaseStyles = css(_templateObject16 || (_templateObject16 = _taggedTemplateLiteral(["\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"])), akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", "var(--ds-background-danger, ".concat(akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(akEditorDeleteBorder, ")"), akEditorSelectedNodeClassName, getSelectionStyles([SelectionStyle.Border, SelectionStyle.Blanket]));
|
|
208
|
-
|
|
209
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
210
|
-
var layoutBorderViewStyles = css(_templateObject17 || (_templateObject17 = _taggedTemplateLiteral(["\n\t&.selected [data-layout-column],\n\t&:hover [data-layout-column] {\n\t\tborder: 0;\n\t}\n"])));
|
|
211
|
-
|
|
212
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
213
|
-
var columnSeparatorBaseStyles = css(_templateObject18 || (_templateObject18 = _taggedTemplateLiteral(["\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"])), akEditorSelectedBorderSize, "var(--ds-border, #091E4224)");
|
|
214
|
-
|
|
215
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
216
|
-
var columnSeparatorViewStyles = css(_templateObject19 || (_templateObject19 = _taggedTemplateLiteral(["\n\t[data-layout-content]::before {\n\t\tborder-left: 0;\n\t}\n"])));
|
|
217
|
-
|
|
218
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
219
|
-
var rowSeparatorBaseStyles = css(_templateObject20 || (_templateObject20 = _taggedTemplateLiteral(["\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"])), akEditorSelectedBorderSize, "var(--ds-border, #091E4224)");
|
|
220
|
-
|
|
221
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
222
|
-
var rowSeparatorViewStyles = css(_templateObject21 || (_templateObject21 = _taggedTemplateLiteral(["\n\t[data-layout-content]::before {\n\t\tborder-top: 0;\n\t}\n"])));
|
|
223
|
-
|
|
224
|
-
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
225
|
-
var layoutWithSeparatorBorderResponsiveBaseStyles = function layoutWithSeparatorBorderResponsiveBaseStyles(breakpoint
|
|
226
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
227
|
-
) {
|
|
228
|
-
return css(_templateObject22 || (_templateObject22 = _taggedTemplateLiteral(["\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"])), akEditorSelectedNodeClassName, breakpoint, rowSeparatorBaseStyles);
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
232
|
-
var layoutWithSeparatorBorderResponsiveViewStyles = function layoutWithSeparatorBorderResponsiveViewStyles(breakpoint
|
|
233
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
234
|
-
) {
|
|
235
|
-
return css(_templateObject23 || (_templateObject23 = _taggedTemplateLiteral(["\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"])), akEditorSelectedNodeClassName, breakpoint, rowSeparatorViewStyles);
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
239
|
-
var layoutWithSeparatorBorderBaseStyles = css(_templateObject24 || (_templateObject24 = _taggedTemplateLiteral(["\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(akEditorDeleteBackground, ")"), akEditorSelectedBorderSize, akEditorDeleteBorder, columnSeparatorBaseStyles, akEditorSelectedNodeClassName, akEditorSelectedBorderSize, "var(--ds-border-selected, #0C66E4)", "var(--ds-background-selected, #E9F2FF)", getSelectionStyles([SelectionStyle.Blanket]), columnSeparatorBaseStyles);
|
|
240
|
-
|
|
241
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
242
|
-
var layoutWithSeparatorBorderViewStyles = css(_templateObject25 || (_templateObject25 = _taggedTemplateLiteral(["\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, akEditorDeleteBorder, columnSeparatorViewStyles, akEditorSelectedNodeClassName, "var(--ds-border-selected, #0C66E4)", columnSeparatorViewStyles);
|
|
243
|
-
|
|
244
|
-
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
245
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
246
|
-
var layoutResponsiveBaseStyles = css(_templateObject26 || (_templateObject26 = _taggedTemplateLiteral(["\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));
|
|
247
|
-
|
|
248
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
249
|
-
var layoutResponsiveViewStyles = css(_templateObject27 || (_templateObject27 = _taggedTemplateLiteral(["\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));
|
|
250
|
-
|
|
251
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
252
|
-
var layoutBaseStyles = function layoutBaseStyles() {
|
|
253
|
-
return css(_templateObject28 || (_templateObject28 = _taggedTemplateLiteral(["\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\n\t\t\t\t0;\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)", akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? 8 : 0), akEditorSwoopCubicBezier, editorExperiment('advanced_layouts', true) ? 0 : akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", LAYOUT_COLUMN_PADDING, LAYOUT_COLUMN_PADDING + (fg('platform_editor_nested_dnd_styles_changes') ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), editorExperiment('advanced_layouts', true) ? layoutWithSeparatorBorderBaseStyles : layoutBorderBaseStyles, editorExperiment('advanced_layouts', true) && layoutResponsiveBaseStyles, TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode, editorExperiment('advanced_layouts', false) && 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)", " -", akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
|
|
254
|
-
};
|
|
255
|
-
|
|
256
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
257
|
-
var layoutViewStyles = css(_templateObject29 || (_templateObject29 = _taggedTemplateLiteral(["\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"])), editorExperiment('advanced_layouts', true) ? layoutWithSeparatorBorderViewStyles : layoutBorderViewStyles, editorExperiment('advanced_layouts', true) && layoutResponsiveViewStyles);
|
|
258
|
-
|
|
259
|
-
/**
|
|
260
|
-
* aiPanelStyles
|
|
261
|
-
* was imported from packages/editor/editor-core/src/ui/ContentStyles/ai-panels.ts
|
|
262
|
-
*/
|
|
263
|
-
var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
264
|
-
var rotationAnimation = keyframes({
|
|
265
|
-
'0%': _objectSpread({
|
|
266
|
-
'--panel-gradient-angle': '0deg'
|
|
267
|
-
}, isFirefox ? {
|
|
268
|
-
backgroundPosition: '100%'
|
|
269
|
-
} : {}),
|
|
270
|
-
'100%': _objectSpread({
|
|
271
|
-
'--panel-gradient-angle': '360deg'
|
|
272
|
-
}, isFirefox ? {
|
|
273
|
-
backgroundPosition: '-100%'
|
|
274
|
-
} : {})
|
|
275
|
-
});
|
|
276
|
-
var aiPrismColor = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, 'prism.border.step.1', {
|
|
277
|
-
light: '#0065FF',
|
|
278
|
-
dark: '#0065FF80'
|
|
279
|
-
}), 'prism.border.step.2', {
|
|
280
|
-
light: '#0469FF',
|
|
281
|
-
dark: '#0469FF80'
|
|
282
|
-
}), 'prism.border.step.3', {
|
|
283
|
-
light: '#BF63F3',
|
|
284
|
-
dark: '#BF63F380'
|
|
285
|
-
}), 'prism.border.step.4', {
|
|
286
|
-
light: '#FFA900',
|
|
287
|
-
dark: '#FFA90080'
|
|
288
|
-
});
|
|
289
|
-
var prismBorderAnimationStyles = css({
|
|
290
|
-
'&::before, &::after': _objectSpread(_objectSpread({
|
|
291
|
-
animationName: rotationAnimation,
|
|
292
|
-
animationDuration: '2s',
|
|
293
|
-
animationTimingFunction: 'linear',
|
|
294
|
-
animationIterationCount: 'infinite'
|
|
295
|
-
}, isFirefox ? {
|
|
296
|
-
animationDirection: 'normal',
|
|
297
|
-
animationDuration: '1s'
|
|
298
|
-
} : {}), {}, {
|
|
299
|
-
'@media (prefers-reduced-motion)': {
|
|
300
|
-
animation: 'none'
|
|
301
|
-
}
|
|
302
|
-
})
|
|
303
|
-
});
|
|
304
|
-
var prismBorderBaseStyles = css(_objectSpread({
|
|
305
|
-
content: "''",
|
|
306
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
307
|
-
position: 'absolute',
|
|
308
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
309
|
-
zIndex: -1,
|
|
310
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
311
|
-
width: "calc(100% + 2px)",
|
|
312
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
313
|
-
height: "calc(100% + 2px)",
|
|
314
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
315
|
-
top: "-1px",
|
|
316
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
317
|
-
left: "-1px",
|
|
318
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
319
|
-
borderRadius: "calc(".concat("var(--ds-border-radius-100, 3px)", " + 1px)"),
|
|
320
|
-
transform: 'translate3d(0, 0, 0)'
|
|
321
|
-
}, isFirefox ? {
|
|
322
|
-
background: "linear-gradient(90deg,\n\t\t\t\t\t\t\t\t".concat(aiPrismColor['prism.border.step.1']['light'], " 0%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['light'], " 12%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['light'], " 24%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.4']['light'], " 48%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['light'], " 64%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['light'], " 80%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.1']['light'], " 100%\n\t\t\t\t\t\t\t)"),
|
|
323
|
-
backgroundSize: '200%'
|
|
324
|
-
} : {
|
|
325
|
-
background: "conic-gradient(\n\t\t\t\t\t\t\t\tfrom var(--panel-gradient-angle, 270deg),\n\t\t\t\t\t\t\t\t".concat(aiPrismColor['prism.border.step.1']['light'], " 0%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['light'], " 20%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['light'], " 50%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.4']['light'], " 56%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.1']['light'], " 100%\n\t\t\t\t\t\t\t)")
|
|
326
|
-
}));
|
|
327
|
-
var prismBorderDarkStyles = css(_objectSpread({}, isFirefox ? {
|
|
328
|
-
background: "linear-gradient(90deg,\n\t\t\t\t\t\t\t\t".concat(aiPrismColor['prism.border.step.1']['dark'], " 0%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['dark'], " 12%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['dark'], " 24%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.4']['dark'], " 48%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['dark'], " 64%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['dark'], " 80%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.1']['dark'], " 100%\n\t\t\t\t\t\t\t)"),
|
|
329
|
-
backgroundSize: '200%'
|
|
330
|
-
} : {
|
|
331
|
-
background: "conic-gradient(\n\t\t\t\t\t\t\t\tfrom var(--panel-gradient-angle, 270deg),\n\t\t\t\t\t\t\t\t".concat(aiPrismColor['prism.border.step.1']['dark'], " 0%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['dark'], " 20%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['dark'], " 50%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.4']['dark'], " 56%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.1']['dark'], " 100%\n\t\t\t\t\t\t\t)")
|
|
332
|
-
}));
|
|
333
|
-
var prismBorderHoverStyles = css({
|
|
334
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
335
|
-
background: "var(--ds-border-input, #8590A2)"
|
|
336
|
-
});
|
|
337
|
-
|
|
338
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
|
|
339
|
-
var aiPanelBaseStyles = css(_templateObject30 || (_templateObject30 = _taggedTemplateLiteral(["\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\tis 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)", prismBorderBaseStyles, prismBorderHoverStyles, "var(--ds-surface, #FFFFFF)", "var(--ds-border-radius-100, 3px)", prismBorderAnimationStyles, prismBorderBaseStyles, "var(--ds-border-danger, #E2483D)");
|
|
340
|
-
|
|
341
|
-
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Ignored via go/DSP-18766
|
|
342
|
-
var aiPanelDarkStyles = css(_templateObject31 || (_templateObject31 = _taggedTemplateLiteral(["\n\tdiv[extensionType='com.atlassian.ai-blocks'] {\n\t\t.extension-container {\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 its streaming */\n\tdiv[extensionType='com.atlassian.ai-blocks']:has(.streaming) {\n\t\t.extension-container {\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"])), prismBorderDarkStyles, prismBorderDarkStyles);
|
|
343
136
|
|
|
344
137
|
// The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
|
|
345
138
|
var akEditorBreakpointForSmallDevice = "1266px";
|
|
346
139
|
|
|
347
140
|
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
348
141
|
var contentStyles = function contentStyles() {
|
|
349
|
-
return css(
|
|
142
|
+
return css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n\t--ak-editor--default-gutter-padding: ", "px;\n\t/* 52 is from akEditorGutterPaddingDynamic via editor-shared-styles */\n\t--ak-editor--large-gutter-padding: ", "px;\n\t--ak-editor--default-layout-width: ", "px;\n\t--ak-editor--full-width-layout-width: ", "px;\n\t/* calculate editor line length, 100cqw is the editor container width */\n\t--ak-editor--line-length: min(\n\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\tvar(--ak-editor--default-layout-width)\n\t);\n\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t--ak-editor--breakout-full-page-guttering-padding: calc(\n\t\tvar(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding)\n\t);\n\n\t.fabric-editor--full-width-mode {\n\t\t--ak-editor--line-length: min(\n\t\t\tcalc(100cqw - var(--ak-editor--large-gutter-padding) * 2),\n\t\t\tvar(--ak-editor--full-width-layout-width)\n\t\t);\n\t}\n\n\t.ProseMirror {\n\t\t--ak-editor-max-container-width: calc(100cqw - var(--ak-editor--large-gutter-padding));\n\t}\n\n\t/* We can't allow nodes that are inside other nodes to bleed from the parent container */\n\t.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block] {\n\t\t--ak-editor-max-container-width: 100%;\n\t}\n\n\t/* container editor-area is defined in platform/packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts */\n\t@container editor-area (width >= ", ") {\n\t\t.ProseMirror {\n\t\t\t--ak-editor--breakout-wide-layout-width: ", "px;\n\t\t}\n\t}\n\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: var(--ak-editor-base-font-size);\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", ";\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n // Switch between the two icons based on the visual refresh feature gate\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t// For FullPage only when inside a table\n\t// Related code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\t// In the \"editorContentAreaContainerStyle\" function\n\t.fabric-editor--full-width-mode {\n\t\t.pm-table-container {\n\t\t\t.code-block,\n\t\t\t.extension-container,\n\t\t\t.multiBodiedExtension--container {\n\t\t\t\tmax-width: 100%;\n\t\t\t}\n\t\t}\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar,\n\t.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Legacy Link icon in the Atlaskit package\n\t is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), akEditorGutterPadding, akEditorGutterPaddingDynamic(), akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, whitespaceSharedStyles, paragraphSharedStyles(), listsSharedStyles, indentationSharedStyles, shadowSharedStyle, InlineNodeViewSharedStyles, fg('editor_request_to_edit_task') ? null : css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t"]))), fg('platform_editor_hide_cursor_when_pm_hideselection') ? css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, editorExperiment('platform_editor_advanced_code_blocks', true) ? css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, "var(--ds-border-focused, #8cf)", placeholderTextStyles, placeholderStyles, editorExperiment('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, codeBlockStyles(), blocktypeStyles(), codeMarkSharedStyles(), textColorStyles, backgroundColorStyles, listsStyles, ruleStyles, mediaStyles(), fg('confluence_team_presence_scroll_to_pointer') ? telepointerStyle : telepointerStyleWithInitialOnly, gapCursorStyles, panelStyles(), mentionsStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
350
143
|
exposure: false
|
|
351
144
|
}) && vanillaMentionsStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
352
145
|
exposure: false
|
|
353
146
|
}) && vanillaSelectionStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
354
147
|
exposure: false
|
|
355
|
-
}) ? emojiStyles : reactEmojiStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles,
|
|
148
|
+
}) ? emojiStyles : reactEmojiStyles, emojiStyles, tasksAndDecisionsStyles, gridStyles, blockMarksSharedStyles, dateSharedStyle, extensionStyles, expandStyles(), findReplaceStyles, textHighlightStyle, taskDecisionStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
356
149
|
exposure: false
|
|
357
150
|
}) && vanillaTaskItemStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
358
151
|
exposure: false
|
|
@@ -360,7 +153,7 @@ var contentStyles = function contentStyles() {
|
|
|
360
153
|
exposure: false
|
|
361
154
|
}) && fg('platform-visual-refresh-icons') && vanillaDecisionIconWithVisualRefresh, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
362
155
|
exposure: false
|
|
363
|
-
}) && !fg('platform-visual-refresh-icons') && vanillaDecisionIconWithoutVisualRefresh, statusStyles, editorExperiment('platform_editor_vanilla_dom', true) ? vanillaStatusStyles() : null, annotationSharedStyles(), smartCardStyles(), fg('platform-linking-visual-refresh-v1') ? getSmartCardSharedStyles() : smartCardSharedStyles, editorExperiment('platform_editor_vanilla_dom', true) ? dateVanillaStyles : null, dateStyles, embedCardStyles(), unsupportedStyles, resizerStyles, pragmaticResizerStyles(), fixBlockControlStylesSSR(), MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !fg('platform-visual-refresh-icons') ? css(
|
|
156
|
+
}) && !fg('platform-visual-refresh-icons') && vanillaDecisionIconWithoutVisualRefresh, statusStyles, editorExperiment('platform_editor_vanilla_dom', true) ? vanillaStatusStyles() : null, annotationSharedStyles(), smartCardStyles(), fg('platform-linking-visual-refresh-v1') ? getSmartCardSharedStyles() : smartCardSharedStyles, editorExperiment('platform_editor_vanilla_dom', true) ? dateVanillaStyles : null, dateStyles, embedCardStyles(), unsupportedStyles, resizerStyles, pragmaticResizerStyles(), fixBlockControlStylesSSR(), MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT, !fg('platform-visual-refresh-icons') ? css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n\t\t\t\t.hyperlink-open-link {\n\t\t\t\t\tmin-width: 24px;\n\t\t\t\t\tsvg {\n\t\t\t\t\t\tmax-width: 18px;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"]))) : null);
|
|
364
157
|
};
|
|
365
158
|
var CommentEditorMargin = 14;
|
|
366
159
|
|
|
@@ -410,18 +203,8 @@ var listLayoutShiftFix = css({
|
|
|
410
203
|
* EditorContentStyles is a wrapper component that applies styles to its children
|
|
411
204
|
* based on the provided feature flags, view mode, and other props.
|
|
412
205
|
* It uses Emotion for styling and supports scrollable content.
|
|
413
|
-
* The component is memoized to optimize performance.
|
|
414
206
|
*
|
|
415
207
|
* This will be used in near future to replace the current editor content styles from index.tsx
|
|
416
|
-
*
|
|
417
|
-
* @param {EditorContentContainerProps} props - The props for the component.
|
|
418
|
-
* @param {string} props.className - Additional class name for the component.
|
|
419
|
-
* @param {React.ReactNode} props.children - The content to be rendered inside the component.
|
|
420
|
-
* @param {FeatureFlags} props.featureFlags - Feature flags to control the styles.
|
|
421
|
-
* @param {'view' | 'edit'} props.viewMode - The view mode of the editor.
|
|
422
|
-
* @param {boolean} props.isScrollable - Whether the content is scrollable.
|
|
423
|
-
* @param {'full-page' | 'full-width' | 'comment' | 'chromeless'} props.appearance - The appearance of the editor.
|
|
424
|
-
* @returns {JSX.Element} The styled content component.
|
|
425
208
|
*/
|
|
426
209
|
var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
427
210
|
var className = props.className,
|
|
@@ -438,7 +221,17 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
438
221
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
439
222
|
className: className,
|
|
440
223
|
ref: ref,
|
|
441
|
-
css: [contentStyles(),
|
|
224
|
+
css: [contentStyles(),
|
|
225
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
226
|
+
layoutBaseStyles(),
|
|
227
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
228
|
+
fg('platform_editor_hyperlink_underline') ? linkStyles : linkStylesOld,
|
|
229
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
230
|
+
aiPanelBaseStyles,
|
|
231
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
232
|
+
colorMode === 'dark' && aiPanelDarkStyles,
|
|
233
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
234
|
+
viewMode === 'view' && layoutViewStyles, isComment && commentEditorStyles, isFullPage && fullPageEditorStyles, fg('platform_editor_ssr_fix_lists') && listLayoutShiftFix],
|
|
442
235
|
"data-editor-scroll-container": isScrollable ? 'true' : undefined,
|
|
443
236
|
"data-testid": "editor-content-container",
|
|
444
237
|
style: {
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
3
|
+
var _templateObject, _templateObject2;
|
|
4
|
+
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; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
7
|
+
import { css, keyframes } from "@emotion/react";
|
|
8
|
+
/**
|
|
9
|
+
* aiPanelStyles
|
|
10
|
+
* was imported from packages/editor/editor-core/src/ui/ContentStyles/ai-panels.ts
|
|
11
|
+
*/
|
|
12
|
+
var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
13
|
+
var rotationAnimation = keyframes({
|
|
14
|
+
'0%': _objectSpread({
|
|
15
|
+
'--panel-gradient-angle': '0deg'
|
|
16
|
+
}, isFirefox ? {
|
|
17
|
+
backgroundPosition: '100%'
|
|
18
|
+
} : {}),
|
|
19
|
+
'100%': _objectSpread({
|
|
20
|
+
'--panel-gradient-angle': '360deg'
|
|
21
|
+
}, isFirefox ? {
|
|
22
|
+
backgroundPosition: '-100%'
|
|
23
|
+
} : {})
|
|
24
|
+
});
|
|
25
|
+
var aiPrismColor = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, 'prism.border.step.1', {
|
|
26
|
+
light: '#0065FF',
|
|
27
|
+
dark: '#0065FF80'
|
|
28
|
+
}), 'prism.border.step.2', {
|
|
29
|
+
light: '#0469FF',
|
|
30
|
+
dark: '#0469FF80'
|
|
31
|
+
}), 'prism.border.step.3', {
|
|
32
|
+
light: '#BF63F3',
|
|
33
|
+
dark: '#BF63F380'
|
|
34
|
+
}), 'prism.border.step.4', {
|
|
35
|
+
light: '#FFA900',
|
|
36
|
+
dark: '#FFA90080'
|
|
37
|
+
});
|
|
38
|
+
var prismBorderAnimationStyles = css({
|
|
39
|
+
'&::before, &::after': _objectSpread(_objectSpread({
|
|
40
|
+
animationName: rotationAnimation,
|
|
41
|
+
animationDuration: '2s',
|
|
42
|
+
animationTimingFunction: 'linear',
|
|
43
|
+
animationIterationCount: 'infinite'
|
|
44
|
+
}, isFirefox ? {
|
|
45
|
+
animationDirection: 'normal',
|
|
46
|
+
animationDuration: '1s'
|
|
47
|
+
} : {}), {}, {
|
|
48
|
+
'@media (prefers-reduced-motion)': {
|
|
49
|
+
animation: 'none'
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
});
|
|
53
|
+
var prismBorderBaseStyles = css(_objectSpread({
|
|
54
|
+
content: "''",
|
|
55
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
56
|
+
position: 'absolute',
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
58
|
+
zIndex: -1,
|
|
59
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
60
|
+
width: "calc(100% + 2px)",
|
|
61
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
62
|
+
height: "calc(100% + 2px)",
|
|
63
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
64
|
+
top: "-1px",
|
|
65
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
66
|
+
left: "-1px",
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
68
|
+
borderRadius: "calc(".concat("var(--ds-border-radius-100, 3px)", " + 1px)"),
|
|
69
|
+
transform: 'translate3d(0, 0, 0)'
|
|
70
|
+
}, isFirefox ? {
|
|
71
|
+
background: "linear-gradient(90deg,\n\t\t\t\t\t\t\t\t".concat(aiPrismColor['prism.border.step.1']['light'], " 0%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['light'], " 12%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['light'], " 24%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.4']['light'], " 48%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['light'], " 64%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['light'], " 80%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.1']['light'], " 100%\n\t\t\t\t\t\t\t)"),
|
|
72
|
+
backgroundSize: '200%'
|
|
73
|
+
} : {
|
|
74
|
+
background: "conic-gradient(\n\t\t\t\t\t\t\t\tfrom var(--panel-gradient-angle, 270deg),\n\t\t\t\t\t\t\t\t".concat(aiPrismColor['prism.border.step.1']['light'], " 0%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['light'], " 20%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['light'], " 50%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.4']['light'], " 56%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.1']['light'], " 100%\n\t\t\t\t\t\t\t)")
|
|
75
|
+
}));
|
|
76
|
+
var prismBorderDarkStyles = css(_objectSpread({}, isFirefox ? {
|
|
77
|
+
background: "linear-gradient(90deg,\n\t\t\t\t\t\t\t\t".concat(aiPrismColor['prism.border.step.1']['dark'], " 0%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['dark'], " 12%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['dark'], " 24%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.4']['dark'], " 48%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['dark'], " 64%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['dark'], " 80%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.1']['dark'], " 100%\n\t\t\t\t\t\t\t)"),
|
|
78
|
+
backgroundSize: '200%'
|
|
79
|
+
} : {
|
|
80
|
+
background: "conic-gradient(\n\t\t\t\t\t\t\t\tfrom var(--panel-gradient-angle, 270deg),\n\t\t\t\t\t\t\t\t".concat(aiPrismColor['prism.border.step.1']['dark'], " 0%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.2']['dark'], " 20%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.3']['dark'], " 50%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.4']['dark'], " 56%,\n\t\t\t\t\t\t\t\t").concat(aiPrismColor['prism.border.step.1']['dark'], " 100%\n\t\t\t\t\t\t\t)")
|
|
81
|
+
}));
|
|
82
|
+
var prismBorderHoverStyles = css({
|
|
83
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
84
|
+
background: "var(--ds-border-input, #8590A2)"
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
88
|
+
export var aiPanelBaseStyles = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\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\tis 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)", prismBorderBaseStyles, prismBorderHoverStyles, "var(--ds-surface, #FFFFFF)", "var(--ds-border-radius-100, 3px)", prismBorderAnimationStyles, prismBorderBaseStyles, "var(--ds-border-danger, #E2483D)");
|
|
89
|
+
|
|
90
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
91
|
+
export var aiPanelDarkStyles = css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\tdiv[extensionType='com.atlassian.ai-blocks'] {\n\t\t.extension-container {\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 its streaming */\n\tdiv[extensionType='com.atlassian.ai-blocks']:has(.streaming) {\n\t\t.extension-container {\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"])), prismBorderDarkStyles, prismBorderDarkStyles);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
5
|
+
export var backgroundColorStyles = css({
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
7
|
+
'.fabric-background-color-mark': {
|
|
8
|
+
backgroundColor: 'var(--custom-palette-color, inherit)',
|
|
9
|
+
borderRadius: 2,
|
|
10
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
11
|
+
paddingTop: 1,
|
|
12
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
13
|
+
paddingBottom: 2,
|
|
14
|
+
boxDecorationBreak: 'clone'
|
|
15
|
+
},
|
|
16
|
+
// Don't show text highlight styling when there is a hyperlink
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
18
|
+
'a .fabric-background-color-mark': {
|
|
19
|
+
backgroundColor: 'unset'
|
|
20
|
+
},
|
|
21
|
+
// Don't show text highlight styling when there is an inline comment
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
23
|
+
'.fabric-background-color-mark .ak-editor-annotation': {
|
|
24
|
+
backgroundColor: 'unset'
|
|
25
|
+
}
|
|
26
|
+
});
|