@opentiny/tiny-vue-mcp 0.0.4 → 0.0.6-alpha.1

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 (168) hide show
  1. package/dist/index.js +278 -270
  2. package/dist/{index.d.ts → packages/mcp/index.d.ts} +5 -2
  3. package/dist/packages/mcp/src/utils/__tests__/webmcp.test.d.ts +1 -0
  4. package/dist/{src → packages/mcp/src}/utils/defineTool.d.ts +13 -2
  5. package/dist/packages/mcp/vitest.config.d.ts +2 -0
  6. package/dist/src/lang/en.js +857 -0
  7. package/dist/src/utils/defineTool.js +41 -4
  8. package/index.ts +11 -3
  9. package/package.json +11 -2
  10. package/src/utils/__tests__/webmcp.test.ts +153 -0
  11. package/src/utils/defineTool.ts +112 -41
  12. package/vite.config.ts +29 -29
  13. package/vitest.config.ts +8 -0
  14. /package/dist/{src → packages/mcp/src}/action-menu/index.d.ts +0 -0
  15. /package/dist/{src → packages/mcp/src}/alert/index.d.ts +0 -0
  16. /package/dist/{src → packages/mcp/src}/amount/index.d.ts +0 -0
  17. /package/dist/{src → packages/mcp/src}/anchor/index.d.ts +0 -0
  18. /package/dist/{src → packages/mcp/src}/area/index.d.ts +0 -0
  19. /package/dist/{src → packages/mcp/src}/autocomplete/index.d.ts +0 -0
  20. /package/dist/{src → packages/mcp/src}/avatar/index.d.ts +0 -0
  21. /package/dist/{src → packages/mcp/src}/badge/index.d.ts +0 -0
  22. /package/dist/{src → packages/mcp/src}/base-select/index.d.ts +0 -0
  23. /package/dist/{src → packages/mcp/src}/breadcrumb/index.d.ts +0 -0
  24. /package/dist/{src → packages/mcp/src}/bulletin-board/index.d.ts +0 -0
  25. /package/dist/{src → packages/mcp/src}/button/index.d.ts +0 -0
  26. /package/dist/{src → packages/mcp/src}/button-group/index.d.ts +0 -0
  27. /package/dist/{src → packages/mcp/src}/calendar/index.d.ts +0 -0
  28. /package/dist/{src → packages/mcp/src}/calendar-view/index.d.ts +0 -0
  29. /package/dist/{src → packages/mcp/src}/card/index.d.ts +0 -0
  30. /package/dist/{src → packages/mcp/src}/card-group/index.d.ts +0 -0
  31. /package/dist/{src → packages/mcp/src}/card-template/index.d.ts +0 -0
  32. /package/dist/{src → packages/mcp/src}/carousel/index.d.ts +0 -0
  33. /package/dist/{src → packages/mcp/src}/cascader/index.d.ts +0 -0
  34. /package/dist/{src → packages/mcp/src}/cascader-panel/index.d.ts +0 -0
  35. /package/dist/{src → packages/mcp/src}/chart/index.d.ts +0 -0
  36. /package/dist/{src → packages/mcp/src}/checkbox/index.d.ts +0 -0
  37. /package/dist/{src → packages/mcp/src}/checkbox-button/index.d.ts +0 -0
  38. /package/dist/{src → packages/mcp/src}/checkbox-group/index.d.ts +0 -0
  39. /package/dist/{src → packages/mcp/src}/collapse/index.d.ts +0 -0
  40. /package/dist/{src → packages/mcp/src}/color-picker/index.d.ts +0 -0
  41. /package/dist/{src → packages/mcp/src}/color-select-panel/index.d.ts +0 -0
  42. /package/dist/{src → packages/mcp/src}/company/index.d.ts +0 -0
  43. /package/dist/{src → packages/mcp/src}/country/index.d.ts +0 -0
  44. /package/dist/{src → packages/mcp/src}/crop/index.d.ts +0 -0
  45. /package/dist/{src → packages/mcp/src}/currency/index.d.ts +0 -0
  46. /package/dist/{src → packages/mcp/src}/date-panel/index.d.ts +0 -0
  47. /package/dist/{src → packages/mcp/src}/date-picker/index.d.ts +0 -0
  48. /package/dist/{src → packages/mcp/src}/date-range/index.d.ts +0 -0
  49. /package/dist/{src → packages/mcp/src}/date-table/index.d.ts +0 -0
  50. /package/dist/{src → packages/mcp/src}/dept/index.d.ts +0 -0
  51. /package/dist/{src → packages/mcp/src}/dialog-box/index.d.ts +0 -0
  52. /package/dist/{src → packages/mcp/src}/dialog-select/index.d.ts +0 -0
  53. /package/dist/{src → packages/mcp/src}/divider/index.d.ts +0 -0
  54. /package/dist/{src → packages/mcp/src}/drawer/index.d.ts +0 -0
  55. /package/dist/{src → packages/mcp/src}/drop-roles/index.d.ts +0 -0
  56. /package/dist/{src → packages/mcp/src}/drop-times/index.d.ts +0 -0
  57. /package/dist/{src → packages/mcp/src}/dropdown/index.d.ts +0 -0
  58. /package/dist/{src → packages/mcp/src}/dropdown-item/index.d.ts +0 -0
  59. /package/dist/{src → packages/mcp/src}/dropdown-menu/index.d.ts +0 -0
  60. /package/dist/{src → packages/mcp/src}/dynamic-scroller/index.d.ts +0 -0
  61. /package/dist/{src → packages/mcp/src}/empty/index.d.ts +0 -0
  62. /package/dist/{src → packages/mcp/src}/espace/index.d.ts +0 -0
  63. /package/dist/{src → packages/mcp/src}/exception/index.d.ts +0 -0
  64. /package/dist/{src → packages/mcp/src}/fall-menu/index.d.ts +0 -0
  65. /package/dist/{src → packages/mcp/src}/file-upload/index.d.ts +0 -0
  66. /package/dist/{src → packages/mcp/src}/filter-panel/index.d.ts +0 -0
  67. /package/dist/{src → packages/mcp/src}/float-button/index.d.ts +0 -0
  68. /package/dist/{src → packages/mcp/src}/floatbar/index.d.ts +0 -0
  69. /package/dist/{src → packages/mcp/src}/flowchart/index.d.ts +0 -0
  70. /package/dist/{src → packages/mcp/src}/fluent-editor/index.d.ts +0 -0
  71. /package/dist/{src → packages/mcp/src}/footer/index.d.ts +0 -0
  72. /package/dist/{src → packages/mcp/src}/form/index.d.ts +0 -0
  73. /package/dist/{src → packages/mcp/src}/form-item/index.d.ts +0 -0
  74. /package/dist/{src → packages/mcp/src}/fullscreen/index.d.ts +0 -0
  75. /package/dist/{src → packages/mcp/src}/grid/index.d.ts +0 -0
  76. /package/dist/{src → packages/mcp/src}/grid-select/index.d.ts +0 -0
  77. /package/dist/{src → packages/mcp/src}/guide/index.d.ts +0 -0
  78. /package/dist/{src → packages/mcp/src}/header/index.d.ts +0 -0
  79. /package/dist/{src → packages/mcp/src}/hrapprover/index.d.ts +0 -0
  80. /package/dist/{src → packages/mcp/src}/image/index.d.ts +0 -0
  81. /package/dist/{src → packages/mcp/src}/image-viewer/index.d.ts +0 -0
  82. /package/dist/{src → packages/mcp/src}/infinite-scroll/index.d.ts +0 -0
  83. /package/dist/{src → packages/mcp/src}/input/index.d.ts +0 -0
  84. /package/dist/{src → packages/mcp/src}/ip-address/index.d.ts +0 -0
  85. /package/dist/{src → packages/mcp/src}/lang/en.d.ts +0 -0
  86. /package/dist/{src → packages/mcp/src}/lang/zh-CN.d.ts +0 -0
  87. /package/dist/{src → packages/mcp/src}/layout/index.d.ts +0 -0
  88. /package/dist/{src → packages/mcp/src}/link/index.d.ts +0 -0
  89. /package/dist/{src → packages/mcp/src}/link-menu/index.d.ts +0 -0
  90. /package/dist/{src → packages/mcp/src}/loading/index.d.ts +0 -0
  91. /package/dist/{src → packages/mcp/src}/locales/index.d.ts +0 -0
  92. /package/dist/{src → packages/mcp/src}/logon-user/index.d.ts +0 -0
  93. /package/dist/{src → packages/mcp/src}/logout/index.d.ts +0 -0
  94. /package/dist/{src → packages/mcp/src}/menu/index.d.ts +0 -0
  95. /package/dist/{src → packages/mcp/src}/message/index.d.ts +0 -0
  96. /package/dist/{src → packages/mcp/src}/message-box/index.d.ts +0 -0
  97. /package/dist/{src → packages/mcp/src}/milestone/index.d.ts +0 -0
  98. /package/dist/{src → packages/mcp/src}/mind-map/index.d.ts +0 -0
  99. /package/dist/{src → packages/mcp/src}/modal/index.d.ts +0 -0
  100. /package/dist/{src → packages/mcp/src}/month-table/index.d.ts +0 -0
  101. /package/dist/{src → packages/mcp/src}/nav-menu/index.d.ts +0 -0
  102. /package/dist/{src → packages/mcp/src}/notification/index.d.ts +0 -0
  103. /package/dist/{src → packages/mcp/src}/notify/index.d.ts +0 -0
  104. /package/dist/{src → packages/mcp/src}/number-animation/index.d.ts +0 -0
  105. /package/dist/{src → packages/mcp/src}/numeric/index.d.ts +0 -0
  106. /package/dist/{src → packages/mcp/src}/option-group/index.d.ts +0 -0
  107. /package/dist/{src → packages/mcp/src}/pager/index.d.ts +0 -0
  108. /package/dist/{src → packages/mcp/src}/pagination/index.d.ts +0 -0
  109. /package/dist/{src → packages/mcp/src}/pop-upload/index.d.ts +0 -0
  110. /package/dist/{src → packages/mcp/src}/popconfirm/index.d.ts +0 -0
  111. /package/dist/{src → packages/mcp/src}/popeditor/index.d.ts +0 -0
  112. /package/dist/{src → packages/mcp/src}/popover/index.d.ts +0 -0
  113. /package/dist/{src → packages/mcp/src}/progress/index.d.ts +0 -0
  114. /package/dist/{src → packages/mcp/src}/qr-code/index.d.ts +0 -0
  115. /package/dist/{src → packages/mcp/src}/query-builder/index.d.ts +0 -0
  116. /package/dist/{src → packages/mcp/src}/radio/index.d.ts +0 -0
  117. /package/dist/{src → packages/mcp/src}/rate/index.d.ts +0 -0
  118. /package/dist/{src → packages/mcp/src}/recycle-scroller/index.d.ts +0 -0
  119. /package/dist/{src → packages/mcp/src}/result/index.d.ts +0 -0
  120. /package/dist/{src → packages/mcp/src}/rich-text/index.d.ts +0 -0
  121. /package/dist/{src → packages/mcp/src}/rich-text-editor/index.d.ts +0 -0
  122. /package/dist/{src → packages/mcp/src}/roles/index.d.ts +0 -0
  123. /package/dist/{src → packages/mcp/src}/scroll-bar/index.d.ts +0 -0
  124. /package/dist/{src → packages/mcp/src}/scroll-text/index.d.ts +0 -0
  125. /package/dist/{src → packages/mcp/src}/search/index.d.ts +0 -0
  126. /package/dist/{src → packages/mcp/src}/select/index.d.ts +0 -0
  127. /package/dist/{src → packages/mcp/src}/select-dropdown/index.d.ts +0 -0
  128. /package/dist/{src → packages/mcp/src}/select-wrapper/index.d.ts +0 -0
  129. /package/dist/{src → packages/mcp/src}/side/index.d.ts +0 -0
  130. /package/dist/{src → packages/mcp/src}/skeleton/index.d.ts +0 -0
  131. /package/dist/{src → packages/mcp/src}/slider/index.d.ts +0 -0
  132. /package/dist/{src → packages/mcp/src}/space/index.d.ts +0 -0
  133. /package/dist/{src → packages/mcp/src}/spin/index.d.ts +0 -0
  134. /package/dist/{src → packages/mcp/src}/split/index.d.ts +0 -0
  135. /package/dist/{src → packages/mcp/src}/statistic/index.d.ts +0 -0
  136. /package/dist/{src → packages/mcp/src}/steps/index.d.ts +0 -0
  137. /package/dist/{src → packages/mcp/src}/sticky/index.d.ts +0 -0
  138. /package/dist/{src → packages/mcp/src}/switch/index.d.ts +0 -0
  139. /package/dist/{src → packages/mcp/src}/table/index.d.ts +0 -0
  140. /package/dist/{src → packages/mcp/src}/tabs/index.d.ts +0 -0
  141. /package/dist/{src → packages/mcp/src}/tag/index.d.ts +0 -0
  142. /package/dist/{src → packages/mcp/src}/tag-group/index.d.ts +0 -0
  143. /package/dist/{src → packages/mcp/src}/text-popup/index.d.ts +0 -0
  144. /package/dist/{src → packages/mcp/src}/time-line/index.d.ts +0 -0
  145. /package/dist/{src → packages/mcp/src}/time-panel/index.d.ts +0 -0
  146. /package/dist/{src → packages/mcp/src}/time-picker/index.d.ts +0 -0
  147. /package/dist/{src → packages/mcp/src}/time-range/index.d.ts +0 -0
  148. /package/dist/{src → packages/mcp/src}/time-select/index.d.ts +0 -0
  149. /package/dist/{src → packages/mcp/src}/time-spinner/index.d.ts +0 -0
  150. /package/dist/{src → packages/mcp/src}/toggle-menu/index.d.ts +0 -0
  151. /package/dist/{src → packages/mcp/src}/tooltip/index.d.ts +0 -0
  152. /package/dist/{src → packages/mcp/src}/transfer/index.d.ts +0 -0
  153. /package/dist/{src → packages/mcp/src}/tree/index.d.ts +0 -0
  154. /package/dist/{src → packages/mcp/src}/tree-menu/index.d.ts +0 -0
  155. /package/dist/{src → packages/mcp/src}/tree-select/index.d.ts +0 -0
  156. /package/dist/{src → packages/mcp/src}/upload/index.d.ts +0 -0
  157. /package/dist/{src → packages/mcp/src}/user/index.d.ts +0 -0
  158. /package/dist/{src → packages/mcp/src}/user-account/index.d.ts +0 -0
  159. /package/dist/{src → packages/mcp/src}/user-contact/index.d.ts +0 -0
  160. /package/dist/{src → packages/mcp/src}/user-head/index.d.ts +0 -0
  161. /package/dist/{src → packages/mcp/src}/user-link/index.d.ts +0 -0
  162. /package/dist/{src → packages/mcp/src}/utils/defineComponentTool.d.ts +0 -0
  163. /package/dist/{src → packages/mcp/src}/utils/locale.d.ts +0 -0
  164. /package/dist/{src → packages/mcp/src}/virtual-scroll-box/index.d.ts +0 -0
  165. /package/dist/{src → packages/mcp/src}/virtual-tree/index.d.ts +0 -0
  166. /package/dist/{src → packages/mcp/src}/watermark/index.d.ts +0 -0
  167. /package/dist/{src → packages/mcp/src}/wizard/index.d.ts +0 -0
  168. /package/dist/{src → packages/mcp/src}/year-table/index.d.ts +0 -0
