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,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,5 +1,5 @@
1
1
  import { getGlobalStyleHook } from '../../../../theme/getGlobalStyleHook.js';
2
- import { loadingDash, loadingRotate } from '../../../../style/motion/loading.js';
2
+ import { spinner, contrarotation } from '../../../../style/animation.js';
3
3
 
4
4
  var stdin_default = getGlobalStyleHook("co-editor-image-loading", (token) => {
5
5
  return {
@@ -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: contrarotation,
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 };
@@ -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<{
@@ -56,8 +56,8 @@ var stdin_default = /* @__PURE__ */defineComponent({
56
56
  onChange: handleCheckAllChange
57
57
  }, {
58
58
  default: withCtx(() => _cache[1] || (_cache[1] = [createTextVNode(" \u5168\u9009 ")])),
59
- _: 1
60
- /* STABLE */
59
+ _: 1,
60
+ __: [1]
61
61
  }, 8, ["modelValue", "indeterminate"]), createElementVNode("div", {
62
62
  style: normalizeStyle({
63
63
  marginLeft: "auto",
@@ -2,7 +2,7 @@ import { type TreeInstance } from 'element-plus';
2
2
  import { type FieldComponentCommonProps } from '../common';
3
3
  import { FieldSelectProps, FieldSelectSlots, type FieldSelectEmits, type FieldSelectExpose } from '../select/select';
4
4
  import { ExtractPropTypes, PropType } from 'vue';
5
- declare const elTreeProps: {
5
+ export declare const elTreeProps: {
6
6
  data: {
7
7
  type: PropType<Array<{
8
8
  [key: string]: any;
@@ -106,4 +106,3 @@ export type FieldTreeSelectEmits = FieldSelectEmits & {
106
106
  (e: 'node-drop', ...args: any[]): void;
107
107
  };
108
108
  export type FieldTreeSelectExpose = FieldSelectExpose & TreeInstance;
109
- export {};
@@ -1 +1,70 @@
1
+ import { iconPropType } from 'element-plus/es/utils/index.mjs';
1
2
 
3
+ const elTreeProps = {
4
+ data: {
5
+ type: Array,
6
+ default: () => []
7
+ },
8
+ emptyText: {
9
+ type: String
10
+ },
11
+ renderAfterExpand: {
12
+ type: Boolean,
13
+ default: true
14
+ },
15
+ nodeKey: String,
16
+ checkStrictly: Boolean,
17
+ defaultExpandAll: Boolean,
18
+ expandOnClickNode: {
19
+ type: Boolean,
20
+ default: true
21
+ },
22
+ checkOnClickNode: Boolean,
23
+ checkDescendants: {
24
+ type: Boolean,
25
+ default: false
26
+ },
27
+ autoExpandParent: {
28
+ type: Boolean,
29
+ default: true
30
+ },
31
+ defaultCheckedKeys: Array,
32
+ defaultExpandedKeys: Array,
33
+ currentNodeKey: [String, Number],
34
+ renderContent: Function,
35
+ showCheckbox: {
36
+ type: Boolean,
37
+ default: false
38
+ },
39
+ draggable: {
40
+ type: Boolean,
41
+ default: false
42
+ },
43
+ allowDrag: Function,
44
+ allowDrop: Function,
45
+ props: {
46
+ type: Object,
47
+ default: () => ({
48
+ children: "children",
49
+ label: "label",
50
+ disabled: "disabled"
51
+ })
52
+ },
53
+ lazy: {
54
+ type: Boolean,
55
+ default: false
56
+ },
57
+ highlightCurrent: Boolean,
58
+ load: Function,
59
+ filterNodeMethod: Function,
60
+ accordion: Boolean,
61
+ indent: {
62
+ type: Number,
63
+ default: 18
64
+ },
65
+ icon: {
66
+ type: iconPropType
67
+ }
68
+ };
69
+
70
+ export { elTreeProps };
@@ -45,7 +45,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
45
45
  class: normalizeClass([unref(hashId), unref(prefixCls), `is-${_ctx.size}`]),
46
46
  title: _ctx.title || _ctx.src
47
47
  }, [createVNode(stdin_default$2, {
48
- name: "mdi:file-document-outline"
48
+ name: "co:document"
49
49
  }), createElementVNode("div", {
50
50
  class: normalizeClass([`${unref(prefixCls)}-filename`])
51
51
  }, toDisplayString(_ctx.name), 3
@@ -239,7 +239,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
239
239
  key: 1
240
240
  })]),
241
241
  default: withCtx(() => [createVNode(stdin_default$1, {
242
- name: "mdi:help-circle-outline",
242
+ name: "co:help",
243
243
  class: normalizeClass(`${unref(prefixCls)}-item-label-icon`),
244
244
  size: "md"
245
245
  }, null, 8, ["class"])]),
@@ -7,7 +7,7 @@ function getFormItemWidth(outWidth) {
7
7
  if (isNumber(outWidth)) {
8
8
  width = outWidth + "px";
9
9
  }
10
- let presetWidth = mapFormItemWidth[outWidth];
10
+ const presetWidth = mapFormItemWidth[outWidth];
11
11
  if (isNumber(presetWidth)) {
12
12
  width = presetWidth + "px";
13
13
  }
@@ -4,11 +4,7 @@ import { provide, reactive, toRef, useTemplateRef, ref } from 'vue';
4
4
  import { createMergedExpose } from '../../utils/vue.js';
5
5
 
6
6
  function useFormTemplate(props, options = {}) {
7
- const elFormProps = reactiveOmit(
8
- props,
9
- ...formPropsOmit,
10
- ...options.omittedProps || []
11
- );
7
+ const elFormProps = reactiveOmit(props, ...formPropsOmit, ...options.omittedProps || []);
12
8
  const resetList = [];
13
9
  const addResetField = (reset2) => {
14
10
  resetList.unshift(reset2);
@@ -62,11 +58,7 @@ function useFormTemplate(props, options = {}) {
62
58
  submit,
63
59
  reset
64
60
  };
65
- const expose = createMergedExpose(
66
- formExposeKeys,
67
- () => elFormRef.value,
68
- customExpose
69
- );
61
+ const expose = createMergedExpose(formExposeKeys, () => elFormRef.value, customExpose);
70
62
  return {
71
63
  elFormProps,
72
64
  expose,
@@ -473,7 +473,6 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
473
473
  $router: import("vue-router").TypesConfig extends Record<"$router", infer T> ? T : import("vue-router").Router;
474
474
  $pinia: import("pinia").Pinia;
475
475
  _pStores?: Record<string, import("pinia").StoreGeneric>;
476
- $cosey: import("../..").GlobalConfig;
477
476
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
478
477
  open: () => any;
479
478
  close: () => any;
@@ -41,7 +41,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
41
41
  "modelValue": visible.value,
42
42
  "onUpdate:modelValue": $event => visible.value = $event,
43
43
  "style": {
44
- maxWidth: "calc(100vw - 32px)"
44
+ maxWidth: props.fullscreen ? null : "calc(100vw - 32px)"
45
45
  },
46
46
  "width": width.value,
47
47
  "append-to-body": true,
@@ -482,7 +482,6 @@ declare const _FormDialog: {
482
482
  $router: import("vue-router").TypesConfig extends Record<"$router", infer T> ? T : import("vue-router").Router;
483
483
  $pinia: import("pinia").Pinia;
484
484
  _pStores?: Record<string, import("pinia").StoreGeneric>;
485
- $cosey: import("../..").GlobalConfig;
486
485
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
487
486
  open: () => any;
488
487
  close: () => any;
@@ -1005,7 +1004,6 @@ declare const _FormDialog: {
1005
1004
  $router: import("vue-router").TypesConfig extends Record<"$router", infer T> ? T : import("vue-router").Router;
1006
1005
  $pinia: import("pinia").Pinia;
1007
1006
  _pStores?: Record<string, import("pinia").StoreGeneric>;
1008
- $cosey: import("../..").GlobalConfig;
1009
1007
  }, {}, {}, {}, {
1010
1008
  width: import("./form-dialog").FormDialogWidth;
1011
1009
  overflow: boolean;
@@ -1517,7 +1515,6 @@ declare const _FormDialog: {
1517
1515
  $router: import("vue-router").TypesConfig extends Record<"$router", infer T> ? T : import("vue-router").Router;
1518
1516
  $pinia: import("pinia").Pinia;
1519
1517
  _pStores?: Record<string, import("pinia").StoreGeneric>;
1520
- $cosey: import("../..").GlobalConfig;
1521
1518
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
1522
1519
  open: () => any;
1523
1520
  close: () => any;
@@ -114,7 +114,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
114
114
  onClick: handleToggle
115
115
  }, [_ctx.collapsible ? (openBlock(), createBlock(stdin_default$1, {
116
116
  key: 0,
117
- name: innerCollapsed.value ? "mdi:menu-up" : "mdi:menu-down",
117
+ name: innerCollapsed.value ? "co:caret-up" : "co:caret-down",
118
118
  size: "xl"
119
119
  }, null, 8, ["name"])) : createCommentVNode("v-if", true), createTextVNode(" " + toDisplayString(_ctx.title), 1
120
120
  /* TEXT */)], 4
@@ -5,11 +5,6 @@ const defaultFormListProps = {
5
5
  modelValue: () => [],
6
6
  addText: "\u65B0\u589E"
7
7
  };
8
- const formListExposeKeys = [
9
- ...formItemExposeKeys,
10
- "add",
11
- "remove",
12
- "move"
13
- ];
8
+ const formListExposeKeys = [...formItemExposeKeys, "add", "remove", "move"];
14
9
 
15
10
  export { defaultFormListProps, formListExposeKeys };
@@ -305,7 +305,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
305
305
  "onClick": () => remove(index)
306
306
  }, {
307
307
  default: () => [createVNode(_Icon, {
308
- "name": "mdi:trash-can-outline",
308
+ "name": "co:trash-can",
309
309
  "size": "lg"
310
310
  }, null)]
311
311
  })]
@@ -320,7 +320,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
320
320
  "onClick": handleAdd
321
321
  }, {
322
322
  default: () => [createVNode(_Icon, {
323
- "name": "mdi:plus",
323
+ "name": "co:add-large",
324
324
  "class": `${prefixCls.value}-plus-icon`
325
325
  }, null), props.addText]
326
326
  })])])],
@@ -112,15 +112,15 @@ var stdin_default = /* @__PURE__ */defineComponent({
112
112
  type: "primary",
113
113
  loading: unref(submitting)
114
114
  }, {
115
- default: withCtx(() => _cache[2] || (_cache[2] = [createTextVNode(" \u67E5\u8BE2 ")])),
116
- _: 1
117
- /* STABLE */
115
+ default: withCtx(() => _cache[2] || (_cache[2] = [createTextVNode("\u67E5\u8BE2")])),
116
+ _: 1,
117
+ __: [2]
118
118
  }, 8, ["loading"]), createVNode(unref(ElButton), {
119
119
  onClick: unref(reset)
120
120
  }, {
121
121
  default: withCtx(() => _cache[3] || (_cache[3] = [createTextVNode("\u91CD\u7F6E")])),
122
- _: 1
123
- /* STABLE */
122
+ _: 1,
123
+ __: [3]
124
124
  }, 8, ["onClick"])]), showToggle.value ? (openBlock(), createBlock(unref(_Toggle), {
125
125
  key: 0,
126
126
  modelValue: unref(innerCollapsed),
@@ -187,7 +187,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
187
187
  }, [tableTree.value.length === 0 ? (openBlock(), createElementBlock("div", {
188
188
  key: 0,
189
189
  class: normalizeClass(`${unref(prefixCls)}-empty`)
190
- }, " \u6682\u65E0\u6570\u636E ", 2
190
+ }, "\u6682\u65E0\u6570\u636E", 2
191
191
  /* CLASS */)) : (openBlock(), createElementBlock("table", _hoisted_1, [_ctx.showCheckbox && !_ctx.checkStrictly ? (openBlock(), createElementBlock("thead", _hoisted_2, [createElementVNode("tr", null, [createElementVNode("td", {
192
192
  colspan: maxLevel.value
193
193
  }, [createElementVNode("div", {
@@ -198,12 +198,15 @@ var stdin_default = /* @__PURE__ */defineComponent({
198
198
  onChange: unref(onCheckAllChange)
199
199
  }, {
200
200
  default: withCtx(() => _cache[0] || (_cache[0] = [createTextVNode(" \u6240\u6709 ")])),
201
- _: 1
202
- /* STABLE */
201
+ _: 1,
202
+ __: [0]
203
203
  }, 8, ["model-value", "indeterminate", "onChange"])], 2
204
- /* CLASS */)], 8, _hoisted_3)])])) : createCommentVNode("v-if", true), createElementVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(tableTree.value, row => {
205
- return openBlock(), createElementBlock("tr", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, node => {
204
+ /* CLASS */)], 8, _hoisted_3)])])) : createCommentVNode("v-if", true), createElementVNode("tbody", null, [(openBlock(true), createElementBlock(Fragment, null, renderList(tableTree.value, (row, i) => {
205
+ return openBlock(), createElementBlock("tr", {
206
+ key: i
207
+ }, [(openBlock(true), createElementBlock(Fragment, null, renderList(row, (node, j) => {
206
208
  return openBlock(), createElementBlock("td", {
209
+ key: j,
207
210
  colspan: node.reverseLevel === 1 ? maxLevel.value - node.level + 1 : 1,
208
211
  rowspan: node.leafCount
209
212
  }, [node.reverseLevel !== 1 || !_ctx.mergeLast ? (openBlock(), createElementBlock("div", {
@@ -229,8 +232,9 @@ var stdin_default = /* @__PURE__ */defineComponent({
229
232
  }, [renderSlot(_ctx.$slots, "node", {}, () => [createTextVNode(toDisplayString(node.data[propNames.value.label]), 1
230
233
  /* TEXT */)])], 2
231
234
  /* CLASS */))], 2
232
- /* CLASS */)) : (openBlock(), createElementBlock("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(node.parent.children, _node => {
235
+ /* CLASS */)) : (openBlock(), createElementBlock("div", _hoisted_5, [(openBlock(true), createElementBlock(Fragment, null, renderList(node.parent.children, (_node, k) => {
233
236
  return openBlock(), createElementBlock("div", {
237
+ key: k,
234
238
  class: normalizeClass(`${unref(prefixCls)}-node`)
235
239
  }, [_ctx.showCheckbox ? (openBlock(), createBlock(_component_el_checkbox, {
236
240
  key: 0,
@@ -252,12 +256,12 @@ var stdin_default = /* @__PURE__ */defineComponent({
252
256
  }, toDisplayString(_node.data[propNames.value.label]), 3
253
257
  /* TEXT, CLASS */)])], 2
254
258
  /* CLASS */);
255
- }), 256
256
- /* UNKEYED_FRAGMENT */))]))], 8, _hoisted_4);
257
- }), 256
258
- /* UNKEYED_FRAGMENT */))]);
259
- }), 256
260
- /* UNKEYED_FRAGMENT */))])]))], 2
259
+ }), 128
260
+ /* KEYED_FRAGMENT */))]))], 8, _hoisted_4);
261
+ }), 128
262
+ /* KEYED_FRAGMENT */))]);
263
+ }), 128
264
+ /* KEYED_FRAGMENT */))])]))], 2
261
265
  /* CLASS */);
