@atlaskit/node-data-provider 4.5.1 → 4.5.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/CHANGELOG.md +16 -0
- package/dist/types/node-data-provider.d.ts +1 -1
- package/dist/types/utils/find-nodes-to-prefetch.d.ts +3 -3
- package/dist/types/utils/prefetch-node-data-providers-data.d.ts +12 -12
- package/dist/types-ts4.5/node-data-provider.d.ts +1 -1
- package/dist/types-ts4.5/utils/find-nodes-to-prefetch.d.ts +3 -3
- package/dist/types-ts4.5/utils/prefetch-node-data-providers-data.d.ts +12 -12
- package/package.json +5 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/node-data-provider
|
|
2
2
|
|
|
3
|
+
## 4.5.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`0fdcb6f2f96fd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0fdcb6f2f96fd) -
|
|
8
|
+
Sorted type and interface props to improve Atlaskit docs
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 4.5.2
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`57b19274b9fdd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/57b19274b9fdd) -
|
|
16
|
+
EDITOR-1373 Bump adf-schema version
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 4.5.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -18,9 +18,9 @@ type SSRData<Data> = {
|
|
|
18
18
|
* It can either contain an error or the fetched data.
|
|
19
19
|
*/
|
|
20
20
|
type CallbackPayload<Data> = {
|
|
21
|
+
data?: undefined;
|
|
21
22
|
/** An error that occurred while fetching data. */
|
|
22
23
|
error: Error;
|
|
23
|
-
data?: undefined;
|
|
24
24
|
} | {
|
|
25
25
|
/** Fetched data for the node. */
|
|
26
26
|
data: Data;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { JSONDocNode, JSONNode } from '@atlaskit/editor-json-transformer';
|
|
2
2
|
import type { NodeDataProvider } from '../node-data-provider';
|
|
3
3
|
interface ProviderWithNodes {
|
|
4
|
-
/** The provider that supports the nodes. */
|
|
5
|
-
provider: NodeDataProvider<JSONNode, unknown>;
|
|
6
4
|
/** The nodes that are supported by the provider. */
|
|
7
5
|
nodes: JSONNode[];
|
|
6
|
+
/** The provider that supports the nodes. */
|
|
7
|
+
provider: NodeDataProvider<JSONNode, unknown>;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Finds nodes in the document that are supported by the given providers, up to a maximum number of nodes.
|
|
@@ -15,7 +15,7 @@ interface ProviderWithNodes {
|
|
|
15
15
|
* @returns An array of objects, each containing a provider and the nodes that are supported by that provider.
|
|
16
16
|
*/
|
|
17
17
|
export declare function findNodesToPrefetch(doc: JSONDocNode, providers: {
|
|
18
|
-
provider: NodeDataProvider<JSONNode, unknown>;
|
|
19
18
|
maxNodesToPrefetch: number;
|
|
19
|
+
provider: NodeDataProvider<JSONNode, unknown>;
|
|
20
20
|
}[], maxNodesToVisit: number): ProviderWithNodes[];
|
|
21
21
|
export {};
|
|
@@ -40,9 +40,9 @@ type SsrData = {
|
|
|
40
40
|
*/
|
|
41
41
|
type NodeDataProvidersSsrData = {
|
|
42
42
|
[providerName: string]: {
|
|
43
|
-
success: boolean;
|
|
44
|
-
duration: number;
|
|
45
43
|
data: SsrData;
|
|
44
|
+
duration: number;
|
|
45
|
+
success: boolean;
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
48
|
interface Props {
|
|
@@ -50,12 +50,6 @@ interface Props {
|
|
|
50
50
|
* The document for which to prefetch data.
|
|
51
51
|
*/
|
|
52
52
|
doc: JSONDocNode;
|
|
53
|
-
/**
|
|
54
|
-
* A global timeout in milliseconds for all fetch requests.
|
|
55
|
-
*
|
|
56
|
-
* Each provider will use the minimum of this value and its own specific timeout.
|
|
57
|
-
*/
|
|
58
|
-
timeout: number;
|
|
59
53
|
/**
|
|
60
54
|
* The maximum number of nodes to visit when searching for nodes to prefetch.
|
|
61
55
|
* This is a performance safeguard for very large documents.
|
|
@@ -68,10 +62,6 @@ interface Props {
|
|
|
68
62
|
* individual configurations.
|
|
69
63
|
*/
|
|
70
64
|
providers: {
|
|
71
|
-
/**
|
|
72
|
-
* The provider instance to use for prefetching.
|
|
73
|
-
*/
|
|
74
|
-
provider: NodeDataProvider<JSONNode, unknown>;
|
|
75
65
|
/**
|
|
76
66
|
* The maximum number of nodes to prefetch for this specific provider.
|
|
77
67
|
* This helps prevent performance issues with documents containing many
|
|
@@ -80,6 +70,10 @@ interface Props {
|
|
|
80
70
|
* @default If not specified, all nodes supported by the provider will be prefetched.
|
|
81
71
|
*/
|
|
82
72
|
maxNodesToPrefetch?: number;
|
|
73
|
+
/**
|
|
74
|
+
* The provider instance to use for prefetching.
|
|
75
|
+
*/
|
|
76
|
+
provider: NodeDataProvider<JSONNode, unknown>;
|
|
83
77
|
/**
|
|
84
78
|
* The timeout in milliseconds for the fetch request for this specific provider.
|
|
85
79
|
* If the request takes longer than this, it will be aborted and return no data.
|
|
@@ -88,6 +82,12 @@ interface Props {
|
|
|
88
82
|
*/
|
|
89
83
|
timeout?: number;
|
|
90
84
|
}[];
|
|
85
|
+
/**
|
|
86
|
+
* A global timeout in milliseconds for all fetch requests.
|
|
87
|
+
*
|
|
88
|
+
* Each provider will use the minimum of this value and its own specific timeout.
|
|
89
|
+
*/
|
|
90
|
+
timeout: number;
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
93
|
* Fetches data for nodes in the document that are supported by the given providers.
|
|
@@ -18,9 +18,9 @@ type SSRData<Data> = {
|
|
|
18
18
|
* It can either contain an error or the fetched data.
|
|
19
19
|
*/
|
|
20
20
|
type CallbackPayload<Data> = {
|
|
21
|
+
data?: undefined;
|
|
21
22
|
/** An error that occurred while fetching data. */
|
|
22
23
|
error: Error;
|
|
23
|
-
data?: undefined;
|
|
24
24
|
} | {
|
|
25
25
|
/** Fetched data for the node. */
|
|
26
26
|
data: Data;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { JSONDocNode, JSONNode } from '@atlaskit/editor-json-transformer';
|
|
2
2
|
import type { NodeDataProvider } from '../node-data-provider';
|
|
3
3
|
interface ProviderWithNodes {
|
|
4
|
-
/** The provider that supports the nodes. */
|
|
5
|
-
provider: NodeDataProvider<JSONNode, unknown>;
|
|
6
4
|
/** The nodes that are supported by the provider. */
|
|
7
5
|
nodes: JSONNode[];
|
|
6
|
+
/** The provider that supports the nodes. */
|
|
7
|
+
provider: NodeDataProvider<JSONNode, unknown>;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
10
|
* Finds nodes in the document that are supported by the given providers, up to a maximum number of nodes.
|
|
@@ -15,7 +15,7 @@ interface ProviderWithNodes {
|
|
|
15
15
|
* @returns An array of objects, each containing a provider and the nodes that are supported by that provider.
|
|
16
16
|
*/
|
|
17
17
|
export declare function findNodesToPrefetch(doc: JSONDocNode, providers: {
|
|
18
|
-
provider: NodeDataProvider<JSONNode, unknown>;
|
|
19
18
|
maxNodesToPrefetch: number;
|
|
19
|
+
provider: NodeDataProvider<JSONNode, unknown>;
|
|
20
20
|
}[], maxNodesToVisit: number): ProviderWithNodes[];
|
|
21
21
|
export {};
|
|
@@ -40,9 +40,9 @@ type SsrData = {
|
|
|
40
40
|
*/
|
|
41
41
|
type NodeDataProvidersSsrData = {
|
|
42
42
|
[providerName: string]: {
|
|
43
|
-
success: boolean;
|
|
44
|
-
duration: number;
|
|
45
43
|
data: SsrData;
|
|
44
|
+
duration: number;
|
|
45
|
+
success: boolean;
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
48
|
interface Props {
|
|
@@ -50,12 +50,6 @@ interface Props {
|
|
|
50
50
|
* The document for which to prefetch data.
|
|
51
51
|
*/
|
|
52
52
|
doc: JSONDocNode;
|
|
53
|
-
/**
|
|
54
|
-
* A global timeout in milliseconds for all fetch requests.
|
|
55
|
-
*
|
|
56
|
-
* Each provider will use the minimum of this value and its own specific timeout.
|
|
57
|
-
*/
|
|
58
|
-
timeout: number;
|
|
59
53
|
/**
|
|
60
54
|
* The maximum number of nodes to visit when searching for nodes to prefetch.
|
|
61
55
|
* This is a performance safeguard for very large documents.
|
|
@@ -68,10 +62,6 @@ interface Props {
|
|
|
68
62
|
* individual configurations.
|
|
69
63
|
*/
|
|
70
64
|
providers: {
|
|
71
|
-
/**
|
|
72
|
-
* The provider instance to use for prefetching.
|
|
73
|
-
*/
|
|
74
|
-
provider: NodeDataProvider<JSONNode, unknown>;
|
|
75
65
|
/**
|
|
76
66
|
* The maximum number of nodes to prefetch for this specific provider.
|
|
77
67
|
* This helps prevent performance issues with documents containing many
|
|
@@ -80,6 +70,10 @@ interface Props {
|
|
|
80
70
|
* @default If not specified, all nodes supported by the provider will be prefetched.
|
|
81
71
|
*/
|
|
82
72
|
maxNodesToPrefetch?: number;
|
|
73
|
+
/**
|
|
74
|
+
* The provider instance to use for prefetching.
|
|
75
|
+
*/
|
|
76
|
+
provider: NodeDataProvider<JSONNode, unknown>;
|
|
83
77
|
/**
|
|
84
78
|
* The timeout in milliseconds for the fetch request for this specific provider.
|
|
85
79
|
* If the request takes longer than this, it will be aborted and return no data.
|
|
@@ -88,6 +82,12 @@ interface Props {
|
|
|
88
82
|
*/
|
|
89
83
|
timeout?: number;
|
|
90
84
|
}[];
|
|
85
|
+
/**
|
|
86
|
+
* A global timeout in milliseconds for all fetch requests.
|
|
87
|
+
*
|
|
88
|
+
* Each provider will use the minimum of this value and its own specific timeout.
|
|
89
|
+
*/
|
|
90
|
+
timeout: number;
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
93
|
* Fetches data for nodes in the document that are supported by the given providers.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/node-data-provider",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.3",
|
|
4
4
|
"description": "Node data provider for @atlaskit/editor-core plugins and @atlaskit/renderer",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,17 +22,14 @@
|
|
|
22
22
|
".": "./src/index.ts"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@atlaskit/adf-schema": "^50.2.
|
|
26
|
-
"@atlaskit/adf-utils": "^19.
|
|
27
|
-
"@atlaskit/editor-json-transformer": "^8.
|
|
25
|
+
"@atlaskit/adf-schema": "^50.2.1",
|
|
26
|
+
"@atlaskit/adf-utils": "^19.21.0",
|
|
27
|
+
"@atlaskit/editor-json-transformer": "^8.27.0",
|
|
28
28
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
29
29
|
"@babel/runtime": "^7.0.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"@atlaskit/editor-common": "^107.
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"typescript": "~5.4.2"
|
|
32
|
+
"@atlaskit/editor-common": "^107.29.0"
|
|
36
33
|
},
|
|
37
34
|
"techstack": {
|
|
38
35
|
"@atlassian/frontend": {
|