package/dist/index.js CHANGED
@@ -1,296 +1,304 @@
1
- import { defineTool as m } from "./src/utils/defineTool.js";
2
- import { getGridConfig as g } from "./src/grid/index.js";
3
- import { getTreeConfig as f } from "./src/tree/index.js";
4
- import { getBaseSelectConfig as n } from "./src/base-select/index.js";
1
+ import { defineTool as m, ensureWebMcp as g } from "./src/utils/defineTool.js";
2
+ import { default as Bi } from "./src/lang/zh-CN.js";
3
+ import { default as hi } from "./src/lang/en.js";
4
+ import { getGridConfig as f } from "./src/grid/index.js";
5
+ import { getTreeConfig as n } from "./src/tree/index.js";
6
+ import { getBaseSelectConfig as p } from "./src/base-select/index.js";
5
7
  import { i18n as r } from "./src/utils/locale.js";
6
- import { getButtonConfig as p } from "./src/button/index.js";
7
- import { getFormConfig as C } from "./src/form/index.js";
8
- import { getAlertConfig as a } from "./src/alert/index.js";
9
- import { getModalConfig as l } from "./src/modal/index.js";
10
- import { getInputConfig as c } from "./src/input/index.js";
8
+ import { getButtonConfig as C } from "./src/button/index.js";
9
+ import { getFormConfig as a } from "./src/form/index.js";
10
+ import { getAlertConfig as l } from "./src/alert/index.js";
11
+ import { getModalConfig as c } from "./src/modal/index.js";
12
+ import { getInputConfig as u } from "./src/input/index.js";
11
13
  import { getSelectConfig as d } from "./src/select/index.js";
