@sanity/assist 4.4.6 → 4.4.7
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/dist/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.esm.js +309 -267
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +307 -265
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +309 -267
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/assistDocument/hooks/useAssistDocumentContextValue.tsx +6 -7
- package/src/assistInspector/FieldAutocomplete.tsx +9 -4
- package/src/assistInspector/helpers.ts +15 -26
- package/src/assistLayout/AiAssistanceConfigContext.tsx +5 -67
- package/src/assistLayout/AiAssistanceConfigProvider.tsx +98 -0
- package/src/assistLayout/AssistLayout.tsx +1 -1
- package/src/assistLayout/fieldRefCache.tsx +34 -0
- package/src/fieldActions/customFieldActions.tsx +2 -1
- package/src/schemas/assistDocumentSchema.tsx +9 -6
- package/src/schemas/typeDefExtensions.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -14,7 +14,6 @@ import {SanityClient} from 'sanity'
|
|
|
14
14
|
import type {SanityClient as SanityClient_2} from '@sanity/client'
|
|
15
15
|
import {SanityDocumentLike} from 'sanity'
|
|
16
16
|
import {SchemaType} from 'sanity'
|
|
17
|
-
import {SchemaType as SchemaType_2} from '@sanity/types'
|
|
18
17
|
|
|
19
18
|
declare interface AgentActionConditionalPath {
|
|
20
19
|
path: AgentActionPath
|
|
@@ -206,7 +205,7 @@ export declare interface AssistFieldActionProps {
|
|
|
206
205
|
*
|
|
207
206
|
* ```
|
|
208
207
|
*/
|
|
209
|
-
schemaType:
|
|
208
|
+
schemaType: SchemaType
|
|
210
209
|
/**
|
|
211
210
|
* Schema type of the parent field or array item holding this field.
|
|
212
211
|
*
|
|
@@ -215,7 +214,7 @@ export declare interface AssistFieldActionProps {
|
|
|
215
214
|
* @see schemaType
|
|
216
215
|
* @see documentSchemaType
|
|
217
216
|
*/
|
|
218
|
-
parentSchemaType?:
|
|
217
|
+
parentSchemaType?: SchemaType
|
|
219
218
|
}
|
|
220
219
|
|
|
221
220
|
export declare interface AssistOptions {
|
package/dist/index.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ import {SanityClient} from 'sanity'
|
|
|
14
14
|
import type {SanityClient as SanityClient_2} from '@sanity/client'
|
|
15
15
|
import {SanityDocumentLike} from 'sanity'
|
|
16
16
|
import {SchemaType} from 'sanity'
|
|
17
|
-
import {SchemaType as SchemaType_2} from '@sanity/types'
|
|
18
17
|
|
|
19
18
|
declare interface AgentActionConditionalPath {
|
|
20
19
|
path: AgentActionPath
|
|
@@ -206,7 +205,7 @@ export declare interface AssistFieldActionProps {
|
|
|
206
205
|
*
|
|
207
206
|
* ```
|
|
208
207
|
*/
|
|
209
|
-
schemaType:
|
|
208
|
+
schemaType: SchemaType
|
|
210
209
|
/**
|
|
211
210
|
* Schema type of the parent field or array item holding this field.
|
|
212
211
|
*
|
|
@@ -215,7 +214,7 @@ export declare interface AssistFieldActionProps {
|
|
|
215
214
|
* @see schemaType
|
|
216
215
|
* @see documentSchemaType
|
|
217
216
|
*/
|
|
218
|
-
parentSchemaType?:
|
|
217
|
+
parentSchemaType?: SchemaType
|
|
219
218
|
}
|
|
220
219
|
|
|
221
220
|
export declare interface AssistOptions {
|