cosey 0.1.1 → 0.1.3

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 (213) hide show
  1. package/components/audio-card/audio-card.vue.js +1 -1
  2. package/components/close/close.vue.js +1 -1
  3. package/components/components.d.ts +98 -44
  4. package/components/config-provider/config-provider.js +1 -3
  5. package/components/config-provider/config-provider.vue.d.ts +2 -7
  6. package/components/config-provider/index.d.ts +1 -1
  7. package/components/context-menu/content.vue.js +1 -1
  8. package/components/context-menu/context-menu.vue.js +2 -2
  9. package/components/copy/copy.vue.js +1 -1
  10. package/components/cssinjs/parser.js +8 -25
  11. package/components/dnd-sort/dnd-sort-item.vue.js +2 -3
  12. package/components/dnd-sort/dnd-sort.vue.js +1 -2
  13. package/components/dnd-sort/index.d.ts +1 -1
  14. package/components/editor/components/button-group.vue.d.ts +2 -7
  15. package/components/editor/components/button.vue.d.ts +2 -7
  16. package/components/editor/components/color-picker/color-picker.vue.d.ts +2 -43
  17. package/components/editor/components/color-picker/color-picker.vue.js +14 -11
  18. package/components/editor/components/picker/picker.vue.d.ts +2 -15
  19. package/components/editor/components/resize/resize.js +4 -4
  20. package/components/editor/components/resize/resize.style.js +9 -32
  21. package/components/editor/components/resize/resize.vue.js +21 -14
  22. package/components/editor/components/select-button.vue.d.ts +2 -9
  23. package/components/editor/components/select-button.vue.js +1 -1
  24. package/components/editor/components/split-button.vue.d.ts +2 -19
  25. package/components/editor/components/split-button.vue.js +1 -1
  26. package/components/editor/components/table-toolbar/table-toolbar.vue.js +9 -9
  27. package/components/editor/components/toolbar/formats/align.vue.js +4 -4
  28. package/components/editor/components/toolbar/formats/blockquote.vue.js +1 -1
  29. package/components/editor/components/toolbar/formats/bold.vue.js +1 -1
  30. package/components/editor/components/toolbar/formats/clean.vue.js +1 -1
  31. package/components/editor/components/toolbar/formats/code-block.vue.js +1 -1
  32. package/components/editor/components/toolbar/formats/code.vue.js +1 -1
  33. package/components/editor/components/toolbar/formats/formula.vue.js +4 -3
  34. package/components/editor/components/toolbar/formats/image.vue.js +1 -1
  35. package/components/editor/components/toolbar/formats/indent.vue.js +2 -2
  36. package/components/editor/components/toolbar/formats/italic.vue.js +1 -1
  37. package/components/editor/components/toolbar/formats/link.vue.js +15 -13
  38. package/components/editor/components/toolbar/formats/list.vue.js +3 -3
  39. package/components/editor/components/toolbar/formats/script.vue.js +2 -2
  40. package/components/editor/components/toolbar/formats/size-delta.vue.js +2 -2
  41. package/components/editor/components/toolbar/formats/strike.vue.js +1 -1
  42. package/components/editor/components/toolbar/formats/table.vue.js +1 -1
  43. package/components/editor/components/toolbar/formats/underline.vue.js +1 -1
  44. package/components/editor/components/toolbar/formats/video.vue.js +1 -1
  45. package/components/editor/components/toolbar/toolbar.d.ts +1 -2
  46. package/components/editor/components/toolbar/toolbar.js +17 -21
  47. package/components/editor/components/toolbar/toolbarContext.js +1 -3
  48. package/components/editor/formats/image.d.ts +13 -0
  49. package/components/editor/formats/image.js +46 -0
  50. package/components/editor/formats/indent.d.ts +2 -0
  51. package/components/editor/formats/indent.js +12 -7
  52. package/components/editor/formats/link.js +1 -5
  53. package/components/editor/formats/list.d.ts +0 -4
  54. package/components/editor/formats/list.js +10 -5
  55. package/components/editor/formats/video.js +6 -9
  56. package/components/editor/modules/custom-list.js +1 -6
  57. package/components/editor/modules/image-uploader/formats/image-loading.style.js +3 -3
  58. package/components/editor/modules/image-uploader/image-uploader.js +1 -3
  59. package/components/editor/quill.js +7 -4
  60. package/components/editor/quillContext.js +1 -3
  61. package/components/editor/style/index.js +1 -5
  62. package/components/field/components/checkbox-group/panel.vue.d.ts +2 -20
  63. package/components/field/components/checkbox-group/panel.vue.js +2 -2
  64. package/components/field/components/tree-select/tree-select.d.ts +1 -2
  65. package/components/field/components/tree-select/tree-select.js +69 -0
  66. package/components/file-card/file-card.vue.js +1 -1
  67. package/components/form/form-item.vue.js +1 -1
  68. package/components/form/useFormItemWidth.js +1 -1
  69. package/components/form/useFormTemplate.js +2 -10
  70. package/components/form-dialog/form-dialog.vue.d.ts +0 -1
  71. package/components/form-dialog/form-dialog.vue.js +1 -1
  72. package/components/form-dialog/index.d.ts +0 -3
  73. package/components/form-group/form-group.vue.js +1 -1
  74. package/components/form-list/form-list.js +1 -6
  75. package/components/form-list/form-list.vue.js +2 -2
  76. package/components/form-query/form-query.vue.js +5 -5
  77. package/components/horizontal-tree/horizontal-tree.vue.js +16 -12
  78. package/components/iconify-icon/iconify-icon.d.ts +3 -0
  79. package/components/iconify-icon/iconify-icon.js +9 -0
  80. package/components/iconify-icon/iconify-icon.vue.js +2 -5
  81. package/components/iconify-icon/index.js +1 -0
  82. package/components/index.js +3 -2
  83. package/components/media-card-group/media-card-group.vue.js +4 -3
  84. package/components/scroll-view/scroll-view.vue.js +1 -2
  85. package/components/snug-menu/snug-menu.vue.js +1 -2
  86. package/components/style/animation.d.ts +5 -0
  87. package/components/style/animation.js +33 -0
  88. package/components/style/index.d.ts +1 -1
  89. package/components/style/index.js +2 -2
  90. package/components/style/mixins.d.ts +2 -0
  91. package/components/style/mixins.js +10 -1
  92. package/components/table/index.d.ts +0 -8
  93. package/components/table/style/index.js +2 -2
  94. package/components/table/table-column/renderer.js +22 -18
  95. package/components/table/table-column-editor/item.vue.js +4 -7
  96. package/components/table/table-column-editor/table-column-editor.vue.d.ts +2 -246
  97. package/components/table/table-column-editor/table-column-editor.vue.js +9 -9
  98. package/components/table/table-export/table-export.vue.js +2 -2
  99. package/components/table/table-query/table-query.d.ts +0 -4
  100. package/components/table/table-query/table-query.js +0 -4
  101. package/components/table/table-query/table-query.vue.d.ts +0 -9
  102. package/components/table/table-query/table-query.vue.js +14 -12
  103. package/components/table/table.js +1 -3
  104. package/components/table/table.vue.js +22 -24
  105. package/components/table/useTable.js +1 -4
  106. package/components/table/utils.js +1 -3
  107. package/components/table-action/item.vue.js +5 -5
  108. package/components/table-action/table-action.vue.js +4 -3
  109. package/components/theme/StyleContext.js +1 -3
  110. package/components/theme/createCacheToken.js +1 -4
  111. package/components/theme/getGlobalStyleHook.js +2 -5
  112. package/components/theme/getSimpleStyleHook.js +1 -4
  113. package/components/theme/getStyleHook.js +1 -4
  114. package/components/theme/interface/index.d.ts +1 -1
  115. package/components/theme/themes/shared/genColorMapToken.js +1 -4
  116. package/components/theme/useStyleRegister.js +1 -3
  117. package/components/theme/util/alias.js +4 -16
  118. package/components/theme/util/getAlphaColor.js +1 -6
  119. package/components/theme/util/normalizeStyle.js +1 -1
  120. package/components/theme/util/statistic.js +4 -1
  121. package/components/theme/util/useToken.js +1 -4
  122. package/components/toggle/toggle.vue.js +1 -1
  123. package/components/transition/transition.vue.js +1 -2
  124. package/components/upload/upload-item.vue.js +8 -8
  125. package/components/upload/upload.vue.js +1 -1
  126. package/components/video-card/video-card.vue.js +1 -1
  127. package/config/index.d.ts +1 -0
  128. package/config/index.js +2 -7
  129. package/config/layout.d.ts +36 -0
  130. package/config/layout.js +37 -1
  131. package/config/nprogress.style.d.ts +2 -0
  132. package/config/nprogress.style.js +51 -0
  133. package/config/root-config-provider.vue.d.ts +2 -20
  134. package/config/root-config-provider.vue.js +2 -0
  135. package/hooks/useColorScheme.js +5 -9
  136. package/hooks/useEcharts.js +2 -4
  137. package/hooks/useFetch.d.ts +1 -1
  138. package/hooks/useFetch.js +1 -7
  139. package/hooks/useFullPage.js +7 -9
  140. package/hooks/useLocale.js +1 -3
  141. package/hooks/useLockscreenObserver.js +1 -1
  142. package/hooks/usePersist.js +1 -3
  143. package/hooks/useTreeCheck.js +13 -26
  144. package/hooks/useUpsert.d.ts +3 -3
  145. package/index.d.ts +1 -0
  146. package/index.js +5 -4
  147. package/layout/index.js +2 -2
  148. package/layout/layout-aside/layout-aside.vue.js +2 -1
  149. package/layout/layout-base/layout-base.vue.js +1 -1
  150. package/layout/layout-change-password/layout-change-password.vue.js +8 -8
  151. package/layout/layout-change-password/style/index.js +1 -1
  152. package/layout/layout-color-scheme/layout-color-scheme.vue.js +8 -14
  153. package/layout/layout-color-scheme/style/index.d.ts +0 -3
  154. package/layout/layout-color-scheme/style/index.js +26 -44
  155. package/layout/layout-content/layout-content.vue.d.ts +2 -13
  156. package/layout/layout-forbidden/layout-forbidden.vue.js +2 -2
  157. package/layout/layout-header/layout-header.vue.d.ts +2 -14
  158. package/layout/layout-internal-server-error/layout-internal-server-error.vue.js +2 -2
  159. package/layout/layout-login/layout-login.vue.js +5 -5
  160. package/layout/layout-login/style/index.js +1 -1
  161. package/layout/layout-mask/style/index.js +1 -1
  162. package/layout/layout-not-found/layout-not-found.vue.js +2 -2
  163. package/layout/layout-search/layout-search.vue.js +37 -34
  164. package/layout/layout-sidebar/layout-sidebar.vue.d.ts +2 -15
  165. package/layout/layout-sidebar/style/index.js +1 -1
  166. package/layout/layout-switch-effect/layout-switch-effect.vue.d.ts +2 -7
  167. package/layout/layout-tabbar/layout-tabbar.vue.js +2 -2
  168. package/layout/layout-tabbar/reload.vue.js +1 -1
  169. package/layout/layout-tabbar/style/index.js +2 -2
  170. package/layout/layout-toggle/layout-toggle.vue.js +1 -1
  171. package/layout/layout-top-snug-menu/layout-top-snug-menu.vue.js +4 -3
  172. package/layout/layout-topbar/layout-topbar.vue.d.ts +2 -1217
  173. package/layout/layout-user-menu/index.d.ts +1 -0
  174. package/layout/layout-user-menu/index.js +1 -0
  175. package/layout/{layout-user/layout-user.vue.js → layout-user-menu/layout-user-menu.vue.js} +18 -13
  176. package/layout/{layout-user → layout-user-menu}/style/index.js +9 -5
  177. package/layout/layout.d.ts +1 -1
  178. package/layout/layout.js +1 -1
  179. package/layout/merged/index.d.ts +1 -1
  180. package/layout/merged/index.js +1 -1
  181. package/layout/merged/{layout-user.js → layout-user-menu.js} +1 -1
  182. package/layout/utils.js +1 -4
  183. package/package.json +16 -6
  184. package/request/useRequest.js +1 -1
  185. package/router/guard/auth.js +2 -5
  186. package/router/guard/index.js +0 -2
  187. package/router/guard/progress.js +11 -1
  188. package/router/index.d.ts +22 -0
  189. package/store/layout.d.ts +2 -8
  190. package/store/layout.js +19 -31
  191. package/store/user.d.ts +1 -1
  192. package/store/user.js +1 -1
  193. package/utils/array.js +3 -0
  194. package/utils/excel/index.js +1 -3
  195. package/utils/excel/utils.js +1 -5
  196. package/utils/file.js +1 -3
  197. package/utils/object.js +1 -3
  198. package/utils/tree.js +2 -11
  199. package/utils/vue.js +1 -1
  200. package/components/global.d.js +0 -1
  201. package/components/style/motion/index.d.ts +0 -1
  202. package/components/style/motion/index.js +0 -1
  203. package/components/style/motion/loading.d.ts +0 -3
  204. package/components/style/motion/loading.js +0 -23
  205. package/layout/layout-user/index.d.ts +0 -1
  206. package/layout/layout-user/index.js +0 -1
  207. package/router/guard/popup.d.ts +0 -2
  208. package/router/guard/popup.js +0 -6
  209. package/types/vue-router.d.js +0 -1
  210. package/types/vue.d.js +0 -1
  211. /package/layout/{layout-user/layout-user.vue.d.ts → layout-user-menu/layout-user-menu.vue.d.ts} +0 -0
  212. /package/layout/{layout-user → layout-user-menu}/style/index.d.ts +0 -0
  213. /package/layout/merged/{layout-user.d.ts → layout-user-menu.d.ts} +0 -0
