@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.
@@ -1,10 +1,34 @@
1
- import { T as r, p as t } from "../turndown.browser.es-CeowJDZ0.js";
2
- const o = (e) => new r({
3
- headingStyle: "atx",
4
- hr: "---",
5
- bulletListMarker: "-",
6
- codeBlockStyle: "fenced"
7
- }).turndown(t.sanitize(e));
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
- o as html2md
33
+ u as html2md
10
34
  };
@@ -1,4 +1,4 @@
1
- import { D as s, m } from "../browser-D3_ToIiA.js";
1
+ import { D as s, m } from "../browser-Ce149ePN.js";
2
2
  const e = (a) => s.sanitize(m.parse(a, { async: !1 }));
3
3
  export {
4
4
  e as md2html
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.3",
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": "tsc --p ./tsconfig-build.json && vite build && npm run build:style",
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.0.0",
45
- "react-dom": "^18.0.0"
44
+ "react": "^18.3.1",
45
+ "react-dom": "^18.3.1"
46
46
  },
47
47
  "devDependencies": {
48
- "@tailwindcss/typography": "^0.5.15",
49
- "@types/lodash": "^4.14.201",
50
- "@types/node": "^22.10.1",
51
- "@types/react": "^18.3.12",
52
- "@types/react-dom": "^18.3.1",
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.16.0",
55
- "@typescript-eslint/parser": "^8.16.0",
56
- "@vitejs/plugin-react": "^4.3.4",
57
- "autoprefixer": "^10.4.20",
58
- "eslint": "^9.16.0",
59
- "eslint-plugin-react-hooks": "^5.0.0",
60
- "eslint-plugin-react-refresh": "^0.4.14",
61
- "glob": "^11.0.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.4.49",
64
- "postcss-cli": "^11.0.0",
63
+ "postcss": "^8.5.3",
64
+ "postcss-cli": "^11.0.1",
65
65
  "prettier": "3.4.2",
66
- "tailwindcss": "^3.4.15",
67
- "typescript": "^5.7.2",
68
- "vite": "^6.0.2",
69
- "vite-plugin-dts": "^4.3.0",
70
- "vite-plugin-lib-inject-css": "^2.1.1"
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.10.3",
79
- "@tiptap/extension-focus": "^2.10.3",
80
- "@tiptap/extension-highlight": "^2.10.3",
81
- "@tiptap/extension-image": "^2.10.3",
82
- "@tiptap/extension-link": "^2.10.3",
83
- "@tiptap/extension-placeholder": "^2.10.3",
84
- "@tiptap/extension-table": "^2.11.5",
85
- "@tiptap/extension-table-cell": "^2.11.5",
86
- "@tiptap/extension-table-header": "^2.11.5",
87
- "@tiptap/extension-table-row": "^2.11.5",
88
- "@tiptap/extension-task-item": "^2.11.5",
89
- "@tiptap/extension-task-list": "^2.11.5",
90
- "@tiptap/pm": "^2.10.3",
91
- "@tiptap/react": "^2.10.3",
92
- "@tiptap/starter-kit": "^2.10.3",
93
- "@tiptap/suggestion": "^2.10.3",
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.18.0",
96
- "marked": "^15.0.3",
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
  }