@tinacms/mdx 0.0.0-a4a2eeb-20250102014725 → 0.0.0-a5286f1-20250610054553
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/index.browser.mjs +31768 -31725
- package/dist/index.js +28244 -28230
- package/dist/index.mjs +28013 -27970
- package/dist/next/stringify/pre-processing.d.ts +0 -2
- package/dist/next/tests/markdown-basic-marks-strikethrough/field.d.ts +2 -0
- package/dist/next/tests/markdown-basic-marks-strikethrough/index.test.d.ts +1 -0
- package/dist/next/tests/slatejson/field.d.ts +2 -0
- package/dist/next/tests/slatejson/index.test.d.ts +1 -0
- package/dist/next/tests/util.d.ts +1 -0
- package/dist/parse/index.d.ts +1 -1
- package/dist/parse/plate.d.ts +1 -0
- package/dist/stringify/acorn.d.ts +1 -1
- package/dist/stringify/index.d.ts +3 -7
- package/package.json +6 -6
|
@@ -5,5 +5,3 @@ import type { RootElement } from '../../parse/plate';
|
|
|
5
5
|
export declare const preProcess: (tree: RootElement, field: RichTextField, imageCallback: (url: string) => string) => Md.Root;
|
|
6
6
|
export declare const rootElement: (content: Plate.RootElement, field: RichTextField, imageCallback: (url: string) => string) => Md.Root;
|
|
7
7
|
export declare const blockElement: (content: Plate.BlockElement, field: RichTextField, imageCallback: (url: string) => string) => Md.Content | null;
|
|
8
|
-
export type Marks = 'strong' | 'emphasis' | 'inlineCode';
|
|
9
|
-
export declare const getMarks: (content: Plate.InlineElement) => Marks[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,3 +2,4 @@ export declare function removePosition(tree: any): any;
|
|
|
2
2
|
export declare const print: (tree: object) => string;
|
|
3
3
|
export declare const nodePath: (dir: string) => string;
|
|
4
4
|
export declare const mdPath: (dir: string) => string;
|
|
5
|
+
export declare const jsonPath: (dir: string) => string;
|
package/dist/parse/index.d.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
*/
|
|
6
|
-
import { RichTextParseError } from './remarkToPlate';
|
|
7
6
|
import type { RichTextType } from '@tinacms/schema-tools';
|
|
8
7
|
import type * as Plate from './plate';
|
|
8
|
+
import { RichTextParseError } from './remarkToPlate';
|
|
9
9
|
/**
|
|
10
10
|
* ### Convert the MDXAST into an API-friendly format
|
|
11
11
|
*
|
package/dist/parse/plate.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RichTextField } from '@tinacms/schema-tools';
|
|
2
|
+
import type * as Md from 'mdast';
|
|
2
3
|
import type { MdxJsxAttribute } from 'mdast-util-mdx-jsx';
|
|
3
4
|
import * as Plate from '../parse/plate';
|
|
4
|
-
import type * as Md from 'mdast';
|
|
5
5
|
export declare const stringifyPropsInline: (element: Plate.MdxInlineElement, field: RichTextField, imageCallback: (url: string) => string) => {
|
|
6
6
|
attributes: MdxJsxAttribute[];
|
|
7
7
|
children: Md.PhrasingContent[];
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
*/
|
|
6
|
-
import { MdxJsxTextElement, MdxJsxFlowElement } from 'mdast-util-mdx-jsx';
|
|
7
1
|
import type { RichTextType } from '@tinacms/schema-tools';
|
|
8
2
|
import type * as Md from 'mdast';
|
|
3
|
+
import { MdxJsxFlowElement, MdxJsxTextElement } from 'mdast-util-mdx-jsx';
|
|
9
4
|
import type * as Plate from '../parse/plate';
|
|
10
5
|
declare module 'mdast' {
|
|
11
6
|
interface StaticPhrasingContentMap {
|
|
@@ -21,6 +16,7 @@ declare module 'mdast' {
|
|
|
21
16
|
mdxJsxFlowElement: MdxJsxFlowElement;
|
|
22
17
|
}
|
|
23
18
|
}
|
|
19
|
+
export declare const formatMdxForPersistence: (value: Plate.RootElement, field: RichTextType, imageCallback: (url: string) => string) => Plate.RootElement | string | undefined;
|
|
24
20
|
export declare const stringifyMDX: (value: Plate.RootElement, field: RichTextType, imageCallback: (url: string) => string) => string | undefined;
|
|
25
21
|
export type Pattern = {
|
|
26
22
|
start: string;
|
|
@@ -32,5 +28,5 @@ export type Pattern = {
|
|
|
32
28
|
export declare const toTinaMarkdown: (tree: Md.Root, field: RichTextType) => string;
|
|
33
29
|
export declare const rootElement: (content: Plate.RootElement, field: RichTextType, imageCallback: (url: string) => string) => Md.Root;
|
|
34
30
|
export declare const blockElement: (content: Plate.BlockElement, field: RichTextType, imageCallback: (url: string) => string) => Md.Content | null;
|
|
35
|
-
export type Marks = 'strong' | 'emphasis' | 'inlineCode';
|
|
31
|
+
export type Marks = 'strong' | 'emphasis' | 'inlineCode' | 'delete';
|
|
36
32
|
export declare const getMarks: (content: Plate.InlineElement) => Marks[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tinacms/mdx",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-a5286f1-20250610054553",
|
|
4
4
|
"typings": "dist/index.d.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"browser": "dist/index.browser.mjs",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"unist-util-visit": "4.1.2",
|
|
57
57
|
"uvu": "0.5.6",
|
|
58
58
|
"vfile-message": "3.1.4",
|
|
59
|
-
"@tinacms/schema-tools": "
|
|
59
|
+
"@tinacms/schema-tools": "0.0.0-a5286f1-20250610054553"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"registry": "https://registry.npmjs.org"
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@types/estree": "1.0.0",
|
|
70
70
|
"@types/lodash.flatten": "^4.4.9",
|
|
71
71
|
"@types/mdast": "^3.0.15",
|
|
72
|
-
"@types/node": "^22.
|
|
72
|
+
"@types/node": "^22.13.1",
|
|
73
73
|
"@types/prettier": "^2.7.3",
|
|
74
74
|
"@types/unist": "^2.0.11",
|
|
75
75
|
"c8": "^7.14.0",
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
"jest-file-snapshot": "^0.5.0",
|
|
78
78
|
"ts-node": "^10.9.2",
|
|
79
79
|
"typedoc-plugin-markdown": "^3.17.1",
|
|
80
|
-
"typescript": "^5.
|
|
81
|
-
"vite": "^4.5.
|
|
80
|
+
"typescript": "^5.7.3",
|
|
81
|
+
"vite": "^4.5.9",
|
|
82
82
|
"vitest": "^0.32.4",
|
|
83
|
-
"@tinacms/scripts": "1.3.
|
|
83
|
+
"@tinacms/scripts": "1.3.5"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"types": "tsc",
|