@atlaskit/editor-common 120.4.0 → 120.6.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 120.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`3059547e2a266`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3059547e2a266) -
8
+ [ux] Add a neutral agent-edit chrome transaction metadata contract with optional presentation
9
+ overrides and a shared producer configuration resolver for the
10
+ `platform_editor_ai_unified_post_apply_chrome` experiment.
11
+ - [`351ba3a2cc9d5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/351ba3a2cc9d5) -
12
+ `BaseStepPM` gains an optional `invocationId`, the backend-issued identifier of the agent
13
+ invocation a collaboration step belongs to.
14
+
15
+ NCS attaches the identifier to every step produced by one backend agent invocation, so consumers
16
+ can group a received batch back into the invocation that produced it. Identity is per step rather
17
+ than per batch: one live or catch-up batch can mix human steps, agent steps from different
18
+ invocations, and steps with no identifier at all.
19
+
20
+ The field is optional and additive, so steps that do not carry it are unaffected, and the frontend
21
+ treats the value as opaque rather than validating its format.
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies
26
+
27
+ ## 120.5.0
28
+
29
+ ### Minor Changes
30
+
31
+ - [`0841b102bfe4a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0841b102bfe4a) -
32
+ Add a PM-state-backed multi-location left block-controls surface and register the display-only
33
+ heading collapse button behind `platform_editor_block_control_migration` and
34
+ `platform_editor_collapsible_headings`.
35
+
3
36
  ## 120.4.0
4
37
 
