@atlaskit/editor-common 120.0.2 → 120.2.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,32 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 120.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`36fe288d5a58f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/36fe288d5a58f) -
8
+ [ux] Suggested Edits: map AI review failures to templated error screens in the thinking bar (rate
9
+ limit, Acceptable Use Policy, token limit and unknown), mirroring Rovo inline chat's copy, links
10
+ and retry rules. Non-retryable errors (rate limit, AUP) hide the "Try again" action, and the
11
+ Close/Try again buttons are ordered Close first.
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
17
+ ## 120.1.0
18
+
19
+ ### Minor Changes
20
+
21
+ - [`5f66a8c3706e3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5f66a8c3706e3) -
22
+ Add the registry-backed Block Controls Quick Insert surface behind
23
+ `platform_editor_block_control_migration`, including typed surface context, cached registry
24
+ lookup, stable left/right surface identities, and experiment-gated Quick Insert registration.
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies
29
+
3
30
  ## 120.0.2
4
31
 
5
32
  ### Patch Changes
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/block-controls/block-control-ui-context",
3
+ "main": "../../dist/cjs/block-controls/block-control-ui-context.js",
4
+ "module": "../../dist/esm/block-controls/block-control-ui-context.js",
5
+ "module:es2019": "../../dist/es2019/block-controls/block-control-ui-context.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/block-controls/block-control-ui-context.d.ts"
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/block-controls/surface-keys",
3
+ "main": "../../dist/cjs/block-controls/surface-keys.js",
4
+ "module": "../../dist/esm/block-controls/surface-keys.js",
5
+ "module:es2019": "../../dist/es2019/block-controls/surface-keys.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/block-controls/surface-keys.d.ts"
10
+ }
@@ -336,6 +336,11 @@ var aiSuggestionsMessages = exports.aiSuggestionsMessages = (0, _reactIntl.defin
336
336
  defaultMessage: 'Close',
337
337
  description: 'Accessible label for the close button on the thinking complete bar'
338
338
  },
339
+ thinkingErrorTokenLimitExceeded: {
340
+ id: 'fabric.editor.ai.suggestions.thinkingError.tokenLimitExceeded.non-final',
341
+ defaultMessage: 'There’s too much content to process.',
342
+ description: 'Error shown on the suggested-edits thinking bar when the request exceeds the maximum content limit.'
343
+ },
339
344
  sourceLabel: {
340
345
  id: 'fabric.editor.ai.suggestions.sourceLabel.non-final',
341
346
  defaultMessage: 'Source',
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BLOCK_CONTROL_UI_CONTEXT = void 0;
7
+ var _types = require("@atlaskit/editor-ui-control-model/types");
8
+ /** Context supplied to controls rendered on a block-controls surface. */
9
+
10
+ var BLOCK_CONTROL_UI_CONTEXT = exports.BLOCK_CONTROL_UI_CONTEXT = (0, _types.createContextToken)('block-control-ui');
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.BLOCK_CONTROLS_RIGHT_SURFACE = exports.BLOCK_CONTROLS_LEFT_SURFACE = exports.BLOCK_CONTROLS_LEFT_SECTION = exports.BLOCK_CONTROLS_LEFT_GROUP = void 0;
7
+ /**
8
+ * Stable identifiers for registry-backed block-control surfaces and their layout containers.
9
+ * They live in editor-common so contributors do not depend on the Block Controls plugin.
10
+ */
11
+ var BLOCK_CONTROLS_LEFT_SURFACE = exports.BLOCK_CONTROLS_LEFT_SURFACE = {
12
+ key: 'block-controls-left',
13
+ type: 'toolbar'
14
+ };
15
+ var BLOCK_CONTROLS_RIGHT_SURFACE = exports.BLOCK_CONTROLS_RIGHT_SURFACE = {
16
+ key: 'block-controls-right',
17
+ type: 'toolbar'
18
+ };
19
+ var BLOCK_CONTROLS_LEFT_SECTION = exports.BLOCK_CONTROLS_LEFT_SECTION = {
20
+ key: 'block-controls-left-section',
21
+ type: 'section'
22
+ };
23
+ var BLOCK_CONTROLS_LEFT_GROUP = exports.BLOCK_CONTROLS_LEFT_GROUP = {
24
+ key: 'block-controls-left-group',
25
+ type: 'group'
26
+ };
@@ -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.0.1";
31
+ var packageVersion = "120.1.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.0.1";
27
+ var packageVersion = "120.1.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -330,6 +330,11 @@ export const aiSuggestionsMessages = defineMessages({
330
330
  defaultMessage: 'Close',
331
331
  description: 'Accessible label for the close button on the thinking complete bar'
332
332
  },
