@atlaskit/editor-plugin-extension 22.0.2 → 22.0.3

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,26 @@
1
1
  # @atlaskit/editor-plugin-extension
2
2
 
3
+ ## 22.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8e4fd6774f6ec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e4fd6774f6ec) -
8
+ Add Stage-0 ADF schema support for the `annotation` mark on `extension` nodes (ADF Change 111).
9
+ Adds the `with_annotation` and `root_only_with_annotation` Stage-0 variants and wires them into
10
+ the approved root and nested placements (doc root, panel, blockquote, expand, nestedExpand,
11
+ listItem, blockTaskItem, table cells), registers the matching validator specs, and adds
12
+ valid/invalid reference fixtures, with regenerated PM/JSON/validator artifacts. Scoped to
13
+ `extension` only (not `bodiedExtension`/`multiBodiedExtension`); the full schema is unchanged.
14
+ Editor/renderer acceptance of the mark is gated by `cc_maui_annotations_on_extensions`.
15
+
16
+ Allowing the `annotation` mark on `extension` requires its container nodes (panel, table cells,
17
+ list items, etc.) to permit the mark too, so they can hold an annotated extension child. This made
18
+ the renderer's `getIndexMatch` double-count text inside those containers, corrupting inline
19
+ text-comment anchoring. Fixed by skipping block containers during serialisation (they are still
20
+ walked through so their inner text is counted once); leaf nodes and media are unaffected.
21
+
22
+ - Updated dependencies
23
+
3
24
  ## 22.0.2
4
25
 
5
26
  ### Patch Changes
@@ -49,7 +49,7 @@ var extensionPlugin = exports.extensionPlugin = function extensionPlugin(_ref) {
49
49
  nodes: function nodes() {
50
50
  var extensionNodes = [{
51
51
  name: 'extension',
52
- node: _extension.extension
52
+ node: (0, _fg.fg)('cc_maui_annotations_on_extensions') ? _extension.extensionWithAnnotationStage0 : _extension.extension
53
53
  }, {
54
54
  name: 'bodiedExtension',
55
55
  node: (0, _bodiedExtension.bodiedExtensionSpecWithFixedToDOM)()
@@ -1,6 +1,6 @@
1
1
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
2
2
  import { v4 as uuid } from 'uuid';
3
- import { extension } from '@atlaskit/adf-schema/extension';
3
+ import { extension, extensionWithAnnotationStage0 } from '@atlaskit/adf-schema/extension';
4
4
  import { inlineExtension } from '@atlaskit/adf-schema/inline-extension';
5
5
  import { extensionFrame, multiBodiedExtension } from '@atlaskit/adf-schema/multi-bodied-extension';
6
6
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
@@ -40,7 +40,7 @@ export const extensionPlugin = ({
40
40
  nodes() {
41
41
  const extensionNodes = [{
42
42
  name: 'extension',
43
- node: extension
43
+ node: fg('cc_maui_annotations_on_extensions') ? extensionWithAnnotationStage0 : extension
44
44
  }, {
45
45
  name: 'bodiedExtension',
46
46
  node: bodiedExtensionSpecWithFixedToDOM()
@@ -1,6 +1,6 @@
1
1
  // eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
2
2
  import { v4 as uuid } from 'uuid';
3
- import { extension } from '@atlaskit/adf-schema/extension';
3
+ import { extension, extensionWithAnnotationStage0 } from '@atlaskit/adf-schema/extension';
4
4
  import { inlineExtension } from '@atlaskit/adf-schema/inline-extension';
5
5
  import { extensionFrame, multiBodiedExtension } from '@atlaskit/adf-schema/multi-bodied-extension';
6
6
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
@@ -40,7 +40,7 @@ export var extensionPlugin = function extensionPlugin(_ref) {
40
40
  nodes: function nodes() {
41
41
  var extensionNodes = [{
42
42
  name: 'extension',
43
- node: extension
43
+ node: fg('cc_maui_annotations_on_extensions') ? extensionWithAnnotationStage0 : extension
44
44
  }, {
45
45
  name: 'bodiedExtension',
46
46
  node: bodiedExtensionSpecWithFixedToDOM()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-extension",
3
- "version": "22.0.2",
3
+ "version": "22.0.3",
4
4
  "description": "editor-plugin-extension plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -26,12 +26,12 @@
26
26
  ],
27
27
  "atlaskit:src": "src/index.ts",
28
28
  "dependencies": {
29
- "@atlaskit/adf-schema": "^57.5.0",
29
+ "@atlaskit/adf-schema": "^57.6.0",
30
30
  "@atlaskit/adf-utils": "^20.9.0",
31
31
  "@atlaskit/analytics-next": "^12.5.0",
32
32
  "@atlaskit/avatar": "^28.0.0",
33
33
  "@atlaskit/browser-apis": "^1.2.0",
34
- "@atlaskit/button": "^25.3.0",
34
+ "@atlaskit/button": "^25.4.0",
35
35
  "@atlaskit/checkbox": "^19.2.0",
36
36
  "@atlaskit/code": "^19.2.0",
37
37
  "@atlaskit/datetime-picker": "^18.7.0",
@@ -44,7 +44,7 @@
44
44
  "@atlaskit/editor-plugin-copy-button": "^19.0.0",
45
45
  "@atlaskit/editor-plugin-decorations": "^19.0.0",
46
46
  "@atlaskit/editor-plugin-feature-flags": "^18.0.0",
47
- "@atlaskit/editor-plugin-mentions": "^21.0.0",
47
+ "@atlaskit/editor-plugin-mentions": "^21.1.0",
48
48
  "@atlaskit/editor-plugin-toolbar": "^16.0.0",
49
49
  "@atlaskit/editor-plugin-width": "^20.0.0",
50
50
  "@atlaskit/editor-prosemirror": "^9.0.0",
@@ -85,7 +85,7 @@
85
85
  "uuid": "^11.1.1"
86
86
  },
87
87
  "peerDependencies": {
88
- "@atlaskit/editor-common": "^123.2.0",
88
+ "@atlaskit/editor-common": "^123.4.0",
89
89
  "react": "^18.2.0 || ^19.2.0",
90
90
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
91
91
  },
@@ -97,6 +97,9 @@
97
97
  "react-select": "^5.4.0"
98
98
  },
99
99
  "platform-feature-flags": {
100
+ "cc_maui_annotations_on_extensions": {
101
+ "type": "boolean"
102
+ },
100
103
  "platform_editor_adf_validator_stage0": {
101
104
  "type": "boolean"
102
105
  },