@atlaskit/editor-plugin-table 14.0.0 → 14.0.1

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,15 @@
1
1
  # @atlaskit/editor-plugin-table
2
2
 
3
+ ## 14.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`c0656bad0f992`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c0656bad0f992) -
8
+ EDITOR-1389 fix table container width behind platform_editor_table_container_width_fix
9
+ - [`f0662cd7a143e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f0662cd7a143e) -
10
+ Internal changes to how borders are applied.
11
+ - Updated dependencies
12
+
3
13
  ## 14.0.0
4
14
 
5
15
  ### Patch Changes
@@ -247,7 +247,12 @@ var ResizableTableContainerLegacy = /*#__PURE__*/_react.default.memo(function (_
247
247
  // padding left = padding right = akEditorGutterPadding = 32
248
248
  responsiveContainerWidth = isTableScalingEnabled ? containerWidth - padding * 2 : containerWidth - padding * 2 - resizeHandleSpacing;
249
249
  }
250
- var width = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
250
+ // Fix for HOT-119925: Ensure table width is properly constrained and responsive
251
+ // For wide tables, ensure they don't exceed container width and can be scrolled
252
+ var calculatedWidth = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
253
+
254
+ // Ensure minimum width for usability while respecting container constraints
255
+ var width = (0, _expValEquals.expValEquals)('platform_editor_table_container_width_fix', 'isEnabled', true) ? Math.max(calculatedWidth, Math.min(responsiveContainerWidth * 0.5, 300)) : calculatedWidth;
251
256
  if (!isResizing) {
252
257
  tableWidthRef.current = width;
253
258
  }
@@ -448,7 +453,13 @@ var ResizableTableContainerNext = /*#__PURE__*/_react.default.memo(function (_re
448
453
  // padding left = padding right = akEditorGutterPadding = 32
449
454
  responsiveContainerWidth = isTableScalingEnabled ? containerWidth - padding * 2 : containerWidth - padding * 2 - resizeHandleSpacing;
450
455
  }
451
- var width = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
456
+
457
+ // Fix for HOT-119925: Ensure table width is properly constrained and responsive
458
+ // For wide tables, ensure they don't exceed container width and can be scrolled
459
+ var calculatedWidth = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
460
+
461
+ // Ensure minimum width for usability while respecting container constraints
462
+ var width = (0, _expValEquals.expValEquals)('platform_editor_table_container_width_fix', 'isEnabled', true) ? Math.max(calculatedWidth, Math.min(responsiveContainerWidth * 0.5, 300)) : calculatedWidth;
452
463
  if (!isResizing) {
453
464
  tableWidthRef.current = width;
454
465
  }
@@ -14,7 +14,7 @@ var boxStyles = (0, _primitives.xcss)({
14
14
  borderColor: 'color.border.focused',
15
15
  borderStyle: 'solid',
16
16
  borderRadius: 'radius.small',
17
- borderWidth: 'border.width.outline',
17
+ borderWidth: 'border.width.focused',
18
18
  backgroundColor: 'color.blanket.selected'
19
19
  });
20
20
  var DragPreview = exports.DragPreview = function DragPreview(_ref) {
@@ -27,7 +27,7 @@ var Marker = function Marker() {
27
27
  height: "".concat(_consts.lineMarkerSize, "px"),
28
28
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
29
29
  width: "".concat(_consts.lineMarkerSize, "px"),
30
- borderRadius: '50%',
30
+ borderRadius: "var(--ds-radius-full, 9999px)",
31
31
  pointerEvents: 'none'
32
32
  });
33
33
  };
@@ -240,7 +240,12 @@ const ResizableTableContainerLegacy = /*#__PURE__*/React.memo(({
240
240
  // padding left = padding right = akEditorGutterPadding = 32
241
241
  responsiveContainerWidth = isTableScalingEnabled ? containerWidth - padding * 2 : containerWidth - padding * 2 - resizeHandleSpacing;
242
242
  }
243
- const width = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
243
+ // Fix for HOT-119925: Ensure table width is properly constrained and responsive
244
+ // For wide tables, ensure they don't exceed container width and can be scrolled
245
+ const calculatedWidth = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
246
+
247
+ // Ensure minimum width for usability while respecting container constraints
248
+ const width = expValEquals('platform_editor_table_container_width_fix', 'isEnabled', true) ? Math.max(calculatedWidth, Math.min(responsiveContainerWidth * 0.5, 300)) : calculatedWidth;
244
249
  if (!isResizing) {
245
250
  tableWidthRef.current = width;
246
251
  }
@@ -437,7 +442,13 @@ const ResizableTableContainerNext = /*#__PURE__*/React.memo(({
437
442
  // padding left = padding right = akEditorGutterPadding = 32
438
443
  responsiveContainerWidth = isTableScalingEnabled ? containerWidth - padding * 2 : containerWidth - padding * 2 - resizeHandleSpacing;
439
444
  }
440
- const width = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
445
+
446
+ // Fix for HOT-119925: Ensure table width is properly constrained and responsive
447
+ // For wide tables, ensure they don't exceed container width and can be scrolled
448
+ const calculatedWidth = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
449
+
450
+ // Ensure minimum width for usability while respecting container constraints
451
+ const width = expValEquals('platform_editor_table_container_width_fix', 'isEnabled', true) ? Math.max(calculatedWidth, Math.min(responsiveContainerWidth * 0.5, 300)) : calculatedWidth;
441
452
  if (!isResizing) {
442
453
  tableWidthRef.current = width;
443
454
  }
@@ -7,7 +7,7 @@ const boxStyles = xcss({
7
7
  borderColor: 'color.border.focused',
8
8
  borderStyle: 'solid',
9
9
  borderRadius: 'radius.small',
10
- borderWidth: 'border.width.outline',
10
+ borderWidth: 'border.width.focused',
11
11
  backgroundColor: 'color.blanket.selected'
12
12
  });
13
13
  export const DragPreview = ({
@@ -23,7 +23,7 @@ const Marker = () => css({
23
23
  height: `${lineMarkerSize}px`,
24
24
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
25
25
  width: `${lineMarkerSize}px`,
26
- borderRadius: '50%',
26
+ borderRadius: "var(--ds-radius-full, 9999px)",
27
27
  pointerEvents: 'none'
28
28
  });
29
29
  export const InsertMarker = cssString => css`
@@ -238,7 +238,12 @@ var ResizableTableContainerLegacy = /*#__PURE__*/React.memo(function (_ref4) {
238
238
  // padding left = padding right = akEditorGutterPadding = 32
239
239
  responsiveContainerWidth = isTableScalingEnabled ? containerWidth - padding * 2 : containerWidth - padding * 2 - resizeHandleSpacing;
240
240
  }
241
- var width = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
241
+ // Fix for HOT-119925: Ensure table width is properly constrained and responsive
242
+ // For wide tables, ensure they don't exceed container width and can be scrolled
243
+ var calculatedWidth = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
244
+
245
+ // Ensure minimum width for usability while respecting container constraints
246
+ var width = expValEquals('platform_editor_table_container_width_fix', 'isEnabled', true) ? Math.max(calculatedWidth, Math.min(responsiveContainerWidth * 0.5, 300)) : calculatedWidth;
242
247
  if (!isResizing) {
243
248
  tableWidthRef.current = width;
244
249
  }
@@ -439,7 +444,13 @@ var ResizableTableContainerNext = /*#__PURE__*/React.memo(function (_ref5) {
439
444
  // padding left = padding right = akEditorGutterPadding = 32
440
445
  responsiveContainerWidth = isTableScalingEnabled ? containerWidth - padding * 2 : containerWidth - padding * 2 - resizeHandleSpacing;
441
446
  }
442
- var width = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
447
+
448
+ // Fix for HOT-119925: Ensure table width is properly constrained and responsive
449
+ // For wide tables, ensure they don't exceed container width and can be scrolled
450
+ var calculatedWidth = !node.attrs.width && isCommentEditor ? responsiveContainerWidth : Math.min(tableWidth, responsiveContainerWidth);
451
+
452
+ // Ensure minimum width for usability while respecting container constraints
453
+ var width = expValEquals('platform_editor_table_container_width_fix', 'isEnabled', true) ? Math.max(calculatedWidth, Math.min(responsiveContainerWidth * 0.5, 300)) : calculatedWidth;
443
454
  if (!isResizing) {
444
455
  tableWidthRef.current = width;
445
456
  }
@@ -7,7 +7,7 @@ var boxStyles = xcss({
7
7
  borderColor: 'color.border.focused',
8
8
  borderStyle: 'solid',
9
9
  borderRadius: 'radius.small',
10
- borderWidth: 'border.width.outline',
10
+ borderWidth: 'border.width.focused',
11
11
  backgroundColor: 'color.blanket.selected'
12
12
  });
13
13
  export var DragPreview = function DragPreview(_ref) {
@@ -20,7 +20,7 @@ var Marker = function Marker() {
20
20
  height: "".concat(lineMarkerSize, "px"),
21
21
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
22
22
  width: "".concat(lineMarkerSize, "px"),
23
- borderRadius: '50%',
23
+ borderRadius: "var(--ds-radius-full, 9999px)",
24
24
  pointerEvents: 'none'
25
25
  });
26
26
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-table",
3
- "version": "14.0.0",
3
+ "version": "14.0.1",
4
4
  "description": "Table plugin for the @atlaskit/editor",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -37,12 +37,12 @@
37
37
  "@atlaskit/editor-plugin-batch-attribute-updates": "^5.0.0",
38
38
  "@atlaskit/editor-plugin-content-insertion": "^5.0.0",
39
39
  "@atlaskit/editor-plugin-editor-viewmode": "^7.0.0",
40
- "@atlaskit/editor-plugin-extension": "8.0.0",
40
+ "@atlaskit/editor-plugin-extension": "8.0.1",
41
41
  "@atlaskit/editor-plugin-guideline": "^5.0.0",
42
42
  "@atlaskit/editor-plugin-interaction": "^7.0.0",
43
43
  "@atlaskit/editor-plugin-limited-mode": "^2.0.0",
44
44
  "@atlaskit/editor-plugin-selection": "^5.0.0",
45
- "@atlaskit/editor-plugin-toolbar": "^2.0.0",
45
+ "@atlaskit/editor-plugin-toolbar": "^2.1.0",
46
46
  "@atlaskit/editor-plugin-user-intent": "^3.0.0",
47
47
  "@atlaskit/editor-plugin-width": "^6.0.0",
48
48
  "@atlaskit/editor-prosemirror": "7.0.0",
@@ -58,8 +58,8 @@
58
58
  "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
59
59
  "@atlaskit/primitives": "^14.14.0",
60
60
  "@atlaskit/react-ufo": "^4.6.0",
61
- "@atlaskit/theme": "^20.0.0",
62
- "@atlaskit/tmp-editor-statsig": "^12.9.0",
61
+ "@atlaskit/theme": "^21.0.0",
62
+ "@atlaskit/tmp-editor-statsig": "^12.10.0",
63
63
  "@atlaskit/toggle": "^15.1.0",
64
64
  "@atlaskit/tokens": "^6.3.0",
65
65
  "@atlaskit/tooltip": "^20.4.0",
@@ -72,7 +72,7 @@
72
72
  "uuid": "^3.1.0"
73
73
  },
74
74
  "peerDependencies": {
75
- "@atlaskit/editor-common": "^109.0.0",
75
+ "@atlaskit/editor-common": "^109.1.0",
76
76
  "react": "^18.2.0",
77
77
  "react-dom": "^18.2.0",
78
78
  "react-intl-next": "npm:react-intl@^5.18.1"