@atlaskit/editor-core 207.19.1 → 207.19.3
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 +21 -0
- package/dist/cjs/create-editor/ReactEditorView.js +5 -5
- package/dist/cjs/i18n/sk.js +2 -2
- package/dist/cjs/i18n/sr.js +19 -0
- package/dist/cjs/presets/default.js +5 -2
- 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/create-editor/ReactEditorView.js +5 -5
- package/dist/es2019/i18n/sk.js +2 -2
- package/dist/es2019/i18n/sr.js +13 -0
- package/dist/es2019/presets/default.js +5 -2
- 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/create-editor/ReactEditorView.js +5 -5
- package/dist/esm/i18n/sk.js +2 -2
- package/dist/esm/i18n/sr.js +13 -0
- package/dist/esm/presets/default.js +5 -2
- 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 +3 -15
- package/dist/types/ui/EditorContentContainer/styles/placeholderTextStyles.d.ts +0 -1
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/placeholderTextStyles.d.ts +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 207.19.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#168742](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/168742)
|
|
8
|
+
[`43b55fe50be89`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/43b55fe50be89) -
|
|
9
|
+
Add experiment to show no cursor on initial edit page
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
12
|
+
## 207.19.2
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#169135](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/169135)
|
|
17
|
+
[`028b3051e55d3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/028b3051e55d3) -
|
|
18
|
+
Migrate extensionStyles to static emotion CSS
|
|
19
|
+
- [#169185](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/169185)
|
|
20
|
+
[`4b4788179f7a2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4b4788179f7a2) -
|
|
21
|
+
refactor emotion styles for content styles
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 207.19.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -479,13 +479,13 @@ function ReactEditorView(props) {
|
|
|
479
479
|
if (shouldFocus && editorView !== null && editorView !== void 0 && (_editorView$props$edi = (_editorView$props = editorView.props).editable) !== null && _editorView$props$edi !== void 0 && _editorView$props$edi.call(_editorView$props, editorView.state) && (0, _platformFeatureFlags.fg)('platform_editor_react_18_autofocus_fix')) {
|
|
480
480
|
if ((0, _platformFeatureFlags.fg)('platform_editor_reduce_scroll_jump_on_editor_start')) {
|
|
481
481
|
if (!mitigateScrollJump) {
|
|
482
|
-
var liveDocWithContent = __livePage && !(0, _document.isEmptyDocument)(editorView.state.doc);
|
|
482
|
+
var liveDocWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(editorView.state.doc);
|
|
483
483
|
if (!liveDocWithContent || !(0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
|
|
484
484
|
focusTimeoutId.current = (0, _handleEditorFocus.handleEditorFocus)(editorView);
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
} else {
|
|
488
|
-
var _liveDocWithContent = __livePage && !(0, _document.isEmptyDocument)(editorView.state.doc);
|
|
488
|
+
var _liveDocWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(editorView.state.doc);
|
|
489
489
|
if (!_liveDocWithContent || !(0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
|
|
490
490
|
focusTimeoutId.current = (0, _handleEditorFocus.handleEditorFocus)(editorView);
|
|
491
491
|
}
|
|
@@ -534,13 +534,13 @@ function ReactEditorView(props) {
|
|
|
534
534
|
if (shouldFocus && view.props.editable && view.props.editable(view.state)) {
|
|
535
535
|
if ((0, _platformFeatureFlags.fg)('platform_editor_reduce_scroll_jump_on_editor_start')) {
|
|
536
536
|
if (!mitigateScrollJump) {
|
|
537
|
-
var isLivePageWithContent = __livePage && !(0, _document.isEmptyDocument)(view.state.doc) && (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init');
|
|
537
|
+
var isLivePageWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(view.state.doc) && (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init');
|
|
538
538
|
if (!isLivePageWithContent && shouldFocus && view.props.editable && view.props.editable(view.state)) {
|
|
539
539
|
focusTimeoutId.current = (0, _handleEditorFocus.handleEditorFocus)(view);
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
} else {
|
|
543
|
-
var _isLivePageWithContent = __livePage && !(0, _document.isEmptyDocument)(view.state.doc) && (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init');
|
|
543
|
+
var _isLivePageWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(view.state.doc) && (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init');
|
|
544
544
|
if (!_isLivePageWithContent && shouldFocus && view.props.editable && view.props.editable(view.state)) {
|
|
545
545
|
focusTimeoutId.current = (0, _handleEditorFocus.handleEditorFocus)(view);
|
|
546
546
|
}
|
|
@@ -611,7 +611,7 @@ function ReactEditorView(props) {
|
|
|
611
611
|
return !disabled;
|
|
612
612
|
}
|
|
613
613
|
});
|
|
614
|
-
var isLivePageWithContent = __livePage && !(0, _document.isEmptyDocument)(viewRef.current.state.doc) && (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init');
|
|
614
|
+
var isLivePageWithContent = (__livePage || (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)) && !(0, _document.isEmptyDocument)(viewRef.current.state.doc) && (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init');
|
|
615
615
|
if (!disabled && shouldFocus && !isLivePageWithContent) {
|
|
616
616
|
focusTimeoutId.current = (0, _handleEditorFocus.handleEditorFocus)(viewRef.current);
|
|
617
617
|
}
|
package/dist/cjs/i18n/sk.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.default = void 0;
|
|
|
13
13
|
*/
|
|
14
14
|
//Slovak
|
|
15
15
|
var _default = exports.default = {
|
|
16
|
-
'fabric.editor.chromeCollapsedPlaceholder': '
|
|
16
|
+
'fabric.editor.chromeCollapsedPlaceholder': 'Napíšte niečo…',
|
|
17
17
|
'fabric.editor.editorAssistiveLabel': 'Hlavná oblasť obsahu, sem začnite zadávať text.',
|
|
18
|
-
'fabric.editor.headingLink.toolbarHelpTitle': '
|
|
18
|
+
'fabric.editor.headingLink.toolbarHelpTitle': 'Otvoriť dialógové okno pomoci'
|
|
19
19
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
/* prettier-ignore */
|
|
8
|
+
/**
|
|
9
|
+
* NOTE:
|
|
10
|
+
*
|
|
11
|
+
* This file is automatically generated by Traduki 2.0.
|
|
12
|
+
* DO NOT CHANGE IT BY HAND or your changes will be lost.
|
|
13
|
+
*/
|
|
14
|
+
//Serbian (Serbia) [sr-RS]
|
|
15
|
+
var _default = exports.default = {
|
|
16
|
+
'fabric.editor.chromeCollapsedPlaceholder': 'Unesite tekst…',
|
|
17
|
+
'fabric.editor.editorAssistiveLabel': 'Glavna oblast za sadržaj, počnite da unosite tekst.',
|
|
18
|
+
'fabric.editor.headingLink.toolbarHelpTitle': 'Otvori dijalog pomoći'
|
|
19
|
+
};
|
|
@@ -39,6 +39,7 @@ var _undoRedo = require("@atlaskit/editor-plugins/undo-redo");
|
|
|
39
39
|
var _unsupportedContent = require("@atlaskit/editor-plugins/unsupported-content");
|
|
40
40
|
var _width = require("@atlaskit/editor-plugins/width");
|
|
41
41
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
42
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
42
43
|
var _isFullPage = require("../utils/is-full-page");
|
|
43
44
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
44
45
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // #region Imports
|
|
@@ -58,7 +59,7 @@ function createDefaultPreset(options) {
|
|
|
58
59
|
performanceTracking: options.performanceTracking
|
|
59
60
|
}], Boolean(options.allowAnalyticsGASV3)).add(_betterTypeHistory.betterTypeHistoryPlugin).add([_paste.pastePlugin, _objectSpread(_objectSpread({}, options === null || options === void 0 ? void 0 : options.paste), {}, {
|
|
60
61
|
isFullPage: isFullPage
|
|
61
|
-
})]).add(_clipboard.clipboardPlugin).add(_focus.focusPlugin).maybeAdd(_interaction.interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage)
|
|
62
|
+
})]).add(_clipboard.clipboardPlugin).add(_focus.focusPlugin).maybeAdd(_interaction.interactionPlugin, Boolean(options === null || options === void 0 ? void 0 : options.__livePage) ? (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init') : (0, _expValEquals.expValEquals)('platform_editor_no_cursor_on_edit_page_init', 'isEnabled', true)).add(_composition.compositionPlugin).add([_contextIdentifier.contextIdentifierPlugin, {
|
|
62
63
|
contextIdentifierProvider: options.contextIdentifierProvider
|
|
63
64
|
}]).add([_base.basePlugin, options.base]).add(_decorations.decorationsPlugin).add([_typeAhead.typeAheadPlugin, options.typeAhead]).maybeAdd(_history.historyPlugin, Boolean(options.allowUndoRedoButtons)).add([_primaryToolbar.primaryToolbarPlugin, {
|
|
64
65
|
contextualFormattingEnabled: isFullPage
|
|
@@ -70,7 +71,9 @@ function createDefaultPreset(options) {
|
|
|
70
71
|
}]).add([_hyperlink.hyperlinkPlugin, _objectSpread(_objectSpread({}, options.hyperlinkOptions), {}, {
|
|
71
72
|
// @ts-ignore Temporary solution to check for Live Page editor.
|
|
72
73
|
__livePage: options.__livePage
|
|
73
|
-
})]).add([_textFormatting.textFormattingPlugin, options.textFormatting]).add(_width.widthPlugin).add([_quickInsert.quickInsertPlugin, options.quickInsert]).add([_placeholder.placeholderPlugin, options.placeholder]).add(_unsupportedContent.unsupportedContentPlugin).add(_editorDisabled.editorDisabledPlugin
|
|
74
|
+
})]).add([_textFormatting.textFormattingPlugin, options.textFormatting]).add(_width.widthPlugin).add([_quickInsert.quickInsertPlugin, options.quickInsert]).add([_placeholder.placeholderPlugin, options.placeholder]).add(_unsupportedContent.unsupportedContentPlugin).add([_editorDisabled.editorDisabledPlugin, {
|
|
75
|
+
initialDisabledState: options.disabled
|
|
76
|
+
}]).add([_submitEditor.submitEditorPlugin, options.submitEditor]).add(_copyButton.copyButtonPlugin).add(_floatingToolbar.floatingToolbarPlugin).add([_selection.selectionPlugin, _objectSpread(_objectSpread({}, options.selection), {}, {
|
|
74
77
|
__livePage: options.__livePage
|
|
75
78
|
})]).add([_codeBlock.codeBlockPlugin, options.codeBlock]);
|
|
76
79
|
return preset;
|
|
@@ -4,32 +4,34 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
7
|
+
exports.default = void 0;
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
9
|
var _react2 = require("@emotion/react");
|
|
11
10
|
var _browser = require("@atlaskit/editor-common/browser");
|
|
12
|
-
var _styles = require("@atlaskit/editor-common/styles");
|
|
13
|
-
var _commonStyles = require("@atlaskit/editor-plugins/table/ui/common-styles");
|
|
14
11
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
15
12
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
13
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
17
14
|
var _tokens = require("@atlaskit/tokens");
|
|
18
|
-
var _extension = require("../ContentStyles/extension");
|
|
19
15
|
var _aiPanel = require("./styles/aiPanel");
|
|
20
16
|
var _annotationStyles = require("./styles/annotationStyles");
|
|
21
17
|
var _backgroundColorStyles = require("./styles/backgroundColorStyles");
|
|
18
|
+
var _baseStyles = require("./styles/baseStyles");
|
|
22
19
|
var _blockMarksStyles = require("./styles/blockMarksStyles");
|
|
23
20
|
var _blockTypeStyles = require("./styles/blockTypeStyles");
|
|
24
21
|
var _codeBlockStyles = require("./styles/codeBlockStyles");
|
|
25
22
|
var _codeMarkStyles = require("./styles/codeMarkStyles");
|
|
23
|
+
var _commentEditorStyles = require("./styles/commentEditorStyles");
|
|
24
|
+
var _cursorStyles = require("./styles/cursorStyles");
|
|
26
25
|
var _dateStyles = require("./styles/dateStyles");
|
|
27
26
|
var _editorUGCTokenStyles = require("./styles/editorUGCTokenStyles");
|
|
28
27
|
var _embedCardStyles = require("./styles/embedCardStyles");
|
|
29
28
|
var _emoji = require("./styles/emoji");
|
|
30
29
|
var _expandStyles = require("./styles/expandStyles");
|
|
30
|
+
var _extensionStyles = require("./styles/extensionStyles");
|
|
31
31
|
var _findReplaceStyles = require("./styles/findReplaceStyles");
|
|
32
32
|
var _firstBlockNodeStyles = require("./styles/firstBlockNodeStyles");
|
|
33
|
+
var _floatingToolbarStyles = require("./styles/floatingToolbarStyles");
|
|
34
|
+
var _fullPageEditorStyles = require("./styles/fullPageEditorStyles");
|
|
33
35
|
var _gapCursorStyles = require("./styles/gapCursorStyles");
|
|
34
36
|
var _gridStyles = require("./styles/gridStyles");
|
|
35
37
|
var _indentationStyles = require("./styles/indentationStyles");
|
|
@@ -41,160 +43,31 @@ var _mediaStyles = require("./styles/mediaStyles");
|
|
|
41
43
|
var _mentions = require("./styles/mentions");
|
|
42
44
|
var _panelStyles = require("./styles/panelStyles");
|
|
43
45
|
var _paragraphStyles = require("./styles/paragraphStyles");
|
|
44
|
-
var
|
|
46
|
+
var _placeholderStyles = require("./styles/placeholderStyles");
|
|
45
47
|
var _resizerStyles = require("./styles/resizerStyles");
|
|
46
48
|
var _rule = require("./styles/rule");
|
|
49
|
+
var _scrollbarStyles = require("./styles/scrollbarStyles");
|
|
50
|
+
var _selectionStyles = require("./styles/selectionStyles");
|
|
47
51
|
var _shadowStyles = require("./styles/shadowStyles");
|
|
48
52
|
var _smartCardStyles = require("./styles/smartCardStyles");
|
|
49
53
|
var _statusStyles = require("./styles/statusStyles");
|
|
54
|
+
var _tableStyles = require("./styles/tableStyles");
|
|
50
55
|
var _tasksAndDecisionsStyles = require("./styles/tasksAndDecisionsStyles");
|
|
51
56
|
var _telepointerStyles = require("./styles/telepointerStyles");
|
|
52
57
|
var _textColorStyles = require("./styles/textColorStyles");
|
|
53
58
|
var _textHighlightStyles = require("./styles/textHighlightStyles");
|
|
54
59
|
var _unsupportedStyles = require("./styles/unsupportedStyles");
|
|
55
60
|
var _whitespaceStyles = require("./styles/whitespaceStyles");
|
|
56
|
-
|
|
61
|
+
/* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
57
62
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
58
|
-
/* eslint-disable react-hooks/rules-of-hooks */
|
|
59
|
-
/* eslint-disable @atlaskit/design-system/no-css-tagged-template-expression -- Requires manual remediation over time due to use of unsafe nested mixins */
|
|
60
63
|
/**
|
|
61
64
|
* @jsxRuntime classic
|
|
62
65
|
* @jsx jsx
|
|
63
66
|
*/
|
|
64
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
65
|
-
var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
66
|
-
|
|
67
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
68
|
-
var placeholderStyles = exports.placeholderStyles = (0, _react2.css)({
|
|
69
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
70
|
-
'.ProseMirror .placeholder-decoration': {
|
|
71
|
-
color: "var(--ds-text-subtlest, #626F86)",
|
|
72
|
-
width: '100%',
|
|
73
|
-
pointerEvents: 'none',
|
|
74
|
-
userSelect: 'none',
|
|
75
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
76
|
-
'.placeholder-android': {
|
|
77
|
-
pointerEvents: 'none',
|
|
78
|
-
outline: 'none',
|
|
79
|
-
userSelect: 'none',
|
|
80
|
-
position: 'absolute'
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
var placeholderOverflowStyles = (0, _react2.css)({
|
|
85
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
86
|
-
'.ProseMirror p:has(.placeholder-decoration-hide-overflow)': {
|
|
87
|
-
overflow: 'hidden',
|
|
88
|
-
whiteSpace: 'nowrap',
|
|
89
|
-
textOverflow: 'ellipsis'
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
var placeholderWrapStyles = (0, _react2.css)({
|
|
93
|
-
// As part of controls work, we add placeholder `Search` to quick insert command
|
|
94
|
-
// This style is to prevent `/Search` being wrapped if it's triggered at the end of the line
|
|
95
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
96
|
-
'.ProseMirror mark[data-type-ahead-query="true"]:has(.placeholder-decoration-wrap)': {
|
|
97
|
-
whiteSpace: 'nowrap'
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
// The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
|
|
102
|
-
var akEditorBreakpointForSmallDevice = "1266px";
|
|
103
|
-
|
|
104
|
-
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
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\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"])), _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
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
108
|
-
(0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') && ( /* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
109
|
-
(0, _platformFeatureFlags.fg)('platform-dst-jira-web-fonts') || (0, _platformFeatureFlags.fg)('confluence_typography_refreshed') || (0, _platformFeatureFlags.fg)('atlas_editor_typography_refreshed')) && _editorUGCTokenStyles.editorUGCTokensRefreshed
|
|
110
|
-
/* eslint-enable @atlaskit/platform/ensure-feature-flag-prefix */,
|
|
111
|
-
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
112
|
-
(0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') && /* eslint-disable @atlaskit/platform/ensure-feature-flag-prefix */
|
|
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, _gapCursorStyles.gapCursorStyles, _panelStyles.panelStyles, (0, _platformFeatureFlags.fg)('platform_editor_add_border_for_nested_panel') && _panelStyles.panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && _panelStyles.panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, (0, _platformFeatureFlags.fg)('platform_editor_lcm_nested_panel_icon_fix') && _panelStyles.panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix, !(0, _platformFeatureFlags.fg)('platform_editor_lcm_nested_panel_icon_fix') && _panelStyles.panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix, _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
|
-
exposure: false
|
|
116
|
-
}) && _tasksAndDecisionsStyles.vanillaTaskItemStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
117
|
-
exposure: false
|
|
118
|
-
}) && _tasksAndDecisionsStyles.vanillaDecisionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
119
|
-
exposure: false
|
|
120
|
-
}) && (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisionsStyles.vanillaDecisionIconWithVisualRefresh, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
121
|
-
exposure: false
|
|
122
|
-
}) && !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisionsStyles.vanillaDecisionIconWithoutVisualRefresh, _statusStyles.statusStyles, (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && _statusStyles.statusStylesMixin_fg_platform_component_visual_refresh, !(0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && _statusStyles.statusStylesMixin_without_fg_platform_component_visual_refresh, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) && _statusStyles.vanillaStatusStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) && (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && _statusStyles.vanillaStatusStylesMixin_fg_platform_component_visual_refresh, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) && !(0, _platformFeatureFlags.fg)('platform-component-visual-refresh') && _statusStyles.vanillaStatusStylesMixin_without_fg_platform_component_visual_refresh, _annotationStyles.annotationStyles, _smartCardStyles.smartCardStyles, _embedCardStyles.embedCardStyles, _unsupportedStyles.unsupportedStyles, _resizerStyles.resizerStyles, !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\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);
|
|
123
|
-
};
|
|
124
|
-
var CommentEditorMargin = 14;
|
|
125
|
-
|
|
126
|
-
// Originally copied from packages/editor/editor-core/src/ui/Appearance/Comment/Comment.tsx
|
|
127
|
-
var commentEditorStyles = (0, _react2.css)({
|
|
128
|
-
flexGrow: 1,
|
|
129
|
-
overflowX: 'clip',
|
|
130
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
131
|
-
lineHeight: '24px',
|
|
132
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
133
|
-
'.ProseMirror': {
|
|
134
|
-
margin: "var(--ds-space-150, 12px)"
|
|
135
|
-
},
|
|
136
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
137
|
-
'.gridParent': {
|
|
138
|
-
marginLeft: "var(--ds-space-025, 2px)",
|
|
139
|
-
marginRight: "var(--ds-space-025, 2px)",
|
|
140
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
141
|
-
width: "calc(100% + ".concat(CommentEditorMargin - _styles.GRID_GUTTER, "px)")
|
|
142
|
-
},
|
|
143
|
-
padding: "var(--ds-space-250, 20px)"
|
|
144
|
-
},
|
|
145
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
146
|
-
_commonStyles.tableCommentEditorStyles);
|
|
147
|
-
|
|
148
|
-
// Originally copied from scrollStyles in packages/editor/editor-core/src/ui/Appearance/FullPage/StyledComponents.ts
|
|
149
|
-
var fullPageEditorStyles = (0, _react2.css)({
|
|
150
|
-
flexGrow: 1,
|
|
151
|
-
height: '100%',
|
|
152
|
-
overflowY: 'scroll',
|
|
153
|
-
position: 'relative',
|
|
154
|
-
display: 'flex',
|
|
155
|
-
flexDirection: 'column',
|
|
156
|
-
scrollBehavior: 'smooth'
|
|
157
|
-
});
|
|
158
|
-
var scrollbarStyles = (0, _react2.css)({
|
|
159
|
-
'-ms-overflow-style': '-ms-autohiding-scrollbar',
|
|
160
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
161
|
-
'&::-webkit-scrollbar': {
|
|
162
|
-
overflow: 'hidden'
|
|
163
|
-
},
|
|
164
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
165
|
-
'&::-webkit-scrollbar-corner': {
|
|
166
|
-
display: 'none'
|
|
167
|
-
},
|
|
168
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
169
|
-
'&::-webkit-scrollbar-thumb': {
|
|
170
|
-
backgroundColor: "var(--ds-background-neutral-subtle, #00000000)"
|
|
171
|
-
},
|
|
172
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
173
|
-
'&:hover::-webkit-scrollbar-thumb': {
|
|
174
|
-
backgroundColor: "var(--ds-background-neutral-bold, #44546F)",
|
|
175
|
-
borderRadius: 8
|
|
176
|
-
},
|
|
177
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
178
|
-
'&::-webkit-scrollbar-thumb:hover': {
|
|
179
|
-
backgroundColor: "var(--ds-background-neutral-bold-hovered, #2C3E5D)"
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
var listLayoutShiftFix = (0, _react2.css)({
|
|
183
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
184
|
-
'.ProseMirror ul, .ProseMirror ol': {
|
|
185
|
-
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
186
|
-
marginTop: '10px'
|
|
187
|
-
}
|
|
188
|
-
});
|
|
189
67
|
|
|
190
|
-
//
|
|
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
|
-
});
|
|
68
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
197
69
|
|
|
70
|
+
var isFirefox = typeof navigator !== 'undefined' && navigator.userAgent.toLowerCase().indexOf('firefox') > -1;
|
|
198
71
|
/**
|
|
199
72
|
* EditorContentStyles is a wrapper component that applies styles to its children
|
|
200
73
|
* based on the provided feature flags, view mode, and other props.
|
|
@@ -217,7 +90,147 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
217
90
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
|
|
218
91
|
className: className,
|
|
219
92
|
ref: ref,
|
|
220
|
-
css: [
|
|
93
|
+
css: [
|
|
94
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
95
|
+
_baseStyles.baseStyles,
|
|
96
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
97
|
+
_whitespaceStyles.whitespaceStyles,
|
|
98
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
99
|
+
_indentationStyles.indentationStyles,
|
|
100
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
101
|
+
_shadowStyles.shadowStyles,
|
|
102
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
103
|
+
_inlineNodeViewSharedStyles.InlineNodeViewSharedStyles,
|
|
104
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
105
|
+
_selectionStyles.hideSelectionStyles, ((0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') || (0, _experiments.editorExperiment)('platform_editor_advanced_code_blocks', true)) &&
|
|
106
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
107
|
+
_selectionStyles.hideCursorWhenHideSelectionStyles,
|
|
108
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
109
|
+
_selectionStyles.selectedNodeStyles,
|
|
110
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
111
|
+
_cursorStyles.cursorStyles,
|
|
112
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
113
|
+
(0, _platformFeatureFlags.fg)('platform_editor_fix_floating_toolbar_focus') && _floatingToolbarStyles.firstFloatingToolbarButtonStyles,
|
|
114
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
115
|
+
_placeholderStyles.placeholderTextStyles,
|
|
116
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
117
|
+
_placeholderStyles.placeholderStyles,
|
|
118
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
119
|
+
(0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && _placeholderStyles.placeholderOverflowStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') &&
|
|
120
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
121
|
+
_placeholderStyles.placeholderWrapStyles,
|
|
122
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
123
|
+
_codeBlockStyles.codeBlockStyles,
|
|
124
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
125
|
+
!(0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') && _editorUGCTokenStyles.editorUGCTokensDefault, ((0, _platformFeatureFlags.fg)('platform-dst-jira-web-fonts') || (0, _platformFeatureFlags.fg)('confluence_typography_refreshed') || (0, _platformFeatureFlags.fg)('atlas_editor_typography_refreshed')) && (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') &&
|
|
126
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
127
|
+
_editorUGCTokenStyles.editorUGCTokensRefreshed, !((0, _platformFeatureFlags.fg)('platform-dst-jira-web-fonts') || (0, _platformFeatureFlags.fg)('confluence_typography_refreshed') || (0, _platformFeatureFlags.fg)('atlas_editor_typography_refreshed')) && (0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') &&
|
|
128
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
129
|
+
_editorUGCTokenStyles.editorUGCTokensModernized,
|
|
130
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
131
|
+
_blockTypeStyles.blocktypeStyles,
|
|
132
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
133
|
+
(0, _platformFeatureFlags.fg)('platform_editor_typography_ugc') ?
|
|
134
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
135
|
+
_blockTypeStyles.blocktypeStyles_fg_platform_editor_typography_ugc :
|
|
136
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
137
|
+
_blockTypeStyles.blocktypeStyles_without_fg_platform_editor_typography_ugc, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') &&
|
|
138
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
139
|
+
_blockTypeStyles.blocktypeStyles_fg_platform_editor_nested_dnd_styles_changes,
|
|
140
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
141
|
+
_codeMarkStyles.codeMarkStyles,
|
|
142
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
143
|
+
_textColorStyles.textColorStyles,
|
|
144
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
145
|
+
_backgroundColorStyles.backgroundColorStyles,
|
|
146
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
147
|
+
_list.listsStyles,
|
|
148
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
149
|
+
_rule.ruleStyles,
|
|
150
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
151
|
+
_mediaStyles.mediaStyles, (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ?
|
|
152
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
153
|
+
_telepointerStyles.telepointerStyle :
|
|
154
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
155
|
+
_telepointerStyles.telepointerStyleWithInitialOnly, /* This needs to be after telepointer styles as some overlapping rules have equal specificity, and so the order is significant */
|
|
156
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
157
|
+
_telepointerStyles.telepointerColorAndCommonStyle,
|
|
158
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
159
|
+
_gapCursorStyles.gapCursorStyles,
|
|
160
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
161
|
+
_panelStyles.panelStyles, (0, _platformFeatureFlags.fg)('platform_editor_add_border_for_nested_panel') &&
|
|
162
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
163
|
+
_panelStyles.panelStylesMixin_fg_platform_editor_add_border_for_nested_panel, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') &&
|
|
164
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
165
|
+
_panelStyles.panelStylesMixin_fg_platform_editor_nested_dnd_styles_changes, (0, _platformFeatureFlags.fg)('platform_editor_lcm_nested_panel_icon_fix') ?
|
|
166
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
167
|
+
_panelStyles.panelStylesMixin_fg_platform_editor_lcm_nested_panel_icon_fix :
|
|
168
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
169
|
+
_panelStyles.panelStylesMixin_without_fg_platform_editor_lcm_nested_panel_icon_fix,
|
|
170
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
171
|
+
_mentions.mentionsStyles,
|
|
172
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
173
|
+
_tasksAndDecisionsStyles.tasksAndDecisionsStyles,
|
|
174
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
175
|
+
_gridStyles.gridStyles,
|
|
176
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
177
|
+
_blockMarksStyles.blockMarksStyles,
|
|
178
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
179
|
+
_dateStyles.dateStyles,
|
|
180
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
181
|
+
_extensionStyles.extensionStyles,
|
|
182
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
183
|
+
_expandStyles.expandStyles, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ?
|
|
184
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
185
|
+
_expandStyles.expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes :
|
|
186
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
187
|
+
_expandStyles.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes,
|
|
188
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
189
|
+
(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _expandStyles.expandStylesMixin_fg_platform_visual_refresh_icons,
|
|
190
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
191
|
+
_findReplaceStyles.findReplaceStyles,
|
|
192
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
193
|
+
_textHighlightStyles.textHighlightStyle,
|
|
194
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
195
|
+
_tasksAndDecisionsStyles.decisionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
196
|
+
exposure: false
|
|
197
|
+
}) &&
|
|
198
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
199
|
+
_tasksAndDecisionsStyles.vanillaTaskItemStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
200
|
+
exposure: false
|
|
201
|
+
}) &&
|
|
202
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
203
|
+
_tasksAndDecisionsStyles.vanillaDecisionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
204
|
+
exposure: false
|
|
205
|
+
}) && (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') &&
|
|
206
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
207
|
+
_tasksAndDecisionsStyles.vanillaDecisionIconWithVisualRefresh, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
208
|
+
exposure: false
|
|
209
|
+
}) && !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') &&
|
|
210
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
211
|
+
_tasksAndDecisionsStyles.vanillaDecisionIconWithoutVisualRefresh,
|
|
212
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
213
|
+
_statusStyles.statusStyles, (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') ?
|
|
214
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
215
|
+
_statusStyles.statusStylesMixin_fg_platform_component_visual_refresh :
|
|
216
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
217
|
+
_statusStyles.statusStylesMixin_without_fg_platform_component_visual_refresh,
|
|
218
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
219
|
+
(0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) && _statusStyles.vanillaStatusStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) && (0, _platformFeatureFlags.fg)('platform-component-visual-refresh') &&
|
|
220
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
221
|
+
_statusStyles.vanillaStatusStylesMixin_fg_platform_component_visual_refresh, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) && !(0, _platformFeatureFlags.fg)('platform-component-visual-refresh') &&
|
|
222
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
223
|
+
_statusStyles.vanillaStatusStylesMixin_without_fg_platform_component_visual_refresh,
|
|
224
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
225
|
+
_annotationStyles.annotationStyles,
|
|
226
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
227
|
+
_smartCardStyles.smartCardStyles,
|
|
228
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
229
|
+
_embedCardStyles.embedCardStyles,
|
|
230
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
231
|
+
_unsupportedStyles.unsupportedStyles,
|
|
232
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
233
|
+
_resizerStyles.resizerStyles,
|
|
221
234
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
222
235
|
_layout.layoutBaseStyles,
|
|
223
236
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -285,7 +298,17 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
285
298
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
286
299
|
_layout.layoutSelectedStylesForViewNotAdvanced, viewMode === 'view' && (0, _experiments.editorExperiment)('advanced_layouts', true) &&
|
|
287
300
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
288
|
-
_layout.layoutResponsiveStylesForView,
|
|
301
|
+
_layout.layoutResponsiveStylesForView,
|
|
302
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
303
|
+
isComment && _commentEditorStyles.commentEditorStyles,
|
|
304
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
305
|
+
isComment && _tableStyles.tableCommentEditorStyles,
|
|
306
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
307
|
+
isFullPage && _fullPageEditorStyles.fullPageEditorStyles,
|
|
308
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
309
|
+
isFullPage && _scrollbarStyles.scrollbarStyles,
|
|
310
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
311
|
+
(0, _platformFeatureFlags.fg)('platform_editor_ssr_fix_lists') && _list.listLayoutShiftFix, (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ?
|
|
289
312
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
290
313
|
_codeBlockStyles.firstCodeBlockWithNoMargin :
|
|
291
314
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -305,14 +328,28 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
305
328
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
306
329
|
_emoji.vanillaEmojiStyles :
|
|
307
330
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
308
|
-
_emoji.reactEmojiStyles,
|
|
331
|
+
_emoji.reactEmojiStyles,
|
|
332
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
333
|
+
_panelStyles.panelViewStyles,
|
|
334
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
335
|
+
_mediaStyles.mediaGroupStyles,
|
|
336
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
337
|
+
_mediaStyles.mediaAlignmentStyles,
|
|
338
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
339
|
+
_tableStyles.tableLayoutFixes,
|
|
340
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
341
|
+
_link.hyperLinkFloatingToolbarStyles,
|
|
342
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
343
|
+
!(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _link.linkLegacyIconStylesFix],
|
|
309
344
|
"data-editor-scroll-container": isScrollable ? 'true' : undefined,
|
|
310
345
|
"data-testid": "editor-content-container",
|
|
311
346
|
style: {
|
|
312
347
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
313
348
|
'--ak-editor-base-font-size': "".concat((0, _editorSharedStyles.editorFontSize)({
|
|
314
349
|
theme: theme
|
|
315
|
-
}), "px")
|
|
350
|
+
}), "px"),
|
|
351
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
352
|
+
'--ak-editor--large-gutter-padding': "".concat((0, _editorSharedStyles.akEditorGutterPaddingDynamic)(), "px")
|
|
316
353
|
}
|
|
317
354
|
}, children);
|
|
318
355
|
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.baseStyles = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
11
|
+
|
|
12
|
+
// = 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.
|
|
13
|
+
var akEditorCalculatedWideLayoutWidth = 1011;
|
|
14
|
+
// 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.
|
|
15
|
+
var akEditorCalculatedWideLayoutWidthSmallViewport = 905;
|
|
16
|
+
var akEditorGutterPadding = 32;
|
|
17
|
+
var akEditorDefaultLayoutWidth = 760;
|
|
18
|
+
var akEditorFullWidthLayoutWidth = 1800;
|
|
19
|
+
// The breakpoint for small devices is 1266px, copied from getBreakpoint in platform/packages/editor/editor-common/src/ui/WidthProvider/index.tsx
|
|
20
|
+
var akEditorBreakpointForSmallDevice = "1266px";
|
|
21
|
+
|
|
22
|
+
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
23
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
24
|
+
var baseStyles = exports.baseStyles = (0, _react.css)((0, _defineProperty2.default)({
|
|
25
|
+
'--ak-editor--default-gutter-padding': "".concat(akEditorGutterPadding, "px"),
|
|
26
|
+
'--ak-editor--default-layout-width': "".concat(akEditorDefaultLayoutWidth, "px"),
|
|
27
|
+
'--ak-editor--full-width-layout-width': "".concat(akEditorFullWidthLayoutWidth, "px"),
|
|
28
|
+
/* calculate editor line length, 100cqw is the editor container width */
|
|
29
|
+
'--ak-editor--line-length': 'min(calc(100cqw - var(--ak-editor--large-gutter-padding) * 2), var(--ak-editor--default-layout-width))',
|
|
30
|
+
'--ak-editor--breakout-wide-layout-width': "".concat(akEditorCalculatedWideLayoutWidthSmallViewport, "px"),
|
|
31
|
+
'--ak-editor--breakout-full-page-guttering-padding': 'calc(var(--ak-editor--large-gutter-padding) * 2 + var(--ak-editor--default-gutter-padding))',
|
|
32
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
33
|
+
'.fabric-editor--full-width-mode': {
|
|
34
|
+
'--ak-editor--line-length': 'min(calc(100cqw - var(--ak-editor--large-gutter-padding) * 2), var(--ak-editor--full-width-layout-width))'
|
|
35
|
+
},
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
37
|
+
'.ProseMirror': {
|
|
38
|
+
'--ak-editor-max-container-width': 'calc(100cqw - var(--ak-editor--large-gutter-padding))',
|
|
39
|
+
outline: 'none',
|
|
40
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
41
|
+
fontSize: 'var(--ak-editor-base-font-size)'
|
|
42
|
+
},
|
|
43
|
+
/* We can't allow nodes that are inside other nodes to bleed from the parent container */
|
|
44
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
45
|
+
'.ProseMirror > div[data-prosemirror-node-block] [data-prosemirror-node-block]': {
|
|
46
|
+
'--ak-editor-max-container-width': '100%'
|
|
47
|
+
}
|
|
48
|
+
}, "@container editor-area (width >= ".concat(akEditorBreakpointForSmallDevice, ")"), {
|
|
49
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
50
|
+
'.ProseMirror': {
|
|
51
|
+
'--ak-editor--breakout-wide-layout-width': "".concat(akEditorCalculatedWideLayoutWidth, "px")
|
|
52
|
+
}
|
|
53
|
+
}));
|