@atlaskit/renderer 140.2.4 → 140.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/react/index.js +3 -1
  3. package/dist/cjs/react/marks/link-compiled.js +1 -1
  4. package/dist/cjs/react/nodes/extension.js +5 -3
  5. package/dist/cjs/react/nodes/heading.js +1 -1
  6. package/dist/cjs/react/nodes/layoutColumn-compiled.js +1 -1
  7. package/dist/cjs/react/nodes/panel-compiled.js +1 -1
  8. package/dist/cjs/react/nodes/tableRow.js +45 -8
  9. package/dist/cjs/react/utils/markBlockAsInline.js +12 -6
  10. package/dist/cjs/ui/Renderer/index.js +1 -1
  11. package/dist/es2019/react/index.js +3 -2
  12. package/dist/es2019/react/marks/link-compiled.js +1 -1
  13. package/dist/es2019/react/nodes/extension.js +5 -3
  14. package/dist/es2019/react/nodes/heading.js +1 -1
  15. package/dist/es2019/react/nodes/layoutColumn-compiled.js +1 -1
  16. package/dist/es2019/react/nodes/panel-compiled.js +1 -1
  17. package/dist/es2019/react/nodes/tableRow.js +39 -1
  18. package/dist/es2019/react/utils/markBlockAsInline.js +11 -6
  19. package/dist/es2019/ui/Renderer/index.js +1 -1
  20. package/dist/esm/react/index.js +3 -1
  21. package/dist/esm/react/marks/link-compiled.js +1 -1
  22. package/dist/esm/react/nodes/extension.js +5 -3
  23. package/dist/esm/react/nodes/heading.js +1 -1
  24. package/dist/esm/react/nodes/layoutColumn-compiled.js +1 -1
  25. package/dist/esm/react/nodes/panel-compiled.js +1 -1
  26. package/dist/esm/react/nodes/tableRow.js +43 -7
  27. package/dist/esm/react/utils/markBlockAsInline.js +12 -6
  28. package/dist/esm/ui/Renderer/index.js +1 -1
  29. package/dist/types/react/nodes/tableRow.d.ts +1 -9
  30. package/dist/types/react/utils/markBlockAsInline.d.ts +2 -1
  31. package/package.json +12 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 140.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - [`5adb85a596691`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5adb85a596691) -
