@atlaskit/editor-common 123.2.1 → 123.4.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.
Files changed (45) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/block-controls/surface-candidate-invalidation/package.json +10 -0
  3. package/dist/cjs/block-controls/surface-candidate-invalidation.js +27 -0
  4. package/dist/cjs/block-controls/surface-keys.js +5 -1
  5. package/dist/cjs/monitoring/error.js +1 -1
  6. package/dist/cjs/prosemirror-dom-metadata/index.js +2 -1
  7. package/dist/cjs/quick-insert/snippetPreviewImageUrls.js +117 -0
  8. package/dist/cjs/safe-plugin/index.js +4 -3
  9. package/dist/cjs/selection/getFragmentsFromSelection.js +5 -14
  10. package/dist/cjs/ui/DropList/index.js +1 -1
  11. package/dist/cjs/ui/Expand/index.js +22 -1
  12. package/dist/cjs/ui/MediaSingle/styled.js +1 -6
  13. package/dist/cjs/ui/Mention/index.js +1 -1
  14. package/dist/es2019/block-controls/surface-candidate-invalidation.js +19 -0
  15. package/dist/es2019/block-controls/surface-keys.js +4 -0
  16. package/dist/es2019/monitoring/error.js +1 -1
  17. package/dist/es2019/prosemirror-dom-metadata/index.js +2 -1
  18. package/dist/es2019/quick-insert/snippetPreviewImageUrls.js +109 -0
  19. package/dist/es2019/safe-plugin/index.js +4 -3
  20. package/dist/es2019/selection/getFragmentsFromSelection.js +5 -14
  21. package/dist/es2019/ui/DropList/index.js +1 -1
  22. package/dist/es2019/ui/Expand/index.js +22 -1
  23. package/dist/es2019/ui/MediaSingle/styled.js +1 -6
  24. package/dist/es2019/ui/Mention/index.js +1 -1
  25. package/dist/esm/block-controls/surface-candidate-invalidation.js +20 -0
  26. package/dist/esm/block-controls/surface-keys.js +4 -0
  27. package/dist/esm/monitoring/error.js +1 -1
  28. package/dist/esm/prosemirror-dom-metadata/index.js +2 -1
  29. package/dist/esm/quick-insert/snippetPreviewImageUrls.js +111 -0
  30. package/dist/esm/safe-plugin/index.js +4 -3
  31. package/dist/esm/selection/getFragmentsFromSelection.js +5 -14
  32. package/dist/esm/ui/DropList/index.js +1 -1
  33. package/dist/esm/ui/Expand/index.js +22 -1
  34. package/dist/esm/ui/MediaSingle/styled.js +1 -6
  35. package/dist/esm/ui/Mention/index.js +1 -1
  36. package/dist/types/block-controls/block-control-ui-context.d.ts +1 -0
  37. package/dist/types/block-controls/surface-candidate-invalidation.d.ts +21 -0
  38. package/dist/types/block-controls/surface-keys.d.ts +4 -0
  39. package/dist/types/quick-insert/snippetPreviewImageUrls.d.ts +6 -0
  40. package/dist/types/selection/getFragmentsFromSelection.d.ts +3 -9
  41. package/dist/types/types/floating-toolbar.d.ts +7 -0
  42. package/dist/types/types/hyperlink.d.ts +4 -0
  43. package/dist/types/ui/Expand/index.d.ts +20 -0
  44. package/package.json +4 -10
  45. package/quick-insert/snippet-preview-image-urls/package.json +10 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,54 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 123.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`9df8889f51f21`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9df8889f51f21) -
