@atlaskit/renderer 137.1.9 → 137.1.11

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/cjs/actions/index.js +2 -2
  3. package/dist/cjs/react/index.js +2 -2
  4. package/dist/cjs/react/marks/breakout.js +3 -3
  5. package/dist/cjs/react/marks/code.js +1 -1
  6. package/dist/cjs/react/nodes/date.js +1 -1
  7. package/dist/cjs/react/nodes/embedCard.js +2 -2
  8. package/dist/cjs/react/nodes/heading-anchor.js +1 -1
  9. package/dist/cjs/react/nodes/layoutSection.js +2 -2
  10. package/dist/cjs/react/nodes/mediaInline.js +1 -1
  11. package/dist/cjs/react/nodes/mediaSingle/index.js +1 -1
  12. package/dist/cjs/react/nodes/table/colgroup.js +1 -2
  13. package/dist/cjs/react/nodes/table/sticky.js +2 -4
  14. package/dist/cjs/react/nodes/table/table.js +1 -12
  15. package/dist/cjs/react/nodes/table.js +474 -206
  16. package/dist/cjs/ui/Expand.js +1 -1
  17. package/dist/cjs/ui/Renderer/RendererStyleContainer.js +3 -3
  18. package/dist/cjs/ui/Renderer/breakout-ssr.js +1 -2
  19. package/dist/cjs/ui/Renderer/index.js +7 -7
  20. package/dist/cjs/utils.js +2 -2
  21. package/dist/es2019/actions/index.js +1 -1
  22. package/dist/es2019/react/index.js +1 -1
  23. package/dist/es2019/react/marks/breakout.js +1 -1
  24. package/dist/es2019/react/marks/code.js +1 -1
  25. package/dist/es2019/react/nodes/date.js +1 -1
  26. package/dist/es2019/react/nodes/embedCard.js +1 -1
  27. package/dist/es2019/react/nodes/heading-anchor.js +1 -1
  28. package/dist/es2019/react/nodes/layoutSection.js +1 -1
  29. package/dist/es2019/react/nodes/mediaInline.js +1 -1
  30. package/dist/es2019/react/nodes/mediaSingle/index.js +1 -1
  31. package/dist/es2019/react/nodes/table/colgroup.js +1 -2
  32. package/dist/es2019/react/nodes/table/sticky.js +2 -3
  33. package/dist/es2019/react/nodes/table/table.js +1 -12
  34. package/dist/es2019/react/nodes/table.js +458 -191
  35. package/dist/es2019/ui/Expand.js +1 -1
  36. package/dist/es2019/ui/Renderer/RendererStyleContainer.js +1 -1
  37. package/dist/es2019/ui/Renderer/breakout-ssr.js +1 -2
  38. package/dist/es2019/ui/Renderer/index.js +4 -4
  39. package/dist/es2019/utils.js +1 -1
  40. package/dist/esm/actions/index.js +1 -1
  41. package/dist/esm/react/index.js +1 -1
  42. package/dist/esm/react/marks/breakout.js +1 -1
  43. package/dist/esm/react/marks/code.js +1 -1
  44. package/dist/esm/react/nodes/date.js +1 -1
  45. package/dist/esm/react/nodes/embedCard.js +1 -1
  46. package/dist/esm/react/nodes/heading-anchor.js +1 -1
  47. package/dist/esm/react/nodes/layoutSection.js +1 -1
  48. package/dist/esm/react/nodes/mediaInline.js +1 -1
  49. package/dist/esm/react/nodes/mediaSingle/index.js +1 -1
  50. package/dist/esm/react/nodes/table/colgroup.js +1 -2
  51. package/dist/esm/react/nodes/table/sticky.js +2 -4
  52. package/dist/esm/react/nodes/table/table.js +1 -12
  53. package/dist/esm/react/nodes/table.js +472 -203
  54. package/dist/esm/ui/Expand.js +1 -1
  55. package/dist/esm/ui/Renderer/RendererStyleContainer.js +1 -1
  56. package/dist/esm/ui/Renderer/breakout-ssr.js +1 -2
  57. package/dist/esm/ui/Renderer/index.js +4 -4
  58. package/dist/esm/utils.js +1 -1
  59. package/dist/types/react/nodes/table/sticky.d.ts +1 -2
  60. package/dist/types/react/nodes/table.d.ts +78 -8
  61. package/package.json +5 -7
  62. package/dist/cjs/react/nodes/tableNew.js +0 -1020
  63. package/dist/es2019/react/nodes/tableNew.js +0 -956
  64. package/dist/esm/react/nodes/tableNew.js +0 -1014
  65. package/dist/types/react/nodes/tableNew.d.ts +0 -189
@@ -427,6 +427,6 @@ function Expand({
427
427
  }, children)))));
