@atlaskit/editor-common 100.2.0 → 100.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/cjs/analytics/types/enums.js +4 -0
  3. package/dist/cjs/analytics/types/selection-extension-events.js +5 -0
  4. package/dist/cjs/extensions/module-helpers.js +5 -0
  5. package/dist/cjs/monitoring/error.js +1 -1
  6. package/dist/cjs/ui/DropList/index.js +1 -1
  7. package/dist/cjs/ui/FloatingToolbar/Button.js +6 -3
  8. package/dist/es2019/analytics/types/enums.js +4 -0
  9. package/dist/es2019/analytics/types/selection-extension-events.js +1 -0
  10. package/dist/es2019/extensions/module-helpers.js +5 -0
  11. package/dist/es2019/monitoring/error.js +1 -1
  12. package/dist/es2019/ui/DropList/index.js +1 -1
  13. package/dist/es2019/ui/FloatingToolbar/Button.js +6 -3
  14. package/dist/esm/analytics/types/enums.js +4 -0
  15. package/dist/esm/analytics/types/selection-extension-events.js +1 -0
  16. package/dist/esm/extensions/module-helpers.js +5 -0
  17. package/dist/esm/monitoring/error.js +1 -1
  18. package/dist/esm/ui/DropList/index.js +1 -1
  19. package/dist/esm/ui/FloatingToolbar/Button.js +6 -3
  20. package/dist/types/analytics/types/enums.d.ts +5 -1
  21. package/dist/types/analytics/types/events.d.ts +2 -1
  22. package/dist/types/analytics/types/selection-extension-events.d.ts +11 -0
  23. package/dist/types/extensions/types/extension-manifest-toolbar-item.d.ts +1 -0
  24. package/dist/types-ts4.5/analytics/types/enums.d.ts +5 -1
  25. package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
  26. package/dist/types-ts4.5/analytics/types/selection-extension-events.d.ts +11 -0
  27. package/dist/types-ts4.5/extensions/types/extension-manifest-toolbar-item.d.ts +1 -0
  28. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 100.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#119729](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/119729)
8
+ [`beae885f06562`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/beae885f06562) -
9
+ ED-26710 add analytics events to selection extension plugin
10
+ - [#119091](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/119091)
11
+ [`582463628e275`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/582463628e275) -
12
+ Add hasBeenAutoConverted parameter in extension node and isExcluded prop in ContextualToolbar
13
+ - Updated dependencies
14
+
3
15
  ## 100.2.0
4
16
 
5
17
  ### Minor Changes
@@ -290,6 +290,7 @@ var ACTION_SUBJECT = exports.ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJ
290
290
  ACTION_SUBJECT["MEDIA_VIEWER"] = "mediaViewer";
291
291
  ACTION_SUBJECT["DECORATION"] = "decoration";
292
292
  ACTION_SUBJECT["EDITOR_PLUGIN_AI"] = "editorPluginAI";
293
+ ACTION_SUBJECT["EDITOR_PLUGIN_SELECTION_EXTENSION"] = "editorPluginSelectionExtension";
293
294
  ACTION_SUBJECT["AI_DEFINITIONS"] = "aiDefinitions";
294
295
  return ACTION_SUBJECT;
295
296
  }({});
@@ -442,6 +443,9 @@ var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTIO
442
443
  ACTION_SUBJECT_ID["ON_UNSUPPORTED_BLOCK"] = "onUnsupportedBlock";
443
444
  ACTION_SUBJECT_ID["MULTI_BODIED_EXTENSION"] = "multiBodiedExtension";
444
445
  ACTION_SUBJECT_ID["UPLOAD_MEDIA"] = "uploadMedia";
446
+ ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_DROPDOWN"] = "editorPluginSelectionExtensionDropdown";
447
+ ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM"] = "editorPluginSelectionExtensionItem";
448
+ ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT"] = "editorPluginSelectionExtensionComponent";
445
449
  return ACTION_SUBJECT_ID;
446
450
  }({});
