@latentic/live-markdown 0.0.1 → 0.1.1
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/CHANGELOG.md +58 -0
- package/README.md +71 -5
- package/dist/index.d.ts +53 -3
- package/dist/index.js +193 -63
- package/dist/index.js.map +1 -1
- package/dist/styles.css +7 -2
- package/package.json +43 -17
package/dist/styles.css
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* @latentic/live-markdown — container layout.
|
|
3
3
|
*
|
|
4
4
|
* All *in-editor* styling (headings, bold, code, lists, image widgets, tables,
|
|
5
5
|
* math, links, footnotes, the image context menu) ships with the editor as a
|
|
6
6
|
* CodeMirror theme (`editorBaseTheme`) and applies automatically — you do not
|
|
7
7
|
* need this file for those.
|
|
8
8
|
*
|
|
9
|
+
* The one exception is mathematics: KaTeX renders through its own stylesheet,
|
|
10
|
+
* which no theme can supply. An app that wants `$x$` to render imports it:
|
|
11
|
+
*
|
|
12
|
+
* import "katex/dist/katex.min.css";
|
|
13
|
+
*
|
|
9
14
|
* This stylesheet covers only the outer flex shell that makes the editor fill
|
|
10
15
|
* its parent and scroll. Import it once in a standalone app:
|
|
11
16
|
*
|
|
12
|
-
* import "
|
|
17
|
+
* import "@latentic/live-markdown/styles.css";
|
|
13
18
|
*
|
|
14
19
|
* Hosts with their own layout (e.g. a flex column with a sibling sidebar) can
|
|
15
20
|
* skip it and supply equivalent rules — the editor needs its scroll area to be
|
package/package.json
CHANGED
|
@@ -1,40 +1,50 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@latentic/live-markdown",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"description": "
|
|
6
|
+
"description": "WYSIWYG markdown editor for React, built on CodeMirror 6. Headings, tables, LaTeX math and Mermaid diagrams render inline as you type \u2014 no preview pane and no AST: value in and onChange out is the same markdown string, frontmatter included.",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"markdown",
|
|
9
|
-
"editor",
|
|
10
|
-
"rich-text",
|
|
9
|
+
"markdown-editor",
|
|
11
10
|
"wysiwyg",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
11
|
+
"wysiwyg-markdown",
|
|
12
|
+
"markdown-wysiwyg",
|
|
14
13
|
"react",
|
|
15
|
-
"markdown-editor",
|
|
14
|
+
"react-markdown-editor",
|
|
15
|
+
"rich-text-editor",
|
|
16
16
|
"rich-markdown-editor",
|
|
17
|
-
"
|
|
17
|
+
"text-editor",
|
|
18
|
+
"editor",
|
|
19
|
+
"codemirror",
|
|
20
|
+
"codemirror-6",
|
|
21
|
+
"codemirror-extension",
|
|
18
22
|
"live-preview",
|
|
19
23
|
"inline-preview",
|
|
24
|
+
"markdown-preview",
|
|
20
25
|
"live-markdown",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"gfm",
|
|
26
|
+
"mermaid",
|
|
27
|
+
"mermaid-diagrams",
|
|
24
28
|
"latex",
|
|
25
29
|
"katex",
|
|
26
30
|
"math",
|
|
31
|
+
"gfm",
|
|
27
32
|
"tables",
|
|
28
33
|
"footnotes",
|
|
34
|
+
"wikilinks",
|
|
35
|
+
"frontmatter",
|
|
36
|
+
"notion-like",
|
|
37
|
+
"obsidian",
|
|
29
38
|
"local-first"
|
|
30
39
|
],
|
|
31
40
|
"repository": {
|
|
32
41
|
"type": "git",
|
|
33
|
-
"url": "https://github.com/getlatentic/
|
|
34
|
-
|
|
42
|
+
"url": "git+https://github.com/getlatentic/live-markdown.git"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/getlatentic/live-markdown#readme",
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/getlatentic/live-markdown/issues"
|
|
35
47
|
},
|
|
36
|
-
"homepage": "https://github.com/getlatentic/compose/tree/main/packages/rich-editor#readme",
|
|
37
|
-
"bugs": "https://github.com/getlatentic/compose/issues",
|
|
38
48
|
"author": "Tosin Amuda <tosinamuda@gmail.com>",
|
|
39
49
|
"main": "dist/index.js",
|
|
40
50
|
"module": "dist/index.js",
|
|
@@ -49,14 +59,21 @@
|
|
|
49
59
|
"files": [
|
|
50
60
|
"dist",
|
|
51
61
|
"README.md",
|
|
62
|
+
"CHANGELOG.md",
|
|
52
63
|
"LICENSE"
|
|
53
64
|
],
|
|
65
|
+
"publishConfig": {
|
|
66
|
+
"access": "public"
|
|
67
|
+
},
|
|
54
68
|
"sideEffects": [
|
|
55
69
|
"*.css"
|
|
56
70
|
],
|
|
57
71
|
"scripts": {
|
|
58
72
|
"build": "tsup && cp src/styles.css dist/styles.css",
|
|
59
73
|
"typecheck": "tsc --noEmit",
|
|
74
|
+
"test": "vitest run",
|
|
75
|
+
"test:browser": "vitest run --config vitest.browser.config.ts",
|
|
76
|
+
"check": "pnpm typecheck && pnpm build && pnpm test && pnpm test:browser",
|
|
60
77
|
"prepublishOnly": "pnpm build"
|
|
61
78
|
},
|
|
62
79
|
"peerDependencies": {
|
|
@@ -82,9 +99,18 @@
|
|
|
82
99
|
"@amiceli/vitest-cucumber": "^7.0.0",
|
|
83
100
|
"@types/katex": "^0.16.8",
|
|
84
101
|
"@types/react": "^18.3.23",
|
|
102
|
+
"@types/react-dom": "^18.3.7",
|
|
85
103
|
"@types/turndown": "^5.0.6",
|
|
104
|
+
"@vitest/browser": "3.2.7",
|
|
86
105
|
"fast-check": "^4.8.0",
|
|
106
|
+
"jsdom": "^29.1.1",
|
|
107
|
+
"playwright": "^1.61.1",
|
|
108
|
+
"react": "^18.3.1",
|
|
109
|
+
"react-dom": "^18.3.1",
|
|
87
110
|
"tsup": "^8.5.0",
|
|
88
|
-
"typescript": "~5.8.3"
|
|
89
|
-
|
|
111
|
+
"typescript": "~5.8.3",
|
|
112
|
+
"vite": "^7.3.6",
|
|
113
|
+
"vitest": "^3.2.7"
|
|
114
|
+
},
|
|
115
|
+
"packageManager": "pnpm@10.33.0"
|
|
90
116
|
}
|