12
- import { getCheckboxConfig as u } from "./src/checkbox/index.js";
13
- import { getRadioConfig as s } from "./src/radio/index.js";
14
+ import { getCheckboxConfig as s } from "./src/checkbox/index.js";
15
+ import { getRadioConfig as S } from "./src/radio/index.js";
14
16
  import { getTableConfig as T } from "./src/table/index.js";
15
- import { getDatePickerConfig as S } from "./src/date-picker/index.js";
16
- import { getTabsConfig as D } from "./src/tabs/index.js";
17
- import { getUploadConfig as M } from "./src/upload/index.js";
18
- import { getDrawerConfig as P } from "./src/drawer/index.js";
17
+ import { getDatePickerConfig as D } from "./src/date-picker/index.js";
18
+ import { getTabsConfig as M } from "./src/tabs/index.js";
19
+ import { getUploadConfig as P } from "./src/upload/index.js";
20
+ import { getDrawerConfig as x } from "./src/drawer/index.js";
19
21
  import { getDialogBoxConfig as k } from "./src/dialog-box/index.js";
20
- import { getStepsConfig as x } from "./src/steps/index.js";
21
- import { getTooltipConfig as b } from "./src/tooltip/index.js";
22
- import { getPopoverConfig as y } from "./src/popover/index.js";
23
- import { getProgressConfig as B } from "./src/progress/index.js";
24
- import { getCollapseConfig as F } from "./src/collapse/index.js";
22
+ import { getStepsConfig as b } from "./src/steps/index.js";
23
+ import { getTooltipConfig as y } from "./src/tooltip/index.js";
24
+ import { getPopoverConfig as B } from "./src/popover/index.js";
25
+ import { getProgressConfig as F } from "./src/progress/index.js";
26
+ import { getCollapseConfig as h } from "./src/collapse/index.js";
25
27
  import { getCarouselConfig as R } from "./src/carousel/index.js";