447
451
  var FLOATING_CONTROLS_TITLE = exports.FLOATING_CONTROLS_TITLE = /*#__PURE__*/function (FLOATING_CONTROLS_TITLE) {
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -277,6 +277,11 @@ function shouldAddExtensionItemForNode(item, node) {
277
277
  if (item.context.type !== 'extension' || node.type !== item.context.nodeType) {
278
278
  return false;
279
279
  }
280
+
281
+ // in cases where we need custom exclusion depending on the node
282
+ if (item.context.shouldExclude) {
283
+ return item.context.shouldExclude(node);
284
+ }
280
285
  var _item$context = item.context,
281
286
  extensionType = _item$context.extensionType,
282
287
  extensionKey = _item$context.extensionKey;
@@ -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 && {}.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 = "100.2.0";
20
+ var packageVersion = "100.2.1";
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
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "100.2.0";
26
+ var packageVersion = "100.2.1";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -12,6 +12,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
12
12
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
13
13
  var _react = _interopRequireWildcard(require("react"));
14
14
  var _customThemeButton = _interopRequireDefault(require("@atlaskit/button/custom-theme-button"));
15
+ var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
15
16
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
16
17
  var _Pulse = require("../Pulse/Pulse");
17
18
  var _ButtonSpotlightCard = require("./ButtonSpotlightCard");
@@ -89,12 +90,14 @@ var _default = exports.default = function _default(_ref) {
89
90
  }, /*#__PURE__*/_react.default.createElement(_Pulse.Pulse, {
90
91
  pulse: pulse || (spotlightConfig === null || spotlightConfig === void 0 ? void 0 : spotlightConfig.pulse)
91
92
  }, /*#__PURE__*/_react.default.createElement(_customThemeButton.default
92
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
93
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
93
94
  , {
94
95
  className: className,
95
96
  ref: function ref(buttonElement) {
96
97
  return setSpotlightReferenceElement(buttonElement);
97
- },
98
+ }
99
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
100
+ ,
98
101
  theme: function theme(adgTheme, themeProps) {
99
102
  var _adgTheme = adgTheme(themeProps),
100
103
  buttonStyles = _adgTheme.buttonStyles,
@@ -113,7 +116,7 @@ var _default = exports.default = function _default(_ref) {
113
116
  role: isRadioButton ? 'radio' : undefined,
114
117
  "aria-expanded": ariaHasPopup ? selected : undefined,
115
118
  "aria-controls": ariaHasPopup ? areaControls : undefined,
116
- spacing: 'compact',
119
+ spacing: (0, _experiments.editorExperiment)('platform_editor_controls', 'variant1') ? 'default' : 'compact',
117
120
  href: href,
118
121
  target: target,
119
122
  appearance: appearance,
@@ -284,6 +284,7 @@ export let ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
284
284
  ACTION_SUBJECT["MEDIA_VIEWER"] = "mediaViewer";
285
285
  ACTION_SUBJECT["DECORATION"] = "decoration";
286
286
  ACTION_SUBJECT["EDITOR_PLUGIN_AI"] = "editorPluginAI";
287
+ ACTION_SUBJECT["EDITOR_PLUGIN_SELECTION_EXTENSION"] = "editorPluginSelectionExtension";
287
288
  ACTION_SUBJECT["AI_DEFINITIONS"] = "aiDefinitions";
288
289
  return ACTION_SUBJECT;
289
290
  }({});
@@ -436,6 +437,9 @@ export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
436
437
  ACTION_SUBJECT_ID["ON_UNSUPPORTED_BLOCK"] = "onUnsupportedBlock";
437
438
  ACTION_SUBJECT_ID["MULTI_BODIED_EXTENSION"] = "multiBodiedExtension";
438
439
  ACTION_SUBJECT_ID["UPLOAD_MEDIA"] = "uploadMedia";
440
+ ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_DROPDOWN"] = "editorPluginSelectionExtensionDropdown";
441
+ ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM"] = "editorPluginSelectionExtensionItem";
442
+ ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT"] = "editorPluginSelectionExtensionComponent";
439
443
  return ACTION_SUBJECT_ID;
440
444
  }({});
441
445
  export let FLOATING_CONTROLS_TITLE = /*#__PURE__*/function (FLOATING_CONTROLS_TITLE) {
@@ -174,6 +174,11 @@ function shouldAddExtensionItemForNode(item, node) {
174
174
  if (item.context.type !== 'extension' || node.type !== item.context.nodeType) {
175
175
  return false;
176
176
  }
177
+
178
+ // in cases where we need custom exclusion depending on the node
179
+ if (item.context.shouldExclude) {
180
+ return item.context.shouldExclude(node);
181
+ }
177
182
  const {
178
183
  extensionType,
179
184
  extensionKey
@@ -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 = "100.2.0";
4
+ const packageVersion = "100.2.1";
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
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "100.2.0";
16
+ const packageVersion = "100.2.1";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useCallback, useEffect, useState } from 'react';
3
3
  import Button from '@atlaskit/button/custom-theme-button';
4
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
4
5
  import Tooltip from '@atlaskit/tooltip';
5
6
  import { Pulse } from '../Pulse/Pulse';
6
7
  import { ButtonSpotlightCard } from './ButtonSpotlightCard';
@@ -67,10 +68,12 @@ export default (({
67
68
  }, /*#__PURE__*/React.createElement(Pulse, {
68
69
  pulse: pulse || (spotlightConfig === null || spotlightConfig === void 0 ? void 0 : spotlightConfig.pulse)
69
70
  }, /*#__PURE__*/React.createElement(Button
70
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
71
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
71
72
  , {
72
73
  className: className,
73
- ref: buttonElement => setSpotlightReferenceElement(buttonElement),
74
+ ref: buttonElement => setSpotlightReferenceElement(buttonElement)
75
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
76
+ ,
74
77
  theme: (adgTheme, themeProps) => {
75
78
  const {
76
79
  buttonStyles,
@@ -95,7 +98,7 @@ export default (({
95
98
  role: isRadioButton ? 'radio' : undefined,
96
99
  "aria-expanded": ariaHasPopup ? selected : undefined,
97
100
  "aria-controls": ariaHasPopup ? areaControls : undefined,
98
- spacing: 'compact',
101
+ spacing: editorExperiment('platform_editor_controls', 'variant1') ? 'default' : 'compact',
99
102
  href: href,
100
103
  target: target,
101
104
  appearance: appearance,
@@ -284,6 +284,7 @@ export var ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
284
284
  ACTION_SUBJECT["MEDIA_VIEWER"] = "mediaViewer";
285
285
  ACTION_SUBJECT["DECORATION"] = "decoration";
286
286
  ACTION_SUBJECT["EDITOR_PLUGIN_AI"] = "editorPluginAI";
287
+ ACTION_SUBJECT["EDITOR_PLUGIN_SELECTION_EXTENSION"] = "editorPluginSelectionExtension";
287
288
  ACTION_SUBJECT["AI_DEFINITIONS"] = "aiDefinitions";
288
289
  return ACTION_SUBJECT;
289
290
  }({});
@@ -436,6 +437,9 @@ export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
436
437
  ACTION_SUBJECT_ID["ON_UNSUPPORTED_BLOCK"] = "onUnsupportedBlock";
437
438
  ACTION_SUBJECT_ID["MULTI_BODIED_EXTENSION"] = "multiBodiedExtension";
438
439
  ACTION_SUBJECT_ID["UPLOAD_MEDIA"] = "uploadMedia";
440
+ ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_DROPDOWN"] = "editorPluginSelectionExtensionDropdown";
441
+ ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM"] = "editorPluginSelectionExtensionItem";
442
+ ACTION_SUBJECT_ID["EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT"] = "editorPluginSelectionExtensionComponent";
439
443
  return ACTION_SUBJECT_ID;
440
444
  }({});
441
445
  export var FLOATING_CONTROLS_TITLE = /*#__PURE__*/function (FLOATING_CONTROLS_TITLE) {
@@ -267,6 +267,11 @@ function shouldAddExtensionItemForNode(item, node) {
267
267
  if (item.context.type !== 'extension' || node.type !== item.context.nodeType) {
268
268
  return false;
269
269
  }
270
+
271
+ // in cases where we need custom exclusion depending on the node
272
+ if (item.context.shouldExclude) {
273
+ return item.context.shouldExclude(node);
274
+ }
270
275
  var _item$context = item.context,
271
276
  extensionType = _item$context.extensionType,
272
277
  extensionKey = _item$context.extensionKey;
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "100.2.0";
10
+ var packageVersion = "100.2.1";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "100.2.0";
23
+ var packageVersion = "100.2.1";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -7,6 +7,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
7
7
  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) { _defineProperty(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; }
8
8
  import React, { useCallback, useEffect, useState } from 'react';
9
9
  import Button from '@atlaskit/button/custom-theme-button';
10
+ import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
10
11
  import Tooltip from '@atlaskit/tooltip';
11
12
  import { Pulse } from '../Pulse/Pulse';
12
13
  import { ButtonSpotlightCard } from './ButtonSpotlightCard';
@@ -79,12 +80,14 @@ export default (function (_ref) {
79
80
  }, /*#__PURE__*/React.createElement(Pulse, {
80
81
  pulse: pulse || (spotlightConfig === null || spotlightConfig === void 0 ? void 0 : spotlightConfig.pulse)
81
82
  }, /*#__PURE__*/React.createElement(Button
82
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
83
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/design-system/no-unsafe-style-overrides -- Ignored via go/DSP-18766
83
84
  , {
84
85
  className: className,
85
86
  ref: function ref(buttonElement) {
86
87
  return setSpotlightReferenceElement(buttonElement);
87
- },
88
+ }
89
+ // eslint-disable-next-line @atlaskit/design-system/no-unsafe-style-overrides
90
+ ,
88
91
  theme: function theme(adgTheme, themeProps) {
89
92
  var _adgTheme = adgTheme(themeProps),
90
93
  buttonStyles = _adgTheme.buttonStyles,
@@ -103,7 +106,7 @@ export default (function (_ref) {
103
106
  role: isRadioButton ? 'radio' : undefined,
104
107
  "aria-expanded": ariaHasPopup ? selected : undefined,
105
108
  "aria-controls": ariaHasPopup ? areaControls : undefined,
106
- spacing: 'compact',
109
+ spacing: editorExperiment('platform_editor_controls', 'variant1') ? 'default' : 'compact',
107
110
  href: href,
108
111
  target: target,
109
112
  appearance: appearance,
@@ -298,6 +298,7 @@ export declare enum ACTION_SUBJECT {
298
298
  MEDIA_VIEWER = "mediaViewer",
299
299
  DECORATION = "decoration",
300
300
  EDITOR_PLUGIN_AI = "editorPluginAI",
301
+ EDITOR_PLUGIN_SELECTION_EXTENSION = "editorPluginSelectionExtension",
301
302
  AI_DEFINITIONS = "aiDefinitions"
302
303
  }
303
304
  export declare enum ACTION_SUBJECT_ID {
@@ -448,7 +449,10 @@ export declare enum ACTION_SUBJECT_ID {
448
449
  ON_UNSUPPORTED_INLINE = "onUnsupportedInline",
449
450
  ON_UNSUPPORTED_BLOCK = "onUnsupportedBlock",
450
451
  MULTI_BODIED_EXTENSION = "multiBodiedExtension",
451
- UPLOAD_MEDIA = "uploadMedia"
452
+ UPLOAD_MEDIA = "uploadMedia",
453
+ EDITOR_PLUGIN_SELECTION_EXTENSION_DROPDOWN = "editorPluginSelectionExtensionDropdown",
454
+ EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM = "editorPluginSelectionExtensionItem",
455
+ EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT = "editorPluginSelectionExtensionComponent"
452
456
  }
453
457
  export declare enum FLOATING_CONTROLS_TITLE {
454
458
  CODE_BLOCK = "codeBlockFloatingControls",
@@ -40,6 +40,7 @@ import type { NodeEventPayload } from './node-events';
40
40
  import type { PasteEventPayload } from './paste-events';
41
41
  import type { ReferentialityEventPayload } from './referentiality-events';
42
42
  import type { SelectionEventPayload } from './selection-events';
43
+ import type { SelectionExtensionEventPayload } from './selection-extension-events';
43
44
  import type { SubstituteEventPayload } from './substitute-events';
44
45
  import type { TableEventPayload } from './table-events';
45
46
  import type { TypeAheadPayload } from './type-ahead';
@@ -54,7 +55,7 @@ export type SimplifiedNode = {
54
55
  marks?: string[];
55
56
  content?: SimplifiedNode[];
56
57
  };
57
- export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload;
58
+ export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload;
58
59
  type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
59
60
  previousColor: string;
60
61
  newColor: string;
@@ -0,0 +1,11 @@
1
+ import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
2
+ import type { TrackAEP } from './utils';
3
+ type SelectionExtensionActionType = ACTION.VIEWED | ACTION.CLICKED | ACTION.CLOSED;
4
+ type SelectionExtensionSubjectType = ACTION_SUBJECT.BUTTON | ACTION_SUBJECT.EDITOR_PLUGIN_SELECTION_EXTENSION;
5
+ type SelectionExtensionSubjectIdType = ACTION_SUBJECT_ID.EDITOR_PLUGIN_SELECTION_EXTENSION_DROPDOWN | ACTION_SUBJECT_ID.EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT | ACTION_SUBJECT_ID.EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM;
6
+ type SelectionExtensionAttributeType = {
7
+ toggle: ACTION.OPENED | ACTION.CLOSED;
8
+ };
9
+ type SelectionExtensionAEP = TrackAEP<SelectionExtensionActionType, SelectionExtensionSubjectType, SelectionExtensionSubjectIdType, SelectionExtensionAttributeType, undefined>;
10
+ export type SelectionExtensionEventPayload = SelectionExtensionAEP;
11
+ export {};
@@ -38,6 +38,7 @@ export type ExtensionNodeContext = {
38
38
  nodeType: 'extension' | 'inlineExtension' | 'bodiedExtension' | 'multiBodiedExtension';
39
39
  extensionKey: string | string[];
40
40
  extensionType?: string;
41
+ shouldExclude?: (node: ADFEntity) => boolean;
41
42
  };
42
43
  export type StandardNodeContext = {
43
44
  type: 'node';
@@ -298,6 +298,7 @@ export declare enum ACTION_SUBJECT {
298
298
  MEDIA_VIEWER = "mediaViewer",
299
299
  DECORATION = "decoration",
300
300
  EDITOR_PLUGIN_AI = "editorPluginAI",
301
+ EDITOR_PLUGIN_SELECTION_EXTENSION = "editorPluginSelectionExtension",
301
302
  AI_DEFINITIONS = "aiDefinitions"
302
303
  }
303
304
  export declare enum ACTION_SUBJECT_ID {
@@ -448,7 +449,10 @@ export declare enum ACTION_SUBJECT_ID {
448
449
  ON_UNSUPPORTED_INLINE = "onUnsupportedInline",
449
450
  ON_UNSUPPORTED_BLOCK = "onUnsupportedBlock",
450
451
  MULTI_BODIED_EXTENSION = "multiBodiedExtension",
451
- UPLOAD_MEDIA = "uploadMedia"
452
+ UPLOAD_MEDIA = "uploadMedia",
453
+ EDITOR_PLUGIN_SELECTION_EXTENSION_DROPDOWN = "editorPluginSelectionExtensionDropdown",
454
+ EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM = "editorPluginSelectionExtensionItem",
455
+ EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT = "editorPluginSelectionExtensionComponent"
452
456
  }
453
457
  export declare enum FLOATING_CONTROLS_TITLE {
454
458
  CODE_BLOCK = "codeBlockFloatingControls",
@@ -40,6 +40,7 @@ import type { NodeEventPayload } from './node-events';
40
40
  import type { PasteEventPayload } from './paste-events';
41
41
  import type { ReferentialityEventPayload } from './referentiality-events';
42
42
  import type { SelectionEventPayload } from './selection-events';
43
+ import type { SelectionExtensionEventPayload } from './selection-extension-events';
43
44
  import type { SubstituteEventPayload } from './substitute-events';
44
45
  import type { TableEventPayload } from './table-events';
45
46
  import type { TypeAheadPayload } from './type-ahead';
@@ -54,7 +55,7 @@ export type SimplifiedNode = {
54
55
  marks?: string[];
55
56
  content?: SimplifiedNode[];
56
57
  };
57
- export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload;
58
+ export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload;
58
59
  type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
59
60
  previousColor: string;
60
61
  newColor: string;
@@ -0,0 +1,11 @@
1
+ import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
2
+ import type { TrackAEP } from './utils';
3
+ type SelectionExtensionActionType = ACTION.VIEWED | ACTION.CLICKED | ACTION.CLOSED;
4
+ type SelectionExtensionSubjectType = ACTION_SUBJECT.BUTTON | ACTION_SUBJECT.EDITOR_PLUGIN_SELECTION_EXTENSION;
5
+ type SelectionExtensionSubjectIdType = ACTION_SUBJECT_ID.EDITOR_PLUGIN_SELECTION_EXTENSION_DROPDOWN | ACTION_SUBJECT_ID.EDITOR_PLUGIN_SELECTION_EXTENSION_COMPONENT | ACTION_SUBJECT_ID.EDITOR_PLUGIN_SELECTION_EXTENSION_ITEM;
6
+ type SelectionExtensionAttributeType = {
7
+ toggle: ACTION.OPENED | ACTION.CLOSED;
8
+ };
9
+ type SelectionExtensionAEP = TrackAEP<SelectionExtensionActionType, SelectionExtensionSubjectType, SelectionExtensionSubjectIdType, SelectionExtensionAttributeType, undefined>;
10
+ export type SelectionExtensionEventPayload = SelectionExtensionAEP;
11
+ export {};
@@ -38,6 +38,7 @@ export type ExtensionNodeContext = {
38
38
  nodeType: 'extension' | 'inlineExtension' | 'bodiedExtension' | 'multiBodiedExtension';
39
39
  extensionKey: string | string[];
40
40
  extensionType?: string;
41
+ shouldExclude?: (node: ADFEntity) => boolean;
41
42
  };
42
43
  export type StandardNodeContext = {
43
44
  type: 'node';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "100.2.0",
3
+ "version": "100.2.1",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -130,7 +130,7 @@
130
130
  "@atlaskit/editor-json-transformer": "^8.23.0",
131
131
  "@atlaskit/editor-palette": "2.0.0",
132
132
  "@atlaskit/editor-prosemirror": "7.0.0",
133
- "@atlaskit/editor-shared-styles": "^3.3.0",
133
+ "@atlaskit/editor-shared-styles": "^3.4.0",
134
134
  "@atlaskit/editor-tables": "^2.9.0",
135
135
  "@atlaskit/emoji": "^68.0.0",
136
136
  "@atlaskit/icon": "^24.1.0",
@@ -158,7 +158,7 @@
158
158
  "@atlaskit/spinner": "^18.0.0",
159
159
  "@atlaskit/task-decision": "^19.0.0",
160
160
  "@atlaskit/textfield": "^8.0.0",
161
- "@atlaskit/tmp-editor-statsig": "^3.2.0",
161
+ "@atlaskit/tmp-editor-statsig": "^3.3.0",
162
162
  "@atlaskit/tokens": "^4.2.0",
163
163
  "@atlaskit/tooltip": "^20.0.0",
164
164
  "@atlaskit/width-detector": "^5.0.0",