@tinacms/schema-tools 0.0.0-202231073 → 0.0.0-2022311143526
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/CHANGELOG.md +1 -2
- package/dist/types/SchemaTypes.d.ts +3 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @tinacms/schema-tools
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-2022311143526
|
|
4
4
|
### Patch Changes
|
|
5
5
|
|
|
6
6
|
- abf25c673: The schema can now to used on the frontend (optional for now but will be the main path moving forward).
|
|
@@ -29,5 +29,4 @@
|
|
|
29
29
|
|
|
30
30
|
export default TinaProvider
|
|
31
31
|
```
|
|
32
|
-
- 801f39f62: Update types
|
|
33
32
|
- e8b0de1f7: Add `parentTypename` to fields to allow us to disambiguate between fields which have the same field names but different types. Example, an event from field name of `blocks.0.title` could belong to a `Cta` block or a `Hero` block, both of which have a `title` field.
|
|
@@ -61,13 +61,13 @@ export interface CollectionTemplatesWithNamespace<WithNamespace extends boolean>
|
|
|
61
61
|
}
|
|
62
62
|
declare type CollectionFields<WithNamespace extends boolean> = WithNamespace extends true ? CollectionFieldsWithNamespace<WithNamespace> : CollectionFieldsInner<WithNamespace>;
|
|
63
63
|
export interface CollectionFieldsWithNamespace<WithNamespace extends boolean> extends BaseCollection {
|
|
64
|
-
fields: TinaFieldInner<WithNamespace>[];
|
|
64
|
+
fields: string | TinaFieldInner<WithNamespace>[];
|
|
65
65
|
templates?: undefined;
|
|
66
66
|
references?: ReferenceType<WithNamespace>[];
|
|
67
67
|
namespace: string[];
|
|
68
68
|
}
|
|
69
69
|
interface CollectionFieldsInner<WithNamespace extends boolean> extends BaseCollection {
|
|
70
|
-
fields: TinaFieldInner<WithNamespace>[];
|
|
70
|
+
fields: string | TinaFieldInner<WithNamespace>[];
|
|
71
71
|
templates?: undefined;
|
|
72
72
|
}
|
|
73
73
|
export declare type TinaFieldInner<WithNamespace extends boolean> = ScalarType<WithNamespace> | ObjectType<WithNamespace> | ReferenceType<WithNamespace> | RichType<WithNamespace>;
|
|
@@ -89,7 +89,7 @@ interface TinaField {
|
|
|
89
89
|
* NOTE: only serializable values are supported, so functions like `validate`
|
|
90
90
|
* will be ignored.
|
|
91
91
|
*/
|
|
92
|
-
ui?:
|
|
92
|
+
ui?: object;
|
|
93
93
|
}
|
|
94
94
|
declare type ScalarType<WithNamespace extends boolean> = WithNamespace extends true ? ScalarTypeWithNamespace : ScalarTypeInner;
|
|
95
95
|
declare type Option = string | {
|
|
@@ -165,7 +165,6 @@ export interface ReferenceTypeInner extends TinaField {
|
|
|
165
165
|
name: string;
|
|
166
166
|
};
|
|
167
167
|
collections: string[];
|
|
168
|
-
ui?: UIField<any, string[]>;
|
|
169
168
|
}
|
|
170
169
|
export interface ReferenceTypeWithNamespace extends TinaField {
|
|
171
170
|
type: 'reference';
|
|
@@ -176,7 +175,6 @@ export interface ReferenceTypeWithNamespace extends TinaField {
|
|
|
176
175
|
name: string;
|
|
177
176
|
};
|
|
178
177
|
namespace: string[];
|
|
179
|
-
ui?: UIField<any, string[]>;
|
|
180
178
|
}
|
|
181
179
|
export interface RichTypeWithNamespace extends TinaField {
|
|
182
180
|
type: 'rich-text';
|