@sanity/assist 4.4.0 → 4.4.2
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 +3 -3
- package/src/helpers/assistSupported.ts +5 -1
- package/src/schemas/serialize/serializeSchema.test.ts +18 -4
package/dist/index.mjs
CHANGED
|
@@ -242,7 +242,8 @@ function isSchemaAssistEnabled(type) {
|
|
|
242
242
|
return !type.options?.aiAssist?.exclude;
|
|
243
243
|
}
|
|
244
244
|
function isAssistSupported(type) {
|
|
245
|
-
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))
|
|
245
|
+
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 */
|
|
246
|
+
isType(type, "image") : !0;
|
|
246
247
|
}
|
|
247
248
|
function isDisabled(type) {
|
|
248
249
|
return !isSchemaAssistEnabled(type) || isUnsupportedType(type);
|