@atlaskit/editor-plugin-block-controls 17.1.2 → 17.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 17.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`f745000fb169b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f745000fb169b) -
|
|
8
|
+
Permanently apply the first editor node margin fix and remove the `platform_editor_first_node_fix`
|
|
9
|
+
experiment.
|
|
10
|
+
- Updated dependencies
|
|
11
|
+
|
|
3
12
|
## 17.1.2
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
|
@@ -248,23 +248,6 @@ var globalStyles = function globalStyles() {
|
|
|
248
248
|
}
|
|
249
249
|
});
|
|
250
250
|
};
|
|
251
|
-
var topLevelNodeMarginStyles = (0, _react.css)({
|
|
252
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
253
|
-
'.ProseMirror': {
|
|
254
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
255
|
-
'> .ProseMirror-widget:first-child + .ProseMirror-gapcursor + *:not([data-layout-section="true"], [data-prosemirror-node-name="bodiedSyncBlock"]), > .ProseMirror-widget:first-child + *:not([data-layout-section="true"], [data-prosemirror-node-name="bodiedSyncBlock"])': {
|
|
256
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
257
|
-
marginTop: '0 !important'
|
|
258
|
-
},
|
|
259
|
-
// Reach through a font-size wrapper to zero the inner content margin (e.g. during drag when a
|
|
260
|
-
// drop target widget is inserted before the wrapper).
|
|
261
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
262
|
-
'> .ProseMirror-widget:first-child + .ProseMirror-widget + .fabric-editor-font-size > :is(p, h1, h2, h3, h4, h5, h6):first-child, > .ProseMirror-widget:first-child + .ProseMirror-gapcursor + .fabric-editor-font-size > :is(p, h1, h2, h3, h4, h5, h6):first-child': {
|
|
263
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
264
|
-
marginTop: '0 !important'
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
251
|
var withDividerInPanelStyleFix = (0, _react.css)((0, _defineProperty2.default)({}, "".concat(dividerBodiedInCustomPanelWithNoIconSelector), {
|
|
269
252
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
270
253
|
marginTop: '0 !important'
|
|
@@ -440,10 +423,7 @@ var GlobalStylesWrapper = exports.GlobalStylesWrapper = function GlobalStylesWra
|
|
|
440
423
|
exposure: true
|
|
441
424
|
}) ? (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined,
|
|
442
425
|
// platform_editor_controls note: this allows drag handles to render on empty lines
|
|
443
|
-
toolbarFlagsEnabled ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, (0, _experiments.editorExperiment)('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle,
|
|
444
|
-
// When `platform_editor_first_node_fix` is enabled, EditorContentContainer applies the
|
|
445
|
-
// equivalent rules (`firstNodeWidgetFixStyles`), so skip them here to avoid duplication.
|
|
446
|
-
(0, _expValEquals.expValEquals)('platform_editor_first_node_fix', 'isEnabled', true) ? undefined : topLevelNodeMarginStyles, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && (0, _expValEquals.expValEquals)('advanced_layouts', 'isEnabled', true) ? layoutColumnExtendedHoverZone : layoutColumnWithoutHoverZone, (0, _expValEquals.expValEquals)('platform_editor_controls_reliable_anchor', 'isEnabled', true) ?
|
|
426
|
+
toolbarFlagsEnabled ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, (0, _experiments.editorExperiment)('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle, (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && (0, _expValEquals.expValEquals)('advanced_layouts', 'isEnabled', true) ? layoutColumnExtendedHoverZone : layoutColumnWithoutHoverZone, (0, _expValEquals.expValEquals)('platform_editor_controls_reliable_anchor', 'isEnabled', true) ?
|
|
447
427
|
// dragAnchorStyles sets anchor-name on ALL nodes during drag (needed for drop target positioning).
|
|
448
428
|
// staticControlsAnchorStyles handles anchor-name via node decorations for non-drag state.
|
|
449
429
|
// shouldRenderAnchors guards both: only apply anchor styles on browsers that support CSS anchor positioning.
|
|
@@ -300,23 +300,6 @@ const globalStyles = () => css({
|
|
|
300
300
|
marginTop: '0 !important'
|
|
301
301
|
}
|
|
302
302
|
});
|
|
303
|
-
const topLevelNodeMarginStyles = css({
|
|
304
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
305
|
-
'.ProseMirror': {
|
|
306
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
307
|
-
'> .ProseMirror-widget:first-child + .ProseMirror-gapcursor + *:not([data-layout-section="true"], [data-prosemirror-node-name="bodiedSyncBlock"]), > .ProseMirror-widget:first-child + *:not([data-layout-section="true"], [data-prosemirror-node-name="bodiedSyncBlock"])': {
|
|
308
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
309
|
-
marginTop: '0 !important'
|
|
310
|
-
},
|
|
311
|
-
// Reach through a font-size wrapper to zero the inner content margin (e.g. during drag when a
|
|
312
|
-
// drop target widget is inserted before the wrapper).
|
|
313
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
314
|
-
'> .ProseMirror-widget:first-child + .ProseMirror-widget + .fabric-editor-font-size > :is(p, h1, h2, h3, h4, h5, h6):first-child, > .ProseMirror-widget:first-child + .ProseMirror-gapcursor + .fabric-editor-font-size > :is(p, h1, h2, h3, h4, h5, h6):first-child': {
|
|
315
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
316
|
-
marginTop: '0 !important'
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
});
|
|
320
303
|
const withDividerInPanelStyleFix = css({
|
|
321
304
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-values
|
|
322
305
|
[`${dividerBodiedInCustomPanelWithNoIconSelector}`]: {
|
|
@@ -528,10 +511,7 @@ export const GlobalStylesWrapper = ({
|
|
|
528
511
|
exposure: true
|
|
529
512
|
}) ? expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined,
|
|
530
513
|
// platform_editor_controls note: this allows drag handles to render on empty lines
|
|
531
|
-
toolbarFlagsEnabled ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle,
|
|
532
|
-
// When `platform_editor_first_node_fix` is enabled, EditorContentContainer applies the
|
|
533
|
-
// equivalent rules (`firstNodeWidgetFixStyles`), so skip them here to avoid duplication.
|
|
534
|
-
expValEquals('platform_editor_first_node_fix', 'isEnabled', true) ? undefined : topLevelNodeMarginStyles, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && expValEquals('advanced_layouts', 'isEnabled', true) ? layoutColumnExtendedHoverZone : layoutColumnWithoutHoverZone, expValEquals('platform_editor_controls_reliable_anchor', 'isEnabled', true) ?
|
|
514
|
+
toolbarFlagsEnabled ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && expValEquals('advanced_layouts', 'isEnabled', true) ? layoutColumnExtendedHoverZone : layoutColumnWithoutHoverZone, expValEquals('platform_editor_controls_reliable_anchor', 'isEnabled', true) ?
|
|
535
515
|
// dragAnchorStyles sets anchor-name on ALL nodes during drag (needed for drop target positioning).
|
|
536
516
|
// staticControlsAnchorStyles handles anchor-name via node decorations for non-drag state.
|
|
537
517
|
// shouldRenderAnchors guards both: only apply anchor styles on browsers that support CSS anchor positioning.
|
|
@@ -241,23 +241,6 @@ var globalStyles = function globalStyles() {
|
|
|
241
241
|
}
|
|
242
242
|
});
|
|
243
243
|
};
|
|
244
|
-
var topLevelNodeMarginStyles = css({
|
|
245
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
|
|
246
|
-
'.ProseMirror': {
|
|
247
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
248
|
-
'> .ProseMirror-widget:first-child + .ProseMirror-gapcursor + *:not([data-layout-section="true"], [data-prosemirror-node-name="bodiedSyncBlock"]), > .ProseMirror-widget:first-child + *:not([data-layout-section="true"], [data-prosemirror-node-name="bodiedSyncBlock"])': {
|
|
249
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
|
|
250
|
-
marginTop: '0 !important'
|
|
251
|
-
},
|
|
252
|
-
// Reach through a font-size wrapper to zero the inner content margin (e.g. during drag when a
|
|
253
|
-
// drop target widget is inserted before the wrapper).
|
|
254
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
|
|
255
|
-
'> .ProseMirror-widget:first-child + .ProseMirror-widget + .fabric-editor-font-size > :is(p, h1, h2, h3, h4, h5, h6):first-child, > .ProseMirror-widget:first-child + .ProseMirror-gapcursor + .fabric-editor-font-size > :is(p, h1, h2, h3, h4, h5, h6):first-child': {
|
|
256
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
257
|
-
marginTop: '0 !important'
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
});
|
|
261
244
|
var withDividerInPanelStyleFix = css(_defineProperty({}, "".concat(dividerBodiedInCustomPanelWithNoIconSelector), {
|
|
262
245
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
|
|
263
246
|
marginTop: '0 !important'
|
|
@@ -433,10 +416,7 @@ export var GlobalStylesWrapper = function GlobalStylesWrapper(_ref) {
|
|
|
433
416
|
exposure: true
|
|
434
417
|
}) ? expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined,
|
|
435
418
|
// platform_editor_controls note: this allows drag handles to render on empty lines
|
|
436
|
-
toolbarFlagsEnabled ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle,
|
|
437
|
-
// When `platform_editor_first_node_fix` is enabled, EditorContentContainer applies the
|
|
438
|
-
// equivalent rules (`firstNodeWidgetFixStyles`), so skip them here to avoid duplication.
|
|
439
|
-
expValEquals('platform_editor_first_node_fix', 'isEnabled', true) ? undefined : topLevelNodeMarginStyles, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && expValEquals('advanced_layouts', 'isEnabled', true) ? layoutColumnExtendedHoverZone : layoutColumnWithoutHoverZone, expValEquals('platform_editor_controls_reliable_anchor', 'isEnabled', true) ?
|
|
419
|
+
toolbarFlagsEnabled ? undefined : withInlineNodeStyle, withDeleteLinesStyleFix, withMediaSingleStyleFix, legacyBreakoutWideLayoutStyle, headingWithIndentationInLayoutStyleFix, editorExperiment('advanced_layouts', true) ? blockCardWithoutLayout : undefined, withDividerInPanelStyleFix, withFormatInLayoutStyleFix, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withRelativePosStyleNext : withRelativePosStyle, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? withAnchorNameZindexStyleNext : withAnchorNameZindexStyle, expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) && expValEquals('advanced_layouts', 'isEnabled', true) ? layoutColumnExtendedHoverZone : layoutColumnWithoutHoverZone, expValEquals('platform_editor_controls_reliable_anchor', 'isEnabled', true) ?
|
|
440
420
|
// dragAnchorStyles sets anchor-name on ALL nodes during drag (needed for drop target positioning).
|
|
441
421
|
// staticControlsAnchorStyles handles anchor-name via node decorations for non-drag state.
|
|
442
422
|
// shouldRenderAnchors guards both: only apply anchor styles on browsers that support CSS anchor positioning.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "17.1.
|
|
3
|
+
"version": "17.1.3",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@atlaskit/browser-apis": "^1.2.0",
|
|
24
24
|
"@atlaskit/button": "^25.2.0",
|
|
25
|
-
"@atlaskit/css": "^1.
|
|
25
|
+
"@atlaskit/css": "^1.1.0",
|
|
26
26
|
"@atlaskit/docs": "^12.2.0",
|
|
27
27
|
"@atlaskit/editor-plugin-accessibility-utils": "^16.0.0",
|
|
28
28
|
"@atlaskit/editor-plugin-analytics": "^16.0.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/editor-plugin-metrics": "^17.0.0",
|
|
35
35
|
"@atlaskit/editor-plugin-quick-insert": "^16.1.0",
|
|
36
36
|
"@atlaskit/editor-plugin-selection": "^16.0.0",
|
|
37
|
-
"@atlaskit/editor-plugin-show-diff": "^14.
|
|
37
|
+
"@atlaskit/editor-plugin-show-diff": "^14.1.0",
|
|
38
38
|
"@atlaskit/editor-plugin-toolbar": "^13.0.0",
|
|
39
39
|
"@atlaskit/editor-plugin-type-ahead": "^17.0.0",
|
|
40
40
|
"@atlaskit/editor-plugin-ui-control-registry": "^10.0.0",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/primitives": "^22.4.0",
|
|
56
56
|
"@atlaskit/section-message": "^10.1.0",
|
|
57
57
|
"@atlaskit/theme": "^28.1.0",
|
|
58
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
58
|
+
"@atlaskit/tmp-editor-statsig": "^163.0.0",
|
|
59
59
|
"@atlaskit/tokens": "^16.8.0",
|
|
60
60
|
"@atlaskit/tooltip": "^24.2.0",
|
|
61
61
|
"@babel/runtime": "^7.0.0",
|