@atlaskit/editor-common 116.32.3 → 116.33.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,31 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 116.33.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`89de40d80a7ce`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/89de40d80a7ce) -
8
+ [ux] Add toggle to show/hide deleted diffs on the AI suggestion card. An eye icon button is added
9
+ inline with the Accept and Discard buttons, allowing users to hide all greyed-out deleted content
10
+ while keeping purple highlighted additions visible. The toggle resets to the default "show
11
+ deletions" state when navigating between suggestions.
12
+
13
+ ### Patch Changes
14
+
15
+ - [`3c4994f354f5f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3c4994f354f5f) -
16
+ [ux] Fix content order being corrupted when indenting or outdenting a list item that has content
17
+ placed between its sub-lists (e.g. `li(p, ul, p, ul)`).
18
+ - Updated dependencies
19
+
20
+ ## 116.32.4
21
+
22
+ ### Patch Changes
23
+
24
+ - [`245230d12da8d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/245230d12da8d) -
25
+ [ux] [EDITOR-8142] add red highlight color and filter out the transparent/ default highlight color
26
+ behind platform_editor_lovability_text_bg_color_patch_1
27
+ - Updated dependencies
28
+
3
29
  ## 116.32.3
4
30
 
5
31
  ### Patch Changes
@@ -181,6 +181,16 @@ var aiSuggestionsMessages = exports.aiSuggestionsMessages = (0, _reactIntl.defin
181
181
  defaultMessage: 'Compare with original',
182
182
  description: 'Label for the dropdown action to compare suggestion with original content'
183
183
  },
