@atlaskit/editor-common 84.2.0 → 84.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/afm-jira/tsconfig.json +3 -0
  3. package/dist/cjs/extensibility/ExtensionNodeWrapper.js +2 -2
  4. package/dist/cjs/mark/commands.js +2 -7
  5. package/dist/cjs/messages/annotation.js +1 -1
  6. package/dist/cjs/monitoring/error.js +1 -1
  7. package/dist/cjs/react-node-view/getInlineNodeViewProducer.js +3 -2
  8. package/dist/cjs/styles/shared/annotation.js +2 -34
  9. package/dist/cjs/styles/shared/smartCard.js +1 -1
  10. package/dist/cjs/ui/DropList/index.js +1 -1
  11. package/dist/cjs/utils/annotation/index.js +10 -18
  12. package/dist/cjs/utils/index.js +5 -1
  13. package/dist/cjs/utils/scroll-gutter.js +3 -0
  14. package/dist/cjs/utils/validator.js +5 -5
  15. package/dist/cjs/whitespace/index.js +18 -0
  16. package/dist/es2019/extensibility/ExtensionNodeWrapper.js +1 -1
  17. package/dist/es2019/mark/commands.js +3 -10
  18. package/dist/es2019/messages/annotation.js +1 -1
  19. package/dist/es2019/monitoring/error.js +1 -1
  20. package/dist/es2019/react-node-view/getInlineNodeViewProducer.js +2 -1
  21. package/dist/es2019/styles/shared/annotation.js +3 -35
  22. package/dist/es2019/styles/shared/smartCard.js +2 -2
  23. package/dist/es2019/ui/DropList/index.js +1 -1
  24. package/dist/es2019/utils/annotation/index.js +11 -21
  25. package/dist/es2019/utils/index.js +4 -1
  26. package/dist/es2019/utils/scroll-gutter.js +3 -0
  27. package/dist/es2019/utils/validator.js +6 -6
  28. package/dist/es2019/whitespace/index.js +1 -0
  29. package/dist/esm/extensibility/ExtensionNodeWrapper.js +1 -1
  30. package/dist/esm/mark/commands.js +3 -8
  31. package/dist/esm/messages/annotation.js +1 -1
  32. package/dist/esm/monitoring/error.js +1 -1
  33. package/dist/esm/react-node-view/getInlineNodeViewProducer.js +2 -1
  34. package/dist/esm/styles/shared/annotation.js +3 -35
  35. package/dist/esm/styles/shared/smartCard.js +2 -2
  36. package/dist/esm/ui/DropList/index.js +1 -1
  37. package/dist/esm/utils/annotation/index.js +11 -19
  38. package/dist/esm/utils/index.js +4 -1
  39. package/dist/esm/utils/scroll-gutter.js +3 -0
  40. package/dist/esm/utils/validator.js +6 -6
  41. package/dist/esm/whitespace/index.js +1 -0
  42. package/dist/types/types/annotation/index.d.ts +2 -2
  43. package/dist/types/utils/annotation/index.d.ts +2 -2
  44. package/dist/types/utils/index.d.ts +4 -1
  45. package/dist/types/utils/scroll-gutter.d.ts +3 -0
  46. package/dist/types/whitespace/index.d.ts +1 -0
  47. package/dist/types-ts4.5/types/annotation/index.d.ts +2 -2
  48. package/dist/types-ts4.5/utils/annotation/index.d.ts +2 -2
  49. package/dist/types-ts4.5/utils/index.d.ts +4 -1
  50. package/dist/types-ts4.5/utils/scroll-gutter.d.ts +3 -0
  51. package/dist/types-ts4.5/whitespace/index.d.ts +1 -0
  52. package/package.json +3 -5
  53. package/whitespace/package.json +15 -0
  54. /package/dist/cjs/{utils → whitespace}/whitespace.js +0 -0
  55. /package/dist/es2019/{utils → whitespace}/whitespace.js +0 -0
  56. /package/dist/esm/{utils → whitespace}/whitespace.js +0 -0
  57. /package/dist/types/{utils → whitespace}/whitespace.d.ts +0 -0
  58. /package/dist/types-ts4.5/{utils → whitespace}/whitespace.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 84.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#117973](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117973)
