@tinacms/schema-tools 2.4.0 → 2.5.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.
@@ -777,6 +777,16 @@ export interface UICollection<Form = any, CMS = any, TinaForm = any> {
777
777
  * Customize the way filenames are generated during content creation
778
778
  */
779
779
  filename?: {
780
+ /**
781
+ * A callback function which formats the filename each time the value changes
782
+ * to enforce naming constraints (the extension is not necessary)
783
+ *
784
+ * eg:
785
+ * ```ts
786
+ * parse: (value) => value.toLowerCase().split(" ").join("-")
787
+ * ```
788
+ */
789
+ parse?: (filename: string) => string;
780
790
  /**
781
791
  * A callback which receives form values as an argument. The return value
782
792
  * 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.0",
4
+ "version": "2.5.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [