@atlaskit/editor-plugin-synced-block 14.0.27 → 15.0.1
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,34 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-synced-block
|
|
2
2
|
|
|
3
|
+
## 15.0.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 15.0.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [`149408be91016`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/149408be91016) -
|
|
14
|
+
Thread the reference node's `localId` through the editor synced-block rendering path so products
|
|
15
|
+
can namespace heading ids inside synced block content.
|
|
16
|
+
|
|
17
|
+
`SyncedBlockRendererProps` gains an optional `localId`, which `SyncBlockRendererWrapper` now
|
|
18
|
+
forwards to the product-supplied `syncedBlockRenderer`. `SyncedBlockRenderer` accepts a matching
|
|
19
|
+
`localId` prop and passes it to `renderSyncedBlockContent` as `headingIdPrefix`.
|
|
20
|
+
|
|
21
|
+
This mirrors the existing view-page node component behaviour. Heading ids are still only emitted
|
|
22
|
+
when a prefix is supplied alongside `allowHeadingAnchorLinks`, so there is no change for consumers
|
|
23
|
+
that do not pass `localId`.
|
|
24
|
+
|
|
25
|
+
Confluence enables the new Table of Contents and heading-anchor behavior behind the
|
|
26
|
+
`confluence_toc_synced_block_exp` experiment.
|
|
27
|
+
|
|
28
|
+
### Patch Changes
|
|
29
|
+
|
|
30
|
+
- Updated dependencies
|
|
31
|
+
|
|
3
32
|
## 14.0.27
|
|
4
33
|
|
|
5
34
|
### 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": "
|
|
3
|
+
"version": "15.0.1",
|
|
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.
|
|
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": "^
|
|
28
|
-
"@atlaskit/editor-plugin-block-controls": "^
|
|
29
|
-
"@atlaskit/editor-plugin-block-menu": "^
|
|
30
|
-
"@atlaskit/editor-plugin-connectivity": "
|
|
31
|
-
"@atlaskit/editor-plugin-content-format": "^
|
|
32
|
-
"@atlaskit/editor-plugin-decorations": "^
|
|
33
|
-
"@atlaskit/editor-plugin-editor-disabled": "^
|
|
34
|
-
"@atlaskit/editor-plugin-editor-viewmode": "^
|
|
35
|
-
"@atlaskit/editor-plugin-floating-toolbar": "^
|
|
36
|
-
"@atlaskit/editor-plugin-focus": "^
|
|
37
|
-
"@atlaskit/editor-plugin-selection": "^
|
|
38
|
-
"@atlaskit/editor-plugin-toolbar": "^
|
|
39
|
-
"@atlaskit/editor-plugin-ui-control-registry": "^
|
|
40
|
-
"@atlaskit/editor-plugin-user-intent": "^
|
|
27
|
+
"@atlaskit/editor-plugin-analytics": "^17.0.0",
|
|
28
|
+
"@atlaskit/editor-plugin-block-controls": "^18.2.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": "^
|
|
43
|
+
"@atlaskit/editor-synced-block-provider": "^13.1.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": "^
|
|
55
|
+
"@atlaskit/tmp-editor-statsig": "^180.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": "^
|
|
67
|
+
"@atlaskit/editor-common": "^121.1.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
|
},
|