@tinacms/schema-tools 1.7.4 → 1.8.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.
@@ -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;
@@ -215,16 +230,7 @@ export type RichTextField<WithNamespace extends boolean = false> = (FieldGeneric
215
230
  *
216
231
  * Specify `"markdown"` if you're having problems with Tina parsing your content.
217
232
  */
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
- };
233
+ parser?: Parser;
228
234
  };
229
235
  export type RichTextTemplate<WithNamespace extends boolean = false> = Template<WithNamespace> & {
230
236
  inline?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinacms/schema-tools",
3
- "version": "1.7.4",
3
+ "version": "1.8.0",
4
4
  "main": "dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "exports": {