8
+ Add an opt-in LinkPickerOptions.popupContainerSurface ('default' | 'none') that lets a custom link
9
+ picker component (e.g. RovoLinkPicker) suppress the editor's floating toolbar popup surface
10
+ (background, box-shadow, border-radius, padding) when it renders its own complete surface.
11
+ Threaded through FloatingToolbarConfig/Toolbar's new containerSurface prop. Defaults to the
12
+ existing wrapper surface; only a caller that explicitly opts in is affected.
13
+
14
+ ### Patch Changes
15
+
16
+ - [`d28cad9beb783`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d28cad9beb783) -
17
+ Enable mention avatars when the platform_editor_mention_node_graphql_provider experiment is
18
+ enabled
19
+
20
+ ## 123.3.0
21
+
22
+ ### Minor Changes
23
+
24
+ - [`ad905e52e6f1b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ad905e52e6f1b) -
25
+ CONFCLOUD-84260: Include the expand title in body accessible names, localize the macro role
26
+ description, and keep them updated behind `platform_editor_expand_content_a11y_2`.
27
+ - [`fc26bfc51dd5c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/fc26bfc51dd5c) -
28
+ Add sparse block-control surface anchors, intersection-driven candidates, and explicit visibility
29
+ invalidation for registry-backed block controls. Expose registration change subscriptions from the
30
+ UI control registry model, and refresh cached visibility from suggestion and collapse transaction
31
+ metadata. Under `platform_editor_block_control_migration`, use native node-anchor identity across
32
+ Editor and Block Controls, and route expand keyboard focus through the shared Block Controls
33
+ command. Preserve Show Diff visibility checks in both migration cohorts so block controls stay
34
+ hidden while a diff is displayed. Keep the block menu closed when a migrated layout-column handle
35
+ opens the layout menu, and close the layout menu when the selection moves away from its selected
36
+ columns.
37
+ - [`64a76a7487e96`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/64a76a7487e96) -
38
+ Add block template hover previews keyed by stable snippet IDs behind
39
+ platform_editor_slash_command, including the legacy Confluence provider path and the direct
40
+ extension renderer used by the slash menu. Unknown snippet IDs remain without a preview. Use the
41
+ supplied highest-quality light and dark preview assets for all 21 supported block templates.
42
+
43
+ ### Patch Changes
44
+
45
+ - [`22e02fb26ca02`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/22e02fb26ca02) -
46
+ Make the shipped media border radius styling permanent and remove the obsolete feature gate.
47
+ - [`3db4caa422c0a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3db4caa422c0a) -
48
+ Make selection fragment sanitization permanent while preserving nested tables, and remove the
49
+ obsolete feature gate.
50
+ - Updated dependencies
51
+
3
52
  ## 123.2.1
4
53
 
5
54
  ### Patch Changes
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/block-controls/surface-candidate-invalidation",
3
+ "main": "../../dist/cjs/block-controls/surface-candidate-invalidation.js",
4
+ "module": "../../dist/esm/block-controls/surface-candidate-invalidation.js",
5
+ "module:es2019": "../../dist/es2019/block-controls/surface-candidate-invalidation.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../../dist/types/block-controls/surface-candidate-invalidation.d.ts"
10
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.invalidateBlockControlsSurfaces = exports.BLOCK_CONTROLS_SURFACE_INVALIDATION = void 0;
8
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
+ /** Transaction metadata for contributors whose surface visibility changes without editing the document. */
10
+ var BLOCK_CONTROLS_SURFACE_INVALIDATION = exports.BLOCK_CONTROLS_SURFACE_INVALIDATION = 'blockControlsSurfaceInvalidation';
11
+ /**
12
+ * Temporary shared helper for merging invalidations from independent contributors.
13
+ *
14
+ * This would ideally be owned by the Block Controls plugin, but Block Collapse also emits
15
+ * invalidations while Block Controls depends on it for collapsed-heading drag and move behavior.
16
+ * Moving this helper into Block Controls would therefore create a package dependency cycle.
17
+ * Keep it in editor-common until that dependency can be inverted or removed.
18
+ */
19
+ var invalidateBlockControlsSurfaces = exports.invalidateBlockControlsSurfaces = function invalidateBlockControlsSurfaces(tr, invalidation) {
20
+ var _previous$ids, _invalidation$ids, _previous$positions, _invalidation$positio, _previous$ranges, _invalidation$ranges;
21
+ var previous = tr.getMeta(BLOCK_CONTROLS_SURFACE_INVALIDATION);
22
+ return tr.setMeta(BLOCK_CONTROLS_SURFACE_INVALIDATION, {
23
+ ids: [].concat((0, _toConsumableArray2.default)((_previous$ids = previous === null || previous === void 0 ? void 0 : previous.ids) !== null && _previous$ids !== void 0 ? _previous$ids : []), (0, _toConsumableArray2.default)((_invalidation$ids = invalidation.ids) !== null && _invalidation$ids !== void 0 ? _invalidation$ids : [])),
24
+ positions: [].concat((0, _toConsumableArray2.default)((_previous$positions = previous === null || previous === void 0 ? void 0 : previous.positions) !== null && _previous$positions !== void 0 ? _previous$positions : []), (0, _toConsumableArray2.default)((_invalidation$positio = invalidation.positions) !== null && _invalidation$positio !== void 0 ? _invalidation$positio : [])),
25
+ ranges: [].concat((0, _toConsumableArray2.default)((_previous$ranges = previous === null || previous === void 0 ? void 0 : previous.ranges) !== null && _previous$ranges !== void 0 ? _previous$ranges : []), (0, _toConsumableArray2.default)((_invalidation$ranges = invalidation.ranges) !== null && _invalidation$ranges !== void 0 ? _invalidation$ranges : []))
26
+ });
27
+ };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.BLOCK_CONTROLS_RIGHT_SURFACE = exports.BLOCK_CONTROLS_RIGHT_SECTION = exports.BLOCK_CONTROLS_RIGHT_GROUP = exports.BLOCK_CONTROLS_LEFT_SURFACE = exports.BLOCK_CONTROLS_LEFT_SECTION = exports.BLOCK_CONTROLS_LEFT_GROUP = void 0;
6
+ exports.BLOCK_CONTROLS_RIGHT_SURFACE = exports.BLOCK_CONTROLS_RIGHT_SECTION = exports.BLOCK_CONTROLS_RIGHT_GROUP = exports.BLOCK_CONTROLS_LEFT_SURFACE = exports.BLOCK_CONTROLS_LEFT_SECTION = exports.BLOCK_CONTROLS_LEFT_GROUP = exports.BLOCK_CONTROLS_DRAG_HANDLE = void 0;
7
7
  /**
8
8
  * Stable identifiers for registry-backed block-control surfaces and their layout containers.
9
9
  * They live in editor-common so contributors do not depend on the Block Controls plugin.
@@ -24,6 +24,10 @@ var BLOCK_CONTROLS_LEFT_GROUP = exports.BLOCK_CONTROLS_LEFT_GROUP = {
24
24
  key: 'block-controls-left-group',
25
25
  type: 'group'
26
26
  };
27
+ var BLOCK_CONTROLS_DRAG_HANDLE = exports.BLOCK_CONTROLS_DRAG_HANDLE = {
28
+ key: 'block-controls-drag-handle',
29
+ type: 'button'
30
+ };
27
31
  var BLOCK_CONTROLS_RIGHT_SECTION = exports.BLOCK_CONTROLS_RIGHT_SECTION = {
28
32
  key: 'block-controls-right-section',
29
33
  type: 'section'
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
27
27
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
28
28
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
29
29
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
30
- var packageVersion = "123.2.0";
30
+ var packageVersion = "123.3.0";
31
31
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
32
32
  // Remove URL as it has UGC
33
33
  // Ignored via go/ees007
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.createProseMirrorMetadata = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _model = require("@atlaskit/editor-prosemirror/model");
10
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
10
11
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
12
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
13
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // Disable no-re-export rule for entry point files
@@ -46,7 +47,7 @@ var createProseMirrorMetadata = exports.createProseMirrorMetadata = function cre
46
47
  if (nodeOrMark.type.isInline) {
47
48
  commonAttributes['data-prosemirror-node-inline'] = 'true';
48
49
  }
49
- if ((options === null || options === void 0 ? void 0 : options.anchrorId) !== undefined && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
50
+ if ((options === null || options === void 0 ? void 0 : options.anchrorId) !== undefined && ((0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_block_control_migration'))) {
50
51
  commonAttributes['data-node-anchor'] = options.anchrorId;
51
52
  }
52
53
  return commonAttributes;
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getSnippetPreviewImageUrls = void 0;
7
+ var DAM_ASSET_LINK = 'https://dam-cdn.atl.orangelogic.com/AssetLink';
8
+ var snippetPreviewImageUrlsByKey = {
9
+ // Action items
10
+ '019e5cd9-5ca1-7258-befd-4f50d491bb42': {
11
+ light: "".concat(DAM_ASSET_LINK, "/qq0503l11x2ub0506p2s046o2ep5gw1w.png"),
12
+ dark: "".concat(DAM_ASSET_LINK, "/i77e8128ir0e34t8w11mar77ngq53o00.png")
13
+ },
14
+ // Bug report
15
+ '019e5cd9-5ca1-7258-befd-1c3c59b0aa00': {
16
+ light: "".concat(DAM_ASSET_LINK, "/221f56s64c186314ka8a7uaj7m4di32l.png"),
17
+ dark: "".concat(DAM_ASSET_LINK, "/1c86e0v3ygh5ct5600luum0w67unpa23.png")
18
+ },
19
+ // Campaign brief
20
+ '019e5cd9-5ca1-7258-befd-398bb4e40f15': {
21
+ light: "".concat(DAM_ASSET_LINK, "/55j1ie55ad1nal6t3awxxui52rp47wn1.png"),
22
+ dark: "".concat(DAM_ASSET_LINK, "/36h5jgou0pw7v532411mbl501b8de4hm.png")
23
+ },
24
+ // Colorful layout
25
+ '019e5cd9-5ca1-7258-befd-53b6eec19427': {
26
+ light: "".concat(DAM_ASSET_LINK, "/53j8kth40pkysk4rqs64038r4cw2i867.png"),
27
+ dark: "".concat(DAM_ASSET_LINK, "/k7ofa1q6r10dydey04780514v75j3fvx.png")
28
+ },
29
+ // Colorful numbered table
30
+ '019e5cd9-5ca1-7258-befd-70a282facf16': {
31
+ light: "".concat(DAM_ASSET_LINK, "/f02n6041opl0rqvbygs2hv162mt6jq3u.png"),
32
+ dark: "".concat(DAM_ASSET_LINK, "/s63mw28263h0oi8we3x052m7rsw2o1k8.png")
33
+ },
34
+ // Colorful summary
35
+ '019e5cd9-5ca1-7258-befd-7e200502de8e': {
36
+ light: "".concat(DAM_ASSET_LINK, "/242qv11f2p7y1u461v71glq85x76b5gp.png"),
37
+ dark: "".concat(DAM_ASSET_LINK, "/jeaj3a8g7x61syy45d73c2223647b14j.png")
38
+ },
39
+ // Colorful table
40
+ '019e5cd9-5ca1-7258-befd-5524d394ba0a': {
41
+ light: "".concat(DAM_ASSET_LINK, "/8w8571k707dlx556rxr3hs72gs5q4m42.png"),
42
+ dark: "".concat(DAM_ASSET_LINK, "/wkt55v21i5q520pqxjh31x5g2j8upth4.png")
43
+ },
44
+ // Competitive snapshot
45
+ '019e5cd9-5ca1-7258-befd-40d1947b7b84': {
46
+ light: "".concat(DAM_ASSET_LINK, "/k5cm81s2h7i41d4d6832n67c2m767h6t.png"),
47
+ dark: "".concat(DAM_ASSET_LINK, "/ks38nc26451n7384d52413lck2qhq4e6.png")
48
+ },
49
+ // Criteria rubric
50
+ '019e5cd9-5ca1-7258-befd-84723a493931': {
51
+ light: "".concat(DAM_ASSET_LINK, "/n00f5ur678kbqdqjj5e13xpij6u3kkuq.png"),
52
+ dark: "".concat(DAM_ASSET_LINK, "/54k2y2f7n2tpg2n12is326376102c3b5.png")
53
+ },
54
+ // Customer quote
55
+ '019e5cd9-5ca1-7258-befd-5fcf6165870f': {
56
+ light: "".concat(DAM_ASSET_LINK, "/k8q5l4htp63652mhw572ed6chren37mv.png"),
57
+ dark: "".concat(DAM_ASSET_LINK, "/y0leijw14xp7mdpi3265xn0d5ymo5lfm.png")
58
+ },
59
+ // Decision log
60
+ '019e5cd9-5ca1-7258-befd-30c6e8712ba4': {
61
+ light: "".concat(DAM_ASSET_LINK, "/4vuxracm3c33555h1u4ug65q55267574.png"),
62
+ dark: "".concat(DAM_ASSET_LINK, "/5445044f626dcb58dbc7s6axr32e4ywl.png")
63
+ },
64
+ // Launch checklist
65
+ '019e5cd9-5ca1-7258-befd-3ce1c551015e': {
66
+ light: "".concat(DAM_ASSET_LINK, "/1o0gj47oprg341fe6iip8fdx8561t54n.png"),
67
+ dark: "".concat(DAM_ASSET_LINK, "/lay6kpn21b264q2q8144h3s18uwjud0f.png")
68
+ },
69
+ // Meeting agenda
70
+ '019e5cd9-5ca1-7258-befd-47559a8d7cfc': {
71
+ light: "".concat(DAM_ASSET_LINK, "/2hn6q5dt118vwyqi438725l141u70fb8.png"),
72
+ dark: "".concat(DAM_ASSET_LINK, "/r4l0ydb7ujg4lms6n0wrrnsmsd1x65kw.png")
73
+ },
74
+ // Project status snapshot
75
+ '019e5cd9-5ca1-7258-befd-2943939d1b79': {
76
+ light: "".concat(DAM_ASSET_LINK, "/qk6emfe0oa2260ldt11748672gs65y1l.png"),
77
+ dark: "".concat(DAM_ASSET_LINK, "/tt36rsll4cmq4607ik7g2d10fxmysyt4.png")
78
+ },
79
+ // Pros and cons
80
+ '019e5cd9-5ca1-7258-befd-6db9658d75f4': {
81
+ light: "".concat(DAM_ASSET_LINK, "/22078yl6viws8rc3au187m76x07xcu61.png"),
82
+ dark: "".concat(DAM_ASSET_LINK, "/4tfd6w50y4yxfh4ks75w5ql04u17n7ub.png")
83
+ },
84
+ // Quick project update
85
+ '019e5cd9-5ca1-7258-befd-820ce1acd7a0': {
86
+ light: "".concat(DAM_ASSET_LINK, "/i8cfkp8v6716121f0w054g85mkw15wgu.png"),
87
+ dark: "".concat(DAM_ASSET_LINK, "/x7a25y5f33ok60871t31e1my5c7880cr.png")
88
+ },
89
+ // Risks and assumptions
90
+ '019e5cd9-5ca1-7258-befd-2da95ce98772': {
91
+ light: "".concat(DAM_ASSET_LINK, "/yl7w10ms70ptlodhc703f6byo3wf7xty.png"),
92
+ dark: "".concat(DAM_ASSET_LINK, "/mn14wqw150cu05w3s358w3f2f1vfgv7r.png")
93
+ },
94
+ // Roles and responsibilities matrix
95
+ '019e5cd9-5ca1-7258-befd-37cd3a06776d': {
96
+ light: "".concat(DAM_ASSET_LINK, "/67hs5t8u4t63c4fepm6ho1c4d5u12bed.png"),
97
+ dark: "".concat(DAM_ASSET_LINK, "/wj5s3dy5nvb810t87f7x45cie88783h6.png")
98
+ },
99
+ // Run sheet
100
+ '019e5cd9-5ca1-7258-befd-4a9979f87235': {
101
+ light: "".concat(DAM_ASSET_LINK, "/tt0n285m6jl5lxb46c5v4fn856540351.png"),
102
+ dark: "".concat(DAM_ASSET_LINK, "/qcrcqcs14753208xqw1j8r38mgs57w2f.png")
103
+ },
104
+ // Started → Now
105
+ '019e5cd9-5ca1-7258-befd-74fb1585da6f': {
106
+ light: "".concat(DAM_ASSET_LINK, "/5ggat8yryusxvaqj3o800t8v6hcyh22v.png"),
107
+ dark: "".concat(DAM_ASSET_LINK, "/287u8yil1jb1j5p1fih0141h07k2f64w.png")
108
+ },
109
+ // Weekly calendar
110
+ '019e5cd9-5ca1-7258-befd-580c2c95a0a0': {
111
+ light: "".concat(DAM_ASSET_LINK, "/na153u604p852n54aji7aj1gf14431o7.png"),
112
+ dark: "".concat(DAM_ASSET_LINK, "/sw7m5s5ay718h025c6ed3gaq63orv4gu.png")
113
+ }
114
+ };
115
+ var getSnippetPreviewImageUrls = exports.getSnippetPreviewImageUrls = function getSnippetPreviewImageUrls(snippetKey) {
116
+ return Object.prototype.hasOwnProperty.call(snippetPreviewImageUrlsByKey, snippetKey) ? snippetPreviewImageUrlsByKey[snippetKey] : undefined;
117
+ };
@@ -14,6 +14,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
14
14
  var _toArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toArray"));
15
15
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
16
16
  var _state = require("@atlaskit/editor-prosemirror/state");
17
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
17
18
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
18
19
  var _isSsr = require("../core-utils/is-ssr");
19
20
  var _nodeAnchorProvider = require("../node-anchor/node-anchor-provider");
@@ -43,7 +44,7 @@ var attachGenericProseMirrorMetadata = exports.attachGenericProseMirrorMetadata
43
44
  name = _ref3[0],
44
45
  value = _ref3[1];
45
46
  dom.setAttribute(name, value);
46
- if (name === 'data-node-anchor' && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
47
+ if (name === 'data-node-anchor' && ((0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_block_control_migration'))) {
47
48
  // if browser doesn't support CSS anchor, won't need the style
48
49
  // Or if it supports CSS attr() function as the value of anchor-name,
49
50
  // We won't need set the style
@@ -87,7 +88,7 @@ var wrapGetPosExceptions = function wrapGetPosExceptions(spec) {
87
88
  view = _argumentsList[1],
88
89
  unsafeGetPos = _argumentsList[2],
89
90
  more = _arrayLikeToArray(_argumentsList).slice(3);
90
- if (!nodeIdProvider && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
91
+ if (!nodeIdProvider && ((0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_block_control_migration'))) {
91
92
  nodeIdProvider = (0, _nodeAnchorProvider.getNodeIdProvider)(view);
92
93
  }
93
94
  var safeGetPos = function () {
@@ -106,7 +107,7 @@ var wrapGetPosExceptions = function wrapGetPosExceptions(spec) {
106
107
  var _nodeIdProvider;
107
108
  // we only attach metadata to the dom if its position is known
108
109
  var pos = safeGetPos();
109
- var options = pos !== undefined && (0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? {
110
+ var options = pos !== undefined && ((0, _expValEquals.expValEquals)('platform_editor_native_anchor_with_dnd', 'isEnabled', true) || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_block_control_migration')) ? {
110
111
  anchrorId: (_nodeIdProvider = nodeIdProvider) === null || _nodeIdProvider === void 0 ? void 0 : _nodeIdProvider.getOrGenerateId(node, pos)
111
112
  } : undefined;
112
113
  attachGenericProseMirrorMetadata({
@@ -4,20 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getFragmentsFromSelection = void 0;
7
- var _toJSON = require("@atlaskit/editor-json-transformer/toJSON");
8
- var _fg = require("@atlaskit/platform-feature-flags/fg");
9
7
  var _nodes = require("../utils/nodes");
10
8
  var _contextHelpers = require("./context-helpers");
11
9
  /**
12
- * Get the fragments from the selection.
13
- *
14
- * The result crosses an editor boundary — Remix, Rovo/convo-ai and AIFC treat it as persistable
15
- * ADF. The two same-named `nodeToJSON` exports are not interchangeable: `editor-json-transformer`'s
16
- * is a verbatim ProseMirror serialisation and leaks schema-only container variants such as
17
- * `panel_c1`, while `../utils/nodes` sanitises.
18
- *
19
- * `keepNestedTables: true` keeps the gate scoped to that strip — the sanitiser would otherwise also
20
- * rewrite nested tables into an extension carrying stringified ADF.
10
+ * Selection fragments cross an editor boundary: Remix, Rovo/convo-ai and AIFC consume them as
11
+ * persistable ADF, so schema-only container variants must be sanitized. Nested tables remain intact
12
+ * rather than being converted into extensions containing stringified ADF.
21
13
  */
22
14
  var getFragmentsFromSelection = exports.getFragmentsFromSelection = function getFragmentsFromSelection(selection) {
23
15
  if (!selection || selection.empty) {
@@ -25,12 +17,11 @@ var getFragmentsFromSelection = exports.getFragmentsFromSelection = function get
25
17
  }
26
18
  var slice = (0, _contextHelpers.getSliceFromSelection)(selection);
27
19
  var content = slice.content;
28
- var sanitizeFragments = (0, _fg.fg)('platform_editor_sanitize_selection_fragments');
29
20
  var fragment = [];
30
21
  content.forEach(function (node) {
31
- fragment.push(sanitizeFragments ? (0, _nodes.nodeToJSON)(node, {
22
+ fragment.push((0, _nodes.nodeToJSON)(node, {
32
23
  keepNestedTables: true
33
- }) : (0, _toJSON.toJSON)(node));
24
+ }));
34
25
  });
35
26
  return fragment;
36
27
  };
@@ -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 = "123.2.0";
27
+ var packageVersion = "123.3.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -51,10 +51,31 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
51
51
  defaultMessage: 'Give this expand a title',
52
52
  description: 'aria label for an expand node title input field'
53
53
  },
54
- expandBodyAriaLabel: {
54
+ // Clean up with platform_editor_expand_content_a11y_2.
55
+ expandBodyAriaLabelOriginal: {
55
56
  id: 'fabric.editor.expandBodyAriaLabel',
56
57
  defaultMessage: 'Expand body content',
57
58
  description: 'Aria label for the body content of an expand node'
59
+ },
60
+ expandBodyAriaLabel: {
61
+ id: 'editor-common.Expand.expandBodyAriaLabel',
62
+ defaultMessage: 'Body content for {title}',
63
+ description: 'Aria label for the body content of an expand node'
64
+ },
65
+ expandBodyAriaLabelUntitled: {
66
+ id: 'editor-common.Expand.expandBodyAriaLabelUntitled',
67
+ defaultMessage: 'untitled expand',
68
+ description: 'Fallback title for the body content of an expand node without a title'
69
+ },
70
+ expandBodyAriaDescription: {
71
+ id: 'fabric.editor.expandBodyAriaDescription',
72
+ defaultMessage: 'Enter the content that will be revealed when this expand is opened.',
73
+ description: 'Aria description for the body content of an expand node'
74
+ },
75
+ expandBodyRoleDescription: {
76
+ id: 'fabric.editor.expandBodyRoleDescription',
77
+ defaultMessage: 'macro',
78
+ description: 'Aria role description for the body content of an expand node'
58
79
  }
59
80
  });
60
81
 
@@ -25,7 +25,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
25
25
  var _react = _interopRequireDefault(require("react"));
26
26
  var _react2 = require("@emotion/react");
27
27
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
28
- var _fg = require("@atlaskit/platform-feature-flags/fg");
29
28
  var _utils = require("../../utils");
30
29
  var _breakout = require("../../utils/breakout");
31
30
  var _calcResizedWidth = require("./calcResizedWidth");
@@ -244,11 +243,7 @@ MediaWrapper.displayName = 'WrapperMediaSingle';
244
243
  // eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
245
244
  var MediaBorderGapFiller = exports.MediaBorderGapFiller = function MediaBorderGapFiller(_ref4) {
246
245
  var borderColor = _ref4.borderColor;
247
- // [FEATURE FLAG: platform_editor_media_border_radius_fix]
248
- // Fixes border radius to properly match image with 8px radius
249
- // To clean up: remove conditional, keep only flag-on behavior ('8px')
250
- var borderRadius = (0, _fg.fg)('platform_editor_media_border_radius_fix') ? "var(--ds-radius-large, 8px)" : '1px'; // OLD BEHAVIOR (to be removed when flag is cleaned up)
251
-
246
+ var borderRadius = "var(--ds-radius-large, 8px)";
252
247
  return (0, _react2.jsx)("div", {
253
248
  style: {
254
249
  // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop -- Ignored via go/DSP-18766
@@ -39,7 +39,7 @@ var Mention = exports.default = /*#__PURE__*/function (_PureComponent) {
39
39
  mentionNodeDataProvider = _this$props.mentionNodeDataProvider;
40
40
  var mentionProvider = providers.mentionProvider,
41
41
  profilecardProvider = providers.profilecardProvider;
42
- var isAvatarEnabled = Boolean(mentionNodeDataProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mention_node_avatar');
42
+ var isAvatarEnabled = Boolean(mentionNodeDataProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mention_node_avatar') || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_mention_node_graphql_provider'));
43
43
  if (isAvatarEnabled && mentionNodeDataProvider) {
44
44
  return /*#__PURE__*/_react.default.createElement(_mentionWithProviders.MentionWithAvatarProviders, {
45
45
  id: id,
@@ -0,0 +1,19 @@
1
+ /** Transaction metadata for contributors whose surface visibility changes without editing the document. */
2
+ export const BLOCK_CONTROLS_SURFACE_INVALIDATION = 'blockControlsSurfaceInvalidation';
3
+ /**
4
+ * Temporary shared helper for merging invalidations from independent contributors.
5
+ *
6
+ * This would ideally be owned by the Block Controls plugin, but Block Collapse also emits
7
+ * invalidations while Block Controls depends on it for collapsed-heading drag and move behavior.
8
+ * Moving this helper into Block Controls would therefore create a package dependency cycle.
9
+ * Keep it in editor-common until that dependency can be inverted or removed.
10
+ */
11
+ export const invalidateBlockControlsSurfaces = (tr, invalidation) => {
12
+ var _previous$ids, _invalidation$ids, _previous$positions, _invalidation$positio, _previous$ranges, _invalidation$ranges;
13
+ const previous = tr.getMeta(BLOCK_CONTROLS_SURFACE_INVALIDATION);
14
+ return tr.setMeta(BLOCK_CONTROLS_SURFACE_INVALIDATION, {
15
+ ids: [...((_previous$ids = previous === null || previous === void 0 ? void 0 : previous.ids) !== null && _previous$ids !== void 0 ? _previous$ids : []), ...((_invalidation$ids = invalidation.ids) !== null && _invalidation$ids !== void 0 ? _invalidation$ids : [])],
16
+ positions: [...((_previous$positions = previous === null || previous === void 0 ? void 0 : previous.positions) !== null && _previous$positions !== void 0 ? _previous$positions : []), ...((_invalidation$positio = invalidation.positions) !== null && _invalidation$positio !== void 0 ? _invalidation$positio : [])],
17
+ ranges: [...((_previous$ranges = previous === null || previous === void 0 ? void 0 : previous.ranges) !== null && _previous$ranges !== void 0 ? _previous$ranges : []), ...((_invalidation$ranges = invalidation.ranges) !== null && _invalidation$ranges !== void 0 ? _invalidation$ranges : [])]
18
+ });
19
+ };
@@ -18,6 +18,10 @@ export const BLOCK_CONTROLS_LEFT_GROUP = {
18
18
  key: 'block-controls-left-group',
19
19
  type: 'group'
20
20
  };
21
+ export const BLOCK_CONTROLS_DRAG_HANDLE = {
22
+ key: 'block-controls-drag-handle',
23
+ type: 'button'
24
+ };
21
25
  export const BLOCK_CONTROLS_RIGHT_SECTION = {
22
26
  key: 'block-controls-right-section',
23
27
  type: 'section'
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
13
13
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
14
14
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
15
15
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
16
- const packageVersion = "123.2.0";
16
+ const packageVersion = "123.3.0";
17
17
  const sanitiseSentryEvents = (data, _hint) => {
18
18
  // Remove URL as it has UGC
19
19
  // Ignored via go/ees007
@@ -2,6 +2,7 @@
2
2
  /* eslint-disable @atlaskit/editor/no-re-export */
3
3
 
4
4
  import { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
5
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
5
6
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
7
  const isPMNode = nodeOrMark => {
7
8
  return nodeOrMark instanceof PMNode || Array.isArray(nodeOrMark.marks);
@@ -41,7 +42,7 @@ export const createProseMirrorMetadata = (nodeOrMark, options) => {
41
42
  if (nodeOrMark.type.isInline) {
42
43
  commonAttributes['data-prosemirror-node-inline'] = 'true';
43
44
  }
44
- if ((options === null || options === void 0 ? void 0 : options.anchrorId) !== undefined && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
45
+ if ((options === null || options === void 0 ? void 0 : options.anchrorId) !== undefined && (expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) || isExperimentEnabled('platform_editor_block_control_migration'))) {
45
46
  commonAttributes['data-node-anchor'] = options.anchrorId;
46
47
  }
47
48
  return commonAttributes;
@@ -0,0 +1,109 @@
1
+ const DAM_ASSET_LINK = 'https://dam-cdn.atl.orangelogic.com/AssetLink';
2
+ const snippetPreviewImageUrlsByKey = {
3
+ // Action items
4
+ '019e5cd9-5ca1-7258-befd-4f50d491bb42': {
5
+ light: `${DAM_ASSET_LINK}/qq0503l11x2ub0506p2s046o2ep5gw1w.png`,
6
+ dark: `${DAM_ASSET_LINK}/i77e8128ir0e34t8w11mar77ngq53o00.png`
7
+ },
8
+ // Bug report
9
+ '019e5cd9-5ca1-7258-befd-1c3c59b0aa00': {
10
+ light: `${DAM_ASSET_LINK}/221f56s64c186314ka8a7uaj7m4di32l.png`,
11
+ dark: `${DAM_ASSET_LINK}/1c86e0v3ygh5ct5600luum0w67unpa23.png`
12
+ },
13
+ // Campaign brief
14
+ '019e5cd9-5ca1-7258-befd-398bb4e40f15': {
15
+ light: `${DAM_ASSET_LINK}/55j1ie55ad1nal6t3awxxui52rp47wn1.png`,
16
+ dark: `${DAM_ASSET_LINK}/36h5jgou0pw7v532411mbl501b8de4hm.png`
17
+ },
18
+ // Colorful layout
19
+ '019e5cd9-5ca1-7258-befd-53b6eec19427': {
20
+ light: `${DAM_ASSET_LINK}/53j8kth40pkysk4rqs64038r4cw2i867.png`,
21
+ dark: `${DAM_ASSET_LINK}/k7ofa1q6r10dydey04780514v75j3fvx.png`
22
+ },
23
+ // Colorful numbered table
24
+ '019e5cd9-5ca1-7258-befd-70a282facf16': {
25
+ light: `${DAM_ASSET_LINK}/f02n6041opl0rqvbygs2hv162mt6jq3u.png`,
26
+ dark: `${DAM_ASSET_LINK}/s63mw28263h0oi8we3x052m7rsw2o1k8.png`
27
+ },
28
+ // Colorful summary
29
+ '019e5cd9-5ca1-7258-befd-7e200502de8e': {
30
+ light: `${DAM_ASSET_LINK}/242qv11f2p7y1u461v71glq85x76b5gp.png`,
31
+ dark: `${DAM_ASSET_LINK}/jeaj3a8g7x61syy45d73c2223647b14j.png`
32
+ },
33
+ // Colorful table
34
+ '019e5cd9-5ca1-7258-befd-5524d394ba0a': {
35
+ light: `${DAM_ASSET_LINK}/8w8571k707dlx556rxr3hs72gs5q4m42.png`,
36
+ dark: `${DAM_ASSET_LINK}/wkt55v21i5q520pqxjh31x5g2j8upth4.png`
37
+ },
38
+ // Competitive snapshot
39
+ '019e5cd9-5ca1-7258-befd-40d1947b7b84': {
40
+ light: `${DAM_ASSET_LINK}/k5cm81s2h7i41d4d6832n67c2m767h6t.png`,
41
+ dark: `${DAM_ASSET_LINK}/ks38nc26451n7384d52413lck2qhq4e6.png`
42
+ },
43
+ // Criteria rubric
44
+ '019e5cd9-5ca1-7258-befd-84723a493931': {
45
+ light: `${DAM_ASSET_LINK}/n00f5ur678kbqdqjj5e13xpij6u3kkuq.png`,
46
+ dark: `${DAM_ASSET_LINK}/54k2y2f7n2tpg2n12is326376102c3b5.png`
47
+ },
48
+ // Customer quote
49
+ '019e5cd9-5ca1-7258-befd-5fcf6165870f': {
50
+ light: `${DAM_ASSET_LINK}/k8q5l4htp63652mhw572ed6chren37mv.png`,
51
+ dark: `${DAM_ASSET_LINK}/y0leijw14xp7mdpi3265xn0d5ymo5lfm.png`
52
+ },
53
+ // Decision log
54
+ '019e5cd9-5ca1-7258-befd-30c6e8712ba4': {
55
+ light: `${DAM_ASSET_LINK}/4vuxracm3c33555h1u4ug65q55267574.png`,
56
+ dark: `${DAM_ASSET_LINK}/5445044f626dcb58dbc7s6axr32e4ywl.png`
57
+ },
58
+ // Launch checklist
59
+ '019e5cd9-5ca1-7258-befd-3ce1c551015e': {
60
+ light: `${DAM_ASSET_LINK}/1o0gj47oprg341fe6iip8fdx8561t54n.png`,
61
+ dark: `${DAM_ASSET_LINK}/lay6kpn21b264q2q8144h3s18uwjud0f.png`
62
+ },
63
+ // Meeting agenda
64
+ '019e5cd9-5ca1-7258-befd-47559a8d7cfc': {
65
+ light: `${DAM_ASSET_LINK}/2hn6q5dt118vwyqi438725l141u70fb8.png`,
66
+ dark: `${DAM_ASSET_LINK}/r4l0ydb7ujg4lms6n0wrrnsmsd1x65kw.png`
67
+ },
68
+ // Project status snapshot
69
+ '019e5cd9-5ca1-7258-befd-2943939d1b79': {
70
+ light: `${DAM_ASSET_LINK}/qk6emfe0oa2260ldt11748672gs65y1l.png`,
71
+ dark: `${DAM_ASSET_LINK}/tt36rsll4cmq4607ik7g2d10fxmysyt4.png`
72
+ },
73
+ // Pros and cons
74
+ '019e5cd9-5ca1-7258-befd-6db9658d75f4': {
75
+ light: `${DAM_ASSET_LINK}/22078yl6viws8rc3au187m76x07xcu61.png`,
76
+ dark: `${DAM_ASSET_LINK}/4tfd6w50y4yxfh4ks75w5ql04u17n7ub.png`
77
+ },
78
+ // Quick project update
79
+ '019e5cd9-5ca1-7258-befd-820ce1acd7a0': {
80
+ light: `${DAM_ASSET_LINK}/i8cfkp8v6716121f0w054g85mkw15wgu.png`,
81
+ dark: `${DAM_ASSET_LINK}/x7a25y5f33ok60871t31e1my5c7880cr.png`
82
+ },
83
+ // Risks and assumptions
84
+ '019e5cd9-5ca1-7258-befd-2da95ce98772': {
85
+ light: `${DAM_ASSET_LINK}/yl7w10ms70ptlodhc703f6byo3wf7xty.png`,
86
+ dark: `${DAM_ASSET_LINK}/mn14wqw150cu05w3s358w3f2f1vfgv7r.png`
87
+ },
88
+ // Roles and responsibilities matrix
89
+ '019e5cd9-5ca1-7258-befd-37cd3a06776d': {
90
+ light: `${DAM_ASSET_LINK}/67hs5t8u4t63c4fepm6ho1c4d5u12bed.png`,
91
+ dark: `${DAM_ASSET_LINK}/wj5s3dy5nvb810t87f7x45cie88783h6.png`
92
+ },
93
+ // Run sheet
94
+ '019e5cd9-5ca1-7258-befd-4a9979f87235': {
95
+ light: `${DAM_ASSET_LINK}/tt0n285m6jl5lxb46c5v4fn856540351.png`,
96
+ dark: `${DAM_ASSET_LINK}/qcrcqcs14753208xqw1j8r38mgs57w2f.png`
97
+ },
98
+ // Started → Now
99
+ '019e5cd9-5ca1-7258-befd-74fb1585da6f': {
100
+ light: `${DAM_ASSET_LINK}/5ggat8yryusxvaqj3o800t8v6hcyh22v.png`,
101
+ dark: `${DAM_ASSET_LINK}/287u8yil1jb1j5p1fih0141h07k2f64w.png`
102
+ },
103
+ // Weekly calendar
104
+ '019e5cd9-5ca1-7258-befd-580c2c95a0a0': {
105
+ light: `${DAM_ASSET_LINK}/na153u604p852n54aji7aj1gf14431o7.png`,
106
+ dark: `${DAM_ASSET_LINK}/sw7m5s5ay718h025c6ed3gaq63orv4gu.png`
107
+ }
108
+ };
109
+ export const getSnippetPreviewImageUrls = snippetKey => Object.prototype.hasOwnProperty.call(snippetPreviewImageUrlsByKey, snippetKey) ? snippetPreviewImageUrlsByKey[snippetKey] : undefined;
@@ -1,6 +1,7 @@
1
1
  // oxlint-disable-next-line import/no-duplicates
2
2
 
3
3
  import { Plugin } from '@atlaskit/editor-prosemirror/state';
4
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
4
5
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
5
6
  import { isSSR } from '../core-utils/is-ssr';
6
7
  import { getNodeIdProvider } from '../node-anchor/node-anchor-provider';
@@ -25,7 +26,7 @@ export const attachGenericProseMirrorMetadata = ({
25
26
  const metadata = createProseMirrorMetadata(nodeOrMark, options);
26
27
  Object.entries(metadata).forEach(([name, value]) => {
27
28
  dom.setAttribute(name, value);
28
- if (name === 'data-node-anchor' && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
29
+ if (name === 'data-node-anchor' && (expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) || isExperimentEnabled('platform_editor_block_control_migration'))) {
29
30
  // if browser doesn't support CSS anchor, won't need the style
30
31
  // Or if it supports CSS attr() function as the value of anchor-name,
31
32
  // We won't need set the style
@@ -65,7 +66,7 @@ const wrapGetPosExceptions = spec => {
65
66
  const safeNodeView = new Proxy(Reflect.get(target, prop, receiver), {
66
67
  apply(target, thisArg, argumentsList) {
67
68
  const [node, view, unsafeGetPos, ...more] = argumentsList;
68
- if (!nodeIdProvider && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true)) {
69
+ if (!nodeIdProvider && (expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) || isExperimentEnabled('platform_editor_block_control_migration'))) {
69
70
  nodeIdProvider = getNodeIdProvider(view);
70
71
  }
71
72
  const safeGetPos = (() => {
@@ -84,7 +85,7 @@ const wrapGetPosExceptions = spec => {
84
85
  var _nodeIdProvider;
85
86
  // we only attach metadata to the dom if its position is known
86
87
  const pos = safeGetPos();
87
- const options = pos !== undefined && expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) ? {
88
+ const options = pos !== undefined && (expValEquals('platform_editor_native_anchor_with_dnd', 'isEnabled', true) || isExperimentEnabled('platform_editor_block_control_migration')) ? {
88
89
  anchrorId: (_nodeIdProvider = nodeIdProvider) === null || _nodeIdProvider === void 0 ? void 0 : _nodeIdProvider.getOrGenerateId(node, pos)
89
90
  } : undefined;
90
91
  attachGenericProseMirrorMetadata({