cosey 0.1.1 → 0.1.4

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.
Files changed (321) hide show
  1. package/components/audio-card/audio-card.vue.js +1 -1
  2. package/components/audio-card/style/index.d.ts +1 -1
  3. package/components/audio-viewer/style/index.d.ts +1 -1
  4. package/components/close/close.vue.js +1 -1
  5. package/components/close/style/index.d.ts +1 -1
  6. package/components/col/style/index.d.ts +1 -1
  7. package/components/col/style/index.js +1 -1
  8. package/components/components.d.ts +98 -44
  9. package/components/config-provider/config-provider.js +1 -3
  10. package/components/config-provider/config-provider.vue.d.ts +2 -7
  11. package/components/config-provider/config-provider.vue.js +8 -4
  12. package/components/config-provider/index.d.ts +1 -1
  13. package/components/config-provider/override-element-plus.d.ts +3 -2
  14. package/components/config-provider/override-element-plus.js +2 -2
  15. package/components/container/container.d.ts +0 -1
  16. package/components/container/container.vue.js +0 -4
  17. package/components/container/style/index.d.ts +1 -1
  18. package/components/context-menu/content.vue.js +1 -1
  19. package/components/context-menu/context-menu.vue.js +2 -2
  20. package/components/context-menu/style/index.d.ts +1 -1
  21. package/components/copy/copy.d.ts +0 -2
  22. package/components/copy/copy.vue.d.ts +1 -7
  23. package/components/copy/copy.vue.js +1 -2
  24. package/components/copy/index.d.ts +3 -19
  25. package/components/copy/style/index.d.ts +1 -1
  26. package/components/cssinjs/parser.js +8 -25
  27. package/components/dnd-sort/dnd-sort-item.vue.js +3 -4
  28. package/components/dnd-sort/dnd-sort.vue.js +1 -2
  29. package/components/dnd-sort/index.d.ts +1 -1
  30. package/components/dnd-sort/style/index.d.ts +1 -1
  31. package/components/dnd-sort/style/index.js +1 -0
  32. package/components/editor/components/button-group.vue.d.ts +2 -7
  33. package/components/editor/components/button.vue.d.ts +2 -7
  34. package/components/editor/components/color-picker/color-picker.style.d.ts +1 -1
  35. package/components/editor/components/color-picker/color-picker.vue.d.ts +2 -43
  36. package/components/editor/components/color-picker/color-picker.vue.js +14 -11
  37. package/components/editor/components/list/list.style.d.ts +1 -1
  38. package/components/editor/components/picker/picker.style.d.ts +1 -1
  39. package/components/editor/components/picker/picker.vue.d.ts +2 -15
  40. package/components/editor/components/resize/resize.js +4 -4
  41. package/components/editor/components/resize/resize.style.d.ts +1 -1
  42. package/components/editor/components/resize/resize.style.js +9 -32
  43. package/components/editor/components/resize/resize.vue.js +21 -14
  44. package/components/editor/components/select-button.vue.d.ts +2 -9
  45. package/components/editor/components/select-button.vue.js +1 -1
  46. package/components/editor/components/split-button.vue.d.ts +2 -19
  47. package/components/editor/components/split-button.vue.js +1 -1
  48. package/components/editor/components/table-toolbar/table-toolbar.style.d.ts +1 -1
  49. package/components/editor/components/table-toolbar/table-toolbar.vue.js +9 -9
  50. package/components/editor/components/toolbar/formats/align.vue.js +4 -4
  51. package/components/editor/components/toolbar/formats/blockquote.vue.js +1 -1
  52. package/components/editor/components/toolbar/formats/bold.vue.js +1 -1
  53. package/components/editor/components/toolbar/formats/clean.vue.js +1 -1
  54. package/components/editor/components/toolbar/formats/code-block.vue.js +1 -1
  55. package/components/editor/components/toolbar/formats/code.vue.js +1 -1
  56. package/components/editor/components/toolbar/formats/formula.vue.js +4 -3
  57. package/components/editor/components/toolbar/formats/image.vue.js +1 -1
  58. package/components/editor/components/toolbar/formats/indent.vue.js +2 -2
  59. package/components/editor/components/toolbar/formats/italic.vue.js +1 -1
  60. package/components/editor/components/toolbar/formats/link.vue.js +15 -13
  61. package/components/editor/components/toolbar/formats/list.vue.js +3 -3
  62. package/components/editor/components/toolbar/formats/script.vue.js +2 -2
  63. package/components/editor/components/toolbar/formats/size-delta.vue.js +2 -2
  64. package/components/editor/components/toolbar/formats/strike.vue.js +1 -1
  65. package/components/editor/components/toolbar/formats/table.style.d.ts +1 -1
  66. package/components/editor/components/toolbar/formats/table.vue.js +1 -1
  67. package/components/editor/components/toolbar/formats/underline.vue.js +1 -1
  68. package/components/editor/components/toolbar/formats/video.vue.js +1 -1
  69. package/components/editor/components/toolbar/toolbar.d.ts +1 -2
  70. package/components/editor/components/toolbar/toolbar.js +17 -21
  71. package/components/editor/components/toolbar/toolbarContext.js +1 -3
  72. package/components/editor/editor.d.ts +0 -2
  73. package/components/editor/editor.vue.js +1 -11
  74. package/components/editor/formats/image.d.ts +13 -0
  75. package/components/editor/formats/image.js +46 -0
  76. package/components/editor/formats/indent.d.ts +2 -0
  77. package/components/editor/formats/indent.js +12 -7
  78. package/components/editor/formats/link.js +1 -5
  79. package/components/editor/formats/list.d.ts +0 -4
  80. package/components/editor/formats/list.js +10 -5
  81. package/components/editor/formats/video.js +6 -9
  82. package/components/editor/modules/custom-list.js +1 -6
  83. package/components/editor/modules/image-uploader/formats/image-loading.style.d.ts +1 -1
  84. package/components/editor/modules/image-uploader/formats/image-loading.style.js +4 -4
  85. package/components/editor/modules/image-uploader/image-uploader.js +1 -3
  86. package/components/editor/quill.js +7 -4
  87. package/components/editor/quillContext.js +1 -3
  88. package/components/editor/style/hljs.d.ts +1 -1
  89. package/components/editor/style/index.d.ts +1 -1
  90. package/components/editor/style/index.js +1 -5
  91. package/components/field/components/checkbox-group/panel.vue.d.ts +2 -20
  92. package/components/field/components/checkbox-group/panel.vue.js +2 -2
  93. package/components/field/components/tree-select/tree-select.d.ts +1 -2
  94. package/components/field/components/tree-select/tree-select.js +69 -0
  95. package/components/file-card/file-card.vue.js +1 -1
  96. package/components/file-card/style/index.d.ts +1 -1
  97. package/components/form/form-item.vue.js +1 -1
  98. package/components/form/style/index.d.ts +1 -1
  99. package/components/form/useFormItemWidth.js +1 -1
  100. package/components/form/useFormTemplate.js +2 -10
  101. package/components/form-dialog/form-dialog.vue.d.ts +0 -1
  102. package/components/form-dialog/form-dialog.vue.js +1 -1
  103. package/components/form-dialog/index.d.ts +0 -3
  104. package/components/form-group/form-group.vue.js +1 -1
  105. package/components/form-list/form-list.js +1 -6
  106. package/components/form-list/form-list.vue.js +2 -2
  107. package/components/form-list/style/index.d.ts +1 -1
  108. package/components/form-query/form-query.vue.js +5 -5
  109. package/components/form-query/style/index.d.ts +1 -1
  110. package/components/highlight/highlight.d.ts +1 -1
  111. package/components/highlight/highlight.vue.js +11 -4
  112. package/components/highlight/style/index.d.ts +1 -1
  113. package/components/highlight/style/index.js +15 -5
  114. package/components/horizontal-tree/horizontal-tree.vue.js +16 -12
  115. package/components/horizontal-tree/style/index.d.ts +1 -1
  116. package/components/icon/style/index.d.ts +1 -1
  117. package/components/iconify-icon/iconify-icon.d.ts +3 -0
  118. package/components/iconify-icon/iconify-icon.js +9 -0
  119. package/components/iconify-icon/iconify-icon.vue.js +2 -5
  120. package/components/iconify-icon/index.js +1 -0
  121. package/components/image-card/style/index.d.ts +1 -1
  122. package/components/index.js +4 -2
  123. package/components/long-text/style/index.d.ts +1 -1
  124. package/components/mask/style/index.d.ts +1 -1
  125. package/components/media-card-group/media-card-group.vue.js +4 -3
  126. package/components/media-card-group/style/index.d.ts +1 -1
  127. package/components/panel/style/index.d.ts +1 -1
  128. package/components/row/style/index.d.ts +1 -1
  129. package/components/scroll-view/scroll-view.vue.js +1 -2
  130. package/components/scroll-view/style/index.d.ts +1 -1
  131. package/components/snug-menu/snug-menu.vue.js +1 -2
  132. package/components/snug-menu/style/index.d.ts +1 -1
  133. package/components/style/animation.d.ts +5 -0
  134. package/components/style/animation.js +33 -0
  135. package/components/style/index.d.ts +1 -1
  136. package/components/style/index.js +2 -2
  137. package/components/style/mixins.d.ts +2 -0
  138. package/components/style/mixins.js +10 -1
  139. package/components/table/index.d.ts +0 -8
  140. package/components/table/style/index.d.ts +1 -1
  141. package/components/table/style/index.js +2 -2
  142. package/components/table/table-column/renderer.js +22 -18
  143. package/components/table/table-column/style/index.d.ts +1 -1
  144. package/components/table/table-column/table-column.vue.d.ts +3 -3
  145. package/components/table/table-column-editor/item.vue.js +5 -8
  146. package/components/table/table-column-editor/style/index.d.ts +1 -1
  147. package/components/table/table-column-editor/style/index.js +1 -0
  148. package/components/table/table-column-editor/table-column-editor.vue.d.ts +2 -246
  149. package/components/table/table-column-editor/table-column-editor.vue.js +9 -9
  150. package/components/table/table-export/style/index.d.ts +1 -1
  151. package/components/table/table-export/table-export.vue.js +2 -2
  152. package/components/table/table-query/table-query.d.ts +0 -4
  153. package/components/table/table-query/table-query.js +0 -4
  154. package/components/table/table-query/table-query.vue.d.ts +0 -9
  155. package/components/table/table-query/table-query.vue.js +14 -12
  156. package/components/table/table.js +1 -3
  157. package/components/table/table.vue.js +22 -24
  158. package/components/table/useTable.js +1 -4
  159. package/components/table/utils.js +1 -3
  160. package/components/table-action/item.vue.js +5 -5
  161. package/components/table-action/style/index.d.ts +1 -1
  162. package/components/table-action/table-action.vue.js +4 -3
  163. package/components/theme/StyleContext.js +1 -3
  164. package/components/theme/createCacheToken.js +1 -4
  165. package/components/theme/getGlobalStyleHook.d.ts +2 -3
  166. package/components/theme/getGlobalStyleHook.js +5 -13
  167. package/components/theme/getOverrideStyleHook.d.ts +8 -0
  168. package/components/theme/getOverrideStyleHook.js +39 -0
  169. package/components/theme/getSimpleStyleHook.d.ts +2 -2
  170. package/components/theme/getSimpleStyleHook.js +4 -11
  171. package/components/theme/getStyleHook.d.ts +2 -2
  172. package/components/theme/getStyleHook.js +4 -11
  173. package/components/theme/index.d.ts +2 -1
  174. package/components/theme/index.js +1 -0
  175. package/components/theme/interface/index.d.ts +1 -1
  176. package/components/theme/theme-context.d.ts +11 -2
  177. package/components/theme/theme-context.js +36 -6
  178. package/components/theme/themes/shared/genColorMapToken.js +1 -4
  179. package/components/theme/useStyleRegister.d.ts +1 -7
  180. package/components/theme/useStyleRegister.js +3 -6
  181. package/components/theme/util/alias.js +4 -16
  182. package/components/theme/util/getAlphaColor.js +1 -6
  183. package/components/theme/util/normalizeStyle.js +1 -1
  184. package/components/theme/util/statistic.js +4 -1
  185. package/components/theme/util/useToken.d.ts +4 -4
  186. package/components/theme/util/useToken.js +7 -10
  187. package/components/toggle/toggle.vue.js +1 -1
  188. package/components/transition/style/index.d.ts +1 -1
  189. package/components/transition/transition.vue.js +1 -2
  190. package/components/transition-group/index.d.ts +3 -3
  191. package/components/transition-group/style/index.d.ts +1 -1
  192. package/components/transition-group/transition-group.vue.d.ts +1 -1
  193. package/components/upload/index.d.ts +0 -3
  194. package/components/upload/style/index.d.ts +1 -1
  195. package/components/upload/upload-item.vue.js +8 -8
  196. package/components/upload/upload.d.ts +0 -2
  197. package/components/upload/upload.js +0 -1
  198. package/components/upload/upload.vue.d.ts +0 -1
  199. package/components/upload/upload.vue.js +1 -5
  200. package/components/video-card/style/index.d.ts +1 -1
  201. package/components/video-card/video-card.vue.js +1 -1
  202. package/components/video-viewer/style/index.d.ts +1 -1
  203. package/config/http.d.ts +1 -1
  204. package/config/http.js +1 -1
  205. package/config/index.d.ts +23 -22
  206. package/config/index.js +2 -7
  207. package/config/layout.d.ts +36 -0
  208. package/config/layout.js +37 -1
  209. package/config/nprogress.style.d.ts +2 -0
  210. package/config/nprogress.style.js +51 -0
  211. package/config/root-config-provider.vue.d.ts +2 -20
  212. package/config/root-config-provider.vue.js +2 -0
  213. package/hooks/useColorScheme.js +5 -9
  214. package/hooks/useEcharts.js +2 -4
  215. package/hooks/useFetch.d.ts +1 -1
  216. package/hooks/useFetch.js +1 -7
  217. package/hooks/useFullPage.js +7 -9
  218. package/hooks/useLocale.js +1 -3
  219. package/hooks/useLockscreenObserver.js +1 -1
  220. package/hooks/usePersist.js +1 -3
  221. package/hooks/useTreeCheck.js +13 -26
  222. package/hooks/useUpsert.d.ts +15 -16
  223. package/hooks/useUpsert.js +3 -3
  224. package/index.d.ts +1 -0
  225. package/index.js +5 -4
  226. package/layout/index.js +2 -2
  227. package/layout/layout-aside/layout-aside.vue.js +2 -1
  228. package/layout/layout-aside/style/index.d.ts +1 -1
  229. package/layout/layout-auth/style/index.d.ts +1 -1
  230. package/layout/layout-base/layout-base.vue.js +9 -9
  231. package/layout/layout-base/style/index.d.ts +1 -1
  232. package/layout/layout-brand/style/index.d.ts +1 -1
  233. package/layout/layout-change-password/layout-change-password.vue.js +8 -8
  234. package/layout/layout-change-password/style/index.d.ts +1 -1
  235. package/layout/layout-change-password/style/index.js +1 -1
  236. package/layout/layout-color-scheme/layout-color-scheme.vue.js +8 -14
  237. package/layout/layout-color-scheme/style/index.d.ts +2 -5
  238. package/layout/layout-color-scheme/style/index.js +26 -44
  239. package/layout/layout-content/layout-content.vue.d.ts +2 -13
  240. package/layout/layout-content/style/index.d.ts +1 -1
  241. package/layout/layout-exception/style/index.d.ts +1 -1
  242. package/layout/layout-forbidden/layout-forbidden.vue.js +2 -2
  243. package/layout/layout-header/layout-header.vue.d.ts +2 -14
  244. package/layout/layout-header/style/index.d.ts +1 -1
  245. package/layout/layout-iframe/style/index.d.ts +1 -1
  246. package/layout/layout-internal-server-error/layout-internal-server-error.vue.js +2 -2
  247. package/layout/layout-login/layout-login.vue.js +5 -5
  248. package/layout/layout-login/style/index.d.ts +1 -1
  249. package/layout/layout-login/style/index.js +1 -1
  250. package/layout/layout-main/style/index.d.ts +1 -1
  251. package/layout/layout-mask/style/index.d.ts +1 -1
  252. package/layout/layout-mask/style/index.js +1 -1
  253. package/layout/layout-menu/layout-menu.vue.js +5 -0
  254. package/layout/layout-menu/style/index.d.ts +1 -1
  255. package/layout/layout-not-found/layout-not-found.vue.js +2 -2
  256. package/layout/layout-search/layout-search.vue.js +37 -34
  257. package/layout/layout-search/style/index.d.ts +1 -1
  258. package/layout/layout-sidebar/layout-sidebar.vue.d.ts +2 -15
  259. package/layout/layout-sidebar/style/index.d.ts +1 -1
  260. package/layout/layout-sidebar/style/index.js +1 -1
  261. package/layout/layout-snug-aside/style/index.d.ts +1 -1
  262. package/layout/layout-switch-effect/layout-switch-effect.vue.d.ts +2 -7
  263. package/layout/layout-switch-effect/style/index.d.ts +1 -1
  264. package/layout/layout-tabbar/layout-tabbar.vue.js +8 -3
  265. package/layout/layout-tabbar/reload.vue.js +1 -1
  266. package/layout/layout-tabbar/style/index.d.ts +1 -1
  267. package/layout/layout-tabbar/style/index.js +6 -2
  268. package/layout/layout-toggle/layout-toggle.vue.js +1 -1
  269. package/layout/layout-top-snug-menu/layout-top-snug-menu.vue.js +4 -3
  270. package/layout/layout-topbar/layout-topbar.vue.d.ts +2 -1217
  271. package/layout/layout-topbar/style/index.d.ts +1 -1
  272. package/layout/layout-user-menu/index.d.ts +1 -0
  273. package/layout/layout-user-menu/index.js +1 -0
  274. package/layout/{layout-user/layout-user.vue.js → layout-user-menu/layout-user-menu.vue.js} +18 -13
  275. package/layout/{layout-user → layout-user-menu}/style/index.d.ts +1 -1
  276. package/layout/{layout-user → layout-user-menu}/style/index.js +9 -5
  277. package/layout/layout.d.ts +1 -1
  278. package/layout/layout.js +1 -1
  279. package/layout/merged/index.d.ts +1 -1
  280. package/layout/merged/index.js +1 -1
  281. package/layout/merged/{layout-user.js → layout-user-menu.js} +1 -1
  282. package/layout/utils.js +1 -4
  283. package/package.json +16 -6
  284. package/request/useRequest.js +1 -1
  285. package/router/guard/auth.js +2 -5
  286. package/router/guard/index.js +2 -2
  287. package/router/guard/pageTitle.d.ts +2 -0
  288. package/router/guard/pageTitle.js +11 -0
  289. package/router/guard/progress.js +11 -1
  290. package/router/index.d.ts +22 -0
  291. package/router/index.js +1 -1
  292. package/router/routes/static/auth.js +5 -6
  293. package/router/routes/static/exception.js +3 -3
  294. package/router/utils.js +11 -3
  295. package/store/layout.d.ts +4 -10
  296. package/store/layout.js +19 -31
  297. package/store/user.d.ts +4 -4
  298. package/store/user.js +2 -1
  299. package/utils/array.js +3 -0
  300. package/utils/dynamicCSS.d.ts +3 -2
  301. package/utils/dynamicCSS.js +12 -1
  302. package/utils/excel/index.js +1 -3
  303. package/utils/excel/utils.js +1 -5
  304. package/utils/file.js +1 -3
  305. package/utils/index.js +1 -1
  306. package/utils/object.js +1 -3
  307. package/utils/tree.js +2 -11
  308. package/utils/vue.js +1 -1
  309. package/components/global.d.js +0 -1
  310. package/components/style/motion/index.d.ts +0 -1
  311. package/components/style/motion/index.js +0 -1
  312. package/components/style/motion/loading.d.ts +0 -3
  313. package/components/style/motion/loading.js +0 -23
  314. package/layout/layout-user/index.d.ts +0 -1
  315. package/layout/layout-user/index.js +0 -1
  316. package/router/guard/popup.d.ts +0 -2
  317. package/router/guard/popup.js +0 -6
  318. package/types/vue-router.d.js +0 -1
  319. package/types/vue.d.js +0 -1
  320. /package/layout/{layout-user/layout-user.vue.d.ts → layout-user-menu/layout-user-menu.vue.d.ts} +0 -0
  321. /package/layout/merged/{layout-user.d.ts → layout-user-menu.d.ts} +0 -0
