@tinacms/schema-tools 2.5.0 → 2.7.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.
- package/dist/types/index.d.ts +43 -1
- package/package.json +2 -2
package/dist/types/index.d.ts
CHANGED
|
@@ -3,6 +3,12 @@ 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
|
+
/**
|
|
7
|
+
* Telemetry mode configured by the user in their tina config.
|
|
8
|
+
* - "anonymous": Anonymous telemetry (default)
|
|
9
|
+
* - "disabled": No telemetry collected
|
|
10
|
+
*/
|
|
11
|
+
export type TelemetryMode = 'anonymous' | 'disabled';
|
|
6
12
|
export type Parser = {
|
|
7
13
|
type: 'mdx';
|
|
8
14
|
} | {
|
|
@@ -296,7 +302,14 @@ export type RichTextTemplate<WithNamespace extends boolean = false> = Template<W
|
|
|
296
302
|
type ObjectUiProps = {
|
|
297
303
|
visualSelector?: boolean;
|
|
298
304
|
};
|
|
299
|
-
export type ObjectField<WithNamespace extends boolean = false> = (FieldGeneric<string, undefined, ObjectUiProps> | FieldGeneric<string, true, ObjectUiProps> | FieldGeneric<string, false, ObjectUiProps>) & MaybeNamespace<WithNamespace> & BaseField &
|
|
305
|
+
export type ObjectField<WithNamespace extends boolean = false> = (FieldGeneric<string, undefined, ObjectUiProps> | FieldGeneric<string, true, ObjectUiProps> | FieldGeneric<string, false, ObjectUiProps>) & MaybeNamespace<WithNamespace> & BaseField & {
|
|
306
|
+
/**
|
|
307
|
+
* @default false
|
|
308
|
+
* When `list: true`, automatically opens the form for newly created list items.
|
|
309
|
+
* When used without `list: true`, this does not do anything.
|
|
310
|
+
*/
|
|
311
|
+
openFormOnCreate?: boolean;
|
|
312
|
+
} & ({
|
|
300
313
|
type: 'object';
|
|
301
314
|
fields: Field<WithNamespace>[];
|
|
302
315
|
templates?: undefined;
|
|
@@ -542,6 +555,29 @@ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, Do
|
|
|
542
555
|
*/
|
|
543
556
|
basePath?: string;
|
|
544
557
|
};
|
|
558
|
+
/**
|
|
559
|
+
* Configuration for the local development server (`tinacms dev`).
|
|
560
|
+
* Has no effect on production deployments.
|
|
561
|
+
*/
|
|
562
|
+
server?: {
|
|
563
|
+
/**
|
|
564
|
+
* Origins allowed to make cross-origin requests to the dev server.
|
|
565
|
+
* Defaults to localhost / 127.0.0.1 / [::1] only. Each entry can be a string,
|
|
566
|
+
* RegExp, or `'private'` (expands to RFC 1918 private-network IPs).
|
|
567
|
+
*
|
|
568
|
+
* @example
|
|
569
|
+
* ```ts
|
|
570
|
+
* server: { allowedOrigins: ['https://my-codespace.github.dev'] }
|
|
571
|
+
* ```
|
|
572
|
+
*
|
|
573
|
+
* @example
|
|
574
|
+
* ```ts
|
|
575
|
+
* server: { allowedOrigins: ['private'] }
|
|
576
|
+
* ```
|
|
577
|
+
*
|
|
578
|
+
*/
|
|
579
|
+
allowedOrigins?: (RegExp | 'private' | (string & {}))[];
|
|
580
|
+
};
|
|
545
581
|
media?: {
|
|
546
582
|
/**
|
|
547
583
|
* Load a media store like Cloudinary
|
|
@@ -579,6 +615,12 @@ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, Do
|
|
|
579
615
|
loadCustomStore?: never;
|
|
580
616
|
accept?: string | string[];
|
|
581
617
|
};
|
|
618
|
+
/**
|
|
619
|
+
* Telemetry mode for TinaCMS.
|
|
620
|
+
*
|
|
621
|
+
* @default "anonymous"
|
|
622
|
+
*/
|
|
623
|
+
telemetry?: TelemetryMode;
|
|
582
624
|
/**
|
|
583
625
|
* Configuration for repository-related UI features.
|
|
584
626
|
*
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/schema-tools",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.7.0",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"ts-jest": "^29.2.5",
|
|
25
25
|
"typescript": "^5.7.3",
|
|
26
26
|
"yup": "^1.6.1",
|
|
27
|
-
"@tinacms/scripts": "1.
|
|
27
|
+
"@tinacms/scripts": "1.5.0"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"react": ">=16.14.0",
|