26
- import { getCascaderConfig as h } from "./src/cascader/index.js";
28
+ import { getCascaderConfig as U } from "./src/cascader/index.js";
27
29
  import { getDateRangeConfig as L } from "./src/date-range/index.js";
28
- import { getTimePickerConfig as U } from "./src/time-picker/index.js";
29
- import { getRateConfig as w } from "./src/rate/index.js";
30
- import { getSwitchConfig as G } from "./src/switch/index.js";
31
- import { getSliderConfig as I } from "./src/slider/index.js";
32
- import { getBadgeConfig as v } from "./src/badge/index.js";
30
+ import { getTimePickerConfig as w } from "./src/time-picker/index.js";
31
+ import { getRateConfig as G } from "./src/rate/index.js";
32
+ import { getSwitchConfig as I } from "./src/switch/index.js";
33
+ import { getSliderConfig as v } from "./src/slider/index.js";
34
+ import { getBadgeConfig as N } from "./src/badge/index.js";
33
35
  import { getTagConfig as A } from "./src/tag/index.js";
34
36
  import { getDividerConfig as E } from "./src/divider/index.js";
35
- import { getLoadingConfig as N } from "./src/loading/index.js";
36
- import { getSearchConfig as V } from "./src/search/index.js";
37
+ import { getLoadingConfig as V } from "./src/loading/index.js";
38
+ import { getSearchConfig as W } from "./src/search/index.js";
37
39
  import { getPagerConfig as H } from "./src/pager/index.js";
38
- import { getImageConfig as W } from "./src/image/index.js";
39
- import { getFileUploadConfig as Q } from "./src/file-upload/index.js";
40
- import { getCalendarConfig as z } from "./src/calendar/index.js";
41
- import { getBreadcrumbConfig as O } from "./src/breadcrumb/index.js";
42
- import { getMenuConfig as Y } from "./src/menu/index.js";
43
- import { getTreeMenuConfig as j } from "./src/tree-menu/index.js";
44
- import { getNavMenuConfig as q } from "./src/nav-menu/index.js";
45
- import { getPaginationConfig as J } from "./src/pagination/index.js";
46
- import { getLayoutConfig as K } from "./src/layout/index.js";
47
- import { getHeaderConfig as X } from "./src/header/index.js";
48
- import { getFooterConfig as Z } from "./src/footer/index.js";
49
- import { getSideConfig as _ } from "./src/side/index.js";
50
- import { getNotificationConfig as $ } from "./src/notification/index.js";
51
- import { getMessageConfig as oo } from "./src/message/index.js";
52
- import { getMessageBoxConfig as ro } from "./src/message-box/index.js";
53
- import { getEmptyConfig as eo } from "./src/empty/index.js";
54
- import { getSkeletonConfig as to } from "./src/skeleton/index.js";
55
- import { getResultConfig as io } from "./src/result/index.js";
56
- import { getAvatarConfig as mo } from "./src/avatar/index.js";
57
- import { getLinkConfig as go } from "./src/link/index.js";
58
- import { getSpinConfig as fo } from "./src/spin/index.js";
59
- import { getWatermarkConfig as no } from "./src/watermark/index.js";
60
- import { getTransferConfig as po } from "./src/transfer/index.js";
61
- import { getTreeSelectConfig as Co } from "./src/tree-select/index.js";
62
- import { getVirtualTreeConfig as ao } from "./src/virtual-tree/index.js";
63
- import { getColorPickerConfig as lo } from "./src/color-picker/index.js";
64
- import { getRichTextEditorConfig as co } from "./src/rich-text-editor/index.js";
65
- import { getPopconfirmConfig as uo } from "./src/popconfirm/index.js";
66
- import { getFilterPanelConfig as so } from "./src/filter-panel/index.js";
40
+ import { getImageConfig as Q } from "./src/image/index.js";
41
+ import { getFileUploadConfig as z } from "./src/file-upload/index.js";
42
+ import { getCalendarConfig as O } from "./src/calendar/index.js";
43
+ import { getBreadcrumbConfig as Y } from "./src/breadcrumb/index.js";
44
+ import { getMenuConfig as j } from "./src/menu/index.js";
45
+ import { getTreeMenuConfig as q } from "./src/tree-menu/index.js";
46
+ import { getNavMenuConfig as J } from "./src/nav-menu/index.js";
47
+ import { getPaginationConfig as K } from "./src/pagination/index.js";
48
+ import { getLayoutConfig as X } from "./src/layout/index.js";
49
+ import { getHeaderConfig as Z } from "./src/header/index.js";
50
+ import { getFooterConfig as _ } from "./src/footer/index.js";
51
+ import { getSideConfig as $ } from "./src/side/index.js";
52
+ import { getNotificationConfig as oo } from "./src/notification/index.js";
53
+ import { getMessageConfig as ro } from "./src/message/index.js";
54
+ import { getMessageBoxConfig as eo } from "./src/message-box/index.js";
55
+ import { getEmptyConfig as to } from "./src/empty/index.js";
56
+ import { getSkeletonConfig as io } from "./src/skeleton/index.js";
57
+ import { getResultConfig as mo } from "./src/result/index.js";
58
+ import { getAvatarConfig as go } from "./src/avatar/index.js";
59
+ import { getLinkConfig as fo } from "./src/link/index.js";
60
+ import { getSpinConfig as no } from "./src/spin/index.js";
61
+ import { getWatermarkConfig as po } from "./src/watermark/index.js";
62
+ import { getTransferConfig as Co } from "./src/transfer/index.js";
63
+ import { getTreeSelectConfig as ao } from "./src/tree-select/index.js";
64
+ import { getVirtualTreeConfig as lo } from "./src/virtual-tree/index.js";
65
+ import { getColorPickerConfig as co } from "./src/color-picker/index.js";
66
+ import { getRichTextEditorConfig as uo } from "./src/rich-text-editor/index.js";
67
+ import { getPopconfirmConfig as so } from "./src/popconfirm/index.js";
68
+ import { getFilterPanelConfig as So } from "./src/filter-panel/index.js";
67
69
  import { getMonthTableConfig as To } from "./src/month-table/index.js";