428
428
  }
429
429
 
430
- // eslint-disable-next-line @typescript-eslint/ban-types
430
+ // eslint-disable-next-line @typescript-eslint/no-restricted-types
431
431
  const _default_1 = injectIntl(Expand);
432
432
  export default _default_1;
@@ -19,7 +19,7 @@ import { CodeBlockSharedCssClassName, DateSharedCssClassName, listItemCounterPad
19
19
  import { bulletListSelector, orderedListSelector } from '@atlaskit/adf-schema';
20
20
  import { shadowClassNames, shadowObserverClassNames } from '@atlaskit/editor-common/ui';
21
21
  import { getBrowserInfo } from '@atlaskit/editor-common/browser';
22
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
22
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
23
23
  import { isStickyScrollbarEnabled, isTableResizingEnabled } from '../../react/nodes/table';
24
24
  import { SORTABLE_COLUMN_ICON_CLASSNAME } from '@atlaskit/editor-common/table';
25
25
  import { LightWeightCodeBlockCssClassName } from '../../react/nodes/codeBlock/components/lightWeightCodeBlock';
@@ -28,7 +28,7 @@ export function BreakoutSSRInlineScript({
28
28
  }
29
29
  const id = Math.floor(Math.random() * (9999999999 - 9999 + 1)) + 9999;
30
30
  const shouldSkipScript = {
31
- table: fg('platform-ssr-table-resize')
31
+ table: true
32
32
  };
33
33
  return /*#__PURE__*/React.createElement("script", {
34
34
  "data-breakout-script-id": id
@@ -100,7 +100,6 @@ function applyBreakoutAfterSSR(id, breakoutConsts, shouldSkipBreakoutScript, fla
100
100
  return;
101
101
  }
102
102
 
103
- // Remove with feature gate 'platform-ssr-table-resize'
104
103
  // Ignored via go/ees005
105
104
  // eslint-disable-next-line @atlaskit/editor/no-as-casting
106
105
  if (item.target.classList.contains('ak-renderer-document')) {
@@ -7,7 +7,7 @@ import React, { Fragment, useCallback, useContext, useEffect, useLayoutEffect, u
7
7
  import { getSchemaBasedOnStage } from '@atlaskit/adf-schema/schema-default';
8
8
  import { ProviderFactory, ProviderFactoryProvider } from '@atlaskit/editor-common/provider-factory';
9
9
  import { BaseTheme, IntlErrorBoundary, UnsupportedBlock, WidthProvider, WithCreateAnalyticsEvent } from '@atlaskit/editor-common/ui';
10
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
11
11
  // eslint-disable-next-line @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- emotion jsx pragma; go/DSP-18766
12
12
  import { css, jsx } from '@emotion/react'; // oxlint-ignore @typescript-eslint/consistent-type-imports -- classic @jsx jsx factory + jsx.JSX.Element types
13
13
 
@@ -60,7 +60,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
60
60
  const TABLE_INFO_TIMEOUT = 10000;
61
61
  const RENDER_EVENT_SAMPLE_RATE = 0.1;
62
62
  const packageName = "@atlaskit/renderer";
63
- const packageVersion = "137.1.8";
63
+ const packageVersion = "137.1.10";
64
64
  const setAsQueryContainerStyles = css({
65
65
  containerName: 'ak-renderer-wrapper',
66
66
  containerType: 'inline-size'
@@ -776,7 +776,7 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
776
776
  //
777
777
 
778
778
  // allowRendererContainerStyles is not needed for comment container styling as container should always be set for comments
779
- if (appearance === 'comment' && isTopLevelRenderer && fg('platform-ssr-table-resize')) {
779
+ if (appearance === 'comment' && isTopLevelRenderer) {
780
780
  return jsx("div", {
781
781
  css: setAsQueryContainerStyles
782
782
  }, renderer);
@@ -789,7 +789,7 @@ const RendererWrapper = /*#__PURE__*/React.memo(props => {
789
789
  return (appearance === 'full-page' || appearance === 'full-width' || (expValEqualsNoExposure('editor_tinymce_full_width_mode', 'isEnabled', true) || expValEquals('confluence_max_width_content_appearance', 'isEnabled', true)) && appearance === 'max') &&
790
790
  // In case of having excerpt-include on page there are multiple renderers nested.
791
791
  // Make sure only the root renderer is set to be query container.
792
- isTopLevelRenderer && allowRendererContainerStyles && fg('platform-ssr-table-resize') ? jsx("div", {
792
+ isTopLevelRenderer && allowRendererContainerStyles ? jsx("div", {
793
793
  css: setAsQueryContainerStyles
794
794
  }, renderer) : renderer;
795
795
  });
@@ -2,7 +2,7 @@
2
2
  // Entry file in package.json
3
3
 
4
4
  import { defaultSchema } from '@atlaskit/adf-schema/schema-default';
5
- import { JSONTransformer } from '@atlaskit/editor-json-transformer';
5
+ import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransformer-2';
6
6
 
7
7
  // Ignored via go/ees005
8
8
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -4,7 +4,7 @@ import _createClass from "@babel/runtime/helpers/createClass";
4
4
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
5
5
  import { AnnotationTypes } from '@atlaskit/adf-schema';
6
6
  import { canApplyAnnotationOnRange, getAnnotationIdsFromRange, getAnnotationInlineNodeTypes, isEmptyTextSelectionRenderer } from '@atlaskit/editor-common/utils';
7
- import { JSONTransformer } from '@atlaskit/editor-json-transformer';
7
+ import { JSONTransformer } from '@atlaskit/editor-json-transformer/JSONTransformer-2';
8
8
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
9
9
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
10
10
  import { AddNodeMarkStep, RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/editor-prosemirror/transform';
@@ -10,7 +10,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
10
10
  import React from 'react';
11
11
  import { MarkType } from '@atlaskit/editor-prosemirror/model';
12
12
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
13
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
13
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
14
14
  import { mergeExpandBodyText, withExpandBodyBlock } from '../ui/utils/expand-body';
15
15
  import { Doc, DocWithSelectAllTrap, isTextNode, isTextWrapper, mergeTextNodes, toReact } from './nodes';
16
16
  import TextWrapperComponent from './nodes/text-wrapper';
@@ -6,7 +6,7 @@ import _extends from "@babel/runtime/helpers/extends";
6
6
  /* eslint-disable @typescript-eslint/consistent-type-imports, @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic */
7
7
  import { jsx, css } from '@emotion/react';
8
8
  import { akEditorFullWidthLayoutWidth, akEditorMaxLayoutWidth, blockNodesVerticalMargin } from '@atlaskit/editor-shared-styles';
9
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
9
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
10
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
11
  import { RendererCssClassName } from '../../consts';
12
12
  var flexWrapperStyles = css({
@@ -18,6 +18,6 @@ export function CodeWithIntl(props) {
18
18
  // eslint-disable-next-line react/jsx-props-no-spreading
19
19
  }, props.dataAttributes), props.children);
20
20
  }
21
- // eslint-disable-next-line @typescript-eslint/ban-types
21
+ // eslint-disable-next-line @typescript-eslint/no-restricted-types
22
22
  var _default_1 = injectIntl(CodeWithIntl);
23
23
  export default _default_1;
@@ -28,7 +28,7 @@ var Date = /*#__PURE__*/memo(function Date(props) {
28
28
  }, parentIsIncompleteTask ? timestampToTaskContext(timestamp, intl, timeZone) : timestampToString(timestamp, intl)));
29
29
  });
30
30
 
31
- // eslint-disable-next-line @typescript-eslint/ban-types
31
+ // eslint-disable-next-line @typescript-eslint/no-restricted-types
32
32
  export var DateComponent = injectIntl(Date);
33
33
  function DateWithFormatContext(props) {
34
34
  var _useTaskItemsFormatCo = useTaskItemsFormatContext(),
@@ -15,7 +15,7 @@ import { WidthConsumer, UnsupportedBlock, MediaSingle as UIMediaSingle, WidthCon
15
15
  import { akEditorDefaultLayoutWidth, akEditorFullPageNarrowBreakout, akEditorFullWidthLayoutWidth, DEFAULT_EMBED_CARD_HEIGHT, DEFAULT_EMBED_CARD_WIDTH } from '@atlaskit/editor-shared-styles';
16
16
  import { fg } from '@atlaskit/platform-feature-flags/fg';
17
17
  import { componentWithCondition } from '@atlaskit/platform-feature-flags-react/component-with-condition';
18
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
18
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
19
19
  import { CardErrorBoundary } from './fallback';
20
20
  import { SmartLinkDraggable, SMART_LINK_DRAG_TYPES, SMART_LINK_APPEARANCE } from '@atlaskit/editor-smart-link-draggable';
21
21
  import { RendererCssClassName } from '../../consts';
@@ -180,6 +180,6 @@ var HeadingAnchor = /*#__PURE__*/function (_React$PureComponent) {
180
180
  return this.renderAnchorButton();
181
181
  }
182
182
  }]);
183
- }(React.PureComponent); // eslint-disable-next-line @typescript-eslint/ban-types
183
+ }(React.PureComponent); // eslint-disable-next-line @typescript-eslint/no-restricted-types
184
184
  var _default_1 = injectIntl(HeadingAnchor);
185
185
  export default _default_1;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
2
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/editor-experiment';
3
3
  export default function LayoutSection(props) {
4
4
  var _ref, _props$content, _props$getContent;
5
5
  var columnCount = (_ref = (_props$content = props.content) !== null && _props$content !== void 0 ? _props$content : (_props$getContent = props.getContent) === null || _props$getContent === void 0 ? void 0 : _props$getContent.call(props)) === null || _ref === void 0 ? void 0 : _ref.length;
@@ -209,6 +209,6 @@ var MediaInline = function MediaInline(props) {
209
209
  });
210
210
  };
211
211
 
212
- // eslint-disable-next-line @typescript-eslint/ban-types
212
+ // eslint-disable-next-line @typescript-eslint/no-restricted-types
213
213
  var _default_1 = injectIntl(MediaInline);
214
214
  export default _default_1;
@@ -279,6 +279,6 @@ var MediaSingle = function MediaSingle(props) {
279
279
  }));
280
280
  };
281
281
 
282
- // eslint-disable-next-line @typescript-eslint/ban-types
282
+ // eslint-disable-next-line @typescript-eslint/no-restricted-types
283
283
  var _default_1 = injectIntl(MediaSingle);
284
284
  export default _default_1;
@@ -281,11 +281,10 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
281
281
  }
282
282
  // scaling down
283
283
  else if (renderWidth < tableWidth && !isTableWidthFixed) {
284
- var shouldTable100ScaleDown = rendererAppearance === 'comment' && allowTableResizing && !(tableNode !== null && tableNode !== void 0 && tableNode.attrs.width);
285
284
  scaleDownPercent = calcScalePercent({
286
285
  renderWidth: renderWidth,
287
286
  tableWidth: tableWidth,
288
- maxScale: fg('platform-ssr-table-resize') ? maxScalingPercent : shouldTable100ScaleDown ? 1 : maxScalingPercent,
287
+ maxScale: maxScalingPercent,
289
288
  isNumberColumnEnabled: isNumberColumnEnabled
290
289
  });
291
290
  }
@@ -109,8 +109,6 @@ export var StickyTable = function StickyTable(_ref) {
109
109
  tableNode = _ref.tableNode,
110
110
  rendererAppearance = _ref.rendererAppearance,
111
111
  allowTableResizing = _ref.allowTableResizing,
112
- _ref$fixTableSSRResiz = _ref.fixTableSSRResizing,
113
- fixTableSSRResizing = _ref$fixTableSSRResiz === void 0 ? false : _ref$fixTableSSRResiz,
114
112
  allowFixedColumnWidthOption = _ref.allowFixedColumnWidthOption;
115
113
  var styles;
116
114
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
@@ -146,7 +144,7 @@ export var StickyTable = function StickyTable(_ref) {
146
144
  style: {
147
145
  width: tableWidth,
148
146
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
149
- marginBottom: fixTableSSRResizing ? 0 : ''
147
+ marginBottom: 0
150
148
  }
151
149
  }, jsx("div", {
152
150
  ref: innerRef
@@ -164,7 +162,7 @@ export var StickyTable = function StickyTable(_ref) {
164
162
  renderWidth: renderWidth,
165
163
  tableNode: tableNode,
166
164
  rendererAppearance: rendererAppearance,
167
- fixTableSSRResizing: fixTableSSRResizing,
165
+ fixTableSSRResizing: true,
168
166
  allowFixedColumnWidthOption: allowFixedColumnWidthOption
169
167
  },
170
168
  /**
@@ -32,21 +32,10 @@ export var Table = /*#__PURE__*/React.memo(function (_ref) {
32
32
  if (rendererAppearance === 'comment' && allowTableResizing && tableNode && !((_tableNode$attrs = tableNode.attrs) !== null && _tableNode$attrs !== void 0 && _tableNode$attrs.width)) {
33
33
  tableWidth = 'inherit';
34
34
  }
35
- if (rendererAppearance === 'comment' && !allowTableResizing) {
36
- // in the case we have css container stylings,
37
- // we don't need to calculate width here as this
38
- // is done via css
39
- if (!fg('platform-ssr-table-resize')) {
40
- tableWidth = renderWidth;
41
- }
42
- }
43
-
44
35
  // for columns that are evenly distributed, do not return `colgroup` since existing table containerQuery
45
36
  // scales up the columns width. This ensures columns always have 42px.
46
37
  if (rendererAppearance === 'comment') {
47
- if (fg('platform-ssr-table-resize')) {
48
- tableColumnWidths = columnWidths && colWidthSum(columnWidths) ? columnWidths : undefined;
49
- }
38
+ tableColumnWidths = columnWidths && colWidthSum(columnWidths) ? columnWidths : undefined;
50
39
  }
51
40
  var tableLayout = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.layout;
52
41
  var tableDisplayMode = tableNode === null || tableNode === void 0 ? void 0 : tableNode.attrs.displayMode;