@atlaskit/editor-core 207.2.1 → 207.4.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 +33 -0
- package/dist/cjs/presets/default.js +8 -0
- package/dist/cjs/ui/Appearance/Chromeless.js +27 -11
- package/dist/cjs/ui/Appearance/Comment/Comment.js +25 -5
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +26 -4
- package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/cjs/ui/ContentStyles/layout.js +2 -2
- package/dist/cjs/ui/ContextPanel/index.js +10 -4
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +5 -3
- package/dist/cjs/ui/EditorContentContainer/styles/annotationStyles.js +45 -0
- package/dist/cjs/ui/EditorContentContainer/styles/embedCardStyles.js +34 -0
- package/dist/cjs/ui/EditorContentContainer/styles/mediaStyles.js +230 -0
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/presets/default.js +8 -0
- package/dist/es2019/ui/Appearance/Chromeless.js +28 -10
- package/dist/es2019/ui/Appearance/Comment/Comment.js +24 -3
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +24 -2
- package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/es2019/ui/ContentStyles/layout.js +3 -2
- package/dist/es2019/ui/ContextPanel/index.js +11 -5
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +8 -7
- package/dist/es2019/ui/EditorContentContainer/styles/annotationStyles.js +47 -0
- package/dist/es2019/ui/EditorContentContainer/styles/embedCardStyles.js +27 -0
- package/dist/es2019/ui/EditorContentContainer/styles/mediaStyles.js +357 -0
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/presets/default.js +8 -0
- package/dist/esm/ui/Appearance/Chromeless.js +28 -12
- package/dist/esm/ui/Appearance/Comment/Comment.js +26 -6
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +27 -5
- package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +2 -2
- package/dist/esm/ui/ContentStyles/layout.js +2 -2
- package/dist/esm/ui/ContextPanel/index.js +11 -5
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +6 -4
- package/dist/esm/ui/EditorContentContainer/styles/annotationStyles.js +37 -0
- package/dist/esm/ui/EditorContentContainer/styles/embedCardStyles.js +27 -0
- package/dist/esm/ui/EditorContentContainer/styles/mediaStyles.js +224 -0
- 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/Appearance/Chromeless.d.ts +0 -4
- package/dist/types/ui/Appearance/FullPage/FullPage.d.ts +1 -1
- package/dist/types/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +1 -1
- package/dist/types/ui/EditorContentContainer/styles/annotationStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/embedCardStyles.d.ts +1 -0
- package/dist/types/ui/EditorContentContainer/styles/mediaStyles.d.ts +1 -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/Appearance/Chromeless.d.ts +0 -4
- package/dist/types-ts4.5/ui/Appearance/FullPage/FullPage.d.ts +1 -1
- package/dist/types-ts4.5/ui/Appearance/FullPage/getEditorViewModeSync.d.ts +1 -1
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/annotationStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/embedCardStyles.d.ts +1 -0
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/mediaStyles.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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
|
+
})));
|
|
@@ -39,6 +39,8 @@ import { isFullPage as fullPageCheck } from '../utils/is-full-page';
|
|
|
39
39
|
/**
|
|
40
40
|
* Note: The order that presets are added determines
|
|
41
41
|
* their placement in the editor toolbar
|
|
42
|
+
* @param options
|
|
43
|
+
* @example
|
|
42
44
|
*/
|
|
43
45
|
export function createDefaultPreset(options) {
|
|
44
46
|
var _options$featureFlags, _options$featureFlags2;
|
|
@@ -69,6 +71,12 @@ export function createDefaultPreset(options) {
|
|
|
69
71
|
}]).add([codeBlockPlugin, options.codeBlock]);
|
|
70
72
|
return preset;
|
|
71
73
|
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
*
|
|
77
|
+
* @param props
|
|
78
|
+
* @example
|
|
79
|
+
*/
|
|
72
80
|
export function useDefaultPreset(props) {
|
|
73
81
|
const preset = createDefaultPreset(props);
|
|
74
82
|
return [preset];
|
|
@@ -7,7 +7,8 @@ import React, { Fragment } from 'react';
|
|
|
7
7
|
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
10
|
+
import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
11
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
11
12
|
import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
|
|
12
13
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
13
14
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -44,6 +45,14 @@ ContentArea.displayName = 'ContentArea';
|
|
|
44
45
|
const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true, {
|
|
45
46
|
exposure: true
|
|
46
47
|
}), EditorContentContainer, ContentArea);
|
|
48
|
+
const useEditorViewModePluginState = sharedPluginStateHookMigratorFactory(pluginInjectionApi => {
|
|
49
|
+
const {
|
|
50
|
+
editorViewModeState
|
|
51
|
+
} = useSharedPluginState(pluginInjectionApi, ['editorViewMode']);
|
|
52
|
+
return editorViewModeState === null || editorViewModeState === void 0 ? void 0 : editorViewModeState.mode;
|
|
53
|
+
}, pluginInjectionApi => {
|
|
54
|
+
return useSharedPluginStateSelector(pluginInjectionApi, 'editorViewMode.mode');
|
|
55
|
+
});
|
|
47
56
|
|
|
48
57
|
/**
|
|
49
58
|
* Render the editor in a chromeless appearance.
|
|
@@ -78,9 +87,7 @@ export default class Editor extends React.Component {
|
|
|
78
87
|
featureFlags
|
|
79
88
|
} = this.props;
|
|
80
89
|
const maxContentSizeReached = Boolean(maxContentSize === null || maxContentSize === void 0 ? void 0 : maxContentSize.maxContentSizeReached);
|
|
81
|
-
const
|
|
82
|
-
editorViewModeState
|
|
83
|
-
} = useSharedPluginState(this.props.editorAPI, ['editorViewMode']);
|
|
90
|
+
const editorViewMode = useEditorViewModePluginState(this.props.editorAPI);
|
|
84
91
|
return jsx(WithFlash, {
|
|
85
92
|
animate: maxContentSizeReached
|
|
86
93
|
}, jsx("div", {
|
|
@@ -102,7 +109,7 @@ export default class Editor extends React.Component {
|
|
|
102
109
|
, {
|
|
103
110
|
className: "ak-editor-content-area",
|
|
104
111
|
featureFlags: featureFlags,
|
|
105
|
-
viewMode:
|
|
112
|
+
viewMode: editorViewMode,
|
|
106
113
|
appearance: this.appearance
|
|
107
114
|
}, customContentComponents && 'before' in customContentComponents ? customContentComponents.before : customContentComponents, jsx(PluginSlot, {
|
|
108
115
|
editorView: editorView,
|
|
@@ -122,10 +129,6 @@ export default class Editor extends React.Component {
|
|
|
122
129
|
}), editorDOMElement, customContentComponents && 'after' in customContentComponents ? customContentComponents.after : null)));
|
|
123
130
|
});
|
|
124
131
|
}
|
|
125
|
-
/**
|
|
126
|
-
*
|
|
127
|
-
* @example
|
|
128
|
-
*/
|
|
129
132
|
render() {
|
|
130
133
|
return jsx(RenderWithPluginState, {
|
|
131
134
|
editorAPI: this.props.editorAPI,
|
|
@@ -134,13 +137,28 @@ export default class Editor extends React.Component {
|
|
|
134
137
|
}
|
|
135
138
|
}
|
|
136
139
|
_defineProperty(Editor, "displayName", 'ChromelessEditorAppearance');
|
|
140
|
+
const useMaxContentSizePluginState = sharedPluginStateHookMigratorFactory(pluginInjectionApi => {
|
|
141
|
+
const {
|
|
142
|
+
maxContentSizeState
|
|
143
|
+
} = useSharedPluginState(pluginInjectionApi, ['maxContentSize']);
|
|
144
|
+
return {
|
|
145
|
+
maxContentSizeState
|
|
146
|
+
};
|
|
147
|
+
}, pluginInjectionApi => {
|
|
148
|
+
const maxContentSizeReached = useSharedPluginStateSelector(pluginInjectionApi, 'maxContentSize.maxContentSizeReached');
|
|
149
|
+
return {
|
|
150
|
+
maxContentSizeState: maxContentSizeReached === undefined ? undefined : {
|
|
151
|
+
maxContentSizeReached
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
});
|
|
137
155
|
function RenderWithPluginState({
|
|
138
156
|
renderChrome,
|
|
139
157
|
editorAPI
|
|
140
158
|
}) {
|
|
141
159
|
const {
|
|
142
160
|
maxContentSizeState
|
|
143
|
-
} =
|
|
161
|
+
} = useMaxContentSizePluginState(editorAPI);
|
|
144
162
|
return jsx(Fragment, null, renderChrome({
|
|
145
163
|
maxContentSize: maxContentSizeState
|
|
146
164
|
}));
|
|
@@ -10,11 +10,12 @@ import classnames from 'classnames';
|
|
|
10
10
|
import { useIntl } from 'react-intl-next';
|
|
11
11
|
import ButtonGroup from '@atlaskit/button/button-group';
|
|
12
12
|
import Button from '@atlaskit/button/new';
|
|
13
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
13
|
+
import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
14
14
|
import messages from '@atlaskit/editor-common/messages';
|
|
15
15
|
import { GRID_GUTTER } from '@atlaskit/editor-common/styles';
|
|
16
16
|
import { WidthConsumer, WidthProvider } from '@atlaskit/editor-common/ui';
|
|
17
17
|
import { ToolbarArrowKeyNavigationProvider } from '@atlaskit/editor-common/ui-menu';
|
|
18
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
18
19
|
import { tableCommentEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
|
|
19
20
|
import { akEditorMobileBreakoutPoint } from '@atlaskit/editor-shared-styles';
|
|
20
21
|
import { componentWithCondition } from '@atlaskit/platform-feature-flags-react';
|
|
@@ -79,16 +80,36 @@ const appearance = 'comment';
|
|
|
79
80
|
const EditorContainer = componentWithCondition(() => editorExperiment('platform_editor_core_static_emotion', true, {
|
|
80
81
|
exposure: true
|
|
81
82
|
}), EditorContentContainer, ContentArea);
|
|
83
|
+
const useCommentEditorPluginsStates = sharedPluginStateHookMigratorFactory(pluginInjectionApi => {
|
|
84
|
+
return useSharedPluginState(pluginInjectionApi, ['maxContentSize', 'primaryToolbar', 'editorViewMode']);
|
|
85
|
+
}, pluginInjectionApi => {
|
|
86
|
+
const maxContentSizeReached = useSharedPluginStateSelector(pluginInjectionApi, 'maxContentSize.maxContentSizeReached');
|
|
87
|
+
const primaryToolbarComponents = useSharedPluginStateSelector(pluginInjectionApi, 'primaryToolbar.components');
|
|
88
|
+
const editorViewMode = useSharedPluginStateSelector(pluginInjectionApi, 'editorViewMode.mode');
|
|
89
|
+
return {
|
|
90
|
+
maxContentSizeState: maxContentSizeReached === undefined ? undefined : {
|
|
91
|
+
maxContentSizeReached
|
|
92
|
+
},
|
|
93
|
+
primaryToolbarState: !primaryToolbarComponents ? undefined : {
|
|
94
|
+
components: primaryToolbarComponents
|
|
95
|
+
},
|
|
96
|
+
editorViewModeState: !editorViewMode ? undefined : {
|
|
97
|
+
mode: editorViewMode
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
});
|
|
82
101
|
export const CommentEditorWithIntl = props => {
|
|
83
102
|
const {
|
|
84
103
|
editorAPI
|
|
85
104
|
} = props;
|
|
86
105
|
const {
|
|
87
|
-
mediaState,
|
|
88
106
|
maxContentSizeState,
|
|
89
107
|
primaryToolbarState,
|
|
90
108
|
editorViewModeState
|
|
91
|
-
} =
|
|
109
|
+
} = useCommentEditorPluginsStates(editorAPI);
|
|
110
|
+
const {
|
|
111
|
+
mediaState
|
|
112
|
+
} = useSharedPluginState(editorAPI, ['media']);
|
|
92
113
|
const intl = useIntl();
|
|
93
114
|
const {
|
|
94
115
|
editorDOMElement,
|
|
@@ -7,7 +7,7 @@ import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { browser } from '@atlaskit/editor-common/browser';
|
|
10
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
10
|
+
import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
11
11
|
import { ContextPanelWidthProvider } from '@atlaskit/editor-common/ui';
|
|
12
12
|
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
13
13
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
@@ -49,6 +49,28 @@ const hasCustomComponents = components => {
|
|
|
49
49
|
}
|
|
50
50
|
return true;
|
|
51
51
|
};
|
|
52
|
+
const useFullPageEditorPluginsStates = sharedPluginStateHookMigratorFactory(pluginInjectionApi => {
|
|
53
|
+
return useSharedPluginState(pluginInjectionApi, ['editorViewMode', 'primaryToolbar', 'interaction']);
|
|
54
|
+
}, pluginInjectionApi => {
|
|
55
|
+
const primaryToolbarComponents = useSharedPluginStateSelector(pluginInjectionApi, 'primaryToolbar.components');
|
|
56
|
+
const editorViewMode = useSharedPluginStateSelector(pluginInjectionApi, 'editorViewMode.mode');
|
|
57
|
+
const showTopToolbar = useSharedPluginStateSelector(pluginInjectionApi, 'editorViewMode._showTopToolbar');
|
|
58
|
+
const hasHadInteraction = useSharedPluginStateSelector(pluginInjectionApi, 'interaction.hasHadInteraction');
|
|
59
|
+
const interactionState = useSharedPluginStateSelector(pluginInjectionApi, 'interaction.interactionState');
|
|
60
|
+
return {
|
|
61
|
+
primaryToolbarState: !primaryToolbarComponents ? undefined : {
|
|
62
|
+
components: primaryToolbarComponents
|
|
63
|
+
},
|
|
64
|
+
editorViewModeState: !editorViewMode ? undefined : {
|
|
65
|
+
mode: editorViewMode,
|
|
66
|
+
_showTopToolbar: showTopToolbar
|
|
67
|
+
},
|
|
68
|
+
interactionState: hasHadInteraction === undefined || interactionState === undefined ? undefined : {
|
|
69
|
+
hasHadInteraction,
|
|
70
|
+
interactionState
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
});
|
|
52
74
|
export const FullPageEditor = props => {
|
|
53
75
|
var _scrollContentContain, _scrollContentContain2, _scrollContentContain3, _scrollContentContain4, _scrollContentContain5, _wrapperElementRef$cu;
|
|
54
76
|
const wrapperElementRef = useMemo(() => props.innerRef, [props.innerRef]);
|
|
@@ -59,7 +81,7 @@ export const FullPageEditor = props => {
|
|
|
59
81
|
editorViewModeState,
|
|
60
82
|
primaryToolbarState,
|
|
61
83
|
interactionState
|
|
62
|
-
} =
|
|
84
|
+
} = useFullPageEditorPluginsStates(editorAPI);
|
|
63
85
|
const viewMode = getEditorViewMode(editorViewModeState, props.preset);
|
|
64
86
|
const hasHadInteraction = fg('platform_editor_interaction_api_refactor') ? (interactionState === null || interactionState === void 0 ? void 0 : interactionState.interactionState) !== 'hasNotHadInteraction' : Boolean(interactionState === null || interactionState === void 0 ? void 0 : interactionState.hasHadInteraction);
|
|
65
87
|
let toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking');
|
|
@@ -9,7 +9,7 @@ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
|
|
10
10
|
const SWOOP_ANIMATION = `0.5s ${akEditorSwoopCubicBezier}`;
|
|
11
11
|
const getTotalPadding = () => akEditorGutterPaddingDynamic() * 2;
|
|
12
|
-
const
|
|
12
|
+
const AK_NESTED_DND_GUTTER_OFFSET = 8;
|
|
13
13
|
|
|
14
14
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
15
15
|
export const fullPageEditorWrapper = css({
|
|
@@ -114,7 +114,7 @@ const editorContentAreaContainerStyle = () => css({
|
|
|
114
114
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
115
115
|
'[data-layout-section]': {
|
|
116
116
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
|
|
117
|
-
maxWidth: `calc(100% + ${(akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ?
|
|
117
|
+
maxWidth: `calc(100% + ${(akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? AK_NESTED_DND_GUTTER_OFFSET : 0)) * 2}px)`
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
});
|
|
@@ -13,7 +13,7 @@ import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/cons
|
|
|
13
13
|
import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, akEditorSwoopCubicBezier, akLayoutGutterOffset, getSelectionStyles, gridMediumMaxWidth, SelectionStyle } from '@atlaskit/editor-shared-styles';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
16
|
-
const
|
|
16
|
+
const AK_NESTED_DND_GUTTER_OFFSET = 8;
|
|
17
17
|
const firstNodeWithNotMarginTop = () => fg('platform_editor_nested_dnd_styles_changes') ?
|
|
18
18
|
// eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
|
|
19
19
|
css`
|
|
@@ -283,7 +283,8 @@ export const layoutStyles = viewMode => css`
|
|
|
283
283
|
/* Ignored via go/ees007
|
|
284
284
|
TODO: Migrate away from gridSize
|
|
285
285
|
Recommendation: Replace directly with 7px */
|
|
286
|
-
margin: ${"var(--ds-space-100, 8px)"} -${akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ?
|
|
286
|
+
margin: ${"var(--ds-space-100, 8px)"} -${akLayoutGutterOffset + (fg('platform_editor_nested_dnd_styles_changes') ? AK_NESTED_DND_GUTTER_OFFSET : 0)}px
|
|
287
|
+
0;
|
|
287
288
|
transition: border-color 0.3s ${akEditorSwoopCubicBezier};
|
|
288
289
|
cursor: ${viewMode === 'view' ? 'default' : 'pointer'};
|
|
289
290
|
|
|
@@ -9,8 +9,9 @@ import React from 'react';
|
|
|
9
9
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import Transition from 'react-transition-group/Transition';
|
|
12
|
-
import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
12
|
+
import { sharedPluginStateHookMigratorFactory, useSharedPluginState } from '@atlaskit/editor-common/hooks';
|
|
13
13
|
import { ContextPanelConsumer } from '@atlaskit/editor-common/ui';
|
|
14
|
+
import { useSharedPluginStateSelector } from '@atlaskit/editor-common/use-shared-plugin-state-selector';
|
|
14
15
|
import { akEditorContextPanelWidth, akEditorSwoopCubicBezier } from '@atlaskit/editor-shared-styles';
|
|
15
16
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
16
17
|
const ANIM_SPEED_MS = 500;
|
|
@@ -151,12 +152,17 @@ export class SwappableContentArea extends React.PureComponent {
|
|
|
151
152
|
});
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
|
-
|
|
155
|
-
var _contextPanelState$co;
|
|
155
|
+
const useContextPanelSharedState = sharedPluginStateHookMigratorFactory(pluginInjectionApi => {
|
|
156
156
|
const {
|
|
157
157
|
contextPanelState
|
|
158
|
-
} = useSharedPluginState(
|
|
159
|
-
|
|
158
|
+
} = useSharedPluginState(pluginInjectionApi, ['contextPanel']);
|
|
159
|
+
return contextPanelState === null || contextPanelState === void 0 ? void 0 : contextPanelState.contents;
|
|
160
|
+
}, pluginInjectionApi => {
|
|
161
|
+
return useSharedPluginStateSelector(pluginInjectionApi, 'contextPanel.contents');
|
|
162
|
+
});
|
|
163
|
+
export function ContextPanel(props) {
|
|
164
|
+
const contextPanelContents = useContextPanelSharedState(props.editorAPI);
|
|
165
|
+
const firstContent = contextPanelContents && contextPanelContents.find(Boolean);
|
|
160
166
|
return (
|
|
161
167
|
// Ignored via go/ees005
|
|
162
168
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
@@ -15,7 +15,7 @@ import { EmojiSharedCssClassName, defaultEmojiHeight } from '@atlaskit/editor-co
|
|
|
15
15
|
import { MentionSharedCssClassName } from '@atlaskit/editor-common/mention';
|
|
16
16
|
import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
17
17
|
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
18
|
-
import { CodeBlockSharedCssClassName, GRID_GUTTER,
|
|
18
|
+
import { CodeBlockSharedCssClassName, GRID_GUTTER, SmartCardSharedCssClassName, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, expandClassNames, getSmartCardSharedStyles, gridStyles, indentationSharedStyles, listsSharedStyles, paragraphSharedStyles, resizerStyles, pragmaticResizerStyles, shadowSharedStyle, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
|
|
19
19
|
import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
|
|
20
20
|
import { findReplaceStyles } from '@atlaskit/editor-plugins/find-replace/styles';
|
|
21
21
|
import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
|
|
@@ -31,14 +31,16 @@ import { codeBlockStyles } from '../ContentStyles/code-block';
|
|
|
31
31
|
import { dateStyles, dateVanillaStyles } from '../ContentStyles/date';
|
|
32
32
|
import { expandStyles } from '../ContentStyles/expand';
|
|
33
33
|
import { extensionStyles } from '../ContentStyles/extension';
|
|
34
|
-
import { mediaStyles } from '../ContentStyles/media';
|
|
35
34
|
import { panelStyles } from '../ContentStyles/panel';
|
|
36
35
|
import { statusStyles, vanillaStatusStyles } from '../ContentStyles/status';
|
|
37
36
|
import { taskDecisionStyles, vanillaTaskDecisionIconWithoutVisualRefresh as vanillaDecisionIconWithoutVisualRefresh, vanillaTaskDecisionIconWithVisualRefresh as vanillaDecisionIconWithVisualRefresh, vanillaTaskDecisionStyles as vanillaDecisionStyles, vanillaTaskItemStyles } from '../ContentStyles/tasks-and-decisions';
|
|
38
37
|
import { aiPanelBaseStyles, aiPanelDarkStyles } from './styles/ai-panel';
|
|
38
|
+
import { annotationStyles } from './styles/annotationStyles';
|
|
39
39
|
import { backgroundColorStyles } from './styles/backgroundColorStyles';
|
|
40
|
+
import { embedCardStyles } from './styles/embedCardStyles';
|
|
40
41
|
import { layoutBaseStyles, layoutViewStyles } from './styles/layout';
|
|
41
42
|
import { linkStyles, linkStylesOld } from './styles/link';
|
|
43
|
+
import { mediaStyles } from './styles/mediaStyles';
|
|
42
44
|
import { ruleStyles } from './styles/rule';
|
|
43
45
|
const vanillaMentionsStyles = css({
|
|
44
46
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
|
|
@@ -405,7 +407,7 @@ const contentStyles = () => css`
|
|
|
405
407
|
|
|
406
408
|
${ruleStyles}
|
|
407
409
|
|
|
408
|
-
${mediaStyles
|
|
410
|
+
${mediaStyles}
|
|
409
411
|
|
|
410
412
|
${fg('confluence_team_presence_scroll_to_pointer') ? telepointerStyle : telepointerStyleWithInitialOnly}
|
|
411
413
|
${gapCursorStyles};
|
|
@@ -467,7 +469,7 @@ const contentStyles = () => css`
|
|
|
467
469
|
|
|
468
470
|
${editorExperiment('platform_editor_vanilla_dom', true) ? vanillaStatusStyles() : null}
|
|
469
471
|
|
|
470
|
-
${
|
|
472
|
+
${annotationStyles}
|
|
471
473
|
|
|
472
474
|
${smartCardStyles()}
|
|
473
475
|
|
|
@@ -477,7 +479,7 @@ const contentStyles = () => css`
|
|
|
477
479
|
|
|
478
480
|
${dateStyles}
|
|
479
481
|
|
|
480
|
-
${embedCardStyles
|
|
482
|
+
${embedCardStyles}
|
|
481
483
|
|
|
482
484
|
${unsupportedStyles}
|
|
483
485
|
|
|
@@ -537,8 +539,7 @@ const contentStyles = () => css`
|
|
|
537
539
|
clear: both;
|
|
538
540
|
}
|
|
539
541
|
|
|
540
|
-
.hyperlink-floating-toolbar
|
|
541
|
-
.${MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT} {
|
|
542
|
+
.hyperlink-floating-toolbar {
|
|
542
543
|
padding: 0;
|
|
543
544
|
}
|
|
544
545
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { css } from '@emotion/react'; // eslint-disable-line @atlaskit/ui-styling-standard/use-compiled
|
|
2
|
+
|
|
3
|
+
import { AnnotationSharedClassNames } from '@atlaskit/editor-common/styles';
|
|
4
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
5
|
+
export const annotationStyles = css({
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
7
|
+
'.ProseMirror': {
|
|
8
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
9
|
+
[`.${AnnotationSharedClassNames.blur}, .${AnnotationSharedClassNames.focus}, .${AnnotationSharedClassNames.draft}, .${AnnotationSharedClassNames.hover}`]: {
|
|
10
|
+
borderBottom: '2px solid transparent',
|
|
11
|
+
cursor: 'pointer',
|
|
12
|
+
padding: '1px 0 2px',
|
|
13
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
14
|
+
'&:has(.card), &:has([data-inline-card])': {
|
|
15
|
+
padding: '5px 0 3px 0'
|
|
16
|
+
},
|
|
17
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
18
|
+
'&:has(.date-lozenger-container)': {
|
|
19
|
+
paddingTop: "var(--ds-space-025, 2px)"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
23
|
+
[`.${AnnotationSharedClassNames.focus}`]: {
|
|
24
|
+
background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
|
|
25
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
26
|
+
boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
|
|
27
|
+
},
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
29
|
+
[`.${AnnotationSharedClassNames.draft}`]: {
|
|
30
|
+
background: "var(--ds-background-accent-yellow-subtlest-pressed, #F5CD47)",
|
|
31
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
32
|
+
boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)",
|
|
33
|
+
cursor: 'initial'
|
|
34
|
+
},
|
|
35
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
36
|
+
[`.${AnnotationSharedClassNames.blur}`]: {
|
|
37
|
+
background: "var(--ds-background-accent-yellow-subtlest, #FFF7D6)",
|
|
38
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)"
|
|
39
|
+
},
|
|
40
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values,@atlaskit/ui-styling-standard/no-nested-selectors,@atlaskit/ui-styling-standard/no-unsafe-values
|
|
41
|
+
[`.${AnnotationSharedClassNames.hover}`]: {
|
|
42
|
+
background: "var(--ds-background-accent-yellow-subtlest-hovered, #F8E6A0)",
|
|
43
|
+
borderBottomColor: "var(--ds-border-accent-yellow, #B38600)",
|
|
44
|
+
boxShadow: "var(--ds-shadow-raised, 0px 1px 1px #091E4240, 0px 0px 1px #091E424f)"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
});
|