@portabletext/block-tools 1.1.38 → 2.0.0
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/lib/index.d.cts +82 -115
- package/lib/index.d.ts +82 -115
- package/package.json +6 -6
package/lib/index.d.cts
CHANGED
|
@@ -1,121 +1,102 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
I18nTitledListValue,
|
|
4
|
-
ObjectSchemaType,
|
|
5
|
-
SpanSchemaType,
|
|
6
|
-
TitledListValue,
|
|
7
|
-
} from '@sanity/types'
|
|
8
|
-
import {PortableTextSpan, PortableTextTextBlock} from '@sanity/types'
|
|
9
|
-
import type {ComponentType} from 'react'
|
|
10
|
-
|
|
1
|
+
import { ArraySchemaType, I18nTitledListValue, ObjectSchemaType, PortableTextSpan, PortableTextTextBlock, SpanSchemaType, TitledListValue } from "@sanity/types";
|
|
2
|
+
import { ComponentType } from "react";
|
|
11
3
|
/**
|
|
12
4
|
* @public
|
|
13
5
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
interface BlockContentFeatures {
|
|
7
|
+
styles: TitledListValue<string>[];
|
|
8
|
+
decorators: TitledListValue<string>[];
|
|
9
|
+
annotations: ResolvedAnnotationType[];
|
|
10
|
+
lists: I18nTitledListValue<string>[];
|
|
11
|
+
types: {
|
|
12
|
+
block: ArraySchemaType;
|
|
13
|
+
span: SpanSchemaType;
|
|
14
|
+
inlineObjects: ObjectSchemaType[];
|
|
15
|
+
blockObjects: ObjectSchemaType[];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @beta
|
|
20
|
+
*/
|
|
21
|
+
interface BlockEditorSchemaProps {
|
|
22
|
+
icon?: string | ComponentType;
|
|
23
|
+
render?: ComponentType;
|
|
16
24
|
}
|
|
17
|
-
|
|
18
25
|
/**
|
|
19
26
|
* @public
|
|
20
27
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
block: ArraySchemaType
|
|
28
|
-
span: SpanSchemaType
|
|
29
|
-
inlineObjects: ObjectSchemaType[]
|
|
30
|
-
blockObjects: ObjectSchemaType[]
|
|
31
|
-
}
|
|
28
|
+
interface ResolvedAnnotationType {
|
|
29
|
+
blockEditor?: BlockEditorSchemaProps;
|
|
30
|
+
title: string | undefined;
|
|
31
|
+
value: string;
|
|
32
|
+
type: ObjectSchemaType;
|
|
33
|
+
icon: ComponentType | undefined;
|
|
32
34
|
}
|
|
33
|
-
|
|
34
35
|
/**
|
|
35
|
-
* @
|
|
36
|
+
* @public
|
|
36
37
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
interface TypedObject {
|
|
39
|
+
_type: string;
|
|
40
|
+
_key?: string;
|
|
40
41
|
}
|
|
41
|
-
|
|
42
42
|
/**
|
|
43
|
-
* Block normalization options
|
|
44
|
-
*
|
|
45
43
|
* @public
|
|
46
44
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* Decorator names that are allowed within portable text blocks, eg `em`, `strong`
|
|
50
|
-
*/
|
|
51
|
-
allowedDecorators?: string[]
|
|
52
|
-
/**
|
|
53
|
-
* Name of the portable text block type, if not `block`
|
|
54
|
-
*/
|
|
55
|
-
blockTypeName?: string
|
|
56
|
-
/**
|
|
57
|
-
* Custom key generator function
|
|
58
|
-
*/
|
|
59
|
-
keyGenerator?: () => string
|
|
45
|
+
interface ArbitraryTypedObject extends TypedObject {
|
|
46
|
+
[key: string]: unknown;
|
|
60
47
|
}
|
|
61
|
-
|
|
62
48
|
/**
|
|
63
49
|
* @public
|
|
64
50
|
*/
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
51
|
+
type HtmlParser = (html: string) => Document;
|
|
52
|
+
/**
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
type WhiteSpacePasteMode = 'preserve' | 'remove' | 'normalize';
|
|
56
|
+
/**
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
interface HtmlDeserializerOptions {
|
|
60
|
+
keyGenerator?: () => string;
|
|
61
|
+
rules?: DeserializerRule[];
|
|
62
|
+
parseHtml?: HtmlParser;
|
|
63
|
+
unstable_whitespaceOnPasteMode?: WhiteSpacePasteMode;
|
|
76
64
|
}
|
|
77
|
-
|
|
78
65
|
/**
|
|
79
|
-
* Normalize and extract features of an schema type containing a block type
|
|
80
|
-
*
|
|
81
|
-
* @param blockContentType - Schema type for the block type
|
|
82
|
-
* @returns Returns the featureset of a compiled block content type.
|
|
83
66
|
* @public
|
|
84
67
|
*/
|
|
85
|
-
export declare function getBlockContentFeatures(
|
|
86
|
-
blockContentType: ArraySchemaType,
|
|
87
|
-
): BlockContentFeatures
|
|
88
68
|
|
|
89
69
|
/**
|
|
90
70
|
* @public
|
|
91
71
|
*/
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
72
|
+
interface DeserializerRule {
|
|
73
|
+
deserialize: (el: Node, next: (elements: Node | Node[] | NodeList) => TypedObject | TypedObject[] | undefined, createBlock: (props: ArbitraryTypedObject) => {
|
|
74
|
+
_type: string;
|
|
75
|
+
block: ArbitraryTypedObject;
|
|
76
|
+
}) => TypedObject | TypedObject[] | undefined;
|
|
97
77
|
}
|
|
98
|
-
|
|
99
78
|
/**
|
|
100
79
|
* @public
|
|
101
80
|
*/
|
|
102
|
-
export declare type HtmlParser = (html: string) => Document
|
|
103
|
-
|
|
104
81
|
/**
|
|
105
|
-
*
|
|
82
|
+
* Block normalization options
|
|
106
83
|
*
|
|
107
|
-
* @param html - The HTML to convert to blocks
|
|
108
|
-
* @param blockContentType - A compiled version of the schema type for the block content
|
|
109
|
-
* @param options - Options for deserializing HTML to blocks
|
|
110
|
-
* @returns Array of blocks
|
|
111
84
|
* @public
|
|
112
85
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
86
|
+
interface BlockNormalizationOptions {
|
|
87
|
+
/**
|
|
88
|
+
* Decorator names that are allowed within portable text blocks, eg `em`, `strong`
|
|
89
|
+
*/
|
|
90
|
+
allowedDecorators?: string[];
|
|
91
|
+
/**
|
|
92
|
+
* Name of the portable text block type, if not `block`
|
|
93
|
+
*/
|
|
94
|
+
blockTypeName?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Custom key generator function
|
|
97
|
+
*/
|
|
98
|
+
keyGenerator?: () => string;
|
|
99
|
+
}
|
|
119
100
|
/**
|
|
120
101
|
* Normalizes a block by ensuring it has a `_key` property. If the block is a
|
|
121
102
|
* portable text block, additional normalization is applied:
|
|
@@ -131,16 +112,9 @@ export declare function htmlToBlocks(
|
|
|
131
112
|
* @returns Normalized block
|
|
132
113
|
* @public
|
|
133
114
|
*/
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
): Omit<
|
|
138
|
-
TypedObject | PortableTextTextBlock<TypedObject | PortableTextSpan>,
|
|
139
|
-
'_key'
|
|
140
|
-
> & {
|
|
141
|
-
_key: string
|
|
142
|
-
}
|
|
143
|
-
|
|
115
|
+
declare function normalizeBlock(node: TypedObject, options?: BlockNormalizationOptions): Omit<TypedObject | PortableTextTextBlock<TypedObject | PortableTextSpan>, '_key'> & {
|
|
116
|
+
_key: string;
|
|
117
|
+
};
|
|
144
118
|
/**
|
|
145
119
|
* Generate a random key of the given length
|
|
146
120
|
*
|
|
@@ -148,30 +122,23 @@ export declare function normalizeBlock(
|
|
|
148
122
|
* @returns A string of the given length
|
|
149
123
|
* @public
|
|
150
124
|
*/
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* @public
|
|
155
|
-
*/
|
|
156
|
-
export declare interface ResolvedAnnotationType {
|
|
157
|
-
blockEditor?: BlockEditorSchemaProps
|
|
158
|
-
title: string | undefined
|
|
159
|
-
value: string
|
|
160
|
-
type: ObjectSchemaType
|
|
161
|
-
icon: ComponentType | undefined
|
|
162
|
-
}
|
|
163
|
-
|
|
125
|
+
declare function randomKey(length: number): string;
|
|
164
126
|
/**
|
|
127
|
+
* Convert HTML to blocks respecting the block content type's schema
|
|
128
|
+
*
|
|
129
|
+
* @param html - The HTML to convert to blocks
|
|
130
|
+
* @param blockContentType - A compiled version of the schema type for the block content
|
|
131
|
+
* @param options - Options for deserializing HTML to blocks
|
|
132
|
+
* @returns Array of blocks
|
|
165
133
|
* @public
|
|
166
134
|
*/
|
|
167
|
-
|
|
168
|
-
_type: string
|
|
169
|
-
_key?: string
|
|
170
|
-
}
|
|
171
|
-
|
|
135
|
+
declare function htmlToBlocks(html: string, blockContentType: ArraySchemaType, options?: HtmlDeserializerOptions): (TypedObject | PortableTextTextBlock)[];
|
|
172
136
|
/**
|
|
137
|
+
* Normalize and extract features of an schema type containing a block type
|
|
138
|
+
*
|
|
139
|
+
* @param blockContentType - Schema type for the block type
|
|
140
|
+
* @returns Returns the featureset of a compiled block content type.
|
|
173
141
|
* @public
|
|
174
142
|
*/
|
|
175
|
-
declare
|
|
176
|
-
|
|
177
|
-
export {}
|
|
143
|
+
declare function getBlockContentFeatures(blockContentType: ArraySchemaType): BlockContentFeatures;
|
|
144
|
+
export { type ArbitraryTypedObject, type BlockContentFeatures, type BlockEditorSchemaProps, type BlockNormalizationOptions, type DeserializerRule, type HtmlDeserializerOptions, type HtmlParser, type ResolvedAnnotationType, type TypedObject, getBlockContentFeatures, htmlToBlocks, normalizeBlock, randomKey };
|
package/lib/index.d.ts
CHANGED
|
@@ -1,121 +1,102 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
I18nTitledListValue,
|
|
4
|
-
ObjectSchemaType,
|
|
5
|
-
SpanSchemaType,
|
|
6
|
-
TitledListValue,
|
|
7
|
-
} from '@sanity/types'
|
|
8
|
-
import {PortableTextSpan, PortableTextTextBlock} from '@sanity/types'
|
|
9
|
-
import type {ComponentType} from 'react'
|
|
10
|
-
|
|
1
|
+
import { ArraySchemaType, I18nTitledListValue, ObjectSchemaType, PortableTextSpan, PortableTextTextBlock, SpanSchemaType, TitledListValue } from "@sanity/types";
|
|
2
|
+
import { ComponentType } from "react";
|
|
11
3
|
/**
|
|
12
4
|
* @public
|
|
13
5
|
*/
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
interface BlockContentFeatures {
|
|
7
|
+
styles: TitledListValue<string>[];
|
|
8
|
+
decorators: TitledListValue<string>[];
|
|
9
|
+
annotations: ResolvedAnnotationType[];
|
|
10
|
+
lists: I18nTitledListValue<string>[];
|
|
11
|
+
types: {
|
|
12
|
+
block: ArraySchemaType;
|
|
13
|
+
span: SpanSchemaType;
|
|
14
|
+
inlineObjects: ObjectSchemaType[];
|
|
15
|
+
blockObjects: ObjectSchemaType[];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @beta
|
|
20
|
+
*/
|
|
21
|
+
interface BlockEditorSchemaProps {
|
|
22
|
+
icon?: string | ComponentType;
|
|
23
|
+
render?: ComponentType;
|
|
16
24
|
}
|
|
17
|
-
|
|
18
25
|
/**
|
|
19
26
|
* @public
|
|
20
27
|
*/
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
block: ArraySchemaType
|
|
28
|
-
span: SpanSchemaType
|
|
29
|
-
inlineObjects: ObjectSchemaType[]
|
|
30
|
-
blockObjects: ObjectSchemaType[]
|
|
31
|
-
}
|
|
28
|
+
interface ResolvedAnnotationType {
|
|
29
|
+
blockEditor?: BlockEditorSchemaProps;
|
|
30
|
+
title: string | undefined;
|
|
31
|
+
value: string;
|
|
32
|
+
type: ObjectSchemaType;
|
|
33
|
+
icon: ComponentType | undefined;
|
|
32
34
|
}
|
|
33
|
-
|
|
34
35
|
/**
|
|
35
|
-
* @
|
|
36
|
+
* @public
|
|
36
37
|
*/
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
interface TypedObject {
|
|
39
|
+
_type: string;
|
|
40
|
+
_key?: string;
|
|
40
41
|
}
|
|
41
|
-
|
|
42
42
|
/**
|
|
43
|
-
* Block normalization options
|
|
44
|
-
*
|
|
45
43
|
* @public
|
|
46
44
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* Decorator names that are allowed within portable text blocks, eg `em`, `strong`
|
|
50
|
-
*/
|
|
51
|
-
allowedDecorators?: string[]
|
|
52
|
-
/**
|
|
53
|
-
* Name of the portable text block type, if not `block`
|
|
54
|
-
*/
|
|
55
|
-
blockTypeName?: string
|
|
56
|
-
/**
|
|
57
|
-
* Custom key generator function
|
|
58
|
-
*/
|
|
59
|
-
keyGenerator?: () => string
|
|
45
|
+
interface ArbitraryTypedObject extends TypedObject {
|
|
46
|
+
[key: string]: unknown;
|
|
60
47
|
}
|
|
61
|
-
|
|
62
48
|
/**
|
|
63
49
|
* @public
|
|
64
50
|
*/
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
51
|
+
type HtmlParser = (html: string) => Document;
|
|
52
|
+
/**
|
|
53
|
+
* @public
|
|
54
|
+
*/
|
|
55
|
+
type WhiteSpacePasteMode = 'preserve' | 'remove' | 'normalize';
|
|
56
|
+
/**
|
|
57
|
+
* @public
|
|
58
|
+
*/
|
|
59
|
+
interface HtmlDeserializerOptions {
|
|
60
|
+
keyGenerator?: () => string;
|
|
61
|
+
rules?: DeserializerRule[];
|
|
62
|
+
parseHtml?: HtmlParser;
|
|
63
|
+
unstable_whitespaceOnPasteMode?: WhiteSpacePasteMode;
|
|
76
64
|
}
|
|
77
|
-
|
|
78
65
|
/**
|
|
79
|
-
* Normalize and extract features of an schema type containing a block type
|
|
80
|
-
*
|
|
81
|
-
* @param blockContentType - Schema type for the block type
|
|
82
|
-
* @returns Returns the featureset of a compiled block content type.
|
|
83
66
|
* @public
|
|
84
67
|
*/
|
|
85
|
-
export declare function getBlockContentFeatures(
|
|
86
|
-
blockContentType: ArraySchemaType,
|
|
87
|
-
): BlockContentFeatures
|
|
88
68
|
|
|
89
69
|
/**
|
|
90
70
|
* @public
|
|
91
71
|
*/
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
72
|
+
interface DeserializerRule {
|
|
73
|
+
deserialize: (el: Node, next: (elements: Node | Node[] | NodeList) => TypedObject | TypedObject[] | undefined, createBlock: (props: ArbitraryTypedObject) => {
|
|
74
|
+
_type: string;
|
|
75
|
+
block: ArbitraryTypedObject;
|
|
76
|
+
}) => TypedObject | TypedObject[] | undefined;
|
|
97
77
|
}
|
|
98
|
-
|
|
99
78
|
/**
|
|
100
79
|
* @public
|
|
101
80
|
*/
|
|
102
|
-
export declare type HtmlParser = (html: string) => Document
|
|
103
|
-
|
|
104
81
|
/**
|
|
105
|
-
*
|
|
82
|
+
* Block normalization options
|
|
106
83
|
*
|
|
107
|
-
* @param html - The HTML to convert to blocks
|
|
108
|
-
* @param blockContentType - A compiled version of the schema type for the block content
|
|
109
|
-
* @param options - Options for deserializing HTML to blocks
|
|
110
|
-
* @returns Array of blocks
|
|
111
84
|
* @public
|
|
112
85
|
*/
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
86
|
+
interface BlockNormalizationOptions {
|
|
87
|
+
/**
|
|
88
|
+
* Decorator names that are allowed within portable text blocks, eg `em`, `strong`
|
|
89
|
+
*/
|
|
90
|
+
allowedDecorators?: string[];
|
|
91
|
+
/**
|
|
92
|
+
* Name of the portable text block type, if not `block`
|
|
93
|
+
*/
|
|
94
|
+
blockTypeName?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Custom key generator function
|
|
97
|
+
*/
|
|
98
|
+
keyGenerator?: () => string;
|
|
99
|
+
}
|
|
119
100
|
/**
|
|
120
101
|
* Normalizes a block by ensuring it has a `_key` property. If the block is a
|
|
121
102
|
* portable text block, additional normalization is applied:
|
|
@@ -131,16 +112,9 @@ export declare function htmlToBlocks(
|
|
|
131
112
|
* @returns Normalized block
|
|
132
113
|
* @public
|
|
133
114
|
*/
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
): Omit<
|
|
138
|
-
TypedObject | PortableTextTextBlock<TypedObject | PortableTextSpan>,
|
|
139
|
-
'_key'
|
|
140
|
-
> & {
|
|
141
|
-
_key: string
|
|
142
|
-
}
|
|
143
|
-
|
|
115
|
+
declare function normalizeBlock(node: TypedObject, options?: BlockNormalizationOptions): Omit<TypedObject | PortableTextTextBlock<TypedObject | PortableTextSpan>, '_key'> & {
|
|
116
|
+
_key: string;
|
|
117
|
+
};
|
|
144
118
|
/**
|
|
145
119
|
* Generate a random key of the given length
|
|
146
120
|
*
|
|
@@ -148,30 +122,23 @@ export declare function normalizeBlock(
|
|
|
148
122
|
* @returns A string of the given length
|
|
149
123
|
* @public
|
|
150
124
|
*/
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* @public
|
|
155
|
-
*/
|
|
156
|
-
export declare interface ResolvedAnnotationType {
|
|
157
|
-
blockEditor?: BlockEditorSchemaProps
|
|
158
|
-
title: string | undefined
|
|
159
|
-
value: string
|
|
160
|
-
type: ObjectSchemaType
|
|
161
|
-
icon: ComponentType | undefined
|
|
162
|
-
}
|
|
163
|
-
|
|
125
|
+
declare function randomKey(length: number): string;
|
|
164
126
|
/**
|
|
127
|
+
* Convert HTML to blocks respecting the block content type's schema
|
|
128
|
+
*
|
|
129
|
+
* @param html - The HTML to convert to blocks
|
|
130
|
+
* @param blockContentType - A compiled version of the schema type for the block content
|
|
131
|
+
* @param options - Options for deserializing HTML to blocks
|
|
132
|
+
* @returns Array of blocks
|
|
165
133
|
* @public
|
|
166
134
|
*/
|
|
167
|
-
|
|
168
|
-
_type: string
|
|
169
|
-
_key?: string
|
|
170
|
-
}
|
|
171
|
-
|
|
135
|
+
declare function htmlToBlocks(html: string, blockContentType: ArraySchemaType, options?: HtmlDeserializerOptions): (TypedObject | PortableTextTextBlock)[];
|
|
172
136
|
/**
|
|
137
|
+
* Normalize and extract features of an schema type containing a block type
|
|
138
|
+
*
|
|
139
|
+
* @param blockContentType - Schema type for the block type
|
|
140
|
+
* @returns Returns the featureset of a compiled block content type.
|
|
173
141
|
* @public
|
|
174
142
|
*/
|
|
175
|
-
declare
|
|
176
|
-
|
|
177
|
-
export {}
|
|
143
|
+
declare function getBlockContentFeatures(blockContentType: ArraySchemaType): BlockContentFeatures;
|
|
144
|
+
export { type ArbitraryTypedObject, type BlockContentFeatures, type BlockEditorSchemaProps, type BlockNormalizationOptions, type DeserializerRule, type HtmlDeserializerOptions, type HtmlParser, type ResolvedAnnotationType, type TypedObject, getBlockContentFeatures, htmlToBlocks, normalizeBlock, randomKey };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portabletext/block-tools",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Can format HTML, Slate JSON or Sanity block array into any other format.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"portable-text",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"lodash": "^4.17.21"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@sanity/pkg-utils": "^7.9.
|
|
44
|
-
"@sanity/schema": "^
|
|
45
|
-
"@sanity/types": "^
|
|
43
|
+
"@sanity/pkg-utils": "^7.9.6",
|
|
44
|
+
"@sanity/schema": "^4.0.1",
|
|
45
|
+
"@sanity/types": "^4.0.1",
|
|
46
46
|
"@types/jsdom": "^20.0.0",
|
|
47
47
|
"@types/lodash": "^4.17.16",
|
|
48
48
|
"@types/react": "^19.1.8",
|
|
@@ -53,8 +53,8 @@
|
|
|
53
53
|
"vitest": "^3.2.4"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@sanity/types": "^
|
|
57
|
-
"@types/react": "18 || 19"
|
|
56
|
+
"@sanity/types": "^4.0.1",
|
|
57
|
+
"@types/react": "^18.3 || ^19"
|
|
58
58
|
},
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|