@atlaskit/editor-plugin-extension 22.0.2 → 22.0.4

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-plugin-extension
2
2
 
3
+ ## 22.0.4
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 22.0.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [`8e4fd6774f6ec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8e4fd6774f6ec) -
14
+ Add Stage-0 ADF schema support for the `annotation` mark on `extension` nodes (ADF Change 111).
15
+ Adds the `with_annotation` and `root_only_with_annotation` Stage-0 variants and wires them into
16
+ the approved root and nested placements (doc root, panel, blockquote, expand, nestedExpand,
17
+ listItem, blockTaskItem, table cells), registers the matching validator specs, and adds
18
+ valid/invalid reference fixtures, with regenerated PM/JSON/validator artifacts. Scoped to
19
+ `extension` only (not `bodiedExtension`/`multiBodiedExtension`); the full schema is unchanged.
20
+ Editor/renderer acceptance of the mark is gated by `cc_maui_annotations_on_extensions`.
21
+
22
+ Allowing the `annotation` mark on `extension` requires its container nodes (panel, table cells,
23
+ list items, etc.) to permit the mark too, so they can hold an annotated extension child. This made
24
+ the renderer's `getIndexMatch` double-count text inside those containers, corrupting inline
25
+ text-comment anchoring. Fixed by skipping block containers during serialisation (they are still
26
+ walked through so their inner text is counted once); leaf nodes and media are unaffected.
27
+
28
+ - Updated dependencies
29
+
3
30
  ## 22.0.2
4
31
 
5
32
  ### 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.4",
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",
@@ -69,7 +69,7 @@
69
69
  "@atlaskit/tabs": "^21.2.0",
70
70
  "@atlaskit/textarea": "^10.2.0",
71
71
  "@atlaskit/textfield": "^10.2.0",
72
- "@atlaskit/tmp-editor-statsig": "^201.0.0",
72
+ "@atlaskit/tmp-editor-statsig": "^202.0.0",
73
73
  "@atlaskit/toggle": "^17.3.0",
74
74
  "@atlaskit/tokens": "^18.2.0",
75
75
  "@atlaskit/tooltip": "^24.3.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.5.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
  },