@latentic/live-markdown 0.0.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/LICENSE +21 -0
- package/README.md +265 -0
- package/dist/index.d.ts +805 -0
- package/dist/index.js +5804 -0
- package/dist/index.js.map +1 -0
- package/dist/styles.css +36 -0
- package/package.json +90 -0
package/dist/styles.css
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ai-editor — container layout.
|
|
3
|
+
*
|
|
4
|
+
* All *in-editor* styling (headings, bold, code, lists, image widgets, tables,
|
|
5
|
+
* math, links, footnotes, the image context menu) ships with the editor as a
|
|
6
|
+
* CodeMirror theme (`editorBaseTheme`) and applies automatically — you do not
|
|
7
|
+
* need this file for those.
|
|
8
|
+
*
|
|
9
|
+
* This stylesheet covers only the outer flex shell that makes the editor fill
|
|
10
|
+
* its parent and scroll. Import it once in a standalone app:
|
|
11
|
+
*
|
|
12
|
+
* import "ai-editor/styles.css";
|
|
13
|
+
*
|
|
14
|
+
* Hosts with their own layout (e.g. a flex column with a sibling sidebar) can
|
|
15
|
+
* skip it and supply equivalent rules — the editor needs its scroll area to be
|
|
16
|
+
* a flex child that can shrink (`min-block-size: 0`) and scroll.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
.cm-editor-host {
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
min-block-size: 0;
|
|
23
|
+
flex: 1 1 auto;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.cm-editor-host__scroll {
|
|
28
|
+
flex: 1 1 auto;
|
|
29
|
+
min-block-size: 0;
|
|
30
|
+
overflow: auto;
|
|
31
|
+
padding: 0;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.cm-editor-host .cm-editor {
|
|
35
|
+
height: 100%;
|
|
36
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@latentic/live-markdown",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"description": "A rich markdown editor for React built on CodeMirror 6 — write like Notion, store as plain .md. Headings, lists, tables, images, math, and footnotes render inline while the file stays markdown.",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"markdown",
|
|
9
|
+
"editor",
|
|
10
|
+
"rich-text",
|
|
11
|
+
"wysiwyg",
|
|
12
|
+
"codemirror",
|
|
13
|
+
"codemirror-6",
|
|
14
|
+
"react",
|
|
15
|
+
"markdown-editor",
|
|
16
|
+
"rich-markdown-editor",
|
|
17
|
+
"notion-like",
|
|
18
|
+
"live-preview",
|
|
19
|
+
"inline-preview",
|
|
20
|
+
"live-markdown",
|
|
21
|
+
"frontmatter",
|
|
22
|
+
"wikilinks",
|
|
23
|
+
"gfm",
|
|
24
|
+
"latex",
|
|
25
|
+
"katex",
|
|
26
|
+
"math",
|
|
27
|
+
"tables",
|
|
28
|
+
"footnotes",
|
|
29
|
+
"local-first"
|
|
30
|
+
],
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "https://github.com/getlatentic/compose",
|
|
34
|
+
"directory": "packages/rich-editor"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://github.com/getlatentic/compose/tree/main/packages/rich-editor#readme",
|
|
37
|
+
"bugs": "https://github.com/getlatentic/compose/issues",
|
|
38
|
+
"author": "Tosin Amuda <tosinamuda@gmail.com>",
|
|
39
|
+
"main": "dist/index.js",
|
|
40
|
+
"module": "dist/index.js",
|
|
41
|
+
"types": "dist/index.d.ts",
|
|
42
|
+
"exports": {
|
|
43
|
+
".": {
|
|
44
|
+
"types": "./dist/index.d.ts",
|
|
45
|
+
"import": "./dist/index.js"
|
|
46
|
+
},
|
|
47
|
+
"./styles.css": "./dist/styles.css"
|
|
48
|
+
},
|
|
49
|
+
"files": [
|
|
50
|
+
"dist",
|
|
51
|
+
"README.md",
|
|
52
|
+
"LICENSE"
|
|
53
|
+
],
|
|
54
|
+
"sideEffects": [
|
|
55
|
+
"*.css"
|
|
56
|
+
],
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "tsup && cp src/styles.css dist/styles.css",
|
|
59
|
+
"typecheck": "tsc --noEmit",
|
|
60
|
+
"prepublishOnly": "pnpm build"
|
|
61
|
+
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
64
|
+
"react-dom": "^18.0.0 || ^19.0.0"
|
|
65
|
+
},
|
|
66
|
+
"dependencies": {
|
|
67
|
+
"@codemirror/commands": "^6.10.3",
|
|
68
|
+
"@codemirror/lang-markdown": "^6.5.0",
|
|
69
|
+
"@codemirror/language": "^6.12.3",
|
|
70
|
+
"@codemirror/language-data": "^6.5.2",
|
|
71
|
+
"@codemirror/state": "^6.6.0",
|
|
72
|
+
"@codemirror/view": "^6.43.0",
|
|
73
|
+
"@joplin/turndown-plugin-gfm": "^1.0.67",
|
|
74
|
+
"@lezer/highlight": "^1.2.3",
|
|
75
|
+
"dompurify": "^3.4.12",
|
|
76
|
+
"katex": "^0.17.0",
|
|
77
|
+
"mermaid": "^11.16.1",
|
|
78
|
+
"turndown": "^7.2.4",
|
|
79
|
+
"yaml": "^2.9.0"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@amiceli/vitest-cucumber": "^7.0.0",
|
|
83
|
+
"@types/katex": "^0.16.8",
|
|
84
|
+
"@types/react": "^18.3.23",
|
|
85
|
+
"@types/turndown": "^5.0.6",
|
|
86
|
+
"fast-check": "^4.8.0",
|
|
87
|
+
"tsup": "^8.5.0",
|
|
88
|
+
"typescript": "~5.8.3"
|
|
89
|
+
}
|
|
90
|
+
}
|