333
+ thinkingErrorTokenLimitExceeded: {
334
+ id: 'fabric.editor.ai.suggestions.thinkingError.tokenLimitExceeded.non-final',
335
+ defaultMessage: 'There’s too much content to process.',
336
+ description: 'Error shown on the suggested-edits thinking bar when the request exceeds the maximum content limit.'
337
+ },
333
338
  sourceLabel: {
334
339
  id: 'fabric.editor.ai.suggestions.sourceLabel.non-final',
335
340
  defaultMessage: 'Source',
@@ -0,0 +1,5 @@
1
+ import { createContextToken } from '@atlaskit/editor-ui-control-model/types';
2
+
3
+ /** Context supplied to controls rendered on a block-controls surface. */
4
+
5
+ export const BLOCK_CONTROL_UI_CONTEXT = createContextToken('block-control-ui');
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Stable identifiers for registry-backed block-control surfaces and their layout containers.
3
+ * They live in editor-common so contributors do not depend on the Block Controls plugin.
4
+ */
5
+ export const BLOCK_CONTROLS_LEFT_SURFACE = {
6
+ key: 'block-controls-left',
7
+ type: 'toolbar'
8
+ };
9
+ export const BLOCK_CONTROLS_RIGHT_SURFACE = {
10
+ key: 'block-controls-right',
11
+ type: 'toolbar'
12
+ };
13
+ export const BLOCK_CONTROLS_LEFT_SECTION = {
14
+ key: 'block-controls-left-section',
15
+ type: 'section'
16
+ };
17
+ export const BLOCK_CONTROLS_LEFT_GROUP = {
18
+ key: 'block-controls-left-group',
19
+ type: 'group'
20
+ };
@@ -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.0.1";
17
+ const packageVersion = "120.1.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.0.1";
17
+ const packageVersion = "120.1.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -330,6 +330,11 @@ export var aiSuggestionsMessages = defineMessages({
330
330
  defaultMessage: 'Close',
331
331
  description: 'Accessible label for the close button on the thinking complete bar'
332
332
  },
333
+ thinkingErrorTokenLimitExceeded: {
334
+ id: 'fabric.editor.ai.suggestions.thinkingError.tokenLimitExceeded.non-final',
335
+ defaultMessage: 'There’s too much content to process.',
336
+ description: 'Error shown on the suggested-edits thinking bar when the request exceeds the maximum content limit.'
337
+ },
333
338
  sourceLabel: {
334
339
  id: 'fabric.editor.ai.suggestions.sourceLabel.non-final',
335
340
  defaultMessage: 'Source',
@@ -0,0 +1,5 @@
1
+ import { createContextToken } from '@atlaskit/editor-ui-control-model/types';
2
+
3
+ /** Context supplied to controls rendered on a block-controls surface. */
4
+
5
+ export var BLOCK_CONTROL_UI_CONTEXT = createContextToken('block-control-ui');
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Stable identifiers for registry-backed block-control surfaces and their layout containers.
3
+ * They live in editor-common so contributors do not depend on the Block Controls plugin.
4
+ */
5
+ export var BLOCK_CONTROLS_LEFT_SURFACE = {
6
+ key: 'block-controls-left',
7
+ type: 'toolbar'
8
+ };
9
+ export var BLOCK_CONTROLS_RIGHT_SURFACE = {
10
+ key: 'block-controls-right',
11
+ type: 'toolbar'
12
+ };
13
+ export var BLOCK_CONTROLS_LEFT_SECTION = {
14
+ key: 'block-controls-left-section',
15
+ type: 'section'
16
+ };
17
+ export var BLOCK_CONTROLS_LEFT_GROUP = {
18
+ key: 'block-controls-left-group',
19
+ type: 'group'
20
+ };
@@ -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.0.1";
23
+ var packageVersion = "120.1.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.0.1";
24
+ var packageVersion = "120.1.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -274,6 +274,11 @@ export declare const aiSuggestionsMessages: {
274
274
  description: string;
275
275
  id: string;
276
276
  };
