@atlaskit/editor-core 207.15.0 → 207.16.0
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 +29 -0
- package/dist/cjs/ui/ContentStyles/index.js +10 -2
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +14 -6
- package/dist/cjs/ui/EditorContentContainer/styles/expandStyles.js +263 -0
- package/dist/cjs/ui/EditorContentContainer/styles/inlineNodeViewSharedStyles.js +46 -0
- package/dist/cjs/ui/EditorContentContainer/styles/placeholderTextStyles.js +72 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/ContentStyles/index.js +9 -0
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +16 -5
- package/dist/es2019/ui/EditorContentContainer/styles/expandStyles.js +256 -0
- package/dist/es2019/ui/EditorContentContainer/styles/inlineNodeViewSharedStyles.js +40 -0
- package/dist/es2019/ui/EditorContentContainer/styles/placeholderTextStyles.js +65 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/ContentStyles/index.js +10 -2
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +14 -6
- package/dist/esm/ui/EditorContentContainer/styles/expandStyles.js +256 -0
- package/dist/esm/ui/EditorContentContainer/styles/inlineNodeViewSharedStyles.js +40 -0
- package/dist/esm/ui/EditorContentContainer/styles/placeholderTextStyles.js +65 -0
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/ui/EditorContentContainer/styles/expandStyles.d.ts +4 -0
- package/dist/types/ui/EditorContentContainer/styles/inlineNodeViewSharedStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/placeholderTextStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/expandStyles.d.ts +4 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/inlineNodeViewSharedStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/placeholderTextStyles.d.ts +1 -0
- package/package.json +17 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 207.16.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#165698](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/165698)
|
|
8
|
+
[`e97682ca74f19`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e97682ca74f19) -
|
|
9
|
+
[ux] [ED-27954] this change is extending the Find algorithm to status nodes behind the
|
|
10
|
+
platform_editor_find_and_replace_1 flag
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#166424](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/166424)
|
|
15
|
+
[`5bfa5b37065b1`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5bfa5b37065b1) -
|
|
16
|
+
[ED-27807] Fix a bug where first button in the floating toolbar is shown with focus ring when
|
|
17
|
+
pressing Option+F10
|
|
18
|
+
- [#165803](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/165803)
|
|
19
|
+
[`18e18ed9e9794`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/18e18ed9e9794) -
|
|
20
|
+
[ux] Migrate expand styles to static emotion
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
23
|
+
## 207.15.1
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- [#166381](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/166381)
|
|
28
|
+
[`e7b0081a1b221`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e7b0081a1b221) -
|
|
29
|
+
EDM-12154 cleaning up hardcoded embed only on new line feature flag
|
|
30
|
+
- Updated dependencies
|
|
31
|
+
|
|
3
32
|
## 207.15.0
|
|
4
33
|
|
|
5
34
|
### Minor Changes
|
|
@@ -136,6 +136,14 @@ var placeholderWrapStyles = (0, _react2.css)({
|
|
|
136
136
|
});
|
|
137
137
|
var firstBlockNodeStylesNew = (0, _react2.css)(_templateObject8 || (_templateObject8 = (0, _taggedTemplateLiteral2.default)(["\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"])), _panel.PanelSharedCssClassName.prefix, _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER, _styles.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _styles.expandClassNames.prefix);
|
|
138
138
|
|
|
139
|
+
// Make sure the first floating toolbar button has focus ring when focused via .focus()
|
|
140
|
+
var firstFloatingToolbarButtonStyles = (0, _react2.css)({
|
|
141
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
142
|
+
'button.first-floating-toolbar-button:focus': {
|
|
143
|
+
outline: "2px solid ".concat("var(--ds-border-focused, #2684FF)")
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
139
147
|
// The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
|
|
140
148
|
var akEditorBreakpointForSmallDevice = "1266px";
|
|
141
149
|
|
|
@@ -144,9 +152,9 @@ var akEditorBreakpointForSmallDevice = "1266px";
|
|
|
144
152
|
// Under editor experiment platform_editor_core_static_emotion
|
|
145
153
|
// If you are making changes to this file, please make sure to update in EditorContentContainer.tsx as well
|
|
146
154
|
var legacyContentStyles = function legacyContentStyles(props) {
|
|
147
|
-
return (0, _react2.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\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: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\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\t", "\n\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\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\t", "\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\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn 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 is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), _editorSharedStyles.akEditorGutterPadding, (0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, (0, _editorSharedStyles.editorFontSize)({
|
|
155
|
+
return (0, _react2.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\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: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\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\t", "\n\t", "\n\t", "\n\t", "\n\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n\t", "\n\t", "\n\t", "\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\t", "\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\tRelated code all lives inside: packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts\n\tIn 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 is bigger than the others, new ADS icon does not have this issue\n */\n\t", "\n"])), _editorSharedStyles.akEditorGutterPadding, (0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, (0, _editorSharedStyles.editorFontSize)({
|
|
148
156
|
theme: props.theme
|
|
149
|
-
}), _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(props.typographyTheme), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject0 || (_templateObject0 = (0, _taggedTemplateLiteral2.default)(["\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, (0, _experiments.editorExperiment)('platform_editor_advanced_code_blocks', true) ? (0, _react2.css)(_templateObject1 || (_templateObject1 = (0, _taggedTemplateLiteral2.default)(["\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)", _styles5.placeholderTextStyles, placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(props.typographyTheme), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), listsStyles, ruleStyles(), (0, _media.mediaStyles)(), (0, _layout.layoutStyles)(props.viewMode), (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _collab.telepointerStyle : _collab.telepointerStyleWithInitialOnly, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
157
|
+
}), _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(props.typographyTheme), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject0 || (_templateObject0 = (0, _taggedTemplateLiteral2.default)(["\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, (0, _experiments.editorExperiment)('platform_editor_advanced_code_blocks', true) ? (0, _react2.css)(_templateObject1 || (_templateObject1 = (0, _taggedTemplateLiteral2.default)(["\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)", (0, _platformFeatureFlags.fg)('platform_editor_fix_floating_toolbar_focus') ? firstFloatingToolbarButtonStyles : null, _styles5.placeholderTextStyles, placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(props.typographyTheme), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), listsStyles, ruleStyles(), (0, _media.mediaStyles)(), (0, _layout.layoutStyles)(props.viewMode), (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _collab.telepointerStyle : _collab.telepointerStyleWithInitialOnly, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
150
158
|
exposure: false
|
|
151
159
|
}) && vanillaMentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
152
160
|
exposure: false
|
|
@@ -11,14 +11,11 @@ var _react2 = require("@emotion/react");
|
|
|
11
11
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
12
12
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
13
13
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
14
|
-
var _styles2 = require("@atlaskit/editor-plugins/placeholder-text/styles");
|
|
15
14
|
var _commonStyles = require("@atlaskit/editor-plugins/table/ui/common-styles");
|
|
16
15
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
17
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
17
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
19
18
|
var _tokens = require("@atlaskit/tokens");
|
|
20
|
-
var _getInlineNodeViewProducer = require("../../nodeviews/getInlineNodeViewProducer.styles");
|
|
21
|
-
var _expand = require("../ContentStyles/expand");
|
|
22
19
|
var _extension = require("../ContentStyles/extension");
|
|
23
20
|
var _panel = require("../ContentStyles/panel");
|
|
24
21
|
var _status = require("../ContentStyles/status");
|
|
@@ -33,16 +30,19 @@ var _dateStyles = require("./styles/dateStyles");
|
|
|
33
30
|
var _editorUGCTokenStyles = require("./styles/editorUGCTokenStyles");
|
|
34
31
|
var _embedCardStyles = require("./styles/embedCardStyles");
|
|
35
32
|
var _emoji = require("./styles/emoji");
|
|
33
|
+
var _expandStyles = require("./styles/expandStyles");
|
|
36
34
|
var _findReplaceStyles = require("./styles/findReplaceStyles");
|
|
37
35
|
var _firstBlockNodeStyles = require("./styles/firstBlockNodeStyles");
|
|
38
36
|
var _gridStyles = require("./styles/gridStyles");
|
|
39
37
|
var _indentationStyles = require("./styles/indentationStyles");
|
|
38
|
+
var _inlineNodeViewSharedStyles = require("./styles/inlineNodeViewSharedStyles");
|
|
40
39
|
var _layout = require("./styles/layout");
|
|
41
40
|
var _link = require("./styles/link");
|
|
42
41
|
var _list = require("./styles/list");
|
|
43
42
|
var _mediaStyles = require("./styles/mediaStyles");
|
|
44
43
|
var _mentions = require("./styles/mentions");
|
|
45
44
|
var _paragraphStyles = require("./styles/paragraphStyles");
|
|
45
|
+
var _placeholderTextStyles = require("./styles/placeholderTextStyles");
|
|
46
46
|
var _resizerStyles = require("./styles/resizerStyles");
|
|
47
47
|
var _rule = require("./styles/rule");
|
|
48
48
|
var _shadowStyles = require("./styles/shadowStyles");
|
|
@@ -103,7 +103,7 @@ var akEditorBreakpointForSmallDevice = "1266px";
|
|
|
103
103
|
|
|
104
104
|
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
105
105
|
var contentStyles = function contentStyles() {
|
|
106
|
-
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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\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\t", "\n\n\t", "\n\t", "\n \t", "\n\n\n \t", "\n\n\t", "\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n /* This needs to be after telepointer styles as some overlapping rules have equal specificity, and so the order is significant */\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 // 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 ", "\n\n\t.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\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"])), _editorSharedStyles.akEditorGutterPadding, (0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, _whitespaceStyles.whitespaceStyles, _indentationStyles.indentationStyles, _shadowStyles.shadowStyles,
|
|
106
|
+
return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\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\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\t", "\n\n\t", "\n\t", "\n \t", "\n\n\n \t", "\n\n\t", "\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n /* This needs to be after telepointer styles as some overlapping rules have equal specificity, and so the order is significant */\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 // 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 ", "\n\n\t.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\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"])), _editorSharedStyles.akEditorGutterPadding, (0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), _editorSharedStyles.akEditorDefaultLayoutWidth, _editorSharedStyles.akEditorFullWidthLayoutWidth, _editorSharedStyles.akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, _editorSharedStyles.akEditorCalculatedWideLayoutWidth, _whitespaceStyles.whitespaceStyles, _indentationStyles.indentationStyles, _shadowStyles.shadowStyles, _inlineNodeViewSharedStyles.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\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, (0, _experiments.editorExperiment)('platform_editor_advanced_code_blocks', true) ? (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\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.placeholderTextStyles, placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, _codeBlockStyles.codeBlockStyles, !(0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') && _editorUGCTokenStyles.editorUGCTokensDefault,
|
|
107
107
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
108
108
|
(0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') && ( /* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
109
109
|
(0, _platformFeatureFlags.fg)('platform-dst-jira-web-fonts') || (0, _platformFeatureFlags.fg)('confluence_typography_refreshed') || (0, _platformFeatureFlags.fg)('atlas_editor_typography_refreshed')) && _editorUGCTokenStyles.editorUGCTokensRefreshed
|
|
@@ -111,7 +111,7 @@ var contentStyles = function contentStyles() {
|
|
|
111
111
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
112
112
|
(0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') && /* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
113
113
|
!((0, _platformFeatureFlags.fg)('platform-dst-jira-web-fonts') || (0, _platformFeatureFlags.fg)('confluence_typography_refreshed') || (0, _platformFeatureFlags.fg)('atlas_editor_typography_refreshed')) && _editorUGCTokenStyles.editorUGCTokensModernized
|
|
114
|
-
/* eslint-enable @atlaskit/platform/ensure-feature-flag-prefix */, _blockTypeStyles.blocktypeStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') && _blockTypeStyles.blocktypeStyles_fg_platform_editor_typography_ugc, !(0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') && _blockTypeStyles.blocktypeStyles_without_fg_platform_editor_typography_ugc, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && _blockTypeStyles.blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, _codeMarkStyles.codeMarkStyles, _textColorStyles.textColorStyles, _backgroundColorStyles.backgroundColorStyles, _list.listsStyles, _rule.ruleStyles, _mediaStyles.mediaStyles, (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _telepointerStyles.telepointerStyle : _telepointerStyles.telepointerStyleWithInitialOnly, _telepointerStyles.telepointerColorAndCommonStyle, _selection.gapCursorStyles, (0, _panel.panelStyles)(), _mentions.mentionsStyles, _tasksAndDecisionsStyles.tasksAndDecisionsStyles, _gridStyles.gridStyles, _blockMarksStyles.blockMarksStyles, _dateStyles.dateStyles, _extension.extensionStyles, (0,
|
|
114
|
+
/* eslint-enable @atlaskit/platform/ensure-feature-flag-prefix */, _blockTypeStyles.blocktypeStyles, (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') && _blockTypeStyles.blocktypeStyles_fg_platform_editor_typography_ugc, !(0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') && _blockTypeStyles.blocktypeStyles_without_fg_platform_editor_typography_ugc, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && _blockTypeStyles.blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, _codeMarkStyles.codeMarkStyles, _textColorStyles.textColorStyles, _backgroundColorStyles.backgroundColorStyles, _list.listsStyles, _rule.ruleStyles, _mediaStyles.mediaStyles, (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _telepointerStyles.telepointerStyle : _telepointerStyles.telepointerStyleWithInitialOnly, _telepointerStyles.telepointerColorAndCommonStyle, _selection.gapCursorStyles, (0, _panel.panelStyles)(), _mentions.mentionsStyles, _tasksAndDecisionsStyles.tasksAndDecisionsStyles, _gridStyles.gridStyles, _blockMarksStyles.blockMarksStyles, _dateStyles.dateStyles, _extension.extensionStyles, _expandStyles.expandStyles, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && _expandStyles.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, !(0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && _expandStyles.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _expandStyles.expandStylesMixin_fg_platform_visual_refresh_icons, _findReplaceStyles.findReplaceStyles, _textHighlightStyles.textHighlightStyle, _tasksAndDecisionsStyles.decisionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
115
115
|
exposure: false
|
|
116
116
|
}) && _tasksAndDecisionsStyles.vanillaTaskItemStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
117
117
|
exposure: false
|
|
@@ -187,6 +187,14 @@ var listLayoutShiftFix = (0, _react2.css)({
|
|
|
187
187
|
}
|
|
188
188
|
});
|
|
189
189
|
|
|
190
|
+
// Make sure the first floating toolbar button has focus ring when focused via .focus()
|
|
191
|
+
var firstFloatingToolbarButtonStyles = (0, _react2.css)({
|
|
192
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
193
|
+
'button.first-floating-toolbar-button:focus': {
|
|
194
|
+
outline: "2px solid ".concat("var(--ds-border-focused, #2684FF)")
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
|
|
190
198
|
/**
|
|
191
199
|
* EditorContentStyles is a wrapper component that applies styles to its children
|
|
192
200
|
* based on the provided feature flags, view mode, and other props.
|
|
@@ -261,7 +269,7 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
261
269
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
262
270
|
_emoji.vanillaEmojiStyles :
|
|
263
271
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
264
|
-
_emoji.reactEmojiStyles],
|
|
272
|
+
_emoji.reactEmojiStyles, (0, _platformFeatureFlags.fg)('platform_editor_fix_floating_toolbar_focus') && firstFloatingToolbarButtonStyles],
|
|
265
273
|
"data-editor-scroll-container": isScrollable ? 'true' : undefined,
|
|
266
274
|
"data-testid": "editor-content-container",
|
|
267
275
|
style: {
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes = exports.expandStylesMixin_fg_platform_visual_refresh_icons = exports.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes = exports.expandStyles = 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 expandStyles = exports.expandStyles = (0, _react.css)({
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
13
|
+
'.ak-editor-expand__icon > div': {
|
|
14
|
+
display: 'flex'
|
|
15
|
+
},
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
17
|
+
'.ak-editor-expand': {
|
|
18
|
+
// sharedExpandStyles.containerStyles({ expanded: false, focused: false })(),
|
|
19
|
+
borderWidth: '1px',
|
|
20
|
+
borderStyle: 'solid',
|
|
21
|
+
borderColor: 'transparent',
|
|
22
|
+
borderRadius: "var(--ds-border-radius-100, 4px)",
|
|
23
|
+
minHeight: '25px',
|
|
24
|
+
background: "var(--ds-background-neutral-subtle, transparent)",
|
|
25
|
+
margin: "var(--ds-space-050, 0.25rem)".concat(" 0 0"),
|
|
26
|
+
transition: 'background 0.3s cubic-bezier(0.15, 1, 0.3, 1), border-color 0.3s cubic-bezier(0.15, 1, 0.3, 1)',
|
|
27
|
+
padding: "var(--ds-space-100, 8px)",
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
29
|
+
'td > :not(style):first-child, td > style:first-child + *': {
|
|
30
|
+
marginTop: 0
|
|
31
|
+
},
|
|
32
|
+
cursor: 'pointer',
|
|
33
|
+
boxSizing: 'border-box',
|
|
34
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
35
|
+
'td > &': {
|
|
36
|
+
marginTop: 0
|
|
37
|
+
},
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
39
|
+
'.ak-editor-expand__icon-container svg': {
|
|
40
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
41
|
+
transform: 'rotate(90deg)'
|
|
42
|
+
},
|
|
43
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
44
|
+
'&.ak-editor-selected-node:not(.danger)': {
|
|
45
|
+
// SelectionStyle.Blanket
|
|
46
|
+
position: 'relative',
|
|
47
|
+
// Fixes ED-9263, where emoji or inline card in panel makes selection go outside the panel
|
|
48
|
+
// in Safari. Looks like it's caused by user-select: all in the emoji element
|
|
49
|
+
'-webkit-user-select': 'text',
|
|
50
|
+
'&::before': {
|
|
51
|
+
position: 'absolute',
|
|
52
|
+
content: "''",
|
|
53
|
+
left: 0,
|
|
54
|
+
right: 0,
|
|
55
|
+
top: 0,
|
|
56
|
+
bottom: 0,
|
|
57
|
+
width: '100%',
|
|
58
|
+
pointerEvents: 'none',
|
|
59
|
+
zIndex: 12,
|
|
60
|
+
// akEditorStickyheaderZIndex (11) + 1
|
|
61
|
+
backgroundColor: "var(--ds-blanket-selected, #388BFF14)"
|
|
62
|
+
},
|
|
63
|
+
// SelectionStyle.Border (common case)
|
|
64
|
+
border: "1px solid ".concat("var(--ds-border-selected, #0C66E4)"),
|
|
65
|
+
// If fg('platform_editor_nested_dnd_styles_changes') is true,
|
|
66
|
+
// then we'll also need the rest of the selection styles for blanket
|
|
67
|
+
|
|
68
|
+
// hideNativeBrowserTextSelectionStyles
|
|
69
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
70
|
+
'&::selection, *::selection': {
|
|
71
|
+
backgroundColor: 'transparent'
|
|
72
|
+
},
|
|
73
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
74
|
+
'&::-moz-selection, *::-moz-selection': {
|
|
75
|
+
backgroundColor: 'transparent'
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
79
|
+
'&.danger': {
|
|
80
|
+
background: "var(--ds-background-danger, #FFECEB)",
|
|
81
|
+
borderColor: "var(--ds-border-danger, #E2483D)"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
85
|
+
'.ProseMirror > .ak-editor-expand__type-expand, .fabric-editor-breakout-mark-dom > .ak-editor-expand__type-expand': {
|
|
86
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
87
|
+
marginLeft: '-12px',
|
|
88
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
89
|
+
marginRight: '-12px'
|
|
90
|
+
},
|
|
91
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
92
|
+
'.ak-editor-expand__content': {
|
|
93
|
+
// sharedExpandStyles.contentStyles({ expanded: false, focused: false })(),
|
|
94
|
+
paddingTop: "var(--ds-space-0, 0px)",
|
|
95
|
+
paddingRight: "var(--ds-space-100, 8px)",
|
|
96
|
+
paddingLeft: "var(--ds-space-300, 24px)",
|
|
97
|
+
marginLeft: "var(--ds-space-050, 4px)",
|
|
98
|
+
display: 'flow-root',
|
|
99
|
+
/* The follow rules inside @supports block are added as a part of ED-8893
|
|
100
|
+
The fix is targeting mobile bridge on iOS 12 or below,
|
|
101
|
+
We should consider remove this fix when we no longer support iOS 12 */
|
|
102
|
+
'@supports not (display: flow-root)': {
|
|
103
|
+
width: '100%',
|
|
104
|
+
boxSizing: 'border-box'
|
|
105
|
+
},
|
|
106
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
107
|
+
'.expand-content-wrapper, .nestedExpand-content-wrapper': {
|
|
108
|
+
/* We visually hide the content here to preserve the content during copy+paste */
|
|
109
|
+
/* Do not add text nowrap here because inline comment navigation depends on the location of the text */
|
|
110
|
+
width: '100%',
|
|
111
|
+
display: 'block',
|
|
112
|
+
height: 0,
|
|
113
|
+
overflow: 'hidden',
|
|
114
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
115
|
+
userSelect: 'none'
|
|
116
|
+
},
|
|
117
|
+
cursor: 'text'
|
|
118
|
+
},
|
|
119
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
120
|
+
'.ak-editor-expand__title-input': {
|
|
121
|
+
// sharedExpandStyles.titleInputStyles(),
|
|
122
|
+
outline: 'none',
|
|
123
|
+
border: 'none',
|
|
124
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
125
|
+
fontSize: 'calc(14rem / 16)',
|
|
126
|
+
// relativeFontSizeToBase16(14),
|
|
127
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
128
|
+
lineHeight: 1.714,
|
|
129
|
+
// If fg('platform-visual-refresh-icons') then this needs to be overridden
|
|
130
|
+
fontWeight: "var(--ds-font-weight-regular, 400)",
|
|
131
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
132
|
+
background: 'transparent',
|
|
133
|
+
display: 'flex',
|
|
134
|
+
flex: 1,
|
|
135
|
+
padding: "0 0 0 ".concat("var(--ds-space-050, 4px)"),
|
|
136
|
+
width: '100%',
|
|
137
|
+
'&::placeholder': {
|
|
138
|
+
opacity: 1,
|
|
139
|
+
color: "var(--ds-text-subtlest, #626F86)"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
143
|
+
'.ak-editor-expand__title-container': {
|
|
144
|
+
// sharedExpandStyles.titleContainerStyles(),
|
|
145
|
+
padding: 0,
|
|
146
|
+
display: 'flex',
|
|
147
|
+
// Omitting alignItems: 'flex-start' as it would be overridden
|
|
148
|
+
background: 'none',
|
|
149
|
+
border: 'none',
|
|
150
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
151
|
+
fontSize: 'calc(14rem / 16)',
|
|
152
|
+
// relativeFontSizeToBase16(14),
|
|
153
|
+
width: '100%',
|
|
154
|
+
color: "var(--ds-text-subtle, #44546F)",
|
|
155
|
+
// Omitting overflow: 'hidden' as it would be overridden
|
|
156
|
+
cursor: 'pointer',
|
|
157
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
158
|
+
'&:focus': {
|
|
159
|
+
outline: 0
|
|
160
|
+
},
|
|
161
|
+
alignItems: 'center',
|
|
162
|
+
overflow: 'visible'
|
|
163
|
+
},
|
|
164
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
165
|
+
'.ak-editor-expand__expanded': {
|
|
166
|
+
background: "var(--ds-background-neutral-subtle, #00000000)",
|
|
167
|
+
borderColor: "var(--ds-border, #091E4224)",
|
|
168
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
169
|
+
'.ak-editor-expand__content': {
|
|
170
|
+
paddingTop: "var(--ds-space-100, 8px)"
|
|
171
|
+
// If fg('platform_editor_nested_dnd_styles_changes') then this needs to be extended
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
175
|
+
'.ak-editor-expand__input-container': {
|
|
176
|
+
width: '100%'
|
|
177
|
+
},
|
|
178
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
179
|
+
'.ak-editor-expand:not(.ak-editor-expand__expanded)': {
|
|
180
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
181
|
+
'.ak-editor-expand__content': {
|
|
182
|
+
position: 'absolute',
|
|
183
|
+
height: '1px',
|
|
184
|
+
width: '1px',
|
|
185
|
+
overflow: 'hidden',
|
|
186
|
+
clip: 'rect(1px, 1px, 1px, 1px)',
|
|
187
|
+
whiteSpace: 'nowrap'
|
|
188
|
+
},
|
|
189
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
190
|
+
'.ak-editor-expand__icon-container svg': {
|
|
191
|
+
color: "var(--ds-icon-subtle, #626F86)",
|
|
192
|
+
transform: 'rotate(0deg)'
|
|
193
|
+
},
|
|
194
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
195
|
+
'&:not(.ak-editor-selected-node):not(.danger)': {
|
|
196
|
+
background: 'transparent',
|
|
197
|
+
borderColor: 'transparent',
|
|
198
|
+
'&:hover': {
|
|
199
|
+
borderColor: "var(--ds-border, #091E4224)",
|
|
200
|
+
background: "var(--ds-background-neutral-subtle, #00000000)"
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
207
|
+
var expandStylesMixin_fg_platform_visual_refresh_icons = exports.expandStylesMixin_fg_platform_visual_refresh_icons = (0, _react.css)({
|
|
208
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
209
|
+
'.ak-editor-expand__title-input': {
|
|
210
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
211
|
+
lineHeight: 1
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
216
|
+
var expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes = exports.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes = (0, _react.css)({
|
|
217
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
218
|
+
'.ak-editor-content-area.appearance-full-page .ProseMirror > .ak-editor-expand__type-expand, .fabric-editor-breakout-mark-dom > .ak-editor-expand__type-expand': {
|
|
219
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
220
|
+
marginLeft: '-20px',
|
|
221
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
222
|
+
marginRight: '-20px'
|
|
223
|
+
},
|
|
224
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
225
|
+
'.ak-editor-expand__expanded': {
|
|
226
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
227
|
+
'.ak-editor-expand__content': {
|
|
228
|
+
// firstNodeWithNotMarginTop
|
|
229
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
230
|
+
'> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span))': {
|
|
231
|
+
marginTop: 0
|
|
232
|
+
},
|
|
233
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
234
|
+
'> div.ak-editor-expand[data-node-type="nestedExpand"]': {
|
|
235
|
+
marginTop: "var(--ds-space-050, 0.25rem)"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
242
|
+
var expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes = exports.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes = (0, _react.css)({
|
|
243
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
244
|
+
'.ak-editor-expand': {
|
|
245
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
246
|
+
'&.ak-editor-selected-node:not(.danger)': {
|
|
247
|
+
// SelectionStyle.Border (with fg('platform_editor_nested_dnd_styles_changes'))
|
|
248
|
+
// Fixes ED-15246: Trello card is visible through a border of a table border
|
|
249
|
+
'&::after': {
|
|
250
|
+
height: '100%',
|
|
251
|
+
content: "'\\00a0'",
|
|
252
|
+
background: "var(--ds-border-selected, #0C66E4)",
|
|
253
|
+
position: 'absolute',
|
|
254
|
+
right: '-1px',
|
|
255
|
+
top: 0,
|
|
256
|
+
bottom: 0,
|
|
257
|
+
width: '1px',
|
|
258
|
+
border: 'none',
|
|
259
|
+
display: 'inline-block'
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.InlineNodeViewSharedStyles = 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 InlineNodeViewSharedStyles = exports.InlineNodeViewSharedStyles = (0, _react.css)({
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
13
|
+
'.inlineNodeView': {
|
|
14
|
+
display: 'inline',
|
|
15
|
+
userSelect: 'all',
|
|
16
|
+
whiteSpace: 'nowrap',
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
18
|
+
'& > *:not(.zeroWidthSpaceContainer)': {
|
|
19
|
+
whiteSpace: 'pre-wrap'
|
|
20
|
+
},
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
22
|
+
'& > .assistive': {
|
|
23
|
+
userSelect: 'none'
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
27
|
+
'&.ua-safari': {
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
29
|
+
'.inlineNodeView': {
|
|
30
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
31
|
+
'&::selection, *::selection': {
|
|
32
|
+
background: 'transparent'
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
37
|
+
'&.ua-chrome .inlineNodeView > span': {
|
|
38
|
+
userSelect: 'none'
|
|
39
|
+
},
|
|
40
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
41
|
+
'.inlineNodeViewAddZeroWidthSpace': {
|
|
42
|
+
'&::after': {
|
|
43
|
+
content: "'\u200B'" // ZERO_WIDTH_SPACE
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.placeholderTextStyles = 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 placeholderTextStyles = exports.placeholderTextStyles = (0, _react.css)({
|
|
12
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
13
|
+
'.ProseMirror span[data-placeholder]': {
|
|
14
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
15
|
+
display: 'inline'
|
|
16
|
+
},
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
18
|
+
'.ProseMirror span.pm-placeholder': {
|
|
19
|
+
display: 'inline',
|
|
20
|
+
color: "var(--ds-text-subtlest, #626F86)"
|
|
21
|
+
},
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
23
|
+
'.ProseMirror span.pm-placeholder__text': {
|
|
24
|
+
display: 'inline',
|
|
25
|
+
color: "var(--ds-text-subtlest, #626F86)"
|
|
26
|
+
},
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
28
|
+
'.ProseMirror span.pm-placeholder.ak-editor-selected-node': {
|
|
29
|
+
// ...backgroundSelectionStyles
|
|
30
|
+
backgroundColor: "var(--ds-background-selected, #E9F2FF)",
|
|
31
|
+
// ...backgroundSelectionStyles -> hideNativeBrowserTextSelectionStyles
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
33
|
+
'&::selection,*::selection': {
|
|
34
|
+
backgroundColor: 'transparent'
|
|
35
|
+
},
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors, @atlaskit/ui-styling-standard/no-nested-selectors
|
|
37
|
+
'&::-moz-selection,*::-moz-selection': {
|
|
38
|
+
backgroundColor: 'transparent'
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
42
|
+
'.ProseMirror span.pm-placeholder__text[data-placeholder]::after': {
|
|
43
|
+
color: "var(--ds-text-subtlest, #626F86)",
|
|
44
|
+
cursor: 'text',
|
|
45
|
+
content: 'attr(data-placeholder)',
|
|
46
|
+
display: 'inline'
|
|
47
|
+
},
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
49
|
+
'.ProseMirror': {
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
51
|
+
'.ProseMirror-fake-text-cursor': {
|
|
52
|
+
display: 'inline',
|
|
53
|
+
pointerEvents: 'none',
|
|
54
|
+
position: 'relative'
|
|
55
|
+
},
|
|
56
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
57
|
+
'.ProseMirror-fake-text-cursor::after': {
|
|
58
|
+
content: '""',
|
|
59
|
+
display: 'inline',
|
|
60
|
+
top: 0,
|
|
61
|
+
position: 'absolute',
|
|
62
|
+
borderRight: "1px solid ".concat("var(--ds-border, #091E4224)")
|
|
63
|
+
},
|
|
64
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
65
|
+
'.ProseMirror-fake-text-selection': {
|
|
66
|
+
display: 'inline',
|
|
67
|
+
pointerEvents: 'none',
|
|
68
|
+
position: 'relative',
|
|
69
|
+
backgroundColor: "var(--ds-background-selected, #B3D4FF)"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
@@ -269,6 +269,14 @@ const firstBlockNodeStylesNew = css`
|
|
|
269
269
|
}
|
|
270
270
|
`;
|
|
271
271
|
|
|
272
|
+
// Make sure the first floating toolbar button has focus ring when focused via .focus()
|
|
273
|
+
const firstFloatingToolbarButtonStyles = css({
|
|
274
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
275
|
+
'button.first-floating-toolbar-button:focus': {
|
|
276
|
+
outline: `2px solid ${"var(--ds-border-focused, #2684FF)"}`
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
|
|
272
280
|
// The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
|
|
273
281
|
const akEditorBreakpointForSmallDevice = `1266px`;
|
|
274
282
|
|
|
@@ -371,6 +379,7 @@ const legacyContentStyles = props => css`
|
|
|
371
379
|
display: none;
|
|
372
380
|
}
|
|
373
381
|
|
|
382
|
+
${fg('platform_editor_fix_floating_toolbar_focus') ? firstFloatingToolbarButtonStyles : null}
|
|
374
383
|
${placeholderTextStyles}
|
|
375
384
|
${placeholderStyles}
|
|
376
385
|
${editorExperiment('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null}
|