@atlaskit/renderer 148.1.0 → 149.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/cjs/actions/index.js +35 -3
  3. package/dist/cjs/react/index.js +8 -0
  4. package/dist/cjs/react/marks/annotation.js +3 -1
  5. package/dist/cjs/react/nodes/extension-comments.compiled.css +4 -0
  6. package/dist/cjs/react/nodes/extension-comments.js +144 -0
  7. package/dist/cjs/react/nodes/extension.js +86 -11
  8. package/dist/cjs/react/nodes/layoutColumn-compiled.js +1 -2
  9. package/dist/cjs/react/nodes/layoutColumn-emotion.js +1 -2
  10. package/dist/cjs/react/nodes/table/colgroup.js +1 -2
  11. package/dist/cjs/steps/index.js +23 -0
  12. package/dist/cjs/ui/Renderer/RendererStyleContainer.js +1 -1
  13. package/dist/cjs/ui/Renderer/index.js +1 -1
  14. package/dist/cjs/ui/annotations/contexts/AnnotationRangeContext.js +29 -11
  15. package/dist/cjs/ui/annotations/element/extension.compiled.css +6 -0
  16. package/dist/cjs/ui/annotations/element/extension.js +34 -0
  17. package/dist/cjs/ui/annotations/element/index.js +4 -2
  18. package/dist/cjs/ui/annotations/element/mark.js +11 -1
  19. package/dist/cjs/ui/annotations/index.js +2 -1
  20. package/dist/es2019/actions/index.js +33 -3
  21. package/dist/es2019/react/index.js +8 -0
  22. package/dist/es2019/react/marks/annotation.js +3 -1
  23. package/dist/es2019/react/nodes/extension-comments.compiled.css +4 -0
  24. package/dist/es2019/react/nodes/extension-comments.js +115 -0
  25. package/dist/es2019/react/nodes/extension.js +83 -7
  26. package/dist/es2019/react/nodes/layoutColumn-compiled.js +2 -2
  27. package/dist/es2019/react/nodes/layoutColumn-emotion.js +2 -2
  28. package/dist/es2019/react/nodes/table/colgroup.js +1 -2
  29. package/dist/es2019/steps/index.js +25 -0
  30. package/dist/es2019/ui/Renderer/RendererStyleContainer.js +1 -1
  31. package/dist/es2019/ui/Renderer/index.js +1 -1
  32. package/dist/es2019/ui/annotations/contexts/AnnotationRangeContext.js +28 -12
  33. package/dist/es2019/ui/annotations/element/extension.compiled.css +6 -0
  34. package/dist/es2019/ui/annotations/element/extension.js +26 -0
  35. package/dist/es2019/ui/annotations/element/index.js +4 -2
  36. package/dist/es2019/ui/annotations/element/mark.js +11 -1
  37. package/dist/es2019/ui/annotations/index.js +2 -1
  38. package/dist/esm/actions/index.js +35 -3
  39. package/dist/esm/react/index.js +8 -0
  40. package/dist/esm/react/marks/annotation.js +3 -1
  41. package/dist/esm/react/nodes/extension-comments.compiled.css +4 -0
  42. package/dist/esm/react/nodes/extension-comments.js +135 -0
  43. package/dist/esm/react/nodes/extension.js +86 -7
  44. package/dist/esm/react/nodes/layoutColumn-compiled.js +2 -2
  45. package/dist/esm/react/nodes/layoutColumn-emotion.js +2 -2
  46. package/dist/esm/react/nodes/table/colgroup.js +1 -2
  47. package/dist/esm/steps/index.js +23 -0
  48. package/dist/esm/ui/Renderer/RendererStyleContainer.js +1 -1
  49. package/dist/esm/ui/Renderer/index.js +1 -1
  50. package/dist/esm/ui/annotations/contexts/AnnotationRangeContext.js +30 -12
  51. package/dist/esm/ui/annotations/element/extension.compiled.css +6 -0
  52. package/dist/esm/ui/annotations/element/extension.js +27 -0
  53. package/dist/esm/ui/annotations/element/index.js +4 -2
  54. package/dist/esm/ui/annotations/element/mark.js +11 -1
  55. package/dist/esm/ui/annotations/index.js +2 -1
  56. package/dist/types/actions/index.d.ts +13 -0
  57. package/dist/types/react/marks/annotation.d.ts +1 -1
  58. package/dist/types/react/nodes/extension-comments.d.ts +17 -0
  59. package/dist/types/react/nodes/extension.d.ts +12 -0
  60. package/dist/types/react/types.d.ts +1 -0
  61. package/dist/types/ui/annotations/contexts/AnnotationRangeContext.d.ts +4 -2
  62. package/dist/types/ui/annotations/element/extension.d.ts +17 -0
  63. package/dist/types/ui/annotations/element/index.d.ts +2 -1
  64. package/dist/types/ui/annotations/element/mark.d.ts +3 -107
  65. package/package.json +5 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 149.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`87d0a38064f7e`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/87d0a38064f7e) -
