@datocms/astro 0.4.0 → 0.4.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/package.json
CHANGED
|
@@ -10,13 +10,7 @@ import {
|
|
|
10
10
|
} from 'datocms-structured-text-utils';
|
|
11
11
|
|
|
12
12
|
import Node from './Node.astro';
|
|
13
|
-
import type {
|
|
14
|
-
BlockComponents,
|
|
15
|
-
InlineRecordComponents,
|
|
16
|
-
LinkToRecordComponents,
|
|
17
|
-
NodeOverrides,
|
|
18
|
-
MarkOverrides,
|
|
19
|
-
} from './types';
|
|
13
|
+
import type { NodeOverrides, MarkOverrides, AstroComponent } from './types';
|
|
20
14
|
|
|
21
15
|
// It would be better to type this as a generic:
|
|
22
16
|
//
|
|
@@ -31,11 +25,11 @@ interface Props {
|
|
|
31
25
|
data: StructuredText<DatocmsRecord, DatocmsRecord> | Document | DastNode | null | undefined;
|
|
32
26
|
|
|
33
27
|
/** An object in which the keys are the `__typename` of the blocks to be rendered, and the values are the Astro components */
|
|
34
|
-
blockComponents?:
|
|
28
|
+
blockComponents?: Record<string, AstroComponent>;
|
|
35
29
|
/** An object in which the keys are the `__typename` of the records to be rendered, and the values are the Astro components */
|
|
36
|
-
linkToRecordComponents?:
|
|
30
|
+
linkToRecordComponents?: Record<string, AstroComponent>;
|
|
37
31
|
/** An object in which the keys are the `__typename` of the records to be rendered, and the values are the Astro components */
|
|
38
|
-
inlineRecordComponents?:
|
|
32
|
+
inlineRecordComponents?: Record<string, AstroComponent>;
|
|
39
33
|
|
|
40
34
|
/** An object in which the keys are the types of DAST nodes to override, and the values are the Astro components */
|
|
41
35
|
nodeOverrides?: NodeOverrides;
|