@tinacms/schema-tools 2.4.0 → 2.6.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 +22 -0
- 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
|
} | {
|
|
@@ -579,6 +585,12 @@ export interface Config<CMSCallback = undefined, FormifyCallback = undefined, Do
|
|
|
579
585
|
loadCustomStore?: never;
|
|
580
586
|
accept?: string | string[];
|
|
581
587
|
};
|
|
588
|
+
/**
|
|
589
|
+
* Telemetry mode for TinaCMS.
|
|
590
|
+
*
|
|
591
|
+
* @default "anonymous"
|
|
592
|
+
*/
|
|
593
|
+
telemetry?: TelemetryMode;
|
|
582
594
|
/**
|
|
583
595
|
* Configuration for repository-related UI features.
|
|
584
596
|
*
|
|
@@ -777,6 +789,16 @@ export interface UICollection<Form = any, CMS = any, TinaForm = any> {
|
|
|
777
789
|
* Customize the way filenames are generated during content creation
|
|
778
790
|
*/
|
|
779
791
|
filename?: {
|
|
792
|
+
/**
|
|
793
|
+
* A callback function which formats the filename each time the value changes
|
|
794
|
+
* to enforce naming constraints (the extension is not necessary)
|
|
795
|
+
*
|
|
796
|
+
* eg:
|
|
797
|
+
* ```ts
|
|
798
|
+
* parse: (value) => value.toLowerCase().split(" ").join("-")
|
|
799
|
+
* ```
|
|
800
|
+
*/
|
|
801
|
+
parse?: (filename: string) => string;
|
|
780
802
|
/**
|
|
781
803
|
* A callback which receives form values as an argument. The return value
|
|
782
804
|
* here will be used as the filename (the extension is not necessary)
|
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.6.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",
|