5
38
  ### Minor Changes
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/collab-agent-edit-chrome",
3
+ "main": "../dist/cjs/collab/agent-edit-chrome.js",
4
+ "module": "../dist/esm/collab/agent-edit-chrome.js",
5
+ "module:es2019": "../dist/es2019/collab/agent-edit-chrome.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../dist/types/collab/agent-edit-chrome.d.ts"
10
+ }
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getAgentEditChromeDynamicConfig = exports.AGENT_EDIT_CHROME_DEFAULT_TELEPOINTER_ENABLED = exports.AGENT_EDIT_CHROME_DEFAULT_AUTO_DISMISS_AFTER_MS = exports.AGENT_EDIT_CHROME_DATA = void 0;
7
+ var _expVal = require("@atlaskit/platform-feature-experiments/exp-val");
8
+ /**
9
+ * Neutral transaction metadata used by agent-edit producers to request the
10
+ * shared post-apply highlight and telepointer owned by editor-plugin-ai.
11
+ */
12
+ var AGENT_EDIT_CHROME_DATA = exports.AGENT_EDIT_CHROME_DATA = 'agentEditChromeData';
13
+ var AGENT_EDIT_CHROME_DEFAULT_AUTO_DISMISS_AFTER_MS = exports.AGENT_EDIT_CHROME_DEFAULT_AUTO_DISMISS_AFTER_MS = 2000;
14
+ var AGENT_EDIT_CHROME_DEFAULT_TELEPOINTER_ENABLED = exports.AGENT_EDIT_CHROME_DEFAULT_TELEPOINTER_ENABLED = true;
15
+ /**
16
+ * Resolves shared dynamic configuration at the producer boundary. The post-apply
17
+ * chrome plugin uses the supplied values and does not read dynamic configuration itself.
18
+ */
19
+ var getAgentEditChromeDynamicConfig = exports.getAgentEditChromeDynamicConfig = function getAgentEditChromeDynamicConfig() {
20
+ return {
21
+ autoDismissAfterMs: (0, _expVal.expVal)('platform_editor_agent_be_streaming', 'highlightDurationMs', AGENT_EDIT_CHROME_DEFAULT_AUTO_DISMISS_AFTER_MS),
22
+ telepointerEnabled: !(0, _expVal.expVal)('platform_editor_agent_be_streaming', 'telepointerDisabled', !AGENT_EDIT_CHROME_DEFAULT_TELEPOINTER_ENABLED)
23
+ };
24
+ };
@@ -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 = "120.3.3";
31
+ var packageVersion = "120.5.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 = "120.3.3";
27
+ var packageVersion = "120.5.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -0,0 +1,17 @@
1
+ import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
2
+
3
+ /**
4
+ * Neutral transaction metadata used by agent-edit producers to request the
5
+ * shared post-apply highlight and telepointer owned by editor-plugin-ai.
6
+ */
7
+ export const AGENT_EDIT_CHROME_DATA = 'agentEditChromeData';
8
+ export const AGENT_EDIT_CHROME_DEFAULT_AUTO_DISMISS_AFTER_MS = 2000;
9
+ export const AGENT_EDIT_CHROME_DEFAULT_TELEPOINTER_ENABLED = true;
10
+ /**
11
+ * Resolves shared dynamic configuration at the producer boundary. The post-apply
12
+ * chrome plugin uses the supplied values and does not read dynamic configuration itself.
13
+ */
14
+ export const getAgentEditChromeDynamicConfig = () => ({
15
+ autoDismissAfterMs: expVal('platform_editor_agent_be_streaming', 'highlightDurationMs', AGENT_EDIT_CHROME_DEFAULT_AUTO_DISMISS_AFTER_MS),
16
+ telepointerEnabled: !expVal('platform_editor_agent_be_streaming', 'telepointerDisabled', !AGENT_EDIT_CHROME_DEFAULT_TELEPOINTER_ENABLED)
17
+ });
@@ -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 = "120.3.3";
17
+ const packageVersion = "120.5.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/fg';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "120.3.3";
17
+ const packageVersion = "120.5.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -0,0 +1,19 @@
1
+ import { expVal } from '@atlaskit/platform-feature-experiments/exp-val';
2
+
3
+ /**
4
+ * Neutral transaction metadata used by agent-edit producers to request the
5
+ * shared post-apply highlight and telepointer owned by editor-plugin-ai.
6
+ */
7
+ export var AGENT_EDIT_CHROME_DATA = 'agentEditChromeData';
8
+ export var AGENT_EDIT_CHROME_DEFAULT_AUTO_DISMISS_AFTER_MS = 2000;
9
+ export var AGENT_EDIT_CHROME_DEFAULT_TELEPOINTER_ENABLED = true;
10
+ /**
11
+ * Resolves shared dynamic configuration at the producer boundary. The post-apply
12
+ * chrome plugin uses the supplied values and does not read dynamic configuration itself.
13
+ */
14
+ export var getAgentEditChromeDynamicConfig = function getAgentEditChromeDynamicConfig() {
15
+ return {
16
+ autoDismissAfterMs: expVal('platform_editor_agent_be_streaming', 'highlightDurationMs', AGENT_EDIT_CHROME_DEFAULT_AUTO_DISMISS_AFTER_MS),
17
+ telepointerEnabled: !expVal('platform_editor_agent_be_streaming', 'telepointerDisabled', !AGENT_EDIT_CHROME_DEFAULT_TELEPOINTER_ENABLED)
18
+ };
19
+ };
@@ -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 = "120.3.3";
23
+ var packageVersion = "120.5.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/fg';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "120.3.3";
24
+ var packageVersion = "120.5.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Neutral transaction metadata used by agent-edit producers to request the
3
+ * shared post-apply highlight and telepointer owned by editor-plugin-ai.
4
+ */
5
+ export declare const AGENT_EDIT_CHROME_DATA = "agentEditChromeData";
6
+ export declare const AGENT_EDIT_CHROME_DEFAULT_AUTO_DISMISS_AFTER_MS = 2000;
7
+ export declare const AGENT_EDIT_CHROME_DEFAULT_TELEPOINTER_ENABLED = true;
8
+ export type AgentEditChromeRange = {
9
+ from: number;
10
+ to: number;
11
+ };
12
+ export type AgentEditChromeData = {
13
+ agentIdentityAccountId?: string;
14
+ /** Lifetime of both the highlight and telepointer. Omission uses the shared static default; 0 prevents rendering. */
15
+ autoDismissAfterMs?: number;
16
+ /** Runtime CSS color value. Consumers should pass an ADS token value. */
17
+ highlightBackgroundColor?: string;
18
+ /** Runtime CSS color value. Consumers should pass an ADS token value. */
19
+ highlightBorderColor?: string;
20
+ ranges: AgentEditChromeRange[];
21
+ /** Whether to show the telepointer. Omission uses the shared static default. */
22
+ telepointerEnabled?: boolean;
23
+ /** Exact telepointer label; omission uses the shared plugin's localized default. */
24
+ telepointerLabel?: string;
25
+ };
26
+ export type AgentEditChromeDynamicConfig = {
27
+ autoDismissAfterMs: number;
28
+ telepointerEnabled: boolean;
29
+ };
30
+ /**
31
+ * Resolves shared dynamic configuration at the producer boundary. The post-apply
32
+ * chrome plugin uses the supplied values and does not read dynamic configuration itself.
33
+ */
34
+ export declare const getAgentEditChromeDynamicConfig: () => AgentEditChromeDynamicConfig;
@@ -292,6 +292,16 @@ export interface BaseStepPM extends StepMetadata {
292
292
  agentType?: string;
293
293
  clientId: number | string;
294
294
  from?: number;
295
+ /**
296
+ * Opaque identifier issued by the backend for the agent invocation a step belongs to.
297
+ *
298
+ * Every step produced by one invocation carries the same value, so steps can be grouped back
299
+ * into the invocation that produced them. A single batch is not a whole invocation: one
300
+ * invocation's steps can be split across batches by version boundaries or replayed by catch-up,
301
+ * so group by this value rather than by batch. Absent on human steps and on steps from backends
302
+ * that do not send it, and never validated for format by the frontend.
303
+ */
304
+ invocationId?: string;
295
305
  slice?: SliceJson;
296
306
  stepType: string;
297
307
  to?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "120.4.0",
3
+ "version": "120.6.0",
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/"
@@ -42,7 +42,7 @@
42
42
  "@atlaskit/css": "^1.1.0",
43
43
  "@atlaskit/custom-steps": "^1.0.0",
44
44
  "@atlaskit/dropdown-menu": "^18.2.0",
45
- "@atlaskit/editor-json-transformer": "^9.6.0",
45
+ "@atlaskit/editor-json-transformer": "^9.7.0",
46
46
  "@atlaskit/editor-palette": "^3.4.0",
47
47
  "@atlaskit/editor-prosemirror": "^8.0.0",
48
48
  "@atlaskit/editor-shared-styles": "^4.0.0",
@@ -70,7 +70,7 @@
70
70
  "@atlaskit/onboarding": "^15.3.0",
71
71
  "@atlaskit/platform-feature-experiments": "^0.3.0",
72
72
  "@atlaskit/platform-feature-flags": "^2.1.0",
73
- "@atlaskit/platform-feature-flags-react": "^1.1.0",
73
+ "@atlaskit/platform-feature-flags-react": "^1.2.0",
74
74
  "@atlaskit/popper": "^9.3.0",
75
75
  "@atlaskit/primitives": "^22.4.0",
76
76
  "@atlaskit/profilecard": "^26.19.0",
@@ -84,7 +84,7 @@
84
84
  "@atlaskit/task-decision": "^21.8.0",
85
85
  "@atlaskit/teams-app-config": "^3.0.0",
86
86
  "@atlaskit/textfield": "^10.1.0",
87
- "@atlaskit/tmp-editor-statsig": "^164.0.0",
87
+ "@atlaskit/tmp-editor-statsig": "^164.1.0",
88
88
  "@atlaskit/tokens": "^16.8.0",
89
89
  "@atlaskit/tooltip": "^24.2.0",
90
90
  "@atlaskit/width-detector": "^7.1.0",
@@ -118,13 +118,13 @@
118
118
  "w3c-keyname": "^2.1.8"
119
119
  },
120
120
  "peerDependencies": {
121
- "@atlaskit/media-core": "^38.0.0",
121
+ "@atlaskit/media-core": "^38.1.0",
122
122
  "react": "^18.2.0 || ^19.2.0",
123
123
  "react-dom": "^18.2.0 || ^19.2.0",
124
124
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
125
125
  },
126
126
  "devDependencies": {
127
- "@atlaskit/media-core": "^38.0.0",
127
+ "@atlaskit/media-core": "^38.1.0",
128
128
  "@atlassian/a11y-jest-testing": "^0.17.0",
129
129
  "@atlassian/experiment-test-utils": "^0.2.0",
130
130
  "@atlassian/feature-flags-test-utils": "^1.2.0",