184
+ cardHideDeletedDiffsLabel: {
185
+ id: 'fabric.editor.ai.suggestions.card.hideDeletedDiffsLabel.non-final',
186
+ defaultMessage: 'Hide comparison',
187
+ description: 'Tooltip label for the eye icon button on the AI suggestions card when deleted diffs are visible'
188
+ },
189
+ cardShowDeletedDiffsLabel: {
190
+ id: 'fabric.editor.ai.suggestions.card.showDeletedDiffsLabel.non-final',
191
+ defaultMessage: 'Show comparison',
192
+ description: 'Tooltip label for the eye icon button on the AI suggestions card when deleted diffs are hidden'
193
+ },
184
194
  cardScrollBackToSuggestionLabel: {
185
195
  id: 'fabric.editor.ai.suggestions.card.scrollBackToSuggestionLabel.non-final',
186
196
  defaultMessage: 'Back to suggestion',
@@ -15,6 +15,10 @@ exports.flattenList = flattenList;
15
15
  * Uses `doc.nodesBetween` to walk the tree and delegates type-specific
16
16
  * decisions to the provided predicates. The core algorithm — selection
17
17
  * intersection, depth adjustment, index tracking — is shared.
18
+ *
19
+ * @private
20
+ * @deprecated Cannot represent content placed between an item's sub-lists
21
+ * (e.g. `li(p, ul, p, ul)`). Callers provide their own flatten that handles this.
18
22
  */
19
23
  function flattenList(options, predicates) {
20
24
  var doc = options.doc,
@@ -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.32.2";
31
+ var packageVersion = "116.32.4";
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.32.2";
27
+ var packageVersion = "116.32.4";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -175,6 +175,16 @@ export const aiSuggestionsMessages = defineMessages({
175
175
  defaultMessage: 'Compare with original',
176
176
  description: 'Label for the dropdown action to compare suggestion with original content'
177
177
  },
178
+ cardHideDeletedDiffsLabel: {
179
+ id: 'fabric.editor.ai.suggestions.card.hideDeletedDiffsLabel.non-final',
180
+ defaultMessage: 'Hide comparison',
181
+ description: 'Tooltip label for the eye icon button on the AI suggestions card when deleted diffs are visible'
182
+ },
183
+ cardShowDeletedDiffsLabel: {
184
+ id: 'fabric.editor.ai.suggestions.card.showDeletedDiffsLabel.non-final',
185
+ defaultMessage: 'Show comparison',
186
+ description: 'Tooltip label for the eye icon button on the AI suggestions card when deleted diffs are hidden'
187
+ },
178
188
  cardScrollBackToSuggestionLabel: {
179
189
  id: 'fabric.editor.ai.suggestions.card.scrollBackToSuggestionLabel.non-final',
180
190
  defaultMessage: 'Back to suggestion',
@@ -9,6 +9,10 @@
9
9
  * Uses `doc.nodesBetween` to walk the tree and delegates type-specific
10
10
  * decisions to the provided predicates. The core algorithm — selection
11
11
  * intersection, depth adjustment, index tracking — is shared.
12
+ *
13
+ * @private
14
+ * @deprecated Cannot represent content placed between an item's sub-lists
15
+ * (e.g. `li(p, ul, p, ul)`). Callers provide their own flatten that handles this.
12
16
  */
13
17
  export function flattenList(options, predicates) {
14
18
  const {
@@ -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.32.2";
17
+ const packageVersion = "116.32.4";
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.32.2";
17
+ const packageVersion = "116.32.4";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -175,6 +175,16 @@ export var aiSuggestionsMessages = defineMessages({
175
175
  defaultMessage: 'Compare with original',
176
176
  description: 'Label for the dropdown action to compare suggestion with original content'
177
177
  },
178
+ cardHideDeletedDiffsLabel: {
179
+ id: 'fabric.editor.ai.suggestions.card.hideDeletedDiffsLabel.non-final',
180
+ defaultMessage: 'Hide comparison',
181
+ description: 'Tooltip label for the eye icon button on the AI suggestions card when deleted diffs are visible'
182
+ },
183
+ cardShowDeletedDiffsLabel: {
184
+ id: 'fabric.editor.ai.suggestions.card.showDeletedDiffsLabel.non-final',
185
+ defaultMessage: 'Show comparison',
186
+ description: 'Tooltip label for the eye icon button on the AI suggestions card when deleted diffs are hidden'
187
+ },
178
188
  cardScrollBackToSuggestionLabel: {
179
189
  id: 'fabric.editor.ai.suggestions.card.scrollBackToSuggestionLabel.non-final',
180
190
  defaultMessage: 'Back to suggestion',
@@ -9,6 +9,10 @@
9
9
  * Uses `doc.nodesBetween` to walk the tree and delegates type-specific
10
10
  * decisions to the provided predicates. The core algorithm — selection
11
11
  * intersection, depth adjustment, index tracking — is shared.
12
+ *
13
+ * @private
14
+ * @deprecated Cannot represent content placed between an item's sub-lists
15
+ * (e.g. `li(p, ul, p, ul)`). Callers provide their own flatten that handles this.
12
16
  */
13
17
  export function flattenList(options, predicates) {
14
18
  var doc = options.doc,
@@ -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.32.2";
23
+ var packageVersion = "116.32.4";
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.32.2";
24
+ var packageVersion = "116.32.4";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -44,6 +44,11 @@ export declare const aiSuggestionsMessages: {
44
44
  description: string;
45
45
  id: string;
46
46
  };
47
+ cardHideDeletedDiffsLabel: {
48
+ defaultMessage: string;
49
+ description: string;
50
+ id: string;
51
+ };
47
52
  cardMoreOptionsButtonLabel: {
48
53
  defaultMessage: string;
49
54
  description: string;
@@ -74,6 +79,11 @@ export declare const aiSuggestionsMessages: {
74
79
  description: string;
75
80
  id: string;
76
81
  };
82
+ cardShowDeletedDiffsLabel: {
83
+ defaultMessage: string;
84
+ description: string;
85
+ id: string;
86
+ };
77
87
  cardShowSidebarButtonLabel: {
78
88
  defaultMessage: string;
79
89
  description: string;
@@ -11,8 +11,8 @@ export interface FlattenListOptions {
11
11
  doc: PMNode;
12
12
  indentDelta: number;
13
13
  maxDepth?: number;
14
- rootListStart: number;
15
14
  rootListEnd: number;
15
+ rootListStart: number;
16
16
  selectionFrom: number;
17
17
  selectionTo: number;
18
18
  }
@@ -20,20 +20,20 @@ export interface FlattenListOptions {
20
20
  * Type-specific predicates that vary between regular lists and task lists.
21
21
  */
22
22
  interface FlattenListPredicates {
23
- /** Returns true if `node` is a content-bearing item to include in the flattened output. */
24
- isContentNode: (node: PMNode, parent: PMNode | null) => boolean;
23
+ /** Computes the nesting depth for a node given its resolved depth and the root's depth. */
24
+ getDepth: (resolvedDepth: number, rootDepth: number) => number;
25
25
  /** Returns the selection bounds for an item, used to check selection intersection. */
26
26
  getSelectionBounds: (node: PMNode, pos: number) => {
27
- start: number;
28
27
  end: number;
28
+ start: number;
29
29
  };
30
- /** Computes the nesting depth for a node given its resolved depth and the root's depth. */
31
- getDepth: (resolvedDepth: number, rootDepth: number) => number;
30
+ /** Returns true if `node` is a content-bearing item to include in the flattened output. */
31
+ isContentNode: (node: PMNode, parent: PMNode | null) => boolean;
32
32
  }
33
33
  export interface FlattenListResult {
34
+ endIndex: number;
34
35
  items: FlattenedItem[];
35
36
  startIndex: number;
36
- endIndex: number;
37
37
  }
38
38
  /**
39
39
  * Flattens a list-like PM structure (regular list or task list) into an
@@ -42,6 +42,10 @@ export interface FlattenListResult {
42
42
  * Uses `doc.nodesBetween` to walk the tree and delegates type-specific
43
43
  * decisions to the provided predicates. The core algorithm — selection
44
44
  * intersection, depth adjustment, index tracking — is shared.
45
+ *
46
+ * @private
47
+ * @deprecated Cannot represent content placed between an item's sub-lists
48
+ * (e.g. `li(p, ul, p, ul)`). Callers provide their own flatten that handles this.
45
49
  */
46
50
  export declare function flattenList(options: FlattenListOptions, predicates: FlattenListPredicates): FlattenListResult | null;
47
51
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "116.32.3",
3
+ "version": "116.33.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/"
@@ -80,7 +80,7 @@
80
80
  "@atlaskit/task-decision": "^21.4.0",
81
81
  "@atlaskit/teams-app-config": "^2.1.0",
82
82
  "@atlaskit/textfield": "^9.1.0",
83
- "@atlaskit/tmp-editor-statsig": "^126.3.0",
83
+ "@atlaskit/tmp-editor-statsig": "^127.0.0",
84
84
  "@atlaskit/tokens": "^16.0.0",
85
85
  "@atlaskit/tooltip": "^23.1.0",
86
86
  "@atlaskit/width-detector": "^6.2.0",
@@ -255,6 +255,9 @@
255
255
  },
256
256
  "platform_editor_fix_scroll_to_pos": {
257
257
  "type": "boolean"
258
+ },
259
+ "platform_editor_lovability_text_bg_color_patch_1": {
260
+ "type": "boolean"
258
261
  }
259
262
  }
260
263
  }