@atlaskit/renderer 109.32.2 → 109.32.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/renderer
2
2
 
3
+ ## 109.32.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#109969](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109969)
8
+ [`52590a0b562ef`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/52590a0b562ef) -
9
+ ED-23690 Adds an attribute to annotation analytic events with the name of nodes inside the
10
+ annotation range
11
+ - Updated dependencies
12
+
3
13
  ## 109.32.2
4
14
 
5
15
  ### Patch Changes
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getRendererRangeInlineNodeNames = getRendererRangeInlineNodeNames;
7
+ var _utils = require("@atlaskit/editor-common/utils");
8
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
9
+ function getRendererRangeInlineNodeNames(_ref) {
10
+ var actions = _ref.actions,
11
+ pos = _ref.pos;
12
+ if (!(0, _platformFeatureFlags.getBooleanFF)('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
13
+ return undefined;
14
+ }
15
+ var doc = actions.doc;
16
+ if (!pos || !doc) {
17
+ return undefined;
18
+ }
19
+ var inlineNodeNames = (0, _utils.getRangeInlineNodeNames)({
20
+ doc: doc,
21
+ pos: pos
22
+ });
23
+ return inlineNodeNames;
24
+ }
@@ -16,6 +16,7 @@ var _transform = require("@atlaskit/editor-prosemirror/transform");
16
16
  var _steps = require("../steps");
17
17
  var _analytics = require("@atlaskit/editor-common/analytics");
18
18
  var _matchesUtils = require("./matches-utils");
19
+ var _getRendererRangeInlineNodeNames = require("./get-renderer-range-inline-node-names");
19
20
  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; }
20
21
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
21
22
  var RendererActions = exports.default = /*#__PURE__*/function () {
@@ -116,7 +117,16 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
116
117
  action: _analytics.ACTION.DELETED,
117
118
  actionSubject: _analytics.ACTION_SUBJECT.ANNOTATION,
118
119
  actionSubjectId: _analytics.ACTION_SUBJECT_ID.INLINE_COMMENT,
119
- eventType: _analytics.EVENT_TYPE.TRACK
120
+ eventType: _analytics.EVENT_TYPE.TRACK,
121
+ attributes: {
122
+ inlineNodeNames: step instanceof _transform.RemoveMarkStep ? (0, _getRendererRangeInlineNodeNames.getRendererRangeInlineNodeNames)({
123
+ pos: {
124
+ from: from,
125
+ to: to
126
+ },
127
+ actions: this
128
+ }) : undefined
129
+ }
120
130
  };
121
131
  this.onAnalyticsEvent(payload);
122
132
  }
@@ -169,6 +179,10 @@ var RendererActions = exports.default = /*#__PURE__*/function () {
169
179
  }
170
180
  return this._privateValidatePositionsForAnnotation(pos.from, pos.to);
171
181
  }
