@4399ywkf/editor 0.1.2 → 0.3.0
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/{DocView-5KS7B4DA.js → DocView-GDN5CZCJ.js} +3 -3
- package/dist/{DocView-5KS7B4DA.js.map → DocView-GDN5CZCJ.js.map} +1 -1
- package/dist/{chunk-G6WM2PSU.js → chunk-ZRFOS52C.js} +111 -8
- package/dist/chunk-ZRFOS52C.js.map +1 -0
- package/dist/doc-runtime.d.ts +358 -0
- package/dist/doc-runtime.js +774 -0
- package/dist/doc-runtime.js.map +1 -0
- package/dist/doc.js +1 -1
- package/dist/docx.d.ts +121 -6
- package/dist/docx.js +421 -40
- package/dist/docx.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/style.css +22 -0
- package/package.json +15 -11
- package/dist/chunk-G6WM2PSU.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ registerFormat({
|
|
|
29
29
|
importExtensions: [".docx", ".md", ".html"],
|
|
30
30
|
exportFormats: ["docx", "html", "json", "markdown"]
|
|
31
31
|
},
|
|
32
|
-
load: () => import('./DocView-
|
|
32
|
+
load: () => import('./DocView-GDN5CZCJ.js')
|
|
33
33
|
});
|
|
34
34
|
registerFormat({
|
|
35
35
|
format: "sheet",
|
package/dist/style.css
CHANGED
|
@@ -5687,3 +5687,25 @@ span.tiptap-slash-decoration.is-empty::after {
|
|
|
5687
5687
|
min-width: 15rem;
|
|
5688
5688
|
}
|
|
5689
5689
|
}
|
|
5690
|
+
|
|
5691
|
+
/* doc-runtime/ai-flash.scss */
|
|
5692
|
+
@charset "UTF-8";
|
|
5693
|
+
/**
|
|
5694
|
+
* AI 改动块的闪烁提示。
|
|
5695
|
+
*
|
|
5696
|
+
* DocRuntime 的默认 highlight 实现给改动到的块加上 .ai-flash,1.4s 后摘掉 ——
|
|
5697
|
+
* 让用户看得见「刚才 AI 动了哪儿」。不想要的话 `new DocRuntime({ highlight: false })`。
|
|
5698
|
+
*/
|
|
5699
|
+
.ai-flash {
|
|
5700
|
+
animation: ai-flash-bg 1.4s ease-out;
|
|
5701
|
+
border-radius: 0.25rem;
|
|
5702
|
+
}
|
|
5703
|
+
|
|
5704
|
+
@keyframes ai-flash-bg {
|
|
5705
|
+
0% {
|
|
5706
|
+
background-color: var(--tt-brand-color-100, rgba(99, 102, 241, 0.28));
|
|
5707
|
+
}
|
|
5708
|
+
100% {
|
|
5709
|
+
background-color: transparent;
|
|
5710
|
+
}
|
|
5711
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@4399ywkf/editor",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "4399 多格式文档编辑器:doc(tiptap) / sheet(univer) / pdf,含 docx 导入导出与 AI
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "4399 多格式文档编辑器:doc(tiptap) / sheet(univer) / pdf,含 docx 导入导出与 AI 可驱动的结构化编辑面(./doc-runtime)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -26,6 +26,10 @@
|
|
|
26
26
|
"types": "./dist/docx.d.ts",
|
|
27
27
|
"import": "./dist/docx.js"
|
|
28
28
|
},
|
|
29
|
+
"./doc-runtime": {
|
|
30
|
+
"types": "./dist/doc-runtime.d.ts",
|
|
31
|
+
"import": "./dist/doc-runtime.js"
|
|
32
|
+
},
|
|
29
33
|
"./styles": "./dist/style.css",
|
|
30
34
|
"./package.json": "./package.json"
|
|
31
35
|
},
|
|
@@ -35,13 +39,6 @@
|
|
|
35
39
|
"sideEffects": [
|
|
36
40
|
"*.css"
|
|
37
41
|
],
|
|
38
|
-
"scripts": {
|
|
39
|
-
"build": "tsup && node scripts/build-styles.mjs",
|
|
40
|
-
"dev": "tsup --watch",
|
|
41
|
-
"test": "node --experimental-strip-types --test src/docx/*.test.ts",
|
|
42
|
-
"typecheck": "tsc --noEmit",
|
|
43
|
-
"prepublishOnly": "npm run build"
|
|
44
|
-
},
|
|
45
42
|
"dependencies": {
|
|
46
43
|
"@ariakit/react": "^0.4.26",
|
|
47
44
|
"@base-ui/react": "^1.5.0",
|
|
@@ -103,6 +100,7 @@
|
|
|
103
100
|
"@types/react": "^19.1.6",
|
|
104
101
|
"@types/react-dom": "^19.1.6",
|
|
105
102
|
"@xmldom/xmldom": "^0.9.11",
|
|
103
|
+
"happy-dom": "^20.11.2",
|
|
106
104
|
"sass": "^1.99.0",
|
|
107
105
|
"tsup": "^8.4.0",
|
|
108
106
|
"typescript": "^5.8.2"
|
|
@@ -121,5 +119,11 @@
|
|
|
121
119
|
"authors": [
|
|
122
120
|
"ywjszx@4399.com"
|
|
123
121
|
],
|
|
124
|
-
"license": "ISC"
|
|
125
|
-
|
|
122
|
+
"license": "ISC",
|
|
123
|
+
"scripts": {
|
|
124
|
+
"build": "tsup && node scripts/build-styles.mjs",
|
|
125
|
+
"dev": "tsup --watch",
|
|
126
|
+
"test": "node --experimental-strip-types --test src/docx/*.test.ts src/doc-runtime/*.test.ts",
|
|
127
|
+
"typecheck": "tsc --noEmit"
|
|
128
|
+
}
|
|
129
|
+
}
|