@@ -1,14 +1,15 @@
1
- import { defineComponent, useTemplateRef, inject, ref, shallowRef, watch, onMounted, onBeforeUnmount, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, createElementVNode, Fragment, renderList, createVNode, toDisplayString } from 'vue';
1
+ import { defineComponent, useTemplateRef, inject, ref, shallowRef, watch, onMounted, onBeforeUnmount, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, createElementVNode, Fragment, renderList, createVNode, withCtx, toDisplayString } from 'vue';
2
2
  import Quill from 'quill';
3
3
  import stdin_default$1 from './resize.style.js';
4
4
  import { getAlign, mapIcons, onDrag, setAlignStyle } from './resize.js';
5
5
  import { Icon as _Icon } from '../../../icon/index.js';
6
+ import stdin_default$3 from '../button.vue.js';
7
+ import stdin_default$2 from '../button-group.vue.js';
6
8
  import { editorContextKey } from '../../quillContext.js';
7
9
  import { useRectObserver } from '../../../../hooks/useRectObserver.js';
8
10
  import { useComponentConfig } from '../../../config-provider/config-provider.js';
9
11
 
10
12
  const _hoisted_1 = ["onPointerdown", "onPointermove", "onPointerup", "onPointercancel"];
11
- const _hoisted_2 = ["onClick"];
12
13
  var stdin_default = /* @__PURE__ */defineComponent({
13
14
  __name: "resize",
14
15
  setup(__props) {
@@ -171,18 +172,24 @@ var stdin_default = /* @__PURE__ */defineComponent({
171
172
  }), 64
172
173
  /* STABLE_FRAGMENT */)), createElementVNode("div", {
173
174
  class: normalizeClass(`${unref(prefixCls)}-align`)
174
- }, [(openBlock(), createElementBlock(Fragment, null, renderList(aligns, align => {
175
- return createElementVNode("div", {
176
- key: align,
177
- class: normalizeClass([`${unref(prefixCls)}-align-btn`, `${unref(prefixCls)}-align-${align}`, {
178
- "is-active": align === currentAlign.value
179
- }]),
180
- onClick: $event => onAlignClick(align)
181
- }, [createVNode(unref(_Icon), {
182
- name: unref(mapIcons)[align]
183
- }, null, 8, ["name"])], 10, _hoisted_2);
184
- }), 64
185
- /* STABLE_FRAGMENT */))], 2
175
+ }, [createVNode(stdin_default$2, null, {
176
+ default: withCtx(() => [(openBlock(), createElementBlock(Fragment, null, renderList(aligns, align => {
177
+ return createVNode(stdin_default$3, {
178
+ key: align,
179
+ active: align === currentAlign.value,
180
+ onClick: $event => onAlignClick(align)
181
+ }, {
182
+ default: withCtx(() => [createVNode(unref(_Icon), {
183
+ name: unref(mapIcons)[align]
184
+ }, null, 8, ["name"])]),
185
+ _: 2
186
+ /* DYNAMIC */
187
+ }, 1032, ["active", "onClick"]);
188
+ }), 64
189
+ /* STABLE_FRAGMENT */))]),
190
+ _: 1
191
+ /* STABLE */
192
+ })], 2
186
193
  /* CLASS */), createElementVNode("div", {
187
194
  class: normalizeClass([`${unref(prefixCls)}-size`, {
188
195
  "is-outside": isOutSize.value
@@ -1,17 +1,10 @@
1
- import { Icon } from '../../icon';
2
1
  type __VLS_Props = {
3
2
  width?: string;
4
3
  };
5
- declare const prefixCls: import("vue").ComputedRef<string>;
6
- declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
7
4
  declare var __VLS_1: {};
8
- type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
5
+ type __VLS_Slots = {} & {
9
6
  default?: (props: typeof __VLS_1) => any;
10
- }>;
11
- declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
12
- Icon: typeof Icon;
13
- prefixCls: typeof prefixCls;
14
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
7
+ };
15
8
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
9
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
17
10
  export default _default;
@@ -35,7 +35,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
35
35
  }, [renderSlot(_ctx.$slots, "default")], 2
36
36
  /* CLASS */), createVNode(unref(_Icon), {
37
37
  class: normalizeClass(`${unref(prefixCls)}-arrow`),
38
- name: "mdi:chevron-down",
38
+ name: "co:chevron-down",
39
39
  size: "lg"
40
40
  }, null, 8, ["class"])], 6
41
41
  /* CLASS, STYLE */);