182
+
183
+ /**
184
+ * Note: False indicates that the selection not able to be calculated.
185
+ */
172
186
  }, {
173
187
  key: "getPositionFromRange",
174
188
  value: function getPositionFromRange(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoComment) {
@@ -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.32.2";
59
+ var packageVersion = "109.32.3";
60
60
  var defaultNodeComponents = exports.defaultNodeComponents = _nodes.nodeToReact;
61
61
  var Renderer = exports.Renderer = /*#__PURE__*/function (_PureComponent) {
62
62
  (0, _inherits2.default)(Renderer, _PureComponent);
@@ -12,6 +12,7 @@ var _adfSchema = require("@atlaskit/adf-schema");
12
12
  var _draft = require("../draft");
13
13
  var _analyticsListeners = require("@atlaskit/analytics-listeners");
14
14
  var _analytics = require("@atlaskit/editor-common/analytics");
15
+ var _getRendererRangeInlineNodeNames = require("../../../actions/get-renderer-range-inline-node-names");
15
16
  var _RendererActionsContext = require("../../RendererActionsContext");
16
17
  var _context = require("../context");
17
18
  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); }
@@ -58,7 +59,12 @@ var SelectionInlineCommentMounter = exports.SelectionInlineCommentMounter = /*#_
58
59
  action: _analytics.ACTION.INSERTED,
59
60
  actionSubject: _analytics.ACTION_SUBJECT.ANNOTATION,
60
61
  actionSubjectId: _analytics.ACTION_SUBJECT_ID.INLINE_COMMENT,
61
- attributes: {},
62
+ attributes: {
63
+ inlineNodeNames: (0, _getRendererRangeInlineNodeNames.getRendererRangeInlineNodeNames)({
64
+ pos: positionToAnnotate,
65
+ actions: actions
66
+ })
67
+ },
62
68
  eventType: _analytics.EVENT_TYPE.TRACK
63
69
  }).fire(_analyticsListeners.FabricChannel.editor);
64
70
  }
@@ -81,7 +87,12 @@ var SelectionInlineCommentMounter = exports.SelectionInlineCommentMounter = /*#_
81
87
  action: _analytics.ACTION.CREATE_NOT_ALLOWED,
82
88
  actionSubject: _analytics.ACTION_SUBJECT.ANNOTATION,
83
89
  actionSubjectId: _analytics.ACTION_SUBJECT_ID.INLINE_COMMENT,
84
- attributes: {},
90
+ attributes: {
91
+ inlineNodeNames: (0, _getRendererRangeInlineNodeNames.getRendererRangeInlineNodeNames)({
92
+ pos: documentPosition,
93
+ actions: actions
94
+ })
95
+ },
85
96
  eventType: _analytics.EVENT_TYPE.TRACK
86
97
  }).fire(_analyticsListeners.FabricChannel.editor);
87
98
  }
@@ -97,7 +108,11 @@ var SelectionInlineCommentMounter = exports.SelectionInlineCommentMounter = /*#_
97
108
  actionSubjectId: _analytics.ACTION_SUBJECT_ID.INLINE_COMMENT,
98
109
  eventType: _analytics.EVENT_TYPE.TRACK,
99
110
  attributes: {
100
- overlap: uniqueAnnotationsInRange.length
111
+ overlap: uniqueAnnotationsInRange.length,
112
+ inlineNodeNames: (0, _getRendererRangeInlineNodeNames.getRendererRangeInlineNodeNames)({
113
+ pos: documentPosition,
114
+ actions: actions
115
+ })
101
116
  }
102
117
  }).fire(_analyticsListeners.FabricChannel.editor);
103
118
  }
@@ -136,12 +151,17 @@ var SelectionInlineCommentMounter = exports.SelectionInlineCommentMounter = /*#_
136
151
  actionSubject: _analytics.ACTION_SUBJECT.ANNOTATION,
137
152
  actionSubjectId: _analytics.ACTION_SUBJECT_ID.INLINE_COMMENT,
138
153
  eventType: _analytics.EVENT_TYPE.TRACK,
139
- attributes: {}
154
+ attributes: {
155
+ inlineNodeNames: (0, _getRendererRangeInlineNodeNames.getRendererRangeInlineNodeNames)({
156
+ pos: documentPosition,
157
+ actions: actions
158
+ })
159
+ }
140
160
  }).fire(_analyticsListeners.FabricChannel.editor);
141
161
  }
142
162
  removeDraftModeCallback();
143
163
  onCloseProps();
144
- }, [onCloseProps, removeDraftModeCallback, createAnalyticsEvent]);
164
+ }, [actions, documentPosition, onCloseProps, removeDraftModeCallback, createAnalyticsEvent]);
145
165
  return /*#__PURE__*/_react.default.createElement(Component, {
146
166
  range: range,
147
167
  draftRange: draftRange,
@@ -0,0 +1,19 @@
1
+ import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
2
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
+ export function getRendererRangeInlineNodeNames({
4
+ actions,
5
+ pos
6
+ }) {
7
+ if (!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
8
+ return undefined;
9
+ }
10
+ const doc = actions.doc;
11
+ if (!pos || !doc) {
12
+ return undefined;
13
+ }
14
+ const inlineNodeNames = getRangeInlineNodeNames({
15
+ doc,
16
+ pos
17
+ });
18
+ return inlineNodeNames;
19
+ }
@@ -6,6 +6,7 @@ import { AddNodeMarkStep, RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/e
6
6
  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
+ import { getRendererRangeInlineNodeNames } from './get-renderer-range-inline-node-names';
9
10
  export default class RendererActions {
10
11
  // Any kind of refence is allowed
11
12
 
@@ -96,7 +97,16 @@ export default class RendererActions {
96
97
  action: ACTION.DELETED,
97
98
  actionSubject: ACTION_SUBJECT.ANNOTATION,
98
99
  actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT,
99
- eventType: EVENT_TYPE.TRACK
100
+ eventType: EVENT_TYPE.TRACK,
101
+ attributes: {
102
+ inlineNodeNames: step instanceof RemoveMarkStep ? getRendererRangeInlineNodeNames({
103
+ pos: {
104
+ from: from,
105
+ to: to
106
+ },
107
+ actions: this
108
+ }) : undefined
109
+ }
100
110
  };
101
111
  this.onAnalyticsEvent(payload);
102
112
  }
@@ -145,6 +155,10 @@ export default class RendererActions {
145
155
  }
146
156
  return this._privateValidatePositionsForAnnotation(pos.from, pos.to);
147
157
  }
158
+
159
+ /**
160
+ * Note: False indicates that the selection not able to be calculated.
161
+ */
148
162
  getPositionFromRange(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoComment) {
149
163
  if (!this.doc || !this.schema || !range) {
150
164
  return false;
@@ -37,7 +37,7 @@ import { nodeToReact } from '../../react/nodes';
37
37
  export const NORMAL_SEVERITY_THRESHOLD = 2000;
38
38
  export const DEGRADED_SEVERITY_THRESHOLD = 3000;
39
39
  const packageName = "@atlaskit/renderer";
40
- const packageVersion = "109.32.2";
40
+ const packageVersion = "109.32.3";
41
41
  export const defaultNodeComponents = nodeToReact;
42
42
  export class Renderer extends PureComponent {
43
43
  constructor(props) {
@@ -3,6 +3,7 @@ import { AnnotationTypes } from '@atlaskit/adf-schema';
3
3
  import { updateWindowSelectionAroundDraft } from '../draft';
4
4
  import { FabricChannel } from '@atlaskit/analytics-listeners';
5
5
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
6
+ import { getRendererRangeInlineNodeNames } from '../../../actions/get-renderer-range-inline-node-names';
6
7
  import { RendererContext as ActionsContext } from '../../RendererActionsContext';
7
8
  import { ProvidersContext } from '../context';
8
9
  export const SelectionInlineCommentMounter = /*#__PURE__*/React.memo(props => {
@@ -46,7 +47,12 @@ export const SelectionInlineCommentMounter = /*#__PURE__*/React.memo(props => {
46
47
  action: ACTION.INSERTED,
47
48
  actionSubject: ACTION_SUBJECT.ANNOTATION,
48
49
  actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT,
49
- attributes: {},
50
+ attributes: {
51
+ inlineNodeNames: getRendererRangeInlineNodeNames({
52
+ pos: positionToAnnotate,
53
+ actions
54
+ })
55
+ },
50
56
  eventType: EVENT_TYPE.TRACK
51
57
  }).fire(FabricChannel.editor);
52
58
  }
@@ -69,7 +75,12 @@ export const SelectionInlineCommentMounter = /*#__PURE__*/React.memo(props => {
69
75
  action: ACTION.CREATE_NOT_ALLOWED,
70
76
  actionSubject: ACTION_SUBJECT.ANNOTATION,
71
77
  actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT,
72
- attributes: {},
78
+ attributes: {
79
+ inlineNodeNames: getRendererRangeInlineNodeNames({
80
+ pos: documentPosition,
81
+ actions
82
+ })
83
+ },
73
84
  eventType: EVENT_TYPE.TRACK
74
85
  }).fire(FabricChannel.editor);
75
86
  }
@@ -85,7 +96,11 @@ export const SelectionInlineCommentMounter = /*#__PURE__*/React.memo(props => {
85
96
  actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT,
86
97
  eventType: EVENT_TYPE.TRACK,
87
98
  attributes: {
88
- overlap: uniqueAnnotationsInRange.length
99
+ overlap: uniqueAnnotationsInRange.length,
100
+ inlineNodeNames: getRendererRangeInlineNodeNames({
101
+ pos: documentPosition,
102
+ actions
103
+ })
89
104
  }
90
105
  }).fire(FabricChannel.editor);
91
106
  }
@@ -124,12 +139,17 @@ export const SelectionInlineCommentMounter = /*#__PURE__*/React.memo(props => {
124
139
  actionSubject: ACTION_SUBJECT.ANNOTATION,
125
140
  actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT,
126
141
  eventType: EVENT_TYPE.TRACK,
127
- attributes: {}
142
+ attributes: {
143
+ inlineNodeNames: getRendererRangeInlineNodeNames({
144
+ pos: documentPosition,
145
+ actions
146
+ })
147
+ }
128
148
  }).fire(FabricChannel.editor);
129
149
  }
130
150
  removeDraftModeCallback();
131
151
  onCloseProps();
132
- }, [onCloseProps, removeDraftModeCallback, createAnalyticsEvent]);
152
+ }, [actions, documentPosition, onCloseProps, removeDraftModeCallback, createAnalyticsEvent]);
133
153
  return /*#__PURE__*/React.createElement(Component, {
134
154
  range: range,
135
155
  draftRange: draftRange,
@@ -0,0 +1,18 @@
1
+ import { getRangeInlineNodeNames } from '@atlaskit/editor-common/utils';
2
+ import { getBooleanFF } from '@atlaskit/platform-feature-flags';
3
+ export function getRendererRangeInlineNodeNames(_ref) {
4
+ var actions = _ref.actions,
5
+ pos = _ref.pos;
6
+ if (!getBooleanFF('platform.editor.allow-inline-comments-for-inline-nodes-round-2_ctuxz')) {
7
+ return undefined;
8
+ }
9
+ var doc = actions.doc;
10
+ if (!pos || !doc) {
11
+ return undefined;
12
+ }
13
+ var inlineNodeNames = getRangeInlineNodeNames({
14
+ doc: doc,
15
+ pos: pos
16
+ });
17
+ return inlineNodeNames;
18
+ }
@@ -11,6 +11,7 @@ import { AddNodeMarkStep, RemoveMarkStep, RemoveNodeMarkStep } from '@atlaskit/e
11
11
  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
+ import { getRendererRangeInlineNodeNames } from './get-renderer-range-inline-node-names';
14
15
  var RendererActions = /*#__PURE__*/function () {
15
16
  // Any kind of refence is allowed
16
17
 
@@ -109,7 +110,16 @@ var RendererActions = /*#__PURE__*/function () {
109
110
  action: ACTION.DELETED,
110
111
  actionSubject: ACTION_SUBJECT.ANNOTATION,
111
112
  actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT,
112
- eventType: EVENT_TYPE.TRACK
113
+ eventType: EVENT_TYPE.TRACK,
114
+ attributes: {
115
+ inlineNodeNames: step instanceof RemoveMarkStep ? getRendererRangeInlineNodeNames({
116
+ pos: {
117
+ from: from,
118
+ to: to
119
+ },
120
+ actions: this
121
+ }) : undefined
122
+ }
113
123
  };
114
124
  this.onAnalyticsEvent(payload);
115
125
  }
@@ -162,6 +172,10 @@ var RendererActions = /*#__PURE__*/function () {
162
172
  }
163
173
  return this._privateValidatePositionsForAnnotation(pos.from, pos.to);
164
174
  }
175
+
176
+ /**
177
+ * Note: False indicates that the selection not able to be calculated.
178
+ */
165
179
  }, {
166
180
  key: "getPositionFromRange",
167
181
  value: function getPositionFromRange(range, isCommentsOnMediaBugFixEnabled, isCommentsOnMediaBugVideoComment) {
@@ -47,7 +47,7 @@ import { nodeToReact } from '../../react/nodes';
47
47
  export var NORMAL_SEVERITY_THRESHOLD = 2000;
48
48
  export var DEGRADED_SEVERITY_THRESHOLD = 3000;
49
49
  var packageName = "@atlaskit/renderer";
50
- var packageVersion = "109.32.2";
50
+ var packageVersion = "109.32.3";
51
51
  export var defaultNodeComponents = nodeToReact;
52
52
  export var Renderer = /*#__PURE__*/function (_PureComponent) {
53
53
  _inherits(Renderer, _PureComponent);
@@ -4,6 +4,7 @@ import { AnnotationTypes } from '@atlaskit/adf-schema';
4
4
  import { updateWindowSelectionAroundDraft } from '../draft';
5
5
  import { FabricChannel } from '@atlaskit/analytics-listeners';
6
6
  import { ACTION, ACTION_SUBJECT, EVENT_TYPE, ACTION_SUBJECT_ID } from '@atlaskit/editor-common/analytics';
7
+ import { getRendererRangeInlineNodeNames } from '../../../actions/get-renderer-range-inline-node-names';
7
8
  import { RendererContext as ActionsContext } from '../../RendererActionsContext';
8
9
  import { ProvidersContext } from '../context';
9
10
  export var SelectionInlineCommentMounter = /*#__PURE__*/React.memo(function (props) {
@@ -48,7 +49,12 @@ export var SelectionInlineCommentMounter = /*#__PURE__*/React.memo(function (pro
48
49
  action: ACTION.INSERTED,
49
50
  actionSubject: ACTION_SUBJECT.ANNOTATION,
50
51
  actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT,
51
- attributes: {},
52
+ attributes: {
53
+ inlineNodeNames: getRendererRangeInlineNodeNames({
54
+ pos: positionToAnnotate,
55
+ actions: actions
56
+ })
57
+ },
52
58
  eventType: EVENT_TYPE.TRACK
53
59
  }).fire(FabricChannel.editor);
54
60
  }
@@ -71,7 +77,12 @@ export var SelectionInlineCommentMounter = /*#__PURE__*/React.memo(function (pro
71
77
  action: ACTION.CREATE_NOT_ALLOWED,
72
78
  actionSubject: ACTION_SUBJECT.ANNOTATION,
73
79
  actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT,
74
- attributes: {},
80
+ attributes: {
81
+ inlineNodeNames: getRendererRangeInlineNodeNames({
82
+ pos: documentPosition,
83
+ actions: actions
84
+ })
85
+ },
75
86
  eventType: EVENT_TYPE.TRACK
76
87
  }).fire(FabricChannel.editor);
77
88
  }
@@ -87,7 +98,11 @@ export var SelectionInlineCommentMounter = /*#__PURE__*/React.memo(function (pro
87
98
  actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT,
88
99
  eventType: EVENT_TYPE.TRACK,
89
100
  attributes: {
90
- overlap: uniqueAnnotationsInRange.length
101
+ overlap: uniqueAnnotationsInRange.length,
102
+ inlineNodeNames: getRendererRangeInlineNodeNames({
103
+ pos: documentPosition,
104
+ actions: actions
105
+ })
91
106
  }
92
107
  }).fire(FabricChannel.editor);
93
108
  }
@@ -126,12 +141,17 @@ export var SelectionInlineCommentMounter = /*#__PURE__*/React.memo(function (pro
126
141
  actionSubject: ACTION_SUBJECT.ANNOTATION,
127
142
  actionSubjectId: ACTION_SUBJECT_ID.INLINE_COMMENT,
128
143
  eventType: EVENT_TYPE.TRACK,
129
- attributes: {}
144
+ attributes: {
145
+ inlineNodeNames: getRendererRangeInlineNodeNames({
146
+ pos: documentPosition,
147
+ actions: actions
148
+ })
149
+ }
130
150
  }).fire(FabricChannel.editor);
131
151
  }
132
152
  removeDraftModeCallback();
133
153
  onCloseProps();
134
- }, [onCloseProps, removeDraftModeCallback, createAnalyticsEvent]);
154
+ }, [actions, documentPosition, onCloseProps, removeDraftModeCallback, createAnalyticsEvent]);
135
155
  return /*#__PURE__*/React.createElement(Component, {
136
156
  range: range,
137
157
  draftRange: draftRange,
@@ -0,0 +1,12 @@
1
+ import type RendererActions from './index';
2
+ export declare function getRendererRangeInlineNodeNames({ actions, pos, }: {
3
+ actions: RendererActions;
4
+ /**
5
+ * documentPosition is caclulated by `actions.getPositionFromRange`
6
+ * where `false` means that the selection is not able to be calculated.
7
+ */
8
+ pos?: {
9
+ from: number;
10
+ to: number;
11
+ } | false;
12
+ }): string[] | undefined;
@@ -52,6 +52,9 @@ export default class RendererActions implements RendererActionsOptions, Annotati
52
52
  annotate(range: Range, annotationId: string, annotationType: 'inlineComment'): AnnotationActionResult;
53
53
  isValidAnnotationRange(range: Range | null): boolean;
54
54
  isValidAnnotationPosition(pos: Position): boolean;
55
+ /**
56
+ * Note: False indicates that the selection not able to be calculated.
57
+ */
55
58
  getPositionFromRange(range: Range | null, isCommentsOnMediaBugFixEnabled?: boolean, isCommentsOnMediaBugVideoComment?: boolean): Position | false;
56
59
  getAnnotationMarks(): Mark[];
57
60
  getAnnotationsByPosition(range: Range): string[];
@@ -104,7 +104,9 @@ export type AnnotationDraftAEPAttributes = {
104
104
  export type AnnotationResolvedAEPAttributes = {
105
105
  method?: RESOLVE_METHOD;
106
106
  };
107
- export type AnnotationDeleteAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID, undefined, EVENT_TYPE.TRACK>;
107
+ export type AnnotationDeleteAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID, {
108
+ inlineNodeNames?: string[];
109
+ }, EVENT_TYPE.TRACK>;
108
110
  export declare enum RESOLVE_METHOD {
109
111
  COMPONENT = "component",
110
112
  CONSUMER = "consumer",
@@ -0,0 +1,12 @@
1
+ import type RendererActions from './index';
2
+ export declare function getRendererRangeInlineNodeNames({ actions, pos, }: {
3
+ actions: RendererActions;
4
+ /**
5
+ * documentPosition is caclulated by `actions.getPositionFromRange`
6
+ * where `false` means that the selection is not able to be calculated.
7
+ */
8
+ pos?: {
9
+ from: number;
10
+ to: number;
11
+ } | false;
12
+ }): string[] | undefined;
@@ -52,6 +52,9 @@ export default class RendererActions implements RendererActionsOptions, Annotati
52
52
  annotate(range: Range, annotationId: string, annotationType: 'inlineComment'): AnnotationActionResult;
53
53
  isValidAnnotationRange(range: Range | null): boolean;
54
54
  isValidAnnotationPosition(pos: Position): boolean;
55
+ /**
56
+ * Note: False indicates that the selection not able to be calculated.
57
+ */
55
58
  getPositionFromRange(range: Range | null, isCommentsOnMediaBugFixEnabled?: boolean, isCommentsOnMediaBugVideoComment?: boolean): Position | false;
56
59
  getAnnotationMarks(): Mark[];
57
60
  getAnnotationsByPosition(range: Range): string[];
@@ -104,7 +104,9 @@ export type AnnotationDraftAEPAttributes = {
104
104
  export type AnnotationResolvedAEPAttributes = {
105
105
  method?: RESOLVE_METHOD;
106
106
  };
107
- export type AnnotationDeleteAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID, undefined, EVENT_TYPE.TRACK>;
107
+ export type AnnotationDeleteAEP = AEP<AnnotationActionType, ACTION_SUBJECT.ANNOTATION, ACTION_SUBJECT_ID, {
108
+ inlineNodeNames?: string[];
109
+ }, EVENT_TYPE.TRACK>;
108
110
  export declare enum RESOLVE_METHOD {
109
111
  COMPONENT = "component",
110
112
  CONSUMER = "consumer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/renderer",
3
- "version": "109.32.2",
3
+ "version": "109.32.3",
4
4
  "description": "Renderer component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -31,7 +31,7 @@
31
31
  "@atlaskit/analytics-next": "^9.3.0",
32
32
  "@atlaskit/button": "^17.17.0",
33
33
  "@atlaskit/code": "^15.2.0",
34
- "@atlaskit/editor-common": "^82.2.0",
34
+ "@atlaskit/editor-common": "^82.3.0",
35
35
  "@atlaskit/editor-json-transformer": "^8.13.0",
36
36
  "@atlaskit/editor-palette": "1.6.0",
37
37
  "@atlaskit/editor-prosemirror": "4.0.1",
@@ -51,7 +51,7 @@
51
51
  "@atlaskit/status": "^1.4.0",
52
52
  "@atlaskit/task-decision": "^17.10.0",
53
53
  "@atlaskit/theme": "^12.9.0",
54
- "@atlaskit/tokens": "^1.49.0",
54
+ "@atlaskit/tokens": "^1.50.0",
55
55
  "@atlaskit/tooltip": "^18.4.0",
56
56
  "@babel/runtime": "^7.0.0",
57
57
  "@emotion/react": "^11.7.1",