@tinacms/schema-tools 0.0.0-e999254-20250610011143 → 0.0.0-eaa6ed5-20250729073245
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/dist/types/index.d.ts +28 -11
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -3,6 +3,21 @@ import type React from 'react';
|
|
|
3
3
|
export declare const CONTENT_FORMATS: readonly ["mdx", "md", "markdown", "json", "yaml", "yml", "toml"];
|
|
4
4
|
export type ContentFormat = (typeof CONTENT_FORMATS)[number];
|
|
5
5
|
export type ContentFrontmatterFormat = 'yaml' | 'toml' | 'json';
|
|
6
|
+
export type Parser = {
|
|
7
|
+
type: 'mdx';
|
|
8
|
+
} | {
|
|
9
|
+
type: 'markdown';
|
|
10
|
+
/**
|
|
11
|
+
* Tina will escape entities like `<` and `[` by default. You can choose to turn
|
|
12
|
+
* off all escaping, or specify HTML, so `<div>` will not be turned into `\<div>`
|
|
13
|
+
*/
|
|
14
|
+
skipEscaping?: 'all' | 'html' | 'none';
|
|
15
|
+
} | {
|
|
16
|
+
/**
|
|
17
|
+
* Experimental: Returns the native Slate.js document as JSON. Ideal to retain the pure editor content structure.
|
|
18
|
+
*/
|
|
19
|
+
type: 'slatejson';
|
|
20
|
+
};
|
|
6
21
|
type Meta = {
|
|
7
22
|
active?: boolean;
|
|
8
23
|
dirty?: boolean;
|
|
@@ -114,6 +129,11 @@ export type UIField<Type, List extends boolean> = {
|
|
|
114
129
|
type FieldGeneric<Type, List extends boolean | undefined, ExtraFieldUIProps = {}> = List extends true ? {
|
|
115
130
|
list: true;
|
|
116
131
|
ui?: UIField<Type, true> & ExtraFieldUIProps;
|
|
132
|
+
/**
|
|
133
|
+
* Defines where new items will be added in the list.
|
|
134
|
+
* If not specified, defaults to `append`.
|
|
135
|
+
*/
|
|
136
|
+
addItemBehavior?: 'append' | 'prepend';
|
|
117
137
|
} : List extends false ? {
|
|
118
138
|
list?: false;
|
|
119
139
|
ui?: UIField<Type, false> & ExtraFieldUIProps;
|
|
@@ -215,16 +235,7 @@ export type RichTextField<WithNamespace extends boolean = false> = (FieldGeneric
|
|
|
215
235
|
*
|
|
216
236
|
* Specify `"markdown"` if you're having problems with Tina parsing your content.
|
|
217
237
|
*/
|
|
218
|
-
parser?:
|
|
219
|
-
type: 'markdown';
|
|
220
|
-
/**
|
|
221
|
-
* Tina will escape entities like `<` and `[` by default. You can choose to turn
|
|
222
|
-
* off all escaping, or specify HTML, so `<div>` will not be turned into `\<div>`
|
|
223
|
-
*/
|
|
224
|
-
skipEscaping?: 'all' | 'html' | 'none';
|
|
225
|
-
} | {
|
|
226
|
-
type: 'mdx';
|
|
227
|
-
};
|
|
238
|
+
parser?: Parser;
|
|
228
239
|
};
|
|
229
240
|
export type RichTextTemplate<WithNamespace extends boolean = false> = Template<WithNamespace> & {
|
|
230
241
|
inline?: boolean;
|
|
@@ -417,11 +428,17 @@ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, Do
|
|
|
417
428
|
* ```
|
|
418
429
|
* [more info](https://vercel.com/docs/concepts/deployments/generated-urls#url-with-git-branch)
|
|
419
430
|
*/
|
|
420
|
-
previewUrl
|
|
431
|
+
previewUrl?: (context: {
|
|
421
432
|
branch: string;
|
|
422
433
|
}) => {
|
|
423
434
|
url: string;
|
|
424
435
|
};
|
|
436
|
+
/**
|
|
437
|
+
* Opt out of update checks - this will prevent the CMS for checking for new versions
|
|
438
|
+
* If true, the CMS will not check for updates.
|
|
439
|
+
* Defaults to false if not specified.
|
|
440
|
+
*/
|
|
441
|
+
optOutOfUpdateCheck?: boolean;
|
|
425
442
|
};
|
|
426
443
|
/**
|
|
427
444
|
* Configurations for the autogenerated GraphQL HTTP client
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/schema-tools",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-eaa6ed5-20250729073245",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"ts-jest": "^29.2.5",
|
|
33
33
|
"typescript": "^5.7.3",
|
|
34
34
|
"yup": "^0.32.11",
|
|
35
|
-
"@tinacms/scripts": "
|
|
35
|
+
"@tinacms/scripts": "1.4.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"react": ">=16.14.0",
|