@atlaskit/editor-core 207.19.1 → 207.19.2
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 +12 -0
- package/dist/cjs/i18n/sk.js +2 -2
- package/dist/cjs/i18n/sr.js +19 -0
- package/dist/cjs/presets/default.js +3 -1
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +182 -145
- package/dist/cjs/ui/EditorContentContainer/styles/baseStyles.js +53 -0
- package/dist/cjs/ui/EditorContentContainer/styles/commentEditorStyles.js +32 -0
- package/dist/cjs/ui/EditorContentContainer/styles/cursorStyles.js +20 -0
- package/dist/cjs/ui/EditorContentContainer/styles/extensionStyles.js +352 -0
- package/dist/cjs/ui/EditorContentContainer/styles/floatingToolbarStyles.js +18 -0
- package/dist/cjs/ui/EditorContentContainer/styles/fullPageEditorStyles.js +20 -0
- package/dist/cjs/ui/EditorContentContainer/styles/indentationStyles.js +33 -30
- package/dist/cjs/ui/EditorContentContainer/styles/inlineNodeViewSharedStyles.js +29 -26
- package/dist/cjs/ui/EditorContentContainer/styles/link.js +25 -1
- package/dist/cjs/ui/EditorContentContainer/styles/list.js +11 -2
- package/dist/cjs/ui/EditorContentContainer/styles/mediaStyles.js +43 -2
- package/dist/cjs/ui/EditorContentContainer/styles/panelStyles.js +9 -1
- package/dist/cjs/ui/EditorContentContainer/styles/{placeholderTextStyles.js → placeholderStyles.js} +39 -1
- package/dist/cjs/ui/EditorContentContainer/styles/scrollbarStyles.js +35 -0
- package/dist/cjs/ui/EditorContentContainer/styles/selectionStyles.js +45 -1
- package/dist/cjs/ui/EditorContentContainer/styles/shadowStyles.js +33 -30
- package/dist/cjs/ui/EditorContentContainer/styles/tableStyles.js +35 -0
- package/dist/cjs/ui/EditorContentContainer/styles/whitespaceStyles.js +5 -2
- package/dist/cjs/ui/EditorContext/index.js +1 -8
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/i18n/sk.js +2 -2
- package/dist/es2019/i18n/sr.js +13 -0
- package/dist/es2019/presets/default.js +3 -1
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +185 -409
- package/dist/es2019/ui/EditorContentContainer/styles/baseStyles.js +48 -0
- package/dist/es2019/ui/EditorContentContainer/styles/commentEditorStyles.js +25 -0
- package/dist/es2019/ui/EditorContentContainer/styles/cursorStyles.js +14 -0
- package/dist/es2019/ui/EditorContentContainer/styles/extensionStyles.js +346 -0
- package/dist/es2019/ui/EditorContentContainer/styles/floatingToolbarStyles.js +11 -0
- package/dist/es2019/ui/EditorContentContainer/styles/fullPageEditorStyles.js +14 -0
- package/dist/es2019/ui/EditorContentContainer/styles/indentationStyles.js +33 -30
- package/dist/es2019/ui/EditorContentContainer/styles/inlineNodeViewSharedStyles.js +29 -26
- package/dist/es2019/ui/EditorContentContainer/styles/link.js +24 -0
- package/dist/es2019/ui/EditorContentContainer/styles/list.js +9 -0
- package/dist/es2019/ui/EditorContentContainer/styles/mediaStyles.js +41 -0
- package/dist/es2019/ui/EditorContentContainer/styles/panelStyles.js +8 -0
- package/dist/es2019/ui/EditorContentContainer/styles/{placeholderTextStyles.js → placeholderStyles.js} +38 -0
- package/dist/es2019/ui/EditorContentContainer/styles/scrollbarStyles.js +28 -0
- package/dist/es2019/ui/EditorContentContainer/styles/selectionStyles.js +44 -0
- package/dist/es2019/ui/EditorContentContainer/styles/shadowStyles.js +43 -40
- package/dist/es2019/ui/EditorContentContainer/styles/tableStyles.js +31 -0
- package/dist/es2019/ui/EditorContentContainer/styles/whitespaceStyles.js +5 -2
- package/dist/es2019/ui/EditorContext/index.js +1 -8
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/i18n/sk.js +2 -2
- package/dist/esm/i18n/sr.js +13 -0
- package/dist/esm/presets/default.js +3 -1
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +185 -150
- package/dist/esm/ui/EditorContentContainer/styles/baseStyles.js +46 -0
- package/dist/esm/ui/EditorContentContainer/styles/commentEditorStyles.js +25 -0
- package/dist/esm/ui/EditorContentContainer/styles/cursorStyles.js +14 -0
- package/dist/esm/ui/EditorContentContainer/styles/extensionStyles.js +346 -0
- package/dist/esm/ui/EditorContentContainer/styles/floatingToolbarStyles.js +11 -0
- package/dist/esm/ui/EditorContentContainer/styles/fullPageEditorStyles.js +14 -0
- package/dist/esm/ui/EditorContentContainer/styles/indentationStyles.js +33 -30
- package/dist/esm/ui/EditorContentContainer/styles/inlineNodeViewSharedStyles.js +29 -26
- package/dist/esm/ui/EditorContentContainer/styles/link.js +24 -0
- package/dist/esm/ui/EditorContentContainer/styles/list.js +10 -1
- package/dist/esm/ui/EditorContentContainer/styles/mediaStyles.js +42 -1
- package/dist/esm/ui/EditorContentContainer/styles/panelStyles.js +8 -0
- package/dist/esm/ui/EditorContentContainer/styles/{placeholderTextStyles.js → placeholderStyles.js} +38 -0
- package/dist/esm/ui/EditorContentContainer/styles/scrollbarStyles.js +28 -0
- package/dist/esm/ui/EditorContentContainer/styles/selectionStyles.js +44 -0
- package/dist/esm/ui/EditorContentContainer/styles/shadowStyles.js +33 -30
- package/dist/esm/ui/EditorContentContainer/styles/tableStyles.js +28 -0
- package/dist/esm/ui/EditorContentContainer/styles/whitespaceStyles.js +5 -2
- package/dist/esm/ui/EditorContext/index.js +1 -8
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +12 -3
- package/dist/types/i18n/sr.d.ts +12 -0
- package/dist/types/presets/default.d.ts +1 -0
- package/dist/types/presets/universal.d.ts +18 -4
- package/dist/types/presets/useUniversalPreset.d.ts +12 -3
- package/dist/types/ui/EditorContentContainer/EditorContentContainer.d.ts +0 -1
- package/dist/types/ui/EditorContentContainer/styles/baseStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/commentEditorStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/cursorStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/extensionStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/floatingToolbarStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/fullPageEditorStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/link.d.ts +2 -0
- package/dist/types/ui/EditorContentContainer/styles/list.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/mediaStyles.d.ts +2 -0
- package/dist/types/ui/EditorContentContainer/styles/panelStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/placeholderStyles.d.ts +4 -0
- package/dist/types/ui/EditorContentContainer/styles/scrollbarStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/selectionStyles.d.ts +10 -0
- package/dist/types/ui/EditorContentContainer/styles/tableStyles.d.ts +3 -0
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +14 -3
- package/dist/types-ts4.5/i18n/sr.d.ts +12 -0
- package/dist/types-ts4.5/presets/default.d.ts +1 -0
- package/dist/types-ts4.5/presets/universal.d.ts +20 -4
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +14 -3
- package/dist/types-ts4.5/ui/EditorContentContainer/EditorContentContainer.d.ts +0 -1
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/baseStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/commentEditorStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/cursorStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/extensionStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/floatingToolbarStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/fullPageEditorStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/link.d.ts +2 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/list.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/mediaStyles.d.ts +2 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/panelStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/placeholderStyles.d.ts +4 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/scrollbarStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/selectionStyles.d.ts +10 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/tableStyles.d.ts +3 -0
- package/package.json +2 -14
- package/dist/types/ui/EditorContentContainer/styles/placeholderTextStyles.d.ts +0 -1
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/placeholderTextStyles.d.ts +0 -1
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
1
|
+
/* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
3
2
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
4
|
-
/* eslint-disable react-hooks/rules-of-hooks */
|
|
5
|
-
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Requires manual remediation over time due to use of unsafe nested mixins */
|
|
6
3
|
/**
|
|
7
4
|
* @jsxRuntime classic
|
|
8
5
|
* @jsx jsx
|
|
@@ -10,46 +7,52 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
|
|
|
10
7
|
import React from 'react';
|
|
11
8
|
|
|
12
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
13
|
-
import {
|
|
10
|
+
import { jsx, useTheme } from '@emotion/react';
|
|
14
11
|
import { browser } from '@atlaskit/editor-common/browser';
|
|
15
|
-
import {
|
|
16
|
-
import { tableCommentEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
17
|
-
import { akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, editorFontSize } from '@atlaskit/editor-shared-styles';
|
|
12
|
+
import { akEditorGutterPaddingDynamic, editorFontSize } from '@atlaskit/editor-shared-styles';
|
|
18
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
19
14
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
20
15
|
import { useThemeObserver } from '@atlaskit/tokens';
|
|
21
|
-
import { extensionStyles } from '../ContentStyles/extension';
|
|
22
16
|
import { aiPanelBaseFirefoxStyles, aiPanelBaseStyles, aiPanelDarkFirefoxStyles, aiPanelDarkStyles } from './styles/aiPanel';
|
|
23
17
|
import { annotationStyles } from './styles/annotationStyles';
|
|
24
18
|
import { backgroundColorStyles } from './styles/backgroundColorStyles';
|
|
19
|
+
import { baseStyles } from './styles/baseStyles';
|
|
25
20
|
import { blockMarksStyles } from './styles/blockMarksStyles';
|
|
26
21
|
import { blocktypeStyles, blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, blocktypeStyles_fg_platform_editor_typography_ugc, blocktypeStyles_without_fg_platform_editor_typography_ugc } from './styles/blockTypeStyles';
|
|
27
22
|
import { codeBlockStyles, firstCodeBlockWithNoMargin, firstCodeBlockWithNoMarginOld } from './styles/codeBlockStyles';
|
|
28
23
|
import { codeMarkStyles } from './styles/codeMarkStyles';
|
|
24
|
+
import { commentEditorStyles } from './styles/commentEditorStyles';
|
|
25
|
+
import { cursorStyles } from './styles/cursorStyles';
|
|
29
26
|
import { dateStyles, dateVanillaStyles } from './styles/dateStyles';
|
|
30
27
|
import { editorUGCTokensDefault, editorUGCTokensModernized, editorUGCTokensRefreshed } from './styles/editorUGCTokenStyles';
|
|
31
28
|
import { embedCardStyles } from './styles/embedCardStyles';
|
|
32
29
|
import { reactEmojiStyles, vanillaEmojiStyles } from './styles/emoji';
|
|
33
30
|
import { expandStyles, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes } from './styles/expandStyles';
|
|
31
|
+
import { extensionStyles } from './styles/extensionStyles';
|
|
34
32
|
import { findReplaceStyles } from './styles/findReplaceStyles';
|
|
35
33
|
import { firstBlockNodeStyles } from './styles/firstBlockNodeStyles';
|
|
34
|
+
import { firstFloatingToolbarButtonStyles } from './styles/floatingToolbarStyles';
|
|
35
|
+
import { fullPageEditorStyles } from './styles/fullPageEditorStyles';
|
|
36
36
|
import { gapCursorStyles } from './styles/gapCursorStyles';
|
|
37
37
|
import { gridStyles } from './styles/gridStyles';
|
|
38
38
|
import { indentationStyles } from './styles/indentationStyles';
|
|
39
39
|
import { InlineNodeViewSharedStyles } from './styles/inlineNodeViewSharedStyles';
|
|
40
40
|
import { layoutColumnResponsiveStyles, layoutBaseStyles, layoutBaseStylesAdvanced, layoutBaseStylesFixesUnderNestedDnDFG, layoutSelectedStylesNotAdvanced, layoutSelectedStylesForViewNotAdvanced, layoutColumnMartinTopFixesNew, layoutColumnMartinTopFixesOld, layoutColumnStylesAdvanced, layoutColumnStylesNotAdvanced, layoutResponsiveBaseStyles, layoutResponsiveStylesForView, layoutSectionStylesAdvanced, layoutSectionStylesNotAdvanced, layoutStylesForView, layoutSelectedStylesAdvanced, layoutSelectedStylesForViewAdvanced } from './styles/layout';
|
|
41
|
-
import { linkStyles, linkStylesOld } from './styles/link';
|
|
42
|
-
import { listsStyles, listsStylesSafariFix } from './styles/list';
|
|
43
|
-
import { mediaStyles } from './styles/mediaStyles';
|
|
41
|
+
import { hyperLinkFloatingToolbarStyles, linkStyles, linkStylesOld, linkLegacyIconStylesFix } from './styles/link';
|
|
42
|
+
import { listLayoutShiftFix, listsStyles, listsStylesSafariFix } from './styles/list';
|
|
43
|
+
import { mediaAlignmentStyles, mediaGroupStyles, mediaStyles } from './styles/mediaStyles';
|
|
44
44
|
import { mentionsStyles, vanillaMentionsStyles, vanillaMentionsSelectionStyles } from './styles/mentions';
|
|
45
|
-
import { panelStyles, panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix } from './styles/panelStyles';
|
|
45
|
+
import { panelStyles, panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix, panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix, panelViewStyles } from './styles/panelStyles';
|
|
46
46
|
import { paragraphStylesOld, paragraphStylesUGCModernized, paragraphStylesUGCRefreshed } from './styles/paragraphStyles';
|
|
47
|
-
import { placeholderTextStyles } from './styles/
|
|
47
|
+
import { placeholderOverflowStyles, placeholderStyles, placeholderTextStyles, placeholderWrapStyles } from './styles/placeholderStyles';
|
|
48
48
|
import { resizerStyles, pragmaticResizerStyles, pragmaticResizerStylesForTooltip } from './styles/resizerStyles';
|
|
49
49
|
import { ruleStyles } from './styles/rule';
|
|
50
|
+
import { scrollbarStyles } from './styles/scrollbarStyles';
|
|
51
|
+
import { hideCursorWhenHideSelectionStyles, hideSelectionStyles, selectedNodeStyles } from './styles/selectionStyles';
|
|
50
52
|
import { shadowStyles } from './styles/shadowStyles';
|
|
51
53
|
import { linkingVisualRefreshV1Styles, smartCardStyles, smartLinksInLivePagesStyles, smartLinksInLivePagesStylesOld } from './styles/smartCardStyles';
|
|
52
54
|
import { statusStyles, statusStylesMixin_fg_platform_component_visual_refresh, statusStylesMixin_without_fg_platform_component_visual_refresh, vanillaStatusStyles, vanillaStatusStylesMixin_fg_platform_component_visual_refresh, vanillaStatusStylesMixin_without_fg_platform_component_visual_refresh } from './styles/statusStyles';
|
|
55
|
+
import { tableCommentEditorStyles, tableLayoutFixes } from './styles/tableStyles';
|
|
53
56
|
import { decisionStyles, tasksAndDecisionsStyles, vanillaDecisionIconWithoutVisualRefresh, vanillaDecisionIconWithVisualRefresh, vanillaDecisionStyles, vanillaTaskItemStyles } from './styles/tasksAndDecisionsStyles';
|
|
54
57
|
import { telepointerColorAndCommonStyle, telepointerStyle, telepointerStyleWithInitialOnly } from './styles/telepointerStyles';
|
|
55
58
|
import { textColorStyles } from './styles/textColorStyles';
|
|
@@ -57,138 +60,6 @@ import { textHighlightStyle } from './styles/textHighlightStyles';
|
|
|
57
60
|
import { unsupportedStyles } from './styles/unsupportedStyles';
|
|
58
61
|
import { whitespaceStyles } from './styles/whitespaceStyles';
|
|
59
62
|
var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
60
|
-
|
|
61
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
62
|
-
export var placeholderStyles = css({
|
|
63
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
64
|
-
'.ProseMirror .placeholder-decoration': {
|
|
65
|
-
color: "var(--ds-text-subtlest, #626F86)",
|
|
66
|
-
width: '100%',
|
|
67
|
-
pointerEvents: 'none',
|
|
68
|
-
userSelect: 'none',
|
|
69
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
70
|
-
'.placeholder-android': {
|
|
71
|
-
pointerEvents: 'none',
|
|
72
|
-
outline: 'none',
|
|
73
|
-
userSelect: 'none',
|
|
74
|
-
position: 'absolute'
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
var placeholderOverflowStyles = css({
|
|
79
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
80
|
-
'.ProseMirror p:has(.placeholder-decoration-hide-overflow)': {
|
|
81
|
-
overflow: 'hidden',
|
|
82
|
-
whiteSpace: 'nowrap',
|
|
83
|
-
textOverflow: 'ellipsis'
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
var placeholderWrapStyles = css({
|
|
87
|
-
// As part of controls work, we add placeholder `Search` to quick insert command
|
|
88
|
-
// This style is to prevent `/Search` being wrapped if it's triggered at the end of the line
|
|
89
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
90
|
-
'.ProseMirror mark[data-type-ahead-query="true"]:has(.placeholder-decoration-wrap)': {
|
|
91
|
-
whiteSpace: 'nowrap'
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
// The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
|
|
96
|
-
var akEditorBreakpointForSmallDevice = "1266px";
|
|
97
|
-
|
|
98
|
-
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
99
|
-
var contentStyles = function contentStyles() {
|
|
100
|
-
return css(_templateObject || (_templateObject = _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\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\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\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\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"])), akEditorGutterPadding, akEditorGutterPaddingDynamic(), akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorBreakpointForSmallDevice, akEditorCalculatedWideLayoutWidth, whitespaceStyles, indentationStyles, shadowStyles, InlineNodeViewSharedStyles, fg('platform_editor_hide_cursor_when_pm_hideselection') ? css(_templateObject2 || (_templateObject2 = _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(_templateObject3 || (_templateObject3 = _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, !fg('platform_editor_typography_ugc') && editorUGCTokensDefault,
|
|
101
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
102
|
-
fg('platform_editor_typography_ugc') && ( /* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
103
|
-
fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed')) && editorUGCTokensRefreshed
|
|
104
|
-
/* eslint-enable @atlaskit/platform/ensure-feature-flag-prefix */,
|
|
105
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
106
|
-
fg('platform_editor_typography_ugc') && /* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
107
|
-
!(fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed')) && editorUGCTokensModernized
|
|
108
|
-
/* eslint-enable @atlaskit/platform/ensure-feature-flag-prefix */, blocktypeStyles, fg('platform_editor_typography_ugc') && blocktypeStyles_fg_platform_editor_typography_ugc, !fg('platform_editor_typography_ugc') && blocktypeStyles_without_fg_platform_editor_typography_ugc, fg('platform_editor_nested_dnd_styles_changes') && blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes, codeMarkStyles, textColorStyles, backgroundColorStyles, listsStyles, ruleStyles, mediaStyles, fg('confluence_team_presence_scroll_to_pointer') ? telepointerStyle : telepointerStyleWithInitialOnly, telepointerColorAndCommonStyle, gapCursorStyles, panelStyles, fg('platform_editor_add_border_for_nested_panel') && panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, fg('platform_editor_nested_dnd_styles_changes') && panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, fg('platform_editor_lcm_nested_panel_icon_fix') && panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix, !fg('platform_editor_lcm_nested_panel_icon_fix') && panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix, mentionsStyles, tasksAndDecisionsStyles, gridStyles, blockMarksStyles, dateStyles, extensionStyles, expandStyles, fg('platform_editor_nested_dnd_styles_changes') && expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, !fg('platform_editor_nested_dnd_styles_changes') && expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes, fg('platform-visual-refresh-icons') && expandStylesMixin_fg_platform_visual_refresh_icons, findReplaceStyles, textHighlightStyle, decisionStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
109
|
-
exposure: false
|
|
110
|
-
}) && vanillaTaskItemStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
111
|
-
exposure: false
|
|
112
|
-
}) && vanillaDecisionStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
113
|
-
exposure: false
|
|
114
|
-
}) && fg('platform-visual-refresh-icons') && vanillaDecisionIconWithVisualRefresh, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
115
|
-
exposure: false
|
|
116
|
-
}) && !fg('platform-visual-refresh-icons') && vanillaDecisionIconWithoutVisualRefresh, statusStyles, fg('platform-component-visual-refresh') && statusStylesMixin_fg_platform_component_visual_refresh, !fg('platform-component-visual-refresh') && statusStylesMixin_without_fg_platform_component_visual_refresh, editorExperiment('platform_editor_vanilla_dom', true) && vanillaStatusStyles, editorExperiment('platform_editor_vanilla_dom', true) && fg('platform-component-visual-refresh') && vanillaStatusStylesMixin_fg_platform_component_visual_refresh, editorExperiment('platform_editor_vanilla_dom', true) && !fg('platform-component-visual-refresh') && vanillaStatusStylesMixin_without_fg_platform_component_visual_refresh, annotationStyles, smartCardStyles, embedCardStyles, unsupportedStyles, resizerStyles, !fg('platform-visual-refresh-icons') ? css(_templateObject4 || (_templateObject4 = _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);
|
|
117
|
-
};
|
|
118
|
-
var CommentEditorMargin = 14;
|
|
119
|
-
|
|
120
|
-
// Originally copied from packages/editor/editor-core/src/ui/Appearance/Comment/Comment.tsx
|
|
121
|
-
var commentEditorStyles = css({
|
|
122
|
-
flexGrow: 1,
|
|
123
|
-
overflowX: 'clip',
|
|
124
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
125
|
-
lineHeight: '24px',
|
|
126
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
127
|
-
'.ProseMirror': {
|
|
128
|
-
margin: "var(--ds-space-150, 12px)"
|
|
129
|
-
},
|
|
130
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
131
|
-
'.gridParent': {
|
|
132
|
-
marginLeft: "var(--ds-space-025, 2px)",
|
|
133
|
-
marginRight: "var(--ds-space-025, 2px)",
|
|
134
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
135
|
-
width: "calc(100% + ".concat(CommentEditorMargin - GRID_GUTTER, "px)")
|
|
136
|
-
},
|
|
137
|
-
padding: "var(--ds-space-250, 20px)"
|
|
138
|
-
},
|
|
139
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
140
|
-
tableCommentEditorStyles);
|
|
141
|
-
|
|
142
|
-
// Originally copied from scrollStyles in packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts
|
|
143
|
-
var fullPageEditorStyles = css({
|
|
144
|
-
flexGrow: 1,
|
|
145
|
-
height: '100%',
|
|
146
|
-
overflowY: 'scroll',
|
|
147
|
-
position: 'relative',
|
|
148
|
-
display: 'flex',
|
|
149
|
-
flexDirection: 'column',
|
|
150
|
-
scrollBehavior: 'smooth'
|
|
151
|
-
});
|
|
152
|
-
var scrollbarStyles = css({
|
|
153
|
-
'-ms-overflow-style': '-ms-autohiding-scrollbar',
|
|
154
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
155
|
-
'&::-webkit-scrollbar': {
|
|
156
|
-
overflow: 'hidden'
|
|
157
|
-
},
|
|
158
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
159
|
-
'&::-webkit-scrollbar-corner': {
|
|
160
|
-
display: 'none'
|
|
161
|
-
},
|
|
162
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
163
|
-
'&::-webkit-scrollbar-thumb': {
|
|
164
|
-
backgroundColor: "var(--ds-background-neutral-subtle, #00000000)"
|
|
165
|
-
},
|
|
166
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
167
|
-
'&:hover::-webkit-scrollbar-thumb': {
|
|
168
|
-
backgroundColor: "var(--ds-background-neutral-bold, #44546F)",
|
|
169
|
-
borderRadius: 8
|
|
170
|
-
},
|
|
171
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
172
|
-
'&::-webkit-scrollbar-thumb:hover': {
|
|
173
|
-
backgroundColor: "var(--ds-background-neutral-bold-hovered, #2C3E5D)"
|
|
174
|
-
}
|
|
175
|
-
});
|
|
176
|
-
var listLayoutShiftFix = css({
|
|
177
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
178
|
-
'.ProseMirror ul, .ProseMirror ol': {
|
|
179
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
180
|
-
marginTop: '10px'
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
|
|
184
|
-
// Make sure the first floating toolbar button has focus ring when focused via .focus()
|
|
185
|
-
var firstFloatingToolbarButtonStyles = css({
|
|
186
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
187
|
-
'button.first-floating-toolbar-button:focus': {
|
|
188
|
-
outline: "2px solid ".concat("var(--ds-border-focused, #2684FF)")
|
|
189
|
-
}
|
|
190
|
-
});
|
|
191
|
-
|
|
192
63
|
/**
|
|
193
64
|
* EditorContentStyles is a wrapper component that applies styles to its children
|
|
194
65
|
* based on the provided feature flags, view mode, and other props.
|
|
@@ -211,7 +82,147 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
211
82
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
212
83
|
className: className,
|
|
213
84
|
ref: ref,
|
|
214
|
-
css: [
|
|
85
|
+
css: [
|
|
86
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
87
|
+
baseStyles,
|
|
88
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
89
|
+
whitespaceStyles,
|
|
90
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
91
|
+
indentationStyles,
|
|
92
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
93
|
+
shadowStyles,
|
|
94
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
95
|
+
InlineNodeViewSharedStyles,
|
|
96
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
97
|
+
hideSelectionStyles, (fg('platform_editor_hide_cursor_when_pm_hideselection') || editorExperiment('platform_editor_advanced_code_blocks', true)) &&
|
|
98
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
99
|
+
hideCursorWhenHideSelectionStyles,
|
|
100
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
101
|
+
selectedNodeStyles,
|
|
102
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
103
|
+
cursorStyles,
|
|
104
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
105
|
+
fg('platform_editor_fix_floating_toolbar_focus') && firstFloatingToolbarButtonStyles,
|
|
106
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
107
|
+
placeholderTextStyles,
|
|
108
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
109
|
+
placeholderStyles,
|
|
110
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
111
|
+
editorExperiment('platform_editor_controls', 'variant1') && placeholderOverflowStyles, editorExperiment('platform_editor_controls', 'variant1') && fg('platform_editor_quick_insert_placeholder') &&
|
|
112
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
113
|
+
placeholderWrapStyles,
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
115
|
+
codeBlockStyles,
|
|
116
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
117
|
+
!fg('platform_editor_typography_ugc') && editorUGCTokensDefault, (fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed')) && fg('platform_editor_typography_ugc') &&
|
|
118
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
119
|
+
editorUGCTokensRefreshed, !(fg('platform-dst-jira-web-fonts') || fg('confluence_typography_refreshed') || fg('atlas_editor_typography_refreshed')) && fg('platform_editor_typography_ugc') &&
|
|
120
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
121
|
+
editorUGCTokensModernized,
|
|
122
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
123
|
+
blocktypeStyles,
|
|
124
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
125
|
+
fg('platform_editor_typography_ugc') ?
|
|
126
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
127
|
+
blocktypeStyles_fg_platform_editor_typography_ugc :
|
|
128
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
129
|
+
blocktypeStyles_without_fg_platform_editor_typography_ugc, fg('platform_editor_nested_dnd_styles_changes') &&
|
|
130
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
131
|
+
blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes,
|
|
132
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
133
|
+
codeMarkStyles,
|
|
134
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
135
|
+
textColorStyles,
|
|
136
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
137
|
+
backgroundColorStyles,
|
|
138
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
139
|
+
listsStyles,
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
141
|
+
ruleStyles,
|
|
142
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
143
|
+
mediaStyles, fg('confluence_team_presence_scroll_to_pointer') ?
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
145
|
+
telepointerStyle :
|
|
146
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
147
|
+
telepointerStyleWithInitialOnly, /* This needs to be after telepointer styles as some overlapping rules have equal specificity, and so the order is significant */
|
|
148
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
149
|
+
telepointerColorAndCommonStyle,
|
|
150
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
151
|
+
gapCursorStyles,
|
|
152
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
153
|
+
panelStyles, fg('platform_editor_add_border_for_nested_panel') &&
|
|
154
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
155
|
+
panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, fg('platform_editor_nested_dnd_styles_changes') &&
|
|
156
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
157
|
+
panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, fg('platform_editor_lcm_nested_panel_icon_fix') ?
|
|
158
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
159
|
+
panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix :
|
|
160
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
161
|
+
panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix,
|
|
162
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
163
|
+
mentionsStyles,
|
|
164
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
165
|
+
tasksAndDecisionsStyles,
|
|
166
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
167
|
+
gridStyles,
|
|
168
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
169
|
+
blockMarksStyles,
|
|
170
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
171
|
+
dateStyles,
|
|
172
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
173
|
+
extensionStyles,
|
|
174
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
175
|
+
expandStyles, fg('platform_editor_nested_dnd_styles_changes') ?
|
|
176
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
177
|
+
expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes :
|
|
178
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
179
|
+
expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes,
|
|
180
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
181
|
+
fg('platform-visual-refresh-icons') && expandStylesMixin_fg_platform_visual_refresh_icons,
|
|
182
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
183
|
+
findReplaceStyles,
|
|
184
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
185
|
+
textHighlightStyle,
|
|
186
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
187
|
+
decisionStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
188
|
+
exposure: false
|
|
189
|
+
}) &&
|
|
190
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
191
|
+
vanillaTaskItemStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
192
|
+
exposure: false
|
|
193
|
+
}) &&
|
|
194
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
195
|
+
vanillaDecisionStyles, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
196
|
+
exposure: false
|
|
197
|
+
}) && fg('platform-visual-refresh-icons') &&
|
|
198
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
199
|
+
vanillaDecisionIconWithVisualRefresh, editorExperiment('platform_editor_vanilla_dom', true, {
|
|
200
|
+
exposure: false
|
|
201
|
+
}) && !fg('platform-visual-refresh-icons') &&
|
|
202
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
203
|
+
vanillaDecisionIconWithoutVisualRefresh,
|
|
204
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
205
|
+
statusStyles, fg('platform-component-visual-refresh') ?
|
|
206
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
207
|
+
statusStylesMixin_fg_platform_component_visual_refresh :
|
|
208
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
209
|
+
statusStylesMixin_without_fg_platform_component_visual_refresh,
|
|
210
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
211
|
+
editorExperiment('platform_editor_vanilla_dom', true) && vanillaStatusStyles, editorExperiment('platform_editor_vanilla_dom', true) && fg('platform-component-visual-refresh') &&
|
|
212
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
213
|
+
vanillaStatusStylesMixin_fg_platform_component_visual_refresh, editorExperiment('platform_editor_vanilla_dom', true) && !fg('platform-component-visual-refresh') &&
|
|
214
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
215
|
+
vanillaStatusStylesMixin_without_fg_platform_component_visual_refresh,
|
|
216
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
217
|
+
annotationStyles,
|
|
218
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
219
|
+
smartCardStyles,
|
|
220
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
221
|
+
embedCardStyles,
|
|
222
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
223
|
+
unsupportedStyles,
|
|
224
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
225
|
+
resizerStyles,
|
|
215
226
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
216
227
|
layoutBaseStyles,
|
|
217
228
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -279,7 +290,17 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
279
290
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
280
291
|
layoutSelectedStylesForViewNotAdvanced, viewMode === 'view' && editorExperiment('advanced_layouts', true) &&
|
|
281
292
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
282
|
-
layoutResponsiveStylesForView,
|
|
293
|
+
layoutResponsiveStylesForView,
|
|
294
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
295
|
+
isComment && commentEditorStyles,
|
|
296
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
297
|
+
isComment && tableCommentEditorStyles,
|
|
298
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
299
|
+
isFullPage && fullPageEditorStyles,
|
|
300
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
301
|
+
isFullPage && scrollbarStyles,
|
|
302
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
303
|
+
fg('platform_editor_ssr_fix_lists') && listLayoutShiftFix, fg('platform_editor_nested_dnd_styles_changes') ?
|
|
283
304
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
284
305
|
firstCodeBlockWithNoMargin :
|
|
285
306
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -299,14 +320,28 @@ var EditorContentContainer = /*#__PURE__*/React.forwardRef(function (props, ref)
|
|
|
299
320
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
300
321
|
vanillaEmojiStyles :
|
|
301
322
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
302
|
-
reactEmojiStyles,
|
|
323
|
+
reactEmojiStyles,
|
|
324
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
325
|
+
panelViewStyles,
|
|
326
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
327
|
+
mediaGroupStyles,
|
|
328
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
329
|
+
mediaAlignmentStyles,
|
|
330
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
331
|
+
tableLayoutFixes,
|
|
332
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
333
|
+
hyperLinkFloatingToolbarStyles,
|
|
334
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
335
|
+
!fg('platform-visual-refresh-icons') && linkLegacyIconStylesFix],
|
|
303
336
|
"data-editor-scroll-container": isScrollable ? 'true' : undefined,
|
|
304
337
|
"data-testid": "editor-content-container",
|
|
305
338
|
style: {
|
|
306
339
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
307
340
|
'--ak-editor-base-font-size': "".concat(editorFontSize({
|
|
308
341
|
theme: theme
|
|
309
|
-
}), "px")
|
|
342
|
+
}), "px"),
|
|
343
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
344
|
+
'--ak-editor--large-gutter-padding': "".concat(akEditorGutterPaddingDynamic(), "px")
|
|
310
345
|
}
|
|
311
346
|
}, children);
|
|
312
347
|
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
|
|
5
|
+
// = akEditorDefaultLayoutWidth * breakoutWideScaleRatio = 1010.8 ~ 1011 This is a resulting width value that is applied to nodes that currently use breakouts (except table) and are set to `wide` when the viewport's width is > 1329px.
|
|
6
|
+
var akEditorCalculatedWideLayoutWidth = 1011;
|
|
7
|
+
// from breakoutConsts.calcWideWidth, layoutMaxWidth * breakoutConsts.wideScaleRatio = 904.8 ~ 905 This is a resulting width value that is applied to nodes that currently use breakouts (except table) and are set to `wide` when the viewport's width is <= 1266px.
|
|
8
|
+
var akEditorCalculatedWideLayoutWidthSmallViewport = 905;
|
|
9
|
+
var akEditorGutterPadding = 32;
|
|
10
|
+
var akEditorDefaultLayoutWidth = 760;
|
|
11
|
+
var akEditorFullWidthLayoutWidth = 1800;
|
|
12
|
+
// The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
|
|
13
|
+
var akEditorBreakpointForSmallDevice = "1266px";
|
|
14
|
+
|
|
15
|
+
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
16
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
17
|
+
export var baseStyles = css(_defineProperty({
|
|
18
|
+
'--ak-editor--default-gutter-padding': "".concat(akEditorGutterPadding, "px"),
|
|
19
|
+
'--ak-editor--default-layout-width': "".concat(akEditorDefaultLayoutWidth, "px"),
|
|
20
|
+
'--ak-editor--full-width-layout-width': "".concat(akEditorFullWidthLayoutWidth, "px"),
|
|
21
|
+
/* calculate editor line length, 100cqw is the editor container width */
|
|
22
|
+
'--ak-editor--line-length': 'min(calc(100cqw - var(--ak-editor--large-gutter-padding) * 2), var(--ak-editor--default-layout-width))',
|
|
23
|
+
'--ak-editor--breakout-wide-layout-width': "".concat(akEditorCalculatedWideLayoutWidthSmallViewport, "px"),
|
|
24
|
+
'--ak-editor--breakout-full-page-guttering-padding': 'calc(var(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding))',
|
|
25
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
26
|
+
'.fabric-editor--full-width-mode': {
|
|
27
|
+
'--ak-editor--line-length': 'min(calc(100cqw - var(--ak-editor--large-gutter-padding) * 2), var(--ak-editor--full-width-layout-width))'
|
|
28
|
+
},
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
30
|
+
'.ProseMirror': {
|
|
31
|
+
'--ak-editor-max-container-width': 'calc(100cqw - var(--ak-editor--large-gutter-padding))',
|
|
32
|
+
outline: 'none',
|
|
33
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
34
|
+
fontSize: 'var(--ak-editor-base-font-size)'
|
|
35
|
+
},
|
|
36
|
+
/* We can't allow nodes that are inside other nodes to bleed from the parent container */
|
|
37
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
38
|
+
'.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block]': {
|
|
39
|
+
'--ak-editor-max-container-width': '100%'
|
|
40
|
+
}
|
|
41
|
+
}, "@container editor-area (width >= ".concat(akEditorBreakpointForSmallDevice, ")"), {
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
43
|
+
'.ProseMirror': {
|
|
44
|
+
'--ak-editor--breakout-wide-layout-width': "".concat(akEditorCalculatedWideLayoutWidth, "px")
|
|
45
|
+
}
|
|
46
|
+
}));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
|
+
var CommentEditorMargin = 14;
|
|
4
|
+
var GRID_GUTTER = 12;
|
|
5
|
+
|
|
6
|
+
// Originally copied from packages/editor/editor-core/src/ui/Appearance/Comment/Comment.tsx
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
8
|
+
export var commentEditorStyles = css({
|
|
9
|
+
flexGrow: 1,
|
|
10
|
+
overflowX: 'clip',
|
|
11
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
12
|
+
lineHeight: '24px',
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
14
|
+
'.ProseMirror': {
|
|
15
|
+
margin: "var(--ds-space-150, 12px)"
|
|
16
|
+
},
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
18
|
+
'.gridParent': {
|
|
19
|
+
marginLeft: "var(--ds-space-025, 2px)",
|
|
20
|
+
marginRight: "var(--ds-space-025, 2px)",
|
|
21
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
22
|
+
width: "calc(100% + ".concat(CommentEditorMargin - GRID_GUTTER, "px)")
|
|
23
|
+
},
|
|
24
|
+
padding: "var(--ds-space-250, 20px)"
|
|
25
|
+
});
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
|
+
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
|
+
export var cursorStyles = css({
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
7
|
+
'.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor)': {
|
|
8
|
+
caretColor: 'transparent'
|
|
9
|
+
},
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
11
|
+
'.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor': {
|
|
12
|
+
display: 'none'
|
|
13
|
+
}
|
|
14
|
+
});
|