@atlaskit/editor-synced-block-renderer 6.0.3 → 6.0.5
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/AGENTS.md +112 -0
- package/CHANGELOG.md +16 -0
- package/dist/cjs/ui/AKRendererWrapper.js +2 -0
- package/dist/cjs/ui/SyncedBlockLoadError.js +3 -1
- package/dist/cjs/ui/renderSyncedBlockContent.js +3 -1
- package/dist/cjs/useSyncedBlockNodeComponent.js +3 -1
- package/dist/es2019/ui/AKRendererWrapper.js +2 -0
- package/dist/es2019/ui/SyncedBlockLoadError.js +3 -1
- package/dist/es2019/ui/renderSyncedBlockContent.js +3 -1
- package/dist/es2019/useSyncedBlockNodeComponent.js +3 -1
- package/dist/esm/ui/AKRendererWrapper.js +2 -0
- package/dist/esm/ui/SyncedBlockLoadError.js +3 -1
- package/dist/esm/ui/renderSyncedBlockContent.js +3 -1
- package/dist/esm/useSyncedBlockNodeComponent.js +3 -1
- package/dist/types/types.d.ts +1 -1
- package/dist/types/ui/SyncedBlockErrorComponent.d.ts +1 -1
- package/dist/types/ui/SyncedBlockErrorStateCard.d.ts +2 -1
- package/dist/types/ui/SyncedBlockNodeComponentRenderer.d.ts +1 -1
- package/dist/types/ui/SyncedBlockPermissionDenied.d.ts +1 -1
- package/dist/types/ui/SyncedBlockRenderer.d.ts +1 -1
- package/dist/types/ui/renderSyncedBlockContent.d.ts +1 -1
- package/dist/types/useSyncedBlockNodeComponent.d.ts +3 -3
- package/dist/types-ts4.5/types.d.ts +1 -1
- package/dist/types-ts4.5/ui/SyncedBlockErrorComponent.d.ts +1 -1
- package/dist/types-ts4.5/ui/SyncedBlockErrorStateCard.d.ts +2 -1
- package/dist/types-ts4.5/ui/SyncedBlockNodeComponentRenderer.d.ts +1 -1
- package/dist/types-ts4.5/ui/SyncedBlockPermissionDenied.d.ts +1 -1
- package/dist/types-ts4.5/ui/SyncedBlockRenderer.d.ts +1 -1
- package/dist/types-ts4.5/ui/renderSyncedBlockContent.d.ts +1 -1
- package/dist/types-ts4.5/useSyncedBlockNodeComponent.d.ts +3 -3
- package/package.json +13 -9
package/AGENTS.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Synced Block Renderer — Developer Agent Guide
|
|
2
|
+
|
|
3
|
+
> **Package**: `@atlaskit/editor-synced-block-renderer` **Purpose**: View-mode rendering of
|
|
4
|
+
> reference synced blocks using nested renderer with SSR support. **Full Knowledge Base**:
|
|
5
|
+
> [Synced Blocks — Comprehensive Knowledge Base](https://hello.atlassian.net/wiki/spaces/egcuc/pages/6679548384)
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Quick Context
|
|
10
|
+
|
|
11
|
+
This package renders reference `syncBlock` nodes in view mode (Confluence page view, Jira issue
|
|
12
|
+
view). It fetches content from the Block Service, handles loading/error/offline states, and supports
|
|
13
|
+
SSR for performance-critical page loads.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Source Structure
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
src/
|
|
21
|
+
├── index.ts ← Barrel exports
|
|
22
|
+
├── useSyncedBlockNodeComponent.tsx ← Core hooks for node management and memoization
|
|
23
|
+
├── ui/
|
|
24
|
+
│ ├── renderSyncedBlockContent.tsx ← Shared render branching logic (loading → error → success)
|
|
25
|
+
│ └── SyncedBlockNodeComponentRenderer.tsx ← Renderer component with store manager + media SSR
|
|
26
|
+
└── types.ts ← SyncedBlockRendererOptions type
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Key Exports
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
getSyncBlockNodesFromDoc; // Extract SyncBlockNode[] from a DocNode
|
|
35
|
+
useMemoizedSyncedBlockNodeComponent; // Returns memoized component for rendering reference blocks
|
|
36
|
+
getSyncedBlockRenderer; // Factory for editor-mode synced block renderer
|
|
37
|
+
renderSyncedBlockContent; // Shared render branching logic
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## How It Works
|
|
43
|
+
|
|
44
|
+
### `getSyncBlockNodesFromDoc(doc: DocNode)`
|
|
45
|
+
|
|
46
|
+
Extracts all `syncBlock` nodes from a document's content array. Maps through `doc.content`, converts
|
|
47
|
+
each via `convertSyncBlockJSONNodeToSyncBlockNode`, filters out undefined entries. Returns `[]` if
|
|
48
|
+
content is empty.
|
|
49
|
+
|
|
50
|
+
### `renderSyncedBlockContent(params)`
|
|
51
|
+
|
|
52
|
+
Central rendering decision tree (checked sequentially):
|
|
53
|
+
|
|
54
|
+
1. **Offline + not SSR** → offline error component
|
|
55
|
+
2. **Loading + no instance** → loading skeleton
|
|
56
|
+
3. **SSR + instance error** → loading state (deferred to client-side hydration)
|
|
57
|
+
4. **Missing resourceId / error / no data / deleted** → error component
|
|
58
|
+
5. **Unpublished** → unpublished error component
|
|
59
|
+
6. **Success** → wraps content in `AKRendererWrapper` and renders
|
|
60
|
+
|
|
61
|
+
### `useMemoizedSyncedBlockNodeComponent(options)`
|
|
62
|
+
|
|
63
|
+
1. Creates memoized `SyncBlockStoreManager` via `useMemoizedSyncBlockStoreManager`
|
|
64
|
+
2. First `useEffect`: processes prefetched data via `getPrefetchedData()`
|
|
65
|
+
3. Second `useEffect`: triggers initial fetch of synced block data
|
|
66
|
+
4. Returns memoized callback wrapping `SyncedBlockNodeComponentRenderer` in `ErrorBoundary` +
|
|
67
|
+
`SyncBlockActionsProvider`
|
|
68
|
+
|
|
69
|
+
### SSR Behaviour
|
|
70
|
+
|
|
71
|
+
- `renderSyncedBlockContent`: Skips offline error in SSR; returns loading if SSR + error (deferred)
|
|
72
|
+
- `SyncedBlockNodeComponentRenderer`: Sets media SSR mode to `'server'` during SSR, `'client'` after
|
|
73
|
+
hydration
|
|
74
|
+
- SSR errors tracked via `handleSSRErrorsAnalytics` in deferred `useEffect`
|
|
75
|
+
- Uses `isSSR()` from `@atlaskit/editor-common/core-utils`
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Common Tasks
|
|
80
|
+
|
|
81
|
+
### Fixing a rendering bug
|
|
82
|
+
|
|
83
|
+
1. Identify if it's a loading state, error state, or content rendering issue
|
|
84
|
+
2. Check `renderSyncedBlockContent` branching logic — which path is being hit?
|
|
85
|
+
3. For content issues, check if the ADF node type is supported:
|
|
86
|
+
[Supported nodes](https://hello.atlassian.net/wiki/spaces/egcuc/pages/5926568979)
|
|
87
|
+
4. For SSR issues, check if `isSSR()` detection and hydration timing are correct
|
|
88
|
+
|
|
89
|
+
### Adding a new error state
|
|
90
|
+
|
|
91
|
+
1. Add condition check in `renderSyncedBlockContent.tsx`
|
|
92
|
+
2. Create error component UI
|
|
93
|
+
3. Add analytics event for the new error state
|
|
94
|
+
4. Ensure SSR path handles it gracefully (deferred to client if needed)
|
|
95
|
+
|
|
96
|
+
### Performance considerations
|
|
97
|
+
|
|
98
|
+
- Reference blocks can regress VC90 due to content shift (CLS)
|
|
99
|
+
- SSR preloading mitigates this — ensure `getPrefetchedData()` is populated
|
|
100
|
+
- Use `SyncBlockInMemorySessionCache` for view→edit transitions
|
|
101
|
+
- Monitor: [VC90 investigation](https://hello.atlassian.net/wiki/spaces/egcuc/pages/6528071518)
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Related Packages
|
|
106
|
+
|
|
107
|
+
- **Plugin**: `platform/packages/editor/editor-plugin-synced-block/` — uses `getSyncedBlockRenderer`
|
|
108
|
+
- **Provider**: `platform/packages/editor/editor-synced-block-provider/` — provides store manager
|
|
109
|
+
and fetch
|
|
110
|
+
- **Confluence renderer**: `confluence/next/packages/adf-renderer/` — integrates this for page view
|
|
111
|
+
- **Jira**: `jira/src/packages/issue/issue-view-synced-block-provider/` — uses
|
|
112
|
+
`useMemoizedSyncedBlockNodeComponent`
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-synced-block-renderer
|
|
2
2
|
|
|
3
|
+
## 6.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`55ea61cf8df26`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55ea61cf8df26) -
|
|
8
|
+
Enable table scaling in bodiedSyncBlock nested editor (behind platform_synced_block_patch_8)
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 6.0.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`5221db0d676ef`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5221db0d676ef) -
|
|
16
|
+
Mechanical type-import autofix for tables, collab, and synchrony packages.
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 6.0.3
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -12,6 +12,7 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
12
12
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
13
|
var _reactIntlNext = require("react-intl-next");
|
|
14
14
|
var _messages = require("@atlaskit/editor-common/messages");
|
|
15
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
16
|
var _renderer = require("@atlaskit/renderer");
|
|
16
17
|
var _actions = require("@atlaskit/renderer/actions");
|
|
17
18
|
var _rendererContext = require("@atlaskit/renderer/renderer-context");
|
|
@@ -133,6 +134,7 @@ var AKRendererWrapper = exports.AKRendererWrapper = /*#__PURE__*/(0, _react.memo
|
|
|
133
134
|
allowSelectAllTrap: allowSelectAllTrap,
|
|
134
135
|
allowUgcScrubber: allowUgcScrubber,
|
|
135
136
|
allowWrapCodeBlock: allowWrapCodeBlock,
|
|
137
|
+
disableTableOverflowShadow: (0, _platformFeatureFlags.fg)('platform_synced_block_patch_8'),
|
|
136
138
|
emojiResourceConfig: emojiResourceConfig,
|
|
137
139
|
eventHandlers: eventHandlers,
|
|
138
140
|
media: media,
|
|
@@ -24,7 +24,9 @@ var SyncedBlockLoadError = exports.SyncedBlockLoadError = function SyncedBlockLo
|
|
|
24
24
|
formatMessage = _useIntl.formatMessage;
|
|
25
25
|
var button = /*#__PURE__*/_react.default.createElement(_new.default, {
|
|
26
26
|
appearance: "default",
|
|
27
|
-
spacing: "compact"
|
|
27
|
+
spacing: "compact"
|
|
28
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
29
|
+
,
|
|
28
30
|
onClick: function onClick(event) {
|
|
29
31
|
event.preventDefault();
|
|
30
32
|
event.stopPropagation();
|
|
@@ -32,6 +32,7 @@ function renderSyncedBlockContent(_ref) {
|
|
|
32
32
|
var isSSRMode = (0, _coreUtils.isSSR)();
|
|
33
33
|
if (isOffline && !isSSRMode) {
|
|
34
34
|
return {
|
|
35
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
35
36
|
element: /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorComponent.SyncedBlockErrorComponent, {
|
|
36
37
|
error: {
|
|
37
38
|
type: _editorSyncedBlockProvider.SyncBlockError.Offline
|
|
@@ -73,7 +74,8 @@ function renderSyncedBlockContent(_ref) {
|
|
|
73
74
|
if ((syncBlockInstance === null || syncBlockInstance === void 0 || (_syncBlockInstance$da2 = syncBlockInstance.data) === null || _syncBlockInstance$da2 === void 0 ? void 0 : _syncBlockInstance$da2.status) === 'unpublished') {
|
|
74
75
|
var _syncBlockInstance$da3;
|
|
75
76
|
return {
|
|
76
|
-
element: /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorComponent.SyncedBlockErrorComponent
|
|
77
|
+
element: /*#__PURE__*/_react.default.createElement(_SyncedBlockErrorComponent.SyncedBlockErrorComponent
|
|
78
|
+
/* eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed) */, {
|
|
77
79
|
error: {
|
|
78
80
|
type: _editorSyncedBlockProvider.SyncBlockError.Unpublished
|
|
79
81
|
},
|
|
@@ -51,7 +51,9 @@ var useMemoizedSyncedBlockNodeComponent = exports.useMemoizedSyncedBlockNodeComp
|
|
|
51
51
|
component: _analytics.ACTION_SUBJECT.SYNCED_BLOCK,
|
|
52
52
|
dispatchAnalyticsEvent: fireAnalyticsEvent,
|
|
53
53
|
fallbackComponent: null
|
|
54
|
-
}, /*#__PURE__*/_react.default.createElement(_syncBlock.SyncBlockActionsProvider
|
|
54
|
+
}, /*#__PURE__*/_react.default.createElement(_syncBlock.SyncBlockActionsProvider
|
|
55
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
56
|
+
, {
|
|
55
57
|
fetchSyncBlockSourceInfo: function fetchSyncBlockSourceInfo(sourceAri) {
|
|
56
58
|
return syncBlockStoreManager.referenceManager.fetchSyncBlockSourceInfoBySourceAri(sourceAri);
|
|
57
59
|
}
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
import React, { memo, useMemo } from 'react';
|
|
3
3
|
import { useIntl } from 'react-intl-next';
|
|
4
4
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
6
|
import { ReactRenderer, ValidationContextProvider, defaultNodeComponents } from '@atlaskit/renderer';
|
|
6
7
|
import { RendererActionsContext } from '@atlaskit/renderer/actions';
|
|
7
8
|
import { RendererContextProvider } from '@atlaskit/renderer/renderer-context';
|
|
@@ -125,6 +126,7 @@ export const AKRendererWrapper = /*#__PURE__*/memo(({
|
|
|
125
126
|
allowSelectAllTrap: allowSelectAllTrap,
|
|
126
127
|
allowUgcScrubber: allowUgcScrubber,
|
|
127
128
|
allowWrapCodeBlock: allowWrapCodeBlock,
|
|
129
|
+
disableTableOverflowShadow: fg('platform_synced_block_patch_8'),
|
|
128
130
|
emojiResourceConfig: emojiResourceConfig,
|
|
129
131
|
eventHandlers: eventHandlers,
|
|
130
132
|
media: media,
|
|
@@ -19,7 +19,9 @@ export const SyncedBlockLoadError = ({
|
|
|
19
19
|
} = useIntl();
|
|
20
20
|
const button = /*#__PURE__*/React.createElement(Button, {
|
|
21
21
|
appearance: "default",
|
|
22
|
-
spacing: "compact"
|
|
22
|
+
spacing: "compact"
|
|
23
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
24
|
+
,
|
|
23
25
|
onClick: event => {
|
|
24
26
|
event.preventDefault();
|
|
25
27
|
event.stopPropagation();
|
|
@@ -26,6 +26,7 @@ export function renderSyncedBlockContent({
|
|
|
26
26
|
const isSSRMode = isSSR();
|
|
27
27
|
if (isOffline && !isSSRMode) {
|
|
28
28
|
return {
|
|
29
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
29
30
|
element: /*#__PURE__*/React.createElement(SyncedBlockErrorComponent, {
|
|
30
31
|
error: {
|
|
31
32
|
type: SyncBlockError.Offline
|
|
@@ -67,7 +68,8 @@ export function renderSyncedBlockContent({
|
|
|
67
68
|
if ((syncBlockInstance === null || syncBlockInstance === void 0 ? void 0 : (_syncBlockInstance$da2 = syncBlockInstance.data) === null || _syncBlockInstance$da2 === void 0 ? void 0 : _syncBlockInstance$da2.status) === 'unpublished') {
|
|
68
69
|
var _syncBlockInstance$da3;
|
|
69
70
|
return {
|
|
70
|
-
element: /*#__PURE__*/React.createElement(SyncedBlockErrorComponent
|
|
71
|
+
element: /*#__PURE__*/React.createElement(SyncedBlockErrorComponent
|
|
72
|
+
/* eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed) */, {
|
|
71
73
|
error: {
|
|
72
74
|
type: SyncBlockError.Unpublished
|
|
73
75
|
},
|
|
@@ -41,7 +41,9 @@ export const useMemoizedSyncedBlockNodeComponent = ({
|
|
|
41
41
|
component: ACTION_SUBJECT.SYNCED_BLOCK,
|
|
42
42
|
dispatchAnalyticsEvent: fireAnalyticsEvent,
|
|
43
43
|
fallbackComponent: null
|
|
44
|
-
}, /*#__PURE__*/React.createElement(SyncBlockActionsProvider
|
|
44
|
+
}, /*#__PURE__*/React.createElement(SyncBlockActionsProvider
|
|
45
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
46
|
+
, {
|
|
45
47
|
fetchSyncBlockSourceInfo: sourceAri => syncBlockStoreManager.referenceManager.fetchSyncBlockSourceInfoBySourceAri(sourceAri)
|
|
46
48
|
}, /*#__PURE__*/React.createElement(SyncedBlockNodeComponentRenderer, {
|
|
47
49
|
key: props.localId,
|
|
@@ -7,6 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
7
7
|
import React, { memo, useMemo } from 'react';
|
|
8
8
|
import { useIntl } from 'react-intl-next';
|
|
9
9
|
import { syncBlockMessages as messages } from '@atlaskit/editor-common/messages';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import { ReactRenderer, ValidationContextProvider, defaultNodeComponents } from '@atlaskit/renderer';
|
|
11
12
|
import { RendererActionsContext } from '@atlaskit/renderer/actions';
|
|
12
13
|
import { RendererContextProvider } from '@atlaskit/renderer/renderer-context';
|
|
@@ -124,6 +125,7 @@ export var AKRendererWrapper = /*#__PURE__*/memo(function (_ref3) {
|
|
|
124
125
|
allowSelectAllTrap: allowSelectAllTrap,
|
|
125
126
|
allowUgcScrubber: allowUgcScrubber,
|
|
126
127
|
allowWrapCodeBlock: allowWrapCodeBlock,
|
|
128
|
+
disableTableOverflowShadow: fg('platform_synced_block_patch_8'),
|
|
127
129
|
emojiResourceConfig: emojiResourceConfig,
|
|
128
130
|
eventHandlers: eventHandlers,
|
|
129
131
|
media: media,
|
|
@@ -17,7 +17,9 @@ export var SyncedBlockLoadError = function SyncedBlockLoadError(_ref) {
|
|
|
17
17
|
formatMessage = _useIntl.formatMessage;
|
|
18
18
|
var button = /*#__PURE__*/React.createElement(Button, {
|
|
19
19
|
appearance: "default",
|
|
20
|
-
spacing: "compact"
|
|
20
|
+
spacing: "compact"
|
|
21
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
22
|
+
,
|
|
21
23
|
onClick: function onClick(event) {
|
|
22
24
|
event.preventDefault();
|
|
23
25
|
event.stopPropagation();
|
|
@@ -25,6 +25,7 @@ export function renderSyncedBlockContent(_ref) {
|
|
|
25
25
|
var isSSRMode = isSSR();
|
|
26
26
|
if (isOffline && !isSSRMode) {
|
|
27
27
|
return {
|
|
28
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
28
29
|
element: /*#__PURE__*/React.createElement(SyncedBlockErrorComponent, {
|
|
29
30
|
error: {
|
|
30
31
|
type: SyncBlockError.Offline
|
|
@@ -66,7 +67,8 @@ export function renderSyncedBlockContent(_ref) {
|
|
|
66
67
|
if ((syncBlockInstance === null || syncBlockInstance === void 0 || (_syncBlockInstance$da2 = syncBlockInstance.data) === null || _syncBlockInstance$da2 === void 0 ? void 0 : _syncBlockInstance$da2.status) === 'unpublished') {
|
|
67
68
|
var _syncBlockInstance$da3;
|
|
68
69
|
return {
|
|
69
|
-
element: /*#__PURE__*/React.createElement(SyncedBlockErrorComponent
|
|
70
|
+
element: /*#__PURE__*/React.createElement(SyncedBlockErrorComponent
|
|
71
|
+
/* eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed) */, {
|
|
70
72
|
error: {
|
|
71
73
|
type: SyncBlockError.Unpublished
|
|
72
74
|
},
|
|
@@ -43,7 +43,9 @@ export var useMemoizedSyncedBlockNodeComponent = function useMemoizedSyncedBlock
|
|
|
43
43
|
component: ACTION_SUBJECT.SYNCED_BLOCK,
|
|
44
44
|
dispatchAnalyticsEvent: fireAnalyticsEvent,
|
|
45
45
|
fallbackComponent: null
|
|
46
|
-
}, /*#__PURE__*/React.createElement(SyncBlockActionsProvider
|
|
46
|
+
}, /*#__PURE__*/React.createElement(SyncBlockActionsProvider
|
|
47
|
+
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
48
|
+
, {
|
|
47
49
|
fetchSyncBlockSourceInfo: function fetchSyncBlockSourceInfo(sourceAri) {
|
|
48
50
|
return syncBlockStoreManager.referenceManager.fetchSyncBlockSourceInfoBySourceAri(sourceAri);
|
|
49
51
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RendererProps } from '@atlaskit/renderer';
|
|
2
2
|
export type SyncedBlockRendererOptions = Pick<RendererProps, 'appearance' | 'allowAltTextOnImages' | 'allowAnnotations' | 'allowColumnSorting' | 'allowCopyToClipboard' | 'allowCustomPanels' | 'allowHeadingAnchorLinks' | 'allowPlaceholderText' | 'allowRendererContainerStyles' | 'allowSelectAllTrap' | 'allowUgcScrubber' | 'allowWrapCodeBlock' | 'emojiResourceConfig' | 'eventHandlers' | 'media' | 'smartLinks' | 'stickyHeaders' | 'contentMode'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import {
|
|
3
|
+
import type { SyncBlockInstance } from '@atlaskit/editor-synced-block-provider';
|
|
4
4
|
export declare const SyncedBlockErrorComponent: ({ error, isLoading, onRetry, resourceId, fireAnalyticsEvent, sourceURL, }: {
|
|
5
5
|
error: SyncBlockInstance["error"];
|
|
6
6
|
fireAnalyticsEvent?: (payload: RendererSyncBlockEventPayload) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
3
|
-
import {
|
|
3
|
+
import type { NodeProps } from '@atlaskit/renderer';
|
|
4
4
|
import type { SyncedBlockRendererOptions } from '../types';
|
|
5
5
|
export interface SyncedBlockProps {
|
|
6
6
|
localId?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { SyncBlockProduct } from '@atlaskit/editor-synced-block-provider';
|
|
3
3
|
export interface SyncedBlockPermissionDeniedProps {
|
|
4
4
|
sourceContentId: string;
|
|
5
5
|
sourceProduct: SyncBlockProduct;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { SyncedBlockPlugin } from '@atlaskit/editor-plugin-synced-block';
|
|
4
|
-
import {
|
|
4
|
+
import type { UseFetchSyncBlockDataResult } from '@atlaskit/editor-synced-block-provider';
|
|
5
5
|
import type { SyncedBlockRendererOptions } from '../types';
|
|
6
6
|
export type SyncedBlockRendererProps = {
|
|
7
7
|
api?: ExtractInjectionAPI<SyncedBlockPlugin>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
|
-
import {
|
|
4
|
+
import type { SyncBlockInstance } from '@atlaskit/editor-synced-block-provider';
|
|
5
5
|
import type { SyncedBlockRendererOptions } from '../types';
|
|
6
6
|
export type RenderSyncedBlockContentParams = {
|
|
7
7
|
error?: SyncBlockInstance['error'];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DocNode } from '@atlaskit/adf-schema';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import type { SyncBlockNode, SyncedBlockProvider, SyncBlockPrefetchData } from '@atlaskit/editor-synced-block-provider';
|
|
5
5
|
import type { SyncedBlockRendererOptions } from './types';
|
|
6
|
-
import {
|
|
6
|
+
import type { SyncedBlockNodeProps } from './ui/SyncedBlockNodeComponentRenderer';
|
|
7
7
|
export type GetSyncedBlockNodeComponentProps = {
|
|
8
8
|
fireAnalyticsEvent?: (payload: AnalyticsEventPayload) => void;
|
|
9
9
|
getPrefetchedData?: () => SyncBlockPrefetchData | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { RendererProps } from '@atlaskit/renderer';
|
|
2
2
|
export type SyncedBlockRendererOptions = Pick<RendererProps, 'appearance' | 'allowAltTextOnImages' | 'allowAnnotations' | 'allowColumnSorting' | 'allowCopyToClipboard' | 'allowCustomPanels' | 'allowHeadingAnchorLinks' | 'allowPlaceholderText' | 'allowRendererContainerStyles' | 'allowSelectAllTrap' | 'allowUgcScrubber' | 'allowWrapCodeBlock' | 'emojiResourceConfig' | 'eventHandlers' | 'media' | 'smartLinks' | 'stickyHeaders' | 'contentMode'>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import {
|
|
3
|
+
import type { SyncBlockInstance } from '@atlaskit/editor-synced-block-provider';
|
|
4
4
|
export declare const SyncedBlockErrorComponent: ({ error, isLoading, onRetry, resourceId, fireAnalyticsEvent, sourceURL, }: {
|
|
5
5
|
error: SyncBlockInstance["error"];
|
|
6
6
|
fireAnalyticsEvent?: (payload: RendererSyncBlockEventPayload) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SyncBlockStoreManager } from '@atlaskit/editor-synced-block-provider';
|
|
3
|
-
import {
|
|
3
|
+
import type { NodeProps } from '@atlaskit/renderer';
|
|
4
4
|
import type { SyncedBlockRendererOptions } from '../types';
|
|
5
5
|
export interface SyncedBlockProps {
|
|
6
6
|
localId?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { SyncBlockProduct } from '@atlaskit/editor-synced-block-provider';
|
|
3
3
|
export interface SyncedBlockPermissionDeniedProps {
|
|
4
4
|
sourceContentId: string;
|
|
5
5
|
sourceProduct: SyncBlockProduct;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
3
3
|
import type { SyncedBlockPlugin } from '@atlaskit/editor-plugin-synced-block';
|
|
4
|
-
import {
|
|
4
|
+
import type { UseFetchSyncBlockDataResult } from '@atlaskit/editor-synced-block-provider';
|
|
5
5
|
import type { SyncedBlockRendererOptions } from '../types';
|
|
6
6
|
export type SyncedBlockRendererProps = {
|
|
7
7
|
api?: ExtractInjectionAPI<SyncedBlockPlugin>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
3
3
|
import type { ProviderFactory } from '@atlaskit/editor-common/provider-factory';
|
|
4
|
-
import {
|
|
4
|
+
import type { SyncBlockInstance } from '@atlaskit/editor-synced-block-provider';
|
|
5
5
|
import type { SyncedBlockRendererOptions } from '../types';
|
|
6
6
|
export type RenderSyncedBlockContentParams = {
|
|
7
7
|
error?: SyncBlockInstance['error'];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { DocNode } from '@atlaskit/adf-schema';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import type { AnalyticsEventPayload } from '@atlaskit/editor-common/analytics';
|
|
4
|
+
import type { SyncBlockNode, SyncedBlockProvider, SyncBlockPrefetchData } from '@atlaskit/editor-synced-block-provider';
|
|
5
5
|
import type { SyncedBlockRendererOptions } from './types';
|
|
6
|
-
import {
|
|
6
|
+
import type { SyncedBlockNodeProps } from './ui/SyncedBlockNodeComponentRenderer';
|
|
7
7
|
export type GetSyncedBlockNodeComponentProps = {
|
|
8
8
|
fireAnalyticsEvent?: (payload: AnalyticsEventPayload) => void;
|
|
9
9
|
getPrefetchedData?: () => SyncBlockPrefetchData | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-synced-block-renderer",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.5",
|
|
4
4
|
"description": "SyncedBlockRenderer for @atlaskit/editor-plugin-synced-block",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,16 +31,16 @@
|
|
|
31
31
|
"@atlaskit/button": "^23.10.0",
|
|
32
32
|
"@atlaskit/css": "^0.19.0",
|
|
33
33
|
"@atlaskit/editor-plugin-synced-block": "^6.0.0",
|
|
34
|
-
"@atlaskit/editor-synced-block-provider": "^4.
|
|
34
|
+
"@atlaskit/editor-synced-block-provider": "^4.2.0",
|
|
35
35
|
"@atlaskit/heading": "^5.3.0",
|
|
36
|
-
"@atlaskit/icon": "^33.
|
|
37
|
-
"@atlaskit/icon-lab": "^6.
|
|
36
|
+
"@atlaskit/icon": "^33.1.0",
|
|
37
|
+
"@atlaskit/icon-lab": "^6.2.0",
|
|
38
38
|
"@atlaskit/image": "^3.0.0",
|
|
39
39
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
40
|
-
"@atlaskit/primitives": "^18.
|
|
41
|
-
"@atlaskit/renderer": "^128.
|
|
40
|
+
"@atlaskit/primitives": "^18.1.0",
|
|
41
|
+
"@atlaskit/renderer": "^128.6.0",
|
|
42
42
|
"@atlaskit/spinner": "^19.0.0",
|
|
43
|
-
"@atlaskit/tokens": "^11.
|
|
43
|
+
"@atlaskit/tokens": "^11.4.0",
|
|
44
44
|
"@atlaskit/tooltip": "^21.0.0",
|
|
45
45
|
"@babel/runtime": "^7.0.0",
|
|
46
46
|
"@compiled/react": "^0.20.0",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"relay-runtime": "npm:atl-relay-runtime@0.0.0-main-39e79f66"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@atlaskit/editor-common": "^112.
|
|
51
|
+
"@atlaskit/editor-common": "^112.13.0",
|
|
52
52
|
"react": "^18.2.0",
|
|
53
53
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
54
54
|
},
|
|
@@ -88,5 +88,9 @@
|
|
|
88
88
|
]
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
|
-
"platform-feature-flags": {
|
|
91
|
+
"platform-feature-flags": {
|
|
92
|
+
"platform_synced_block_patch_8": {
|
|
93
|
+
"type": "boolean"
|
|
94
|
+
}
|
|
95
|
+
}
|
|
92
96
|
}
|