@atlaskit/editor-plugin-synced-block 14.0.27 → 15.0.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,28 @@
1
1
  # @atlaskit/editor-plugin-synced-block
2
2
 
3
+ ## 15.0.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`149408be91016`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/149408be91016) -
8
+ Thread the reference node's `localId` through the editor synced-block rendering path so products
9
+ can namespace heading ids inside synced block content.
10
+
11
+ `SyncedBlockRendererProps` gains an optional `localId`, which `SyncBlockRendererWrapper` now
12
+ forwards to the product-supplied `syncedBlockRenderer`. `SyncedBlockRenderer` accepts a matching
13
+ `localId` prop and passes it to `renderSyncedBlockContent` as `headingIdPrefix`.
14
+
15
+ This mirrors the existing view-page node component behaviour. Heading ids are still only emitted
16
+ when a prefix is supplied alongside `allowHeadingAnchorLinks`, so there is no change for consumers
17
+ that do not pass `localId`.
18
+
19
+ Confluence enables the new Table of Contents and heading-anchor behavior behind the
20
+ `confluence_toc_synced_block_exp` experiment.
21
+
22
+ ### Patch Changes
23
+
24
+ - Updated dependencies
25
+
3
26
  ## 14.0.27
4
27
 
5
28
  ### Patch Changes
@@ -116,7 +116,8 @@ var SyncBlockRendererWrapperComponent = function SyncBlockRendererWrapperCompone
116
116
  onDrop: preventInput