262
266
  };
263
267
  }
@@ -1,3 +1,6 @@
1
+ import type { IconifyJSON } from '@iconify/types';
2
+ export declare const iconifyIconsSets: Record<string, any>;
3
+ export declare const addIconifyIcon: (prefix: string, icons: IconifyJSON) => void;
1
4
  export interface IconifyIconProps {
2
5
  prefix: string;
3
6
  name: string;
@@ -1 +1,10 @@
1
+ import { icons } from '@cosey/icons';
1
2
 
3
+ const iconifyIconsSets = {
4
+ co: icons
5
+ };
6
+ const addIconifyIcon = (prefix, icons) => {
7
+ iconifyIconsSets[prefix] = icons;
8
+ };
9
+
10
+ export { addIconifyIcon, iconifyIconsSets };
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, computed, createElementBlock, openBlock } from 'vue';
2
- import { icons } from '@iconify-json/mdi';
2
+ import { iconifyIconsSets } from './iconify-icon.js';
3
3
 
4
4
  const _hoisted_1 = ["viewBox", "innerHTML"];
5
5
  var stdin_default = /* @__PURE__ */defineComponent({
@@ -19,10 +19,7 @@ var stdin_default = /* @__PURE__ */defineComponent({
19
19
  },
20
20
  setup(__props) {
21
21
  const props = __props;
22
- const iconSets = {
23
- mdi: icons
24
- };
25
- const iconSet = computed(() => iconSets[props.prefix]);
22
+ const iconSet = computed(() => iconifyIconsSets[props.prefix]);
26
23
  const viewBox = computed(() => `0 0 ${iconSet.value?.width ?? 16} ${iconSet.value?.height ?? 16}`);
27
24
  const path = computed(() => {
28
25
  const icon = iconSet.value?.icons[props.name];
@@ -1,5 +1,6 @@
1
1
  import { withInstall } from '../utils.js';
2
2
  import stdin_default$1 from './iconify-icon.vue.js';
3
+ export { addIconifyIcon, iconifyIconsSets } from './iconify-icon.js';
3
4
 
4
5
  const _IconifyIcon = withInstall(stdin_default$1);
5
6
  var stdin_default = _IconifyIcon;