8
+ [`6e37bac62083f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6e37bac62083f) -
9
+ moved one const, added new entry point for other and deprecated
10
+
11
+ ### Patch Changes
12
+
13
+ - [#113218](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/113218)
14
+ [`d1b428ec29d68`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d1b428ec29d68) -
15
+ [ED-23765] migrate inline node commenting feature flags to statsig feature gate
16
+
3
17
  ## 84.2.0
4
18
 
5
19
  ### Minor Changes
@@ -47,6 +47,9 @@
47
47
  {
48
48
  "path": "../../custom-steps/afm-jira/tsconfig.json"
49
49
  },
50
+ {
51
+ "path": "../../../design-system/dropdown-menu/afm-jira/tsconfig.json"
52
+ },
50
53
  {
51
54
  "path": "../../editor-json-transformer/afm-jira/tsconfig.json"
52
55
  },
@@ -8,7 +8,7 @@ exports.ExtensionNodeWrapper = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _react2 = require("@emotion/react");
10
10
  var _classnames = _interopRequireDefault(require("classnames"));
11
- var _utils = require("../utils");
11
+ var _whitespace = require("../whitespace");
12
12
  /** @jsx jsx */
13
13
 
14
14
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -46,6 +46,6 @@ var ExtensionNodeWrapper = exports.ExtensionNodeWrapper = function ExtensionNode
46
46
  (0, _react2.jsx)("span", {
47
47
  className: wrapperClassNames,
48
48
  css: styles
49
- }, children, nodeType === 'inlineExtension' && _utils.ZERO_WIDTH_SPACE)
49
+ }, children, nodeType === 'inlineExtension' && _whitespace.ZERO_WIDTH_SPACE)
50
50
  );
51
51
  };
@@ -140,22 +140,17 @@ var transformSmartCharsMentionsAndEmojis = exports.transformSmartCharsMentionsAn
140
140
  var applyMarkOnRange = exports.applyMarkOnRange = function applyMarkOnRange(from, to, removeMark, mark, tr) {
141
141
  var schema = tr.doc.type.schema;
142
142
  var code = schema.marks.code;
143
- var inlineCard = schema.nodes.inlineCard;
144
143
  if (mark.type === code) {
145
- (0, _platformFeatureFlags.getBooleanFF)('platform.editor.simplify-inline-cards-in-code-blocks_jw6t1') ? transformNonTextNodesToText(from, to, tr) : transformSmartCharsMentionsAndEmojis(from, to, tr);
144
+ (0, _platformFeatureFlags.fg)('platform.editor.simplify-inline-cards-in-code-blocks_jw6t1') ? transformNonTextNodesToText(from, to, tr) : transformSmartCharsMentionsAndEmojis(from, to, tr);
146
145
  }
147
146
  tr.doc.nodesBetween(tr.mapping.map(from), tr.mapping.map(to), function (node, pos) {
148
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
147
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
149
148
  if (!node.isText) {
150
149
  var isAllowedInlineNode = ['emoji', 'status', 'date', 'mention', 'inlineCard'].includes(node.type.name);
151
150
  if (!isAllowedInlineNode) {
152
151
  return true;
153
152
  }
154
153
  }
155
- } else if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
156
- if (!node.isText && node.type !== inlineCard) {
157
- return true;
158
- }
159
154
  } else {
160
155
  if (!node.isText) {
161
156
  return true;
@@ -11,7 +11,7 @@ var annotationMessages = exports.annotationMessages = (0, _reactIntlNext.defineM
11
11
  defaultMessage: 'Comment',
12
12
  description: 'Create/add an inline comment based on the users selection'
13
13
  },
14
- // TODO: Remove this message when the platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz FF is removed
14
+ // TODO: Remove this message when the editor_inline_comments_on_inline_nodes FF is removed
15
15
  createCommentInvalid: {
16
16
  id: 'fabric.editor.createCommentInvalid',
17
17
  defaultMessage: 'You can only comment on text and headings',
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  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; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "84.2.0";
20
+ var packageVersion = "84.3.0";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // TODO: Sanitise the URL instead of just removing it
@@ -13,6 +13,7 @@ var _react2 = require("@emotion/react");
13
13
  var _analytics = require("../analytics");
14
14
  var _ErrorBoundary = require("../ui/ErrorBoundary");
15
15
  var _utils = require("../utils");
16
+ var _whitespace = require("../whitespace");
16
17
  var _generateUniqueNodeKey = require("./generateUniqueNodeKey");
17
18
  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; }
18
19
  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; } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
@@ -178,7 +179,7 @@ function getPortalChildren(_ref2) {
178
179
  className: "zeroWidthSpaceContainer"
179
180
  }, (0, _react2.jsx)("span", {
180
181
  className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
181
- }), _utils.ZERO_WIDTH_SPACE), (0, _react2.jsx)(Component, (0, _extends2.default)({
182
+ }), _whitespace.ZERO_WIDTH_SPACE), (0, _react2.jsx)(Component, (0, _extends2.default)({
182
183
  view: nodeViewParams.view
183
184
  // TODO: ED-13910 - Remove the boolean to fix the prosemirror view type
184
185
  ,
@@ -191,7 +192,7 @@ function getPortalChildren(_ref2) {
191
192
  contentEditable: "false"
192
193
  }, (0, _react2.jsx)("span", {
193
194
  className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
194
- }), _utils.ZERO_WIDTH_SPACE) :
195
+ }), _whitespace.ZERO_WIDTH_SPACE) :
195
196
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
196
197
  (0, _react2.jsx)("span", {
197
198
  className: "".concat(inlineNodeViewClassname, "AddZeroWidthSpace")
@@ -25,7 +25,7 @@ var BlockAnnotationSharedClassNames = exports.BlockAnnotationSharedClassNames =
25
25
  var Yellow100 = 'rgb(255, 247, 214)';
26
26
  var Y200a = 'rgba(255, 196, 0, 0.82)';
27
27
  var AnnotationSharedCSSByState = exports.AnnotationSharedCSSByState = function AnnotationSharedCSSByState() {
28
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
28
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
29
29
  // NOTE: These styles are shared between renderer and editor. Sometimes they
30
30
  // need different selectors and other times they apply the same attributes
31
31
  // in a different way. For example in renderer the focus styles are an
@@ -55,38 +55,6 @@ var AnnotationSharedCSSByState = exports.AnnotationSharedCSSByState = function A
55
55
  borderBottomColor: "var(--ds-border-accent-yellow, ".concat(Y200a, ")")
56
56
  })
57
57
  };
58
- } else if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
59
- return {
60
- focus: (0, _react.css)({
61
- background: "var(--ds-background-accent-yellow-subtler, ".concat(_colors.Y75, ")"),
62
- borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, ".concat(_colors.Y300, ")")),
63
- boxShadow: "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(_colors.N60A, ", -1px 2px 3px ").concat(_colors.N60A), ")"),
64
- cursor: 'pointer',
65
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
66
- '&:has(.card)': {
67
- fontSize: '1.5rem',
68
- lineHeight: '1.2rem',
69
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
70
- '& > *': {
71
- fontSize: '16px'
72
- }
73
- }
74
- }),
75
- blur: (0, _react.css)({
76
- background: "var(--ds-background-accent-yellow-subtlest, ".concat(Yellow100, ")"),
77
- borderBottom: "2px solid ".concat("var(--ds-border-accent-yellow, ".concat(Y200a, ")")),
78
- cursor: 'pointer',
79
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
80
- '&:has(.card)': {
81
- fontSize: '1.5rem',
82
- lineHeight: '1.2rem',
83
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
84
- '& > *': {
85
- fontSize: '16px'
86
- }
87
- }
88
- })
89
- };
90
58
  } else {
91
59
  return {
92
60
  focus: (0, _react.css)({
@@ -107,7 +75,7 @@ var AnnotationSharedCSSByState = exports.AnnotationSharedCSSByState = function A
107
75
  }
108
76
  };
109
77
  var annotationSharedStyles = exports.annotationSharedStyles = function annotationSharedStyles() {
110
- return (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
78
+ return (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
111
79
  (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror {\n\t\t\t\t\t.", ",\n\t\t\t\t\t\t.", ",\n\t\t\t\t\t\t.", " {\n\t\t\t\t\t\t", ";\n\t\t\t\t\t}\n\n\t\t\t\t\t.", " {\n\t\t\t\t\t\t", ";\n\t\t\t\t\t}\n\n\t\t\t\t\t.", " {\n\t\t\t\t\t\t", ";\n\t\t\t\t\t\tcursor: initial;\n\t\t\t\t\t}\n\n\t\t\t\t\t.", " {\n\t\t\t\t\t\t", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"])), AnnotationSharedClassNames.blur, AnnotationSharedClassNames.focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().common, AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
112
80
  (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t.ProseMirror {\n\t\t\t\t\t.", " {\n\t\t\t\t\t\t", ";\n\t\t\t\t\t}\n\n\t\t\t\t\t.", " {\n\t\t\t\t\t\t", ";\n\t\t\t\t\t\tcursor: initial;\n\t\t\t\t\t}\n\n\t\t\t\t\t.", " {\n\t\t\t\t\t\t", ";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur);
113
81
  };
@@ -16,4 +16,4 @@ var DATASOURCE_INNER_CONTAINER_CLASSNAME = exports.DATASOURCE_INNER_CONTAINER_CL
16
16
  var FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = exports.FLOATING_TOOLBAR_LINKPICKER_CLASSNAME = 'card-floating-toolbar--link-picker';
17
17
 
18
18
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression, @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
19
- var smartCardStyles = exports.smartCardStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\tmax-width: calc(100% - 20px);\n\t\tvertical-align: top;\n\t\tword-break: break-all;\n\t\t", "\n\t\t.card {\n\t\t\tpadding-left: ", ";\n\t\t\tpadding-right: ", ";\n\t\t\tpadding-top: 0.5em;\n\t\t\tpadding-bottom: 0.5em;\n\t\t\tmargin-bottom: -0.5em;\n\n\t\t\t.", " > a:focus {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.", " .", " > a {\n\t\t\t", "\n\t\t}\n\t\t.", " > a {\n\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\tz-index: 1;\n\t\t\tposition: relative;\n\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > a {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\t\tz-index: 2;\n\t\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t&.", " .", " > div {\n\t\t\t", "\n\t\t\tborder-radius: ", ";\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > div {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", ".", " {\n\t\tmax-width: 100%;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t.", " {\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: ", ";\n\t\t\tborder-radius: ", ";\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t&.", " {\n\t\t\t.", " {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\t\t\t&::after {\n\t\t\t\ttransition: box-shadow 0s;\n\t\t\t}\n\t\t}\n\n\t\t&.", " .", " > div::after {\n\t\t\t", "\n\t\t}\n\n\t\t&.danger {\n\t\t\t.media-card-frame::after {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t\tbackground: ", " !important;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-right::after,\n\t\t\t.richMedia-resize-handle-left::after {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tpadding: 0;\n\t}\n"])), _smartCard.SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes') ? ".card-with-comment {\n background: ".concat("var(--ds-background-accent-yellow-subtler, ".concat(_colors.Y75, ")"), ";\n border-bottom: 2px solid ", "var(--ds-border-accent-yellow, ".concat(_colors.Y300, ")"), ";\n box-shadow: ", "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(_colors.N60A, ", -1px 2px 3px ").concat(_colors.N60A), ")"), ";\n }") : '', "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedNodeClassName, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "var(--ds-border-radius-200, 8px)", _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.DATASOURCE_CONTAINER, _smartCard.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, DATASOURCE_INNER_CONTAINER_CLASSNAME, "var(--ds-background-neutral-subtle, ".concat(_colors.N0, ")"), "var(--ds-border-radius-200, 8px)", "var(--ds-border, ".concat(_colors.N40, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, DATASOURCE_INNER_CONTAINER_CLASSNAME, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), DATASOURCE_INNER_CONTAINER_CLASSNAME, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.EMBED_CARD_CONTAINER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), FLOATING_TOOLBAR_LINKPICKER_CLASSNAME);
19
+ var smartCardStyles = exports.smartCardStyles = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t.", " {\n\t\tmax-width: calc(100% - 20px);\n\t\tvertical-align: top;\n\t\tword-break: break-all;\n\t\t", "\n\t\t.card {\n\t\t\tpadding-left: ", ";\n\t\t\tpadding-right: ", ";\n\t\t\tpadding-top: 0.5em;\n\t\t\tpadding-bottom: 0.5em;\n\t\t\tmargin-bottom: -0.5em;\n\n\t\t\t.", " > a:focus {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.", " .", " > a {\n\t\t\t", "\n\t\t}\n\t\t.", " > a {\n\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\tz-index: 1;\n\t\t\tposition: relative;\n\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > a {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t\t/* EDM-1717: box-shadow Safari fix start */\n\t\t\t\tz-index: 2;\n\t\t\t\t/* EDM-1717: box-shadow Safari fix end */\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\t\t}\n\n\t\t&.", " .", " > div {\n\t\t\t", "\n\t\t\tborder-radius: ", ";\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " > div {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t.", ".", " {\n\t\tmax-width: 100%;\n\t\tdisplay: flex;\n\t\tjustify-content: center;\n\n\t\t.", " {\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: ", ";\n\t\t\tborder-radius: ", ";\n\t\t\tborder: 1px solid ", ";\n\t\t}\n\n\t\t&.", " {\n\t\t\t.", " {\n\t\t\t\t", "\n\t\t\t}\n\t\t}\n\n\t\t&.danger {\n\t\t\t.", " {\n\t\t\t\tbox-shadow: 0 0 0 1px ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\t.", " > div {\n\t\t\tcursor: pointer;\n\t\t\t&::after {\n\t\t\t\ttransition: box-shadow 0s;\n\t\t\t}\n\t\t}\n\n\t\t&.", " .", " > div::after {\n\t\t\t", "\n\t\t}\n\n\t\t&.danger {\n\t\t\t.media-card-frame::after {\n\t\t\t\tbox-shadow: 0 0 0 1px ", " !important;\n\t\t\t\tbackground: ", " !important;\n\t\t\t}\n\t\t\t.richMedia-resize-handle-right::after,\n\t\t\t.richMedia-resize-handle-left::after {\n\t\t\t\tbackground: ", ";\n\t\t\t}\n\t\t}\n\t}\n\n\t.", " {\n\t\tpadding: 0;\n\t}\n"])), _smartCard.SmartCardSharedCssClassName.INLINE_CARD_CONTAINER, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? ".card-with-comment {\n background: ".concat("var(--ds-background-accent-yellow-subtler, ".concat(_colors.Y75, ")"), ";\n border-bottom: 2px solid ", "var(--ds-border-accent-yellow, ".concat(_colors.Y300, ")"), ";\n box-shadow: ", "var(--ds-shadow-overlay, ".concat("1px 2px 3px ".concat(_colors.N60A, ", -1px 2px 3px ").concat(_colors.N60A), ")"), ";\n }") : '', "var(--ds-space-025, 2px)", "var(--ds-space-025, 2px)", _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _editorSharedStyles.akEditorSelectedNodeClassName, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "var(--ds-border-radius-200, 8px)", _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.DATASOURCE_CONTAINER, _smartCard.SmartCardSharedCssClassName.BLOCK_CARD_CONTAINER, DATASOURCE_INNER_CONTAINER_CLASSNAME, "var(--ds-background-neutral-subtle, ".concat(_colors.N0, ")"), "var(--ds-border-radius-200, 8px)", "var(--ds-border, ".concat(_colors.N40, ")"), _editorSharedStyles.akEditorSelectedNodeClassName, DATASOURCE_INNER_CONTAINER_CLASSNAME, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), DATASOURCE_INNER_CONTAINER_CLASSNAME, "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), _smartCard.SmartCardSharedCssClassName.EMBED_CARD_CONTAINER, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, _editorSharedStyles.akEditorSelectedNodeClassName, _smartCard.SmartCardSharedCssClassName.LOADER_WRAPPER, (0, _editorSharedStyles.getSelectionStyles)([_editorSharedStyles.SelectionStyle.BoxShadow]), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), "var(--ds-background-danger, ".concat(_editorSharedStyles.akEditorDeleteBackground, ")"), "var(--ds-border-danger, ".concat(_editorSharedStyles.akEditorDeleteBorder, ")"), FLOATING_TOOLBAR_LINKPICKER_CLASSNAME);
@@ -20,7 +20,7 @@ var _Layer = _interopRequireDefault(require("../Layer"));
20
20
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
21
21
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "84.2.0";
23
+ var packageVersion = "84.3.0";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  var DropList = /*#__PURE__*/function (_Component) {
@@ -19,29 +19,21 @@ var canApplyAnnotationOnRange = exports.canApplyAnnotationOnRange = function can
19
19
  if (isNaN(from + to) || to - from <= 0 || to < 0 || from < 0) {
20
20
  return false;
21
21
  }
22
- var inlineCard = schema.nodes.inlineCard;
23
22
  var foundInvalid = false;
24
23
  doc.nodesBetween(rangeSelection.from, rangeSelection.to, function (node, _pos, parent) {
25
24
  // Special exception for hardBreak nodes
26
25
  if (schema.nodes.hardBreak === node.type) {
27
26
  return false;
28
27
  }
28
+
29
29
  // For block elements or text nodes, we want to check
30
30
  // if annotations are allowed inside this tree
31
31
  // or if we're leaf and not text
32
-
33
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes')) {
34
- if ((0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
35
- var isAllowedInlineNode = ['emoji', 'status', 'date', 'mention', 'inlineCard'].includes(node.type.name);
36
- if (node.isInline && !node.isText && !isAllowedInlineNode || node.isLeaf && !node.isText && !isAllowedInlineNode || node.isText && !(parent !== null && parent !== void 0 && parent.type.allowsMarkType(schema.marks.annotation))) {
37
- foundInvalid = true;
38
- return false;
39
- }
40
- } else {
41
- if (node.isInline && !node.isText && node.type !== inlineCard || node.isLeaf && !node.isText && node.type !== inlineCard || node.isText && !(parent !== null && parent !== void 0 && parent.type.allowsMarkType(schema.marks.annotation))) {
42
- foundInvalid = true;
43
- return false;
44
- }
32
+ if ((0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
33
+ var isAllowedInlineNode = ['emoji', 'status', 'date', 'mention', 'inlineCard'].includes(node.type.name);
34
+ if (node.isInline && !node.isText && !isAllowedInlineNode || node.isLeaf && !node.isText && !isAllowedInlineNode || node.isText && !(parent !== null && parent !== void 0 && parent.type.allowsMarkType(schema.marks.annotation))) {
35
+ foundInvalid = true;
36
+ return false;
45
37
  }
46
38
  } else {
47
39
  if (node.isInline && !node.isText || node.isLeaf && !node.isText || node.isText && !(parent !== null && parent !== void 0 && parent.type.allowsMarkType(schema.marks.annotation))) {
@@ -111,7 +103,7 @@ function containsAnyAnnotations(slice, state) {
111
103
  function getRangeInlineNodeNames(_ref) {
112
104
  var doc = _ref.doc,
113
105
  pos = _ref.pos;
114
- if (!(0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
106
+ if (!(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
115
107
  return undefined;
116
108
  }
117
109
  var nodeNames = new Set();
@@ -129,13 +121,13 @@ function getRangeInlineNodeNames(_ref) {
129
121
  /**
130
122
  * This function returns a list of node types that are wrapped by an annotation mark.
131
123
  *
132
- * The `undefined` will be returned if `platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz` is off.
124
+ * The `undefined` will be returned if `editor_inline_comments_on_inline_nodes` is off.
133
125
  *
134
126
  * @todo: Do not forget to remove `undefined` when the
135
- * `platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz` is removed.
127
+ * `editor_inline_comments_on_inline_nodes` is removed.
136
128
  */
137
129
  function getAnnotationInlineNodeTypes(state, annotationId) {
138
- if (!(0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
130
+ if (!(0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes')) {
139
131
  return undefined;
140
132
  }
141
133
  var mark = state.schema.marks.annotation.create({
@@ -1152,7 +1152,7 @@ var _table = require("./table");
1152
1152
  var _compareNodes = require("./compareNodes");
1153
1153
  var _compose = require("./compose");
1154
1154
  var _isTextInput = require("./is-text-input");
1155
- var _whitespace = require("./whitespace");
1155
+ var _whitespace = require("../whitespace");
1156
1156
  var _shouldForceTracking = require("./should-force-tracking");
1157
1157
  var _getModeFromTheme = require("./getModeFromTheme");
1158
1158
  var _getPerformanceOptions = require("./get-performance-options");
@@ -1181,6 +1181,10 @@ var _insertNodeIntoOrderedList = require("./insert-node-into-ordered-list");
1181
1181
  var _wrapSelectionIn = require("./wrap-selection-in");
1182
1182
  var _calculateToolbarPosition = require("./calculate-toolbar-position");
1183
1183
  var _nodesByLocalIds = require("./nodes-by-localIds");
1184
+ /**
1185
+ * @deprecated - [ED-23844] moving to own entry point @atlaskit/editor-common/whitespace
1186
+ */
1187
+
1184
1188
  // prosemirror-history does not export its plugin key
1185
1189
  var pmHistoryPluginKey = exports.pmHistoryPluginKey = 'history$';
1186
1190
  function shallowEqual() {
@@ -5,5 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.GUTTER_SIZE_MOBILE_IN_PX = exports.GUTTER_SIZE_IN_PX = exports.GUTTER_SELECTOR = void 0;
7
7
  var GUTTER_SIZE_IN_PX = exports.GUTTER_SIZE_IN_PX = 120; // Default gutter size
8
+ /**
9
+ * @deprecated - [ED-23844] only used in Editor Core
10
+ */
8
11
  var GUTTER_SIZE_MOBILE_IN_PX = exports.GUTTER_SIZE_MOBILE_IN_PX = 36; // Gutter size for Mobile
9
12
  var GUTTER_SELECTOR = exports.GUTTER_SELECTOR = '#editor-scroll-gutter';
@@ -255,7 +255,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
255
255
  return _objectSpread({
256
256
  type: type,
257
257
  attrs: attrs
258
- }, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? {
258
+ }, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? {
259
259
  marks: marks
260
260
  } : {});
261
261
  }
@@ -267,7 +267,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
267
267
  return _objectSpread({
268
268
  type: type,
269
269
  attrs: attrs
270
- }, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? {
270
+ }, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? {
271
271
  marks: marks
272
272
  } : {});
273
273
  }
@@ -279,7 +279,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
279
279
  return _objectSpread({
280
280
  type: type,
281
281
  attrs: attrs
282
- }, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? {
282
+ }, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? {
283
283
  marks: marks
284
284
  } : {});
285
285
  }
@@ -302,7 +302,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
302
302
  return _objectSpread({
303
303
  type: type,
304
304
  attrs: attrs
305
- }, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes') ? {
305
+ }, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? {
306
306
  marks: marks
307
307
  } : {});
308
308
  }
@@ -509,7 +509,7 @@ var getValidNode = exports.getValidNode = function getValidNode(originalNode) {
509
509
  text: mentionText,
510
510
  accessLevel: ''
511
511
  }
512
- }, (0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ? {
512
+ }, (0, _platformFeatureFlags.fg)('editor_inline_comments_on_inline_nodes') ? {
513
513
  marks: marks
514
514
  } : {});
515
515
  if (mentionAccess) {
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "ZERO_WIDTH_JOINER", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _whitespace.ZERO_WIDTH_JOINER;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "ZERO_WIDTH_SPACE", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _whitespace.ZERO_WIDTH_SPACE;
16
+ }
17
+ });
18
+ var _whitespace = require("./whitespace");
@@ -4,7 +4,7 @@ import React from 'react';
4
4
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
5
5
  import { css, jsx } from '@emotion/react';
6
6
  import classnames from 'classnames';
7
- import { ZERO_WIDTH_SPACE } from '../utils';
7
+ import { ZERO_WIDTH_SPACE } from '../whitespace';
8
8
  const styles = css({
9
9
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
10
10
  '&.inline-extension': {
@@ -2,7 +2,7 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
2
2
  // eslint-disable-next-line no-duplicate-imports
3
3
 
4
4
  import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
5
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
5
+ import { fg } from '@atlaskit/platform-feature-flags';
6
6
  const SMART_TO_ASCII = {
7
7
  '…': '...',
8
8
  '→': '->',
@@ -150,24 +150,17 @@ export const applyMarkOnRange = (from, to, removeMark, mark, tr) => {
150
150
  const {
151
151
  code
152
152
  } = schema.marks;
153
- const {
154
- inlineCard
155
- } = schema.nodes;
156
153
  if (mark.type === code) {
157
- getBooleanFF('platform.editor.simplify-inline-cards-in-code-blocks_jw6t1') ? transformNonTextNodesToText(from, to, tr) : transformSmartCharsMentionsAndEmojis(from, to, tr);
154
+ fg('platform.editor.simplify-inline-cards-in-code-blocks_jw6t1') ? transformNonTextNodesToText(from, to, tr) : transformSmartCharsMentionsAndEmojis(from, to, tr);
158
155
  }
159
156
  tr.doc.nodesBetween(tr.mapping.map(from), tr.mapping.map(to), (node, pos) => {
160
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
157
+ if (fg('editor_inline_comments_on_inline_nodes')) {
161
158
  if (!node.isText) {
162
159
  const isAllowedInlineNode = ['emoji', 'status', 'date', 'mention', 'inlineCard'].includes(node.type.name);
163
160
  if (!isAllowedInlineNode) {
164
161
  return true;
165
162
  }
166
163
  }
167
- } else if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
168
- if (!node.isText && node.type !== inlineCard) {
169
- return true;
170
- }
171
164
  } else {
172
165
  if (!node.isText) {
173
166
  return true;
@@ -5,7 +5,7 @@ export const annotationMessages = defineMessages({
5
5
  defaultMessage: 'Comment',
6
6
  description: 'Create/add an inline comment based on the users selection'
7
7
  },
8
- // TODO: Remove this message when the platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz FF is removed
8
+ // TODO: Remove this message when the editor_inline_comments_on_inline_nodes FF is removed
9
9
  createCommentInvalid: {
10
10
  id: 'fabric.editor.createCommentInvalid',
11
11
  defaultMessage: 'You can only comment on text and headings',
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "84.2.0";
4
+ const packageVersion = "84.3.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -6,7 +6,8 @@ import React from 'react';
6
6
  import { jsx } from '@emotion/react';
7
7
  import { ACTION_SUBJECT, ACTION_SUBJECT_ID } from '../analytics';
8
8
  import { ErrorBoundary } from '../ui/ErrorBoundary';
9
- import { analyticsEventKey, browser, getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered, ZERO_WIDTH_SPACE } from '../utils';
9
+ import { analyticsEventKey, browser, getPerformanceOptions, startMeasureReactNodeViewRendered, stopMeasureReactNodeViewRendered } from '../utils';
10
+ import { ZERO_WIDTH_SPACE } from '../whitespace';
10
11
  import { generateUniqueNodeKey } from './generateUniqueNodeKey';
11
12
  export const inlineNodeViewClassname = 'inlineNodeView';
12
13
  function createNodeView({
@@ -1,6 +1,6 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import { css } from '@emotion/react';
3
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
+ import { fg } from '@atlaskit/platform-feature-flags';
4
4
  import { N60A, Y300, Y75 } from '@atlaskit/theme/colors';
5
5
  export const annotationPrefix = 'ak-editor-annotation';
6
6
  export const AnnotationSharedClassNames = {
@@ -17,7 +17,7 @@ export const BlockAnnotationSharedClassNames = {
17
17
  const Yellow100 = 'rgb(255, 247, 214)';
18
18
  const Y200a = 'rgba(255, 196, 0, 0.82)';
19
19
  export const AnnotationSharedCSSByState = () => {
20
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
20
+ if (fg('editor_inline_comments_on_inline_nodes')) {
21
21
  // NOTE: These styles are shared between renderer and editor. Sometimes they
22
22
  // need different selectors and other times they apply the same attributes
23
23
  // in a different way. For example in renderer the focus styles are an
@@ -47,38 +47,6 @@ export const AnnotationSharedCSSByState = () => {
47
47
  borderBottomColor: `var(--ds-border-accent-yellow, ${Y200a})`
48
48
  })
49
49
  };
50
- } else if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
51
- return {
52
- focus: css({
53
- background: `var(--ds-background-accent-yellow-subtler, ${Y75})`,
54
- borderBottom: `2px solid ${`var(--ds-border-accent-yellow, ${Y300})`}`,
55
- boxShadow: `var(--ds-shadow-overlay, ${`1px 2px 3px ${N60A}, -1px 2px 3px ${N60A}`})`,
56
- cursor: 'pointer',
57
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
58
- '&:has(.card)': {
59
- fontSize: '1.5rem',
60
- lineHeight: '1.2rem',
61
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
62
- '& > *': {
63
- fontSize: '16px'
64
- }
65
- }
66
- }),
67
- blur: css({
68
- background: `var(--ds-background-accent-yellow-subtlest, ${Yellow100})`,
69
- borderBottom: `2px solid ${`var(--ds-border-accent-yellow, ${Y200a})`}`,
70
- cursor: 'pointer',
71
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-selectors -- Ignored via go/DSP-18766
72
- '&:has(.card)': {
73
- fontSize: '1.5rem',
74
- lineHeight: '1.2rem',
75
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-nested-selectors -- Ignored via go/DSP-18766
76
- '& > *': {
77
- fontSize: '16px'
78
- }
79
- }
80
- })
81
- };
82
50
  } else {
83
51
  return {
84
52
  focus: css({
@@ -98,7 +66,7 @@ export const AnnotationSharedCSSByState = () => {
98
66
  };
99
67
  }
100
68
  };
101
- export const annotationSharedStyles = () => getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz') ?
69
+ export const annotationSharedStyles = () => fg('editor_inline_comments_on_inline_nodes') ?
102
70
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
103
71
  css`
104
72
  .ProseMirror {
@@ -1,7 +1,7 @@
1
1
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
2
2
  import { css } from '@emotion/react';
3
3
  import { akEditorDeleteBackground, akEditorDeleteBorder, akEditorSelectedNodeClassName, getSelectionStyles, SelectionStyle } from '@atlaskit/editor-shared-styles';
4
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
5
5
  import { N0, N40 } from '@atlaskit/theme/colors';
6
6
  import { N60A, Y300, Y75 } from '@atlaskit/theme/colors';
7
7
  import { SmartCardSharedCssClassName } from './smart-card';
@@ -14,7 +14,7 @@ export const smartCardStyles = css`
14
14
  max-width: calc(100% - 20px);
15
15
  vertical-align: top;
16
16
  word-break: break-all;
17
- ${getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes') ? `.card-with-comment {
17
+ ${fg('editor_inline_comments_on_inline_nodes') ? `.card-with-comment {
18
18
  background: ${`var(--ds-background-accent-yellow-subtler, ${Y75})`};
19
19
  border-bottom: 2px solid ${`var(--ds-border-accent-yellow, ${Y300})`};
20
20
  box-shadow: ${`var(--ds-shadow-overlay, ${`1px 2px 3px ${N60A}, -1px 2px 3px ${N60A}`})`};
@@ -9,7 +9,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
9
9
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
10
10
  import Layer from '../Layer';
11
11
  const packageName = "@atlaskit/editor-common";
12
- const packageVersion = "84.2.0";
12
+ const packageVersion = "84.3.0";
13
13
  const halfFocusRing = 1;
14
14
  const dropOffset = '0, 8';
15
15
  class DropList extends Component {
@@ -1,5 +1,5 @@
1
1
  import { AnnotationTypes } from '@atlaskit/adf-schema';
2
- import { getBooleanFF } from '@atlaskit/platform-feature-flags';
2
+ import { fg } from '@atlaskit/platform-feature-flags';
3
3
  export const canApplyAnnotationOnRange = (rangeSelection, doc, schema) => {
4
4
  const {
5
5
  from,
@@ -8,31 +8,21 @@ export const canApplyAnnotationOnRange = (rangeSelection, doc, schema) => {
8
8
  if (isNaN(from + to) || to - from <= 0 || to < 0 || from < 0) {
9
9
  return false;
10
10
  }
11
- const {
12
- inlineCard
13
- } = schema.nodes;
14
11
  let foundInvalid = false;
15
12
  doc.nodesBetween(rangeSelection.from, rangeSelection.to, (node, _pos, parent) => {
16
13
  // Special exception for hardBreak nodes
17
14
  if (schema.nodes.hardBreak === node.type) {
18
15
  return false;
19
16
  }
17
+
20
18
  // For block elements or text nodes, we want to check
21
19
  // if annotations are allowed inside this tree
22
20
  // or if we're leaf and not text
23
-
24
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes')) {
25
- if (getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
26
- const isAllowedInlineNode = ['emoji', 'status', 'date', 'mention', 'inlineCard'].includes(node.type.name);
27
- if (node.isInline && !node.isText && !isAllowedInlineNode || node.isLeaf && !node.isText && !isAllowedInlineNode || node.isText && !(parent !== null && parent !== void 0 && parent.type.allowsMarkType(schema.marks.annotation))) {
28
- foundInvalid = true;
29
- return false;
30
- }
31
- } else {
32
- if (node.isInline && !node.isText && node.type !== inlineCard || node.isLeaf && !node.isText && node.type !== inlineCard || node.isText && !(parent !== null && parent !== void 0 && parent.type.allowsMarkType(schema.marks.annotation))) {
33
- foundInvalid = true;
34
- return false;
35
- }
21
+ if (fg('editor_inline_comments_on_inline_nodes')) {
22
+ const isAllowedInlineNode = ['emoji', 'status', 'date', 'mention', 'inlineCard'].includes(node.type.name);
23
+ if (node.isInline && !node.isText && !isAllowedInlineNode || node.isLeaf && !node.isText && !isAllowedInlineNode || node.isText && !(parent !== null && parent !== void 0 && parent.type.allowsMarkType(schema.marks.annotation))) {
24
+ foundInvalid = true;
25
+ return false;
36
26
  }
37
27
  } else {
38
28
  if (node.isInline && !node.isText || node.isLeaf && !node.isText || node.isText && !(parent !== null && parent !== void 0 && parent.type.allowsMarkType(schema.marks.annotation))) {
@@ -111,7 +101,7 @@ export function getRangeInlineNodeNames({
111
101
  doc,
112
102
  pos
113
103
  }) {
114
- if (!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
104
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
115
105
  return undefined;
116
106
  }
117
107
  let nodeNames = new Set();
@@ -129,13 +119,13 @@ export function getRangeInlineNodeNames({
129
119
  /**
130
120
  * This function returns a list of node types that are wrapped by an annotation mark.
131
121
  *
132
- * The `undefined` will be returned if `platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz` is off.
122
+ * The `undefined` will be returned if `editor_inline_comments_on_inline_nodes` is off.
133
123
  *
134
124
  * @todo: Do not forget to remove `undefined` when the
135
- * `platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz` is removed.
125
+ * `editor_inline_comments_on_inline_nodes` is removed.
136
126
  */
137
127
  export function getAnnotationInlineNodeTypes(state, annotationId) {
138
- if (!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
128
+ if (!fg('editor_inline_comments_on_inline_nodes')) {
139
129
  return undefined;
140
130
  }
141
131
  const mark = state.schema.marks.annotation.create({