@tinacms/schema-tools 1.10.1 → 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.
@@ -13,7 +13,7 @@ export declare const resolveForm: ({ collection, basename, template, schema, }:
13
13
  fields: {
14
14
  [key: string]: unknown;
15
15
  name: string;
16
- component: NonNullable<import("../types/index").TinaField<true>["ui"]>["component"];
16
+ component: NonNullable<import("..").TinaField<true>["ui"]>["component"];
17
17
  type: string;
18
18
  }[];
19
19
  };
@@ -173,8 +173,8 @@ type DateFormatProps = {
173
173
  * dateFormat: 'YYYY MM DD'
174
174
  * ```
175
175
  */
176
- dateFormat?: string;
177
- timeFormat?: string;
176
+ dateFormat?: string | boolean;
177
+ timeFormat?: string | boolean;
178
178
  };
179
179
  export type DateTimeField = (FieldGeneric<string, undefined, DateFormatProps> | FieldGeneric<string, true, DateFormatProps> | FieldGeneric<string, false, DateFormatProps>) & BaseField & {
180
180
  type: 'datetime';
@@ -718,6 +718,7 @@ export interface UICollection<Form = any, CMS = any, TinaForm = any> {
718
718
  allowedActions?: {
719
719
  create?: boolean;
720
720
  delete?: boolean;
721
+ createFolder?: boolean;
721
722
  createNestedFolder?: boolean;
722
723
  };
723
724
  /**
@@ -30,44 +30,44 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
30
30
  isAuthCollection: z.ZodOptional<z.ZodBoolean>;
31
31
  isDetached: z.ZodOptional<z.ZodBoolean>;
32
32
  }, {
33
- fields: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodType<import("../types/index").TinaField, z.ZodTypeDef, import("../types/index").TinaField>, "many">>, import("../types/index").TinaField[], import("../types/index").TinaField[]>, import("../types/index").TinaField[], import("../types/index").TinaField[]>, import("../types/index").TinaField[], import("../types/index").TinaField[]>, import("../types/index").TinaField[], import("../types/index").TinaField[]>;
33
+ fields: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodType<import("..").TinaField, z.ZodTypeDef, import("..").TinaField>, "many">>, import("..").TinaField[], import("..").TinaField[]>, import("..").TinaField[], import("..").TinaField[]>, import("..").TinaField[], import("..").TinaField[]>, import("..").TinaField[], import("..").TinaField[]>;
34
34
  templates: z.ZodEffects<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodObject<{
35
35
  label: z.ZodString;
36
36
  name: z.ZodEffects<z.ZodString, string, string>;
37
- fields: z.ZodArray<z.ZodType<import("../types/index").TinaField, z.ZodTypeDef, import("../types/index").TinaField>, "many">;
37
+ fields: z.ZodArray<z.ZodType<import("..").TinaField, z.ZodTypeDef, import("..").TinaField>, "many">;
38
38
  }, "strip", z.ZodTypeAny, {
39
39
  name?: string;
40
- fields?: import("../types/index").TinaField[];
40
+ fields?: import("..").TinaField[];
41
41
  label?: string;
42
42
  }, {
43
43
  name?: string;
44
- fields?: import("../types/index").TinaField[];
44
+ fields?: import("..").TinaField[];
45
45
  label?: string;
46
46
  }>, {
47
47
  name?: string;
48
- fields?: import("../types/index").TinaField[];
48
+ fields?: import("..").TinaField[];
49
49
  label?: string;
50
50
  }, {
51
51
  name?: string;
52
- fields?: import("../types/index").TinaField[];
52
+ fields?: import("..").TinaField[];
53
53
  label?: string;
54
54
  }>, "many">>, {
55
55
  name?: string;
56
- fields?: import("../types/index").TinaField[];
56
+ fields?: import("..").TinaField[];
57
57
  label?: string;
58
58
  }[], {
59
59
  name?: string;
60
- fields?: import("../types/index").TinaField[];
60
+ fields?: import("..").TinaField[];
61
61
  label?: string;
62
62
  }[]>;
63
63
  }>, "strip", z.ZodTypeAny, {
64
64
  name?: string;
65
65
  templates?: {
66
66
  name?: string;
67
- fields?: import("../types/index").TinaField[];
67
+ fields?: import("..").TinaField[];
68
68
  label?: string;
69
69
  }[];
70
- fields?: import("../types/index").TinaField[];
70
+ fields?: import("..").TinaField[];
71
71
  label?: string;
72
72
  path?: string;
73
73
  format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
@@ -77,10 +77,10 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
77
77
  name?: string;
78
78
  templates?: {
79
79
  name?: string;
80
- fields?: import("../types/index").TinaField[];
80
+ fields?: import("..").TinaField[];
81
81
  label?: string;
82
82
  }[];
83
- fields?: import("../types/index").TinaField[];
83
+ fields?: import("..").TinaField[];
84
84
  label?: string;
85
85
  path?: string;
86
86
  format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
@@ -90,10 +90,10 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
90
90
  name?: string;
91
91
  templates?: {
92
92
  name?: string;
93
- fields?: import("../types/index").TinaField[];
93
+ fields?: import("..").TinaField[];
94
94
  label?: string;
95
95
  }[];
96
- fields?: import("../types/index").TinaField[];
96
+ fields?: import("..").TinaField[];
97
97
  label?: string;
98
98
  path?: string;
99
99
  format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
@@ -103,10 +103,10 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
103
103
  name?: string;
104
104
  templates?: {
105
105
  name?: string;
106
- fields?: import("../types/index").TinaField[];
106
+ fields?: import("..").TinaField[];
107
107
  label?: string;
108
108
  }[];
109
- fields?: import("../types/index").TinaField[];
109
+ fields?: import("..").TinaField[];
110
110
  label?: string;
111
111
  path?: string;
112
112
  format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
@@ -274,10 +274,10 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
274
274
  name?: string;
275
275
  templates?: {
276
276
  name?: string;
277
- fields?: import("../types/index").TinaField[];
277
+ fields?: import("..").TinaField[];
278
278
  label?: string;
279
279
  }[];
280
- fields?: import("../types/index").TinaField[];
280
+ fields?: import("..").TinaField[];
281
281
  label?: string;
282
282
  path?: string;
283
283
  format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
@@ -319,10 +319,10 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
319
319
  name?: string;
320
320
  templates?: {
321
321
  name?: string;
322
- fields?: import("../types/index").TinaField[];
322
+ fields?: import("..").TinaField[];
323
323
  label?: string;
324
324
  }[];
325
- fields?: import("../types/index").TinaField[];
325
+ fields?: import("..").TinaField[];
326
326
  label?: string;
327
327
  path?: string;
328
328
  format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
@@ -364,10 +364,10 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
364
364
  name?: string;
365
365
  templates?: {
366
366
  name?: string;
367
- fields?: import("../types/index").TinaField[];
367
+ fields?: import("..").TinaField[];
368
368
  label?: string;
369
369
  }[];
370
- fields?: import("../types/index").TinaField[];
370
+ fields?: import("..").TinaField[];
371
371
  label?: string;
372
372
  path?: string;
373
373
  format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
@@ -409,10 +409,10 @@ export declare const TinaCloudSchemaZod: z.ZodEffects<z.ZodObject<{
409
409
  name?: string;
410
410
  templates?: {
411
411
  name?: string;
412
- fields?: import("../types/index").TinaField[];
412
+ fields?: import("..").TinaField[];
413
413
  label?: string;
414
414
  }[];
415
- fields?: import("../types/index").TinaField[];
415
+ fields?: import("..").TinaField[];
416
416
  label?: string;
417
417
  path?: string;
418
418
  format?: "mdx" | "md" | "markdown" | "json" | "yaml" | "yml" | "toml";
package/package.json CHANGED
@@ -1,16 +1,9 @@
1
1
  {
2
2
  "name": "@tinacms/schema-tools",
3
- "version": "1.10.1",
3
+ "type": "module",
4
+ "version": "2.0.0",
4
5
  "main": "dist/index.js",
5
- "module": "./dist/index.mjs",
6
- "exports": {
7
- ".": {
8
- "types": "./dist/index.d.ts",
9
- "import": "./dist/index.mjs",
10
- "require": "./dist/index.js"
11
- }
12
- },
13
- "typings": "dist/index.d.ts",
6
+ "types": "dist/index.d.ts",
14
7
  "files": [
15
8
  "dist"
16
9
  ],