@atlaskit/editor-core 208.6.5 → 208.7.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 +21 -0
- package/dist/cjs/ui/Appearance/FullPage/FullPage.js +14 -16
- package/dist/cjs/ui/ContentStyles/index.js +1 -1
- package/dist/cjs/ui/EditorContentContainer/EditorContentContainer.js +4 -2
- package/dist/cjs/ui/EditorContentContainer/styles/findReplaceStyles.js +175 -3
- package/dist/cjs/version-wrapper.js +1 -1
- package/dist/es2019/ui/Appearance/FullPage/FullPage.js +14 -15
- package/dist/es2019/ui/ContentStyles/index.js +3 -2
- package/dist/es2019/ui/EditorContentContainer/EditorContentContainer.js +5 -3
- package/dist/es2019/ui/EditorContentContainer/styles/findReplaceStyles.js +226 -2
- package/dist/es2019/version-wrapper.js +1 -1
- package/dist/esm/ui/Appearance/FullPage/FullPage.js +14 -16
- package/dist/esm/ui/ContentStyles/index.js +3 -2
- package/dist/esm/ui/EditorContentContainer/EditorContentContainer.js +5 -3
- package/dist/esm/ui/EditorContentContainer/styles/findReplaceStyles.js +174 -2
- package/dist/esm/version-wrapper.js +1 -1
- package/dist/types/create-editor/create-universal-preset.d.ts +100 -5
- package/dist/types/presets/universal.d.ts +100 -5
- package/dist/types/presets/useUniversalPreset.d.ts +100 -5
- package/dist/types/ui/EditorContentContainer/styles/findReplaceStyles.d.ts +2 -1
- package/dist/types-ts4.5/create-editor/create-universal-preset.d.ts +125 -5
- package/dist/types-ts4.5/presets/universal.d.ts +125 -5
- package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +125 -5
- package/dist/types-ts4.5/ui/EditorContentContainer/styles/findReplaceStyles.d.ts +2 -1
- package/package.json +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-core
|
|
2
2
|
|
|
3
|
+
## 208.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#177157](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/177157)
|
|
8
|
+
[`6bcf8912217df`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6bcf8912217df) -
|
|
9
|
+
ED-27284 additional integration with user preference plugin
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies
|
|
14
|
+
|
|
15
|
+
## 208.6.6
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#179882](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/179882)
|
|
20
|
+
[`fe56fd0f3672a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fe56fd0f3672a) -
|
|
21
|
+
[ux] ED-28404 change find and replace match colours from yellow to magenta
|
|
22
|
+
- Updated dependencies
|
|
23
|
+
|
|
3
24
|
## 208.6.5
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -107,21 +107,19 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
107
107
|
var toolbarDocking = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(editorAPI, 'selectionToolbar.toolbarDocking', {
|
|
108
108
|
disabled: (0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin')
|
|
109
109
|
});
|
|
110
|
-
var
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
110
|
+
var _ref3 = (0, _useSharedPluginStateSelector.useSharedPluginStateSelector)(editorAPI, 'userPreferences.preferences', {
|
|
111
|
+
disabled: !(0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin')
|
|
112
|
+
}) || {},
|
|
113
|
+
toolbarDockingPosition = _ref3.toolbarDockingPosition;
|
|
114
|
+
if (!(0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin')) {
|
|
115
|
+
if (!toolbarDocking && (0, _platformFeatureFlags.fg)('platform_editor_controls_toolbar_ssr_fix')) {
|
|
116
|
+
var _editorAPI$selectionT, _editorAPI$selectionT2;
|
|
117
|
+
// This is a workaround for the rendering issue with the selection toolbar
|
|
118
|
+
// where using useSharedPluginStateSelector or useSharedPluginState the state are not
|
|
119
|
+
// available when the editor is first loaded. and cause the toolbar to blink.
|
|
120
|
+
var defaultDocking = props.__livePage ? 'none' : 'top';
|
|
121
|
+
toolbarDocking = (_editorAPI$selectionT = editorAPI === null || editorAPI === void 0 || (_editorAPI$selectionT2 = editorAPI.selectionToolbar) === null || _editorAPI$selectionT2 === void 0 || (_editorAPI$selectionT2 = _editorAPI$selectionT2.sharedState.currentState()) === null || _editorAPI$selectionT2 === void 0 ? void 0 : _editorAPI$selectionT2.toolbarDocking) !== null && _editorAPI$selectionT !== void 0 ? _editorAPI$selectionT : defaultDocking;
|
|
117
122
|
}
|
|
118
|
-
} else if (!toolbarDocking && (0, _platformFeatureFlags.fg)('platform_editor_controls_toolbar_ssr_fix')) {
|
|
119
|
-
var _editorAPI$selectionT, _editorAPI$selectionT2;
|
|
120
|
-
// This is a workaround for the rendering issue with the selection toolbar
|
|
121
|
-
// where using useSharedPluginStateSelector or useSharedPluginState the state are not
|
|
122
|
-
// available when the editor is first loaded. and cause the toolbar to blink.
|
|
123
|
-
var defaultDocking = props.__livePage ? 'none' : 'top';
|
|
124
|
-
toolbarDocking = (_editorAPI$selectionT = editorAPI === null || editorAPI === void 0 || (_editorAPI$selectionT2 = editorAPI.selectionToolbar) === null || _editorAPI$selectionT2 === void 0 || (_editorAPI$selectionT2 = _editorAPI$selectionT2.sharedState.currentState()) === null || _editorAPI$selectionT2 === void 0 ? void 0 : _editorAPI$selectionT2.toolbarDocking) !== null && _editorAPI$selectionT !== void 0 ? _editorAPI$selectionT : defaultDocking;
|
|
125
123
|
}
|
|
126
124
|
var primaryToolbarComponents = props.primaryToolbarComponents;
|
|
127
125
|
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
@@ -133,8 +131,8 @@ var FullPageEditor = exports.FullPageEditor = function FullPageEditor(props) {
|
|
|
133
131
|
exposure: true
|
|
134
132
|
})) {
|
|
135
133
|
if ((0, _platformFeatureFlags.fg)('platform_editor_use_preferences_plugin')) {
|
|
136
|
-
// need to check if the
|
|
137
|
-
if (
|
|
134
|
+
// need to check if the toolbarDockingPosition is set to 'none' or 'top'
|
|
135
|
+
if (toolbarDockingPosition === 'none') {
|
|
138
136
|
primaryToolbarComponents = [];
|
|
139
137
|
if (!hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
140
138
|
isEditorToolbarHidden = true;
|
|
@@ -173,7 +173,7 @@ var legacyContentStyles = function legacyContentStyles(props) {
|
|
|
173
173
|
exposure: false
|
|
174
174
|
}) && vanillaSelectionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
175
175
|
exposure: false
|
|
176
|
-
}) ? emojiStyles : reactEmojiStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? _styles3.
|
|
176
|
+
}) ? emojiStyles : reactEmojiStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? (0, _platformFeatureFlags.fg)('platform_editor_find_and_replace_magenta_match') ? _styles3.findReplaceStylesNewMagenta : _styles3.findReplaceStylesNewYellow : _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, _tasksAndDecisions.vanillaTaskItemStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
177
177
|
exposure: false
|
|
178
178
|
}) && _tasksAndDecisions.vanillaTaskDecisionStyles, (0, _experiments.editorExperiment)('platform_editor_vanilla_dom', true, {
|
|
179
179
|
exposure: false
|
|
@@ -189,9 +189,11 @@ var EditorContentContainer = /*#__PURE__*/_react.default.forwardRef(function (pr
|
|
|
189
189
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
190
190
|
_expandStyles.expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes,
|
|
191
191
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
192
|
-
(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _expandStyles.expandStylesMixin_fg_platform_visual_refresh_icons, (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ?
|
|
192
|
+
(0, _platformFeatureFlags.fg)('platform-visual-refresh-icons') && _expandStyles.expandStylesMixin_fg_platform_visual_refresh_icons, (0, _expValEquals.expValEquals)('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? (0, _platformFeatureFlags.fg)('platform_editor_find_and_replace_magenta_match') ?
|
|
193
193
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
194
|
-
_findReplaceStyles.
|
|
194
|
+
_findReplaceStyles.findReplaceStylesNewMagenta :
|
|
195
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
196
|
+
_findReplaceStyles.findReplaceStylesNewYellow :
|
|
195
197
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
196
198
|
_findReplaceStyles.findReplaceStyles,
|
|
197
199
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.findReplaceStylesNewYellow = exports.findReplaceStylesNewMagenta = exports.findReplaceStyles = void 0;
|
|
7
7
|
var _react = require("@emotion/react");
|
|
8
8
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
9
9
|
|
|
@@ -22,7 +22,7 @@ var findReplaceStyles = exports.findReplaceStyles = (0, _react.css)({
|
|
|
22
22
|
});
|
|
23
23
|
|
|
24
24
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
25
|
-
var
|
|
25
|
+
var findReplaceStylesNewYellow = exports.findReplaceStylesNewYellow = (0, _react.css)({
|
|
26
26
|
/** Text match styles */
|
|
27
27
|
|
|
28
28
|
/** Light mode */
|
|
@@ -164,7 +164,6 @@ var findReplaceStylesNew = exports.findReplaceStylesNew = (0, _react.css)({
|
|
|
164
164
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
165
165
|
'.search-match-expand-title > .ak-editor-expand__title-container > .ak-editor-expand__input-container': {
|
|
166
166
|
borderRadius: "var(--ds-space-050, 4px)",
|
|
167
|
-
padding: "var(--ds-space-050, 4px)".concat(" 0"),
|
|
168
167
|
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-subtler-pressed, #E2B203)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-yellow-subtler, #F8E6A0)", "\n\t\t"),
|
|
169
168
|
backgroundColor: "var(--ds-background-accent-yellow-subtler, #F8E6A0)",
|
|
170
169
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
@@ -193,4 +192,177 @@ var findReplaceStylesNew = exports.findReplaceStylesNew = (0, _react.css)({
|
|
|
193
192
|
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-yellow-bolder, #946F00)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)", "\n\t\t"),
|
|
194
193
|
backgroundColor: "var(--ds-background-accent-yellow-bolder-hovered, #7F5F01)"
|
|
195
194
|
}
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles
|
|
198
|
+
var findReplaceStylesNewMagenta = exports.findReplaceStylesNewMagenta = (0, _react.css)({
|
|
199
|
+
/** Text match styles */
|
|
200
|
+
|
|
201
|
+
/** Light mode */
|
|
202
|
+
|
|
203
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
204
|
+
'.search-match-text': {
|
|
205
|
+
borderRadius: "var(--ds-space-050, 4px)",
|
|
206
|
+
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", "\n\t\t"),
|
|
207
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
208
|
+
backgroundColor: "var(--ds-background-accent-magenta-subtler, #FDD0EC)".concat(" !important"),
|
|
209
|
+
color: "var(--ds-text, #172B4D)"
|
|
210
|
+
},
|
|
211
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
212
|
+
'.search-match-text.selected-search-match': {
|
|
213
|
+
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", "\n\t\t"),
|
|
214
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
215
|
+
backgroundColor: "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)".concat(" !important")
|
|
216
|
+
},
|
|
217
|
+
/** Dark mode */
|
|
218
|
+
|
|
219
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
220
|
+
'.search-match-text.search-match-dark': {
|
|
221
|
+
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", "\n\t\t"),
|
|
222
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
223
|
+
backgroundColor: "var(--ds-background-accent-magenta-bolder-pressed, #50253F)".concat(" !important"),
|
|
224
|
+
color: "var(--ds-text-inverse, #FFFFFF)"
|
|
225
|
+
},
|
|
226
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
227
|
+
'.search-match-text.selected-search-match.search-match-dark': {
|
|
228
|
+
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", "\n\t\t"),
|
|
229
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
230
|
+
backgroundColor: "var(--ds-background-accent-magenta-bolder-hovered, #943D73)".concat(" !important")
|
|
231
|
+
},
|
|
232
|
+
/** Block match styles */
|
|
233
|
+
|
|
234
|
+
/** Light mode */
|
|
235
|
+
|
|
236
|
+
/** Without node selection */
|
|
237
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
238
|
+
'.search-match-block': {
|
|
239
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
240
|
+
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
241
|
+
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", "\n\t\t\t")
|
|
242
|
+
},
|
|
243
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
244
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container>span': {
|
|
245
|
+
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-magenta-subtler, #FDD0EC)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-subtler-pressed, #E774BB)")
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
249
|
+
'.search-match-block.search-match-block-selected': {
|
|
250
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
251
|
+
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
252
|
+
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", "\n\t\t\t")
|
|
253
|
+
},
|
|
254
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
255
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container>span': {
|
|
256
|
+
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-subtler-pressed, #E774BB)")
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
/** With node selection */
|
|
260
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
261
|
+
'.search-match-block.ak-editor-selected-node': {
|
|
262
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
263
|
+
'.loader-wrapper>div::after': {
|
|
264
|
+
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
265
|
+
},
|
|
266
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
267
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container>span': {
|
|
268
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
269
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", " !important")
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
273
|
+
'.search-match-block.search-match-block-selected.ak-editor-selected-node': {
|
|
274
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
275
|
+
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
276
|
+
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
277
|
+
},
|
|
278
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
279
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container>span': {
|
|
280
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
281
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", " !important")
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
/** Dark mode */
|
|
285
|
+
/** Without node selection */
|
|
286
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
287
|
+
'.search-match-block.search-match-dark': {
|
|
288
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
289
|
+
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
290
|
+
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", "\n\t\t\t")
|
|
291
|
+
},
|
|
292
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
293
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container>span': {
|
|
294
|
+
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-magenta-bolder-pressed, #50253F)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-bolder, #AE4787)")
|
|
295
|
+
}
|
|
296
|
+
},
|
|
297
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
298
|
+
'.search-match-block.search-match-block-selected.search-match-dark': {
|
|
299
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
300
|
+
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
301
|
+
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", "\n\t\t\t")
|
|
302
|
+
},
|
|
303
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
304
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container>span': {
|
|
305
|
+
boxShadow: "0px 0px 0px 4px ".concat("var(--ds-background-accent-magenta-bolder-hovered, #943D73)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-bolder, #AE4787)")
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
/** With node selection */
|
|
309
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
310
|
+
'.search-match-block.search-match-dark.ak-editor-selected-node': {
|
|
311
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
312
|
+
'.loader-wrapper>div::after': {
|
|
313
|
+
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
314
|
+
},
|
|
315
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
316
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container>span': {
|
|
317
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
318
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-bolder, #AE4787)", " !important")
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
322
|
+
'.search-match-block.search-match-block-selected.search-match-dark.ak-editor-selected-node': {
|
|
323
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
324
|
+
'[data-smart-link-container="true"], .loader-wrapper>div::after': {
|
|
325
|
+
boxShadow: "\n\t\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\t\tinset 0 0 0 4px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", ",\n\t\t\t0 0 0 1px ", "var(--ds-border-selected, #0C66E4)", "\n\t\t\t")
|
|
326
|
+
},
|
|
327
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
328
|
+
'.loader-wrapper>a, .lozenge-wrapper, .editor-mention-primitive, .date-lozenger-container>span': {
|
|
329
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
330
|
+
boxShadow: "0 0 0 1px ".concat("var(--ds-border-selected, #0C66E4)", ", 0px 0px 0px 4px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", ", 0px 0px 0px 5px ", "var(--ds-background-accent-magenta-bolder, #AE4787)", " !important")
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
/** Expand title match styles */
|
|
334
|
+
|
|
335
|
+
/** Light mode */
|
|
336
|
+
|
|
337
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
338
|
+
'.search-match-expand-title > .ak-editor-expand__title-container > .ak-editor-expand__input-container': {
|
|
339
|
+
borderRadius: "var(--ds-space-050, 4px)",
|
|
340
|
+
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtler, #FDD0EC)", "\n\t\t"),
|
|
341
|
+
backgroundColor: "var(--ds-background-accent-magenta-subtler, #FDD0EC)",
|
|
342
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
343
|
+
'.ak-editor-expand__title-input': {
|
|
344
|
+
color: "var(--ds-text, #172B4D)"
|
|
345
|
+
}
|
|
346
|
+
},
|
|
347
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
348
|
+
'.search-match-expand-title.selected-search-match > .ak-editor-expand__title-container > .ak-editor-expand__input-container': {
|
|
349
|
+
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-subtler-pressed, #E774BB)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)", "\n\t\t"),
|
|
350
|
+
backgroundColor: "var(--ds-background-accent-magenta-subtlest-pressed, #F797D2)"
|
|
351
|
+
},
|
|
352
|
+
/** Dark mode */
|
|
353
|
+
|
|
354
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
355
|
+
'.search-match-expand-title.search-match-dark > .ak-editor-expand__title-container > .ak-editor-expand__input-container': {
|
|
356
|
+
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-pressed, #50253F)", "\n\t\t"),
|
|
357
|
+
backgroundColor: "var(--ds-background-accent-magenta-bolder-pressed, #50253F)",
|
|
358
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
359
|
+
'.ak-editor-expand__title-input': {
|
|
360
|
+
color: "var(--ds-text-inverse, #FFFFFF)"
|
|
361
|
+
}
|
|
362
|
+
},
|
|
363
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
|
|
364
|
+
'.search-match-expand-title.selected-search-match.search-match-dark > .ak-editor-expand__title-container > .ak-editor-expand__input-container': {
|
|
365
|
+
boxShadow: "\n\t\tinset 0 0 0 1px ".concat("var(--ds-background-accent-magenta-bolder, #AE4787)", ",\n\t\tinset 0 0 0 5px ", "var(--ds-background-accent-magenta-bolder-hovered, #943D73)", "\n\t\t"),
|
|
366
|
+
backgroundColor: "var(--ds-background-accent-magenta-bolder-hovered, #943D73)"
|
|
367
|
+
}
|
|
196
368
|
});
|
|
@@ -90,21 +90,20 @@ export const FullPageEditor = props => {
|
|
|
90
90
|
let toolbarDocking = useSharedPluginStateSelector(editorAPI, 'selectionToolbar.toolbarDocking', {
|
|
91
91
|
disabled: fg('platform_editor_use_preferences_plugin')
|
|
92
92
|
});
|
|
93
|
-
|
|
93
|
+
const {
|
|
94
|
+
toolbarDockingPosition
|
|
95
|
+
} = useSharedPluginStateSelector(editorAPI, 'userPreferences.preferences', {
|
|
94
96
|
disabled: !fg('platform_editor_use_preferences_plugin')
|
|
95
|
-
});
|
|
96
|
-
if (fg('platform_editor_use_preferences_plugin')) {
|
|
97
|
-
if (!
|
|
98
|
-
var _editorAPI$
|
|
99
|
-
|
|
97
|
+
}) || {};
|
|
98
|
+
if (!fg('platform_editor_use_preferences_plugin')) {
|
|
99
|
+
if (!toolbarDocking && fg('platform_editor_controls_toolbar_ssr_fix')) {
|
|
100
|
+
var _editorAPI$selectionT, _editorAPI$selectionT2, _editorAPI$selectionT3;
|
|
101
|
+
// This is a workaround for the rendering issue with the selection toolbar
|
|
102
|
+
// where using useSharedPluginStateSelector or useSharedPluginState the state are not
|
|
103
|
+
// available when the editor is first loaded. and cause the toolbar to blink.
|
|
104
|
+
const defaultDocking = props.__livePage ? 'none' : 'top';
|
|
105
|
+
toolbarDocking = (_editorAPI$selectionT = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$selectionT2 = editorAPI.selectionToolbar) === null || _editorAPI$selectionT2 === void 0 ? void 0 : (_editorAPI$selectionT3 = _editorAPI$selectionT2.sharedState.currentState()) === null || _editorAPI$selectionT3 === void 0 ? void 0 : _editorAPI$selectionT3.toolbarDocking) !== null && _editorAPI$selectionT !== void 0 ? _editorAPI$selectionT : defaultDocking;
|
|
100
106
|
}
|
|
101
|
-
} else if (!toolbarDocking && fg('platform_editor_controls_toolbar_ssr_fix')) {
|
|
102
|
-
var _editorAPI$selectionT, _editorAPI$selectionT2, _editorAPI$selectionT3;
|
|
103
|
-
// This is a workaround for the rendering issue with the selection toolbar
|
|
104
|
-
// where using useSharedPluginStateSelector or useSharedPluginState the state are not
|
|
105
|
-
// available when the editor is first loaded. and cause the toolbar to blink.
|
|
106
|
-
const defaultDocking = props.__livePage ? 'none' : 'top';
|
|
107
|
-
toolbarDocking = (_editorAPI$selectionT = editorAPI === null || editorAPI === void 0 ? void 0 : (_editorAPI$selectionT2 = editorAPI.selectionToolbar) === null || _editorAPI$selectionT2 === void 0 ? void 0 : (_editorAPI$selectionT3 = _editorAPI$selectionT2.sharedState.currentState()) === null || _editorAPI$selectionT3 === void 0 ? void 0 : _editorAPI$selectionT3.toolbarDocking) !== null && _editorAPI$selectionT !== void 0 ? _editorAPI$selectionT : defaultDocking;
|
|
108
107
|
}
|
|
109
108
|
let primaryToolbarComponents = props.primaryToolbarComponents;
|
|
110
109
|
if (Array.isArray(primaryToolbarState === null || primaryToolbarState === void 0 ? void 0 : primaryToolbarState.components) && Array.isArray(primaryToolbarComponents)) {
|
|
@@ -118,8 +117,8 @@ export const FullPageEditor = props => {
|
|
|
118
117
|
exposure: true
|
|
119
118
|
})) {
|
|
120
119
|
if (fg('platform_editor_use_preferences_plugin')) {
|
|
121
|
-
// need to check if the
|
|
122
|
-
if (
|
|
120
|
+
// need to check if the toolbarDockingPosition is set to 'none' or 'top'
|
|
121
|
+
if (toolbarDockingPosition === 'none') {
|
|
123
122
|
primaryToolbarComponents = [];
|
|
124
123
|
if (!hasCustomComponents(customPrimaryToolbarComponents)) {
|
|
125
124
|
isEditorToolbarHidden = true;
|
|
@@ -19,7 +19,7 @@ import { PanelSharedCssClassName } from '@atlaskit/editor-common/panel';
|
|
|
19
19
|
import { gapCursorStyles } from '@atlaskit/editor-common/selection';
|
|
20
20
|
import { CodeBlockSharedCssClassName, MediaSharedClassNames, SmartCardSharedCssClassName, annotationSharedStyles, backgroundColorStyles, blockMarksSharedStyles, codeBlockInListSafariFix, codeMarkSharedStyles, dateSharedStyle, embedCardStyles, expandClassNames, getSmartCardSharedStyles, gridStyles, indentationSharedStyles, linkSharedStyle, listsSharedStyles, paragraphSharedStyles, resizerStyles, pragmaticResizerStyles, pragmaticStylesLayoutFirstNodeResizeHandleFix, pragmaticResizerStylesForTooltip, ruleSharedStyles, shadowSharedStyle, smartCardSharedStyles, smartCardStyles, tasksAndDecisionsStyles, textColorStyles, unsupportedStyles, whitespaceSharedStyles } from '@atlaskit/editor-common/styles';
|
|
21
21
|
import { blocktypeStyles } from '@atlaskit/editor-plugins/block-type/styles';
|
|
22
|
-
import { findReplaceStyles,
|
|
22
|
+
import { findReplaceStyles, findReplaceStylesNewYellow, findReplaceStylesNewMagenta } from '@atlaskit/editor-plugins/find-replace/styles';
|
|
23
23
|
import { textHighlightStyle } from '@atlaskit/editor-plugins/paste-options-toolbar/styles';
|
|
24
24
|
import { placeholderTextStyles, placeholderTextStyles_fg_platform_editor_system_fake_text_highlight_colour } from '@atlaskit/editor-plugins/placeholder-text/styles';
|
|
25
25
|
import { SelectionStyle, akEditorCalculatedWideLayoutWidth, akEditorCalculatedWideLayoutWidthSmallViewport, akEditorDefaultLayoutWidth, akEditorDeleteBackgroundWithOpacity, akEditorDeleteBorder, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, akEditorSelectedBorderColor, akEditorSelectedBorderSize, akEditorSelectedNodeClassName, blockNodesVerticalMargin, editorFontSize, getSelectionStyles } from '@atlaskit/editor-shared-styles';
|
|
@@ -38,6 +38,7 @@ import { mediaStyles } from './media';
|
|
|
38
38
|
import { panelStyles } from './panel';
|
|
39
39
|
import { statusStyles, statusNodeStyles } from './status';
|
|
40
40
|
import { taskDecisionStyles, vanillaTaskDecisionIconWithoutVisualRefresh as vanillaDecisionIconWithoutVisualRefresh, vanillaTaskDecisionIconWithVisualRefresh as vanillaDecisionIconWithVisualRefresh, vanillaTaskDecisionStyles as vanillaDecisionStyles, vanillaTaskItemStyles } from './tasks-and-decisions';
|
|
41
|
+
|
|
41
42
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
|
|
42
43
|
export const linkStyles = css`
|
|
43
44
|
.ProseMirror {
|
|
@@ -438,7 +439,7 @@ const legacyContentStyles = props => css`
|
|
|
438
439
|
${dateSharedStyle}
|
|
439
440
|
${extensionStyles}
|
|
440
441
|
${expandStyles()}
|
|
441
|
-
${expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ?
|
|
442
|
+
${expValEqualsNoExposure('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? fg('platform_editor_find_and_replace_magenta_match') ? findReplaceStylesNewMagenta : findReplaceStylesNewYellow : findReplaceStyles}
|
|
442
443
|
${textHighlightStyle}
|
|
443
444
|
${taskDecisionStyles}
|
|
444
445
|
${vanillaTaskItemStyles}
|
|
@@ -31,7 +31,7 @@ import { embedCardStyles } from './styles/embedCardStyles';
|
|
|
31
31
|
import { reactEmojiStyles, vanillaEmojiStyles } from './styles/emoji';
|
|
32
32
|
import { expandStyles, expandStylesMixin_fg_platform_editor_nested_dnd_styles_changes, expandStylesMixin_fg_platform_visual_refresh_icons, expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes } from './styles/expandStyles';
|
|
33
33
|
import { extensionStyles } from './styles/extensionStyles';
|
|
34
|
-
import { findReplaceStyles,
|
|
34
|
+
import { findReplaceStyles, findReplaceStylesNewMagenta, findReplaceStylesNewYellow } from './styles/findReplaceStyles';
|
|
35
35
|
import { firstBlockNodeStyles } from './styles/firstBlockNodeStyles';
|
|
36
36
|
import { firstFloatingToolbarButtonStyles } from './styles/floatingToolbarStyles';
|
|
37
37
|
import { fullPageEditorStyles } from './styles/fullPageEditorStyles';
|
|
@@ -184,9 +184,11 @@ const EditorContentContainer = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
|
184
184
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
185
185
|
expandStylesMixin_without_fg_platform_editor_nested_dnd_styles_changes,
|
|
186
186
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
187
|
-
fg('platform-visual-refresh-icons') && expandStylesMixin_fg_platform_visual_refresh_icons, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ?
|
|
187
|
+
fg('platform-visual-refresh-icons') && expandStylesMixin_fg_platform_visual_refresh_icons, expValEquals('platform_editor_find_and_replace_improvements', 'isEnabled', true) ? fg('platform_editor_find_and_replace_magenta_match') ?
|
|
188
188
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
189
|
-
|
|
189
|
+
findReplaceStylesNewMagenta :
|
|
190
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
191
|
+
findReplaceStylesNewYellow :
|
|
190
192
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|
|
191
193
|
findReplaceStyles,
|
|
192
194
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values
|