@agilehub/agile-editor 1.6.0 → 1.7.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.
@@ -112,12 +112,37 @@ const editor = shallowRef<Editor>()
112
112
  | `toolbar_table` | “表格”工具栏 |
113
113
  | `toolbar_tools` | “工具”工具栏 |
114
114
  | `toolbar_view` | “视图”工具栏 |
115
- | `toolbar_copyediting` | “审阅/校对”工具栏 |
115
+ | `toolbar_review` | “审阅”工具栏,对应 `review` 菜单 |
116
+ | `toolbar_extension` | “扩展”工具栏,可通过 `extension` 菜单启用 |
117
+ | `toolbar_enhancement` | “增强”工具栏,可通过 `enhancement` 菜单启用 |
116
118
  | `toolbar_actions` | 工具栏右侧操作区 |
117
119
  | `bubble_menu` | 选区或节点浮动菜单 |
118
120
 
119
121
  插槽对应的菜单必须在 `toolbar.menus` 中启用。
120
122
 
123
+ ```vue
124
+ <AgileEditor
125
+ :toolbar="{
126
+ menus: ['base', 'insert', 'extension', 'enhancement'],
127
+ }"
128
+ >
129
+ <template #toolbar_extension="{ toolbarMode }">
130
+ <AgileMenuButton
131
+ ico="block-add"
132
+ text="扩展能力"
133
+ :data-toolbar-mode="toolbarMode"
134
+ />
135
+ </template>
136
+ <template #toolbar_enhancement="{ toolbarMode }">
137
+ <AgileMenuButton
138
+ ico="ai"
139
+ text="增强能力"
140
+ :data-toolbar-mode="toolbarMode"
141
+ />
142
+ </template>
143
+ </AgileEditor>
144
+ ```
145
+
121
146
  ### 按钮打开业务弹窗
122
147
 
123
148
  ```vue
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilehub/agile-editor",
3
- "version": "1.6.0",
3
+ "version": "1.7.0",
4
4
  "description": "Rich text editor based on Vue 3 and Tiptap 3",
5
5
  "author": "lytdev <lytdev@outlook.com>",
6
6
  "keywords": [
@@ -48,6 +48,8 @@
48
48
  "dev": "vite --port 9000 --open --force",
49
49
  "format": "oxfmt --write .",
50
50
  "lint": "oxlint --fix src",
51
+ "lint:style": "stylelint \"src/**/*.{vue,less}\" \"dev/**/*.{vue,less}\"",
52
+ "lint:style:fix": "stylelint \"src/**/*.{vue,less}\" \"dev/**/*.{vue,less}\" --fix",
51
53
  "analyzer": "vite-bundle-visualizer",
52
54
  "prepare": "husky",
53
55
  "prepublishOnly": "npm run build"
@@ -72,7 +74,6 @@
72
74
  "@tiptap/extension-invisible-characters": "3.32.0",
73
75
  "@tiptap/extension-link": "3.32.0",
74
76
  "@tiptap/extension-list": "3.32.0",
75
- "@tiptap/extension-mention": "3.32.0",
76
77
  "@tiptap/extension-node-range": "3.32.0",
77
78
  "@tiptap/extension-paragraph": "3.32.0",
78
79
  "@tiptap/extension-subscript": "3.32.0",
@@ -86,7 +87,6 @@
86
87
  "@tiptap/extensions": "3.32.0",
87
88
  "@tiptap/pm": "3.32.0",
88
89
  "@tiptap/starter-kit": "3.32.0",
89
- "@tiptap/suggestion": "3.32.0",
90
90
  "@tiptap/vue-3": "3.32.0",
91
91
  "@tiptap/y-tiptap": "3.0.10",
92
92
  "@tool-belt/type-predicates": "1.4.1",
@@ -95,23 +95,18 @@
95
95
  "cropperjs": "^2.3.1",
96
96
  "dom-to-image-more": "3.11.0",
97
97
  "es-drager": "1.3.4",
98
- "fast-glob": "3.3.3",
99
98
  "file-saver": "2.0.5",
100
99
  "flowchart.js": "1.18.0",
101
100
  "hotkeys-js": "4.0.8",
102
- "jsbarcode": "3.12.3",
103
101
  "lowlight": "3.3.0",
104
102
  "mermaid": "12.2.0",
105
103
  "nzh": "1.0.14",
106
104
  "plantuml-encoder": "1.4.0",
107
105
  "plyr": "3.8.5",
108
106
  "pretty-bytes": "7.2.0",
109
- "pure-svg-code": "1.0.6",
110
- "smooth-signature": "1.1.0",
111
107
  "swiper": "14.3.0",
112
108
  "tdesign-vue-next": "1.20.10",
113
109
  "vue-i18n": "11.4.16",
114
- "y-prosemirror": "1.3.7",
115
110
  "y-protocols": "1.0.7",
116
111
  "yjs": "13.6.33"
117
112
  },
@@ -120,17 +115,22 @@
120
115
  "@vitejs/plugin-vue": "^6.0.10",
121
116
  "@vue-macros/reactivity-transform": "^3.1.4",
122
117
  "esbuild": "^0.28.2",
118
+ "fast-glob": "3.3.3",
123
119
  "husky": "^9.1.7",
124
120
  "less": "^4.9.1",
125
- "less-loader": "^13.0.0",
126
121
  "lint-staged": "^17.6.0",
127
122
  "oxfmt": "^0.74.0",
128
123
  "oxlint": "^1.89.0",
129
124
  "postcss": "^8.5.31",
130
125
  "postcss-html": "^2.0.0",
126
+ "stylelint": "^18.0.0",
127
+ "stylelint-config-html": "^2.0.0",
128
+ "stylelint-config-recommended": "^19.0.0",
129
+ "stylelint-config-recommended-less": "^5.0.0",
130
+ "stylelint-config-recommended-vue": "^2.0.0",
131
+ "stylelint-less": "^5.0.0",
131
132
  "typescript": "~6.0.3",
132
133
  "unplugin-auto-import": "^21.1.0",
133
- "unplugin-vue": "^8.0.0",
134
134
  "unplugin-vue-components": "^32.1.0",
135
135
  "vite": "^8.3.4",
136
136
  "vite-bundle-visualizer": "^1.2.1",
@@ -143,9 +143,18 @@
143
143
  "prosemirror-model": "1.25.12"
144
144
  },
145
145
  "lint-staged": {
146
- "*.{ts,vue,less}": [
147
- "oxfmt --write src",
148
- "oxlint --fix src"
146
+ "*.ts": [
147
+ "oxfmt --write",
148
+ "oxlint --fix"
149
+ ],
150
+ "*.vue": [
151
+ "oxfmt --write",
152
+ "oxlint --fix",
153
+ "stylelint --fix"
154
+ ],
155
+ "*.less": [
156
+ "oxfmt --write",
157
+ "stylelint --fix"
149
158
  ]
150
159
  },
151
160
  "engines": {
@@ -1,3 +0,0 @@
1
- declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
- declare const _default: typeof __VLS_export;
3
- export default _default;