@atlaskit/renderer 108.6.10 → 108.7.0

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,21 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 108.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`5f028fb62a1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/5f028fb62a1) - ED-19038 added mediaSingle.widthType support to renderer.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
13
+ ## 108.6.11
14
+
15
+ ### Patch Changes
16
+
17
+ - [`a46a10e8368`](https://bitbucket.org/atlassian/atlassian-frontend/commits/a46a10e8368) - align table sticky header for custom table widths
18
+
3
19
  ## 108.6.10
4
20
 
5
21
  ### Patch Changes
@@ -55,7 +55,8 @@ var MediaSingle = function MediaSingle(props) {
55
55
  isInsideOfBlockNode = props.isInsideOfBlockNode,
56
56
  layout = props.layout,
57
57
  children = props.children,
58
- pctWidth = props.width;
58
+ widthAttr = props.width,
59
+ widthType = props.widthType;
59
60
  var isCaptionsFlaggedOn = (0, _mediaCommon.getMediaFeatureFlag)('captions', featureFlags);
60
61
  var _React$useState = _react.default.useState({
61
62
  width: 0,
@@ -163,7 +164,10 @@ var MediaSingle = function MediaSingle(props) {
163
164
  height: height,
164
165
  lineLength: isInsideOfBlockNode ? containerWidth : lineLength,
165
166
  containerWidth: containerWidth,
166
- pctWidth: pctWidth,
167
+ size: {
168
+ width: widthAttr,
169
+ widthType: widthType
170
+ },
167
171
  fullWidthMode: isFullWidth
168
172
  }, (0, _react2.jsx)(_react.Fragment, null, mediaComponent), isCaptionsFlaggedOn && caption);
169
173
  };
@@ -14,6 +14,7 @@ var _react2 = require("@emotion/react");
14
14
  var _styles = require("@atlaskit/editor-common/styles");
15
15
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
16
16
  var _colors = require("@atlaskit/theme/colors");
17
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
17
18
  var _table = require("./table");
18
19
  var _injectProps = require("../../utils/inject-props");
19
20
  var _templateObject, _templateObject2, _templateObject3, _templateObject4;
@@ -25,10 +26,16 @@ var modeSpecficStyles = {
25
26
  stick: (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n position: fixed;\n "]))),
26
27
  'pin-bottom': (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n "])))
27
28
  };
29
+ var stickyHeaderZIndex;
30
+ if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width')) {
31
+ stickyHeaderZIndex = 13;
32
+ } else {
33
+ stickyHeaderZIndex = _editorSharedStyles.akEditorStickyHeaderZIndex;
34
+ }
28
35
 
29
36
  // TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
30
37
  var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width) {
31
- return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n tr {\n background: ", ";\n }\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: 0 6px 4px -4px ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".right-shadow::after,\n &\n .", ".left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, _editorSharedStyles.akEditorStickyHeaderZIndex, _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-surface, white)", tableStickyPadding, "var(--ds-surface, white)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overflow-perimeter, ".concat(_colors.N40A, ")"), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER);
38
+ return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n tr {\n background: ", ";\n }\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: 0 6px 4px -4px ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".is-sticky.right-shadow::after,\n &\n .", ".is-sticky.left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, stickyHeaderZIndex, _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-surface, white)", tableStickyPadding, "var(--ds-surface, white)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overflow-perimeter, ".concat(_colors.N40A, ")"), _styles.TableSharedCssClassName.TABLE_CONTAINER, _styles.TableSharedCssClassName.TABLE_CONTAINER);
32
39
  };
33
40
  var FixedTableDiv = function FixedTableDiv(props) {
34
41
  var top = props.top,
@@ -57,19 +64,31 @@ var StickyTable = function StickyTable(_ref) {
57
64
  children = _ref.children,
58
65
  columnWidths = _ref.columnWidths,
59
66
  renderWidth = _ref.renderWidth,
60
- rowHeight = _ref.rowHeight;
61
- return (0, _react2.jsx)("div", {
62
- css: {
67
+ rowHeight = _ref.rowHeight,
68
+ tableNode = _ref.tableNode;
69
+ var styles;
70
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
71
+ if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width')) {
72
+ styles = (0, _react2.css)({
73
+ top: mode === 'pin-bottom' ? top : undefined,
74
+ position: 'relative'
75
+ });
76
+ } else {
77
+ styles = (0, _react2.css)({
63
78
  left: left && left < 0 ? left : undefined,
64
79
  top: mode === 'pin-bottom' ? top : undefined,
65
80
  position: 'relative'
66
- }
81
+ });
82
+ }
83
+ /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
84
+ return (0, _react2.jsx)("div", {
85
+ css: styles
67
86
  }, (0, _react2.jsx)(FixedTableDiv, {
68
87
  top: mode === 'stick' ? top : undefined,
69
88
  mode: rowHeight > 300 ? 'none' : mode,
70
89
  wrapperWidth: wrapperWidth
71
90
  }, (0, _react2.jsx)("div", {
72
- className: "".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, " ").concat(shadowClassNames || ''),
91
+ className: "".concat(_styles.TableSharedCssClassName.TABLE_CONTAINER, " is-sticky ").concat(shadowClassNames || ''),
73
92
  "data-layout": layout,
74
93
  style: {
75
94
  width: tableWidth
@@ -84,7 +103,8 @@ var StickyTable = function StickyTable(_ref) {
84
103
  columnWidths: columnWidths,
85
104
  layout: layout,
86
105
  isNumberColumnEnabled: isNumberColumnEnabled,
87
- renderWidth: renderWidth
106
+ renderWidth: renderWidth,
107
+ tableNode: tableNode
88
108
  },
89
109
  /**
90
110
  * @see https://product-fabric.atlassian.net/browse/ED-10235
@@ -268,7 +268,7 @@ var TableContainer = /*#__PURE__*/function (_React$Component) {
268
268
  }
269
269
  var wrapperWidth = this.wrapperRef.current ? this.wrapperRef.current.clientWidth : 0;
270
270
  var children = _react.default.Children.toArray(this.props.children);
271
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, stickyHeaders && tableCanBeSticky(tableNode, children) && /*#__PURE__*/_react.default.createElement(_sticky.StickyTable, {
271
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, !(0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') && stickyHeaders && tableCanBeSticky(tableNode, children) && /*#__PURE__*/_react.default.createElement(_sticky.StickyTable, {
272
272
  isNumberColumnEnabled: isNumberColumnEnabled,
273
273
  tableWidth: tableWidth,
274
274
  layout: layout,
@@ -288,9 +288,23 @@ var TableContainer = /*#__PURE__*/function (_React$Component) {
288
288
  ref: this.props.handleRef,
289
289
  style: {
290
290
  width: tableWidth,
291
- left: left
291
+ left: left // eslint-disable-line @atlaskit/design-system/ensure-design-token-usage
292
292
  }
293
- }, /*#__PURE__*/_react.default.createElement("div", {
293
+ }, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.custom-table-width') && stickyHeaders && tableCanBeSticky(tableNode, children) && /*#__PURE__*/_react.default.createElement(_sticky.StickyTable, {
294
+ isNumberColumnEnabled: isNumberColumnEnabled,
295
+ tableWidth: tableWidth,
296
+ layout: layout,
297
+ renderWidth: renderWidth,
298
+ handleRef: this.props.handleRef,
299
+ shadowClassNames: this.props.shadowClassNames,
300
+ top: this.stickyTop,
301
+ mode: stickyMode,
302
+ innerRef: this.stickyWrapperRef,
303
+ wrapperWidth: wrapperWidth,
304
+ columnWidths: columnWidths,
305
+ rowHeight: this.headerRowHeight,
306
+ tableNode: tableNode
307
+ }, [children && children[0]]), /*#__PURE__*/_react.default.createElement("div", {
294
308
  className: _styles.TableSharedCssClassName.TABLE_NODE_WRAPPER,
295
309
  ref: this.wrapperRef,
296
310
  onScroll: this.props.stickyHeaders && this.onWrapperScrolled
@@ -55,7 +55,7 @@ exports.NORMAL_SEVERITY_THRESHOLD = NORMAL_SEVERITY_THRESHOLD;
55
55
  var DEGRADED_SEVERITY_THRESHOLD = 3000;
56
56
  exports.DEGRADED_SEVERITY_THRESHOLD = DEGRADED_SEVERITY_THRESHOLD;
57
57
  var packageName = "@atlaskit/renderer";
58
- var packageVersion = "108.6.10";
58
+ var packageVersion = "108.7.0";
59
59
  var Renderer = /*#__PURE__*/function (_PureComponent) {
60
60
  (0, _inherits2.default)(Renderer, _PureComponent);
61
61
  var _super = _createSuper(Renderer);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.6.10",
3
+ "version": "108.7.0",
4
4
  "sideEffects": false
5
5
  }
@@ -42,7 +42,8 @@ const MediaSingle = props => {
42
42
  isInsideOfBlockNode,
43
43
  layout,
44
44
  children,
45
- width: pctWidth
45
+ width: widthAttr,
46
+ widthType
46
47
  } = props;
47
48
  const isCaptionsFlaggedOn = getMediaFeatureFlag('captions', featureFlags);
48
49
  const [externalImageDimensions, setExternalImageDimensions] = React.useState({
@@ -148,7 +149,10 @@ const MediaSingle = props => {
148
149
  height: height,
149
150
  lineLength: isInsideOfBlockNode ? containerWidth : lineLength,
150
151
  containerWidth: containerWidth,
151
- pctWidth: pctWidth,
152
+ size: {
153
+ width: widthAttr,
154
+ widthType
155
+ },
152
156
  fullWidthMode: isFullWidth
153
157
  }, jsx(Fragment, null, mediaComponent), isCaptionsFlaggedOn && caption);
154
158
  };
@@ -5,6 +5,7 @@ import { css, jsx } from '@emotion/react';
5
5
  import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
6
6
  import { akEditorStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
7
7
  import { N40A } from '@atlaskit/theme/colors';
8
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
9
  import { Table } from './table';
9
10
  import { recursivelyInjectProps } from '../../utils/inject-props';
10
11
  export const tableStickyPadding = 8;
@@ -19,12 +20,18 @@ const modeSpecficStyles = {
19
20
  position: absolute;
20
21
  `