68
- import { getYearTableConfig as So } from "./src/year-table/index.js";
69
- import { getCardGroupConfig as Do } from "./src/card-group/index.js";
70
- import { getCardConfig as Mo } from "./src/card/index.js";
71
- import { getCardTemplateConfig as Po } from "./src/card-template/index.js";
70
+ import { getYearTableConfig as Do } from "./src/year-table/index.js";
71
+ import { getCardGroupConfig as Mo } from "./src/card-group/index.js";
72
+ import { getCardConfig as Po } from "./src/card/index.js";
73
+ import { getCardTemplateConfig as xo } from "./src/card-template/index.js";
72
74
  import { getTimeRangeConfig as ko } from "./src/time-range/index.js";
73
- import { getTimeSelectConfig as xo } from "./src/time-select/index.js";
74
- import { getFormItemConfig as bo } from "./src/form-item/index.js";
75
- import { getOptionGroupConfig as yo } from "./src/option-group/index.js";
76
- import { getFlowchartConfig as Bo } from "./src/flowchart/index.js";
77
- import { getMindMapConfig as Fo } from "./src/mind-map/index.js";
75
+ import { getTimeSelectConfig as bo } from "./src/time-select/index.js";
76
+ import { getFormItemConfig as yo } from "./src/form-item/index.js";
77
+ import { getOptionGroupConfig as Bo } from "./src/option-group/index.js";
78
+ import { getFlowchartConfig as Fo } from "./src/flowchart/index.js";
79
+ import { getMindMapConfig as ho } from "./src/mind-map/index.js";
78
80
  import { getQueryBuilderConfig as Ro } from "./src/query-builder/index.js";
79
- import { getImageViewerConfig as ho } from "./src/image-viewer/index.js";
81
+ import { getImageViewerConfig as Uo } from "./src/image-viewer/index.js";
80
82
  import { getDropdownConfig as Lo } from "./src/dropdown/index.js";
81
- import { getDropdownItemConfig as Uo } from "./src/dropdown-item/index.js";
82
- import { getDropdownMenuConfig as wo } from "./src/dropdown-menu/index.js";
83
- import { getDatePanelConfig as Go } from "./src/date-panel/index.js";
84
- import { getDateTableConfig as Io } from "./src/date-table/index.js";
85
- import { getTimePanelConfig as vo } from "./src/time-panel/index.js";
83
+ import { getDropdownItemConfig as wo } from "./src/dropdown-item/index.js";
84
+ import { getDropdownMenuConfig as Go } from "./src/dropdown-menu/index.js";
85
+ import { getDatePanelConfig as Io } from "./src/date-panel/index.js";
86
+ import { getDateTableConfig as vo } from "./src/date-table/index.js";
87
+ import { getTimePanelConfig as No } from "./src/time-panel/index.js";
86
88
  import { getTimeSpinnerConfig as Ao } from "./src/time-spinner/index.js";
87
89
  import { getRichTextConfig as Eo } from "./src/rich-text/index.js";
88
- import { getScrollTextConfig as No } from "./src/scroll-text/index.js";
89
- import { getSelectDropdownConfig as Vo } from "./src/select-dropdown/index.js";
90
+ import { getScrollTextConfig as Vo } from "./src/scroll-text/index.js";
91
+ import { getSelectDropdownConfig as Wo } from "./src/select-dropdown/index.js";
90
92
  import { getDynamicScrollerConfig as Ho } from "./src/dynamic-scroller/index.js";
91
- import { getRecycleScrollerConfig as Wo } from "./src/recycle-scroller/index.js";
92
- import { getVirtualScrollBoxConfig as Qo } from "./src/virtual-scroll-box/index.js";
93
- import { getScrollBarConfig as zo } from "./src/scroll-bar/index.js";
94
- import { getStatisticConfig as Oo } from "./src/statistic/index.js";
95
- import { getSpaceConfig as Yo } from "./src/space/index.js";
96
- import { getSplitConfig as jo } from "./src/split/index.js";
97
- import { getStickyConfig as qo } from "./src/sticky/index.js";
98
- import { getCheckboxButtonConfig as Jo } from "./src/checkbox-button/index.js";
99
- import { getCheckboxGroupConfig as Ko } from "./src/checkbox-group/index.js";
100
- import { getColorSelectPanelConfig as Xo } from "./src/color-select-panel/index.js";
101
- import { getCompanyConfig as Zo } from "./src/company/index.js";
102
- import { getCountryConfig as _o } from "./src/country/index.js";
103
- import { getCropConfig as $o } from "./src/crop/index.js";
104
- import { getCurrencyConfig as or } from "./src/currency/index.js";
105
- import { getDeptConfig as rr } from "./src/dept/index.js";
106
- import { getDialogSelectConfig as er } from "./src/dialog-select/index.js";
107
- import { getDropRolesConfig as tr } from "./src/drop-roles/index.js";
108
- import { getDropTimesConfig as ir } from "./src/drop-times/index.js";
109
- import { getEspaceConfig as mr } from "./src/espace/index.js";
110
- import { getExceptionConfig as gr } from "./src/exception/index.js";
111
- import { getFallMenuConfig as fr } from "./src/fall-menu/index.js";
112
- import { getFloatButtonConfig as nr } from "./src/float-button/index.js";
113
- import { getFloatbarConfig as pr } from "./src/floatbar/index.js";
114
- import { getFluentEditorConfig as Cr } from "./src/fluent-editor/index.js";
115
- import { getFullscreenConfig as ar } from "./src/fullscreen/index.js";
116
- import { getGridSelectConfig as lr } from "./src/grid-select/index.js";
117
- import { getGuideConfig as cr } from "./src/guide/index.js";
93
+ import { getRecycleScrollerConfig as Qo } from "./src/recycle-scroller/index.js";
94
+ import { getVirtualScrollBoxConfig as zo } from "./src/virtual-scroll-box/index.js";
95
+ import { getScrollBarConfig as Oo } from "./src/scroll-bar/index.js";
96
+ import { getStatisticConfig as Yo } from "./src/statistic/index.js";
97
+ import { getSpaceConfig as jo } from "./src/space/index.js";
98
+ import { getSplitConfig as qo } from "./src/split/index.js";
99
+ import { getStickyConfig as Jo } from "./src/sticky/index.js";
100
+ import { getCheckboxButtonConfig as Ko } from "./src/checkbox-button/index.js";
101
+ import { getCheckboxGroupConfig as Xo } from "./src/checkbox-group/index.js";
102
+ import { getColorSelectPanelConfig as Zo } from "./src/color-select-panel/index.js";
103
+ import { getCompanyConfig as _o } from "./src/company/index.js";
104
+ import { getCountryConfig as $o } from "./src/country/index.js";
105
+ import { getCropConfig as or } from "./src/crop/index.js";
106
+ import { getCurrencyConfig as rr } from "./src/currency/index.js";
107
+ import { getDeptConfig as er } from "./src/dept/index.js";
108
+ import { getDialogSelectConfig as tr } from "./src/dialog-select/index.js";
109
+ import { getDropRolesConfig as ir } from "./src/drop-roles/index.js";
110
+ import { getDropTimesConfig as mr } from "./src/drop-times/index.js";
111
+ import { getEspaceConfig as gr } from "./src/espace/index.js";
112
+ import { getExceptionConfig as fr } from "./src/exception/index.js";
113
+ import { getFallMenuConfig as nr } from "./src/fall-menu/index.js";
114
+ import { getFloatButtonConfig as pr } from "./src/float-button/index.js";
115
+ import { getFloatbarConfig as Cr } from "./src/floatbar/index.js";
116
+ import { getFluentEditorConfig as ar } from "./src/fluent-editor/index.js";
117
+ import { getFullscreenConfig as lr } from "./src/fullscreen/index.js";
118
+ import { getGridSelectConfig as cr } from "./src/grid-select/index.js";
119
+ import { getGuideConfig as ur } from "./src/guide/index.js";
118
120
  import { getHrapproverConfig as dr } from "./src/hrapprover/index.js";