@@ -1,28 +1,11 @@
1
- import { Icon } from '../../icon';
2
1
  type __VLS_Props = {
3
2
  chevronActive?: boolean;
4
3
  active?: boolean;
5
4
  };
6
- declare const prefixCls: import("vue").ComputedRef<string>;
7
- declare const onBtnClick: (event: MouseEvent) => void;
8
- declare const onChevronClick: (event: MouseEvent) => void;
9
- declare const __VLS_ctx: InstanceType<__VLS_PickNotAny<typeof __VLS_self, new () => {}>>;
10
5
  declare var __VLS_1: {};
11
- type __VLS_Slots = __VLS_PrettifyGlobal<__VLS_OmitStringIndex<typeof __VLS_ctx.$slots> & {
6
+ type __VLS_Slots = {} & {
12
7
  default?: (props: typeof __VLS_1) => any;
13
- }>;
14
- declare const __VLS_self: import("vue").DefineComponent<__VLS_Props, {
15
- Icon: typeof Icon;
16
- prefixCls: typeof prefixCls;
17
- onBtnClick: typeof onBtnClick;
18
- onChevronClick: typeof onChevronClick;
19
- }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
20
- click: (event: MouseEvent) => any;
21
- "chevron-click": (event: MouseEvent) => any;
22
- }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
23
- onClick?: ((event: MouseEvent) => any) | undefined;
24
- "onChevron-click"?: ((event: MouseEvent) => any) | undefined;
25
- }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
8
+ };
26
9
  declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
