@atlaskit/editor-synced-block-provider 4.3.1 → 4.3.3
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 +33 -73
- package/CHANGELOG.md +21 -0
- package/dist/cjs/store-manager/referenceSyncBlockStoreManager.js +45 -37
- package/dist/cjs/store-manager/sourceSyncBlockStoreManager.js +86 -40
- package/dist/cjs/store-manager/syncBlockStoreManager.js +125 -116
- package/dist/es2019/store-manager/referenceSyncBlockStoreManager.js +6 -1
- package/dist/es2019/store-manager/sourceSyncBlockStoreManager.js +36 -2
- package/dist/es2019/store-manager/syncBlockStoreManager.js +91 -91
- package/dist/esm/store-manager/referenceSyncBlockStoreManager.js +45 -37
- package/dist/esm/store-manager/sourceSyncBlockStoreManager.js +86 -40
- package/dist/esm/store-manager/syncBlockStoreManager.js +125 -116
- package/dist/types/store-manager/referenceSyncBlockStoreManager.d.ts +3 -1
- package/dist/types/store-manager/sourceSyncBlockStoreManager.d.ts +6 -2
- package/dist/types/store-manager/syncBlockStoreManager.d.ts +3 -1
- package/dist/types-ts4.5/store-manager/referenceSyncBlockStoreManager.d.ts +3 -1
- package/dist/types-ts4.5/store-manager/sourceSyncBlockStoreManager.d.ts +6 -2
- package/dist/types-ts4.5/store-manager/syncBlockStoreManager.d.ts +3 -1
- package/package.json +3 -3
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import type { ViewMode } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
2
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
4
|
import type { ResourceId, SyncBlockAttrs, BlockInstanceId, DeletionReason, ReferenceSyncBlockData } from '../common/types';
|
|
4
5
|
import type { SyncBlockDataProviderInterface, SyncBlockSourceInfo } from '../providers/types';
|
|
@@ -7,6 +8,7 @@ type OnDelete = () => void;
|
|
|
7
8
|
type OnCompletion = (success: boolean) => void;
|
|
8
9
|
type DestroyCallback = () => void;
|
|
9
10
|
export declare class SourceSyncBlockStoreManager {
|
|
11
|
+
private viewMode?;
|
|
10
12
|
private dataProvider?;
|
|
11
13
|
private fireAnalyticsEvent?;
|
|
12
14
|
private syncBlockCache;
|
|
@@ -19,7 +21,7 @@ export declare class SourceSyncBlockStoreManager {
|
|
|
19
21
|
private saveExperience;
|
|
20
22
|
private deleteExperience;
|
|
21
23
|
private fetchSourceInfoExperience;
|
|
22
|
-
constructor(dataProvider?: SyncBlockDataProviderInterface);
|
|
24
|
+
constructor(dataProvider?: SyncBlockDataProviderInterface, viewMode?: ViewMode);
|
|
23
25
|
/**
|
|
24
26
|
* Register a callback to be invoked after flush() completes.
|
|
25
27
|
* Used by the pm-plugin to dispatch a transaction so that
|
|
@@ -55,8 +57,10 @@ export declare class SourceSyncBlockStoreManager {
|
|
|
55
57
|
/**
|
|
56
58
|
* Create a bodiedSyncBlock node with empty content to backend
|
|
57
59
|
* @param attrs attributes Ids of the node
|
|
60
|
+
* @param node the ProseMirror node to cache
|
|
61
|
+
* @param onCompletion callback invoked when creation completes
|
|
58
62
|
*/
|
|
59
|
-
createBodiedSyncBlockNode(attrs: SyncBlockAttrs, onCompletion: OnCompletion): void;
|
|
63
|
+
createBodiedSyncBlockNode(attrs: SyncBlockAttrs, node: PMNode, onCompletion: OnCompletion): void;
|
|
60
64
|
private setPendingDeletion;
|
|
61
65
|
private delete;
|
|
62
66
|
isRetryingDeletion(): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import type { ViewMode } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
2
3
|
import type { BlockInstanceId, ReferencesSourceInfo, ResourceId } from '../common/types';
|
|
3
4
|
import type { SyncBlockDataProviderInterface } from '../providers/types';
|
|
4
5
|
import { ReferenceSyncBlockStoreManager } from './referenceSyncBlockStoreManager';
|
|
@@ -10,11 +11,12 @@ export declare class SyncBlockStoreManager {
|
|
|
10
11
|
private fireAnalyticsEvent?;
|
|
11
12
|
private fetchReferencesExperience;
|
|
12
13
|
private fetchSourceInfoExperience;
|
|
13
|
-
constructor(dataProvider?: SyncBlockDataProviderInterface);
|
|
14
|
+
constructor(dataProvider?: SyncBlockDataProviderInterface, viewMode?: ViewMode);
|
|
14
15
|
fetchReferencesSourceInfo(resourceId: ResourceId, blockInstanceId: BlockInstanceId, isSourceSyncBlock: boolean): Promise<ReferencesSourceInfo>;
|
|
15
16
|
setFireAnalyticsEvent(fireAnalyticsEvent?: (payload: SyncBlockEventPayload) => void): void;
|
|
16
17
|
get referenceManager(): ReferenceSyncBlockStoreManager;
|
|
17
18
|
get sourceManager(): SourceSyncBlockStoreManager;
|
|
18
19
|
destroy(): void;
|
|
20
|
+
private getUnregisteredReferences;
|
|
19
21
|
}
|
|
20
22
|
export declare const useMemoizedSyncBlockStoreManager: (dataProvider?: SyncBlockDataProviderInterface, fireAnalyticsEvent?: (payload: SyncBlockEventPayload) => void) => SyncBlockStoreManager;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { RendererSyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
2
|
import type { Experience } from '@atlaskit/editor-common/experiences';
|
|
3
3
|
import type { ProviderFactory, MediaProvider } from '@atlaskit/editor-common/provider-factory';
|
|
4
|
+
import type { ViewMode } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
4
5
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
6
|
import type { BlockInstanceId, ResourceId, SyncBlockNode, SyncBlockPrefetchData } from '../common/types';
|
|
6
7
|
import type { SyncBlockInstance, SubscriptionCallback, SyncBlockDataProviderInterface, TitleSubscriptionCallback, SyncBlockSourceInfo } from '../providers/types';
|
|
7
8
|
export declare class ReferenceSyncBlockStoreManager {
|
|
9
|
+
private viewMode?;
|
|
8
10
|
private dataProvider?;
|
|
9
11
|
private isCacheDirty;
|
|
10
12
|
private fireAnalyticsEvent?;
|
|
@@ -22,7 +24,7 @@ export declare class ReferenceSyncBlockStoreManager {
|
|
|
22
24
|
private _subscriptionManager;
|
|
23
25
|
private _providerFactoryManager;
|
|
24
26
|
private _batchFetcher;
|
|
25
|
-
constructor(dataProvider?: SyncBlockDataProviderInterface);
|
|
27
|
+
constructor(dataProvider?: SyncBlockDataProviderInterface, viewMode?: ViewMode);
|
|
26
28
|
/**
|
|
27
29
|
* Enables or disables real-time GraphQL subscriptions for block updates.
|
|
28
30
|
* When enabled, the store manager will subscribe to real-time updates
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import type { ViewMode } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
2
3
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
3
4
|
import type { ResourceId, SyncBlockAttrs, BlockInstanceId, DeletionReason, ReferenceSyncBlockData } from '../common/types';
|
|
4
5
|
import type { SyncBlockDataProviderInterface, SyncBlockSourceInfo } from '../providers/types';
|
|
@@ -7,6 +8,7 @@ type OnDelete = () => void;
|
|
|
7
8
|
type OnCompletion = (success: boolean) => void;
|
|
8
9
|
type DestroyCallback = () => void;
|
|
9
10
|
export declare class SourceSyncBlockStoreManager {
|
|
11
|
+
private viewMode?;
|
|
10
12
|
private dataProvider?;
|
|
11
13
|
private fireAnalyticsEvent?;
|
|
12
14
|
private syncBlockCache;
|
|
@@ -19,7 +21,7 @@ export declare class SourceSyncBlockStoreManager {
|
|
|
19
21
|
private saveExperience;
|
|
20
22
|
private deleteExperience;
|
|
21
23
|
private fetchSourceInfoExperience;
|
|
22
|
-
constructor(dataProvider?: SyncBlockDataProviderInterface);
|
|
24
|
+
constructor(dataProvider?: SyncBlockDataProviderInterface, viewMode?: ViewMode);
|
|
23
25
|
/**
|
|
24
26
|
* Register a callback to be invoked after flush() completes.
|
|
25
27
|
* Used by the pm-plugin to dispatch a transaction so that
|
|
@@ -55,8 +57,10 @@ export declare class SourceSyncBlockStoreManager {
|
|
|
55
57
|
/**
|
|
56
58
|
* Create a bodiedSyncBlock node with empty content to backend
|
|
57
59
|
* @param attrs attributes Ids of the node
|
|
60
|
+
* @param node the ProseMirror node to cache
|
|
61
|
+
* @param onCompletion callback invoked when creation completes
|
|
58
62
|
*/
|
|
59
|
-
createBodiedSyncBlockNode(attrs: SyncBlockAttrs, onCompletion: OnCompletion): void;
|
|
63
|
+
createBodiedSyncBlockNode(attrs: SyncBlockAttrs, node: PMNode, onCompletion: OnCompletion): void;
|
|
60
64
|
private setPendingDeletion;
|
|
61
65
|
private delete;
|
|
62
66
|
isRetryingDeletion(): boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { SyncBlockEventPayload } from '@atlaskit/editor-common/analytics';
|
|
2
|
+
import type { ViewMode } from '@atlaskit/editor-plugin-editor-viewmode';
|
|
2
3
|
import type { BlockInstanceId, ReferencesSourceInfo, ResourceId } from '../common/types';
|
|
3
4
|
import type { SyncBlockDataProviderInterface } from '../providers/types';
|
|
4
5
|
import { ReferenceSyncBlockStoreManager } from './referenceSyncBlockStoreManager';
|
|
@@ -10,11 +11,12 @@ export declare class SyncBlockStoreManager {
|
|
|
10
11
|
private fireAnalyticsEvent?;
|
|
11
12
|
private fetchReferencesExperience;
|
|
12
13
|
private fetchSourceInfoExperience;
|
|
13
|
-
constructor(dataProvider?: SyncBlockDataProviderInterface);
|
|
14
|
+
constructor(dataProvider?: SyncBlockDataProviderInterface, viewMode?: ViewMode);
|
|
14
15
|
fetchReferencesSourceInfo(resourceId: ResourceId, blockInstanceId: BlockInstanceId, isSourceSyncBlock: boolean): Promise<ReferencesSourceInfo>;
|
|
15
16
|
setFireAnalyticsEvent(fireAnalyticsEvent?: (payload: SyncBlockEventPayload) => void): void;
|
|
16
17
|
get referenceManager(): ReferenceSyncBlockStoreManager;
|
|
17
18
|
get sourceManager(): SourceSyncBlockStoreManager;
|
|
18
19
|
destroy(): void;
|
|
20
|
+
private getUnregisteredReferences;
|
|
19
21
|
}
|
|
20
22
|
export declare const useMemoizedSyncBlockStoreManager: (dataProvider?: SyncBlockDataProviderInterface, fireAnalyticsEvent?: (payload: SyncBlockEventPayload) => void) => SyncBlockStoreManager;
|
package/package.json
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"@atlaskit/editor-prosemirror": "^7.3.0",
|
|
30
30
|
"@atlaskit/node-data-provider": "^9.0.0",
|
|
31
31
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
32
|
-
"@atlaskit/tmp-editor-statsig": "^54.
|
|
32
|
+
"@atlaskit/tmp-editor-statsig": "^54.4.0",
|
|
33
33
|
"@babel/runtime": "^7.0.0",
|
|
34
34
|
"@compiled/react": "^0.20.0",
|
|
35
35
|
"graphql-ws": "^5.14.2",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"uuid": "^3.1.0"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
|
-
"@atlaskit/editor-common": "^112.
|
|
41
|
+
"@atlaskit/editor-common": "^112.18.0",
|
|
42
42
|
"react": "^18.2.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"name": "@atlaskit/editor-synced-block-provider",
|
|
84
|
-
"version": "4.3.
|
|
84
|
+
"version": "4.3.3",
|
|
85
85
|
"description": "Synced Block Provider for @atlaskit/editor-plugin-synced-block",
|
|
86
86
|
"author": "Atlassian Pty Ltd",
|
|
87
87
|
"license": "Apache-2.0",
|