119
- import { getInfiniteScrollConfig as ur } from "./src/infinite-scroll/index.js";
120
- import { getIpAddressConfig as sr } from "./src/ip-address/index.js";
121
+ import { getInfiniteScrollConfig as sr } from "./src/infinite-scroll/index.js";
122
+ import { getIpAddressConfig as Sr } from "./src/ip-address/index.js";
121
123
  import { getLinkMenuConfig as Tr } from "./src/link-menu/index.js";
122
- import { getLocalesConfig as Sr } from "./src/locales/index.js";
123
- import { getLogonUserConfig as Dr } from "./src/logon-user/index.js";
124
- import { getLogoutConfig as Mr } from "./src/logout/index.js";
125
- import { getMilestoneConfig as Pr } from "./src/milestone/index.js";
124
+ import { getLocalesConfig as Dr } from "./src/locales/index.js";
125
+ import { getLogonUserConfig as Mr } from "./src/logon-user/index.js";
126
+ import { getLogoutConfig as Pr } from "./src/logout/index.js";
127
+ import { getMilestoneConfig as xr } from "./src/milestone/index.js";
126
128
  import { getNotifyConfig as kr } from "./src/notify/index.js";
127
- import { getNumberAnimationConfig as xr } from "./src/number-animation/index.js";
128
- import { getNumericConfig as br } from "./src/numeric/index.js";
129
- import { getPopUploadConfig as yr } from "./src/pop-upload/index.js";
130
- import { getPopeditorConfig as Br } from "./src/popeditor/index.js";
131
- import { getQrCodeConfig as Fr } from "./src/qr-code/index.js";
129
+ import { getNumberAnimationConfig as br } from "./src/number-animation/index.js";
130
+ import { getNumericConfig as yr } from "./src/numeric/index.js";
131
+ import { getPopUploadConfig as Br } from "./src/pop-upload/index.js";
132
+ import { getPopeditorConfig as Fr } from "./src/popeditor/index.js";
133
+ import { getQrCodeConfig as hr } from "./src/qr-code/index.js";
132
134
  import { getRolesConfig as Rr } from "./src/roles/index.js";
133
- import { getSelectWrapperConfig as hr } from "./src/select-wrapper/index.js";
135
+ import { getSelectWrapperConfig as Ur } from "./src/select-wrapper/index.js";
134
136
  import { getTagGroupConfig as Lr } from "./src/tag-group/index.js";
135
- import { getTextPopupConfig as Ur } from "./src/text-popup/index.js";
136
- import { getTimeLineConfig as wr } from "./src/time-line/index.js";
137
- import { getToggleMenuConfig as Gr } from "./src/toggle-menu/index.js";
138
- import { getUserConfig as Ir } from "./src/user/index.js";
139
- import { getUserAccountConfig as vr } from "./src/user-account/index.js";
137
+ import { getTextPopupConfig as wr } from "./src/text-popup/index.js";
138
+ import { getTimeLineConfig as Gr } from "./src/time-line/index.js";
139
+ import { getToggleMenuConfig as Ir } from "./src/toggle-menu/index.js";
140
+ import { getUserConfig as vr } from "./src/user/index.js";
141
+ import { getUserAccountConfig as Nr } from "./src/user-account/index.js";
140
142
  import { getUserContactConfig as Ar } from "./src/user-contact/index.js";
141
143
  import { getUserHeadConfig as Er } from "./src/user-head/index.js";