27
10
  click: (event: MouseEvent) => any;
28
11
  "chevron-click": (event: MouseEvent) => any;
@@ -57,7 +57,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
57
57
  onClick: onChevronClick
58
58
  }, [createVNode(unref(_Icon), {
59
59
  class: normalizeClass(`${unref(prefixCls)}-arrow`),
60
- name: "mdi:chevron-down",
60
+ name: "co:chevron-down",
61
61
  size: "lg"
62
62
  }, null, 8, ["class"])], 2
63
63
  /* CLASS */)], 2
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, useTemplateRef, watch, computed, inject, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, createVNode, createCommentVNode, withCtx } from 'vue';
1
+ import { defineComponent, ref, useTemplateRef, watch, computed, inject, createElementBlock, openBlock, normalizeStyle, normalizeClass, unref, createVNode, withCtx } from 'vue';
2
2
  import { offset, flip, shift } from '@floating-ui/dom';
3
3
  import stdin_default$1 from './table-toolbar.style.js';
4
4
  import { Icon as _Icon } from '../../../icon/index.js';
@@ -110,7 +110,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
110
110
  onClick: _cache[0] || (_cache[0] = $event => table.insertRowAbove())
111
111
  }, {
112
112
  default: withCtx(() => [createVNode(unref(_Icon), {
113
- name: "mdi:table-row-plus-before"
113
+ name: "co:table-row-plus-before"
114
114
  })]),
115
115
  _: 1
116
116
  /* STABLE */
@@ -118,7 +118,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
118
118
  onClick: _cache[1] || (_cache[1] = $event => table.insertRowBelow())
119
119
  }, {
120
120
  default: withCtx(() => [createVNode(unref(_Icon), {
121
- name: "mdi:table-row-plus-after"
121
+ name: "co:table-row-plus-after"
122
122
  })]),
123
123
  _: 1
124
124
  /* STABLE */
@@ -126,7 +126,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
126
126
  onClick: _cache[2] || (_cache[2] = $event => table.deleteRow())
127
127
  }, {
128
128
  default: withCtx(() => [createVNode(unref(_Icon), {
129
- name: "mdi:table-row-remove"
129
+ name: "co:table-row-remove"
130
130
  })]),
131
131
  _: 1
132
132
  /* STABLE */
@@ -138,7 +138,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
138
138
  onClick: _cache[3] || (_cache[3] = $event => table.insertColumnLeft())
139
139
  }, {
140
140
  default: withCtx(() => [createVNode(unref(_Icon), {
141
- name: "mdi:table-column-plus-before"
141
+ name: "co:table-column-plus-before"
142
142
  })]),
143
143
  _: 1
144
144
  /* STABLE */
@@ -146,7 +146,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
146
146
  onClick: _cache[4] || (_cache[4] = $event => table.insertColumnRight())
147
147
  }, {
148
148
  default: withCtx(() => [createVNode(unref(_Icon), {
149
- name: "mdi:table-column-plus-after"
149
+ name: "co:table-column-plus-after"
150
150
  })]),
151
151
  _: 1
152
152
  /* STABLE */
@@ -154,19 +154,19 @@ var stdin_default = /* @__PURE__ */defineComponent({
154
154
  onClick: _cache[5] || (_cache[5] = $event => table.deleteColumn())
155
155
  }, {
156
156
  default: withCtx(() => [createVNode(unref(_Icon), {
157
- name: "mdi:table-column-remove"
157
+ name: "co:table-column-remove"
158
158
  })]),
159
159
  _: 1
160
160
  /* STABLE */
161
161
  })]),
