@atlaskit/editor-common 116.41.0 → 116.42.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,60 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 116.42.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`9291603af8830`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9291603af8830) -
8
+ Upgrade types to be compatible with React 19.
9
+
10
+ This was done with the official React codemod: https://github.com/eps1lon/types-react-codemod/
11
+
12
+ ## 116.42.0
13
+
14
+ ### Minor Changes
15
+
16
+ - [`782360c1111dc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/782360c1111dc) -
17
+ Agent-edit shimmer review follow-ups (behind the default-OFF `platform_editor_agent_be_streaming`
18
+ experiment):
19
+ - Add a second shimmer phase: after the skeleton loader clears, the changed range shows a purple
20
+ "just edited" highlight (same colours as the editor AI "improve writing" in-editor highlight)
21
+ that eases in and out over its lifetime. The Rovo telepointer stays through both phases.
22
+ - The two phases are sized by independent experiment params: `shimmerDurationMs` (skeleton,
23
+ renamed from `durationMs`) and `highlightDurationMs` (highlight). `0` on either skips just that
24
+ phase, `0` on both shows nothing.
25
+ - Gate the agent-edit shimmer styles behind the experiment in both the emotion and compiled
26
+ `EditorContentContainer` style entries, using the no-exposure check on the hot render path.
27
+ - Add an `agentEditReceived` collab-provider analytics event, fired once per received transaction
28
+ that contains agent-authored steps, with non-PII attributes (agent ids, count, kinds,
29
+ agent/total step counts).
30
+ - Add an `agentEditShimmerNotShown` COLLAB operational analytics event for agent edits that apply
31
+ without the shimmer (`rebasedConcurrentEdit`, `nothingToShow`, `captureThrew`,
32
+ `tornDownMidAnimation`); neutral action + `reason`, non-PII attributes.
33
+ - Hoist the top-level block/position helpers in `agent-shimmer-ranges` to reusable module scope,
34
+ drop the redundant upper-bound clamp in `agent-shimmer-decorations`, and remove the empty
35
+ `@example` JSDoc tags added in the original PR.
36
+
37
+ `@atlaskit/editor-common` gains a new subpath export,
38
+ `@atlaskit/editor-common/analytics/types/agent-edit-shimmer-events`, exposing the
39
+ `agentEditShimmerNotShown` operational event types. Usage:
40
+
41
+ ```ts
42
+ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
43
+ import type { AgentEditShimmerNotShownReason } from '@atlaskit/editor-common/analytics/types/agent-edit-shimmer-events';
44
+
45
+ const reason: AgentEditShimmerNotShownReason = 'captureThrew';
46
+ editorAnalyticsApi?.fireAnalyticsEvent({
47
+ action: ACTION.AGENT_EDIT_SHIMMER_NOT_SHOWN,
48
+ actionSubject: ACTION_SUBJECT.COLLAB,
49
+ eventType: EVENT_TYPE.OPERATIONAL,
50
+ attributes: { reason },
51
+ });
52
+ ```
53
+
54
+ ### Patch Changes
55
+
56
+ - Updated dependencies
57
+
3
58
  ## 116.41.0
4
59
 
5
60
  ### Minor Changes
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/analytics/types/agent-edit-shimmer-events",
3
+ "main": "../../../dist/cjs/analytics/types/agent-edit-shimmer-events.js",
4
+ "module": "../../../dist/esm/analytics/types/agent-edit-shimmer-events.js",
5
+ "module:es2019": "../../../dist/es2019/analytics/types/agent-edit-shimmer-events.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../../dist/types/analytics/types/agent-edit-shimmer-events.d.ts"
10
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -195,6 +195,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
195
195
  ACTION["STEPS_TRACKED"] = "stepsTracked";
196
196
  ACTION["ORGANIC_CHANGES_TRACKED"] = "organicChangesTracked";
197
197
  ACTION["STEPS_FILTERED"] = "stepsFiltered";
198
+ ACTION["AGENT_EDIT_SHIMMER_NOT_SHOWN"] = "agentEditShimmerNotShown";
198
199
  ACTION["CREATE_NOT_ALLOWED"] = "createNotAllowed";
199
200
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED"] = "unsupportedContentLevelsTrackingSucceeded";
200
201
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED"] = "unsupportedContentLevelsTrackingErrored";
@@ -28,7 +28,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
28
28
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
29
29
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
30
30
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
31
- var packageVersion = "116.40.2";
31
+ var packageVersion = "116.42.0";
32
32
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
33
33
  // Remove URL as it has UGC
34
34
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "116.40.2";
27
+ var packageVersion = "116.42.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -191,6 +191,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
191
191
  ACTION["STEPS_TRACKED"] = "stepsTracked";
192
192
  ACTION["ORGANIC_CHANGES_TRACKED"] = "organicChangesTracked";
193
193
  ACTION["STEPS_FILTERED"] = "stepsFiltered";
194
+ ACTION["AGENT_EDIT_SHIMMER_NOT_SHOWN"] = "agentEditShimmerNotShown";
194
195
  ACTION["CREATE_NOT_ALLOWED"] = "createNotAllowed";
195
196
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED"] = "unsupportedContentLevelsTrackingSucceeded";
196
197
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED"] = "unsupportedContentLevelsTrackingErrored";
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
14
14
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
15
15
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
16
16
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
17
- const packageVersion = "116.40.2";
17
+ const packageVersion = "116.42.0";
18
18
  const sanitiseSentryEvents = (data, _hint) => {
19
19
  // Remove URL as it has UGC
20
20
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "116.40.2";
17
+ const packageVersion = "116.42.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -191,6 +191,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
191
191
  ACTION["STEPS_TRACKED"] = "stepsTracked";
192
192
  ACTION["ORGANIC_CHANGES_TRACKED"] = "organicChangesTracked";
193
193
  ACTION["STEPS_FILTERED"] = "stepsFiltered";
194
+ ACTION["AGENT_EDIT_SHIMMER_NOT_SHOWN"] = "agentEditShimmerNotShown";
194
195
  ACTION["CREATE_NOT_ALLOWED"] = "createNotAllowed";
195
196
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED"] = "unsupportedContentLevelsTrackingSucceeded";
196
197
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED"] = "unsupportedContentLevelsTrackingErrored";
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
20
20
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
21
21
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
22
22
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
23
- var packageVersion = "116.40.2";
23
+ var packageVersion = "116.42.0";
24
24
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
25
25
  // Remove URL as it has UGC
26
26
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "116.40.2";
24
+ var packageVersion = "116.42.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -0,0 +1,14 @@
1
+ import type { ACTION, ACTION_SUBJECT } from './enums';
2
+ import type { OperationalAEP } from './utils';
3
+ /**
4
+ * Reasons an agent-authored edit did NOT get the skeleton shimmer / telepointer and instead applied
5
+ * instantly. Success is the ABSENCE of this event, so a neutral action + `reason` attribute is used
6
+ * (rather than an error action) to keep benign, expected degrades out of error dashboards.
7
+ */
8
+ export type AgentEditShimmerNotShownReason = 'rebasedConcurrentEdit' | 'nothingToShow' | 'captureThrew' | 'tornDownMidAnimation';
9
+ export type AgentEditShimmerNotShownAttributes = {
10
+ agentType?: string;
11
+ error?: string;
12
+ reason: AgentEditShimmerNotShownReason;
13
+ };
14
+ export type AgentEditShimmerNotShownAEP = OperationalAEP<ACTION.AGENT_EDIT_SHIMMER_NOT_SHOWN, ACTION_SUBJECT.COLLAB, undefined, AgentEditShimmerNotShownAttributes>;
@@ -187,6 +187,7 @@ export declare enum ACTION {
187
187
  STEPS_TRACKED = "stepsTracked",
188
188
  ORGANIC_CHANGES_TRACKED = "organicChangesTracked",
189
189
  STEPS_FILTERED = "stepsFiltered",
190
+ AGENT_EDIT_SHIMMER_NOT_SHOWN = "agentEditShimmerNotShown",
190
191
  CREATE_NOT_ALLOWED = "createNotAllowed",
191
192
  UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED = "unsupportedContentLevelsTrackingSucceeded",
192
193
  UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED = "unsupportedContentLevelsTrackingErrored",
@@ -4,6 +4,7 @@ import type { NewCollabSyncUpErrorAttributes } from '../../collab';
4
4
  import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload, UserBrowserExtensionResults } from '../../utils';
5
5
  import type { FireAnalyticsEventOptions } from '../api';
6
6
  import type { ActiveSessionEventPayload } from './activity-session-events';
7
+ import type { AgentEditShimmerNotShownAEP } from './agent-edit-shimmer-events';
7
8
  import type { AiAutocompleteEventPayload } from './ai-autocomplete-events';
8
9
  import type { AICommandPaletteEventPayload } from './ai-command-palette-events';
9
10
  import type { AIDefinitionsEventPayload } from './ai-definitions-events';
@@ -71,7 +72,7 @@ export type SimplifiedNode = {
71
72
  pos: number;
72
73
  type: string;
73
74
  };
74
- export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | PasteActionsMenuEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | PreviewItemClickedAEP | OpenLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | ContainerNodeActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIStreamingEventPayload | AIProactiveEventPayload | AiAutocompleteEventPayload | AiSuggestionsEventPayload | ContextualTypeaheadEventPayload | AIQuickPromptEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | BlockMenuEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | ExperienceEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload | NcsSessionStepEventAEP | FloatingToolbarOverflowEventPayload | SyncBlockEventPayload | FloatingToolbarEventPayload;
75
+ export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | PasteActionsMenuEventPayload | CutCopyEventPayload | ErrorEventPayload | TextColorEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | PreviewItemClickedAEP | OpenLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | ContainerNodeActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIStreamingEventPayload | AIProactiveEventPayload | AiAutocompleteEventPayload | AiSuggestionsEventPayload | ContextualTypeaheadEventPayload | AIQuickPromptEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | BlockMenuEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload | SelectionExtensionEventPayload | TelepointerClickPayload | SelectionToolbarEventPayload | ExperienceEventPayload | AlignmentEventPayload | UndoRedoAEP | OfflineEditingEventPayload | NcsSessionStepEventAEP | AgentEditShimmerNotShownAEP | FloatingToolbarOverflowEventPayload | SyncBlockEventPayload | FloatingToolbarEventPayload;
75
76
  type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
76
77
  newColor: string;
77
78
  previousColor: string;
@@ -34,8 +34,8 @@ export interface RecentSearchState {
34
34
  }
35
35
  export type LinkSearchListItemData = {
36
36
  container: string;
37
- icon?: React.ReactChild | never;
38
- iconUrl?: string | never;
37
+ icon?: React.ReactElement | number | string;
38
+ iconUrl?: string;
39
39
  lastUpdatedDate?: Date;
40
40
  lastViewedDate?: Date;
41
41
  name: string;
@@ -45,5 +45,5 @@ export type LinkSearchListItemData = {
45
45
  } & ({
46
46
  iconUrl: string;
47
47
  } | {
48
- icon: React.ReactChild;
48
+ icon: React.ReactElement | number | string;
49
49
  });
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { PortalManager } from './PortalManager';
3
- type RenderFn = (children: () => React.ReactChild | JSX.Element | null, container: HTMLElement, key: string, onBeforeReactDomRender?: () => void, immediate?: boolean) => void;
3
+ type RenderFn = (children: () => React.ReactElement | number | string | JSX.Element | null, container: HTMLElement, key: string, onBeforeReactDomRender?: () => void, immediate?: boolean) => void;
4
4
  type RemoveFn = (key: string) => void;
5
5
  type DestoryFn = () => void;
6
6
  export interface PortalProviderAPI {
@@ -38,7 +38,7 @@ export interface MenuItem {
38
38
  'aria-keyshortcuts'?: React.AriaAttributes['aria-keyshortcuts'];
39
39
  'aria-label'?: React.AriaAttributes['aria-label'];
40
40
  className?: string;
41
- content: string | React.ReactChild | React.ReactFragment;
41
+ content: React.ReactElement | number | string | React.ReactFragment;
42
42
  'data-testid'?: string;
43
43
  elemAfter?: React.ReactElement<any>;
44
44
  elemBefore?: React.ReactElement<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "116.41.0",
3
+ "version": "116.42.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/"
@@ -80,7 +80,7 @@
80
80
  "@atlaskit/task-decision": "^21.7.0",
81
81
  "@atlaskit/teams-app-config": "^2.1.0",
82
82
  "@atlaskit/textfield": "^9.1.0",
83
- "@atlaskit/tmp-editor-statsig": "^135.0.0",
83
+ "@atlaskit/tmp-editor-statsig": "^135.2.0",
84
84
  "@atlaskit/tokens": "^16.3.0",
85
85
  "@atlaskit/tooltip": "^23.2.0",
86
86
  "@atlaskit/width-detector": "^6.2.0",
@@ -121,7 +121,9 @@
121
121
  },
122
122
  "devDependencies": {
123
123
  "@atlaskit/media-core": "^38.0.0",
124
+ "@atlaskit/platform-feature-experiments": "^0.3.0",
124
125
  "@atlassian/a11y-jest-testing": "^0.13.0",
126
+ "@atlassian/experiment-test-utils": "^0.2.0",
125
127
  "@atlassian/feature-flags-test-utils": "^1.2.0",
126
128
  "@atlassian/testing-library": "^0.11.0",
127
129
  "@testing-library/dom": "^10.1.0",