@atlaskit/editor-core 207.3.0 → 207.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/dist/cjs/presets/default.js +8 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPageContentArea.js +11 -1
- package/dist/cjs/ui/ContentStyles/layout.js +1 -1
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +7 -4
- package/dist/cjs/ui/EditorContentContainer/styles/mediaStyles.js +230 -0
- package/dist/cjs/ui/EditorContentContainer/styles/resizerStyles.js +211 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/presets/default.js +8 -0
- package/dist/es2019/ui/Appearance/FullPage/FullPageContentArea.js +11 -1
- package/dist/es2019/ui/ContentStyles/layout.js +1 -2
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +8 -8
- package/dist/es2019/ui/EditorContentContainer/styles/ai-panel.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/styles/layout.js +7 -7
- package/dist/es2019/ui/EditorContentContainer/styles/link.js +1 -1
- package/dist/es2019/ui/EditorContentContainer/styles/mediaStyles.js +357 -0
- package/dist/es2019/ui/EditorContentContainer/styles/resizerStyles.js +256 -0
- package/dist/es2019/ui/EditorContentContainer/styles/rule.js +2 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/presets/default.js +8 -0
- package/dist/esm/ui/Appearance/FullPage/FullPageContentArea.js +11 -1
- package/dist/esm/ui/ContentStyles/layout.js +1 -1
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +8 -5
- package/dist/esm/ui/EditorContentContainer/styles/ai-panel.js +1 -1
- package/dist/esm/ui/EditorContentContainer/styles/layout.js +7 -7
- package/dist/esm/ui/EditorContentContainer/styles/link.js +1 -1
- package/dist/esm/ui/EditorContentContainer/styles/mediaStyles.js +224 -0
- package/dist/esm/ui/EditorContentContainer/styles/resizerStyles.js +203 -0
- package/dist/esm/ui/EditorContentContainer/styles/rule.js +2 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/presets/default.d.ts +14 -4
- package/dist/types/types/editor-props.d.ts +11 -10
- package/dist/types/ui/EditorContentContainer/styles/mediaStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/resizerStyles.d.ts +10 -0
- package/dist/types-ts4.5/presets/default.d.ts +14 -4
- package/dist/types-ts4.5/types/editor-props.d.ts +11 -10
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/mediaStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/resizerStyles.d.ts +10 -0
- package/package.json +9 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 207.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#159938](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159938)
|
|
8
|
+
[`b89d348f570a5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b89d348f570a5) -
|
|
9
|
+
[https://product-fabric.atlassian.net/browse/ED-27746](ED-27746) - rewrite editor resizer CSS in
|
|
10
|
+
static emotion
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [#159418](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/159418)
|
|
15
|
+
[`5f1c8497e044e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5f1c8497e044e) -
|
|
16
|
+
[ux] ED-27103 improved method for applying the correct offline banner toolbar position when editor
|
|
17
|
+
toolbar is either docked to top or contextual
|
|
18
|
+
|
|
19
|
+
## 207.4.0
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- [#158380](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/158380)
|
|
24
|
+
[`6f655038684d2`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6f655038684d2) -
|
|
25
|
+
[https://product-fabric.atlassian.net/browse/ED-27746](ED-27746) - rewrite editor media CSS in
|
|
26
|
+
static emotion
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies
|
|
31
|
+
|
|
3
32
|
## 207.3.0
|
|
4
33
|
|
|
5
34
|
### Minor Changes
|
|
@@ -47,6 +47,8 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
47
47
|
/**
|
|
48
48
|
* Note: The order that presets are added determines
|
|
49
49
|
* their placement in the editor toolbar
|
|
50
|
+
* @param options
|
|
51
|
+
* @example
|
|
50
52
|
*/
|
|
51
53
|
function createDefaultPreset(options) {
|
|
52
54
|
var _options$featureFlags, _options$featureFlags2;
|
|
@@ -73,6 +75,12 @@ function createDefaultPreset(options) {
|
|
|
73
75
|
})]).add([_codeBlock.codeBlockPlugin, options.codeBlock]);
|
|
74
76
|
return preset;
|
|
75
77
|
}
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @param props
|
|
82
|
+
* @example
|
|
83
|
+
*/
|
|
76
84
|
function useDefaultPreset(props) {
|
|
77
85
|
var preset = createDefaultPreset(props);
|
|
78
86
|
return [preset];
|
|
@@ -81,6 +81,16 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
81
81
|
if (props.hasHadInteraction && (0, _platformFeatureFlags.fg)('platform_editor_no_cursor_on_live_doc_init')) {
|
|
82
82
|
interactionClassName = props.hasHadInteraction ? 'ak-editor-has-interaction' : 'ak-editor-no-interaction';
|
|
83
83
|
}
|
|
84
|
+
var shouldSetHiddenDataAttribute = function shouldSetHiddenDataAttribute() {
|
|
85
|
+
// When platform_editor_offline_banner_toolbar_position is enabled we use a different method to
|
|
86
|
+
// determine if the toolbar is hidden from outside of the editor, which doesn't require setting
|
|
87
|
+
// data-editor-primary-toolbar-hidden on the content area
|
|
88
|
+
// NOTE: When tidying, this function and the data attribute can be removed
|
|
89
|
+
if (!props.isEditorToolbarHidden || (0, _platformFeatureFlags.fg)('platform_editor_offline_banner_toolbar_position')) {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
return (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1');
|
|
93
|
+
};
|
|
84
94
|
return (0, _react2.jsx)("div", {
|
|
85
95
|
css: [
|
|
86
96
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
|
|
@@ -122,7 +132,7 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
|
|
|
122
132
|
,
|
|
123
133
|
className: "ak-editor-content-area-region",
|
|
124
134
|
"data-editor-editable-content": true,
|
|
125
|
-
"data-editor-primary-toolbar-hidden":
|
|
135
|
+
"data-editor-primary-toolbar-hidden": shouldSetHiddenDataAttribute() ? 'true' : undefined,
|
|
126
136
|
role: "region",
|
|
127
137
|
"aria-label": props.intl.formatMessage(_messages.fullPageMessages.editableContentLabel),
|
|
128
138
|
ref: contentAreaRef
|
|
@@ -77,5 +77,5 @@ var layoutResponsiveStyles = function layoutResponsiveStyles(viewMode) {
|
|
|
77
77
|
|
|
78
78
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
|
|
79
79
|
var layoutStyles = exports.layoutStyles = function layoutStyles(viewMode) {
|
|
80
|
-
return (0, _react.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t/* Ignored via go/ees007\n\t\t\tTODO: Migrate away from gridSize\n\t\t\tRecommendation: Replace directly with 7px */\n\t\t\tmargin: ", " -", "px
|
|
80
|
+
return (0, _react.css)(_templateObject13 || (_templateObject13 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t/* Ignored via go/ees007\n\t\t\tTODO: Migrate away from gridSize\n\t\t\tRecommendation: Replace directly with 7px */\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t/* styles to support borders for layout */\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t/* hide separator when element is dragging on top of a layout column */\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", _editorSharedStyles.akLayoutGutterOffset + ((0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? AK_NESTED_DND_GUTTER_OFFSET : 0), _editorSharedStyles.akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || (0, _experiments.editorExperiment)('advanced_layouts', true) ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", _styles.LAYOUT_COLUMN_PADDING, _styles.LAYOUT_COLUMN_PADDING + ((0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), (0, _experiments.editorExperiment)('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), (0, _experiments.editorExperiment)('advanced_layouts', true) && layoutResponsiveStyles(viewMode), _types.TableCssClassName.TABLE_CONTAINER, _consts.tableMarginFullWidthMode, (0, _experiments.editorExperiment)('advanced_layouts', false) && (0, _platformFeatureFlags.fg)('platform_editor_nested_dnd_styles_changes') && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", _editorSharedStyles.akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
|
|
81
81
|
};
|
|
@@ -30,7 +30,6 @@ var _codeBlock = require("../ContentStyles/code-block");
|
|
|
30
30
|
var _date = require("../ContentStyles/date");
|
|
31
31
|
var _expand = require("../ContentStyles/expand");
|
|
32
32
|
var _extension = require("../ContentStyles/extension");
|
|
33
|
-
var _media = require("../ContentStyles/media");
|
|
34
33
|
var _panel2 = require("../ContentStyles/panel");
|
|
35
34
|
var _status = require("../ContentStyles/status");
|
|
36
35
|
var _tasksAndDecisions = require("../ContentStyles/tasks-and-decisions");
|
|
@@ -40,6 +39,8 @@ var _backgroundColorStyles = require("./styles/backgroundColorStyles");
|
|
|
40
39
|
var _embedCardStyles = require("./styles/embedCardStyles");
|
|
41
40
|
var _layout = require("./styles/layout");
|
|
42
41
|
var _link = require("./styles/link");
|
|
42
|
+
var _mediaStyles = require("./styles/mediaStyles");
|
|
43
|
+
var _resizerStyles = require("./styles/resizerStyles");
|
|
43
44
|
var _rule = require("./styles/rule");
|
|
44
45
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12;
|
|
45
46
|
/* eslint-disable @atlaskit/design-system/consistent-css-prop-usage */
|
|
@@ -147,7 +148,7 @@ var akEditorBreakpointForSmallDevice = "1266px";
|
|
|
147
148
|
|
|
148
149
|
// jest warning: JSDOM version (22) doesn't support the new @container CSS rule
|
|
149
150
|
var contentStyles = function contentStyles() {
|
|
150
|
-
return (0, _react2.css)(_templateObject8 || (_templateObject8 = (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\n\t\t", ";\n\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", ";\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n // Switch between the two icons based on the visual refresh feature gate\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n
|
|
151
|
+
return (0, _react2.css)(_templateObject8 || (_templateObject8 = (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\n\t\t", ";\n\n\t\t", ";\n\t}\n\n\t", "\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t/**\n\t * This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24\n\t *\n\t * 1. Merge and Release platform_editor_hide_cursor_when_pm_hideselection\n\t * 2. Cleanup duplicated style from platform_editor_advanced_code_blocks\n\t * https://product-fabric.atlassian.net/browse/ED-26331\n\t */\n\t", "\n\n\t/* This prosemirror css style: https://github.com/ProseMirror/prosemirror-view/blob/f37ebb29befdbde3cd194fe13fe17b78e743d2f2/style/prosemirror.css#L24 */\n\t", "\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t.ProseMirror.ProseMirror-focused:has(.ProseMirror-mark-boundary-cursor) {\n\t\tcaret-color: transparent;\n\t}\n\t.ProseMirror:not(.ProseMirror-focused) .ProseMirror-mark-boundary-cursor {\n\t\tdisplay: none;\n\t}\n\n\t", "\n\n\t", "\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n ", ";\n\n\t", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n // Switch between the two icons based on the visual refresh feature gate\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n\t", "\n\n ", "\n\n ", "\n\n ", "\n\n ", "\n\n .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, _styles.whitespaceSharedStyles, (0, _styles.paragraphSharedStyles)(), _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, (0, _platformFeatureFlags.fg)('editor_request_to_edit_task') ? null : (0, _react2.css)(_templateObject9 || (_templateObject9 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\t\t\t\tpointer-events: none;\n\t\t\t\t\topacity: 0.7;\n\t\t\t\t}\n\t\t\t"]))), (0, _platformFeatureFlags.fg)('platform_editor_hide_cursor_when_pm_hideselection') ? (0, _react2.css)(_templateObject10 || (_templateObject10 = (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)(_templateObject11 || (_templateObject11 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror-hideselection {\n\t\t\t\t\tcaret-color: transparent;\n\t\t\t\t}\n\t\t\t"]))) : null, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? placeholderOverflowStyles : null, (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') && (0, _platformFeatureFlags.fg)('platform_editor_quick_insert_placeholder') ? placeholderWrapStyles : null, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, _backgroundColorStyles.backgroundColorStyles, listsStyles, _rule.ruleStyles, _mediaStyles.mediaStyles, (0, _platformFeatureFlags.fg)('confluence_team_presence_scroll_to_pointer') ? _collab.telepointerStyle : _collab.telepointerStyleWithInitialOnly, _selection.gapCursorStyles, (0, _panel2.panelStyles)(), mentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
151
152
|
exposure: false
|
|
152
153
|
}) && vanillaMentionsStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
153
154
|
exposure: false
|
|
@@ -161,7 +162,7 @@ var contentStyles = function contentStyles() {
|
|
|
161
162
|
exposure: false
|
|
162
163
|
}) && (0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithVisualRefresh, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
163
164
|
exposure: false
|
|
164
|
-
}) && !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithoutVisualRefresh, _status.statusStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? (0, _status.vanillaStatusStyles)() : null, _annotationStyles.annotationStyles, (0, _styles.smartCardStyles)(), (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? (0, _styles.getSmartCardSharedStyles)() : _styles.smartCardSharedStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? _date.dateVanillaStyles : null, _date.dateStyles, _embedCardStyles.embedCardStyles, _styles.unsupportedStyles,
|
|
165
|
+
}) && !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _tasksAndDecisions.vanillaTaskDecisionIconWithoutVisualRefresh, _status.statusStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? (0, _status.vanillaStatusStyles)() : null, _annotationStyles.annotationStyles, (0, _styles.smartCardStyles)(), (0, _platformFeatureFlags.fg)('platform-linking-visual-refresh-v1') ? (0, _styles.getSmartCardSharedStyles)() : _styles.smartCardSharedStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true) ? _date.dateVanillaStyles : null, _date.dateStyles, _embedCardStyles.embedCardStyles, _styles.unsupportedStyles, _resizerStyles.resizerStyles, fixBlockControlStylesSSR(), !(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') ? (0, _react2.css)(_templateObject12 || (_templateObject12 = (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);
|
|
165
166
|
};
|
|
166
167
|
var CommentEditorMargin = 14;
|
|
167
168
|
|
|
@@ -233,7 +234,9 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
233
234
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
234
235
|
(0, _layout.layoutBaseStyles)(),
|
|
235
236
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
236
|
-
(0, _platformFeatureFlags.fg)('platform_editor_hyperlink_underline') ? _link.linkStyles : _link.linkStylesOld,
|
|
237
|
+
(0, _platformFeatureFlags.fg)('platform_editor_hyperlink_underline') ? _link.linkStyles : _link.linkStylesOld, (0, _experiments.editorExperiment)('platform_editor_breakout_resizing', true) &&
|
|
238
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
239
|
+
_resizerStyles.pragmaticResizerStyles,
|
|
237
240
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
238
241
|
_aiPanel.aiPanelBaseStyles,
|
|
239
242
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.mediaStyles = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
var _mediaInline = require("@atlaskit/editor-common/media-inline");
|
|
11
|
+
var _styles = require("@atlaskit/editor-common/styles");
|
|
12
|
+
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
13
|
+
var _mediaCard = require("@atlaskit/media-card");
|
|
14
|
+
var _ProseMirror, _css; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
15
|
+
var wrappedMediaBreakoutPoint = 410;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Reference Heights
|
|
19
|
+
*
|
|
20
|
+
* These heights enforce consistent sizes with media inline nodes due to
|
|
21
|
+
* inconsistencies with center aligned inline nodes and text.
|
|
22
|
+
*
|
|
23
|
+
* There is conversation about refactoring media inline nodes to conform to
|
|
24
|
+
* aligning correctly with the surrounding text.
|
|
25
|
+
*
|
|
26
|
+
* These constants originally came from `headingSizes` from the `theme` package
|
|
27
|
+
* and have been copied here to remove this package.
|
|
28
|
+
*/
|
|
29
|
+
var referenceHeights = {
|
|
30
|
+
p: 24 - 2,
|
|
31
|
+
h1: 32 + 4,
|
|
32
|
+
h2: 28 + 3,
|
|
33
|
+
h3: 24 + 1,
|
|
34
|
+
h4: 20 + 3,
|
|
35
|
+
h5: 16 + 4,
|
|
36
|
+
h6: 16 + 2
|
|
37
|
+
};
|
|
38
|
+
var inlineImageSelector = "> .mediaInlineView-content-wrap > .".concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ", > :is(a, span[data-mark-type='border']) .mediaInlineView-content-wrap > .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ", > .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME, ", > :is(a, span[data-mark-type='border']) .").concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME);
|
|
39
|
+
|
|
40
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles,@atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
41
|
+
var mediaStyles = exports.mediaStyles = (0, _react.css)((_css = {
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
43
|
+
'.ProseMirror': (_ProseMirror = {}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ProseMirror, "li .".concat(_styles.richMediaClassName), {
|
|
44
|
+
margin: 0
|
|
45
|
+
}), '&.ua-chrome li > .mediaSingleView-content-wrap::before', {
|
|
46
|
+
content: "''",
|
|
47
|
+
display: 'block',
|
|
48
|
+
height: 0
|
|
49
|
+
}), '&.ua-firefox', {
|
|
50
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
51
|
+
'.mediaSingleView-content-wrap': {
|
|
52
|
+
userSelect: 'none'
|
|
53
|
+
},
|
|
54
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
55
|
+
'.captionView-content-wrap': {
|
|
56
|
+
userSelect: 'text'
|
|
57
|
+
}
|
|
58
|
+
}), ".mediaSingleView-content-wrap[layout^='wrap-']", {
|
|
59
|
+
position: 'relative',
|
|
60
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values,@atlaskit/ui-styling-standard/no-imported-style-values
|
|
61
|
+
zIndex: _editorSharedStyles.akEditorWrappedNodeZIndex,
|
|
62
|
+
maxWidth: '100%',
|
|
63
|
+
/* overwrite default Prosemirror setting making it clear: both */
|
|
64
|
+
clear: 'inherit'
|
|
65
|
+
}), ".mediaSingleView-content-wrap[layout='center']", {
|
|
66
|
+
clear: 'both'
|
|
67
|
+
}), "table .".concat(_styles.richMediaClassName), {
|
|
68
|
+
marginTop: "var(--ds-space-150, 12px)",
|
|
69
|
+
marginBottom: "var(--ds-space-150, 12px)",
|
|
70
|
+
clear: 'both',
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
72
|
+
'&.image-wrap-left[data-layout], &.image-wrap-right[data-layout]': {
|
|
73
|
+
clear: 'none',
|
|
74
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
75
|
+
'&:first-child': {
|
|
76
|
+
marginTop: "var(--ds-space-150, 12px)"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}), ".".concat(_styles.richMediaClassName, ".image-wrap-right + .").concat(_styles.richMediaClassName, ".image-wrap-left"), {
|
|
80
|
+
clear: 'both'
|
|
81
|
+
}), ".".concat(_styles.richMediaClassName, ".image-wrap-left + .").concat(_styles.richMediaClassName, ".image-wrap-right, .").concat(_styles.richMediaClassName, ".image-wrap-right + .").concat(_styles.richMediaClassName, ".image-wrap-left, .").concat(_styles.richMediaClassName, ".image-wrap-left + .").concat(_styles.richMediaClassName, ".image-wrap-left, .").concat(_styles.richMediaClassName, ".image-wrap-right + .").concat(_styles.richMediaClassName, ".image-wrap-right"), {
|
|
82
|
+
marginRight: 0,
|
|
83
|
+
marginLeft: 0
|
|
84
|
+
}), "@media all and (max-width: ".concat(wrappedMediaBreakoutPoint, "px)"), {
|
|
85
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
86
|
+
"div.mediaSingleView-content-wrap[layout='wrap-left'], div.mediaSingleView-content-wrap[data-layout='wrap-left'], div.mediaSingleView-content-wrap[layout='wrap-right'], div.mediaSingleView-content-wrap[data-layout='wrap-right']": {
|
|
87
|
+
float: 'none',
|
|
88
|
+
overflow: 'auto',
|
|
89
|
+
margin: "var(--ds-space-150, 12px)".concat(" 0")
|
|
90
|
+
}
|
|
91
|
+
}), "& [layout='full-width'] .".concat(_styles.richMediaClassName, ", & [layout='wide'] .").concat(_styles.richMediaClassName), {
|
|
92
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-space
|
|
93
|
+
marginLeft: '50%',
|
|
94
|
+
transform: 'translateX(-50%)'
|
|
95
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ProseMirror, ".media-extended-resize-experience[layout^='wrap-']", {
|
|
96
|
+
// override 'overflow: auto' when viewport <= 410 set by mediaSingleSharedStyle
|
|
97
|
+
// to prevent scroll bar
|
|
98
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
99
|
+
overflow: 'visible !important'
|
|
100
|
+
}), "& [layout^='wrap-'] + [layout^='wrap-']", (0, _defineProperty2.default)({
|
|
101
|
+
clear: 'none',
|
|
102
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
103
|
+
"& + p, & + div[class^='fabric-editor-align'], & + ul, & + ol, & + h1, & + h2, & + h3, & + h4, & + h5, & + h6": {
|
|
104
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
105
|
+
clear: 'both !important'
|
|
106
|
+
}
|
|
107
|
+
}, "& .".concat(_styles.richMediaClassName), {
|
|
108
|
+
marginLeft: 0,
|
|
109
|
+
marginRight: 0
|
|
110
|
+
})), ".".concat(_mediaInline.INLINE_IMAGE_WRAPPER_CLASS_NAME), {
|
|
111
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
112
|
+
height: referenceHeights['p'],
|
|
113
|
+
transform: 'translateY(-2px)'
|
|
114
|
+
}), "h1", (0, _defineProperty2.default)({}, inlineImageSelector, {
|
|
115
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
116
|
+
height: referenceHeights.h1,
|
|
117
|
+
transform: "translateY(-3px)"
|
|
118
|
+
})), "h2", (0, _defineProperty2.default)({}, inlineImageSelector, {
|
|
119
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
120
|
+
height: referenceHeights.h2,
|
|
121
|
+
transform: "translateY(-3px)"
|
|
122
|
+
})), "h3", (0, _defineProperty2.default)({}, inlineImageSelector, {
|
|
123
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
124
|
+
height: referenceHeights.h3,
|
|
125
|
+
transform: "translateY(-2px)"
|
|
126
|
+
})), "h4", (0, _defineProperty2.default)({}, inlineImageSelector, {
|
|
127
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
128
|
+
height: referenceHeights.h4,
|
|
129
|
+
transform: "translateY(-2px)"
|
|
130
|
+
})), "h5", (0, _defineProperty2.default)({}, inlineImageSelector, {
|
|
131
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
132
|
+
height: referenceHeights.h5,
|
|
133
|
+
transform: "translateY(-2px)"
|
|
134
|
+
})), "h6", (0, _defineProperty2.default)({}, inlineImageSelector, {
|
|
135
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values
|
|
136
|
+
height: referenceHeights.h6,
|
|
137
|
+
transform: "translateY(-2px)"
|
|
138
|
+
})), ".mediaSingleView-content-wrap[layout='wrap-left']", {
|
|
139
|
+
float: 'left'
|
|
140
|
+
}), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_ProseMirror, ".mediaSingleView-content-wrap[layout='wrap-right']", {
|
|
141
|
+
float: 'right'
|
|
142
|
+
}), ".mediaSingleView-content-wrap[layout='wrap-right'] + .mediaSingleView-content-wrap[layout='wrap-left']", {
|
|
143
|
+
clear: 'both'
|
|
144
|
+
}), '& > .mediaSingleView-content-wrap', {
|
|
145
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
146
|
+
'.richMedia-resize-handle-right': {
|
|
147
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
148
|
+
marginRight: "-".concat(_editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, "px")
|
|
149
|
+
},
|
|
150
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
151
|
+
'.richMedia-resize-handle-left': {
|
|
152
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
153
|
+
marginLeft: "-".concat(_editorSharedStyles.akEditorMediaResizeHandlerPaddingWide, "px")
|
|
154
|
+
}
|
|
155
|
+
}))
|
|
156
|
+
}, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css, ".".concat(_styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT), {
|
|
157
|
+
padding: 0
|
|
158
|
+
}), '.richMedia-resize-handle-right, .richMedia-resize-handle-left', {
|
|
159
|
+
display: 'flex',
|
|
160
|
+
flexDirection: 'column',
|
|
161
|
+
/* vertical align */
|
|
162
|
+
justifyContent: 'center'
|
|
163
|
+
}), '.richMedia-resize-handle-right', {
|
|
164
|
+
alignItems: 'flex-end',
|
|
165
|
+
paddingRight: "var(--ds-space-150, 12px)",
|
|
166
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
167
|
+
marginRight: "-".concat(_editorSharedStyles.akEditorMediaResizeHandlerPadding, "px")
|
|
168
|
+
}), '.richMedia-resize-handle-left', {
|
|
169
|
+
alignItems: 'flex-start',
|
|
170
|
+
paddingLeft: "var(--ds-space-150, 12px)",
|
|
171
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
172
|
+
marginLeft: "-".concat(_editorSharedStyles.akEditorMediaResizeHandlerPadding, "px")
|
|
173
|
+
}), '.richMedia-resize-handle-right::after, .richMedia-resize-handle-left::after', {
|
|
174
|
+
content: "' '",
|
|
175
|
+
display: 'flex',
|
|
176
|
+
width: 3,
|
|
177
|
+
height: 64,
|
|
178
|
+
borderRadius: 6
|
|
179
|
+
}), ".".concat(_styles.richMediaClassName, ":hover .richMedia-resize-handle-left::after, .").concat(_styles.richMediaClassName, ":hover .richMedia-resize-handle-right::after"), {
|
|
180
|
+
background: "var(--ds-border, #091E4224)"
|
|
181
|
+
}), ".".concat(_editorSharedStyles.akEditorSelectedNodeClassName, " .richMedia-resize-handle-right::after, .").concat(_editorSharedStyles.akEditorSelectedNodeClassName, " .richMedia-resize-handle-left::after, .").concat(_styles.richMediaClassName, " .richMedia-resize-handle-right:hover::after, .").concat(_styles.richMediaClassName, " .richMedia-resize-handle-left:hover::after, .").concat(_styles.richMediaClassName, ".is-resizing .richMedia-resize-handle-right::after, .").concat(_styles.richMediaClassName, ".is-resizing .richMedia-resize-handle-left::after"), {
|
|
182
|
+
background: "var(--ds-border-focused, #388BFF)"
|
|
183
|
+
}), '.__resizable_base__', {
|
|
184
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
185
|
+
left: 'unset !important',
|
|
186
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
187
|
+
width: 'auto !important',
|
|
188
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
189
|
+
height: 'auto !important'
|
|
190
|
+
}), '.danger > div > div > .media-card-frame, .danger > span > a', {
|
|
191
|
+
backgroundColor: "var(--ds-background-danger, #FFECEB)",
|
|
192
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
193
|
+
boxShadow: "0px 0px 0px ".concat(_editorSharedStyles.akEditorSelectedBorderBoldSize, "px, ", "var(--ds-border-danger, #E2483D)"),
|
|
194
|
+
transition: 'background-color 0s, box-shadow 0s'
|
|
195
|
+
}), '.danger', (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_styles.richMediaClassName, " .").concat(_mediaCard.fileCardImageViewSelector, "::after"), {
|
|
196
|
+
border: "1px solid ".concat("var(--ds-border-danger, #E2483D)")
|
|
197
|
+
}), ".".concat(_styles.richMediaClassName, " .").concat(_mediaCard.inlinePlayerClassName, "::after"), {
|
|
198
|
+
border: "1px solid ".concat("var(--ds-border-danger, #E2483D)")
|
|
199
|
+
}), ".".concat(_styles.richMediaClassName, " .").concat(_mediaCard.newFileExperienceClassName), {
|
|
200
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
201
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-danger, #E2483D)", " !important")
|
|
202
|
+
}), '.richMedia-resize-handle-right::after, .richMedia-resize-handle-left::after', {
|
|
203
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
204
|
+
background: "var(--ds-icon-danger, #C9372C)".concat(" !important")
|
|
205
|
+
}), '.resizer-handle-thumb', {
|
|
206
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
207
|
+
background: "var(--ds-icon-danger, #C9372C)".concat(" !important")
|
|
208
|
+
}), 'div div .media-card-frame, .inlineCardView-content-wrap > span > a', {
|
|
209
|
+
backgroundColor: "var(--ds-blanket-danger, #EF5C4814)",
|
|
210
|
+
transition: "background-color 0s"
|
|
211
|
+
}), 'div div .media-card-frame::after', {
|
|
212
|
+
boxShadow: 'none'
|
|
213
|
+
})), (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)(_css, '.warning', (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(_styles.richMediaClassName, " .").concat(_mediaCard.fileCardImageViewSelector, "::after"), {
|
|
214
|
+
border: "1px solid ".concat("var(--ds-border-warning, #E56910)")
|
|
215
|
+
}), ".".concat(_styles.richMediaClassName, " .").concat(_mediaCard.inlinePlayerClassName, "::after"), {
|
|
216
|
+
border: "1px solid ".concat("var(--ds-border-warning, #E56910)")
|
|
217
|
+
}), ".".concat(_styles.richMediaClassName, " .").concat(_mediaCard.newFileExperienceClassName), {
|
|
218
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
219
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-warning, #E56910)", " !important")
|
|
220
|
+
}), '.resizer-handle-thumb', {
|
|
221
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
222
|
+
background: "var(--ds-icon-warning, #E56910)".concat(" !important")
|
|
223
|
+
})), '.media-filmstrip-list-item', {
|
|
224
|
+
cursor: 'pointer'
|
|
225
|
+
}), ".mediaGroupView-content-wrap.".concat(_editorSharedStyles.akEditorSelectedNodeClassName, " #newFileExperienceWrapper"), {
|
|
226
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
227
|
+
boxShadow: _editorSharedStyles.akEditorSelectedBoxShadow
|
|
228
|
+
}), '.ak-editor-no-interaction #newFileExperienceWrapper', {
|
|
229
|
+
boxShadow: 'none'
|
|
230
|
+
})));
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.resizerStyles = exports.resizerItemClassName = exports.resizerHoverZoneClassName = exports.resizerHandleTrackClassName = exports.resizerHandleThumbClassName = exports.resizerHandleClassName = exports.resizerExtendedZone = exports.resizerDangerClassName = exports.pragmaticResizerStyles = exports.handleWrapperClass = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _react = require("@emotion/react");
|
|
10
|
+
// eslint-disable-line
|
|
11
|
+
|
|
12
|
+
var resizerItemClassName = exports.resizerItemClassName = 'resizer-item';
|
|
13
|
+
var resizerHoverZoneClassName = exports.resizerHoverZoneClassName = 'resizer-hover-zone';
|
|
14
|
+
var resizerExtendedZone = exports.resizerExtendedZone = 'resizer-is-extended';
|
|
15
|
+
var resizerHandleClassName = exports.resizerHandleClassName = 'resizer-handle';
|
|
16
|
+
var resizerHandleTrackClassName = exports.resizerHandleTrackClassName = "".concat(resizerHandleClassName, "-track");
|
|
17
|
+
var resizerHandleThumbClassName = exports.resizerHandleThumbClassName = "".concat(resizerHandleClassName, "-thumb");
|
|
18
|
+
var resizerDangerClassName = exports.resizerDangerClassName = "".concat(resizerHandleClassName, "-danger");
|
|
19
|
+
var handleWrapperClass = exports.handleWrapperClass = 'resizer-handle-wrapper';
|
|
20
|
+
|
|
21
|
+
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766, Seems perfectly safe to autofix, but comments would be lost…
|
|
22
|
+
var resizerStyles = exports.resizerStyles = (0, _react.css)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, ".".concat(resizerItemClassName), (0, _defineProperty2.default)({
|
|
23
|
+
willChange: 'width',
|
|
24
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
25
|
+
'&:hover, &.display-handle': (0, _defineProperty2.default)({}, "& > .".concat(handleWrapperClass, " > .").concat(resizerHandleClassName), {
|
|
26
|
+
visibility: 'visible',
|
|
27
|
+
opacity: 1
|
|
28
|
+
}),
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
30
|
+
'&.is-resizing': (0, _defineProperty2.default)({}, "& .".concat(resizerHandleThumbClassName), {
|
|
31
|
+
background: "var(--ds-border-focused, #388BFF)"
|
|
32
|
+
})
|
|
33
|
+
}, "&.".concat(resizerDangerClassName), (0, _defineProperty2.default)({}, "& .".concat(resizerHandleThumbClassName), {
|
|
34
|
+
transition: 'none',
|
|
35
|
+
background: "var(--ds-icon-danger, #C9372C)"
|
|
36
|
+
}))), ".".concat(resizerHandleClassName), {
|
|
37
|
+
display: 'flex',
|
|
38
|
+
visibility: 'hidden',
|
|
39
|
+
opacity: 0,
|
|
40
|
+
flexDirection: 'column',
|
|
41
|
+
justifyContent: 'center',
|
|
42
|
+
alignItems: 'center',
|
|
43
|
+
width: 7,
|
|
44
|
+
transition: 'visibility 0.2s, opacity 0.2s',
|
|
45
|
+
// NOTE: The below style is targeted at the div element added by the tooltip. We don't have any means of injecting styles
|
|
46
|
+
// into the tooltip
|
|
47
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
48
|
+
"& div[role='presentation']": {
|
|
49
|
+
width: '100%',
|
|
50
|
+
height: '100%',
|
|
51
|
+
display: 'flex',
|
|
52
|
+
flexDirection: 'column',
|
|
53
|
+
justifyContent: 'center',
|
|
54
|
+
alignItems: 'center',
|
|
55
|
+
marginTop: "var(--ds-space-negative-200, -16px)",
|
|
56
|
+
whiteSpace: 'normal'
|
|
57
|
+
},
|
|
58
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
59
|
+
'&.left': {
|
|
60
|
+
alignItems: 'flex-start'
|
|
61
|
+
},
|
|
62
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
63
|
+
'&.right': {
|
|
64
|
+
alignItems: 'flex-end'
|
|
65
|
+
},
|
|
66
|
+
// Handle Sizing
|
|
67
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
68
|
+
'&.small': (0, _defineProperty2.default)({}, "& .".concat(resizerHandleThumbClassName), {
|
|
69
|
+
height: 43
|
|
70
|
+
}),
|
|
71
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
72
|
+
'&.medium': (0, _defineProperty2.default)({}, "& .".concat(resizerHandleThumbClassName), {
|
|
73
|
+
height: 64
|
|
74
|
+
}),
|
|
75
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
76
|
+
'&.large': (0, _defineProperty2.default)({}, "& .".concat(resizerHandleThumbClassName), {
|
|
77
|
+
height: 96
|
|
78
|
+
}),
|
|
79
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
80
|
+
'&.clamped': (0, _defineProperty2.default)({}, "& .".concat(resizerHandleThumbClassName), {
|
|
81
|
+
height: 'clamp(43px, calc(100% - 32px), 96px)'
|
|
82
|
+
}),
|
|
83
|
+
// Handle Alignment
|
|
84
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
85
|
+
'&.sticky': (0, _defineProperty2.default)({}, "& .".concat(resizerHandleThumbClassName), {
|
|
86
|
+
position: 'sticky',
|
|
87
|
+
top: "var(--ds-space-150, 12px)",
|
|
88
|
+
bottom: "var(--ds-space-150, 12px)"
|
|
89
|
+
}),
|
|
90
|
+
'&:hover': (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "& .".concat(resizerHandleThumbClassName), {
|
|
91
|
+
background: "var(--ds-border-focused, #388BFF)"
|
|
92
|
+
}), "& .".concat(resizerHandleTrackClassName), {
|
|
93
|
+
visibility: 'visible',
|
|
94
|
+
opacity: 0.5
|
|
95
|
+
})
|
|
96
|
+
}), ".".concat(resizerHandleThumbClassName), {
|
|
97
|
+
content: "' '",
|
|
98
|
+
display: 'flex',
|
|
99
|
+
width: 3,
|
|
100
|
+
margin: "0 ".concat("var(--ds-space-025, 2px)"),
|
|
101
|
+
height: 64,
|
|
102
|
+
transition: 'background-color 0.2s',
|
|
103
|
+
borderRadius: 6,
|
|
104
|
+
border: 0,
|
|
105
|
+
padding: 0,
|
|
106
|
+
zIndex: 2,
|
|
107
|
+
outline: 'none',
|
|
108
|
+
minHeight: 24,
|
|
109
|
+
background: "var(--ds-border, #091E4224)",
|
|
110
|
+
'&:hover': {
|
|
111
|
+
cursor: 'col-resize'
|
|
112
|
+
},
|
|
113
|
+
'&:focus': {
|
|
114
|
+
background: "var(--ds-border-selected, #0C66E4)",
|
|
115
|
+
'&::after': {
|
|
116
|
+
content: "''",
|
|
117
|
+
position: 'absolute',
|
|
118
|
+
top: "var(--ds-space-negative-050, -4px)",
|
|
119
|
+
right: "var(--ds-space-negative-050, -4px)",
|
|
120
|
+
bottom: "var(--ds-space-negative-050, -4px)",
|
|
121
|
+
left: "var(--ds-space-negative-050, -4px)",
|
|
122
|
+
border: "2px solid ".concat("var(--ds-border-focused, #388BFF)"),
|
|
123
|
+
borderRadius: 'inherit',
|
|
124
|
+
zIndex: -1
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}), ".".concat(resizerHandleTrackClassName), {
|
|
128
|
+
visibility: 'hidden',
|
|
129
|
+
position: 'absolute',
|
|
130
|
+
width: 7,
|
|
131
|
+
height: 'calc(100% - 40px)',
|
|
132
|
+
borderRadius: 4,
|
|
133
|
+
opacity: 0,
|
|
134
|
+
transition: 'background-color 0.2s, visibility 0.2s, opacity 0.2s',
|
|
135
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
136
|
+
'&.none': {
|
|
137
|
+
background: 'none'
|
|
138
|
+
},
|
|
139
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
140
|
+
'&.shadow': {
|
|
141
|
+
background: "var(--ds-background-selected, #E9F2FF)"
|
|
142
|
+
},
|
|
143
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
144
|
+
'&.full-height': {
|
|
145
|
+
background: "var(--ds-background-selected, #E9F2FF)",
|
|
146
|
+
height: '100%',
|
|
147
|
+
minHeight: 36
|
|
148
|
+
}
|
|
149
|
+
}), '.ak-editor-selected-node', (0, _defineProperty2.default)({}, "& .".concat(resizerHandleThumbClassName), {
|
|
150
|
+
background: "var(--ds-border-focused, #388BFF)"
|
|
151
|
+
})), ".ak-editor-no-interaction .ak-editor-selected-node .".concat(resizerHandleClassName, ":not(:hover) .").concat(resizerHandleThumbClassName), {
|
|
152
|
+
background: "var(--ds-border, #091E4224)"
|
|
153
|
+
}), ".".concat(resizerHoverZoneClassName), (0, _defineProperty2.default)({
|
|
154
|
+
position: 'relative',
|
|
155
|
+
display: 'inline-block',
|
|
156
|
+
width: '100%'
|
|
157
|
+
}, "&.".concat(resizerExtendedZone), {
|
|
158
|
+
padding: "0 ".concat("var(--ds-space-150, 12px)"),
|
|
159
|
+
left: "var(--ds-space-negative-150, -12px)"
|
|
160
|
+
})), "table .".concat(resizerHoverZoneClassName, ", table .").concat(resizerHoverZoneClassName, ".").concat(resizerExtendedZone), {
|
|
161
|
+
padding: 'unset',
|
|
162
|
+
left: 'unset'
|
|
163
|
+
}));
|
|
164
|
+
|
|
165
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
166
|
+
var pragmaticResizerStyles = exports.pragmaticResizerStyles = (0, _react.css)({
|
|
167
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
168
|
+
'.pm-breakout-resize-handle': {
|
|
169
|
+
position: 'relative',
|
|
170
|
+
display: 'flex',
|
|
171
|
+
alignItems: 'center',
|
|
172
|
+
justifyContent: 'center',
|
|
173
|
+
height: '100%',
|
|
174
|
+
width: 7,
|
|
175
|
+
alignSelf: 'center',
|
|
176
|
+
gridRow: 1,
|
|
177
|
+
gridColumn: 1,
|
|
178
|
+
cursor: 'col-resize',
|
|
179
|
+
borderRadius: 4,
|
|
180
|
+
transition: 'background-color 0.2s, visibility 0.2s, opacity 0.2s',
|
|
181
|
+
'&:hover': {
|
|
182
|
+
background: "var(--ds-background-selected, #E9F2FF)",
|
|
183
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
184
|
+
'.pm-breakout-resize-handle-inner': {
|
|
185
|
+
background: "var(--ds-border-focused, #388BFF)"
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
190
|
+
'.pm-breakout-resize-handle-left': {
|
|
191
|
+
justifySelf: 'start',
|
|
192
|
+
left: -20
|
|
193
|
+
},
|
|
194
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
195
|
+
'.pm-breakout-resize-handle-right': {
|
|
196
|
+
justifySelf: 'end',
|
|
197
|
+
right: -20
|
|
198
|
+
},
|
|
199
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
200
|
+
'.pm-breakout-resize-handle-inner': {
|
|
201
|
+
minWidth: 3,
|
|
202
|
+
// copied from resizeStyles.clamped
|
|
203
|
+
height: 'clamp(27px, calc(100% - 32px), 96px)',
|
|
204
|
+
background: "var(--ds-border, #091E4224)",
|
|
205
|
+
borderRadius: 6,
|
|
206
|
+
// sticky styles
|
|
207
|
+
position: 'sticky',
|
|
208
|
+
top: "var(--ds-space-150, 12px)",
|
|
209
|
+
bottom: "var(--ds-space-150, 12px)"
|
|
210
|
+
}
|
|
211
|
+
});
|