21
22
  };
23
+ let stickyHeaderZIndex;
24
+ if (getBooleanFF('platform.editor.custom-table-width')) {
25
+ stickyHeaderZIndex = 13;
26
+ } else {
27
+ stickyHeaderZIndex = akEditorStickyHeaderZIndex;
28
+ }
22
29
 
23
30
  // TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
24
31
  const fixedTableDivStaticStyles = (top, width) => css`
25
32
  ${typeof top === 'number' && `top: ${top}px;`}
26
33
  width: ${width}px;
27
- z-index: ${akEditorStickyHeaderZIndex};
34
+ z-index: ${stickyHeaderZIndex};
28
35
  &
29
36
  .${TableSharedCssClassName.TABLE_CONTAINER},
30
37
  &
@@ -47,9 +54,9 @@ const fixedTableDivStaticStyles = (top, width) => css`
47
54
  }
48
55
 
49
56
  &
50
- .${TableSharedCssClassName.TABLE_CONTAINER}.right-shadow::after,
57
+ .${TableSharedCssClassName.TABLE_CONTAINER}.is-sticky.right-shadow::after,
51
58
  &
52
- .${TableSharedCssClassName.TABLE_CONTAINER}.left-shadow::before {
59
+ .${TableSharedCssClassName.TABLE_CONTAINER}.is-sticky.left-shadow::before {
53
60
  top: 0px;
54
61
  height: 100%;
55
62
  }
@@ -82,20 +89,32 @@ export const StickyTable = ({
82
89
  children,
83
90
  columnWidths,
84
91
  renderWidth,
85
- rowHeight
92
+ rowHeight,
93
+ tableNode
86
94
  }) => {
87
- return jsx("div", {
88
- css: {
95
+ let styles;
96
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
97
+ if (getBooleanFF('platform.editor.custom-table-width')) {
98
+ styles = css({
99
+ top: mode === 'pin-bottom' ? top : undefined,
100
+ position: 'relative'
101
+ });
102
+ } else {
103
+ styles = css({
89
104
  left: left && left < 0 ? left : undefined,
90
105
  top: mode === 'pin-bottom' ? top : undefined,
91
106
  position: 'relative'
92
- }
107
+ });
108
+ }
109
+ /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
110
+ return jsx("div", {
111
+ css: styles
93
112
  }, jsx(FixedTableDiv, {
94
113
  top: mode === 'stick' ? top : undefined,
95
114
  mode: rowHeight > 300 ? 'none' : mode,
96
115
  wrapperWidth: wrapperWidth
97
116
  }, jsx("div", {
98
- className: `${TableSharedCssClassName.TABLE_CONTAINER} ${shadowClassNames || ''}`,
117
+ className: `${TableSharedCssClassName.TABLE_CONTAINER} is-sticky ${shadowClassNames || ''}`,
99
118
  "data-layout": layout,
100
119
  style: {
101
120
  width: tableWidth
@@ -110,7 +129,8 @@ export const StickyTable = ({
110
129
  columnWidths: columnWidths,
111
130
  layout: layout,
112
131
  isNumberColumnEnabled: isNumberColumnEnabled,
113
- renderWidth: renderWidth
132
+ renderWidth: renderWidth,
133
+ tableNode: tableNode
114
134
  },
115
135
  /**
116
136
  * @see https://product-fabric.atlassian.net/browse/ED-10235
@@ -227,7 +227,7 @@ export class TableContainer extends React.Component {
227
227
  }
228
228
  const wrapperWidth = this.wrapperRef.current ? this.wrapperRef.current.clientWidth : 0;
229
229
  const children = React.Children.toArray(this.props.children);
230
- return /*#__PURE__*/React.createElement(React.Fragment, null, stickyHeaders && tableCanBeSticky(tableNode, children) && /*#__PURE__*/React.createElement(StickyTable, {
230
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !getBooleanFF('platform.editor.custom-table-width') && stickyHeaders && tableCanBeSticky(tableNode, children) && /*#__PURE__*/React.createElement(StickyTable, {
231
231
  isNumberColumnEnabled: isNumberColumnEnabled,
232
232
  tableWidth: tableWidth,
233
233
  layout: layout,
@@ -247,9 +247,23 @@ export class TableContainer extends React.Component {
247
247
  ref: this.props.handleRef,
248
248
  style: {
249
249
  width: tableWidth,
250
- left
250
+ left // eslint-disable-line @atlaskit/design-system/ensure-design-token-usage
251
251
  }
252
- }, /*#__PURE__*/React.createElement("div", {
252
+ }, getBooleanFF('platform.editor.custom-table-width') && stickyHeaders && tableCanBeSticky(tableNode, children) && /*#__PURE__*/React.createElement(StickyTable, {
253
+ isNumberColumnEnabled: isNumberColumnEnabled,
254
+ tableWidth: tableWidth,
255
+ layout: layout,
256
+ renderWidth: renderWidth,
257
+ handleRef: this.props.handleRef,
258
+ shadowClassNames: this.props.shadowClassNames,
259
+ top: this.stickyTop,
260
+ mode: stickyMode,
261
+ innerRef: this.stickyWrapperRef,
262
+ wrapperWidth: wrapperWidth,
263
+ columnWidths: columnWidths,
264
+ rowHeight: this.headerRowHeight,
265
+ tableNode: tableNode
266
+ }, [children && children[0]]), /*#__PURE__*/React.createElement("div", {
253
267
  className: TableSharedCssClassName.TABLE_NODE_WRAPPER,
254
268
  ref: this.wrapperRef,
255
269
  onScroll: this.props.stickyHeaders && this.onWrapperScrolled
@@ -35,7 +35,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
35
35
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
36
36
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
37
37
  const packageName = "@atlaskit/renderer";
38
- const packageVersion = "108.6.10";
38
+ const packageVersion = "108.7.0";
39
39
  export class Renderer extends PureComponent {
40
40
  constructor(props) {
41
41
  super(props);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.6.10",
3
+ "version": "108.7.0",
4
4
  "sideEffects": false
5
5
  }
@@ -43,7 +43,8 @@ var MediaSingle = function MediaSingle(props) {
43
43
  isInsideOfBlockNode = props.isInsideOfBlockNode,
44
44
  layout = props.layout,
45
45
  children = props.children,
46
- pctWidth = props.width;
46
+ widthAttr = props.width,
47
+ widthType = props.widthType;
47
48
  var isCaptionsFlaggedOn = getMediaFeatureFlag('captions', featureFlags);
48
49
  var _React$useState = React.useState({
49
50
  width: 0,
@@ -151,7 +152,10 @@ var MediaSingle = function MediaSingle(props) {
151
152
  height: height,
152
153
  lineLength: isInsideOfBlockNode ? containerWidth : lineLength,
153
154
  containerWidth: containerWidth,
154
- pctWidth: pctWidth,
155
+ size: {
156
+ width: widthAttr,
157
+ widthType: widthType
158
+ },
155
159
  fullWidthMode: isFullWidth
156
160
  }, jsx(Fragment, null, mediaComponent), isCaptionsFlaggedOn && caption);
157
161
  };
@@ -9,6 +9,7 @@ import { css, jsx } from '@emotion/react';
9
9
  import { TableSharedCssClassName } from '@atlaskit/editor-common/styles';
10
10
  import { akEditorStickyHeaderZIndex } from '@atlaskit/editor-shared-styles';
11
11
  import { N40A } from '@atlaskit/theme/colors';
12
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
12
13
  import { Table } from './table';
13
14
  import { recursivelyInjectProps } from '../../utils/inject-props';
14
15
  export var tableStickyPadding = 8;
@@ -17,10 +18,16 @@ var modeSpecficStyles = {
17
18
  stick: css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n position: fixed;\n "]))),
18
19
  'pin-bottom': css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n position: absolute;\n "])))
19
20
  };
21
+ var stickyHeaderZIndex;
22
+ if (getBooleanFF('platform.editor.custom-table-width')) {
23
+ stickyHeaderZIndex = 13;
24
+ } else {
25
+ stickyHeaderZIndex = akEditorStickyHeaderZIndex;
26
+ }
20
27
 
21
28
  // TODO: Quality ticket: https://product-fabric.atlassian.net/browse/DSP-4123
22
29
  var fixedTableDivStaticStyles = function fixedTableDivStaticStyles(top, width) {
23
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n tr {\n background: ", ";\n }\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: 0 6px 4px -4px ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".right-shadow::after,\n &\n .", ".left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, akEditorStickyHeaderZIndex, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-surface, white)", tableStickyPadding, "var(--ds-surface, white)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overflow-perimeter, ".concat(N40A, ")"), TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_CONTAINER);
30
+ return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n width: ", "px;\n z-index: ", ";\n &\n .", ",\n &\n .", "\n > table {\n margin-top: 0;\n margin-bottom: 0;\n tr {\n background: ", ";\n }\n }\n\n border-top: ", "px solid\n ", ";\n background: ", ";\n box-shadow: 0 6px 4px -4px ", ";\n\n div[data-expanded='false'] & {\n display: none;\n }\n\n &\n .", ".is-sticky.right-shadow::after,\n &\n .", ".is-sticky.left-shadow::before {\n top: 0px;\n height: 100%;\n }\n"])), typeof top === 'number' && "top: ".concat(top, "px;"), width, stickyHeaderZIndex, TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_STICKY_WRAPPER, "var(--ds-surface, white)", tableStickyPadding, "var(--ds-surface, white)", "var(--ds-surface-overlay, white)", "var(--ds-shadow-overflow-perimeter, ".concat(N40A, ")"), TableSharedCssClassName.TABLE_CONTAINER, TableSharedCssClassName.TABLE_CONTAINER);
24
31
  };
25
32
  export var FixedTableDiv = function FixedTableDiv(props) {
26
33
  var top = props.top,
@@ -48,19 +55,31 @@ export var StickyTable = function StickyTable(_ref) {
48
55
  children = _ref.children,
49
56
  columnWidths = _ref.columnWidths,
50
57
  renderWidth = _ref.renderWidth,
51
- rowHeight = _ref.rowHeight;
52
- return jsx("div", {
53
- css: {
58
+ rowHeight = _ref.rowHeight,
59
+ tableNode = _ref.tableNode;
60
+ var styles;
61
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
62
+ if (getBooleanFF('platform.editor.custom-table-width')) {
63
+ styles = css({
64
+ top: mode === 'pin-bottom' ? top : undefined,
65
+ position: 'relative'
66
+ });
67
+ } else {
68
+ styles = css({
54
69
  left: left && left < 0 ? left : undefined,
55
70
  top: mode === 'pin-bottom' ? top : undefined,
56
71
  position: 'relative'
57
- }
72
+ });
73
+ }
74
+ /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
75
+ return jsx("div", {
76
+ css: styles
58
77
  }, jsx(FixedTableDiv, {
59
78
  top: mode === 'stick' ? top : undefined,
60
79
  mode: rowHeight > 300 ? 'none' : mode,
61
80
  wrapperWidth: wrapperWidth
62
81
  }, jsx("div", {
63
- className: "".concat(TableSharedCssClassName.TABLE_CONTAINER, " ").concat(shadowClassNames || ''),
82
+ className: "".concat(TableSharedCssClassName.TABLE_CONTAINER, " is-sticky ").concat(shadowClassNames || ''),
64
83
  "data-layout": layout,
65
84
  style: {
66
85
  width: tableWidth
@@ -75,7 +94,8 @@ export var StickyTable = function StickyTable(_ref) {
75
94
  columnWidths: columnWidths,
76
95
  layout: layout,
77
96
  isNumberColumnEnabled: isNumberColumnEnabled,
78
- renderWidth: renderWidth
97
+ renderWidth: renderWidth,
98
+ tableNode: tableNode
79
99
  },
80
100
  /**
81
101
  * @see https://product-fabric.atlassian.net/browse/ED-10235
@@ -261,7 +261,7 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
261
261
  }
262
262
  var wrapperWidth = this.wrapperRef.current ? this.wrapperRef.current.clientWidth : 0;
263
263
  var children = React.Children.toArray(this.props.children);
264
- return /*#__PURE__*/React.createElement(React.Fragment, null, stickyHeaders && tableCanBeSticky(tableNode, children) && /*#__PURE__*/React.createElement(StickyTable, {
264
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !getBooleanFF('platform.editor.custom-table-width') && stickyHeaders && tableCanBeSticky(tableNode, children) && /*#__PURE__*/React.createElement(StickyTable, {
265
265
  isNumberColumnEnabled: isNumberColumnEnabled,
266
266
  tableWidth: tableWidth,
267
267
  layout: layout,
@@ -281,9 +281,23 @@ export var TableContainer = /*#__PURE__*/function (_React$Component) {
281
281
  ref: this.props.handleRef,
282
282
  style: {
283
283
  width: tableWidth,
284
- left: left
284
+ left: left // eslint-disable-line @atlaskit/design-system/ensure-design-token-usage
285
285
  }
286
- }, /*#__PURE__*/React.createElement("div", {
286
+ }, getBooleanFF('platform.editor.custom-table-width') && stickyHeaders && tableCanBeSticky(tableNode, children) && /*#__PURE__*/React.createElement(StickyTable, {
287
+ isNumberColumnEnabled: isNumberColumnEnabled,
288
+ tableWidth: tableWidth,
289
+ layout: layout,
290
+ renderWidth: renderWidth,
291
+ handleRef: this.props.handleRef,
292
+ shadowClassNames: this.props.shadowClassNames,
293
+ top: this.stickyTop,
294
+ mode: stickyMode,
295
+ innerRef: this.stickyWrapperRef,
296
+ wrapperWidth: wrapperWidth,
297
+ columnWidths: columnWidths,
298
+ rowHeight: this.headerRowHeight,
299
+ tableNode: tableNode
300
+ }, [children && children[0]]), /*#__PURE__*/React.createElement("div", {
287
301
  className: TableSharedCssClassName.TABLE_NODE_WRAPPER,
288
302
  ref: this.wrapperRef,
289
303
  onScroll: this.props.stickyHeaders && this.onWrapperScrolled
@@ -45,7 +45,7 @@ import { RenderTracking } from '../../react/utils/performance/RenderTracking';
45
45
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
46
46
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
47
47
  var packageName = "@atlaskit/renderer";
48
- var packageVersion = "108.6.10";
48
+ var packageVersion = "108.7.0";
49
49
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
50
50
  _inherits(Renderer, _PureComponent);
51
51
  var _super = _createSuper(Renderer);
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.6.10",
3
+ "version": "108.7.0",
4
4
  "sideEffects": false
5
5
  }
@@ -3,7 +3,7 @@ import { default as React } from 'react';
3
3
  import { WrappedComponentProps } from 'react-intl-next';
4
4
  import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
5
5
  import { MediaFeatureFlags } from '@atlaskit/media-common';
6
- import type { EventHandlers } from '@atlaskit/editor-common/ui';
6
+ import type { EventHandlers, MediaSingleWidthType } from '@atlaskit/editor-common/ui';
7
7
  import { AnalyticsEventPayload } from '../../../analytics/events';
8
8
  import { RendererAppearance } from '../../../ui/Renderer/types';
9
9
  export interface Props {
@@ -11,6 +11,7 @@ export interface Props {
11
11
  layout: MediaSingleLayout;
12
12
  eventHandlers?: EventHandlers;
13
13
  width?: number;
14
+ widthType?: MediaSingleWidthType;
14
15
  isInsideOfBlockNode?: boolean;
15
16
  rendererAppearance: RendererAppearance;
16
17
  fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
@@ -1,6 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
3
  import { jsx } from '@emotion/react';
4
+ import { Node as PMNode } from 'prosemirror-model';
4
5
  import type { OverflowShadowProps } from '@atlaskit/editor-common/ui';
5
6
  import { TableLayout } from '@atlaskit/adf-schema';
6
7
  export type StickyMode = 'none' | 'stick' | 'pin-bottom';
@@ -24,8 +25,9 @@ export type StickyTableProps = {
24
25
  layout: TableLayout;
25
26
  columnWidths?: number[];
26
27
  renderWidth: number;
28
+ tableNode?: PMNode;
27
29
  } & OverflowShadowProps;
28
- export declare const StickyTable: ({ top, left, mode, shadowClassNames, innerRef, wrapperWidth, tableWidth, isNumberColumnEnabled, layout, children, columnWidths, renderWidth, rowHeight, }: StickyTableProps) => jsx.JSX.Element;
30
+ export declare const StickyTable: ({ top, left, mode, shadowClassNames, innerRef, wrapperWidth, tableWidth, isNumberColumnEnabled, layout, children, columnWidths, renderWidth, rowHeight, tableNode, }: StickyTableProps) => jsx.JSX.Element;
29
31
  export declare class OverflowParent {
30
32
  private ref;
31
33
  private constructor();
@@ -3,7 +3,7 @@ import { default as React } from 'react';
3
3
  import { WrappedComponentProps } from 'react-intl-next';
4
4
  import { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
5
5
  import { MediaFeatureFlags } from '@atlaskit/media-common';
6
- import type { EventHandlers } from '@atlaskit/editor-common/ui';
6
+ import type { EventHandlers, MediaSingleWidthType } from '@atlaskit/editor-common/ui';
7
7
  import { AnalyticsEventPayload } from '../../../analytics/events';
8
8
  import { RendererAppearance } from '../../../ui/Renderer/types';
9
9
  export interface Props {
@@ -11,6 +11,7 @@ export interface Props {
11
11
  layout: MediaSingleLayout;
12
12
  eventHandlers?: EventHandlers;
13
13
  width?: number;
14
+ widthType?: MediaSingleWidthType;
14
15
  isInsideOfBlockNode?: boolean;
15
16
  rendererAppearance: RendererAppearance;
16
17
  fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
@@ -1,6 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  import React from 'react';
3
3
  import { jsx } from '@emotion/react';
4
+ import { Node as PMNode } from 'prosemirror-model';
4
5
  import type { OverflowShadowProps } from '@atlaskit/editor-common/ui';
5
6
  import { TableLayout } from '@atlaskit/adf-schema';
6
7
  export type StickyMode = 'none' | 'stick' | 'pin-bottom';
@@ -24,8 +25,9 @@ export type StickyTableProps = {
24
25
  layout: TableLayout;
25
26
  columnWidths?: number[];
26
27
  renderWidth: number;
28
+ tableNode?: PMNode;
27
29
  } & OverflowShadowProps;
28
- export declare const StickyTable: ({ top, left, mode, shadowClassNames, innerRef, wrapperWidth, tableWidth, isNumberColumnEnabled, layout, children, columnWidths, renderWidth, rowHeight, }: StickyTableProps) => jsx.JSX.Element;
30
+ export declare const StickyTable: ({ top, left, mode, shadowClassNames, innerRef, wrapperWidth, tableWidth, isNumberColumnEnabled, layout, children, columnWidths, renderWidth, rowHeight, tableNode, }: StickyTableProps) => jsx.JSX.Element;
29
31
  export declare class OverflowParent {
30
32
  private ref;
31
33
  private constructor();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "108.6.10",
3
+ "version": "108.7.0",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/analytics-next": "^9.1.0",
32
32
  "@atlaskit/button": "^16.8.0",
33
33
  "@atlaskit/code": "^14.6.0",
34
- "@atlaskit/editor-common": "^74.21.0",
34
+ "@atlaskit/editor-common": "^74.23.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.10.0",
36
36
  "@atlaskit/editor-palette": "1.5.1",
37
37
  "@atlaskit/editor-shared-styles": "^2.4.0",
@@ -69,9 +69,10 @@
69
69
  "react-dom": "^16.8.0"
70
70
  },
71
71
  "devDependencies": {
72
+ "@af/visual-regression": "*",
72
73
  "@atlaskit/analytics-gas-types": "^5.1.0",
73
74
  "@atlaskit/css-reset": "^6.5.0",
74
- "@atlaskit/editor-core": "^185.16.0",
75
+ "@atlaskit/editor-core": "^186.0.0",
75
76
  "@atlaskit/editor-test-helpers": "^18.10.0",
76
77
  "@atlaskit/link-provider": "^1.6.0",
77
78
  "@atlaskit/link-test-helpers": "^4.1.0",
@@ -0,0 +1,546 @@
1
+ ## API Report File for "@atlaskit/renderer"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ /// <reference types="react" />
8
+
9
+ import { ACTION } from '@atlaskit/editor-common/analytics';
10
+ import { ACTION_SUBJECT } from '@atlaskit/editor-common/analytics';
11
+ import { ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
12
+ import type { ADFStage } from '@atlaskit/editor-common/validator';
13
+ import type { AnnotationProviders } from '@atlaskit/editor-common/types';
14
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
15
+ import { DocNode } from '@atlaskit/adf-schema';
16
+ import { EmojiResourceConfig } from '@atlaskit/emoji/resource';
17
+ import { EVENT_TYPE } from '@atlaskit/editor-common/analytics';
18
+ import type { EventHandlers } from '@atlaskit/editor-common/ui';
19
+ import type { ExtensionHandlers } from '@atlaskit/editor-common/extensions';
20
+ import { Fragment } from 'prosemirror-model';
21
+ import { jsx } from '@emotion/react';
22
+ import { Mark } from 'prosemirror-model';
23
+ import { MediaClientConfig } from '@atlaskit/media-core';
24
+ import { MediaFeatureFlags } from '@atlaskit/media-common';
25
+ import { Node as Node_2 } from 'prosemirror-model';
26
+ import { OperationalAEP } from '@atlaskit/editor-common/analytics';
27
+ import { PropsDifference } from '@atlaskit/editor-common/utils';
28
+ import { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
29
+ import { Schema } from 'prosemirror-model';
30
+ import { SEVERITY } from '@atlaskit/editor-common/utils';
31
+ import { ShallowPropsDifference } from '@atlaskit/editor-common/utils';
32
+ import { SortOrder } from '@atlaskit/editor-common/types';
33
+ import { SSR } from '@atlaskit/media-common';
34
+ import type { Transformer as Transformer_2 } from '@atlaskit/editor-common/types';
35
+ import { UNSUPPORTED_CONTENT_LEVEL_SEVERITY } from '@atlaskit/editor-common/utils';
36
+ import type { UnsupportedContentLevelsTracking } from '@atlaskit/editor-common/utils';
37
+ import type { UnsupportedContentPayload } from '@atlaskit/editor-common/utils';
38
+ import type { UnsupportedContentTooltipPayload } from '@atlaskit/editor-common/utils';
39
+
40
+ // @public (undocumented)
41
+ export class ADFEncoder<T> {
42
+ constructor(createTransformerWithSchema: TransformerProvider<T>);
43
+ // (undocumented)
44
+ encode: (value: T) => any;
45
+ }
46
+
47
+ // @public (undocumented)
48
+ type AEP<Action, ActionSubject, ActionSubjectID, Attributes, EventType> = {
49
+ action: Action;
50
+ actionSubject: ActionSubject;
51
+ actionSubjectId?: ActionSubjectID;
52
+ attributes?: Attributes;
53
+ eventType: EventType;
54
+ };
55
+
56
+ // @public (undocumented)
57
+ type AnalyticsEventPayload<T = void> = AnchorLinkAEP | AnnotationAEP | AnnotationDeleteAEP | CodeBlockCopyAEP | CodeBlockWrapAEP | ComponentCrashErrorAEP | ExpandAEP | HeadingAnchorLinkButtonAEP | InvalidProsemirrorDocumentErrorAEP | MediaLnkTransformedAEP | RendererReRenderedAEP<T> | RendererRenderedAEP | RendererSelectAllCaughtAEP | RendererSelectAllEscapedAEP | RendererStartAEP | RendererTTIAEP | RendererUnsupportedContentLevelsTrackingErrored | RendererUnsupportedContentLevelsTrackingSucceeded | TableSortColumnAEP | TableSortColumnNotAllowedAEP | UnsupportedContentPayload | UnsupportedContentTooltipPayload | VisitLinkAEP | VisitMediaLinkAEP;
58
+
59
+ // @public (undocumented)
60
+ type AnchorLinkAEP = UIAEP<ACTION.VIEWED, ACTION_SUBJECT.ANCHOR_LINK, undefined, {
61
+ platform: PLATFORM.WEB;
62
+ mode: MODE.RENDERER;
63
+ }>;
64
+
65
+ // @public (undocumented)
66
+ type AnnotationActionType = ACTION.CLOSED | ACTION.CREATE_NOT_ALLOWED | ACTION.DELETED | ACTION.EDITED | ACTION.INSERTED | ACTION.OPENED | ACTION.RESOLVED | ACTION.VIEWED;
67
+
68
+ // @public (undocumented)
69
+ type AnnotationAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID.INLINE_COMMENT, AnnotationAEPAttributes, undefined>;
70
+
71
+ // @public (undocumented)
72
+ type AnnotationAEPAttributes = AnnotationDraftAEPAttributes | AnnotationResolvedAEPAttributes;
73
+
74
+ // @public (undocumented)
75
+ type AnnotationDeleteAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID, undefined, EVENT_TYPE.TRACK>;
76
+
77
+ // @public (undocumented)
78
+ type AnnotationDraftAEPAttributes = {
79
+ overlap?: number;
80
+ };
81
+
82
+ // @public (undocumented)
83
+ type AnnotationResolvedAEPAttributes = {
84
+ method?: RESOLVE_METHOD;
85
+ };
86
+
87
+ // @public (undocumented)
88
+ type ButtonAEP<ActionSubjectID, Attributes> = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.BUTTON, ActionSubjectID, Attributes>;
89
+
90
+ // @public (undocumented)
91
+ type CodeBlockCopyAEP = ButtonAEP<ACTION_SUBJECT_ID.CODEBLOCK_COPY, undefined>;
92
+
93
+ // @public (undocumented)
94
+ type CodeBlockWrapAEP = ButtonAEP<ACTION_SUBJECT_ID.CODEBLOCK_WRAP, {
95
+ wrapped: boolean;
96
+ }>;
97
+
98
+ // @public (undocumented)
99
+ type ComponentCrashErrorAEP = OperationalAEP<ACTION.CRASHED, ACTION_SUBJECT.RENDERER, ACTION_SUBJECT_ID, {
100
+ platform: PLATFORM.WEB;
101
+ errorMessage?: string;
102
+ errorStack?: string;
103
+ componentStack?: string;
104
+ errorRethrown?: boolean;
105
+ }, {
106
+ errorStack?: string;
107
+ }>;
108
+
109
+ // @public (undocumented)
110
+ type DispatchAnalyticsEvent = (event: AnalyticsEventPayload) => void;
111
+
112
+ // @public (undocumented)
113
+ type ExpandAEP = AEP<ACTION.TOGGLE_EXPAND, ACTION_SUBJECT.EXPAND | ACTION_SUBJECT.NESTED_EXPAND, undefined, {
114
+ platform: PLATFORM.WEB;
115
+ mode: MODE.RENDERER;
116
+ expanded: boolean;
117
+ }, EVENT_TYPE.TRACK>;
118
+
119
+ // @public (undocumented)
120
+ type HeadingAnchorLinkButtonAEP = ButtonAEP<ACTION_SUBJECT_ID.HEADING_ANCHOR_LINK, undefined>;
121
+
122
+ // @public (undocumented)
123
+ type HeadingAnchorLinksConfig = {
124
+ activeHeadingId?: string;
125
+ allowNestedHeaderLinks?: boolean;
126
+ };
127
+
128
+ // @public (undocumented)
129
+ export type HeadingAnchorLinksProps = HeadingAnchorLinksConfig | boolean;
130
+
131
+ // @public (undocumented)
132
+ type InvalidProsemirrorDocumentErrorAEP = AEP<ACTION.INVALID_PROSEMIRROR_DOCUMENT, ACTION_SUBJECT.RENDERER, ACTION_SUBJECT_ID, {
133
+ platform: PLATFORM.WEB;
134
+ errorStack?: string;
135
+ }, EVENT_TYPE.OPERATIONAL>;
136
+
137
+ // @public (undocumented)
138
+ type MediaLnkTransformedAEP = AEP<ACTION.MEDIA_LINK_TRANSFORMED, ACTION_SUBJECT.RENDERER, undefined, undefined, EVENT_TYPE.OPERATIONAL>;
139
+
140
+ // @public (undocumented)
141
+ interface MediaOptions {
142
+ // (undocumented)
143
+ allowLinking?: boolean;
144
+ // (undocumented)
145
+ enableDownloadButton?: boolean;
146
+ // (undocumented)
147
+ featureFlags?: MediaFeatureFlags;
148
+ // (undocumented)
149
+ ssr?: MediaSSR;
150
+ }
151
+
152
+ // @public (undocumented)
153
+ export type MediaSSR = {
154
+ mode: SSR;
155
+ config: MediaClientConfig;
156
+ };
157
+
158
+ // @public (undocumented)
159
+ enum MODE {
160
+ // (undocumented)
161
+ EDITOR = "editor",
162
+ // (undocumented)
163
+ RENDERER = "renderer"
164
+ }
165
+
166
+ // @public (undocumented)
167
+ type NodeComponentsProps = {
168
+ [key: string]: React.ComponentType<any>;
169
+ };
170
+
171
+ // @public (undocumented)
172
+ interface ParentInfo {
173
+ // (undocumented)
174
+ parentIsIncompleteTask: boolean;
175
+ // (undocumented)
176
+ path: Array<Node_2>;
177
+ // (undocumented)
178
+ pos: number;
179
+ }
180
+
181
+ // @public (undocumented)
182
+ enum PLATFORM {
183
+ // (undocumented)
184
+ HYBRID = "mobileHybrid",
185
+ // (undocumented)
186
+ NATIVE = "mobileNative",
187
+ // (undocumented)
188
+ WEB = "web"
189
+ }
190
+
191
+ // @public (undocumented)
192
+ interface RawObjectFeatureFlags {
193
+ // (undocumented)
194
+ ['renderer-render-tracking']: string;
195
+ }
196
+
197
+ // @public (undocumented)
198
+ export const ReactRenderer: (props: RendererProps) => jsx.JSX.Element;
199
+
200
+ // @public (undocumented)
201
+ export class ReactSerializer implements Serializer<JSX.Element> {
202
+ constructor(init: ReactSerializerInit);
203
+ // (undocumented)
204
+ static buildMarkStructure(content: Node_2[]): Mark[];
205
+ // (undocumented)
206
+ static fromSchema(_: unknown, init: ReactSerializerInit): ReactSerializer;
207
+ // (undocumented)
208
+ static getChildNodes(fragment: Fragment): (Node_2 | TextWrapper)[];
209
+ // (undocumented)
210
+ static getMarks(node: Node_2): Mark[];
211
+ // (undocumented)
212
+ serializeFragment(fragment: Fragment, props?: any, target?: any, key?: string, parentInfo?: ParentInfo): JSX.Element | null;
213
+ }
214
+
215
+ // @public (undocumented)
216
+ interface ReactSerializerInit {
217
+ // (undocumented)
218
+ allowAltTextOnImages?: boolean;
219
+ // (undocumented)
220
+ allowAnnotations?: boolean;
221
+ // (undocumented)
222
+ allowColumnSorting?: boolean;
223
+ // (undocumented)
224
+ allowCopyToClipboard?: boolean;
225
+ // (undocumented)
226
+ allowCustomPanels?: boolean;
227
+ // (undocumented)
228
+ allowHeadingAnchorLinks?: HeadingAnchorLinksProps;
229
+ // (undocumented)
230
+ allowMediaLinking?: boolean;
231
+ // (undocumented)
232
+ allowPlaceholderText?: boolean;
233
+ // (undocumented)
234
+ allowSelectAllTrap?: boolean;
235
+ // (undocumented)
236
+ allowWindowedCodeBlock?: boolean;
237
+ // (undocumented)
238
+ allowWrapCodeBlock?: boolean;
239
+ // (undocumented)
240
+ appearance?: RendererAppearance;
241
+ // (undocumented)
242
+ disableActions?: boolean;
243
+ // (undocumented)
244
+ disableHeadingIDs?: boolean;
245
+ // (undocumented)
246
+ emojiResourceConfig?: EmojiResourceConfig;
247
+ // (undocumented)
248
+ eventHandlers?: EventHandlers;
249
+ // (undocumented)
250
+ extensionHandlers?: ExtensionHandlers;
251
+ // (undocumented)
252
+ fireAnalyticsEvent?: (event: AnalyticsEventPayload) => void;
253
+ // (undocumented)
254
+ media?: MediaOptions;
255
+ // (undocumented)
256
+ nodeComponents?: NodeComponentsProps;
257
+ // (undocumented)
258
+ objectContext?: RendererContext;
259
+ // (undocumented)
260
+ portal?: HTMLElement;
261
+ // (undocumented)
262
+ providers?: ProviderFactory;
263
+ // (undocumented)
264
+ shouldOpenMediaViewer?: boolean;
265
+ // (undocumented)
266
+ smartLinks?: SmartLinksOptions;
267
+ // (undocumented)
268
+ stickyHeaders?: StickyHeaderConfig;
269
+ // (undocumented)
270
+ surroundTextNodesWithTextWrapper?: boolean;
271
+ }
272
+
273
+ // @public (undocumented)
274
+ export const renderDocument: <T>(doc: any, serializer: Serializer<T>, schema?: Schema, adfStage?: ADFStage, useSpecBasedValidator?: boolean, rendererId?: string, dispatchAnalyticsEvent?: DispatchAnalyticsEvent, unsupportedContentLevelsTracking?: UnsupportedContentLevelsTracking, appearance?: RendererAppearance) => RenderOutput<T | null>;
275
+
276
+ // @public (undocumented)
277
+ export type RendererAppearance = 'comment' | 'full-page' | 'full-width' | 'mobile' | undefined;
278
+
279
+ // @public (undocumented)
280
+ export interface RendererContext {
281
+ // (undocumented)
282
+ adDoc?: any;
283
+ // (undocumented)
284
+ containerAri?: string;
285
+ // (undocumented)
286
+ objectAri?: string;
287
+ // (undocumented)
288
+ schema?: Schema;
289
+ }
290
+
291
+ // @public (undocumented)
292
+ export interface RendererProps {
293
+ // (undocumented)
294
+ adfStage?: ADFStage;
295
+ // (undocumented)
296
+ allowAltTextOnImages?: boolean;
297
+ // (undocumented)
298
+ allowAnnotations?: boolean;
299
+ // (undocumented)
300
+ allowColumnSorting?: boolean;
301
+ // (undocumented)
302
+ allowCopyToClipboard?: boolean;
303
+ // (undocumented)
304
+ allowCustomPanels?: boolean;
305
+ // (undocumented)
306
+ allowHeadingAnchorLinks?: HeadingAnchorLinksProps;
307
+ // (undocumented)
308
+ allowPlaceholderText?: boolean;
309
+ // (undocumented)
310
+ allowSelectAllTrap?: boolean;
311
+ // (undocumented)
312
+ allowUgcScrubber?: boolean;
313
+ // (undocumented)
314
+ allowWrapCodeBlock?: boolean;
315
+ // (undocumented)
316
+ analyticsEventSeverityTracking?: {
317
+ enabled: boolean;
318
+ severityNormalThreshold: number;
319
+ severityDegradedThreshold: number;
320
+ };
321
+ // (undocumented)
322
+ annotationProvider?: AnnotationProviders | null;
323
+ // (undocumented)
324
+ appearance?: RendererAppearance;
325
+ // (undocumented)
326
+ createAnalyticsEvent?: CreateUIAnalyticsEvent;
327
+ // (undocumented)
328
+ dataProviders?: ProviderFactory;
329
+ // (undocumented)
330
+ disableActions?: boolean;
331
+ // (undocumented)
332
+ disableHeadingIDs?: boolean;
333
+ // (undocumented)
334
+ document: DocNode;
335
+ // (undocumented)
336
+ emojiResourceConfig?: EmojiResourceConfig;
337
+ // (undocumented)
338
+ enableSsrInlineScripts?: boolean;
339
+ // (undocumented)
340
+ eventHandlers?: EventHandlers;
341
+ // (undocumented)
342
+ extensionHandlers?: ExtensionHandlers;
343
+ // (undocumented)
344
+ fadeOutHeight?: number;
345
+ featureFlags?: Partial<RawObjectFeatureFlags> | {
346
+ [featureFlag: string]: boolean;
347
+ };
348
+ // (undocumented)
349
+ innerRef?: React.RefObject<HTMLDivElement>;
350
+ // (undocumented)
351
+ maxHeight?: number;
352
+ // (undocumented)
353
+ media?: MediaOptions;
354
+ // (undocumented)
355
+ nodeComponents?: NodeComponentsProps;
356
+ // (undocumented)
357
+ onComplete?: (stat: RenderOutputStat) => void;
358
+ // (undocumented)
359
+ onError?: (error: any) => void;
360
+ // (undocumented)
361
+ portal?: HTMLElement;
362
+ // (undocumented)
363
+ rendererContext?: RendererContext;
364
+ // (undocumented)
365
+ schema?: Schema;
366
+ // (undocumented)
367
+ shouldOpenMediaViewer?: boolean;
368
+ // (undocumented)
369
+ smartLinks?: SmartLinksOptions;
370
+ // (undocumented)
371
+ stickyHeaders?: StickyHeaderProps;
372
+ // (undocumented)
373
+ truncated?: boolean;
374
+ // (undocumented)
375
+ unsupportedContentLevelsTracking?: UnsupportedContentLevelsTracking;
376
+ // (undocumented)
377
+ useSpecBasedValidator?: boolean;
378
+ }
379
+
380
+ // @public (undocumented)
381
+ type RendererRenderedAEP = AEP<ACTION.RENDERED, ACTION_SUBJECT.RENDERER, undefined, {
382
+ platform: PLATFORM.WEB;
383
+ duration: number;
384
+ distortedDuration: boolean;
385
+ ttfb?: number;
386
+ nodes: Record<string, number>;
387
+ severity?: SEVERITY;
388
+ }, EVENT_TYPE.OPERATIONAL>;
389
+
390
+ // @public (undocumented)
391
+ type RendererReRenderedAEP<Props> = AEP<ACTION.RE_RENDERED, ACTION_SUBJECT.RENDERER, undefined, {
392
+ propsDifference: PropsDifference<Props> | ShallowPropsDifference<Props>;
393
+ count: number;
394
+ componentId?: string;
395
+ }, EVENT_TYPE.OPERATIONAL>;
396
+
397
+ // @public (undocumented)
398
+ type RendererSelectAllCaughtAEP = AEP<ACTION.SELECT_ALL_CAUGHT, ACTION_SUBJECT.RENDERER, undefined, {
399
+ platform: PLATFORM.WEB;
400
+ }, EVENT_TYPE.TRACK>;
401
+
402
+ // @public (undocumented)
403
+ type RendererSelectAllEscapedAEP = AEP<ACTION.SELECT_ALL_ESCAPED, ACTION_SUBJECT.RENDERER, undefined, {
404
+ platform: PLATFORM.WEB;
405
+ }, EVENT_TYPE.TRACK>;
406
+
407
+ // @public (undocumented)
408
+ type RendererStartAEP = AEP<ACTION.STARTED, ACTION_SUBJECT.RENDERER, undefined, {
409
+ platform: PLATFORM.WEB;
410
+ }, EVENT_TYPE.UI>;
411
+
412
+ // @public (undocumented)
413
+ type RendererTTIAEP = AEP<ACTION.RENDERER_TTI, ACTION_SUBJECT.RENDERER, undefined, {
414
+ tti: number;
415
+ ttiFromInvocation: number;
416
+ canceled: boolean;
417
+ }, EVENT_TYPE.OPERATIONAL>;
418
+
419
+ // @public (undocumented)
420
+ type RendererUnsupportedContentLevelsTrackingErrored = AEP<ACTION.UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED, ACTION_SUBJECT.RENDERER, undefined, {
421
+ platform: PLATFORM.WEB;
422
+ error: string;
423
+ }, EVENT_TYPE.OPERATIONAL>;
424
+
425
+ // @public (undocumented)
426
+ type RendererUnsupportedContentLevelsTrackingSucceeded = AEP<ACTION.UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED, ACTION_SUBJECT.RENDERER, undefined, {
427
+ appearance?: string;
428
+ platform: PLATFORM.WEB;
429
+ unsupportedContentLevelSeverity: UNSUPPORTED_CONTENT_LEVEL_SEVERITY;
430
+ unsupportedContentLevelPercentage: number;
431
+ unsupportedNodesCount: number;
432
+ supportedNodesCount: number;
433
+ }, EVENT_TYPE.OPERATIONAL>;
434
+
435
+ // @public (undocumented)
436
+ interface RenderOutput<T> {
437
+ // (undocumented)
438
+ pmDoc?: Node_2;
439
+ // (undocumented)
440
+ result: T;
441
+ // (undocumented)
442
+ stat: RenderOutputStat;
443
+ }
444
+
445
+ // @public (undocumented)
446
+ export interface RenderOutputStat {
447
+ // (undocumented)
448
+ buildTreeTime?: number;
449
+ // (undocumented)
450
+ sanitizeTime: number;
451
+ // (undocumented)
452
+ serializeTime?: number;
453
+ }
454
+
455
+ // @public (undocumented)
456
+ enum RESOLVE_METHOD {
457
+ // (undocumented)
458
+ COMPONENT = "component",
459
+ // (undocumented)
460
+ CONSUMER = "consumer",
461
+ // (undocumented)
462
+ ORPHANED = "orphaned"
463
+ }
464
+
465
+ // @public (undocumented)
466
+ export interface Serializer<T> {
467
+ // (undocumented)
468
+ serializeFragment(fragment: Fragment, props?: any, target?: any, key?: string): T | null;
469
+ }
470
+
471
+ // @public (undocumented)
472
+ interface SmartLinksOptions {
473
+ // (undocumented)
474
+ showAuthTooltip?: boolean;
475
+ // (undocumented)
476
+ showServerActions?: boolean;
477
+ // (undocumented)
478
+ ssr?: boolean;
479
+ }
480
+
481
+ // @public (undocumented)
482
+ type StickyHeaderConfig = {
483
+ offsetTop?: number;
484
+ };
485
+
486
+ // @public (undocumented)
487
+ type StickyHeaderProps = ({
488
+ show?: boolean;
489
+ } & StickyHeaderConfig) | boolean;
490
+
491
+ // @public (undocumented)
492
+ type TableSortColumnAEP = AEP<ACTION.SORT_COLUMN, ACTION_SUBJECT.TABLE, undefined, {
493
+ platform: PLATFORM.WEB;
494
+ mode: MODE.RENDERER;
495
+ sortOrder: SortOrder;
496
+ columnIndex: number;
497
+ }, EVENT_TYPE.TRACK>;
498
+
499
+ // @public (undocumented)
500
+ type TableSortColumnNotAllowedAEP = AEP<ACTION.SORT_COLUMN_NOT_ALLOWED, ACTION_SUBJECT.TABLE, undefined, {
501
+ platform: PLATFORM.WEB;
502
+ mode: MODE.RENDERER;
503
+ }, EVENT_TYPE.TRACK>;
504
+
505
+ // @public (undocumented)
506
+ export class TextSerializer implements Serializer<string> {
507
+ constructor(schema: Schema);
508
+ // (undocumented)
509
+ static fromSchema(schema?: Schema): TextSerializer;
510
+ // (undocumented)
511
+ serializeFragment(fragment: Fragment): string;
512
+ }
513
+
514
+ // @public (undocumented)
515
+ interface TextWrapper {
516
+ // (undocumented)
517
+ content: Node_2[];
518
+ // (undocumented)
519
+ nodeSize: number;
520
+ // (undocumented)
521
+ type: {
522
+ name: 'textWrapper';
523
+ };
524
+ }
525
+
526
+ // @public (undocumented)
527
+ type TransformerProvider<T> = (schema: Schema) => Transformer_2<T>;
528
+
529
+ // @public (undocumented)
530
+ type UIAEP<Action, ActionSubject, ActionSubjectID, Attributes> = AEP<Action, ActionSubject, ActionSubjectID, Attributes, EVENT_TYPE.UI>;
531
+
532
+ // @public (undocumented)
533
+ type VisitLinkAEP = AEP<ACTION.VISITED, ACTION_SUBJECT.LINK, undefined, {
534
+ platform: PLATFORM.WEB;
535
+ mode: MODE.RENDERER;
536
+ }, EVENT_TYPE.TRACK>;
537
+
538
+ // @public (undocumented)
539
+ type VisitMediaLinkAEP = AEP<ACTION.VISITED, ACTION_SUBJECT.MEDIA, ACTION_SUBJECT_ID.LINK, {
540
+ platform: PLATFORM.WEB;
541
+ mode: MODE.RENDERER;
542
+ }, EVENT_TYPE.TRACK>;
543
+
544
+ // (No @packageDocumentation comment for this package)
545
+
546
+ ```