142
- import { getUserLinkConfig as Nr } from "./src/user-link/index.js";
143
- import { getWizardConfig as Vr } from "./src/wizard/index.js";
144
- const Pi = (o, { server: e, business: t }, i) => {
145
- m({ business: t, componentMcpConfig: i, instance: o, server: e });
146
- }, ki = ({ t: o } = {}) => (r && o && (r.t = o), {
147
- name: "tiny-vue-mcp",
148
- version: "0.0.1",
149
- components: {
150
- Grid: g(),
151
- Tree: f(),
152
- BaseSelect: n(),
153
- Button: p(),
154
- Form: C(),
155
- Alert: a(),
156
- Modal: l(),
157
- Input: c(),
158
- Select: d(),
159
- Checkbox: u(),
160
- Radio: s(),
161
- Table: T(),
162
- DatePicker: S(),
163
- Tabs: D(),
164
- Upload: M(),
165
- Drawer: P(),
166
- DialogBox: k(),
167
- Steps: x(),
168
- Tooltip: b(),
169
- Popover: y(),
170
- Progress: B(),
171
- Collapse: F(),
172
- Carousel: R(),
173
- Cascader: h(),
174
- DateRange: L(),
175
- TimePicker: U(),
176
- Rate: w(),
177
- Switch: G(),
178
- Slider: I(),
179
- Badge: v(),
180
- Tag: A(),
181
- Divider: E(),
182
- Loading: N(),
183
- Search: V(),
184
- Pager: H(),
185
- Image: W(),
186
- FileUpload: Q(),
187
- Calendar: z(),
188
- Breadcrumb: O(),
189
- Menu: Y(),
190
- TreeMenu: j(),
191
- NavMenu: q(),
192
- Pagination: J(),
193
- Layout: K(),
194
- Header: X(),
195
- Footer: Z(),
196
- Side: _(),
197
- Notification: $(),
198
- Message: oo(),
199
- MessageBox: ro(),
200
- Empty: eo(),
201
- Skeleton: to(),
202
- Result: io(),
203
- Avatar: mo(),
204
- Link: go(),
205
- Spin: fo(),
206
- Watermark: no(),
207
- Transfer: po(),
208
- TreeSelect: Co(),
209
- VirtualTree: ao(),
210
- ColorPicker: lo(),
211
- RichTextEditor: co(),
212
- Popconfirm: uo(),
213
- FilterPanel: so(),
214
- MonthTable: To(),
215
- YearTable: So(),
216
- CardGroup: Do(),
217
- Card: Mo(),
218
- CardTemplate: Po(),
219
- TimeRange: ko(),
220
- TimeSelect: xo(),
221
- FormItem: bo(),
222
- OptionGroup: yo(),
223
- Flowchart: Bo(),
224
- MindMap: Fo(),
225
- QueryBuilder: Ro(),
226
- ImageViewer: ho(),
227
- Dropdown: Lo(),
228
- DropdownItem: Uo(),
229
- DropdownMenu: wo(),
230
- DatePanel: Go(),
231
- DateTable: Io(),
232
- TimePanel: vo(),
233
- TimeSpinner: Ao(),
234
- RichText: Eo(),
235
- ScrollText: No(),
236
- SelectDropdown: Vo(),
237
- DynamicScroller: Ho(),
238
- RecycleScroller: Wo(),
239
- VirtualScrollBox: Qo(),
240
- ScrollBar: zo(),
241
- Statistic: Oo(),
242
- Space: Yo(),
243
- Split: jo(),
244
- Sticky: qo(),
245
- CheckboxButton: Jo(),
246
- CheckboxGroup: Ko(),
247
- ColorSelectPanel: Xo(),
248
- Company: Zo(),
249
- Country: _o(),
250
- Crop: $o(),
251
- Currency: or(),
252
- Dept: rr(),
253
- DialogSelect: er(),
254
- DropRoles: tr(),
255
- DropTimes: ir(),
256
- Espace: mr(),
257
- Exception: gr(),
258
- FallMenu: fr(),
259
- FloatButton: nr(),
260
- Floatbar: pr(),
261
- FluentEditor: Cr(),
262
- Fullscreen: ar(),
263
- GridSelect: lr(),
264
- Guide: cr(),
265
- Hrapprover: dr(),
266
- InfiniteScroll: ur(),
267
- IpAddress: sr(),
268
- LinkMenu: Tr(),
269
- Locales: Sr(),
270
- LogonUser: Dr(),
271
- Logout: Mr(),
272
- Milestone: Pr(),
273
- Notify: kr(),
274
- NumberAnimation: xr(),
275
- Numeric: br(),
276
- PopUpload: yr(),
277
- Popeditor: Br(),
278
- QrCode: Fr(),
279
- Roles: Rr(),
280
- SelectWrapper: hr(),
281
- TagGroup: Lr(),
282
- TextPopup: Ur(),
283
- TimeLine: wr(),
284
- ToggleMenu: Gr(),
285
- User: Ir(),
286
- UserAccount: vr(),
287
- UserContact: Ar(),
288
- UserHead: Er(),
289
- UserLink: Nr(),
290
- Wizard: Vr()
144
+ import { getUserLinkConfig as Vr } from "./src/user-link/index.js";
145
+ import { getWizardConfig as Wr } from "./src/wizard/index.js";
146
+ const xi = (o, { server: e, business: t }, i) => m({ business: t, componentMcpConfig: i, instance: o, server: e }), ki = ({ t: o } = {}) => {
147
+ try {
148
+ g();
149
+ } catch {
291
150
  }
292
- });
151
+ return r && o && (r.t = o), {
152
+ name: "tiny-vue-mcp",
153
+ version: "0.0.1",
154
+ components: {
155
+ Grid: f(),
156
+ Tree: n(),
157
+ BaseSelect: p(),
158
+ Button: C(),
159
+ Form: a(),
160
+ Alert: l(),
161
+ Modal: c(),
162
+ Input: u(),
163
+ Select: d(),
164
+ Checkbox: s(),
165
+ Radio: S(),
166
+ Table: T(),
167
+ DatePicker: D(),
168
+ Tabs: M(),
169
+ Upload: P(),
170
+ Drawer: x(),
171
+ DialogBox: k(),
172
+ Steps: b(),
173
+ Tooltip: y(),
174
+ Popover: B(),
175
+ Progress: F(),
176
+ Collapse: h(),
177
+ Carousel: R(),
178
+ Cascader: U(),
179
+ DateRange: L(),
180
+ TimePicker: w(),
181
+ Rate: G(),
182
+ Switch: I(),
183
+ Slider: v(),
184
+ Badge: N(),
185
+ Tag: A(),
186
+ Divider: E(),
187
+ Loading: V(),
188
+ Search: W(),
189
+ Pager: H(),
190
+ Image: Q(),
191
+ FileUpload: z(),
192
+ Calendar: O(),
193
+ Breadcrumb: Y(),
194
+ Menu: j(),
195
+ TreeMenu: q(),
196
+ NavMenu: J(),
197
+ Pagination: K(),
198
+ Layout: X(),
199
+ Header: Z(),
200
+ Footer: _(),
201
+ Side: $(),
202
+ Notification: oo(),
203
+ Message: ro(),
204
+ MessageBox: eo(),
205
+ Empty: to(),
206
+ Skeleton: io(),
207
+ Result: mo(),
208
+ Avatar: go(),
209
+ Link: fo(),
210
+ Spin: no(),
211
+ Watermark: po(),
212
+ Transfer: Co(),
213
+ TreeSelect: ao(),
214
+ VirtualTree: lo(),
215
+ ColorPicker: co(),
216
+ RichTextEditor: uo(),
217
+ Popconfirm: so(),
218
+ FilterPanel: So(),
219
+ MonthTable: To(),
220
+ YearTable: Do(),
221
+ CardGroup: Mo(),
222
+ Card: Po(),
223
+ CardTemplate: xo(),
224
+ TimeRange: ko(),
225
+ TimeSelect: bo(),
226
+ FormItem: yo(),
227
+ OptionGroup: Bo(),
228
+ Flowchart: Fo(),
229
+ MindMap: ho(),
230
+ QueryBuilder: Ro(),
231
+ ImageViewer: Uo(),
232
+ Dropdown: Lo(),
233
+ DropdownItem: wo(),
234
+ DropdownMenu: Go(),
235
+ DatePanel: Io(),
236
+ DateTable: vo(),
237
+ TimePanel: No(),
238
+ TimeSpinner: Ao(),
239
+ RichText: Eo(),
240
+ ScrollText: Vo(),
241
+ SelectDropdown: Wo(),
242
+ DynamicScroller: Ho(),
243
+ RecycleScroller: Qo(),
244
+ VirtualScrollBox: zo(),
245
+ ScrollBar: Oo(),
246
+ Statistic: Yo(),
247
+ Space: jo(),
248
+ Split: qo(),
249
+ Sticky: Jo(),
250
+ CheckboxButton: Ko(),
251
+ CheckboxGroup: Xo(),
252
+ ColorSelectPanel: Zo(),
253
+ Company: _o(),
254
+ Country: $o(),
255
+ Crop: or(),
256
+ Currency: rr(),
257
+ Dept: er(),
258
+ DialogSelect: tr(),
259
+ DropRoles: ir(),
260
+ DropTimes: mr(),
261
+ Espace: gr(),
262
+ Exception: fr(),
263
+ FallMenu: nr(),
264
+ FloatButton: pr(),
265
+ Floatbar: Cr(),
266
+ FluentEditor: ar(),
267
+ Fullscreen: lr(),
268
+ GridSelect: cr(),
269
+ Guide: ur(),
270
+ Hrapprover: dr(),
271
+ InfiniteScroll: sr(),
272
+ IpAddress: Sr(),
273
+ LinkMenu: Tr(),
274
+ Locales: Dr(),
275
+ LogonUser: Mr(),
276
+ Logout: Pr(),
277
+ Milestone: xr(),
278
+ Notify: kr(),
279
+ NumberAnimation: br(),
280
+ Numeric: yr(),
281
+ PopUpload: Br(),
282
+ Popeditor: Fr(),
283
+ QrCode: hr(),
284
+ Roles: Rr(),
285
+ SelectWrapper: Ur(),
286
+ TagGroup: Lr(),
287
+ TextPopup: wr(),
288
+ TimeLine: Gr(),
289
+ ToggleMenu: Ir(),
290
+ User: vr(),
291
+ UserAccount: Nr(),
292
+ UserContact: Ar(),
293
+ UserHead: Er(),
294
+ UserLink: Vr(),
295
+ Wizard: Wr()
296
+ }
297
+ };
298
+ };
293
299
  export {
294
- Pi as createMcpTools,
295
- ki as getTinyVueMcpConfig
300
+ xi as createMcpTools,
301
+ hi as enUS,
302
+ ki as getTinyVueMcpConfig,
303
+ Bi as zhCN
296
304
  };
@@ -1,9 +1,11 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import { Business, ComponentMcpConfig } from './src/utils/defineTool';
3
+ import { default as zhCN } from './src/lang/zh-CN';
4
+ import { default as enUS } from './src/lang/en';
3
5
  export declare const createMcpTools: (instance: any, { server, business }: {
4
- server: McpServer;
6
+ server?: McpServer;
5
7
  business: Business;
6
- }, componentMcpConfig: ComponentMcpConfig) => void;
8
+ }, componentMcpConfig: ComponentMcpConfig) => (() => void) | undefined;
7
9
  export declare const getTinyVueMcpConfig: ({ t }?: {
8
10
  t?: ((path: string) => string) | null;
9
11
  }) => {
@@ -153,3 +155,4 @@ export declare const getTinyVueMcpConfig: ({ t }?: {
153
155
  Wizard: import('./src/utils/defineComponentTool').RealComponentTool;
154
156
  };
155
157
  };
158
+ export { zhCN, enUS };
@@ -1,4 +1,15 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ export declare const ensureWebMcp: () => {
3
+ registerTool: (tool: {
4
+ name: string;
5
+ title: string;
6
+ description: string;
7
+ inputSchema: Record<string, unknown>;
8
+ execute: (args: Record<string, unknown>) => Promise<unknown>;
9
+ }, options: {
10
+ signal: AbortSignal;
11
+ }) => void | Promise<void>;
12
+ } | undefined;
2
13
  /** 开发人员传入的业务信息 id要保证唯一性 */
3
14
  export interface Business {
4
15
  id: string;
@@ -15,7 +26,7 @@ export interface DefineToolOptions {
15
26
  componentMcpConfig: ComponentMcpConfig;
16
27
  /** tool 可操纵的上下文的变量和方法集合 */
17
28
  instance: any;
18
- server: McpServer;
29
+ server?: McpServer;
19
30
  business: Business;
20
31
  }
21
32
  /**
@@ -25,4 +36,4 @@ export interface DefineToolOptions {
25
36
  * @param server MCP 服务器实例
26
37
  * @param business 业务信息
27
38
  */
28
- export declare const defineTool: ({ componentMcpConfig, instance, server, business }: DefineToolOptions) => void;
39
+ export declare const defineTool: ({ componentMcpConfig, instance, server, business }: DefineToolOptions) => (() => void) | undefined;
@@ -0,0 +1,2 @@
1
+ declare const _default: import('vite').UserConfig;
2
+ export default _default;