162
162
  _: 1
163
163
  /* STABLE */
164
- }), createCommentVNode(' <ButtonGroup>\n <Button @click="table.setTopHeader()">\n <Icon name="mdi:table-large" />\n </Button>\n <Button @click="table.setLeftHeader()">\n <Icon name="mdi:table-large" style="transform: rotate(-90deg)" />\n </Button>\n </ButtonGroup> '), createVNode(stdin_default$2, null, {
164
+ }), createVNode(stdin_default$2, null, {
165
165
  default: withCtx(() => [createVNode(stdin_default$3, {
166
166
  onClick: _cache[6] || (_cache[6] = $event => table.deleteTable())
167
167
  }, {
168
168
  default: withCtx(() => [createVNode(unref(_Icon), {
169
- name: "mdi:table-remove"
169
+ name: "co:table-remove"
170
170
  })]),
171
171
  _: 1
172
172
  /* STABLE */
@@ -19,10 +19,10 @@ var stdin_default = /* @__PURE__ */defineComponent({
19
19
  } = inject(toolbarContextKey);
20
20
  const isActive = ref(false);
21
21
  const mapIcons = {
22
- left: "mdi:format-align-left",
23
- center: "mdi:format-align-center",
24
- right: "mdi:format-align-right",
25
- justify: "mdi:format-align-justify"
22
+ left: "co:text-align-left",
23
+ center: "co:text-align-center",
24
+ right: "co:text-align-right",
25
+ justify: "co:text-align-justify"
26
26
  };
27
27
  watch(toolbar, toolbar2 => {
28
28
  if (toolbar2) {
@@ -27,7 +27,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
27
27
  onClick: _cache[0] || (_cache[0] = $event => unref(toolbar)?.blockquote(!isActive.value))
28
28
  }, {
29
29
  default: withCtx(() => [createVNode(unref(stdin_default$2), {
30
- name: "mdi:format-quote-open"
30
+ name: "co:quotes"
31
31
  })]),
32
32
  _: 1
33
33
  /* STABLE */
@@ -27,7 +27,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
27
27
  onClick: _cache[0] || (_cache[0] = $event => unref(toolbar)?.bold(!isActive.value))
28
28
  }, {
29
29
  default: withCtx(() => [createVNode(unref(stdin_default$2), {
30
- name: "mdi:format-bold"
30
+ name: "co:text-bold"
31
31
  })]),
32
32
  _: 1
33
33
  /* STABLE */
@@ -14,7 +14,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
14
14
  onClick: _cache[0] || (_cache[0] = $event => unref(toolbar)?.clean())
15
15
  }, {
16
16
  default: withCtx(() => [createVNode(unref(stdin_default$2), {
17
- name: "mdi:format-clear"
17
+ name: "co:text-clear-format"
18
18
  })]),
19
19
  _: 1
20
20
  /* STABLE */
@@ -27,7 +27,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
27
27
  onClick: _cache[0] || (_cache[0] = $event => unref(toolbar)?.codeBlock(!isActive.value))
28
28
  }, {
29
29
  default: withCtx(() => [createVNode(unref(stdin_default$2), {
30
- name: "mdi:code-braces"
30
+ name: "co:code-block"
31
31
  })]),
32
32
  _: 1
33
33
  /* STABLE */
@@ -27,7 +27,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
27
27
  onClick: _cache[0] || (_cache[0] = $event => unref(toolbar)?.code(!isActive.value))
28
28
  }, {
29
29
  default: withCtx(() => [createVNode(unref(stdin_default$2), {
30
- name: "mdi:code-tags"
30
+ name: "co:code"
31
31
  })]),
32
32
  _: 1
33
33
  /* STABLE */
@@ -51,7 +51,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
51
51
  onClick: onBtnClick
52
52
  }, {
53
53
  default: withCtx(() => [createVNode(unref(stdin_default$2), {
54
- name: "mdi:function-variant"
54
+ name: "co:function-math"
55
55
  })]),
56
56
  _: 1
57
57
  /* STABLE */
@@ -79,6 +79,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
79
79
  }, {
80
80
  default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(formulas), item => {
81
81
  return openBlock(), createBlock(unref(ElButton), {
82
+ key: item.formula,
82
83
  onClick: $event => formModel.formula = item.formula
83
84
  }, {
84
85
  default: withCtx(() => [createTextVNode(toDisplayString(item.name), 1
@@ -86,8 +87,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
86
87
  _: 2
87
88
  /* DYNAMIC */
88
89
  }, 1032, ["onClick"]);
89
- }), 256
90
- /* UNKEYED_FRAGMENT */))]),
90
+ }), 128
91
+ /* KEYED_FRAGMENT */))]),
91
92
  _: 1
92
93
  /* STABLE */
93
94
  })]),
@@ -14,7 +14,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
14
14
  onClick: _cache[0] || (_cache[0] = $event => unref(toolbar)?.image())
15
15
  }, {
16
16
  default: withCtx(() => [createVNode(unref(stdin_default$2), {
17
- name: "mdi:image-outline"
17
+ name: "co:image"
18
18
  })]),
19
19
  _: 1
20
20
  /* STABLE */
@@ -13,8 +13,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
13
13
  },
14
14
  setup(__props) {
15
15
  const mapIcons = {
16
- "-1": "mdi:format-indent-decrease",
17
- "+1": "mdi:format-indent-increase"
16
+ "-1": "co:text-indent-less",
17
+ "+1": "co:text-indent-more"
18
18
  };
19
19
  const {
20
20
  toolbar
@@ -27,7 +27,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
27
27
  onClick: _cache[0] || (_cache[0] = $event => unref(toolbar)?.italic(!isActive.value))
28
28
  }, {
29
29
  default: withCtx(() => [createVNode(unref(stdin_default$2), {
30
- name: "mdi:format-italic"
30
+ name: "co:text-italic"
31
31
  })]),
32
32
  _: 1
33
33
  /* STABLE */
@@ -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 */
@@ -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 };
@@ -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;