8
+ Remove the rolled-out platform_renderer_ssr_block_margin_fix gate and preserve stable SSR block
9
+ spacing.
10
+ - [`17d7056a9a663`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/17d7056a9a663) -
11
+ Clean up feature gate `platform_editor_numbered_column_in_include`
12
+ - Updated dependencies
13
+
14
+ ## 149.0.0
15
+
16
+ ### Patch Changes
17
+
18
+ - [`6887d068f2246`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6887d068f2246) -
19
+ [ux] Add hover and keyboard-focus comment targeting and unresolved comment badges for eligible
20
+ extensions in the renderer behind cc_maui_annotations_on_extensions. Add the optional
21
+ isBlockNodeSupported provider predicate in editor-common. Convert renderer positions to node
22
+ positions so chart comments create node marks, and preserve the hover range when focus moves
23
+ between controls within a chart. Memoize extension comment eligibility by node and provider
24
+ predicate to avoid repeating manifest lookups on unrelated renders. Keep the hover-target callback
25
+ stable as draft ranges change. Explicitly gate extension range-to-position conversion so disabling
26
+ cc_maui_annotations_on_extensions preserves the previous text and media targeting behavior.
27
+
28
+ Keep chart draft anchors and local comment creation on the selected extension, and render saved
29
+ annotation anchors beside the chart contents so adding or removing comments does not remount the
30
+ iframe. These fixes remain behind cc_maui_annotations_on_extensions.
31
+
32
+ Use node-mark removal for eligible extension comments so deleting a chart comment removes its
33
+ annotation from the returned document and sends the correct removal step for persistence, behind
34
+ cc_maui_annotations_on_extensions.
35
+
36
+ - Updated dependencies
37
+
3
38
  ## 148.1.0
4
39
 
5
40
  ### Minor Changes
@@ -94,9 +94,10 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
94
94
  var to;
95
95
  var nodePos;
96
96
  var step;
