@clevertask/scribe 0.0.3 → 0.0.5
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/{SlashCommandList-D_Ndw6pj.js → SlashCommandList-DLPd43Tg.js} +538 -538
- package/dist/assets/index.css +1 -0
- package/dist/{browser-D3_ToIiA.js → browser-Ce149ePN.js} +497 -508
- package/dist/components/Menu/BubbleMenu.js +1 -1
- package/dist/components/Scribe/extension/extension-link.js +482 -432
- package/dist/components/Scribe/extension/extension-selectedText.js +1 -1
- package/dist/components/Scribe/extension/index.d.ts +1 -1
- package/dist/components/Scribe/extension/index.js +1851 -1816
- package/dist/components/Scribe/extension/math-extension.d.ts +2 -0
- package/dist/components/Scribe/extension/math-extension.js +11766 -0
- package/dist/components/Scribe/extension/slashCommand/SlashCommandList.js +3 -3
- package/dist/components/Scribe/extension/slashCommand/index.js +76 -75
- package/dist/components/Scribe/extension/slashCommand/renderItems.js +2 -2
- package/dist/components/Scribe/index.js +3 -3
- package/dist/{index-ggVAwdRQ.js → index-B9XP9QDO.js} +520 -516
- package/dist/{index-CUP7vhu5.js → index-DzExyr-e.js} +2066 -1943
- package/dist/main.css +1 -1
- package/dist/{turndown.browser.es-CeowJDZ0.js → turndown.browser.es-BSoGafvq.js} +249 -253
- package/dist/utils/html-to-markdown.js +32 -8
- package/dist/utils/markdown-to-html.js +1 -1
- package/package.json +44 -42
|
@@ -1,10 +1,34 @@
|
|
|
1
|
-
import { T as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { T as o, p as i } from "../turndown.browser.es-BSoGafvq.js";
|
|
2
|
+
const u = (a) => {
|
|
3
|
+
const e = new o({
|
|
4
|
+
headingStyle: "atx",
|
|
5
|
+
hr: "---",
|
|
6
|
+
bulletListMarker: "-",
|
|
7
|
+
codeBlockStyle: "fenced"
|
|
8
|
+
});
|
|
9
|
+
e.addRule("latex", {
|
|
10
|
+
filter: function(t) {
|
|
11
|
+
return t.nodeName === "SPAN" && t.getAttribute("data-type") === "latex";
|
|
12
|
+
},
|
|
13
|
+
replacement: function(t, n) {
|
|
14
|
+
const r = n.getAttribute("data-content") || "";
|
|
15
|
+
return n.getAttribute("data-display-mode") === "true" ? `
|
|
16
|
+
|
|
17
|
+
$$
|
|
18
|
+
${r}
|
|
19
|
+
$$
|
|
20
|
+
|
|
21
|
+
` : `$${r}$`;
|
|
22
|
+
}
|
|
23
|
+
}), e.addRule("strikethrough", {
|
|
24
|
+
filter: ["del", "s"],
|
|
25
|
+
replacement: function(t) {
|
|
26
|
+
return "~~" + t + "~~";
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const c = (t) => t.replace(/<span([^>]+data-type="latex"[^>]*)><\/span>/g, "<span$1>•</span>");
|
|
30
|
+
return e.turndown(i.sanitize(c(a)));
|
|
31
|
+
};
|
|
8
32
|
export {
|
|
9
|
-
|
|
33
|
+
u as html2md
|
|
10
34
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"description": "A Tiptap-based rich text editor with a Notion-style block interface for viewing and creating content. Perfect for diverse needs like notes, documents, AI chat, Markdown parsing, and comments.",
|
|
4
4
|
"author": "CleverTask",
|
|
5
5
|
"private": false,
|
|
6
|
-
"version": "0.0.
|
|
6
|
+
"version": "0.0.5",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "dist/main.js",
|
|
9
9
|
"types": "dist/main.d.ts",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"dev": "vite",
|
|
36
|
-
"build": "
|
|
36
|
+
"build": "vite build && npm run build:style",
|
|
37
37
|
"build:style": "postcss ./lib/styles/main.css -o ./dist/main.css",
|
|
38
38
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
39
39
|
"preview": "vite preview",
|
|
@@ -41,33 +41,33 @@
|
|
|
41
41
|
"prettier:format": "npx prettier . --write"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"react": "^18.
|
|
45
|
-
"react-dom": "^18.
|
|
44
|
+
"react": "^18.3.1",
|
|
45
|
+
"react-dom": "^18.3.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"@tailwindcss/typography": "^0.5.
|
|
49
|
-
"@types/lodash": "^4.
|
|
50
|
-
"@types/node": "^22.
|
|
51
|
-
"@types/react": "^18.3.
|
|
52
|
-
"@types/react-dom": "^18.3.
|
|
48
|
+
"@tailwindcss/typography": "^0.5.16",
|
|
49
|
+
"@types/lodash": "^4.17.16",
|
|
50
|
+
"@types/node": "^22.15.3",
|
|
51
|
+
"@types/react": "^18.3.20",
|
|
52
|
+
"@types/react-dom": "^18.3.6",
|
|
53
53
|
"@types/turndown": "^5.0.5",
|
|
54
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
55
|
-
"@typescript-eslint/parser": "^8.
|
|
56
|
-
"@vitejs/plugin-react": "^4.
|
|
57
|
-
"autoprefixer": "^10.4.
|
|
58
|
-
"eslint": "^9.
|
|
59
|
-
"eslint-plugin-react-hooks": "^5.
|
|
60
|
-
"eslint-plugin-react-refresh": "^0.4.
|
|
61
|
-
"glob": "^11.0.
|
|
54
|
+
"@typescript-eslint/eslint-plugin": "^8.31.0",
|
|
55
|
+
"@typescript-eslint/parser": "^8.31.0",
|
|
56
|
+
"@vitejs/plugin-react": "^4.4.1",
|
|
57
|
+
"autoprefixer": "^10.4.21",
|
|
58
|
+
"eslint": "^9.25.1",
|
|
59
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
60
|
+
"eslint-plugin-react-refresh": "^0.4.20",
|
|
61
|
+
"glob": "^11.0.2",
|
|
62
62
|
"lodash": "^4.17.21",
|
|
63
|
-
"postcss": "^8.
|
|
64
|
-
"postcss-cli": "^11.0.
|
|
63
|
+
"postcss": "^8.5.3",
|
|
64
|
+
"postcss-cli": "^11.0.1",
|
|
65
65
|
"prettier": "3.4.2",
|
|
66
|
-
"tailwindcss": "^3.4.
|
|
67
|
-
"typescript": "^5.
|
|
68
|
-
"vite": "^6.
|
|
69
|
-
"vite-plugin-dts": "^4.3
|
|
70
|
-
"vite-plugin-lib-inject-css": "^2.
|
|
66
|
+
"tailwindcss": "^3.4.17",
|
|
67
|
+
"typescript": "^5.8.3",
|
|
68
|
+
"vite": "^6.3.3",
|
|
69
|
+
"vite-plugin-dts": "^4.5.3",
|
|
70
|
+
"vite-plugin-lib-inject-css": "^2.2.2"
|
|
71
71
|
},
|
|
72
72
|
"prepublishOnly": "npm run build",
|
|
73
73
|
"publishConfig": {
|
|
@@ -75,25 +75,27 @@
|
|
|
75
75
|
"registry": "https://registry.npmjs.org/"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@tiptap/core": "^2.
|
|
79
|
-
"@tiptap/extension-focus": "^2.
|
|
80
|
-
"@tiptap/extension-highlight": "^2.
|
|
81
|
-
"@tiptap/extension-image": "^2.
|
|
82
|
-
"@tiptap/extension-link": "^2.
|
|
83
|
-
"@tiptap/extension-placeholder": "^2.
|
|
84
|
-
"@tiptap/extension-table": "^2.11.
|
|
85
|
-
"@tiptap/extension-table-cell": "^2.11.
|
|
86
|
-
"@tiptap/extension-table-header": "^2.11.
|
|
87
|
-
"@tiptap/extension-table-row": "^2.11.
|
|
88
|
-
"@tiptap/extension-task-item": "^2.11.
|
|
89
|
-
"@tiptap/extension-task-list": "^2.11.
|
|
90
|
-
"@tiptap/
|
|
91
|
-
"@tiptap/
|
|
92
|
-
"@tiptap/
|
|
93
|
-
"@tiptap/
|
|
78
|
+
"@tiptap/core": "^2.11.7",
|
|
79
|
+
"@tiptap/extension-focus": "^2.11.7",
|
|
80
|
+
"@tiptap/extension-highlight": "^2.11.7",
|
|
81
|
+
"@tiptap/extension-image": "^2.11.7",
|
|
82
|
+
"@tiptap/extension-link": "^2.11.7",
|
|
83
|
+
"@tiptap/extension-placeholder": "^2.11.7",
|
|
84
|
+
"@tiptap/extension-table": "^2.11.7",
|
|
85
|
+
"@tiptap/extension-table-cell": "^2.11.7",
|
|
86
|
+
"@tiptap/extension-table-header": "^2.11.7",
|
|
87
|
+
"@tiptap/extension-table-row": "^2.11.7",
|
|
88
|
+
"@tiptap/extension-task-item": "^2.11.7",
|
|
89
|
+
"@tiptap/extension-task-list": "^2.11.7",
|
|
90
|
+
"@tiptap/extension-typography": "^2.11.7",
|
|
91
|
+
"@tiptap/pm": "^2.11.7",
|
|
92
|
+
"@tiptap/react": "^2.11.7",
|
|
93
|
+
"@tiptap/starter-kit": "^2.11.7",
|
|
94
|
+
"@tiptap/suggestion": "^2.11.7",
|
|
94
95
|
"clsx": "^2.1.1",
|
|
95
|
-
"isomorphic-dompurify": "^2.
|
|
96
|
-
"
|
|
96
|
+
"isomorphic-dompurify": "^2.24.0",
|
|
97
|
+
"katex": "^0.16.22",
|
|
98
|
+
"marked": "^15.0.11",
|
|
97
99
|
"turndown": "^7.2.0"
|
|
98
100
|
}
|
|
99
101
|
}
|