@atlaskit/editor-plugin-block-controls 7.5.6 → 7.5.8

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,19 @@
1
1
  # @atlaskit/editor-plugin-block-controls
2
2
 
3
+ ## 7.5.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 7.5.7
10
+
11
+ ### Patch Changes
12
+
13
+ - [`2dfcadf1c9593`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2dfcadf1c9593) -
14
+ [ux] fix drag handle not appearing inside a panel/expand nested in a table
15
+ - Updated dependencies
16
+
3
17
  ## 7.5.6
4
18
 
5
19
  ### Patch Changes
@@ -30,9 +30,13 @@ var getNodeSelector = function getNodeSelector(ignoreNodes, ignoreNodeDescendant
30
30
  return "[data-prosemirror-node-name=\"".concat(node, "\"]");
31
31
  });
32
32
  var ignoreNodeDescendantsSelectorList = ignoreNodeDescendants.map(function (node) {
33
+ if (node === 'table' && (0, _platformFeatureFlags.fg)('platform_editor_native_anchor_table_nested_fix')) {
34
+ // Special case for table to exclude its direct descendants
35
+ return ["[data-prosemirror-node-name=\"tableCell\"] > [data-node-anchor]", "[data-prosemirror-node-name=\"tableHeader\"] > [data-node-anchor]"];
36
+ }
33
37
  return "[data-prosemirror-node-name=\"".concat(node, "\"] [data-node-anchor]");
34
38
  });
35
- var ignoreSelector = [].concat((0, _toConsumableArray2.default)(ignoreNodeSelectorList), (0, _toConsumableArray2.default)(ignoreNodeDescendantsSelectorList), ['[data-prosemirror-node-inline="true"]']).join(', ');
39
+ var ignoreSelector = [].concat((0, _toConsumableArray2.default)(ignoreNodeSelectorList), (0, _toConsumableArray2.default)(ignoreNodeDescendantsSelectorList.flat()), ['[data-prosemirror-node-inline="true"]']).join(', ');
36
40
  return "".concat(baseSelector, ":not(").concat(ignoreSelector, ")");
37
41
  };