97
+ var schema = this.schema;
97
98
  this.doc.descendants(function (node, pos) {
98
99
  var found = mark.isInSet(node.marks);
99
- if (found && node.type.name === 'media') {
100
+ if (found && (0, _matchesUtils.isBlockAnnotationTarget)(node, schema)) {
100
101
  nodePos = pos;
101
102
  }
102
103
  if (found && !from) {
@@ -191,13 +192,12 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
191
192
  key: "isRangeAnnotatable",
192
193
  value: function isRangeAnnotatable(range) {
193
194
  try {
194
- var _startContainer$paren, _endContainer$parentE;
195
195
  if (!range) {
196
196
  return false;
197
197
  }
198
198
  var startContainer = range.startContainer,
199
199
  endContainer = range.endContainer;
200
- if ((_startContainer$paren = startContainer.parentElement) !== null && _startContainer$paren !== void 0 && _startContainer$paren.closest('.ak-renderer-extension') || (_endContainer$parentE = endContainer.parentElement) !== null && _endContainer$parentE !== void 0 && _endContainer$parentE.closest('.ak-renderer-extension')) {
200
+ if (this.isInsideNestedExtensionRenderer(startContainer) || this.isInsideNestedExtensionRenderer(endContainer)) {
201
201
  return false;
202
202
  }
203
203
  return this.isValidAnnotationRange(range);
@@ -213,6 +213,38 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
213
213
  }
214
214
  }
215
215
 
216
+ /**
217
+ * A range only threatens a nested renderer's own document (e.g. a bodiedExtension's macro
218
+ * body, which renders its own nested `<Renderer>`) when it sits inside that nested renderer's
219
+ * `.ak-renderer-document`. Landing directly on the extension's own outer wrapper -- with no
220
+ * nested document in between -- must stay annotatable so the whole chart/extension can be
221
+ * targeted (MAUI-1256), rather than being rejected outright the way any range touching
222
+ * `.ak-renderer-extension` previously was.
223
+ *
224
+ * Behind `cc_maui_annotations_on_extensions` -- the same gate MAUI-1255 added for extension
225
+ * node-mark support -- to preserve the previous behaviour (reject anything touching
226
+ * `.ak-renderer-extension`) while the feature is off.
227
+ */
228
+ }, {
229
+ key: "isInsideNestedExtensionRenderer",
230
+ value: function isInsideNestedExtensionRenderer(container) {
231
+ // Preserve the legacy parent-based rejection while the gate is disabled.
232
+ if (!(0, _fg.fg)('cc_maui_annotations_on_extensions')) {
233
+ var _container$parentElem;
234
+ return !!((_container$parentElem = container.parentElement) !== null && _container$parentElem !== void 0 && _container$parentElem.closest('.ak-renderer-extension'));
235
+ }
236
+ var element = container instanceof Element ? container : container.parentElement;
237
+ if (!element) {
238
+ return false;
239
+ }
240
+ var extensionAncestor = element.closest('.ak-renderer-extension');
241
+ if (!extensionAncestor) {
242
+ return false;
243
+ }
244
+ var nestedDocument = element.closest('.ak-renderer-document');
245
+ return !!nestedDocument && extensionAncestor.contains(nestedDocument);
246
+ }
247
+
216
248
  // eslint-disable-next-line @repo/internal/deprecations/deprecation-ticket-required -- Ignored via go/ED-25883
217
249
  /**
218
250
  * This is replaced by `isRangeAnnotatable`.
@@ -104,6 +104,11 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
104
104
  if (shouldSkipLinkMark(mark) || shouldSkipBorderMark(mark)) {
105
105
  return content;
106
106
  }
107
+ // Extension annotations are sibling anchors inside the stable extension shell.
108
+ // Wrapping the extension here would remount its iframe whenever marks change.
109
+ if (node.type.name === 'extension' && mark.type.name === 'annotation' && _this.allowAnnotations && (0, _fg.fg)('cc_maui_annotations_on_extensions')) {
110
+ return content;
111
+ }
107
112
  return _this.renderMark((0, _marks.toReact)(mark), _this.withMediaMarkProps(node, mark, _this.getMarkProps(mark, [], node)), "".concat(mark.type.name, "-").concat(index), content);
108
113
  }, serializedContent);
109
114
  return (0, _expandBody.withExpandBodyBlock)(node, currentPath, index, serialized);
@@ -556,6 +561,9 @@ var ReactSerializer = exports.default = /*#__PURE__*/function () {
556
561
  var _this$getExtensionHei;
557
562
  var path = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
558
563
  return _objectSpread(_objectSpread({}, this.getProps(node, path)), {}, {
564
+ allowAnnotations: this.allowAnnotations,
565
+ allowAnnotationsDraftMode: this.surroundTextNodesWithTextWrapper,
566
+ extensionNode: node,
559
567
  extensionViewportSizes: this.extensionViewportSizes,
560
568
  hideExtensionKeysWhilePending: this.hideExtensionKeysWhilePending,
561
569
  nodeHeight: (_this$getExtensionHei = this.getExtensionHeight) === null || _this$getExtensionHei === void 0 ? void 0 : _this$getExtensionHei.call(this, node),
@@ -24,6 +24,7 @@ var AnnotationComponent = function AnnotationComponent(_ref) {
24
24
  annotationParentIds = _ref$annotationParent === void 0 ? [] : _ref$annotationParent,
25
25
  allowAnnotations = _ref.allowAnnotations,
26
26
  useBlockLevel = _ref.useBlockLevel,
27
+ isExtension = _ref.isExtension,
27
28
  isMediaInline = _ref.isMediaInline;
28
29
  var data = _objectSpread(_objectSpread({}, dataAttributes), (0, _annotation.buildDataAttributes)({
29
30
  id: id,
@@ -43,7 +44,8 @@ var AnnotationComponent = function AnnotationComponent(_ref) {
43
44
  dataAttributes: data,
44
45
  annotationParentIds: annotationParentIds,
45
46
  annotationType: annotationType,
46
- useBlockLevel: useBlockLevel
47
+ useBlockLevel: useBlockLevel,
48
+ isExtension: isExtension
47
49
  }, children);
48
50
  }
49
51
  return (
@@ -0,0 +1,4 @@
1
+ ._154iu2gc{top:var(--ds-space-100,8px)}
2
+ ._1xi2u2gc{right:var(--ds-space-100,8px)}
3
+ ._kqswh2mm{position:relative}
4
+ ._kqswstnw{position:absolute}
@@ -0,0 +1,144 @@
1
+ /* extension-comments.tsx generated by @compiled/babel-plugin v3.0.2 */
2
+ "use strict";
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
+ var _typeof = require("@babel/runtime/helpers/typeof");
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports.ExtensionComments = void 0;
10
+ require("./extension-comments.compiled.css");
11
+ var _runtime = require("@compiled/react/runtime");
12
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
+ var _react = _interopRequireWildcard(require("react"));
14
+ var _annotation = require("@atlaskit/adf-schema/annotation");
15
+ var _analytics = require("@atlaskit/editor-common/analytics");
16
+ var _mediaSingle = require("@atlaskit/editor-common/media-single");
17
+ var _types = require("@atlaskit/editor-common/types");
18
+ var _AnnotationManagerContext = require("../../ui/annotations/contexts/AnnotationManagerContext");
19
+ var _AnnotationRangeContext = require("../../ui/annotations/contexts/AnnotationRangeContext");
20
+ var _useInlineCommentSubscriber = require("../../ui/annotations/hooks/use-inline-comment-subscriber");
21
+ var _useInlineCommentsFilter = require("../../ui/annotations/hooks/use-inline-comments-filter");
22
+ var _annotation2 = _interopRequireDefault(require("../marks/annotation"));
23
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
24
+ var containerStyles = null;
25
+ var annotationParentIds = [];
26
+ var annotationDataAttributes = {
27
+ 'data-renderer-mark': true,
28
+ 'data-block-mark': true
29
+ };
30
+ var badgeStyles = null;
31
+ var ExtensionCommentsEnabled = function ExtensionCommentsEnabled(_ref) {
32
+ var marks = _ref.marks,
33
+ children = _ref.children,
34
+ enabled = _ref.enabled,
35
+ allowAnnotations = _ref.allowAnnotations,
36
+ allowAnnotationsDraftMode = _ref.allowAnnotationsDraftMode,
37
+ startPos = _ref.startPos;
38
+ var _useAnnotationRangeSt = (0, _AnnotationRangeContext.useAnnotationRangeState)(),
39
+ hoverDraftDocumentPosition = _useAnnotationRangeSt.hoverDraftDocumentPosition;
40
+ var isDraft = Boolean(enabled && allowAnnotationsDraftMode && hoverDraftDocumentPosition && hoverDraftDocumentPosition.from + 1 === startPos);
41
+ var updateSubscriber = (0, _useInlineCommentSubscriber.useInlineCommentSubscriberContext)();
42
+ var annotationIds = (0, _react.useMemo)(function () {
43
+ var _marks$filter$map;
44
+ return (_marks$filter$map = marks === null || marks === void 0 ? void 0 : marks.filter(function (mark) {
45
+ return mark.type.name === 'annotation';
46
+ }).map(function (mark) {
47
+ return mark.attrs.id;
48
+ })) !== null && _marks$filter$map !== void 0 ? _marks$filter$map : [];
49
+ }, [marks]);
50
+ var activeIds = (0, _useInlineCommentsFilter.useInlineCommentsFilter)({
51
+ annotationIds: annotationIds,
52
+ filter: {
53
+ state: _annotation.AnnotationMarkStates.ACTIVE
54
+ }
55
+ });
56
+ var _useState = (0, _react.useState)(),
57
+ _useState2 = (0, _slicedToArray2.default)(_useState, 2),
58
+ focusedId = _useState2[0],
59
+ setFocusedId = _useState2[1];
60
+ var _useState3 = (0, _react.useState)(false),
61
+ _useState4 = (0, _slicedToArray2.default)(_useState3, 2),
62
+ entered = _useState4[0],
63
+ setEntered = _useState4[1];
64
+ var _useAnnotationManager = (0, _AnnotationManagerContext.useAnnotationManagerState)(),
65
+ currentSelectedAnnotationId = _useAnnotationManager.currentSelectedAnnotationId;
66
+ var active = activeIds.some(function (id) {
67
+ return id === focusedId || id === currentSelectedAnnotationId;
68
+ });
69
+ (0, _react.useEffect)(function () {
70
+ if (!updateSubscriber) {
71
+ return;
72
+ }
73
+ var onFocus = function onFocus(payload) {
74
+ return setFocusedId(payload === null || payload === void 0 ? void 0 : payload.annotationId);
75
+ };
76
+ var onBlur = function onBlur() {
77
+ return setFocusedId(undefined);
78
+ };
79
+ updateSubscriber.on(_types.AnnotationUpdateEvent.SET_ANNOTATION_FOCUS, onFocus);
80
+ updateSubscriber.on(_types.AnnotationUpdateEvent.REMOVE_ANNOTATION_FOCUS, onBlur);
81
+ return function () {
82
+ updateSubscriber.off(_types.AnnotationUpdateEvent.SET_ANNOTATION_FOCUS, onFocus);
83
+ updateSubscriber.off(_types.AnnotationUpdateEvent.REMOVE_ANNOTATION_FOCUS, onBlur);
84
+ };
85
+ }, [updateSubscriber]);
86
+ var onClick = (0, _react.useCallback)(function (event) {
87
+ event.preventDefault();
88
+ event.stopPropagation();
89
+ // Anchor the thread to this chart, not an icon inside the badge or a nested renderer.
90
+ var extension = event.currentTarget.closest('.ak-renderer-extension');
91
+ if (extension && activeIds.length) {
92
+ updateSubscriber === null || updateSubscriber === void 0 || updateSubscriber.emit(_types.AnnotationUpdateEvent.ON_ANNOTATION_CLICK, {
93
+ annotationIds: activeIds,
94
+ eventTarget: extension,
95
+ eventTargetType: 'extension',
96
+ viewMethod: _analytics.VIEW_METHOD.BADGE
97
+ });
98
+ }
99
+ }, [activeIds, updateSubscriber]);
100
+ var onMouseEnter = (0, _react.useCallback)(function () {
101
+ return setEntered(true);
102
+ }, []);
103
+ var onMouseLeave = (0, _react.useCallback)(function () {
104
+ return setEntered(false);
105
+ }, []);
106
+ return /*#__PURE__*/_react.default.createElement("div", {
107
+ "data-annotation-draft-mark": isDraft || undefined,
108
+ "data-renderer-mark": isDraft || undefined,
109
+ "data-renderer-start-pos": isDraft ? startPos : undefined,
110
+ className: (0, _runtime.ax)(["_kqswh2mm"])
111
+ }, children, allowAnnotations && annotationIds.map(function (id) {
112
+ return /*#__PURE__*/_react.default.createElement(_annotation2.default, {
113
+ key: id,
114
+ id: id,
115
+ annotationType: _annotation.AnnotationTypes.INLINE_COMMENT,
116
+ annotationParentIds: annotationParentIds,
117
+ allowAnnotations: true,
118
+ useBlockLevel: true,
119
+ isExtension: true,
120
+ dataAttributes: annotationDataAttributes
121
+ });
122
+ }), enabled && activeIds.length > 0 && updateSubscriber && /*#__PURE__*/_react.default.createElement("div", {
123
+ className: (0, _runtime.ax)(["_kqswstnw _154iu2gc _1xi2u2gc"])
124
+ }, /*#__PURE__*/_react.default.createElement(_mediaSingle.CommentBadgeNext, {
125
+ status: active ? 'active' : entered ? 'entered' : 'default',
126
+ onClick: onClick,
127
+ onMouseEnter: onMouseEnter,
128
+ onMouseLeave: onMouseLeave
129
+ })));
130
+ };
131
+
132
+ /** Only node-aware provider-approved extensions receive comment visuals. */
133
+ var ExtensionComments = exports.ExtensionComments = function ExtensionComments(props) {
134
+ if (!props.enabled && !props.allowAnnotations) {
135
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, props.children);
136
+ }
137
+ return /*#__PURE__*/_react.default.createElement(ExtensionCommentsEnabled, {
138
+ enabled: props.enabled,
139
+ allowAnnotations: props.allowAnnotations,
140
+ allowAnnotationsDraftMode: props.allowAnnotationsDraftMode,
141
+ startPos: props.startPos,
142
+ marks: props.marks
143
+ }, props.children);
144
+ };
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports.renderExtension = exports.default = void 0;
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
11
  var _react = _interopRequireWildcard(require("react"));
11
12
  var _react2 = require("@emotion/react");
12
13
  var _analytics = require("@atlaskit/editor-common/analytics");
@@ -14,16 +15,18 @@ var _ui = require("@atlaskit/editor-common/ui");
14
15
  var _fg = require("@atlaskit/platform-feature-flags/fg");
15
16
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
17
  var _consts = require("../../consts");
18
+ var _context = require("../../ui/annotations/context");
19
+ var _AnnotationHoverContext = require("../../ui/annotations/contexts/AnnotationHoverContext");
20
+ var _AnnotationRangeContext = require("../../ui/annotations/contexts/AnnotationRangeContext");
17
21
  var _ExtensionRenderer = _interopRequireDefault(require("../../ui/ExtensionRenderer"));
18
22
  var _breakout = require("../utils/breakout");
23
+ var _extensionComments = require("./extension-comments");
19
24
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
- /**
25
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
26
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } /**
21
27
  * @jsxRuntime classic
22
28
  * @jsx jsx
23
- */
24
-
25
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
-
29
+ */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
27
30
  var FORGE_EXTENSION_TYPE = 'com.atlassian.ecosystem';
28
31
  /**
29
32
  * Mirrors `FORGE_INLINE_BODIED_PARAM` in `@atlassian/xen-editor-provider`. Duplicated rather than
@@ -78,7 +81,7 @@ var FireExtensionAsInlineAnalytics = function FireExtensionAsInlineAnalytics(_re
78
81
  return null;
79
82
  };
80
83
  var renderExtension = exports.renderExtension = function renderExtension(content, layout) {
81
- var _node$parameters, _node$parameters2;
84
+ var _node$parameters, _node$parameters2, _options$dataAttribut;
82
85
  var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
83
86
  var removeOverflow = arguments.length > 3 ? arguments[3] : undefined;
84
87
  var extensionId = arguments.length > 4 ? arguments[4] : undefined;
@@ -166,11 +169,17 @@ var renderExtension = exports.renderExtension = function renderExtension(content
166
169
  },
167
170
  "data-layout": layout,
168
171
  "data-local-id": localId,
172
+ "data-renderer-start-pos": (_options$dataAttribut = options.dataAttributes) === null || _options$dataAttribut === void 0 ? void 0 : _options$dataAttribut['data-renderer-start-pos'],
169
173
  "data-testid": "extension--wrapper",
170
174
  "data-node-type": "extension",
175
+ "data-inline-comments-target": options.isCommentTarget || undefined,
171
176
  "data-top-level": isTopLevel || undefined,
172
177
  "data-forge-inline": isNativeForgeInline || undefined,
173
- "data-migrated-inline": isMigratedInlineBodied || undefined
178
+ "data-migrated-inline": isMigratedInlineBodied || undefined,
179
+ onBlur: options.onBlur,
180
+ onFocus: options.onFocus,
181
+ onMouseEnter: options.onMouseEnter,
182
+ onMouseLeave: options.onMouseLeave
174
183
  }, (0, _react2.jsx)("div", {
175
184
  tabIndex: options.tabIndex
176
185
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
@@ -184,6 +193,7 @@ var renderExtension = exports.renderExtension = function renderExtension(content
184
193
  }, extensionDiv) : extensionDiv;
185
194
  };
186
195
  var Extension = function Extension(props) {
196
+ var _providers$inlineComm, _props$dataAttributes;
187
197
  var text = props.text,
188
198
  _props$layout = props.layout,
189
199
  layout = _props$layout === void 0 ? 'default' : _props$layout,
@@ -196,6 +206,57 @@ var Extension = function Extension(props) {
196
206
  nodeHeight = props.nodeHeight,
197
207
  localId = props.localId,
198
208
  isInsideOfInlineExtension = props.isInsideOfInlineExtension;
209
+ var providers = (0, _react.useContext)(_context.ProvidersContext);
210
+ var _useAnnotationRangeDi = (0, _AnnotationRangeContext.useAnnotationRangeDispatch)(),
211
+ setHoverTarget = _useAnnotationRangeDi.setHoverTarget;
212
+ var _useAnnotationHoverDi = (0, _AnnotationHoverContext.useAnnotationHoverDispatch)(),
213
+ cancelTimeout = _useAnnotationHoverDi.cancelTimeout,
214
+ initiateTimeout = _useAnnotationHoverDi.initiateTimeout,
215
+ setIsWithinRange = _useAnnotationHoverDi.setIsWithinRange;
216
+ var isBlockNodeSupported = providers === null || providers === void 0 || (_providers$inlineComm = providers.inlineComment) === null || _providers$inlineComm === void 0 ? void 0 : _providers$inlineComm.isBlockNodeSupported;
217
+ var isCommentTarget = (0, _react.useMemo)(function () {
218
+ return Boolean((0, _fg.fg)('cc_maui_annotations_on_extensions') && props.extensionNode && (isBlockNodeSupported === null || isBlockNodeSupported === void 0 ? void 0 : isBlockNodeSupported(props.extensionNode)) === true);
219
+ }, [props.extensionNode, isBlockNodeSupported]);
220
+ var isFullPageRenderer = props.rendererAppearance === 'full-page' || props.rendererAppearance === 'full-width';
221
+ var onMouseEnter = (0, _react.useCallback)(function (event) {
222
+ cancelTimeout();
223
+ if (event.buttons === 0) {
224
+ setHoverTarget === null || setHoverTarget === void 0 || setHoverTarget(event.currentTarget);
225
+ setIsWithinRange(true);
226
+ }
227
+ }, [cancelTimeout, setHoverTarget, setIsWithinRange]);
228
+ var onMouseLeave = (0, _react.useCallback)(function () {
229
+ return initiateTimeout();
230
+ }, [initiateTimeout]);
231
+ var onFocus = (0, _react.useCallback)(function (event) {
232
+ if (event.currentTarget.contains(event.relatedTarget)) {
233
+ return;
234
+ }
235
+ cancelTimeout();
236
+ setHoverTarget === null || setHoverTarget === void 0 || setHoverTarget(event.currentTarget);
237
+ setIsWithinRange(true);
238
+ }, [cancelTimeout, setHoverTarget, setIsWithinRange]);
239
+ var onBlur = (0, _react.useCallback)(function (event) {
240
+ if (!event.currentTarget.contains(event.relatedTarget)) {
241
+ initiateTimeout();
242
+ }
243
+ }, [initiateTimeout]);
244
+ var commentTargetOptions = isCommentTarget && isFullPageRenderer ? {
245
+ isCommentTarget: true,
246
+ onBlur: onBlur,
247
+ onFocus: onFocus,
248
+ onMouseEnter: onMouseEnter,
249
+ onMouseLeave: onMouseLeave
250
+ } : {
251
+ isCommentTarget: isCommentTarget
252
+ };
253
+ var commentProps = {
254
+ enabled: isCommentTarget,
255
+ allowAnnotations: props.allowAnnotations && (0, _fg.fg)('cc_maui_annotations_on_extensions'),
256
+ allowAnnotationsDraftMode: props.allowAnnotationsDraftMode,
257
+ startPos: (_props$dataAttributes = props.dataAttributes) === null || _props$dataAttributes === void 0 ? void 0 : _props$dataAttributes['data-renderer-start-pos'],
258
+ marks: props.marks
259
+ };
199
260
  return (0, _react2.jsx)(_ExtensionRenderer.default
200
261
  // Ignored via go/ees005
201
262
  // eslint-disable-next-line react/jsx-props-no-spreading
@@ -208,13 +269,20 @@ var Extension = function Extension(props) {
208
269
  try {
209
270
  // Return the result directly if it's a valid JSX.Element
210
271
  if (result && /*#__PURE__*/_react.default.isValidElement(result)) {
211
- return renderExtension(result, layout, {
272
+ return renderExtension((0, _react2.jsx)(_extensionComments.ExtensionComments, {
273
+ enabled: commentProps.enabled,
274
+ allowAnnotations: commentProps.allowAnnotations,
275
+ allowAnnotationsDraftMode: commentProps.allowAnnotationsDraftMode,
276
+ startPos: commentProps.startPos,
277
+ marks: commentProps.marks
278
+ }, result), layout, _objectSpread({
279
+ dataAttributes: props.dataAttributes,
212
280
  isTopLevel: path.length < 1,
213
281
  handleRef: handleRef,
214
282
  shadowClassNames: shadowClassNames,
215
283
  tabIndex: props.tabIndex,
216
284
  rendererAppearance: props.rendererAppearance
217
- }, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
285
+ }, commentTargetOptions), undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
218
286
  }
219
287
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
220
288
  } catch (e) {
@@ -226,13 +294,20 @@ var Extension = function Extension(props) {
226
294
  }
227
295
 
228
296
  // Always return default content if anything goes wrong
229
- return renderExtension(text || 'extension', layout, {
297
+ return renderExtension((0, _react2.jsx)(_extensionComments.ExtensionComments, {
298
+ enabled: commentProps.enabled,
299
+ allowAnnotations: commentProps.allowAnnotations,
300
+ allowAnnotationsDraftMode: commentProps.allowAnnotationsDraftMode,
301
+ startPos: commentProps.startPos,
302
+ marks: commentProps.marks
303
+ }, text || 'extension'), layout, _objectSpread({
304
+ dataAttributes: props.dataAttributes,
230
305
  isTopLevel: path.length < 1,
231
306
  handleRef: handleRef,
232
307
  shadowClassNames: shadowClassNames,
233
308
  tabIndex: props.tabIndex,
234
309
  rendererAppearance: props.rendererAppearance
235
- }, undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
310
+ }, commentTargetOptions), undefined, parameters === null || parameters === void 0 ? void 0 : parameters.extensionId, extensionViewportSizes, nodeHeight, localId, undefined, undefined, isInsideOfInlineExtension);
236
311
  });
237
312
  };
238
313
  var _default_1 = (0, _ui.overflowShadow)(Extension, {
@@ -16,7 +16,6 @@ require("./layoutColumn-compiled.compiled.css");
16
16
  var _runtime = require("@compiled/react/runtime");
17
17
  var _react = _interopRequireDefault(require("react"));
18
18
  var _ui = require("@atlaskit/editor-common/ui");
19
- var _fg = require("@atlaskit/platform-feature-flags/fg");
20
19
  // localized styles, was from clearNextSiblingMarginTopStyle in @atlaskit/editor-common/ui
21
20
  var clearNextSiblingMarginTopStyle = null;
22
21
  var verticalAlignMiddleStyles = null;
@@ -37,7 +36,7 @@ var LayoutSectionCompiled = exports.LayoutSectionCompiled = function LayoutSecti
37
36
  },
38
37
  className: (0, _runtime.ax)([props.valign === 'middle' && "_1e0c1txw _2lx21bp4 _1bah1h6o", props.valign === 'bottom' && "_1e0c1txw _2lx21bp4 _1bahesu3", "_1tihidpf _12kpidpf"])
39
38
  }, /*#__PURE__*/_react.default.createElement(_ui.WidthProvider, null, /*#__PURE__*/_react.default.createElement("div", {
40
- "data-layout-column-start": (0, _fg.fg)('platform_renderer_ssr_block_margin_fix') ? 'true' : undefined,
39
+ "data-layout-column-start": "true",
41
40
  className: (0, _runtime.ax)(["_1skbgrf3", "_19segrf3 _1ki1grf3 _bmdegrf3 _166hgrf3 _7g1ogrf3 _sk2jgrf3 _hgeogrf3"])
42
41
  }), props.children));
43
42
  };
@@ -9,7 +9,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _react = _interopRequireDefault(require("react"));
10
10
  var _react2 = require("@emotion/react");
11
11
  var _ui = require("@atlaskit/editor-common/ui");
12
- var _fg = require("@atlaskit/platform-feature-flags/fg");
13
12
  /**
14
13
  * @jsxRuntime classic
15
14
  * @jsx jsx
@@ -69,7 +68,7 @@ var LayoutSectionEmotion = exports.LayoutSectionEmotion = function LayoutSection
69
68
  // Keep separate: Compiled crashes on ternary/object lookup here.
70
69
  props.valign === 'middle' && verticalAlignMiddleStyles, props.valign === 'bottom' && verticalAlignBottomStyles, multipleWrappedImagesStyle]
71
70
  }, (0, _react2.jsx)(_ui.WidthProvider, null, (0, _react2.jsx)("div", {
72
- "data-layout-column-start": (0, _fg.fg)('platform_renderer_ssr_block_margin_fix') ? 'true' : undefined,
71
+ "data-layout-column-start": "true",
73
72
  css: [clearNextSiblingMarginTopStyle, clearNextSiblingBlockMarkMarginTopStyle]
74
73
  }), props.children));
75
74
  };
@@ -12,7 +12,6 @@ var _nodeWidth = require("@atlaskit/editor-common/node-width");
12
12
  var _styles = require("@atlaskit/editor-common/styles");
13
13
  var _ui = require("@atlaskit/editor-common/ui");
14
14
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
15
- var _fg = require("@atlaskit/platform-feature-flags/fg");
16
15
  var _rendererContext = require("../../../renderer-context");
17
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
18
17
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -197,7 +196,7 @@ var renderScaleDownColgroup = function renderScaleDownColgroup(props) {
197
196
  var skipMinWidth = !!(isInsideOfTable && isInsideOfSyncBlock);
198
197
  if (!columnWidths || columnWidths.every(function (width) {
199
198
  return width === 0;
200
- }) && (0, _fg.fg)('platform_editor_numbered_column_in_include')) {
199
+ })) {
201
200
  return [];
202
201
  }
203
202
  var tableColumnResized = isTableColumnResized(columnWidths);
@@ -226,11 +226,34 @@ function resolvePos(node, offset) {
226
226
  }
227
227
  return resolvedPos + offset;
228
228
  }
229
+ function getSelectedCommentTargetPosition(range) {
230
+ var startContainer = range.startContainer,
231
+ startOffset = range.startOffset,
232
+ endContainer = range.endContainer,
233
+ endOffset = range.endOffset;
234
+ if (startContainer !== endContainer || endOffset !== startOffset + 1) {
235
+ return false;
236
+ }
237
+ var selectedNode = startContainer.childNodes[startOffset];
238
+ if (!selectedNode || !isElementNode(selectedNode) || selectedNode.dataset.inlineCommentsTarget !== 'true' || !isPositionPointer(selectedNode)) {
239
+ return false;
240
+ }
241
+
242
+ // Subtract 1 from the renderer start position to get the position before the extension node.
243
+ return getStartPos(selectedNode) - 1;
244
+ }
229
245
  function getPosFromRange(range) {
230
246
  var startContainer = range.startContainer,
231
247
  startOffset = range.startOffset,
232
248
  endContainer = range.endContainer,
233
249
  endOffset = range.endOffset;
250
+ var selectedCommentTargetPosition = (0, _fg.fg)('cc_maui_annotations_on_extensions') && getSelectedCommentTargetPosition(range);
251
+ if (selectedCommentTargetPosition !== false) {
252
+ return {
253
+ from: selectedCommentTargetPosition,
254
+ to: selectedCommentTargetPosition
255
+ };
256
+ }
234
257
  var possibleMediaOrMediaSingleElement = findParent(startContainer);
235
258
 
236
259
  // Video hover targets return media single, not media, thus, the extra check in condition.
@@ -2331,7 +2331,7 @@ var RendererStyleContainer = exports.RendererStyleContainer = function RendererS
2331
2331
  // eslint-disable-next-line @atlaskit/platform/no-preconditioning
2332
2332
  (0, _fg.fg)('editor_inline_comments_on_inline_nodes') && rendererAnnotationStylesCommentHeightFix, (0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? baseOtherStyles : baseOtherStylesDuplicateAnchor, expandSsrMarginStyles,
2333
2333
  // this should be placed after baseOtherStyles
2334
- (0, _expValEquals.expValEquals)('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), (0, _fg.fg)('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, (0, _fg.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, (0, _fg.fg)('platform_renderer_ssr_block_margin_fix') && [blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles], appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max') && responsiveBreakoutWidthFullWidth, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, (0, _expValEquals.expValEquals)('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
2334
+ (0, _expValEquals.expValEquals)('platform_editor_render_bodied_extension_as_inline', 'isEnabled', true) && ((0, _expValEquals.expValEquals)('platform_editor_remove_important_in_render_ext', 'isEnabled', true) ? extensionAsInlineStyle : oldExtensionAsInlineStyle), (0, _fg.fg)('platform_forge_inline_bodied_macro') && [migratedInlineBodiedFlowStyle, forgeInlineBodiedSpacingStyle], inlineExtensionRendererMarginFix, allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? alignedHeadingAnchorStyle : alignedHeadingAnchorStyleDuplicateAnchor), mediaSingleSharedStyle, firstWrappedMediaStyles, tableSharedStyle, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableOuterBorderOverlayStyles, (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) && roundedTableRemixBlockHighlightStyles, tableContentModeScopedStyles, tableContentModeExtensionContainmentStyles, tableContentModeNestedTableStyles, tableRendererHeaderStylesForTableCellOnly, (0, _fg.fg)('platform_editor_bordered_panel_nested_in_table') && tableRendererNestedPanelStyles, isBackgroundClipBrowserFixNeeded() && tableStylesBackGroundClipForGeckoForTableCellOnly, firstNodeWithNotMarginTopWithNestedDnD, rendererTableStyles, isStickyScrollbarOn && stickyScrollbarStyles, isStickyScrollbarOn && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_table_css_overflow_shadow') && stickyScrollbarOverflowShadowFixStyles, rendererTableHeaderEqualHeightStylesForTableCellOnly, allowColumnSorting && rendererTableSortableColumnStyles, allowColumnSorting && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_table_menu_updates', 'isEnabled', true) && rendererTableSortableColumnValignStyles, allowColumnSorting && allowNestedHeaderLinks && ((0, _expValEquals.expValEquals)('platform_editor_copy_link_a11y_inconsistency_fix', 'isEnabled', true) ? rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinks : rendererTableHeaderEqualHeightStylesAllowNestedHeaderLinksDuplicateAnchor), rendererTableColumnStyles, stickyHeaderStyles, codeBlockAndLayoutStyles, columnLayoutSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveSharedStyle, isAdvancedLayoutsOn && columnLayoutResponsiveRendererStyles, isAdvancedLayoutsOn && layoutSectionForAdvancedLayoutsStyles, !useBlockRenderForCodeBlock && gridRenderForCodeBlockStyles, browser.safari && codeBlockInListSafariFixStyles, blockSsrMarginStyles, layoutBlockSsrMarginStyles, browser.safari && codeBlockInListSsrMarginSafariFixStyles, appearance === 'full-page' && !isPreviewPanelResponsivenessOn && responsiveBreakoutWidth, appearance === 'full-page' && isPreviewPanelResponsivenessOn && responsiveBreakoutWidthWithReducedPadding, (appearance === 'full-width' || appearance === 'max') && responsiveBreakoutWidthFullWidth, (0, _expValEquals.expValEquals)('platform_editor_lovability_emoji_scaling', 'isEnabled', true) ? contentMode === 'compact' ? scaledDenseEmojiStyles : scaledEmojiStyles : contentMode === 'compact' ? denseStyles : undefined, contentMode === 'compact' ? scaledDenseUnicodeEmojiStylesNew : scaledUnicodeEmojiStylesNew, syncBlockStyles, centerWrapperStyles, isInsideSyncBlock ? syncBlockRendererStyles : null, isInsideSyncBlock && tableFakeBorderStyles, isInsideSyncBlock && (0, _expValEquals.expValEquals)('platform_editor_table_q4_loveability', 'isEnabled', true) ? roundedTableFakeBorderOverlayStyles : null, (0, _expValEquals.expValEquals)('platform_editor_hide_extension_renderer_support', 'isEnabled', true) && hideExtensionStyles],
2335
2335
  "data-testid": testId
2336
2336
  }, children);
2337
2337
  };
@@ -72,7 +72,7 @@ var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
72
72
  var TABLE_INFO_TIMEOUT = 10000;
73
73
  var RENDER_EVENT_SAMPLE_RATE = 0.1;
74
74
  var packageName = "@atlaskit/renderer";
75
- var packageVersion = "148.0.4";
75
+ var packageVersion = "149.0.0";
76
76
  var setAsQueryContainerStyles = (0, _react2.css)({
77
77
  containerName: 'ak-renderer-wrapper',
78
78
  containerType: 'inline-size'