@@ -81,15 +81,17 @@ var stdin_default = /* @__PURE__ */defineComponent({
81
81
  });
82
82
  break;
83
83
  case "insert":
84
- const range = quill.value.getSelection(true);
85
- const text = quill.value.getText(range);
86
- Object.assign(formModel, {
87
- url: "",
88
- text,
89
- title: "",
90
- target: "_self"
91
- });
92
- break;
84
+ {
85
+ const range = quill.value.getSelection(true);
86
+ const text = quill.value.getText(range);
87
+ Object.assign(formModel, {
88
+ url: "",
89
+ text,
90
+ title: "",
91
+ target: "_self"
92
+ });
93
+ break;
94
+ }
93
95
  }
94
96
  visible.value = true;
95
97
  };
@@ -132,7 +134,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
132
134
  onClick: onBtnClick
133
135
  }, {
134
136
  default: withCtx(() => [createVNode(unref(stdin_default$2), {
135
- name: "mdi:link-variant"
137
+ name: "co:link"
136
138
  })]),
137
139
  _: 1
138
140
  /* STABLE */
@@ -185,17 +187,17 @@ var stdin_default = /* @__PURE__ */defineComponent({
185
187
  onCommand
186
188
  }, {
187
189
  default: withCtx(() => [createVNode(unref(_ContextMenuItem), {
188
- icon: "mdi:link-variant",
190
+ icon: "co:link",
189
191
  title: title.value,
190
192
  command: "upsert"
191
193
  }, null, 8, ["title"]), actionType.value === "update" ? (openBlock(), createElementBlock(Fragment, {
192
194
  key: 0
193
195
  }, [createVNode(unref(_ContextMenuItem), {
194
- icon: "mdi:link-variant-off",
196
+ icon: "co:unlink",
195
197
  title: "\u5220\u9664\u94FE\u63A5",
196
198
  command: "remove"
197
199
  }), createVNode(unref(_ContextMenuItem), {
198
- icon: "mdi:arrow-right-top",
200
+ icon: "co:launch",
199
201
  title: "\u6253\u5F00\u94FE\u63A5",
200
202
  command: "open"
201
203
  })], 64
@@ -15,8 +15,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
15
15
  setup(__props) {
16
16
  const props = __props;
17
17
  const mapIcons = {
18
- ordered: "mdi:format-list-numbered",
19
- bullet: "mdi:format-list-bulleted"
18
+ ordered: "co:list-numbered",
19
+ bullet: "co:list-bulleted"
20
20
  };
21
21
  const {
22
22
  toolbar
@@ -35,7 +35,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
35
35
  return (_ctx, _cache) => {
36
36
  return openBlock(), createBlock(stdin_default$1, {
37
37
  active: isActive.value,
38
- onClick: _cache[0] || (_cache[0] = $event => unref(toolbar)?.list(_ctx.type, isActive.value))
38
+ onClick: _cache[0] || (_cache[0] = $event => unref(toolbar)?.list(_ctx.type))
39
39
  }, {
40
40
  default: withCtx(() => [createVNode(unref(stdin_default$2), {
41
41
  name: mapIcons[_ctx.type]
@@ -15,8 +15,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
15
15
  setup(__props) {
16
16
  const props = __props;
17
17
  const mapIcons = {
18
- sub: "mdi:format-subscript",
19
- super: "mdi:format-superscript"
18
+ sub: "co:text-subscript",
19
+ super: "co:text-superscript"
20
20
  };
21
21
  const {
22
22
  toolbar
@@ -16,8 +16,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
16
16
  setup(__props) {
17
17
  const props = __props;
18
18
  const mapIcons = {
19
- "-1": "mdi:format-annotation-minus",
20
- "+1": "mdi:format-annotation-plus"
19
+ "-1": "co:text-minus",
20
+ "+1": "co:text-plus"
21
21
  };
22
22
  const {
23
23
  toolbar
@@ -27,7 +27,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
27
27
  onClick: _cache[0] || (_cache[0] = $event => unref(toolbar)?.strike(!isActive.value))
28
28
  }, {
29
29
  default: withCtx(() => [createVNode(unref(stdin_default$2), {
30
- name: "mdi:format-strikethrough-variant"
30
+ name: "co:text-strikethrough"
31
31
  })]),
32
32
  _: 1
33
33
  /* STABLE */
@@ -1,4 +1,4 @@
1
- declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, theme?: import("vue").ComputedRef<import("../../../..").ThemeConfig | undefined>) => {
1
+ declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../../../theme/theme-context").ThemeManager) => {
2
2
  hashId: import("vue").Ref<string, string>;
3
3
  };
4
4
  export default _default;
@@ -84,7 +84,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
84
84
  onClick: onBtnClick
85
85
  }, {
86
86
  default: withCtx(() => [createVNode(unref(_Icon), {
87
- name: "mdi:table"
87
+ name: "co:table"
88
88
  })]),
89
89
  _: 1
90
90
  /* STABLE */
@@ -27,7 +27,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
27
27
  onClick: _cache[0] || (_cache[0] = $event => unref(toolbar)?.underline(!isActive.value))
28
28
  }, {
29
29
  default: withCtx(() => [createVNode(unref(stdin_default$2), {
30
- name: "mdi:format-underline"
30
+ name: "co:text-underline"
31
31
  })]),
32
32
  _: 1
33
33
  /* STABLE */
@@ -61,7 +61,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
61
61
  onClick: onBtnClick
62
62
  }, {
63
63
  default: withCtx(() => [createVNode(unref(stdin_default$2), {
64
- name: "mdi:movie-open-play-outline"
64
+ name: "co:video-player"
65
65
  })]),
66
66
  _: 1
67
67
  /* STABLE */
@@ -23,8 +23,7 @@ export declare class Toolbar extends EventTarget {
23
23
  script(value: 'super' | 'sub', isActive?: boolean): void;
24
24
  indentStyle(value: string): void;
25
25
  indent(value: string): void;
26
- customLst(type: 'ordered' | 'bullet', isActive?: boolean): void;
27
- list(value: string, isActive?: boolean): void;
26
+ list(value: string): void;
28
27
  blockquote(value?: boolean): void;
29
28
  codeBlock(value?: boolean): void;
30
29
  code(value?: boolean): void;
@@ -1,4 +1,5 @@
1
1
  import Quill, { Parchment } from 'quill';
2
+ import { INDENT_STEP } from '../../formats/indent.js';
2
3
 
3
4
  class Toolbar extends EventTarget {
4
5
  quill;
@@ -57,37 +58,34 @@ class Toolbar extends EventTarget {
57
58
  indentStyle(value) {
58
59
  const range = this.quill.getSelection(true);
59
60
  const formats = this.quill.getFormat(range);
60
- const indent = parseInt(formats.indent || 0, 10);
61
+ const indent = parseInt(formats.indent || "0", 10);
61
62
  if (value === "+1" || value === "-1") {
62
- const step = 2;
63
- let modifier = value === "+1" ? step : -2;
64
- if (formats.direction === "rtl") modifier *= -1;
63
+ const modifier = value === "+1" ? INDENT_STEP : -3;
65
64
  this.quill.format("indent", indent + modifier, Quill.sources.USER);
66
65
  }
67
66
  }
68
67
  indent(value) {
69
- const range = this.quill.getSelection();
68
+ const range = this.quill.getSelection(true);
70
69
  const formats = this.quill.getFormat(range);
71
- const indent = parseInt(formats.indent || 0, 10);
70
+ const indent = parseInt(formats.indent || "0", 10);
72
71
  if (value === "+1" || value === "-1") {
73
72
  let modifier = value === "+1" ? 1 : -1;
74
73
  if (formats.direction === "rtl") modifier *= -1;
75
74
  this.quill.format("indent", indent + modifier, Quill.sources.USER);
76
75
  }
77
76
  }
78
- customLst(type, isActive) {
77
+ list(value) {
79
78
  const range = this.quill.getSelection(true);
80
- this.quill.getFormat(range);
81
- const map = {
82
- ordered: "olist",
83
- bullet: "ulist"
84
- };
85
- this.quill.format(map[type], isActive ? false : true, Quill.sources.USER);
86
- }
87
- list(value, isActive) {
88
- const range = this.quill.getSelection();
89
- this.quill.getFormat(range);
90
- this.quill.format("list", isActive ? false : value, Quill.sources.USER);
79
+ const formats = this.quill.getFormat(range);
80
+ if (value === "check") {
81
+ if (formats.list === "checked" || formats.list === "unchecked") {
82
+ this.quill.format("list", false, Quill.sources.USER);
83
+ } else {
84
+ this.quill.format("list", "unchecked", Quill.sources.USER);
85
+ }
86
+ } else {
87
+ this.quill.format("list", value, Quill.sources.USER);
88
+ }
91
89
  }
92
90
  blockquote(value) {
93
91
  this.quill.format("blockquote", value, Quill.sources.USER);
@@ -102,9 +100,7 @@ class Toolbar extends EventTarget {
102
100
  this.quill.format("link", value, Quill.sources.USER);
103
101
  }
104
102
  image() {
105
- const imageUploader = this.quill.getModule(
106
- "imageUploader"
107
- );
103
+ const imageUploader = this.quill.getModule("imageUploader");
108
104
  imageUploader.selectLocalImage();
109
105
  }
110
106
  formula(value) {
@@ -1,5 +1,3 @@
1
- const toolbarContextKey = Symbol(
2
- "toolbarContext"
3
- );
1
+ const toolbarContextKey = Symbol("toolbarContext");
4
2
 
5
3
  export { toolbarContextKey };
@@ -3,8 +3,6 @@ export interface EditorProps {
3
3
  modelValue?: string;
4
4
  placeholder?: string;
5
5
  height?: string;
6
- minHeight?: string;
7
- maxHeight?: string;
8
6
  readonly?: boolean;
9
7
  validateEvent?: boolean;
10
8
  request?: UploadContext['request'];
@@ -34,14 +34,6 @@ var stdin_default = /* @__PURE__ */defineComponent({
34
34
  type: String,
35
35
  required: false
36
36
  },
37
- minHeight: {
38
- type: String,
39
- required: false
40
- },
41
- maxHeight: {
42
- type: String,
43
- required: false
44
- },
45
37
  readonly: {
46
38
  type: Boolean,
47
39
  required: false
@@ -140,9 +132,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
140
132
  ref: element,
141
133
  class: normalizeClass(`${unref(prefixCls)}-container`),
142
134
  style: normalizeStyle({
143
- height: _ctx.height,
144
- minHeight: _ctx.minHeight,
145
- maxHeight: _ctx.maxHeight
135
+ height: _ctx.height
146
136
  })
147
137
  }, null, 6
148
138
  /* CLASS, STYLE */), createVNode(stdin_default$5), createVNode(stdin_default$6)], 2
@@ -0,0 +1,13 @@
1
+ import { Parchment } from 'quill';
2
+ declare class Image extends Parchment.EmbedBlot {
3
+ static blotName: string;
4
+ static tagName: string;
5
+ static create(value: string): Element;
6
+ static formats(domNode: Element): Record<string, string | null>;
7
+ static match(url: string): boolean;
8
+ static sanitize(url: string): string;
9
+ static value(domNode: Element): string | null;
10
+ domNode: HTMLImageElement;
11
+ format(name: string, value: string): void;
12
+ }
13
+ export default Image;
@@ -0,0 +1,46 @@
1
+ import { sanitize } from './link.js';
2
+ import { Parchment } from 'quill';
3
+
4
+ const ATTRIBUTES = ["alt", "height", "width", "style"];
5
+ class Image extends Parchment.EmbedBlot {
6
+ static blotName = "image";
7
+ static tagName = "IMG";
8
+ static create(value) {
9
+ const node = super.create(value);
10
+ if (typeof value === "string") {
11
+ node.setAttribute("src", this.sanitize(value));
12
+ }
13
+ return node;
14
+ }
15
+ static formats(domNode) {
16
+ return ATTRIBUTES.reduce((formats, attribute) => {
17
+ if (domNode.hasAttribute(attribute)) {
18
+ formats[attribute] = domNode.getAttribute(attribute);
19
+ }
20
+ return formats;
21
+ }, {});
22
+ }
23
+ static match(url) {
24
+ return /\.(jpe?g|gif|png)$/.test(url) || /^data:image\/.+;base64/.test(url);
25
+ }
26
+ static sanitize(url) {
27
+ return sanitize(url, ["http", "https", "data"]) ? url : "//:0";
28
+ }
29
+ static value(domNode) {
30
+ return domNode.getAttribute("src");
31
+ }
32
+ format(name, value) {
33
+ if (ATTRIBUTES.indexOf(name) > -1) {
34
+ if (value) {
35
+ this.domNode.setAttribute(name, value);
36
+ } else {
37
+ this.domNode.removeAttribute(name);
38
+ }
39
+ } else {
40
+ super.format(name, value);
41
+ }
42
+ }
43
+ }
44
+ var stdin_default = Image;
45
+
46
+ export { stdin_default as default };
@@ -1,5 +1,7 @@
1
1
  import { Parchment } from 'quill';
2
+ export declare const INDENT_STEP = 3;
2
3
  declare class IndentAttributor extends Parchment.StyleAttributor {
4
+ normalize(value: number): number | undefined;
3
5
  add(node: HTMLElement, value: string | number): boolean;
4
6
  canAdd(node: HTMLElement, value: string): boolean;
5
7
  value(node: HTMLElement): number | undefined;
@@ -1,12 +1,18 @@
1
1
  import { Parchment } from 'quill';
2
2
 
3
+ const INDENT_STEP = 3;
3
4
  class IndentAttributor extends Parchment.StyleAttributor {
5
+ normalize(value) {
6
+ if (!value) {
7
+ return void 0;
8
+ }
9
+ return Math.ceil(value / INDENT_STEP) * INDENT_STEP;
10
+ }
4
11
  add(node, value) {
5
12
  let normalizedValue = 0;
6
13
  if (value === "+1" || value === "-1") {
7
14
  const indent = this.value(node) || 0;
8
- const step = 2;
9
- normalizedValue = value === "+1" ? indent + step : indent - step;
15
+ normalizedValue = value === "+1" ? indent + INDENT_STEP : indent - INDENT_STEP;
10
16
  } else if (typeof value === "number") {
11
17
  normalizedValue = value;
12
18
  }
@@ -20,13 +26,12 @@ class IndentAttributor extends Parchment.StyleAttributor {
20
26
  return super.canAdd(node, value) || super.canAdd(node, parseInt(value, 10));
21
27
  }
22
28
  value(node) {
23
- return parseInt(super.value(node), 10) || void 0;
29
+ return this.normalize(parseInt(super.value(node), 10));
24
30
  }
25
31
  }
26
- const IndentStyle = new IndentAttributor("indent", "text-indent", {
32
+ const IndentStyle = new IndentAttributor("indent", "padding-left", {
27
33
  scope: Parchment.Scope.BLOCK,
28
- // @ts-expect-error
29
- whitelist: Array(16).fill(0).map((_, i) => i + 1)
34
+ whitelist: Array(INDENT_STEP * 9).fill(0).map((_, i) => i + 1)
30
35
  });
31
36
 
32
- export { IndentStyle };
37
+ export { INDENT_STEP, IndentStyle };
@@ -31,11 +31,7 @@ class Link extends Inline {
31
31
  this.toggleAttribute(domNode, "href", value.href);
32
32
  this.toggleAttribute(domNode, "title", value.title);
33
33
  this.toggleAttribute(domNode, "target", value.target);
34
- this.toggleAttribute(
35
- domNode,
36
- "rel",
37
- value.target === "_blank" ? "noopener noreferrer" : ""
38
- );
34
+ this.toggleAttribute(domNode, "rel", value.target === "_blank" ? "noopener noreferrer" : "");
39
35
  }
40
36
  format(name, value) {
41
37
  if (name !== this.statics.blotName || !value) {
@@ -2,12 +2,8 @@ import Block from 'quill/blots/block';
2
2
  import Container from 'quill/blots/container';
3
3
  import type Scroll from 'quill/blots/scroll';
4
4
  declare class ListContainer extends Container {
5
- static blotName: string;
6
- static tagName: string;
7
5
  }
8
6
  declare class ListItem extends Block {
9
- static blotName: string;
10
- static tagName: string;
11
7
  static create(value: string): HTMLElement;
12
8
  static formats(domNode: HTMLElement): string | undefined;
13
9
  static register(): void;
@@ -1,14 +1,13 @@
1
1
  import Block from 'quill/blots/block';
2
2
  import Container from 'quill/blots/container';
3
3
  import Quill from 'quill/core/quill';
4
+ import { IndentStyle, INDENT_STEP } from './indent.js';
4
5
 
5
6
  class ListContainer extends Container {
6
- static blotName = "list-container";
7
- static tagName = "OL";
8
7
  }
8
+ ListContainer.blotName = "list-container";
9
+ ListContainer.tagName = "OL";
9
10
  class ListItem extends Block {
10
- static blotName = "list";
11
- static tagName = "LI";
12
11
  static create(value) {
13
12
  const node = super.create();
14
13
  node.setAttribute("data-list", value);
@@ -42,10 +41,16 @@ class ListItem extends Block {
42
41
  if (name === this.statics.blotName && value) {
43
42
  this.domNode.setAttribute("data-list", value);
44
43
  } else {
45
- super.format(name, value);
44
+ if (name === IndentStyle.attrName) {
45
+ super.format(name, +value * INDENT_STEP);
46
+ } else {
47
+ super.format(name, value);
48
+ }
46
49
  }
47
50
  }
48
51
  }
52
+ ListItem.blotName = "list";
53
+ ListItem.tagName = "LI";
49
54
  ListContainer.allowedChildren = [ListItem];
50
55
  ListItem.requiredContainer = ListContainer;
51
56
 
@@ -14,15 +14,12 @@ class Video extends BlockEmbed {
14
14
  return node;
15
15
  }
16
16
  static formats(domNode) {
17
- return ATTRIBUTES.reduce(
18
- (formats, attribute) => {
19
- if (domNode.hasAttribute(attribute)) {
20
- formats[attribute] = domNode.getAttribute(attribute);
21
- }
22
- return formats;
23
- },
24
- {}
25
- );
17
+ return ATTRIBUTES.reduce((formats, attribute) => {
18
+ if (domNode.hasAttribute(attribute)) {
19
+ formats[attribute] = domNode.getAttribute(attribute);
20
+ }
21
+ return formats;
22
+ }, {});
26
23
  }
27
24
  static sanitize(url) {
28
25
  return Link.sanitize(url);
@@ -13,12 +13,7 @@ class CustomList extends Module {
13
13
  if (context.format.indent) {
14
14
  formats.indent = false;
15
15
  }
16
- this.quill.formatLine(
17
- range.index,
18
- range.length,
19
- formats,
20
- Quill.sources.USER
21
- );
16
+ this.quill.formatLine(range.index, range.length, formats, Quill.sources.USER);
22
17
  }
23
18
  });
24
19
  }
@@ -1,2 +1,2 @@
1
- declare const _default: (theme?: import("vue").ComputedRef<import("../../../..").ThemeConfig | undefined>) => void;
1
+ declare const _default: (themeManager?: import("../../../../theme/theme-context").ThemeManager) => void;
2
2
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import { getGlobalStyleHook } from '../../../../theme/getGlobalStyleHook.js';
2
- import { loadingDash, loadingRotate } from '../../../../style/motion/loading.js';
2
+ import { spinner, rotation } from '../../../../style/animation.js';
3
3
 
4
- var stdin_default = getGlobalStyleHook("co-editor-image-loading", (token) => {
4
+ var stdin_default = getGlobalStyleHook("EditorImageLoading", (token) => {
5
5
  return {
6
6
  ".co-editor-image-loading": {
7
7
  position: "relative",
@@ -22,12 +22,12 @@ var stdin_default = getGlobalStyleHook("co-editor-image-loading", (token) => {
22
22
  display: "inline",
23
23
  height: 42,
24
24
  width: 42,
25
- animationName: loadingRotate,
25
+ animationName: rotation,
26
26
  animationDuration: "2s",
27
27
  animationTimingFunction: "linear",
28
28
  animationIterationCount: "infinite",
29
29
  circle: {
30
- animationName: loadingDash,
30
+ animationName: spinner,
31
31
  animationDuration: "1.5s",
32
32
  animationTimingFunction: "ease-in-out",
33
33
  animationIterationCount: "infinite",
@@ -16,9 +16,7 @@ class ImageUploader extends Module {
16
16
  this.quill = quill;
17
17
  this.options = options;
18
18
  if (typeof this.options.upload !== "function")
19
- console.warn(
20
- "[Missing config] upload function that returns a promise is required"
21
- );
19
+ console.warn("[Missing config] upload function that returns a promise is required");
22
20
  const toolbar = this.quill.getModule("toolbar");
23
21
  if (toolbar) {
24
22
  toolbar.addHandler("image", this.selectLocalImage);
@@ -1,25 +1,28 @@
1
1
  import Quill from 'quill';
2
2
  import { ImageUploader } from './modules/image-uploader/image-uploader.js';
3
- import stdin_default$1 from './modules/custom-list.js';
3
+ import stdin_default$2 from './modules/custom-list.js';
4
4
  import { Formula } from './formats/formula.js';
5
5
  import { SizeStyle } from './formats/size.js';
6
6
  import { FontStyle } from './formats/font.js';
7
7
  import { Link } from './formats/link.js';
8
8
  import { AlignStyle } from './formats/align.js';
9
- import stdin_default from './formats/video.js';
9
+ import stdin_default$1 from './formats/video.js';
10
+ import stdin_default from './formats/image.js';
10
11
 
11
12
  function register() {
12
13
  Quill.register(
13
14
  {
14
15
  "modules/imageUploader": ImageUploader,
15
- "modules/customList": stdin_default$1,
16
+ "modules/customList": stdin_default$2,
16
17
  "formats/formula": Formula,
17
18
  "formats/size": SizeStyle,
18
19
  "formats/font": FontStyle,
19
20
  "formats/link": Link,
20
21
  "formats/align": AlignStyle,
21
22
  // 'formats/indent': IndentStyle,
22
- "formats/video": stdin_default
23
+ "formats/video": stdin_default$1,
24
+ "formats/image": stdin_default
25
+ // 'formats/list': List,
23
26
  },
24
27
  true
25
28
  );
@@ -1,5 +1,3 @@
1
- const editorContextKey = Symbol(
2
- "editorContext"
3
- );
1
+ const editorContextKey = Symbol("editorContext");
4
2
 
5
3
  export { editorContextKey };
@@ -1,2 +1,2 @@
1
- declare const _default: (theme?: import("vue").ComputedRef<import("../..").ThemeConfig | undefined>) => void;
1
+ declare const _default: (themeManager?: import("../../theme/theme-context").ThemeManager) => void;
2
2
  export default _default;
@@ -5,7 +5,7 @@ export interface ComponentToken {
5
5
  export interface EditorToken extends FullToken<'Editor'> {
6
6
  }
7
7
  export declare const getQuillArticleStyle: GenerateStyle<EditorToken, CSSObject>;
8
- declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, theme?: import("vue").ComputedRef<import("../..").ThemeConfig | undefined>) => {
8
+ declare const _default: (_prefixCls?: import("vue").ComputedRef<string> | string, themeManager?: import("../../theme/theme-context").ThemeManager) => {
9
9
  hashId: import("vue").Ref<string, string>;
10
10
  };
11
11
  export default _default;
@@ -267,11 +267,7 @@ const getEditorStyle = (token) => {
267
267
  };
268
268
  };
269
269
  var stdin_default = getStyleHook("Editor", (token) => {
270
- return [
271
- getEditorStyle(token),
272
- getEditorToolbarStyle(token),
273
- getEditorButtonStyle(token)
274
- ];
270
+ return [getEditorStyle(token), getEditorToolbarStyle(token), getEditorButtonStyle(token)];
275
271
  });
276
272
 
277
273
  export { stdin_default as default, getQuillArticleStyle };
@@ -1,5 +1,3 @@
1
- import { type CheckboxValueType } from 'element-plus';
2
- import { Panel } from '../../../panel';
3
1
  type __VLS_Props = {
4
2
  modelValue: any[];
5
3
  options: {
@@ -8,26 +6,10 @@ type __VLS_Props = {
8
6
  }[];
9
7
  maxHeight?: string | number;
10
8
  };
11
- declare const token: import("vue").ComputedRef<import("../../..").GlobalToken>;
12
- declare const checkAll: import("vue").Ref<boolean, boolean>;
13
- declare const isIndeterminate: import("vue").Ref<boolean, boolean>;
14
- declare const handleCheckAllChange: (val: CheckboxValueType) => void;
15
- declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
16
9
  declare var __VLS_14: {};
17
- type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
10
+ type __VLS_Slots = {} & {
18
11
  default?: (props: typeof __VLS_14) => any;
19
- }>;
20
- declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
21
- Panel: typeof Panel;
22
- token: typeof token;
23
- checkAll: typeof checkAll;
24
- isIndeterminate: typeof isIndeterminate;
25
- handleCheckAllChange: typeof handleCheckAllChange;
26
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
27
- "update:modelValue": (value: any[]) => any;
28
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
29
- "onUpdate:modelValue"?: ((value: any[]) => any) | undefined;
30
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ };
31
13
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
32
14
  "update:modelValue": (value: any[]) => any;
33
15
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{