38
42
  var getDefaultNodeSelector = (0, _memoizeOne.default)(function () {
@@ -99,7 +99,7 @@ var buttonWrapperStylesPatch = (0, _react2.css)({
99
99
 
100
100
  // update color to match quick insert button for new editor controls
101
101
  var dragHandleColor = (0, _react2.css)({
102
- color: "var(--ds-icon-subtle, #626F86)"
102
+ color: "var(--ds-icon-subtle, #505258)"
103
103
  });
104
104
  var dragHandleButtonStyles = (0, _react2.css)({
105
105
  display: 'flex',
@@ -256,7 +256,7 @@ var quickInsertStyles = function quickInsertStyles() {
256
256
  zIndex: _constants.layers.card(),
257
257
  outline: 'none',
258
258
  cursor: 'pointer',
259
- color: "var(--ds-icon-subtle, #626F86)"
259
+ color: "var(--ds-icon-subtle, #505258)"
260
260
  },
261
261
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
262
262
  '[data-blocks-quick-insert-container]:has(~ [data-prosemirror-node-name="table"] .pm-table-with-controls tr.sticky) &': {
@@ -270,11 +270,11 @@ var quickInsertStyles = function quickInsertStyles() {
270
270
  },
271
271
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
272
272
  '.blocks-quick-insert-button:hover': {
273
- backgroundColor: "var(--ds-background-neutral-subtle-hovered, #091E420F)"
273
+ backgroundColor: "var(--ds-background-neutral-subtle-hovered, #0515240F)"
274
274
  },
275
275
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
276
276
  '.blocks-quick-insert-button:active': {
277
- backgroundColor: "var(--ds-background-neutral-subtle-pressed, #091E4224)"
277
+ backgroundColor: "var(--ds-background-neutral-subtle-pressed, #0B120E24)"
278
278
  },
279
279
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
280
280
  '.blocks-quick-insert-button:focus': {
@@ -299,7 +299,7 @@ var quickInsertStyles = function quickInsertStyles() {
299
299
  padding: "var(--ds-space-050, 4px)".concat(" 0"),
300
300
  boxSizing: 'border-box',
301
301
  maxWidth: '240px',
302
- backgroundColor: "var(--ds-background-neutral-bold, #44546F)",
302
+ backgroundColor: "var(--ds-background-neutral-bold, #292A2E)",
303
303
  color: "var(--ds-text-inverse, #FFFFFF)",
304
304
  font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
305
305
  insetBlockStart: "var(--ds-space-0, 0px)",
@@ -296,7 +296,7 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
296
296
  onMouseDown: handleMouseDown
297
297
  }, (0, _react2.jsx)(_add.default, {
298
298
  label: "add",
299
- color: "var(--ds-icon-subtle, #626F86)",
299
+ color: "var(--ds-icon-subtle, #505258)",
300
300
  size: "small"
301
301
  })));
302
302
  };
@@ -19,8 +19,14 @@ const getNodeSelector = (ignoreNodes, ignoreNodeDescendants) => {
19
19
  return baseSelector;
20
20
  }
21
21
  const ignoreNodeSelectorList = ignoreNodes.map(node => `[data-prosemirror-node-name="${node}"]`);
22
- const ignoreNodeDescendantsSelectorList = ignoreNodeDescendants.map(node => `[data-prosemirror-node-name="${node}"] [data-node-anchor]`);
23
- const ignoreSelector = [...ignoreNodeSelectorList, ...ignoreNodeDescendantsSelectorList, '[data-prosemirror-node-inline="true"]'].join(', ');
22
+ const ignoreNodeDescendantsSelectorList = ignoreNodeDescendants.map(node => {
23
+ if (node === 'table' && fg('platform_editor_native_anchor_table_nested_fix')) {
24
+ // Special case for table to exclude its direct descendants
25
+ return [`[data-prosemirror-node-name="tableCell"] > [data-node-anchor]`, `[data-prosemirror-node-name="tableHeader"] > [data-node-anchor]`];
26
+ }
27
+ return `[data-prosemirror-node-name="${node}"] [data-node-anchor]`;
28
+ });
29
+ const ignoreSelector = [...ignoreNodeSelectorList, ...ignoreNodeDescendantsSelectorList.flat(), '[data-prosemirror-node-inline="true"]'].join(', ');
24
30
  return `${baseSelector}:not(${ignoreSelector})`;
25
31
  };
26
32
  const getDefaultNodeSelector = memoizeOne(() => {
@@ -91,7 +91,7 @@ const buttonWrapperStylesPatch = css({
91
91
 
92
92
  // update color to match quick insert button for new editor controls
93
93
  const dragHandleColor = css({
94
- color: "var(--ds-icon-subtle, #626F86)"
94
+ color: "var(--ds-icon-subtle, #505258)"
95
95
  });
96
96
  const dragHandleButtonStyles = css({
97
97
  display: 'flex',
@@ -307,7 +307,7 @@ const quickInsertStyles = () => css({
307
307
  zIndex: layers.card(),
308
308
  outline: 'none',
309
309
  cursor: 'pointer',
310
- color: "var(--ds-icon-subtle, #626F86)"
310
+ color: "var(--ds-icon-subtle, #505258)"
311
311
  },
312
312
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
313
313
  '[data-blocks-quick-insert-container]:has(~ [data-prosemirror-node-name="table"] .pm-table-with-controls tr.sticky) &': {
@@ -321,11 +321,11 @@ const quickInsertStyles = () => css({
321
321
  },
322
322
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
323
323
  '.blocks-quick-insert-button:hover': {
324
- backgroundColor: "var(--ds-background-neutral-subtle-hovered, #091E420F)"
324
+ backgroundColor: "var(--ds-background-neutral-subtle-hovered, #0515240F)"
325
325
  },
326
326
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
327
327
  '.blocks-quick-insert-button:active': {
328
- backgroundColor: "var(--ds-background-neutral-subtle-pressed, #091E4224)"
328
+ backgroundColor: "var(--ds-background-neutral-subtle-pressed, #0B120E24)"
329
329
  },
330
330
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
331
331
  '.blocks-quick-insert-button:focus': {
@@ -350,7 +350,7 @@ const quickInsertStyles = () => css({
350
350
  padding: `${"var(--ds-space-050, 4px)"} 0`,
351
351
  boxSizing: 'border-box',
352
352
  maxWidth: '240px',
353
- backgroundColor: "var(--ds-background-neutral-bold, #44546F)",
353
+ backgroundColor: "var(--ds-background-neutral-bold, #292A2E)",
354
354
  color: "var(--ds-text-inverse, #FFFFFF)",
355
355
  font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
356
356
  insetBlockStart: "var(--ds-space-0, 0px)",
@@ -291,7 +291,7 @@ export const TypeAheadControl = ({
291
291
  onMouseDown: handleMouseDown
292
292
  }, jsx(AddIcon, {
293
293
  label: "add",
294
- color: "var(--ds-icon-subtle, #626F86)",
294
+ color: "var(--ds-icon-subtle, #505258)",
295
295
  size: "small"
296
296
  })));
297
297
  return jsx(Box
@@ -23,9 +23,13 @@ var getNodeSelector = function getNodeSelector(ignoreNodes, ignoreNodeDescendant
23
23
  return "[data-prosemirror-node-name=\"".concat(node, "\"]");
24
24
  });
25
25
  var ignoreNodeDescendantsSelectorList = ignoreNodeDescendants.map(function (node) {
26
+ if (node === 'table' && fg('platform_editor_native_anchor_table_nested_fix')) {
27
+ // Special case for table to exclude its direct descendants
28
+ return ["[data-prosemirror-node-name=\"tableCell\"] > [data-node-anchor]", "[data-prosemirror-node-name=\"tableHeader\"] > [data-node-anchor]"];
29
+ }
26
30
  return "[data-prosemirror-node-name=\"".concat(node, "\"] [data-node-anchor]");
27
31
  });
28
- var ignoreSelector = [].concat(_toConsumableArray(ignoreNodeSelectorList), _toConsumableArray(ignoreNodeDescendantsSelectorList), ['[data-prosemirror-node-inline="true"]']).join(', ');
32
+ var ignoreSelector = [].concat(_toConsumableArray(ignoreNodeSelectorList), _toConsumableArray(ignoreNodeDescendantsSelectorList.flat()), ['[data-prosemirror-node-inline="true"]']).join(', ');
29
33
  return "".concat(baseSelector, ":not(").concat(ignoreSelector, ")");
30
34
  };
31
35
  var getDefaultNodeSelector = memoizeOne(function () {
@@ -96,7 +96,7 @@ var buttonWrapperStylesPatch = css({
96
96
 
97
97
  // update color to match quick insert button for new editor controls
98
98
  var dragHandleColor = css({
99
- color: "var(--ds-icon-subtle, #626F86)"
99
+ color: "var(--ds-icon-subtle, #505258)"
100
100
  });
101
101
  var dragHandleButtonStyles = css({
102
102
  display: 'flex',
@@ -249,7 +249,7 @@ var quickInsertStyles = function quickInsertStyles() {
249
249
  zIndex: layers.card(),
250
250
  outline: 'none',
251
251
  cursor: 'pointer',
252
- color: "var(--ds-icon-subtle, #626F86)"
252
+ color: "var(--ds-icon-subtle, #505258)"
253
253
  },
254
254
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors, @atlaskit/ui-styling-standard/no-unsafe-selectors
255
255
  '[data-blocks-quick-insert-container]:has(~ [data-prosemirror-node-name="table"] .pm-table-with-controls tr.sticky) &': {
@@ -263,11 +263,11 @@ var quickInsertStyles = function quickInsertStyles() {
263
263
  },
264
264
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
265
265
  '.blocks-quick-insert-button:hover': {
266
- backgroundColor: "var(--ds-background-neutral-subtle-hovered, #091E420F)"
266
+ backgroundColor: "var(--ds-background-neutral-subtle-hovered, #0515240F)"
267
267
  },
268
268
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
269
269
  '.blocks-quick-insert-button:active': {
270
- backgroundColor: "var(--ds-background-neutral-subtle-pressed, #091E4224)"
270
+ backgroundColor: "var(--ds-background-neutral-subtle-pressed, #0B120E24)"
271
271
  },
272
272
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors
273
273
  '.blocks-quick-insert-button:focus': {
@@ -292,7 +292,7 @@ var quickInsertStyles = function quickInsertStyles() {
292
292
  padding: "var(--ds-space-050, 4px)".concat(" 0"),
293
293
  boxSizing: 'border-box',
294
294
  maxWidth: '240px',
295
- backgroundColor: "var(--ds-background-neutral-bold, #44546F)",
295
+ backgroundColor: "var(--ds-background-neutral-bold, #292A2E)",
296
296
  color: "var(--ds-text-inverse, #FFFFFF)",
297
297
  font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
298
298
  insetBlockStart: "var(--ds-space-0, 0px)",
@@ -291,7 +291,7 @@ export var TypeAheadControl = function TypeAheadControl(_ref) {
291
291
  onMouseDown: handleMouseDown
292
292
  }, jsx(AddIcon, {
293
293
  label: "add",
294
- color: "var(--ds-icon-subtle, #626F86)",
294
+ color: "var(--ds-icon-subtle, #505258)",
295
295
  size: "small"
296
296
  })));
297
297
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-block-controls",
3
- "version": "7.5.6",
3
+ "version": "7.5.8",
4
4
  "description": "Block controls plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,7 +33,7 @@
33
33
  "@atlaskit/editor-plugin-analytics": "^6.2.0",
34
34
  "@atlaskit/editor-plugin-editor-disabled": "^6.1.0",
35
35
  "@atlaskit/editor-plugin-feature-flags": "^5.0.0",
36
- "@atlaskit/editor-plugin-interaction": "^9.0.0",
36
+ "@atlaskit/editor-plugin-interaction": "^10.0.0",
37
37
  "@atlaskit/editor-plugin-limited-mode": "^3.1.0",
38
38
  "@atlaskit/editor-plugin-metrics": "^7.1.0",
39
39
  "@atlaskit/editor-plugin-quick-insert": "^6.0.0",
@@ -43,9 +43,9 @@
43
43
  "@atlaskit/editor-plugin-user-intent": "^4.0.0",
44
44
  "@atlaskit/editor-plugin-width": "^7.0.0",
45
45
  "@atlaskit/editor-prosemirror": "7.0.0",
46
- "@atlaskit/editor-shared-styles": "^3.8.0",
46
+ "@atlaskit/editor-shared-styles": "^3.9.0",
47
47
  "@atlaskit/editor-tables": "^2.9.0",
48
- "@atlaskit/icon": "^28.5.0",
48
+ "@atlaskit/icon": "^29.0.0",
49
49
  "@atlaskit/link": "^3.2.0",
50
50
  "@atlaskit/platform-feature-flags": "^1.1.0",
51
51
  "@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
@@ -53,8 +53,8 @@
53
53
  "@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
54
54
  "@atlaskit/primitives": "^16.1.0",
55
55
  "@atlaskit/theme": "^21.0.0",
56
- "@atlaskit/tmp-editor-statsig": "^13.32.0",
57
- "@atlaskit/tokens": "^7.1.0",
56
+ "@atlaskit/tmp-editor-statsig": "^13.35.0",
57
+ "@atlaskit/tokens": "^8.0.0",
58
58
  "@atlaskit/tooltip": "^20.8.0",
59
59
  "@babel/runtime": "^7.0.0",
60
60
  "@emotion/react": "^11.7.1",
@@ -65,7 +65,7 @@
65
65
  "uuid": "^3.1.0"
66
66
  },
67
67
  "peerDependencies": {
68
- "@atlaskit/editor-common": "^110.24.0",
68
+ "@atlaskit/editor-common": "^110.27.0",
69
69
  "react": "^18.2.0",
70
70
  "react-dom": "^18.2.0",
71
71
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -157,6 +157,9 @@
157
157
  "platform_editor_toolbar_aifc_user_intent_fix": {
158
158
  "type": "boolean"
159
159
  },
160
+ "platform_editor_native_anchor_table_nested_fix": {
161
+ "type": "boolean"
162
+ },
160
163
  "editor_native_anchor_update_layout_drop_hint": {
161
164
  "type": "boolean"
162
165
  }