277
+ thinkingErrorTokenLimitExceeded: {
278
+ defaultMessage: string;
279
+ description: string;
280
+ id: string;
281
+ };
277
282
  thinkingEscHint: {
278
283
  defaultMessage: string;
279
284
  description: string;
@@ -0,0 +1,32 @@
1
+ import type { Node as ProseMirrorNode } from '@atlaskit/editor-prosemirror/model';
2
+ import { type ContextToken } from '@atlaskit/editor-ui-control-model/types';
3
+ export type BlockControlUIContextAncestor = {
4
+ depth: number;
5
+ pos: number;
6
+ type: {
7
+ name: string;
8
+ };
9
+ };
10
+ export type BlockControlUIContextNode = {
11
+ ancestors: readonly BlockControlUIContextAncestor[];
12
+ depth: number;
13
+ node: ProseMirrorNode;
14
+ parentType?: string;
15
+ pos: number;
16
+ type: {
17
+ name: string;
18
+ };
19
+ };
20
+ export type BlockControlUIContextActiveNode = BlockControlUIContextNode & {
21
+ rootPos?: number;
22
+ rootType?: {
23
+ name: string;
24
+ };
25
+ };
26
+ /** Context supplied to controls rendered on a block-controls surface. */
27
+ export type BlockControlUIContext = {
28
+ activeNode?: BlockControlUIContextActiveNode;
29
+ rootNode: BlockControlUIContextNode;
30
+ targetNode: BlockControlUIContextNode;
31
+ };
32
+ export declare const BLOCK_CONTROL_UI_CONTEXT: ContextToken<BlockControlUIContext>;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Stable identifiers for registry-backed block-control surfaces and their layout containers.
3
+ * They live in editor-common so contributors do not depend on the Block Controls plugin.
4
+ */
5
+ export declare const BLOCK_CONTROLS_LEFT_SURFACE: {
6
+ readonly key: 'block-controls-left';
7
+ readonly type: 'toolbar';
8
+ };
9
+ export declare const BLOCK_CONTROLS_RIGHT_SURFACE: {
10
+ readonly key: 'block-controls-right';
11
+ readonly type: 'toolbar';
12
+ };
13
+ export declare const BLOCK_CONTROLS_LEFT_SECTION: {
14
+ readonly key: 'block-controls-left-section';
15
+ readonly type: 'section';
16
+ };
17
+ export declare const BLOCK_CONTROLS_LEFT_GROUP: {
18
+ readonly key: 'block-controls-left-group';
19
+ readonly type: 'group';
20
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "120.0.2",
3
+ "version": "120.2.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/"
@@ -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": "^161.0.0",
87
+ "@atlaskit/tmp-editor-statsig": "^162.0.0",
88
88
  "@atlaskit/tokens": "^16.8.0",
89
89
  "@atlaskit/tooltip": "^24.2.0",
90
90
  "@atlaskit/width-detector": "^7.1.0",