117
117
  }, syncedBlockRenderer({
118
118
  syncBlockFetchResult: syncBlockFetchResult,
119
- api: api
119
+ api: api,
120
+ localId: localId
120
121
  })), /*#__PURE__*/_react.default.createElement(_SyncBlockLabel.SyncBlockLabel, {
121
122
  isSource: false,
122
123
  title: title,
@@ -104,7 +104,8 @@ const SyncBlockRendererWrapperComponent = ({
104
104
  onDrop: preventInput
105
105
  }, syncedBlockRenderer({
106
106
  syncBlockFetchResult,
107
- api
107
+ api,
108
+ localId
108
109
  })), /*#__PURE__*/React.createElement(SyncBlockLabel, {
109
110
  isSource: false,
110
111
  title: title,
@@ -107,7 +107,8 @@ var SyncBlockRendererWrapperComponent = function SyncBlockRendererWrapperCompone
107
107
  onDrop: preventInput
108
108
  }, syncedBlockRenderer({
109
109
  syncBlockFetchResult: syncBlockFetchResult,
110
- api: api
110
+ api: api,
111
+ localId: localId
111
112
  })), /*#__PURE__*/React.createElement(SyncBlockLabel, {
112
113
  isSource: false,
113
114
  title: title,
@@ -43,6 +43,14 @@ export type SyncedBlockEditorProps = {
43
43
  };
44
44
  export type SyncedBlockRendererProps = {
45
45
  api?: ExtractInjectionAPI<SyncedBlockPlugin>;
46
+ /**
47
+ * `localId` of the reference node being rendered.
48
+ *
49
+ * Products may use this to namespace ids generated inside the synced block
50
+ * content (for example heading anchor ids), so that the same source block
51
+ * embedded more than once on a page still produces distinct, stable ids.
52
+ */
53
+ localId?: string;
46
54
  syncBlockFetchResult: UseFetchSyncBlockDataResult;
47
55
  };
48
56
  export type SyncedBlockFeedbackContext = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-synced-block",
3
- "version": "14.0.27",
3
+ "version": "15.0.0",
4
4
  "description": "SyncedBlock plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -20,27 +20,27 @@
20
20
  "sideEffects": false,
21
21
  "atlaskit:src": "src/index.ts",
22
22
  "dependencies": {
23
- "@atlaskit/adf-schema": "^57.3.0",
23
+ "@atlaskit/adf-schema": "^57.4.0",
24
24
  "@atlaskit/button": "25.3.2",
25
25
  "@atlaskit/dropdown-menu": "18.3.0",
26
26
  "@atlaskit/editor-json-transformer": "^9.8.0",
27
- "@atlaskit/editor-plugin-analytics": "^16.1.0",
28
- "@atlaskit/editor-plugin-block-controls": "^17.4.0",
29
- "@atlaskit/editor-plugin-block-menu": "^15.1.0",
30
- "@atlaskit/editor-plugin-connectivity": "16.0.0",
31
- "@atlaskit/editor-plugin-content-format": "^10.0.0",
32
- "@atlaskit/editor-plugin-decorations": "^16.1.0",
33
- "@atlaskit/editor-plugin-editor-disabled": "^16.1.0",
34
- "@atlaskit/editor-plugin-editor-viewmode": "^18.0.0",
35
- "@atlaskit/editor-plugin-floating-toolbar": "^18.1.0",
36
- "@atlaskit/editor-plugin-focus": "^15.1.0",
37
- "@atlaskit/editor-plugin-selection": "^16.1.0",
38
- "@atlaskit/editor-plugin-toolbar": "^13.0.0",
39
- "@atlaskit/editor-plugin-ui-control-registry": "^10.0.0",
40
- "@atlaskit/editor-plugin-user-intent": "^14.0.0",
27
+ "@atlaskit/editor-plugin-analytics": "^17.0.0",
28
+ "@atlaskit/editor-plugin-block-controls": "^18.0.0",
29
+ "@atlaskit/editor-plugin-block-menu": "^16.0.0",
30
+ "@atlaskit/editor-plugin-connectivity": "17.0.0",
31
+ "@atlaskit/editor-plugin-content-format": "^11.0.0",
32
+ "@atlaskit/editor-plugin-decorations": "^17.0.0",
33
+ "@atlaskit/editor-plugin-editor-disabled": "^17.0.0",
34
+ "@atlaskit/editor-plugin-editor-viewmode": "^19.0.0",
35
+ "@atlaskit/editor-plugin-floating-toolbar": "^19.0.0",
36
+ "@atlaskit/editor-plugin-focus": "^16.0.0",
37
+ "@atlaskit/editor-plugin-selection": "^17.0.0",
38
+ "@atlaskit/editor-plugin-toolbar": "^14.0.0",
39
+ "@atlaskit/editor-plugin-ui-control-registry": "^11.0.0",
40
+ "@atlaskit/editor-plugin-user-intent": "^15.0.0",
41
41
  "@atlaskit/editor-prosemirror": "^8.0.0",
42
42
  "@atlaskit/editor-shared-styles": "^4.1.0",
43
- "@atlaskit/editor-synced-block-provider": "^12.2.0",
43
+ "@atlaskit/editor-synced-block-provider": "^13.0.0",
44
44
  "@atlaskit/editor-toolbar": "^2.6.0",
45
45
  "@atlaskit/flag": "^18.5.0",
46
46
  "@atlaskit/icon": "37.6.0",
@@ -52,7 +52,7 @@
52
52
  "@atlaskit/platform-feature-flags": "^2.2.0",
53
53
  "@atlaskit/primitives": "^22.5.0",
54
54
  "@atlaskit/spinner": "20.4.0",
55
- "@atlaskit/tmp-editor-statsig": "^178.0.0",
55
+ "@atlaskit/tmp-editor-statsig": "^179.0.0",
56
56
  "@atlaskit/tokens": "16.11.2",
57
57
  "@atlaskit/tooltip": "^24.3.0",
58
58
  "@atlaskit/visually-hidden": "^4.4.0",
@@ -64,7 +64,7 @@
64
64
  "memoize-one": "^6.0.0"
65
65
  },
66
66
  "peerDependencies": {
67
- "@atlaskit/editor-common": "^120.16.0",
67
+ "@atlaskit/editor-common": "^121.0.0",
68
68
  "react": "^18.2.0 || ^19.2.0",
69
69
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
70
70
  },