@sanity/assist 4.4.0 → 4.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/README.md +1 -1
- package/dist/index.esm.js +2 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/helpers/assistSupported.ts +5 -1
- package/src/schemas/serialize/serializeSchema.test.ts +18 -4
package/dist/index.js
CHANGED
|
@@ -235,7 +235,8 @@ function isSchemaAssistEnabled(type) {
|
|
|
235
235
|
return !type.options?.aiAssist?.exclude;
|
|
236
236
|
}
|
|
237
237
|
function isAssistSupported(type) {
|
|
238
|
-
return !isSchemaAssistEnabled(type) || isDisabled(type) ? !1 : type.jsonType === "array" ? !type.of.every((t) => isDisabled(t)) : type.jsonType === "object" ? !type.fields.every((field) => isDisabled(field.type))
|
|
238
|
+
return !isSchemaAssistEnabled(type) || isDisabled(type) ? !1 : type.jsonType === "array" ? !type.of.every((t) => isDisabled(t)) : type.jsonType === "object" ? !type.fields.every((field) => isDisabled(field.type)) || /* to allow attaching custom actions on fieldless images */
|
|
239
|
+
isType(type, "image") : !0;
|
|
239
240
|
}
|
|
240
241
|
function isDisabled(type) {
|
|
241
242
|
return !isSchemaAssistEnabled(type) || isUnsupportedType(type);
|