@tinacms/schema-tools 2.3.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.
@@ -727,6 +727,13 @@ interface BaseCollection {
727
727
  * The delimiters used to parse the frontmatter.
728
728
  */
729
729
  frontmatterDelimiters?: [string, string] | string;
730
+ /**
731
+ * The max line width used when serializing frontmatter for markdown and for content in YAML files.
732
+ * This sets the line length that reformats long strings with folded scalar syntax (>-).
733
+ * Setting to -1 disables line wrapping.
734
+ * @default -1
735
+ */
736
+ yamlMaxLineWidth?: number;
730
737
  match?: {
731
738
  include?: string;
732
739
  exclude?: string;
@@ -770,6 +777,16 @@ export interface UICollection<Form = any, CMS = any, TinaForm = any> {
770
777
  * Customize the way filenames are generated during content creation
771
778
  */
772
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;
773
790
  /**
774
791
  * A callback which receives form values as an argument. The return value
775
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.3.0",
4
+ "version": "2.5.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [