@sanity/schema 5.14.0-next.43 → 5.14.0-next.45

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.
@@ -233,17 +233,17 @@ declare const builtinTypes: ({
233
233
  type: string;
234
234
  title: string;
235
235
  readOnly: boolean;
236
- fieldset?: undefined;
237
236
  validation?: undefined;
238
237
  hidden?: undefined;
238
+ fieldset?: undefined;
239
239
  } | {
240
240
  name: string;
241
241
  type: string;
242
242
  title: string;
243
- readOnly?: undefined;
244
- fieldset?: undefined;
245
243
  validation?: undefined;
246
244
  hidden?: undefined;
245
+ readOnly?: undefined;
246
+ fieldset?: undefined;
247
247
  } | {
248
248
  name: string;
249
249
  type: string;
@@ -258,8 +258,8 @@ declare const builtinTypes: ({
258
258
  readOnly: boolean;
259
259
  hidden: boolean;
260
260
  fieldset: string;
261
- title?: undefined;
262
261
  validation?: undefined;
262
+ title?: undefined;
263
263
  } | {
264
264
  name: string;
265
265
  type: string;
@@ -312,17 +312,17 @@ declare const builtinTypes: ({
312
312
  type: string;
313
313
  title: string;
314
314
  readOnly: boolean;
315
- fieldset?: undefined;
316
315
  validation?: undefined;
317
316
  hidden?: undefined;
317
+ fieldset?: undefined;
318
318
  } | {
319
319
  name: string;
320
320
  type: string;
321
321
  title: string;
322
- readOnly?: undefined;
323
- fieldset?: undefined;
324
322
  validation?: undefined;
325
323
  hidden?: undefined;
324
+ readOnly?: undefined;
325
+ fieldset?: undefined;
326
326
  } | {
327
327
  name: string;
328
328
  type: string;
@@ -332,21 +332,21 @@ declare const builtinTypes: ({
332
332
  validation: (Rule: _sanity_types0.Rule) => _sanity_types0.Rule;
333
333
  hidden?: undefined;
334
334
  } | {
335
+ validation?: undefined;
335
336
  name: string;
336
337
  type: string;
337
338
  readOnly: boolean;
338
339
  hidden: boolean;
339
340
  fieldset: string;
340
341
  title?: undefined;
341
- validation?: undefined;
342
342
  } | {
343
+ validation?: undefined;
344
+ hidden?: undefined;
343
345
  name: string;
344
346
  type: string;
345
347
  title: string;
346
348
  readOnly: boolean;
347
349
  fieldset: string;
348
- validation?: undefined;
349
- hidden?: undefined;
350
350
  })[];
351
351
  preview: {
352
352
  select: {
package/lib/_internal.js CHANGED
@@ -1822,6 +1822,14 @@ function validateField(field, visitorContext) {
1822
1822
  `The type "${field.type}" is a document type and should not be used as a field type directly. Use a "reference" if you want to create a link to the document, or use "object" if you want to embed fields inline.`,
1823
1823
  HELP_IDS.FIELD_TYPE_IS_DOCUMENT
1824
1824
  )
1825
+ ), field.title && typeof field.title != "string" && problems.push(
1826
+ warning(
1827
+ `Field "${field.name}" has a non-string title. This is known to cause problems and will not be supported in future versions. Please use a string instead.`
1828
+ )
1829
+ ), field.description && typeof field.description != "string" && problems.push(
1830
+ warning(
1831
+ `Field "${field.name}" has a non-string description. This is known to cause problems and will not be supported in future versions. Please use a string instead.`
1832
+ )
1825
1833
  ), problems;
1826
1834
  }
1827
1835
  function getDuplicateFields(array2) {