@atlaskit/editor-plugin-block-controls 13.2.4 → 13.2.6

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,20 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 13.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 13.2.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [`ce7966a423f4c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ce7966a423f4c) -
14
+ Fix first-node top margin not being reset when a leading ProseMirror widget is present (e.g.
15
+ non-editable editor), behind the platform_editor_first_node_fix experiment.
16
+ - Updated dependencies
17
+
3
18
  ## 13.2.4
4
19
 
5
20
  ### Patch Changes
@@ -256,8 +256,8 @@ var topLevelNodeMarginStyles = (0, _react.css)({
256
256
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
257
257
  marginTop: '0 !important'
258
258
  },
259
- // When a drop target widget is inserted during drag, the font-size wrapper is no longer
260
- // adjacent to the first widget. Reach through the wrapper to zero the inner content margin.
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
261
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
262
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
263
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
@@ -423,7 +423,10 @@ var GlobalStylesWrapper = exports.GlobalStylesWrapper = function GlobalStylesWra
423
423
  exposure: true
424
424
  }) ? (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined,
425
425
  // platform_editor_controls note: this allows drag handles to render on empty lines
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, 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,
427
+ // When `platform_editor_first_node_fix` is enabled, EditorContentContainer applies the
428
+ // equivalent rules (`firstNodeWidgetFixStyles`), so skip them here to avoid duplication.
429
+ (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) ?
427
430
  // dragAnchorStyles sets anchor-name on ALL nodes during drag (needed for drop target positioning).
428
431
  // staticControlsAnchorStyles handles anchor-name via node decorations for non-drag state.
429
432
  // shouldRenderAnchors guards both: only apply anchor styles on browsers that support CSS anchor positioning.
@@ -308,8 +308,8 @@ const topLevelNodeMarginStyles = css({
308
308
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
309
309
  marginTop: '0 !important'
310
310
  },
311
- // When a drop target widget is inserted during drag, the font-size wrapper is no longer
312
- // adjacent to the first widget. Reach through the wrapper to zero the inner content margin.
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
313
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
314
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
315
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
@@ -514,7 +514,10 @@ export const GlobalStylesWrapper = ({
514
514
  exposure: true
515
515
  }) ? expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined,
516
516
  // platform_editor_controls note: this allows drag handles to render on empty lines
517
- 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, 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) ?
517
+ 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,
518
+ // When `platform_editor_first_node_fix` is enabled, EditorContentContainer applies the
519
+ // equivalent rules (`firstNodeWidgetFixStyles`), so skip them here to avoid duplication.
520
+ 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) ?
518
521
  // dragAnchorStyles sets anchor-name on ALL nodes during drag (needed for drop target positioning).
519
522
  // staticControlsAnchorStyles handles anchor-name via node decorations for non-drag state.
520
523
  // shouldRenderAnchors guards both: only apply anchor styles on browsers that support CSS anchor positioning.
@@ -249,8 +249,8 @@ var topLevelNodeMarginStyles = css({
249
249
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles -- Ignored via go/DSP-18766
250
250
  marginTop: '0 !important'
251
251
  },
252
- // When a drop target widget is inserted during drag, the font-size wrapper is no longer
253
- // adjacent to the first widget. Reach through the wrapper to zero the inner content margin.
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
254
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
255
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
256
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-important-styles
@@ -416,7 +416,10 @@ export var GlobalStylesWrapper = function GlobalStylesWrapper(_ref) {
416
416
  exposure: true
417
417
  }) ? expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? extendHoverZoneReducedNext : extendHoverZoneReduced : undefined,
418
418
  // platform_editor_controls note: this allows drag handles to render on empty lines
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, 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,
420
+ // When `platform_editor_first_node_fix` is enabled, EditorContentContainer applies the
421
+ // equivalent rules (`firstNodeWidgetFixStyles`), so skip them here to avoid duplication.
422
+ 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) ?
420
423
  // dragAnchorStyles sets anchor-name on ALL nodes during drag (needed for drop target positioning).
421
424
  // staticControlsAnchorStyles handles anchor-name via node decorations for non-drag state.
422
425
  // 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": "13.2.4",
3
+ "version": "13.2.6",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -41,15 +41,15 @@
41
41
  "@atlaskit/editor-tables": "^3.0.0",
42
42
  "@atlaskit/icon": "^37.0.0",
43
43
  "@atlaskit/icon-lab": "^7.3.0",
44
- "@atlaskit/link": "^4.1.0",
44
+ "@atlaskit/link": "^4.3.0",
45
45
  "@atlaskit/platform-feature-flags": "^2.0.0",
46
46
  "@atlaskit/pragmatic-drag-and-drop": "^2.0.0",
47
47
  "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.0.0",
48
48
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^4.1.0",
49
- "@atlaskit/primitives": "^20.5.0",
49
+ "@atlaskit/primitives": "^20.6.0",
50
50
  "@atlaskit/theme": "^26.1.0",
51
- "@atlaskit/tmp-editor-statsig": "^124.1.0",
52
- "@atlaskit/tokens": "^15.5.0",
51
+ "@atlaskit/tmp-editor-statsig": "^125.0.0",
52
+ "@atlaskit/tokens": "^15.8.0",
53
53
  "@atlaskit/tooltip": "^23.1.0",
54
54
  "@babel/runtime": "^7.0.0",
55
55
  "@emotion/react": "^11.7.1",
@@ -59,7 +59,7 @@
59
59
  "uuid": "^3.1.0"
60
60
  },
61
61
  "peerDependencies": {
62
- "@atlaskit/editor-common": "^116.25.0",
62
+ "@atlaskit/editor-common": "^116.30.0",
63
63
  "react": "^18.2.0",
64
64
  "react-dom": "^18.2.0",
65
65
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"