@atlaskit/renderer 109.40.8 → 109.40.10

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 (43) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/actions/get-renderer-range-inline-node-names.js +1 -1
  3. package/dist/cjs/actions/index.js +2 -2
  4. package/dist/cjs/react/nodes/date.js +1 -3
  5. package/dist/cjs/react/nodes/emoji.js +2 -4
  6. package/dist/cjs/react/nodes/inlineCard.js +2 -4
  7. package/dist/cjs/react/nodes/mention.js +2 -4
  8. package/dist/cjs/react/nodes/status.js +2 -4
  9. package/dist/cjs/steps/index.js +5 -5
  10. package/dist/cjs/ui/Renderer/index.js +1 -1
  11. package/dist/cjs/ui/Renderer/style.js +2 -7
  12. package/dist/cjs/ui/annotations/element/mark.js +3 -3
  13. package/dist/cjs/ui/annotations/element/useInlineAnnotationProps.js +2 -6
  14. package/dist/cjs/ui/annotations/selection/mounter.js +4 -0
  15. package/dist/es2019/actions/get-renderer-range-inline-node-names.js +2 -2
  16. package/dist/es2019/actions/index.js +3 -3
  17. package/dist/es2019/react/nodes/date.js +1 -3
  18. package/dist/es2019/react/nodes/emoji.js +3 -5
  19. package/dist/es2019/react/nodes/inlineCard.js +3 -5
  20. package/dist/es2019/react/nodes/mention.js +3 -5
  21. package/dist/es2019/react/nodes/status.js +3 -5
  22. package/dist/es2019/steps/index.js +6 -6
  23. package/dist/es2019/ui/Renderer/index.js +1 -1
  24. package/dist/es2019/ui/Renderer/style.js +2 -7
  25. package/dist/es2019/ui/annotations/element/mark.js +4 -4
  26. package/dist/es2019/ui/annotations/element/useInlineAnnotationProps.js +3 -8
  27. package/dist/es2019/ui/annotations/selection/mounter.js +4 -0
  28. package/dist/esm/actions/get-renderer-range-inline-node-names.js +2 -2
  29. package/dist/esm/actions/index.js +3 -3
  30. package/dist/esm/react/nodes/date.js +1 -3
  31. package/dist/esm/react/nodes/emoji.js +3 -5
  32. package/dist/esm/react/nodes/inlineCard.js +3 -5
  33. package/dist/esm/react/nodes/mention.js +3 -5
  34. package/dist/esm/react/nodes/status.js +3 -5
  35. package/dist/esm/steps/index.js +6 -6
  36. package/dist/esm/ui/Renderer/index.js +1 -1
  37. package/dist/esm/ui/Renderer/style.js +2 -7
  38. package/dist/esm/ui/annotations/element/mark.js +4 -4
  39. package/dist/esm/ui/annotations/element/useInlineAnnotationProps.js +3 -7
  40. package/dist/esm/ui/annotations/selection/mounter.js +4 -0
  41. package/dist/types/ui/annotations/element/useInlineAnnotationProps.d.ts +1 -3
  42. package/dist/types-ts4.5/ui/annotations/element/useInlineAnnotationProps.d.ts +1 -3
  43. package/package.json +8 -11
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 109.40.10
4
+
5
+ ### Patch Changes
6
+
7
+ - [#113218](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113218)
8
+ [`d1b428ec29d68`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d1b428ec29d68) -
9
+ [ED-23765] migrate inline node commenting feature flags to statsig feature gate
10
+ - Updated dependencies
11
+
12
+ ## 109.40.9
13
+
14
+ ### Patch Changes
15
+
16
+ - [#117398](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117398)
17
+ [`ff47bec4e7b6e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ff47bec4e7b6e) -
18
+ [ux] Fix issue where inline node calculation would crash renderer
19
+ - Updated dependencies
20
+
3
21
  ## 109.40.8
4
22
 
5
23
  ### Patch Changes
@@ -9,7 +9,7 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
9
  function getRendererRangeInlineNodeNames(_ref) {
10
10
  var actions = _ref.actions,
11
11
  pos = _ref.pos;
12
- if (!(0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
12
+ if (!(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
13
13
  return undefined;
14
14
  }
15
15
  var doc = actions.doc;
@@ -166,7 +166,7 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
166
166
  if (!range) {
167
167
  return false;
168
168
  }
169
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
169
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
170
170
  if (this.isRendererWithinRange(range)) {
171
171
  return false;
172
172
  }
@@ -335,7 +335,7 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
335
335
  }
336
336
 
337
337
  // TODO: Do not forget to remove `undefined` when the
338
- // `platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz` is removed.
338
+ // `editor_inline_comments_on_inline_nodes` is removed.
339
339
  }, {
340
340
  key: "getInlineNodeTypes",
341
341
  value: function getInlineNodeTypes(annotationId) {
@@ -17,9 +17,7 @@ var _useInlineAnnotationProps = require("../../ui/annotations/element/useInlineA
17
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
18
18
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
19
  var Date = /*#__PURE__*/(0, _react.memo)(function Date(props) {
20
- var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props, {
21
- isInlineCard: false
22
- });
20
+ var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props);
23
21
  var timestamp = props.timestamp,
24
22
  parentIsIncompleteTask = props.parentIsIncompleteTask,
25
23
  intl = props.intl;
@@ -19,10 +19,8 @@ function EmojiItem(props) {
19
19
  text = props.text,
20
20
  fitToHeight = props.fitToHeight,
21
21
  resourceConfig = props.resourceConfig;
22
- var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props, {
23
- isInlineCard: false
24
- });
25
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
22
+ var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props);
23
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
26
24
  return (0, _react.jsx)("span", inlineAnnotationProps, (0, _react.jsx)(_emoji.Emoji, {
27
25
  allowTextFallback: true,
28
26
  id: id,
@@ -45,13 +45,11 @@ var InlineCard = function InlineCard(props) {
45
45
  // Below is added for the future implementation of Linking Platform namespaced analytic context
46
46
  location: 'renderer'
47
47
  };
48
- var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props, {
49
- isInlineCard: true
50
- });
48
+ var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props);
51
49
  if (ssr && url) {
52
50
  if (
53
51
  // eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
54
- (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
52
+ (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
55
53
  return (0, _react.jsx)("span", (0, _extends2.default)({
56
54
  "data-inline-card": true,
57
55
  "data-card-data": data ? JSON.stringify(data) : undefined,
@@ -18,10 +18,8 @@ var _default = exports.default = /*#__PURE__*/(0, _react.memo)(function MentionI
18
18
  text = props.text,
19
19
  accessLevel = props.accessLevel,
20
20
  localId = props.localId;
21
- var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props, {
22
- isInlineCard: false
23
- });
24
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
21
+ var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props);
22
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
25
23
  return /*#__PURE__*/_react.default.createElement("span", inlineAnnotationProps, /*#__PURE__*/_react.default.createElement(_mention.Mention, {
26
24
  id: id,
27
25
  text: text,
@@ -16,10 +16,8 @@ var _default = exports.default = /*#__PURE__*/(0, _react.memo)(function Status(p
16
16
  var text = props.text,
17
17
  color = props.color,
18
18
  localId = props.localId;
19
- var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props, {
20
- isInlineCard: false
21
- });
22
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
19
+ var inlineAnnotationProps = (0, _useInlineAnnotationProps.useInlineAnnotationProps)(props);
20
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
23
21
  return /*#__PURE__*/_react.default.createElement("span", inlineAnnotationProps, /*#__PURE__*/_react.default.createElement(_analyticsNamespacedContext.FabricElementsAnalyticsContext, {
24
22
  data: {
25
23
  userContext: 'document'
@@ -90,7 +90,7 @@ function isNodeInlineTextMark(node) {
90
90
  */
91
91
  function hasInlineNodeDescendant(node) {
92
92
  if (isElementNode(node)) {
93
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
93
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
94
94
  if (node.dataset.annotationInlineNode === 'true') {
95
95
  return true;
96
96
  }
@@ -110,7 +110,7 @@ function resolveNodePos(node) {
110
110
  if (prev && (isTextNode(prev) || isHighlightTextNode(prev))) {
111
111
  resolvedPos += (prev.textContent || '').length;
112
112
  } else if (prev) {
113
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
113
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
114
114
  if (isNodeInlineTextMark(prev) && prev.textContent) {
115
115
  resolvedPos += prev.textContent.length;
116
116
  } else {
@@ -137,10 +137,10 @@ function resolvePos(node, offset) {
137
137
  if (!node) {
138
138
  return false;
139
139
  }
140
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
140
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
141
141
  var _node$parentElement;
142
142
  var startPosAncestor = (_node$parentElement = node.parentElement) === null || _node$parentElement === void 0 ? void 0 : _node$parentElement.closest('[data-renderer-start-pos');
143
- var potentialParent = (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? 'data-annotation-mark' : 'data-inline-card';
143
+ var potentialParent = (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? 'data-annotation-mark' : 'data-inline-card';
144
144
  if (startPosAncestor !== null && startPosAncestor !== void 0 && startPosAncestor.hasAttribute(potentialParent)) {
145
145
  if (findEnd) {
146
146
  return parseInt((startPosAncestor === null || startPosAncestor === void 0 ? void 0 : startPosAncestor.getAttribute('data-renderer-start-pos')) || '-1', 10) + 1;
@@ -168,7 +168,7 @@ function resolvePos(node, offset) {
168
168
  // If our range is inside an inline node
169
169
  // We need to move our pointers to parent element
170
170
  // since we don't want to count text inside inline nodes at all
171
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
171
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
172
172
  if (!(isNodeInlineTextMark(preParentPointer) || isHighlightTextNode(preParentPointer))) {
173
173
  current = current.parentElement;
174
174
  offset = 0;
@@ -56,7 +56,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
56
56
  var NORMAL_SEVERITY_THRESHOLD = exports.NORMAL_SEVERITY_THRESHOLD = 2000;
57
57
  var DEGRADED_SEVERITY_THRESHOLD = exports.DEGRADED_SEVERITY_THRESHOLD = 3000;
58
58
  var packageName = "@atlaskit/renderer";
59
- var packageVersion = "109.40.8";
59
+ var packageVersion = "109.40.10";
60
60
  var defaultNodeComponents = exports.defaultNodeComponents = _nodes.nodeToReact;
61
61
  var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
62
62
  (0, _inherits2.default)(Renderer, _PureComponent);
@@ -84,9 +84,7 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
84
84
  if (allowNestedHeaderLinks) {
85
85
  headingsCss = "\n /**\n * When the sort button is enabled we want the heading's copy link button\n * to reserve space so that it can prematurely wrap to avoid the button\n * being displayed underneath the sort button (hidden or obscured).\n *\n * The two buttons fight each other since the sort button is displayed\n * on hover of the <th /> and the copy link button is displayed on hover\n * of the heading.\n *\n * Note that this can break the WYSIWYG experience in the case where\n * a heading fills the width of the table cell and the only thing which\n * wraps is the copy link button. This is hopefully a rare fringe case.\n */\n .".concat(_headingAnchor.HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n > {\n h1, h2, h3, h4, h5, h6 {\n margin-right: 30px;\n }\n }\n ");
86
86
  }
87
- return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t\t.", " {\n\t\t\tpadding: 0;\n\n\t\t\t.", " {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tpadding: ", ";\n\t\t\t\tborder-width: 1.5px;\n\t\t\t\tborder-style: solid;\n\t\t\t\tborder-color: transparent;\n\n\t\t\t\t> *:first-child {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t@supports selector(:focus-visible) {\n\t\t\t\t\t&:focus {\n\t\t\t\t\t\toutline: unset;\n\t\t\t\t\t}\n\t\t\t\t\t&:focus-visible {\n\t\t\t\t\t\tborder-color: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\n\t\t\t.", " {\n\t\t\t\tmargin: 0;\n\t\t\t\t.", " {\n\t\t\t\t\topacity: 1;\n\t\t\t\t\ttransition: opacity 0.2s ease-in-out;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.", " {\n\t\t\t\t.", " {\n\t\t\t\t\topacity: 0;\n\t\t\t\t\t&:focus {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&:hover {\n\t\t\t\t.", " {\n\t\t\t\t\t.", " {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t"])), _consts.RendererCssClassName.SORTABLE_COLUMN_WRAPPER, _consts.RendererCssClassName.SORTABLE_COLUMN,
88
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
89
- (0, _platformFeatureFlags.fg)('platform_editor_tables_padding_increase') ? "".concat(_styles.tableCellPadding, "px ", "var(--ds-space-250, 20px)") : "".concat(_styles.tableCellPadding, "px"), "var(--ds-border-focused, ".concat(colors.B300, ")"), headingsCss, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, _table2.SORTABLE_COLUMN_ICON_CLASSNAME, _consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, _table2.SORTABLE_COLUMN_ICON_CLASSNAME, _consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, _table2.SORTABLE_COLUMN_ICON_CLASSNAME);
87
+ return (0, _react.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n\t\t.", " {\n\t\t\tpadding: 0;\n\n\t\t\t.", " {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tpadding: ", ";\n\t\t\t\tborder-width: 1.5px;\n\t\t\t\tborder-style: solid;\n\t\t\t\tborder-color: transparent;\n\n\t\t\t\t> *:first-child {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t@supports selector(:focus-visible) {\n\t\t\t\t\t&:focus {\n\t\t\t\t\t\toutline: unset;\n\t\t\t\t\t}\n\t\t\t\t\t&:focus-visible {\n\t\t\t\t\t\tborder-color: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\n\t\t\t.", " {\n\t\t\t\tmargin: 0;\n\t\t\t\t.", " {\n\t\t\t\t\topacity: 1;\n\t\t\t\t\ttransition: opacity 0.2s ease-in-out;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.", " {\n\t\t\t\t.", " {\n\t\t\t\t\topacity: 0;\n\t\t\t\t\t&:focus {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&:hover {\n\t\t\t\t.", " {\n\t\t\t\t\t.", " {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t"])), _consts.RendererCssClassName.SORTABLE_COLUMN_WRAPPER, _consts.RendererCssClassName.SORTABLE_COLUMN, (0, _platformFeatureFlags.fg)('platform_editor_tables_padding_increase') ? "".concat(_styles.tableCellPadding, "px ", "var(--ds-space-250, 20px)") : "".concat(_styles.tableCellPadding, "px"), "var(--ds-border-focused, ".concat(colors.B300, ")"), headingsCss, _consts.RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, _table2.SORTABLE_COLUMN_ICON_CLASSNAME, _consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, _table2.SORTABLE_COLUMN_ICON_CLASSNAME, _consts.RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, _table2.SORTABLE_COLUMN_ICON_CLASSNAME);
90
88
  };
91
89
  var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
92
90
  var appearance = _ref3.appearance;
@@ -111,10 +109,7 @@ var getShadowOverrides = function getShadowOverrides() {
111
109
  };
112
110
  function getAnnotationStyles(_ref6) {
113
111
  var allowAnnotations = _ref6.allowAnnotations;
114
- if (!(0, _platformFeatureFlags.fg)('platform.editor.allow-inline-comments-for-inline-nodes')) {
115
- return '';
116
- }
117
- if ((0, _platformFeatureFlags.fg)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
112
+ if (!(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
118
113
  return '';
119
114
  }
120
115
  return (0, _react.css)({
@@ -23,7 +23,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
23
23
  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; }
24
24
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState` is not object-safe
25
25
  var markStyles = function markStyles() {
26
- return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t}\n"])), _adfSchema.AnnotationMarkStates.ACTIVE, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? (0, _styles.AnnotationSharedCSSByState)().common : '', (0, _styles.AnnotationSharedCSSByState)().blur, (0, _styles.AnnotationSharedCSSByState)().focus);
26
+ return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t}\n"])), _adfSchema.AnnotationMarkStates.ACTIVE, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? (0, _styles.AnnotationSharedCSSByState)().common : '', (0, _styles.AnnotationSharedCSSByState)().blur, (0, _styles.AnnotationSharedCSSByState)().focus);
27
27
  };
28
28
  var isMobile = function isMobile() {
29
29
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
@@ -73,7 +73,7 @@ var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
73
73
  if (event.defaultPrevented || state !== _adfSchema.AnnotationMarkStates.ACTIVE) {
74
74
  return;
75
75
  }
76
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
76
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
77
77
  // We only want to interfere with click events if the click is on some ui inside the renderer document
78
78
  // This is to prevent the click events from portaled content (such as link previews and mention profiles)
79
79
  if (event.target instanceof HTMLElement && event.target.closest('.ak-renderer-document')) {
@@ -130,7 +130,7 @@ var MarkComponent = exports.MarkComponent = function MarkComponent(_ref) {
130
130
  };
131
131
  return (0, _react2.jsx)(useBlockLevel ? 'div' : 'mark', _objectSpread(_objectSpread(_objectSpread((0, _defineProperty2.default)({
132
132
  id: id
133
- }, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
133
+ }, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
134
134
  css: [markStyles, getAccessibilityStyles()]
135
135
  }), children);
136
136
  };
@@ -7,13 +7,9 @@ exports.useInlineAnnotationProps = useInlineAnnotationProps;
7
7
  var _react = require("react");
8
8
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
9
  var _context = require("../context");
10
- function useInlineAnnotationProps(props, _ref) {
11
- var isInlineCard = _ref.isInlineCard;
10
+ function useInlineAnnotationProps(props) {
12
11
  var draftPosition = (0, _react.useContext)(_context.AnnotationsDraftContext);
13
- if (!isInlineCard && !(0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
14
- return {};
15
- }
16
- if (!(0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
12
+ if (!(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
17
13
  return {};
18
14
  }
19
15
  if (!props.dataAttributes) {
@@ -9,6 +9,7 @@ exports.SelectionInlineCommentMounter = void 0;
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _adfSchema = require("@atlaskit/adf-schema");
12
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
12
13
  var _draft = require("../draft");
13
14
  var _analyticsListeners = require("@atlaskit/analytics-listeners");
14
15
  var _analytics = require("@atlaskit/editor-common/analytics");
@@ -38,6 +39,9 @@ var SelectionInlineCommentMounter = exports.SelectionInlineCommentMounter = /*#_
38
39
  var providers = (0, _react.useContext)(_context.ProvidersContext);
39
40
  var isCommentsOnMediaBugFixEnabled = !!(providers !== null && providers !== void 0 && providers.inlineComment.isCommentsOnMediaBugFixEnabled);
40
41
  var inlineNodeTypes = (0, _react.useMemo)(function () {
42
+ if (!(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
43
+ return undefined;
44
+ }
41
45
  if (actions.isValidAnnotationRange(range)) {
42
46
  return (0, _getRendererRangeInlineNodeNames.getRendererRangeInlineNodeNames)({
43
47
  pos: documentPosition,
@@ -1,10 +1,10 @@
1
1
  import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  export function getRendererRangeInlineNodeNames({
4
4
  actions,
5
5
  pos
6
6
  }) {
7
- if (!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
7
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
8
8
  return undefined;
9
9
  }
10
10
  const {
@@ -7,7 +7,7 @@ import { createAnnotationStep, getPosFromRange } from '../steps';
7
7
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
8
8
  import { getIndexMatch } from './matches-utils';
9
9
  import { getRendererRangeInlineNodeNames } from './get-renderer-range-inline-node-names';
10
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
10
+ import { fg } from '@atlaskit/platform-feature-flags';
11
11
  export default class RendererActions {
12
12
  // Any kind of refence is allowed
13
13
 
@@ -144,7 +144,7 @@ export default class RendererActions {
144
144
  if (!range) {
145
145
  return false;
146
146
  }
147
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
147
+ if (fg('editor_inline_comments_on_inline_nodes')) {
148
148
  if (this.isRendererWithinRange(range)) {
149
149
  return false;
150
150
  }
@@ -315,7 +315,7 @@ export default class RendererActions {
315
315
  }
316
316
 
317
317
  // TODO: Do not forget to remove `undefined` when the
318
- // `platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz` is removed.
318
+ // `editor_inline_comments_on_inline_nodes` is removed.
319
319
  getInlineNodeTypes(annotationId) {
320
320
  if (!this.doc || !this.schema) {
321
321
  return [];
@@ -6,9 +6,7 @@ import { injectIntl } from 'react-intl-next';
6
6
  import { useTaskItemsFormatContext } from '../../ui/TaskItemsFormatContext';
7
7
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
8
8
  const Date = /*#__PURE__*/memo(function Date(props) {
9
- const inlineAnnotationProps = useInlineAnnotationProps(props, {
10
- isInlineCard: false
11
- });
9
+ const inlineAnnotationProps = useInlineAnnotationProps(props);
12
10
  const {
13
11
  timestamp,
14
12
  parentIsIncompleteTask,
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
3
  import { jsx } from '@emotion/react';
4
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
5
5
  import { memo } from 'react';
6
6
  import { Emoji } from '@atlaskit/editor-common/emoji';
7
7
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
@@ -14,10 +14,8 @@ function EmojiItem(props) {
14
14
  fitToHeight,
15
15
  resourceConfig
16
16
  } = props;
17
- const inlineAnnotationProps = useInlineAnnotationProps(props, {
18
- isInlineCard: false
19
- });
20
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
17
+ const inlineAnnotationProps = useInlineAnnotationProps(props);
18
+ if (fg('editor_inline_comments_on_inline_nodes')) {
21
19
  return jsx("span", inlineAnnotationProps, jsx(Emoji, {
22
20
  allowTextFallback: true,
23
21
  id: id,
@@ -5,7 +5,7 @@ import { jsx } from '@emotion/react';
5
5
  import { Card } from '@atlaskit/smart-card';
6
6
  import { CardSSR } from '@atlaskit/smart-card/ssr';
7
7
  import { UnsupportedInline } from '@atlaskit/editor-common/ui';
8
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
9
9
  import { CardErrorBoundary } from './fallback';
10
10
  import { withSmartCardStorage } from '../../ui/SmartCardStorage';
11
11
  import { getCardClickHandler } from '../utils/getCardClickHandler';
@@ -40,13 +40,11 @@ const InlineCard = props => {
40
40
  // Below is added for the future implementation of Linking Platform namespaced analytic context
41
41
  location: 'renderer'
42
42
  };
43
- const inlineAnnotationProps = useInlineAnnotationProps(props, {
44
- isInlineCard: true
45
- });
43
+ const inlineAnnotationProps = useInlineAnnotationProps(props);
46
44
  if (ssr && url) {
47
45
  if (
48
46
  // eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
49
- getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
47
+ fg('editor_inline_comments_on_inline_nodes')) {
50
48
  return jsx("span", _extends({
51
49
  "data-inline-card": true,
52
50
  "data-card-data": data ? JSON.stringify(data) : undefined,
@@ -1,6 +1,6 @@
1
1
  import React, { memo } from 'react';
2
2
  import { Mention } from '@atlaskit/editor-common/mention';
3
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
4
4
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
5
5
  export default /*#__PURE__*/memo(function MentionItem(props) {
6
6
  const {
@@ -11,10 +11,8 @@ export default /*#__PURE__*/memo(function MentionItem(props) {
11
11
  accessLevel,
12
12
  localId
13
13
  } = props;
14
- const inlineAnnotationProps = useInlineAnnotationProps(props, {
15
- isInlineCard: false
16
- });
17
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
14
+ const inlineAnnotationProps = useInlineAnnotationProps(props);
15
+ if (fg('editor_inline_comments_on_inline_nodes')) {
18
16
  return /*#__PURE__*/React.createElement("span", inlineAnnotationProps, /*#__PURE__*/React.createElement(Mention, {
19
17
  id: id,
20
18
  text: text,
@@ -1,7 +1,7 @@
1
1
  import React, { memo } from 'react';
2
2
  import { Status as AkStatus } from '@atlaskit/status/element';
3
3
  import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
4
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
5
5
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
6
6
  export default /*#__PURE__*/memo(function Status(props) {
7
7
  const {
@@ -9,10 +9,8 @@ export default /*#__PURE__*/memo(function Status(props) {
9
9
  color,
10
10
  localId
11
11
  } = props;
12
- const inlineAnnotationProps = useInlineAnnotationProps(props, {
13
- isInlineCard: false
14
- });
15
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
12
+ const inlineAnnotationProps = useInlineAnnotationProps(props);
13
+ if (fg('editor_inline_comments_on_inline_nodes')) {
16
14
  return /*#__PURE__*/React.createElement("span", inlineAnnotationProps, /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
17
15
  data: {
18
16
  userContext: 'document'
@@ -1,4 +1,4 @@
1
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
1
+ import { fg } from '@atlaskit/platform-feature-flags';
2
2
  import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  function getStartPos(element) {
4
4
  return parseInt(element.dataset.rendererStartPos || '-1', 10);
@@ -86,7 +86,7 @@ function isNodeInlineTextMark(node) {
86
86
  */
87
87
  function hasInlineNodeDescendant(node) {
88
88
  if (isElementNode(node)) {
89
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
89
+ if (fg('editor_inline_comments_on_inline_nodes')) {
90
90
  if (node.dataset.annotationInlineNode === 'true') {
91
91
  return true;
92
92
  }
@@ -106,7 +106,7 @@ function resolveNodePos(node) {
106
106
  if (prev && (isTextNode(prev) || isHighlightTextNode(prev))) {
107
107
  resolvedPos += (prev.textContent || '').length;
108
108
  } else if (prev) {
109
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
109
+ if (fg('editor_inline_comments_on_inline_nodes')) {
110
110
  if (isNodeInlineTextMark(prev) && prev.textContent) {
111
111
  resolvedPos += prev.textContent.length;
112
112
  } else {
@@ -132,10 +132,10 @@ export function resolvePos(node, offset, findEnd = false) {
132
132
  if (!node) {
133
133
  return false;
134
134
  }
135
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
135
+ if (fg('editor_inline_comments_on_inline_nodes')) {
136
136
  var _node$parentElement;
137
137
  const startPosAncestor = (_node$parentElement = node.parentElement) === null || _node$parentElement === void 0 ? void 0 : _node$parentElement.closest('[data-renderer-start-pos');
138
- const potentialParent = getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? 'data-annotation-mark' : 'data-inline-card';
138
+ const potentialParent = fg('editor_inline_comments_on_inline_nodes') ? 'data-annotation-mark' : 'data-inline-card';
139
139
  if (startPosAncestor !== null && startPosAncestor !== void 0 && startPosAncestor.hasAttribute(potentialParent)) {
140
140
  if (findEnd) {
141
141
  return parseInt((startPosAncestor === null || startPosAncestor === void 0 ? void 0 : startPosAncestor.getAttribute('data-renderer-start-pos')) || '-1', 10) + 1;
@@ -163,7 +163,7 @@ export function resolvePos(node, offset, findEnd = false) {
163
163
  // If our range is inside an inline node
164
164
  // We need to move our pointers to parent element
165
165
  // since we don't want to count text inside inline nodes at all
166
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
166
+ if (fg('editor_inline_comments_on_inline_nodes')) {
167
167
  if (!(isNodeInlineTextMark(preParentPointer) || isHighlightTextNode(preParentPointer))) {
168
168
  current = current.parentElement;
169
169
  offset = 0;
@@ -38,7 +38,7 @@ import { nodeToReact } from '../../react/nodes';
38
38
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
39
39
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
40
40
  const packageName = "@atlaskit/renderer";
41
- const packageVersion = "109.40.8";
41
+ const packageVersion = "109.40.10";
42
42
  export const defaultNodeComponents = nodeToReact;
43
43
  export class Renderer extends PureComponent {
44
44
  constructor(props) {
@@ -224,9 +224,7 @@ const tableSortableColumnStyle = ({
224
224
  .${RendererCssClassName.SORTABLE_COLUMN} {
225
225
  width: 100%;
226
226
  height: 100%;
227
- padding: ${
228
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
229
- fg('platform_editor_tables_padding_increase') ? `${tableCellPadding}px ${"var(--ds-space-250, 20px)"}` : `${tableCellPadding}px`};
227
+ padding: ${fg('platform_editor_tables_padding_increase') ? `${tableCellPadding}px ${"var(--ds-space-250, 20px)"}` : `${tableCellPadding}px`};
230
228
  border-width: 1.5px;
231
229
  border-style: solid;
232
230
  border-color: transparent;
@@ -370,10 +368,7 @@ const getShadowOverrides = () => {
370
368
  function getAnnotationStyles({
371
369
  allowAnnotations
372
370
  }) {
373
- if (!fg('platform.editor.allow-inline-comments-for-inline-nodes')) {
374
- return '';
375
- }
376
- if (fg('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
371
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
377
372
  return '';
378
373
  }
379
374
  return css({
@@ -6,7 +6,7 @@ import { css, jsx } from '@emotion/react';
6
6
  import FeatureGates from '@atlaskit/feature-gate-js-client';
7
7
  import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
8
8
  import { AnnotationMarkStates } from '@atlaskit/adf-schema';
9
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
9
+ import { fg } from '@atlaskit/platform-feature-flags';
10
10
  import { useIntl } from 'react-intl-next';
11
11
  import { inlineCommentMessages } from '../../../messages';
12
12
 
@@ -17,7 +17,7 @@ const markStyles = () => css`
17
17
  -webkit-tap-highlight-color: transparent;
18
18
 
19
19
  &[data-mark-annotation-state='${AnnotationMarkStates.ACTIVE}'] {
20
- ${getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? AnnotationSharedCSSByState().common : ''}
20
+ ${fg('editor_inline_comments_on_inline_nodes') ? AnnotationSharedCSSByState().common : ''}
21
21
  ${AnnotationSharedCSSByState().blur}
22
22
 
23
23
  &:focus,
@@ -71,7 +71,7 @@ export const MarkComponent = ({
71
71
  if (event.defaultPrevented || state !== AnnotationMarkStates.ACTIVE) {
72
72
  return;
73
73
  }
74
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
74
+ if (fg('editor_inline_comments_on_inline_nodes')) {
75
75
  // We only want to interfere with click events if the click is on some ui inside the renderer document
76
76
  // This is to prevent the click events from portaled content (such as link previews and mention profiles)
77
77
  if (event.target instanceof HTMLElement && event.target.closest('.ak-renderer-document')) {
@@ -130,7 +130,7 @@ export const MarkComponent = ({
130
130
  };
131
131
  return jsx(useBlockLevel ? 'div' : 'mark', {
132
132
  id,
133
- [getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes') ? 'onClickCapture' : 'onClick']: onMarkClick,
133
+ [fg('editor_inline_comments_on_inline_nodes') ? 'onClickCapture' : 'onClick']: onMarkClick,
134
134
  ...accessibility,
135
135
  ...overriddenData,
136
136
  ...(!useBlockLevel && {
@@ -1,14 +1,9 @@
1
1
  import { useContext } from 'react';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  import { AnnotationsDraftContext } from '../context';
4
- export function useInlineAnnotationProps(props, {
5
- isInlineCard
6
- }) {
4
+ export function useInlineAnnotationProps(props) {
7
5
  const draftPosition = useContext(AnnotationsDraftContext);
8
- if (!isInlineCard && !getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
9
- return {};
10
- }
11
- if (!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
6
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
12
7
  return {};
13
8
  }
14
9
  if (!props.dataAttributes) {
@@ -1,5 +1,6 @@
1
1
  import React, { useCallback, useState, useContext, useMemo } from 'react';
2
2
  import { AnnotationTypes } from '@atlaskit/adf-schema';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
3
4
  import { updateWindowSelectionAroundDraft } from '../draft';
4
5
  import { FabricChannel } from '@atlaskit/analytics-listeners';
5
6
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
@@ -26,6 +27,9 @@ export const SelectionInlineCommentMounter = /*#__PURE__*/React.memo(props => {
26
27
  const providers = useContext(ProvidersContext);
27
28
  const isCommentsOnMediaBugFixEnabled = !!(providers !== null && providers !== void 0 && providers.inlineComment.isCommentsOnMediaBugFixEnabled);
28
29
  const inlineNodeTypes = useMemo(() => {
30
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
31
+ return undefined;
32
+ }
29
33
  if (actions.isValidAnnotationRange(range)) {
30
34
  return getRendererRangeInlineNodeNames({
31
35
  pos: documentPosition,
@@ -1,9 +1,9 @@
1
1
  import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  export function getRendererRangeInlineNodeNames(_ref) {
4
4
  var actions = _ref.actions,
5
5
  pos = _ref.pos;
6
- if (!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
6
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
7
7
  return undefined;
8
8
  }
9
9
  var doc = actions.doc;
@@ -12,7 +12,7 @@ import { createAnnotationStep, getPosFromRange } from '../steps';
12
12
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
13
13
  import { getIndexMatch } from './matches-utils';
14
14
  import { getRendererRangeInlineNodeNames } from './get-renderer-range-inline-node-names';
15
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
15
+ import { fg } from '@atlaskit/platform-feature-flags';
16
16
  var RendererActions = /*#__PURE__*/function () {
17
17
  // Any kind of refence is allowed
18
18
 
@@ -159,7 +159,7 @@ var RendererActions = /*#__PURE__*/function () {
159
159
  if (!range) {
160
160
  return false;
161
161
  }
162
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
162
+ if (fg('editor_inline_comments_on_inline_nodes')) {
163
163
  if (this.isRendererWithinRange(range)) {
164
164
  return false;
165
165
  }
@@ -328,7 +328,7 @@ var RendererActions = /*#__PURE__*/function () {
328
328
  }
329
329
 
330
330
  // TODO: Do not forget to remove `undefined` when the
331
- // `platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz` is removed.
331
+ // `editor_inline_comments_on_inline_nodes` is removed.
332
332
  }, {
333
333
  key: "getInlineNodeTypes",
334
334
  value: function getInlineNodeTypes(annotationId) {
@@ -7,9 +7,7 @@ import { injectIntl } from 'react-intl-next';
7
7
  import { useTaskItemsFormatContext } from '../../ui/TaskItemsFormatContext';
8
8
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
9
9
  var Date = /*#__PURE__*/memo(function Date(props) {
10
- var inlineAnnotationProps = useInlineAnnotationProps(props, {
11
- isInlineCard: false
12
- });
10
+ var inlineAnnotationProps = useInlineAnnotationProps(props);
13
11
  var timestamp = props.timestamp,
14
12
  parentIsIncompleteTask = props.parentIsIncompleteTask,
15
13
  intl = props.intl;
@@ -1,7 +1,7 @@
1
1
  /** @jsx jsx */
2
2
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
3
  import { jsx } from '@emotion/react';
4
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
5
5
  import { memo } from 'react';
6
6
  import { Emoji } from '@atlaskit/editor-common/emoji';
7
7
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
@@ -12,10 +12,8 @@ function EmojiItem(props) {
12
12
  text = props.text,
13
13
  fitToHeight = props.fitToHeight,
14
14
  resourceConfig = props.resourceConfig;
15
- var inlineAnnotationProps = useInlineAnnotationProps(props, {
16
- isInlineCard: false
17
- });
18
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
15
+ var inlineAnnotationProps = useInlineAnnotationProps(props);
16
+ if (fg('editor_inline_comments_on_inline_nodes')) {
19
17
  return jsx("span", inlineAnnotationProps, jsx(Emoji, {
20
18
  allowTextFallback: true,
21
19
  id: id,
@@ -5,7 +5,7 @@ import { jsx } from '@emotion/react';
5
5
  import { Card } from '@atlaskit/smart-card';
6
6
  import { CardSSR } from '@atlaskit/smart-card/ssr';
7
7
  import { UnsupportedInline } from '@atlaskit/editor-common/ui';
8
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
+ import { fg } from '@atlaskit/platform-feature-flags';
9
9
  import { CardErrorBoundary } from './fallback';
10
10
  import { withSmartCardStorage } from '../../ui/SmartCardStorage';
11
11
  import { getCardClickHandler } from '../utils/getCardClickHandler';
@@ -37,13 +37,11 @@ var InlineCard = function InlineCard(props) {
37
37
  // Below is added for the future implementation of Linking Platform namespaced analytic context
38
38
  location: 'renderer'
39
39
  };
40
- var inlineAnnotationProps = useInlineAnnotationProps(props, {
41
- isInlineCard: true
42
- });
40
+ var inlineAnnotationProps = useInlineAnnotationProps(props);
43
41
  if (ssr && url) {
44
42
  if (
45
43
  // eslint-disable-next-line @atlaskit/platform/no-invalid-feature-flag-usage
46
- getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
44
+ fg('editor_inline_comments_on_inline_nodes')) {
47
45
  return jsx("span", _extends({
48
46
  "data-inline-card": true,
49
47
  "data-card-data": data ? JSON.stringify(data) : undefined,
@@ -1,6 +1,6 @@
1
1
  import React, { memo } from 'react';
2
2
  import { Mention } from '@atlaskit/editor-common/mention';
3
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
4
4
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
5
5
  export default /*#__PURE__*/memo(function MentionItem(props) {
6
6
  var eventHandlers = props.eventHandlers,
@@ -9,10 +9,8 @@ export default /*#__PURE__*/memo(function MentionItem(props) {
9
9
  text = props.text,
10
10
  accessLevel = props.accessLevel,
11
11
  localId = props.localId;
12
- var inlineAnnotationProps = useInlineAnnotationProps(props, {
13
- isInlineCard: false
14
- });
15
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
12
+ var inlineAnnotationProps = useInlineAnnotationProps(props);
13
+ if (fg('editor_inline_comments_on_inline_nodes')) {
16
14
  return /*#__PURE__*/React.createElement("span", inlineAnnotationProps, /*#__PURE__*/React.createElement(Mention, {
17
15
  id: id,
18
16
  text: text,
@@ -1,16 +1,14 @@
1
1
  import React, { memo } from 'react';
2
2
  import { Status as AkStatus } from '@atlaskit/status/element';
3
3
  import { FabricElementsAnalyticsContext } from '@atlaskit/analytics-namespaced-context';
4
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
5
5
  import { useInlineAnnotationProps } from '../../ui/annotations/element/useInlineAnnotationProps';
6
6
  export default /*#__PURE__*/memo(function Status(props) {
7
7
  var text = props.text,
8
8
  color = props.color,
9
9
  localId = props.localId;
10
- var inlineAnnotationProps = useInlineAnnotationProps(props, {
11
- isInlineCard: false
12
- });
13
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
10
+ var inlineAnnotationProps = useInlineAnnotationProps(props);
11
+ if (fg('editor_inline_comments_on_inline_nodes')) {
14
12
  return /*#__PURE__*/React.createElement("span", inlineAnnotationProps, /*#__PURE__*/React.createElement(FabricElementsAnalyticsContext, {
15
13
  data: {
16
14
  userContext: 'document'
@@ -1,4 +1,4 @@
1
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
1
+ import { fg } from '@atlaskit/platform-feature-flags';
2
2
  import { AddMarkStep } from '@atlaskit/editor-prosemirror/transform';
3
3
  function getStartPos(element) {
4
4
  return parseInt(element.dataset.rendererStartPos || '-1', 10);
@@ -82,7 +82,7 @@ function isNodeInlineTextMark(node) {
82
82
  */
83
83
  function hasInlineNodeDescendant(node) {
84
84
  if (isElementNode(node)) {
85
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
85
+ if (fg('editor_inline_comments_on_inline_nodes')) {
86
86
  if (node.dataset.annotationInlineNode === 'true') {
87
87
  return true;
88
88
  }
@@ -102,7 +102,7 @@ function resolveNodePos(node) {
102
102
  if (prev && (isTextNode(prev) || isHighlightTextNode(prev))) {
103
103
  resolvedPos += (prev.textContent || '').length;
104
104
  } else if (prev) {
105
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
105
+ if (fg('editor_inline_comments_on_inline_nodes')) {
106
106
  if (isNodeInlineTextMark(prev) && prev.textContent) {
107
107
  resolvedPos += prev.textContent.length;
108
108
  } else {
@@ -129,10 +129,10 @@ export function resolvePos(node, offset) {
129
129
  if (!node) {
130
130
  return false;
131
131
  }
132
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
132
+ if (fg('editor_inline_comments_on_inline_nodes')) {
133
133
  var _node$parentElement;
134
134
  var startPosAncestor = (_node$parentElement = node.parentElement) === null || _node$parentElement === void 0 ? void 0 : _node$parentElement.closest('[data-renderer-start-pos');
135
- var potentialParent = getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? 'data-annotation-mark' : 'data-inline-card';
135
+ var potentialParent = fg('editor_inline_comments_on_inline_nodes') ? 'data-annotation-mark' : 'data-inline-card';
136
136
  if (startPosAncestor !== null && startPosAncestor !== void 0 && startPosAncestor.hasAttribute(potentialParent)) {
137
137
  if (findEnd) {
138
138
  return parseInt((startPosAncestor === null || startPosAncestor === void 0 ? void 0 : startPosAncestor.getAttribute('data-renderer-start-pos')) || '-1', 10) + 1;
@@ -160,7 +160,7 @@ export function resolvePos(node, offset) {
160
160
  // If our range is inside an inline node
161
161
  // We need to move our pointers to parent element
162
162
  // since we don't want to count text inside inline nodes at all
163
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
163
+ if (fg('editor_inline_comments_on_inline_nodes')) {
164
164
  if (!(isNodeInlineTextMark(preParentPointer) || isHighlightTextNode(preParentPointer))) {
165
165
  current = current.parentElement;
166
166
  offset = 0;
@@ -48,7 +48,7 @@ import { nodeToReact } from '../../react/nodes';
48
48
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
49
49
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
50
50
  var packageName = "@atlaskit/renderer";
51
- var packageVersion = "109.40.8";
51
+ var packageVersion = "109.40.10";
52
52
  export var defaultNodeComponents = nodeToReact;
53
53
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
54
54
  _inherits(Renderer, _PureComponent);
@@ -76,9 +76,7 @@ var tableSortableColumnStyle = function tableSortableColumnStyle(_ref2) {
76
76
  if (allowNestedHeaderLinks) {
77
77
  headingsCss = "\n /**\n * When the sort button is enabled we want the heading's copy link button\n * to reserve space so that it can prematurely wrap to avoid the button\n * being displayed underneath the sort button (hidden or obscured).\n *\n * The two buttons fight each other since the sort button is displayed\n * on hover of the <th /> and the copy link button is displayed on hover\n * of the heading.\n *\n * Note that this can break the WYSIWYG experience in the case where\n * a heading fills the width of the table cell and the only thing which\n * wraps is the copy link button. This is hopefully a rare fringe case.\n */\n .".concat(HeadingAnchorWrapperClassName, " {\n position: unset;\n }\n > {\n h1, h2, h3, h4, h5, h6 {\n margin-right: 30px;\n }\n }\n ");
78
78
  }
79
- return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\t\t.", " {\n\t\t\tpadding: 0;\n\n\t\t\t.", " {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tpadding: ", ";\n\t\t\t\tborder-width: 1.5px;\n\t\t\t\tborder-style: solid;\n\t\t\t\tborder-color: transparent;\n\n\t\t\t\t> *:first-child {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t@supports selector(:focus-visible) {\n\t\t\t\t\t&:focus {\n\t\t\t\t\t\toutline: unset;\n\t\t\t\t\t}\n\t\t\t\t\t&:focus-visible {\n\t\t\t\t\t\tborder-color: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\n\t\t\t.", " {\n\t\t\t\tmargin: 0;\n\t\t\t\t.", " {\n\t\t\t\t\topacity: 1;\n\t\t\t\t\ttransition: opacity 0.2s ease-in-out;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.", " {\n\t\t\t\t.", " {\n\t\t\t\t\topacity: 0;\n\t\t\t\t\t&:focus {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&:hover {\n\t\t\t\t.", " {\n\t\t\t\t\t.", " {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t"])), RendererCssClassName.SORTABLE_COLUMN_WRAPPER, RendererCssClassName.SORTABLE_COLUMN,
80
- // eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
81
- fg('platform_editor_tables_padding_increase') ? "".concat(tableCellPadding, "px ", "var(--ds-space-250, 20px)") : "".concat(tableCellPadding, "px"), "var(--ds-border-focused, ".concat(colors.B300, ")"), headingsCss, RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, SORTABLE_COLUMN_ICON_CLASSNAME, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, SORTABLE_COLUMN_ICON_CLASSNAME, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, SORTABLE_COLUMN_ICON_CLASSNAME);
79
+ return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n\t\t.", " {\n\t\t\tpadding: 0;\n\n\t\t\t.", " {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tpadding: ", ";\n\t\t\t\tborder-width: 1.5px;\n\t\t\t\tborder-style: solid;\n\t\t\t\tborder-color: transparent;\n\n\t\t\t\t> *:first-child {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t@supports selector(:focus-visible) {\n\t\t\t\t\t&:focus {\n\t\t\t\t\t\toutline: unset;\n\t\t\t\t\t}\n\t\t\t\t\t&:focus-visible {\n\t\t\t\t\t\tborder-color: ", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t", "\n\t\t\t}\n\n\t\t\t.", " {\n\t\t\t\tmargin: 0;\n\t\t\t\t.", " {\n\t\t\t\t\topacity: 1;\n\t\t\t\t\ttransition: opacity 0.2s ease-in-out;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t.", " {\n\t\t\t\t.", " {\n\t\t\t\t\topacity: 0;\n\t\t\t\t\t&:focus {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t&:hover {\n\t\t\t\t.", " {\n\t\t\t\t\t.", " {\n\t\t\t\t\t\topacity: 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t"])), RendererCssClassName.SORTABLE_COLUMN_WRAPPER, RendererCssClassName.SORTABLE_COLUMN, fg('platform_editor_tables_padding_increase') ? "".concat(tableCellPadding, "px ", "var(--ds-space-250, 20px)") : "".concat(tableCellPadding, "px"), "var(--ds-border-focused, ".concat(colors.B300, ")"), headingsCss, RendererCssClassName.SORTABLE_COLUMN_ICON_WRAPPER, SORTABLE_COLUMN_ICON_CLASSNAME, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, SORTABLE_COLUMN_ICON_CLASSNAME, RendererCssClassName.SORTABLE_COLUMN_NO_ORDER, SORTABLE_COLUMN_ICON_CLASSNAME);
82
80
  };
83
81
  var fullPageStyles = function fullPageStyles(_ref3, _ref4) {
84
82
  var appearance = _ref3.appearance;
@@ -103,10 +101,7 @@ var getShadowOverrides = function getShadowOverrides() {
103
101
  };
104
102
  function getAnnotationStyles(_ref6) {
105
103
  var allowAnnotations = _ref6.allowAnnotations;
106
- if (!fg('platform.editor.allow-inline-comments-for-inline-nodes')) {
107
- return '';
108
- }
109
- if (fg('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
104
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
110
105
  return '';
111
106
  }
112
107
  return css({
@@ -12,13 +12,13 @@ import { css, jsx } from '@emotion/react';
12
12
  import FeatureGates from '@atlaskit/feature-gate-js-client';
13
13
  import { AnnotationSharedCSSByState } from '@atlaskit/editor-common/styles';
14
14
  import { AnnotationMarkStates } from '@atlaskit/adf-schema';
15
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
15
+ import { fg } from '@atlaskit/platform-feature-flags';
16
16
  import { useIntl } from 'react-intl-next';
17
17
  import { inlineCommentMessages } from '../../../messages';
18
18
 
19
19
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState` is not object-safe
20
20
  var markStyles = function markStyles() {
21
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t}\n"])), AnnotationMarkStates.ACTIVE, getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? AnnotationSharedCSSByState().common : '', AnnotationSharedCSSByState().blur, AnnotationSharedCSSByState().focus);
21
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\tcolor: inherit;\n\tbackground-color: unset;\n\t-webkit-tap-highlight-color: transparent;\n\n\t&[data-mark-annotation-state='", "'] {\n\t\t", "\n\t\t", "\n\n\t\t&:focus,\n\t\t\t&[data-has-focus='true'] {\n\t\t\t", "\n\t\t}\n\t}\n"])), AnnotationMarkStates.ACTIVE, fg('editor_inline_comments_on_inline_nodes') ? AnnotationSharedCSSByState().common : '', AnnotationSharedCSSByState().blur, AnnotationSharedCSSByState().focus);
22
22
  };
23
23
  var isMobile = function isMobile() {
24
24
  return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
@@ -68,7 +68,7 @@ export var MarkComponent = function MarkComponent(_ref) {
68
68
  if (event.defaultPrevented || state !== AnnotationMarkStates.ACTIVE) {
69
69
  return;
70
70
  }
71
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
71
+ if (fg('editor_inline_comments_on_inline_nodes')) {
72
72
  // We only want to interfere with click events if the click is on some ui inside the renderer document
73
73
  // This is to prevent the click events from portaled content (such as link previews and mention profiles)
74
74
  if (event.target instanceof HTMLElement && event.target.closest('.ak-renderer-document')) {
@@ -125,7 +125,7 @@ export var MarkComponent = function MarkComponent(_ref) {
125
125
  };
126
126
  return jsx(useBlockLevel ? 'div' : 'mark', _objectSpread(_objectSpread(_objectSpread(_defineProperty({
127
127
  id: id
128
- }, getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
128
+ }, fg('editor_inline_comments_on_inline_nodes') ? 'onClickCapture' : 'onClick', onMarkClick), accessibility), overriddenData), !useBlockLevel && {
129
129
  css: [markStyles, getAccessibilityStyles()]
130
130
  }), children);
131
131
  };
@@ -1,13 +1,9 @@
1
1
  import { useContext } from 'react';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  import { AnnotationsDraftContext } from '../context';
4
- export function useInlineAnnotationProps(props, _ref) {
5
- var isInlineCard = _ref.isInlineCard;
4
+ export function useInlineAnnotationProps(props) {
6
5
  var draftPosition = useContext(AnnotationsDraftContext);
7
- if (!isInlineCard && !getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
8
- return {};
9
- }
10
- if (!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
6
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
11
7
  return {};
12
8
  }
13
9
  if (!props.dataAttributes) {
@@ -1,6 +1,7 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import React, { useCallback, useState, useContext, useMemo } from 'react';
3
3
  import { AnnotationTypes } from '@atlaskit/adf-schema';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { updateWindowSelectionAroundDraft } from '../draft';
5
6
  import { FabricChannel } from '@atlaskit/analytics-listeners';
6
7
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
@@ -28,6 +29,9 @@ export var SelectionInlineCommentMounter = /*#__PURE__*/React.memo(function (pro
28
29
  var providers = useContext(ProvidersContext);
29
30
  var isCommentsOnMediaBugFixEnabled = !!(providers !== null && providers !== void 0 && providers.inlineComment.isCommentsOnMediaBugFixEnabled);
30
31
  var inlineNodeTypes = useMemo(function () {
32
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
33
+ return undefined;
34
+ }
31
35
  if (actions.isValidAnnotationRange(range)) {
32
36
  return getRendererRangeInlineNodeNames({
33
37
  pos: documentPosition,
@@ -3,9 +3,7 @@ export type MarkDataAttributes = {
3
3
  'data-renderer-start-pos': number;
4
4
  };
5
5
  };
6
- export declare function useInlineAnnotationProps(props: MarkDataAttributes, { isInlineCard }: {
7
- isInlineCard: boolean;
8
- }): {
6
+ export declare function useInlineAnnotationProps(props: MarkDataAttributes): {
9
7
  'data-renderer-mark'?: undefined;
10
8
  'data-annotation-draft-mark'?: undefined;
11
9
  'data-annotation-inline-node'?: undefined;
@@ -3,9 +3,7 @@ export type MarkDataAttributes = {
3
3
  'data-renderer-start-pos': number;
4
4
  };
5
5
  };
6
- export declare function useInlineAnnotationProps(props: MarkDataAttributes, { isInlineCard }: {
7
- isInlineCard: boolean;
8
- }): {
6
+ export declare function useInlineAnnotationProps(props: MarkDataAttributes): {
9
7
  'data-renderer-mark'?: undefined;
10
8
  'data-annotation-draft-mark'?: undefined;
11
9
  'data-annotation-inline-node'?: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "109.40.8",
3
+ "version": "109.40.10",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -29,16 +29,16 @@
29
29
  "@atlaskit/analytics-listeners": "^8.10.0",
30
30
  "@atlaskit/analytics-namespaced-context": "^6.10.0",
31
31
  "@atlaskit/analytics-next": "^9.3.0",
32
- "@atlaskit/button": "^18.1.0",
33
- "@atlaskit/code": "^15.3.0",
34
- "@atlaskit/editor-common": "^84.0.0",
32
+ "@atlaskit/button": "^18.2.0",
33
+ "@atlaskit/code": "^15.4.0",
34
+ "@atlaskit/editor-common": "^84.3.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.15.0",
36
36
  "@atlaskit/editor-palette": "1.6.0",
37
37
  "@atlaskit/editor-prosemirror": "4.0.1",
38
38
  "@atlaskit/editor-shared-styles": "^2.12.0",
39
39
  "@atlaskit/emoji": "^67.6.0",
40
40
  "@atlaskit/feature-gate-js-client": "^4.18.0",
41
- "@atlaskit/icon": "^22.5.0",
41
+ "@atlaskit/icon": "^22.6.0",
42
42
  "@atlaskit/link-datasource": "^2.5.0",
43
43
  "@atlaskit/media-card": "^78.0.0",
44
44
  "@atlaskit/media-client": "^27.3.0",
@@ -48,7 +48,7 @@
48
48
  "@atlaskit/media-ui": "^25.10.0",
49
49
  "@atlaskit/media-viewer": "^48.6.0",
50
50
  "@atlaskit/platform-feature-flags": "^0.3.0",
51
- "@atlaskit/smart-card": "^27.8.0",
51
+ "@atlaskit/smart-card": "^27.9.0",
52
52
  "@atlaskit/status": "^1.4.0",
53
53
  "@atlaskit/task-decision": "^17.10.0",
54
54
  "@atlaskit/theme": "^12.11.0",
@@ -92,7 +92,7 @@
92
92
  "@types/react-loadable": "^5.4.1",
93
93
  "ajv": "^6.12.6",
94
94
  "enzyme": "^3.10.0",
95
- "jsdom": "^17.0.0",
95
+ "jsdom": "^22.0.0",
96
96
  "mockdate": "^3.0.5",
97
97
  "puppeteer": "13.7.0",
98
98
  "react": "^16.8.0",
@@ -131,10 +131,7 @@
131
131
  "platform_editor_tables_padding_increase": {
132
132
  "type": "boolean"
133
133
  },
134
- "platform.editor.allow-inline-comments-for-inline-nodes": {
135
- "type": "boolean"
136
- },
137
- "platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz": {
134
+ "editor_inline_comments_on_inline_nodes": {
138
135
  "type": "boolean"
139
136
  },
140
137
  "platform.editor.renderer-error-boundary-for-dom-errors": {