8
+ [ux] Replace native Forge outputType: inline with layout: inline-bodied. Consumers must use the
9
+ new layout declaration; stored nodes remain bodiedExtension with rich content. Preserve legacy
10
+ Connect parameters, native markers, and every existing feature gate, including
11
+ platform_forge_inline_bodied_macro. Align quick insertion, auto-conversion, configuration saves,
12
+ and view rendering with the new contract.
13
+
14
+ Persist Custom UI inline-bodied presentation in parameters.layout, separately from app
15
+ configuration, and use it for outer page composition behind
16
+ platform_forge_inline_bodied_layout_switch. Preserve Connect migration behaviour, keep unsupported
17
+ nested macros as blocks, and cover gate-off rendering.
18
+
19
+ ## 140.2.5
20
+
21
+ ### Patch Changes
22
+
23
+ - [`4337ad329e99f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4337ad329e99f) -
24
+ Convert TableRow to a functional component behind platform_renderer_table_row_functional.
25
+ - Updated dependencies
26
+
3
27
  ## 140.2.4
4
28
 
5
29
  ### Patch Changes
@@ -317,7 +317,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
317
317
  if (key === 'root-0') {
318
318
  this.resetState();
319
319
  }
320
- return this.renderNode(target, props, key, (0, _expandBody.mergeExpandBodyText)(this.getChildNodes(fragment).map(function (node, index) {
320
+ return this.renderNode(target, props, key, (0, _expandBody.mergeExpandBodyText)(this.getChildNodes(fragment, !(parentInfo !== null && parentInfo !== void 0 && parentInfo.path.length)).map(function (node, index) {
321
321
  if ((0, _nodes.isTextWrapper)(node)) {
322
322
  return _this2.serializeTextWrapper(node.content, {
323
323
  index: index,
@@ -796,6 +796,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
796
796
  key: "getChildNodes",
797
797
  value: function getChildNodes(fragment) {
798
798
  var _this8 = this;
799
+ var isTopLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
799
800
  var children = [];
800
801
  fragment.forEach(function (node) {
801
802
  children.push(node);
@@ -809,6 +810,7 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
809
810
  _this8.inlinePositions.add(pos);
810
811
  },
811
812
  parentPos: this.startPos,
813
+ isTopLevel: isTopLevel,
812
814
  shouldDisplayExtensionAsInline: this.shouldDisplayExtensionAsInline
813
815
  });
814
816
  }
@@ -1,4 +1,4 @@
1
- /* link-compiled.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* link-compiled.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -80,7 +80,7 @@ var FireExtensionAsInlineAnalytics = function FireExtensionAsInlineAnalytics(_re
80
80
  return null;
81
81
  };
82
82
  var renderExtension = exports.renderExtension = function renderExtension(content, layout) {
83
- var _node$parameters;
83
+ var _node$parameters, _node$parameters2;
84
84
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
85
85
  var removeOverflow = arguments.length > 3 ? arguments[3] : undefined;
86
86
  var extensionId = arguments.length > 4 ? arguments[4] : undefined;
@@ -114,7 +114,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
114
114
  var viewportSize = getViewportSize(extensionId, extensionViewportSizes);
115
115
  var extensionHeight = nodeHeight || viewportSize;
116
116
  /**
117
- * Scoped to nodes inserted by an app declaring `outputType: inline`, which is what writes
117
+ * Scoped to nodes inserted by an app declaring `layout: inline-bodied`, which is what writes
118
118
  * `atlassianForgeInlineBodied`. The output-type marker alone would also match migrated Connect
119
119
  * content — it carries the same marker, and after an upgrade plus a storage round trip in the
120
120
  * same shape — so keying on it would change how existing content renders. The renderer only
@@ -127,6 +127,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
127
127
  */
128
128
  var hasForgeInlineBodiedMarker = Boolean((node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.content) && (node === null || node === void 0 || (_node$parameters = node.parameters) === null || _node$parameters === void 0 || (_node$parameters = _node$parameters.guestParams) === null || _node$parameters === void 0 ? void 0 : _node$parameters[FORGE_INLINE_BODIED_PARAM]) === 'true');
129
129
  var isForgeInlineBodiedEnabled = hasForgeInlineBodiedMarker && (0, _fg.fg)('platform_forge_inline_bodied_macro');
130
+ var isInlineBodiedLayoutEnabled = (node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.type) === 'bodiedExtension' && (node === null || node === void 0 || (_node$parameters2 = node.parameters) === null || _node$parameters2 === void 0 ? void 0 : _node$parameters2.layout) === 'inline-bodied' && (0, _fg.fg)('platform_forge_inline_bodied_layout_switch') && (0, _fg.fg)('platform_forge_inline_bodied_macro');
130
131
  /**
131
132
  * The pass that marks the sibling textblocks around an inline extension resolves their
132
133
  * positions without a depth term, so it only ever matches at the top level. Inlining a nested
@@ -134,7 +135,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
134
135
  * which is worse than leaving it a block — so keep nested inline-bodied Forge macros as
135
136
  * blocks until the sibling marking works at depth.
136
137
  */
137
- var isNestedForgeInlineBodied = !isTopLevel && isForgeInlineBodiedEnabled;
138
+ var isNestedForgeInlineBodied = !isTopLevel && (isForgeInlineBodiedEnabled || isInlineBodiedLayoutEnabled);
138
139
  var isInline = (shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node)) && (0, _expValEquals.expValEquals)('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && !isNestedForgeInlineBodied;
139
140
  var inlineClassName = isInline ? _consts.RendererCssClassName.EXTENSION_AS_INLINE : '';
140
141
  /**
@@ -148,6 +149,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
148
149
  * Migrated inline-bodied macros intentionally do not receive the native Forge marker. Mark the
149
150
  * rendered wrapper instead so the stylesheet can fix only the surrounding text flow without
150
151
  * applying the native nested-renderer, overflow or sizing rules to migrated content.
152
+ * Custom UI also uses this outer text-flow treatment, without styling inside its iframe.
151
153
  */
152
154
  var isMigratedInlineBodied = Boolean(isInline && (node === null || node === void 0 ? void 0 : node.content) && !hasForgeInlineBodiedMarker && (0, _fg.fg)('platform_forge_inline_bodied_macro'));
153
155
  var asInlineAnalytics = isInline && fireAnalyticsEvent && node ? (0, _react.jsx)(FireExtensionAsInlineAnalytics, {
@@ -1,4 +1,4 @@
1
- /* heading.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* heading.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -1,4 +1,4 @@
1
- /* layoutColumn-compiled.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* layoutColumn-compiled.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  /**
3
3
  * Compiled branch of the `platform_editor_renderer_static_css` experiment.
4
4
  * Used via `componentWithCondition` in `layoutColumn.tsx`.
@@ -1,4 +1,4 @@
1
- /* panel-compiled.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* panel-compiled.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  "use strict";
3
3
 
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.default = void 0;
7
+ exports.default = TableRow;
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
@@ -12,6 +12,7 @@ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/ge
12
12
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
13
13
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
14
  var _react = _interopRequireDefault(require("react"));
15
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
15
16
  var _utils = require("@atlaskit/editor-common/utils");
16
17
  var _types = require("@atlaskit/editor-common/types");
17
18
  var _consts = require("../../consts");
@@ -19,14 +20,14 @@ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0,
19
20
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
20
21
  // Ignored via go/ees005
21
22
  // eslint-disable-next-line @repo/internal/react/no-class-components
22
- var TableRow = exports.default = /*#__PURE__*/function (_React$Component) {
23
- function TableRow() {
23
+ var TableRowLegacy = /*#__PURE__*/function (_React$Component) {
24
+ function TableRowLegacy() {
24
25
  var _this;
25
- (0, _classCallCheck2.default)(this, TableRow);
26
+ (0, _classCallCheck2.default)(this, TableRowLegacy);
26
27
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
27
28
  args[_key] = arguments[_key];
28
29
  }
29
- _this = _callSuper(this, TableRow, [].concat(args));
30
+ _this = _callSuper(this, TableRowLegacy, [].concat(args));
30
31
  (0, _defineProperty2.default)(_this, "state", {
31
32
  colGroupWidths: []
32
33
  });
@@ -69,8 +70,8 @@ var TableRow = exports.default = /*#__PURE__*/function (_React$Component) {
69
70
  });
70
71
  return _this;
71
72
  }
72
- (0, _inherits2.default)(TableRow, _React$Component);
73
- return (0, _createClass2.default)(TableRow, [{
73
+ (0, _inherits2.default)(TableRowLegacy, _React$Component);
74
+ return (0, _createClass2.default)(TableRowLegacy, [{
74
75
  key: "render",
75
76
  value: function render() {
76
77
  var _this$props2 = this.props,
@@ -90,4 +91,40 @@ var TableRow = exports.default = /*#__PURE__*/function (_React$Component) {
90
91
  }, this.props.index), (0, _utils.compose)(this.addSortableColumn, this.addColGroupWidth)(childrenArray));
91
92
  }
92
93
  }]);
93
- }(_react.default.Component);
94
+ }(_react.default.Component);
95
+ function TableRowFunctional(_ref) {
96
+ var allowColumnSorting = _ref.allowColumnSorting,
97
+ children = _ref.children,
98
+ index = _ref.index,
99
+ innerRef = _ref.innerRef,
100
+ isFirstRow = _ref.isFirstRow,
101
+ isLastRow = _ref.isLastRow,
102
+ isNumberColumnEnabled = _ref.isNumberColumnEnabled,
103
+ onSorting = _ref.onSorting,
104
+ tableOrderStatus = _ref.tableOrderStatus;
105
+ var isHeaderRow = !index;
106
+ var childrenArray = _react.default.Children.toArray(children);
107
+ var cells = allowColumnSorting && isHeaderRow ? childrenArray.map(function (child, columnIndex) {
108
+ if ( /*#__PURE__*/_react.default.isValidElement(child)) {
109
+ return /*#__PURE__*/_react.default.cloneElement(child, {
110
+ columnIndex: columnIndex,
111
+ onSorting: onSorting,
112
+ sortOrdered: (tableOrderStatus === null || tableOrderStatus === void 0 ? void 0 : tableOrderStatus.columnIndex) === columnIndex ? tableOrderStatus.order : _types.SortOrder.NO_ORDER,
113
+ isHeaderRow: isHeaderRow
114
+ });
115
+ }
116
+ }) : childrenArray;
117
+ return /*#__PURE__*/_react.default.createElement("tr", {
118
+ ref: innerRef
119
+ }, isNumberColumnEnabled && /*#__PURE__*/_react.default.createElement("td", {
120
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
121
+ className: _consts.RendererCssClassName.NUMBER_COLUMN,
122
+ "data-reaches-left": true,
123
+ "data-reaches-top": isFirstRow || undefined,
124
+ "data-reaches-bottom": isLastRow || undefined
125
+ }, index), cells);
126
+ }
127
+ function TableRow(props) {
128
+ var Component = (0, _fg.fg)('platform_renderer_table_row_functional') ? TableRowFunctional : TableRowLegacy;
129
+ return /*#__PURE__*/_react.default.createElement(Component, props);
130
+ }
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.markBlockAsInline = markBlockAsInline;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
9
10
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
10
11
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
11
12
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
@@ -13,19 +14,24 @@ function markBlockAsInline(_ref) {
13
14
  var nodes = _ref.nodes,
14
15
  onMark = _ref.onMark,
15
16
  parentPos = _ref.parentPos,
16
- shouldDisplayExtensionAsInline = _ref.shouldDisplayExtensionAsInline;
17
+ shouldDisplayExtensionAsInline = _ref.shouldDisplayExtensionAsInline,
18
+ _ref$isTopLevel = _ref.isTopLevel,
19
+ isTopLevel = _ref$isTopLevel === void 0 ? true : _ref$isTopLevel;
17
20
  if (!nodes || nodes.length === 0 || nodes[0].isInline) {
18
21
  return;
19
22
  }
20
23
  function isInlineBodiedExtension(node) {
21
- var _node$attrs, _node$attrs2, _node$attrs3, _node$attrs4;
24
+ var _node$attrs, _node$attrs2, _node$attrs3, _node$attrs4, _node$attrs5, _node$attrs6;
25
+ if (!isTopLevel && (node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionType) === 'com.atlassian.ecosystem' && ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 || (_node$attrs2 = _node$attrs2.parameters) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.layout) === 'inline-bodied' && (0, _fg.fg)('platform_forge_inline_bodied_layout_switch') && (0, _fg.fg)('platform_forge_inline_bodied_macro')) {
26
+ return false;
27
+ }
22
28
  return Boolean((node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && shouldDisplayExtensionAsInline({
23
29
  type: node.type.name,
24
- extensionKey: (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionKey,
25
- extensionType: (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.extensionType,
26
- parameters: (_node$attrs3 = node.attrs) === null || _node$attrs3 === void 0 ? void 0 : _node$attrs3.parameters,
30
+ extensionKey: (_node$attrs3 = node.attrs) === null || _node$attrs3 === void 0 ? void 0 : _node$attrs3.extensionKey,
31
+ extensionType: (_node$attrs4 = node.attrs) === null || _node$attrs4 === void 0 ? void 0 : _node$attrs4.extensionType,
32
+ parameters: (_node$attrs5 = node.attrs) === null || _node$attrs5 === void 0 ? void 0 : _node$attrs5.parameters,
27
33
  content: node.content,
28
- localId: (_node$attrs4 = node.attrs) === null || _node$attrs4 === void 0 ? void 0 : _node$attrs4.localId
34
+ localId: (_node$attrs6 = node.attrs) === null || _node$attrs6 === void 0 ? void 0 : _node$attrs6.localId
29
35
  }));
30
36
  }
31
37
  try {
@@ -73,7 +73,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
73
73
  var TABLE_INFO_TIMEOUT = 10000;
74
74
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
75
75
  var packageName = "@atlaskit/renderer";
76
- var packageVersion = "140.2.3";
76
+ var packageVersion = "140.2.5";
77
77
  var setAsQueryContainerStyles = (0, _react2.css)({
78
78
  containerName: 'ak-renderer-wrapper',
79
79
  containerType: 'inline-size'
@@ -299,7 +299,7 @@ export default class ReactSerializer {
299
299
  if (key === 'root-0') {
300
300
  this.resetState();
301
301
  }
302
- return this.renderNode(target, props, key, mergeExpandBodyText(this.getChildNodes(fragment).map((node, index) => {
302
+ return this.renderNode(target, props, key, mergeExpandBodyText(this.getChildNodes(fragment, !(parentInfo !== null && parentInfo !== void 0 && parentInfo.path.length)).map((node, index) => {
303
303
  if (isTextWrapper(node)) {
304
304
  return this.serializeTextWrapper(node.content, {
305
305
  index,
@@ -704,7 +704,7 @@ export default class ReactSerializer {
704
704
  }
705
705
  return this.getUniqueHeadingId(baseId, headingIds, ++counter);
706
706
  }
707
- getChildNodes(fragment) {
707
+ getChildNodes(fragment, isTopLevel = true) {
708
708
  let children = [];
709
709
  fragment.forEach(node => {
710
710
  children.push(node);
@@ -719,6 +719,7 @@ export default class ReactSerializer {
719
719
  this.inlinePositions.add(pos);
720
720
  },
721
721
  parentPos: this.startPos,
722
+ isTopLevel,
722
723
  shouldDisplayExtensionAsInline: this.shouldDisplayExtensionAsInline
723
724
  });
724
725
  }
@@ -1,4 +1,4 @@
1
- /* link-compiled.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* link-compiled.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./link-compiled.compiled.css";
4
4
  import * as React from 'react';
@@ -69,7 +69,7 @@ const FireExtensionAsInlineAnalytics = ({
69
69
  return null;
70
70
  };
71
71
  export const renderExtension = (content, layout, options = {}, removeOverflow, extensionId, extensionViewportSizes, nodeHeight, localId, shouldDisplayExtensionAsInline, node, isInsideOfInlineExtension) => {
72
- var _node$parameters, _node$parameters$gues;
72
+ var _node$parameters, _node$parameters$gues, _node$parameters2;
73
73
  const overflowContainerClass = !removeOverflow ? RendererCssClassName.EXTENSION_OVERFLOW_CONTAINER : '';
74
74
 
75
75
  // by default, we assume the extension is at top level, (direct child of doc node)
@@ -93,7 +93,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
93
93
  const viewportSize = getViewportSize(extensionId, extensionViewportSizes);
94
94
  const extensionHeight = nodeHeight || viewportSize;
95
95
  /**
96
- * Scoped to nodes inserted by an app declaring `outputType: inline`, which is what writes
96
+ * Scoped to nodes inserted by an app declaring `layout: inline-bodied`, which is what writes
97
97
  * `atlassianForgeInlineBodied`. The output-type marker alone would also match migrated Connect
98
98
  * content — it carries the same marker, and after an upgrade plus a storage round trip in the
99
99
  * same shape — so keying on it would change how existing content renders. The renderer only
@@ -106,6 +106,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
106
106
  */
107
107
  const hasForgeInlineBodiedMarker = Boolean((node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.content) && (node === null || node === void 0 ? void 0 : (_node$parameters = node.parameters) === null || _node$parameters === void 0 ? void 0 : (_node$parameters$gues = _node$parameters.guestParams) === null || _node$parameters$gues === void 0 ? void 0 : _node$parameters$gues[FORGE_INLINE_BODIED_PARAM]) === 'true');
108
108
  const isForgeInlineBodiedEnabled = hasForgeInlineBodiedMarker && fg('platform_forge_inline_bodied_macro');
109
+ const isInlineBodiedLayoutEnabled = (node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.type) === 'bodiedExtension' && (node === null || node === void 0 ? void 0 : (_node$parameters2 = node.parameters) === null || _node$parameters2 === void 0 ? void 0 : _node$parameters2.layout) === 'inline-bodied' && fg('platform_forge_inline_bodied_layout_switch') && fg('platform_forge_inline_bodied_macro');
109
110
  /**
110
111
  * The pass that marks the sibling textblocks around an inline extension resolves their
111
112
  * positions without a depth term, so it only ever matches at the top level. Inlining a nested
@@ -113,7 +114,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
113
114
  * which is worse than leaving it a block — so keep nested inline-bodied Forge macros as
114
115
  * blocks until the sibling marking works at depth.
115
116
  */
116
- const isNestedForgeInlineBodied = !isTopLevel && isForgeInlineBodiedEnabled;
117
+ const isNestedForgeInlineBodied = !isTopLevel && (isForgeInlineBodiedEnabled || isInlineBodiedLayoutEnabled);
117
118
  const isInline = (shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node)) && expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && !isNestedForgeInlineBodied;
118
119
  const inlineClassName = isInline ? RendererCssClassName.EXTENSION_AS_INLINE : '';
119
120
  /**
@@ -127,6 +128,7 @@ export const renderExtension = (content, layout, options = {}, removeOverflow, e
127
128
  * Migrated inline-bodied macros intentionally do not receive the native Forge marker. Mark the
128
129
  * rendered wrapper instead so the stylesheet can fix only the surrounding text flow without
129
130
  * applying the native nested-renderer, overflow or sizing rules to migrated content.
131
+ * Custom UI also uses this outer text-flow treatment, without styling inside its iframe.
130
132
  */
131
133
  const isMigratedInlineBodied = Boolean(isInline && (node === null || node === void 0 ? void 0 : node.content) && !hasForgeInlineBodiedMarker && fg('platform_forge_inline_bodied_macro'));
132
134
  const asInlineAnalytics = isInline && fireAnalyticsEvent && node ? jsx(FireExtensionAsInlineAnalytics, {
@@ -1,4 +1,4 @@
1
- /* heading.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* heading.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import "./heading.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React from 'react';
@@ -1,4 +1,4 @@
1
- /* layoutColumn-compiled.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* layoutColumn-compiled.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  /**
3
3
  * Compiled branch of the `platform_editor_renderer_static_css` experiment.
4
4
  * Used via `componentWithCondition` in `layoutColumn.tsx`.
@@ -1,4 +1,4 @@
1
- /* panel-compiled.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* panel-compiled.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./panel-compiled.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
@@ -1,11 +1,12 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  import React from 'react';
3
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
3
4
  import { compose } from '@atlaskit/editor-common/utils';
4
5
  import { SortOrder } from '@atlaskit/editor-common/types';
5
6
  import { RendererCssClassName } from '../../consts';
6
7
  // Ignored via go/ees005
7
8
  // eslint-disable-next-line @repo/internal/react/no-class-components
8
- export default class TableRow extends React.Component {
9
+ class TableRowLegacy extends React.Component {
9
10
  constructor(...args) {
10
11
  super(...args);
11
12
  _defineProperty(this, "state", {
@@ -70,4 +71,41 @@ export default class TableRow extends React.Component {
70
71
  "data-reaches-bottom": isLastRow || undefined
71
72
  }, this.props.index), compose(this.addSortableColumn, this.addColGroupWidth)(childrenArray));
72
73
  }
74
+ }
75
+ function TableRowFunctional({
76
+ allowColumnSorting,
77
+ children,
78
+ index,
79
+ innerRef,
80
+ isFirstRow,
81
+ isLastRow,
82
+ isNumberColumnEnabled,
83
+ onSorting,
84
+ tableOrderStatus
85
+ }) {
86
+ const isHeaderRow = !index;
87
+ const childrenArray = React.Children.toArray(children);
88
+ const cells = allowColumnSorting && isHeaderRow ? childrenArray.map((child, columnIndex) => {
89
+ if ( /*#__PURE__*/React.isValidElement(child)) {
90
+ return /*#__PURE__*/React.cloneElement(child, {
91
+ columnIndex,
92
+ onSorting,
93
+ sortOrdered: (tableOrderStatus === null || tableOrderStatus === void 0 ? void 0 : tableOrderStatus.columnIndex) === columnIndex ? tableOrderStatus.order : SortOrder.NO_ORDER,
94
+ isHeaderRow
95
+ });
96
+ }
97
+ }) : childrenArray;
98
+ return /*#__PURE__*/React.createElement("tr", {
99
+ ref: innerRef
100
+ }, isNumberColumnEnabled && /*#__PURE__*/React.createElement("td", {
101
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
102
+ className: RendererCssClassName.NUMBER_COLUMN,
103
+ "data-reaches-left": true,
104
+ "data-reaches-top": isFirstRow || undefined,
105
+ "data-reaches-bottom": isLastRow || undefined
106
+ }, index), cells);
107
+ }
108
+ export default function TableRow(props) {
109
+ const Component = fg('platform_renderer_table_row_functional') ? TableRowFunctional : TableRowLegacy;
110
+ return /*#__PURE__*/React.createElement(Component, props);
73
111
  }
@@ -1,21 +1,26 @@
1
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
1
2
  export function markBlockAsInline({
2
3
  nodes,
3
4
  onMark,
4
5
  parentPos,
5
- shouldDisplayExtensionAsInline
6
+ shouldDisplayExtensionAsInline,
7
+ isTopLevel = true
6
8
  }) {
7
9
  if (!nodes || nodes.length === 0 || nodes[0].isInline) {
8
10
  return;
9
11
  }
10
12
  function isInlineBodiedExtension(node) {
11
- var _node$attrs, _node$attrs2, _node$attrs3, _node$attrs4;
13
+ var _node$attrs, _node$attrs2, _node$attrs2$paramete, _node$attrs3, _node$attrs4, _node$attrs5, _node$attrs6;
14
+ if (!isTopLevel && (node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionType) === 'com.atlassian.ecosystem' && ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : (_node$attrs2$paramete = _node$attrs2.parameters) === null || _node$attrs2$paramete === void 0 ? void 0 : _node$attrs2$paramete.layout) === 'inline-bodied' && fg('platform_forge_inline_bodied_layout_switch') && fg('platform_forge_inline_bodied_macro')) {
15
+ return false;
16
+ }
12
17
  return Boolean((node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && shouldDisplayExtensionAsInline({
13
18
  type: node.type.name,
14
- extensionKey: (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionKey,
15
- extensionType: (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.extensionType,
16
- parameters: (_node$attrs3 = node.attrs) === null || _node$attrs3 === void 0 ? void 0 : _node$attrs3.parameters,
19
+ extensionKey: (_node$attrs3 = node.attrs) === null || _node$attrs3 === void 0 ? void 0 : _node$attrs3.extensionKey,
20
+ extensionType: (_node$attrs4 = node.attrs) === null || _node$attrs4 === void 0 ? void 0 : _node$attrs4.extensionType,
21
+ parameters: (_node$attrs5 = node.attrs) === null || _node$attrs5 === void 0 ? void 0 : _node$attrs5.parameters,
17
22
  content: node.content,
18
- localId: (_node$attrs4 = node.attrs) === null || _node$attrs4 === void 0 ? void 0 : _node$attrs4.localId
23
+ localId: (_node$attrs6 = node.attrs) === null || _node$attrs6 === void 0 ? void 0 : _node$attrs6.localId
19
24
  }));
20
25
  }
21
26
  try {
@@ -59,7 +59,7 @@ export const DEGRADED_SEVERITY_THRESHOLD = 3000;
59
59
  const TABLE_INFO_TIMEOUT = 10000;
60
60
  const RENDER_EVENT_SAMPLE_RATE = 0.1;
61
61
  const packageName = "@atlaskit/renderer";
62
- const packageVersion = "140.2.3";
62
+ const packageVersion = "140.2.5";
63
63
  const setAsQueryContainerStyles = css({
64
64
  containerName: 'ak-renderer-wrapper',
65
65
  containerType: 'inline-size'
@@ -310,7 +310,7 @@ var ReactSerializer = /*#__PURE__*/function () {
310
310
  if (key === 'root-0') {
311
311
  this.resetState();
312
312
  }
313
- return this.renderNode(target, props, key, mergeExpandBodyText(this.getChildNodes(fragment).map(function (node, index) {
313
+ return this.renderNode(target, props, key, mergeExpandBodyText(this.getChildNodes(fragment, !(parentInfo !== null && parentInfo !== void 0 && parentInfo.path.length)).map(function (node, index) {
314
314
  if (isTextWrapper(node)) {
315
315
  return _this2.serializeTextWrapper(node.content, {
316
316
  index: index,
@@ -789,6 +789,7 @@ var ReactSerializer = /*#__PURE__*/function () {
789
789
  key: "getChildNodes",
790
790
  value: function getChildNodes(fragment) {
791
791
  var _this8 = this;
792
+ var isTopLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
792
793
  var children = [];
793
794
  fragment.forEach(function (node) {
794
795
  children.push(node);
@@ -802,6 +803,7 @@ var ReactSerializer = /*#__PURE__*/function () {
802
803
  _this8.inlinePositions.add(pos);
803
804
  },
804
805
  parentPos: this.startPos,
806
+ isTopLevel: isTopLevel,
805
807
  shouldDisplayExtensionAsInline: this.shouldDisplayExtensionAsInline
806
808
  });
807
809
  }
@@ -1,4 +1,4 @@
1
- /* link-compiled.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* link-compiled.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./link-compiled.compiled.css";
4
4
  import * as React from 'react';
@@ -70,7 +70,7 @@ var FireExtensionAsInlineAnalytics = function FireExtensionAsInlineAnalytics(_re
70
70
  return null;
71
71
  };
72
72
  export var renderExtension = function renderExtension(content, layout) {
73
- var _node$parameters;
73
+ var _node$parameters, _node$parameters2;
74
74
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
75
75
  var removeOverflow = arguments.length > 3 ? arguments[3] : undefined;
76
76
  var extensionId = arguments.length > 4 ? arguments[4] : undefined;
@@ -104,7 +104,7 @@ export var renderExtension = function renderExtension(content, layout) {
104
104
  var viewportSize = getViewportSize(extensionId, extensionViewportSizes);
105
105
  var extensionHeight = nodeHeight || viewportSize;
106
106
  /**
107
- * Scoped to nodes inserted by an app declaring `outputType: inline`, which is what writes
107
+ * Scoped to nodes inserted by an app declaring `layout: inline-bodied`, which is what writes
108
108
  * `atlassianForgeInlineBodied`. The output-type marker alone would also match migrated Connect
109
109
  * content — it carries the same marker, and after an upgrade plus a storage round trip in the
110
110
  * same shape — so keying on it would change how existing content renders. The renderer only
@@ -117,6 +117,7 @@ export var renderExtension = function renderExtension(content, layout) {
117
117
  */
118
118
  var hasForgeInlineBodiedMarker = Boolean((node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.content) && (node === null || node === void 0 || (_node$parameters = node.parameters) === null || _node$parameters === void 0 || (_node$parameters = _node$parameters.guestParams) === null || _node$parameters === void 0 ? void 0 : _node$parameters[FORGE_INLINE_BODIED_PARAM]) === 'true');
119
119
  var isForgeInlineBodiedEnabled = hasForgeInlineBodiedMarker && fg('platform_forge_inline_bodied_macro');
120
+ var isInlineBodiedLayoutEnabled = (node === null || node === void 0 ? void 0 : node.extensionType) === FORGE_EXTENSION_TYPE && (node === null || node === void 0 ? void 0 : node.type) === 'bodiedExtension' && (node === null || node === void 0 || (_node$parameters2 = node.parameters) === null || _node$parameters2 === void 0 ? void 0 : _node$parameters2.layout) === 'inline-bodied' && fg('platform_forge_inline_bodied_layout_switch') && fg('platform_forge_inline_bodied_macro');
120
121
  /**
121
122
  * The pass that marks the sibling textblocks around an inline extension resolves their
122
123
  * positions without a depth term, so it only ever matches at the top level. Inlining a nested
@@ -124,7 +125,7 @@ export var renderExtension = function renderExtension(content, layout) {
124
125
  * which is worse than leaving it a block — so keep nested inline-bodied Forge macros as
125
126
  * blocks until the sibling marking works at depth.
126
127
  */
127
- var isNestedForgeInlineBodied = !isTopLevel && isForgeInlineBodiedEnabled;
128
+ var isNestedForgeInlineBodied = !isTopLevel && (isForgeInlineBodiedEnabled || isInlineBodiedLayoutEnabled);
128
129
  var isInline = (shouldDisplayExtensionAsInline === null || shouldDisplayExtensionAsInline === void 0 ? void 0 : shouldDisplayExtensionAsInline(node)) && expValEquals('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && !isNestedForgeInlineBodied;
129
130
  var inlineClassName = isInline ? RendererCssClassName.EXTENSION_AS_INLINE : '';
130
131
  /**
@@ -138,6 +139,7 @@ export var renderExtension = function renderExtension(content, layout) {
138
139
  * Migrated inline-bodied macros intentionally do not receive the native Forge marker. Mark the
139
140
  * rendered wrapper instead so the stylesheet can fix only the surrounding text flow without
140
141
  * applying the native nested-renderer, overflow or sizing rules to migrated content.
142
+ * Custom UI also uses this outer text-flow treatment, without styling inside its iframe.
141
143
  */
142
144
  var isMigratedInlineBodied = Boolean(isInline && (node === null || node === void 0 ? void 0 : node.content) && !hasForgeInlineBodiedMarker && fg('platform_forge_inline_bodied_macro'));
143
145
  var asInlineAnalytics = isInline && fireAnalyticsEvent && node ? jsx(FireExtensionAsInlineAnalytics, {
@@ -1,4 +1,4 @@
1
- /* heading.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* heading.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import _typeof from "@babel/runtime/helpers/typeof";
4
4
  import "./heading.compiled.css";
@@ -1,4 +1,4 @@
1
- /* layoutColumn-compiled.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* layoutColumn-compiled.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  /**
3
3
  * Compiled branch of the `platform_editor_renderer_static_css` experiment.
4
4
  * Used via `componentWithCondition` in `layoutColumn.tsx`.
@@ -1,4 +1,4 @@
1
- /* panel-compiled.tsx generated by @compiled/babel-plugin v3.0.1 */
1
+ /* panel-compiled.tsx generated by @compiled/babel-plugin v3.0.2 */
2
2
  import _extends from "@babel/runtime/helpers/extends";
3
3
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
4
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
@@ -7,19 +7,20 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
7
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
8
8
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
9
  import React from 'react';
10
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
10
11
  import { compose } from '@atlaskit/editor-common/utils';
11
12
  import { SortOrder } from '@atlaskit/editor-common/types';
12
13
  import { RendererCssClassName } from '../../consts';
13
14
  // Ignored via go/ees005
14
15
  // eslint-disable-next-line @repo/internal/react/no-class-components
15
- var TableRow = /*#__PURE__*/function (_React$Component) {
16
- function TableRow() {
16
+ var TableRowLegacy = /*#__PURE__*/function (_React$Component) {
17
+ function TableRowLegacy() {
17
18
  var _this;
18
- _classCallCheck(this, TableRow);
19
+ _classCallCheck(this, TableRowLegacy);
19
20
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
20
21
  args[_key] = arguments[_key];
21
22
  }
22
- _this = _callSuper(this, TableRow, [].concat(args));
23
+ _this = _callSuper(this, TableRowLegacy, [].concat(args));
23
24
  _defineProperty(_this, "state", {
24
25
  colGroupWidths: []
25
26
  });
@@ -62,8 +63,8 @@ var TableRow = /*#__PURE__*/function (_React$Component) {
62
63
  });
63
64
  return _this;
64
65
  }
65
- _inherits(TableRow, _React$Component);
66
- return _createClass(TableRow, [{
66
+ _inherits(TableRowLegacy, _React$Component);
67
+ return _createClass(TableRowLegacy, [{
67
68
  key: "render",
68
69
  value: function render() {
69
70
  var _this$props2 = this.props,
@@ -84,4 +85,39 @@ var TableRow = /*#__PURE__*/function (_React$Component) {
84
85
  }
85
86
  }]);
86
87
  }(React.Component);
87
- export { TableRow as default };
88
+ function TableRowFunctional(_ref) {
89
+ var allowColumnSorting = _ref.allowColumnSorting,
90
+ children = _ref.children,
91
+ index = _ref.index,
92
+ innerRef = _ref.innerRef,
93
+ isFirstRow = _ref.isFirstRow,
94
+ isLastRow = _ref.isLastRow,
95
+ isNumberColumnEnabled = _ref.isNumberColumnEnabled,
96
+ onSorting = _ref.onSorting,
97
+ tableOrderStatus = _ref.tableOrderStatus;
98
+ var isHeaderRow = !index;
99
+ var childrenArray = React.Children.toArray(children);
100
+ var cells = allowColumnSorting && isHeaderRow ? childrenArray.map(function (child, columnIndex) {
101
+ if ( /*#__PURE__*/React.isValidElement(child)) {
102
+ return /*#__PURE__*/React.cloneElement(child, {
103
+ columnIndex: columnIndex,
104
+ onSorting: onSorting,
105
+ sortOrdered: (tableOrderStatus === null || tableOrderStatus === void 0 ? void 0 : tableOrderStatus.columnIndex) === columnIndex ? tableOrderStatus.order : SortOrder.NO_ORDER,
106
+ isHeaderRow: isHeaderRow
107
+ });
108
+ }
109
+ }) : childrenArray;
110
+ return /*#__PURE__*/React.createElement("tr", {
111
+ ref: innerRef
112
+ }, isNumberColumnEnabled && /*#__PURE__*/React.createElement("td", {
113
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
114
+ className: RendererCssClassName.NUMBER_COLUMN,
115
+ "data-reaches-left": true,
116
+ "data-reaches-top": isFirstRow || undefined,
117
+ "data-reaches-bottom": isLastRow || undefined
118
+ }, index), cells);
119
+ }
120
+ export default function TableRow(props) {
121
+ var Component = fg('platform_renderer_table_row_functional') ? TableRowFunctional : TableRowLegacy;
122
+ return /*#__PURE__*/React.createElement(Component, props);
123
+ }
@@ -2,23 +2,29 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
3
3
  function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
4
4
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
5
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
5
6
  export function markBlockAsInline(_ref) {
6
7
  var nodes = _ref.nodes,
7
8
  onMark = _ref.onMark,
8
9
  parentPos = _ref.parentPos,
9
- shouldDisplayExtensionAsInline = _ref.shouldDisplayExtensionAsInline;
10
+ shouldDisplayExtensionAsInline = _ref.shouldDisplayExtensionAsInline,
11
+ _ref$isTopLevel = _ref.isTopLevel,
12
+ isTopLevel = _ref$isTopLevel === void 0 ? true : _ref$isTopLevel;
10
13
  if (!nodes || nodes.length === 0 || nodes[0].isInline) {
11
14
  return;
12
15
  }
13
16
  function isInlineBodiedExtension(node) {
14
- var _node$attrs, _node$attrs2, _node$attrs3, _node$attrs4;
17
+ var _node$attrs, _node$attrs2, _node$attrs3, _node$attrs4, _node$attrs5, _node$attrs6;
18
+ if (!isTopLevel && (node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && ((_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionType) === 'com.atlassian.ecosystem' && ((_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 || (_node$attrs2 = _node$attrs2.parameters) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.layout) === 'inline-bodied' && fg('platform_forge_inline_bodied_layout_switch') && fg('platform_forge_inline_bodied_macro')) {
19
+ return false;
20
+ }
15
21
  return Boolean((node === null || node === void 0 ? void 0 : node.type.name) === 'bodiedExtension' && shouldDisplayExtensionAsInline({
16
22
  type: node.type.name,
17
- extensionKey: (_node$attrs = node.attrs) === null || _node$attrs === void 0 ? void 0 : _node$attrs.extensionKey,
18
- extensionType: (_node$attrs2 = node.attrs) === null || _node$attrs2 === void 0 ? void 0 : _node$attrs2.extensionType,
19
- parameters: (_node$attrs3 = node.attrs) === null || _node$attrs3 === void 0 ? void 0 : _node$attrs3.parameters,
23
+ extensionKey: (_node$attrs3 = node.attrs) === null || _node$attrs3 === void 0 ? void 0 : _node$attrs3.extensionKey,
24
+ extensionType: (_node$attrs4 = node.attrs) === null || _node$attrs4 === void 0 ? void 0 : _node$attrs4.extensionType,
25
+ parameters: (_node$attrs5 = node.attrs) === null || _node$attrs5 === void 0 ? void 0 : _node$attrs5.parameters,
20
26
  content: node.content,
21
- localId: (_node$attrs4 = node.attrs) === null || _node$attrs4 === void 0 ? void 0 : _node$attrs4.localId
27
+ localId: (_node$attrs6 = node.attrs) === null || _node$attrs6 === void 0 ? void 0 : _node$attrs6.localId
22
28
  }));
23
29
  }
24
30
  try {
@@ -64,7 +64,7 @@ export var DEGRADED_SEVERITY_THRESHOLD = 3000;
64
64
  var TABLE_INFO_TIMEOUT = 10000;
65
65
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
66
66
  var packageName = "@atlaskit/renderer";
67
- var packageVersion = "140.2.3";
67
+ var packageVersion = "140.2.5";
68
68
  var setAsQueryContainerStyles = css({
69
69
  containerName: 'ak-renderer-wrapper',
70
70
  containerType: 'inline-size'
@@ -14,13 +14,5 @@ type Props = {
14
14
  order: SortOrder;
15
15
  };
16
16
  };
17
- type State = {
18
- colGroupWidths: string[];
19
- };
20
- export default class TableRow extends React.Component<Props, State> {
21
- state: State;
22
- addSortableColumn: (childrenArray: React.ReactNode[]) => React.ReactNode[];
23
- addColGroupWidth: (childrenArray: React.ReactNode[]) => React.ReactNode[];
24
- render(): React.JSX.Element;
25
- }
17
+ export default function TableRow(props: Props): React.JSX.Element;
26
18
  export {};
@@ -1,6 +1,7 @@
1
1
  import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { ExtensionParams, Parameters } from '@atlaskit/editor-common/extensions';
3
- export declare function markBlockAsInline({ nodes, onMark, parentPos, shouldDisplayExtensionAsInline, }: {
3
+ export declare function markBlockAsInline({ nodes, onMark, parentPos, shouldDisplayExtensionAsInline, isTopLevel, }: {
4
+ isTopLevel?: boolean;
4
5
  nodes: PMNode[];
5
6
  onMark: ({ pos }: {
6
7
  pos: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "140.2.4",
3
+ "version": "140.2.6",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -66,7 +66,7 @@
66
66
  "@atlaskit/pragmatic-drag-and-drop": "^3.1.0",
67
67
  "@atlaskit/react-compiler-gating": "^0.2.0",
68
68
  "@atlaskit/react-ufo": "^7.10.0",
69
- "@atlaskit/smart-card": "^45.23.0",
69
+ "@atlaskit/smart-card": "^45.24.0",
70
70
  "@atlaskit/status": "^5.11.0",
71
71
  "@atlaskit/task-decision": "^21.10.0",
72
72
  "@atlaskit/theme": "^28.2.0",
@@ -85,8 +85,8 @@
85
85
  "uuid": "^11.1.1"
86
86
  },
87
87
  "peerDependencies": {
88
- "@atlaskit/editor-common": "^122.8.0",
89
- "@atlaskit/link-provider": "^5.6.0",
88
+ "@atlaskit/editor-common": "^122.9.0",
89
+ "@atlaskit/link-provider": "^5.7.0",
90
90
  "@atlaskit/media-core": "^38.2.0",
91
91
  "react": "^18.2.0 || ^19.2.0",
92
92
  "react-dom": "^18.2.0 || ^19.2.0",
@@ -101,7 +101,7 @@
101
101
  "@atlaskit/editor-test-helpers": "workspace:^",
102
102
  "@atlaskit/inline-edit": "^16.4.0",
103
103
  "@atlaskit/json-ld-types": "^2.0.0",
104
- "@atlaskit/link-provider": "^5.6.0",
104
+ "@atlaskit/link-provider": "^5.7.0",
105
105
  "@atlaskit/link-test-helpers": "^11.2.0",
106
106
  "@atlaskit/media-core": "^38.2.0",
107
107
  "@atlaskit/media-integration-test-helpers": "workspace:^",
@@ -144,6 +144,9 @@
144
144
  "worker-plugin": "^4.0.2"
145
145
  },
146
146
  "platform-feature-flags": {
147
+ "platform_renderer_table_row_functional": {
148
+ "type": "boolean"
149
+ },
147
150
  "platform_renderer_expand_ssr_margin_fix": {
148
151
  "type": "boolean"
149
152
  },
@@ -245,6 +248,10 @@
245
248
  "platform_forge_inline_bodied_macro": {
246
249
  "type": "boolean",
247
250
  "referenceOnly": true
251
+ },
252
+ "platform_forge_inline_bodied_layout_switch": {
253
+ "type": "boolean",
254
+ "referenceOnly": true
248
255
  }
249
256
  }
250
257
  }