@sdata/web-vue 1.11.1 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (408) hide show
  1. package/dist/sd.css +177 -6
  2. package/dist/sd.min.css +1 -1
  3. package/es/_components/icon-hover.vue.d.ts +1 -1
  4. package/es/_components/picker/input-range.vue.d.ts +1 -1
  5. package/es/_components/picker/input.vue.d.ts +1 -1
  6. package/es/_components/select-view/style/index.css +13 -6
  7. package/es/_components/virtual-list/virtual-list.vue.d.ts +6 -6
  8. package/es/_components/virtual-list/virtual-list.vue_vue_type_script_lang.js +2 -2
  9. package/es/_hooks/use-allow-search.d.ts +10 -0
  10. package/es/_hooks/use-allow-search.js +31 -0
  11. package/es/_hooks/use-component-ref.d.ts +1 -1
  12. package/es/_hooks/use-dropdown-virtual-list-props.d.ts +5 -0
  13. package/es/_hooks/use-dropdown-virtual-list-props.js +21 -0
  14. package/es/_hooks/use-form-item.d.ts +1 -1
  15. package/es/_hooks/use-scrollbar.js +1 -1
  16. package/es/_hooks/use-size.d.ts +1 -1
  17. package/es/_hooks/use-trigger.d.ts +1 -1
  18. package/es/_utils/color.js +1 -1
  19. package/es/_utils/date.js +7 -1
  20. package/es/_utils/dom.js +1 -1
  21. package/es/_utils/global-config.js +1 -1
  22. package/es/_utils/omit.js +1 -1
  23. package/es/_utils/responsive-observe.js +1 -1
  24. package/es/_utils/virtual-dropdown.js +1 -1
  25. package/es/_utils/vue-utils.js +4 -18
  26. package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/asyncToGenerator.js +1 -1
  27. package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/defineProperty.js +1 -1
  28. package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/extends.js +1 -1
  29. package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectDestructuringEmpty.js +1 -1
  30. package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectSpread2.js +1 -1
  31. package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectWithoutProperties.js +1 -1
  32. package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/objectWithoutPropertiesLoose.js +1 -1
  33. package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/toPrimitive.js +1 -1
  34. package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/toPropertyKey.js +1 -1
  35. package/es/_virtual/{_@oxc-project_runtime@0.124.0 → _@oxc-project_runtime@0.130.0}/helpers/typeof.js +1 -1
  36. package/es/affix/affix.vue_vue_type_script_lang.js +31 -3
  37. package/es/alert/alert.vue.d.ts +2 -2
  38. package/es/alert/alert.vue_vue_type_script_lang.js +55 -0
  39. package/es/alert/index.d.ts +5 -5
  40. package/es/anchor/anchor-link.vue_vue_type_script_lang.js +8 -0
  41. package/es/anchor/anchor.vue_vue_type_script_lang.js +32 -0
  42. package/es/auto-complete/auto-complete.d.ts +1 -1
  43. package/es/auto-complete/auto-complete.js +107 -3
  44. package/es/auto-complete/index.d.ts +3 -3
  45. package/es/avatar/avatar-group.js +31 -0
  46. package/es/avatar/avatar.vue_vue_type_script_lang.js +51 -1
  47. package/es/back-top/back-top.vue_vue_type_script_lang.js +16 -0
  48. package/es/badge/badge.js +34 -1
  49. package/es/breadcrumb/breadcrumb-item.js +27 -0
  50. package/es/breadcrumb/breadcrumb.js +39 -0
  51. package/es/button/button-group.vue_vue_type_script_lang.js +22 -0
  52. package/es/button/button.vue_vue_type_script_lang.js +58 -1
  53. package/es/calendar/calendar.js +47 -0
  54. package/es/calendar/month.js +1 -1
  55. package/es/calendar/year.js +1 -1
  56. package/es/card/card-grid.vue_vue_type_script_lang.js +6 -1
  57. package/es/card/card-meta.js +23 -0
  58. package/es/card/card.js +54 -0
  59. package/es/carousel/carousel.js +68 -1
  60. package/es/cascader/cascader-panel.js +2 -28
  61. package/es/cascader/cascader-panel.vue.d.ts +24 -306
  62. package/es/cascader/{cascader-panel.vue_vue_type_script_lang.js → cascader-panel.vue_vue_type_script_setup_true_lang.js} +92 -101
  63. package/es/cascader/cascader.js +2 -145
  64. package/es/cascader/cascader.vue.d.ts +54 -1290
  65. package/es/cascader/{cascader.vue_vue_type_script_lang.js → cascader.vue_vue_type_script_setup_true_lang.js} +257 -177
  66. package/es/cascader/index.d.ts +4 -2986
  67. package/es/cascader/types.d.ts +79 -0
  68. package/es/checkbox/checkbox-group.js +48 -0
  69. package/es/checkbox/checkbox.d.ts +1 -1
  70. package/es/checkbox/checkbox.js +35 -0
  71. package/es/checkbox/index.d.ts +2 -2
  72. package/es/collapse/collapse-item.d.ts +1 -1
  73. package/es/collapse/collapse-item.js +36 -0
  74. package/es/collapse/collapse.vue_vue_type_script_lang.js +47 -0
  75. package/es/collapse/index.d.ts +1 -1
  76. package/es/color-picker/color-picker.d.ts +1 -1
  77. package/es/color-picker/color-picker.js +90 -1
  78. package/es/color-picker/index.d.ts +3 -3
  79. package/es/color-picker/panel.js +5 -2
  80. package/es/color-picker/utils.js +1 -1
  81. package/es/comment/comment.js +47 -1
  82. package/es/comment/comment.vue.d.ts +2 -2
  83. package/es/comment/index.d.ts +3 -3
  84. package/es/components.d.ts +132 -127
  85. package/es/config-provider/config-provider.vue.d.ts +16 -0
  86. package/es/config-provider/config-provider.vue_vue_type_script_lang.js +78 -1
  87. package/es/config-provider/context.d.ts +3 -0
  88. package/es/config-provider/index.d.ts +24 -0
  89. package/es/config-provider/theme-provider.vue_vue_type_script_setup_true_lang.js +1 -1
  90. package/es/config-provider/theme.js +1 -1
  91. package/es/copy/copy.js +5 -0
  92. package/es/copy/copy.vue.d.ts +15 -0
  93. package/es/copy/copy.vue_vue_type_script_setup_true_lang.js +95 -0
  94. package/es/copy/index.d.ts +15 -0
  95. package/es/copy/index.js +10 -0
  96. package/es/copy/style/css.js +2 -0
  97. package/es/copy/style/index.css +25 -0
  98. package/es/copy/style/index.d.ts +2 -0
  99. package/es/copy/style/index.js +2 -0
  100. package/es/copy/style/index.scss +15 -0
  101. package/es/copy/style/token.scss +3 -0
  102. package/es/copy/types.d.ts +21 -0
  103. package/es/cropper/cropper.js +5 -0
  104. package/es/cropper/cropper.vue.d.ts +45 -0
  105. package/es/cropper/cropper.vue_vue_type_script_setup_true_lang.js +266 -0
  106. package/es/cropper/index.d.ts +130 -0
  107. package/es/cropper/index.js +10 -0
  108. package/es/cropper/interface.d.ts +59 -0
  109. package/es/cropper/style/css.js +2 -0
  110. package/es/cropper/style/index.css +51 -0
  111. package/es/cropper/style/index.d.ts +2 -0
  112. package/es/cropper/style/index.js +2 -0
  113. package/es/cropper/style/index.scss +43 -0
  114. package/es/cropper/style/token.scss +8 -0
  115. package/es/date-picker/hooks/use-range-time-picker-value.js +1 -1
  116. package/es/date-picker/index.d.ts +187 -709
  117. package/es/date-picker/panels/date/index.js +1 -1
  118. package/es/date-picker/panels/date/index.vue.d.ts +1 -1
  119. package/es/date-picker/panels/date/index.vue_vue_type_script_lang.js +1 -1
  120. package/es/date-picker/panels/footer.vue.d.ts +55 -577
  121. package/es/date-picker/panels/footer.vue_vue_type_script_lang.js +1 -1
  122. package/es/date-picker/panels/month/index.js +1 -1
  123. package/es/date-picker/panels/quarter/index.js +1 -1
  124. package/es/date-picker/panels/week/index.vue.d.ts +1 -1
  125. package/es/date-picker/panels/year/index.js +1 -1
  126. package/es/date-picker/picker-panel.vue.d.ts +264 -786
  127. package/es/date-picker/picker.js +1 -1
  128. package/es/date-picker/picker.vue.d.ts +174 -696
  129. package/es/date-picker/picker.vue_vue_type_script_lang.js +193 -1
  130. package/es/date-picker/pickers/date-picker.js +42 -0
  131. package/es/date-picker/pickers/month-picker.js +12 -0
  132. package/es/date-picker/pickers/quarter-picker.js +17 -0
  133. package/es/date-picker/pickers/week-picker.js +23 -0
  134. package/es/date-picker/pickers/year-picker.js +12 -0
  135. package/es/date-picker/range-picker-panel.vue.d.ts +263 -785
  136. package/es/date-picker/range-picker-panel.vue_vue_type_script_lang.js +1 -1
  137. package/es/date-picker/range-picker.js +1 -1
  138. package/es/date-picker/range-picker.vue.d.ts +187 -709
  139. package/es/date-picker/range-picker.vue_vue_type_script_lang.js +120 -1
  140. package/es/descriptions/descriptions-item.vue_vue_type_script_lang.js +16 -0
  141. package/es/descriptions/descriptions.d.ts +1 -1
  142. package/es/descriptions/descriptions.js +65 -1
  143. package/es/descriptions/index.d.ts +3 -3
  144. package/es/divider/divider.js +24 -0
  145. package/es/drawer/drawer.vue.d.ts +2 -2
  146. package/es/drawer/drawer.vue_vue_type_script_lang.js +161 -2
  147. package/es/drawer/index.d.ts +5 -5
  148. package/es/drawer/index.js +2 -2
  149. package/es/dropdown/dropdown-button.vue.d.ts +18 -18
  150. package/es/dropdown/dropdown-button.vue_vue_type_script_lang.js +70 -0
  151. package/es/dropdown/dropdown-group.vue_vue_type_script_lang.js +12 -1
  152. package/es/dropdown/dropdown-option.vue.d.ts +2 -2
  153. package/es/dropdown/dropdown-option.vue_vue_type_script_lang.js +20 -1
  154. package/es/dropdown/dropdown-panel.vue.d.ts +6 -6
  155. package/es/dropdown/dropdown-submenu.vue.d.ts +20 -20
  156. package/es/dropdown/dropdown-submenu.vue_vue_type_script_lang.js +57 -0
  157. package/es/dropdown/dropdown.vue.d.ts +18 -18
  158. package/es/dropdown/dropdown.vue_vue_type_script_lang.js +55 -0
  159. package/es/dropdown/index.d.ts +76 -76
  160. package/es/ellipsis/ellipsis.vue.d.ts +24 -24
  161. package/es/ellipsis/ellipsis.vue_vue_type_script_lang.js +25 -2
  162. package/es/ellipsis/index.d.ts +96 -96
  163. package/es/ellipsis/performant-ellipsis.vue.d.ts +24 -24
  164. package/es/ellipsis/performant-ellipsis.vue_vue_type_script_lang.js +24 -1
  165. package/es/empty/empty.js +18 -0
  166. package/es/form/form-item-label.vue.d.ts +24 -24
  167. package/es/form/form-item.vue.d.ts +28 -28
  168. package/es/form/form-item.vue_vue_type_script_lang.js +146 -3
  169. package/es/form/form.vue_vue_type_script_lang.js +108 -0
  170. package/es/form/index.d.ts +28 -28
  171. package/es/grid/grid-col.vue_vue_type_script_lang.js +42 -1
  172. package/es/grid/grid-item.vue_vue_type_script_lang.js +13 -1
  173. package/es/grid/grid-row.vue_vue_type_script_lang.js +21 -0
  174. package/es/grid/grid.vue_vue_type_script_lang.js +20 -0
  175. package/es/icon.js +5 -5
  176. package/es/image/image.js +1 -1
  177. package/es/image/image.vue.d.ts +26 -26
  178. package/es/image/image.vue_vue_type_script_lang.js +82 -0
  179. package/es/image/preview-action.d.ts +24 -24
  180. package/es/image/preview-action.js +8 -0
  181. package/es/image/preview-group.js +1 -1
  182. package/es/image/preview-group.vue.d.ts +24 -24
  183. package/es/image/preview-group.vue_vue_type_script_lang.js +48 -0
  184. package/es/image/preview-toolbar.vue.d.ts +24 -24
  185. package/es/image/preview-toolbar.vue_vue_type_script_lang.js +1 -0
  186. package/es/image/preview.vue.d.ts +24 -24
  187. package/es/image/preview.vue_vue_type_script_lang.js +56 -1
  188. package/es/index.css +177 -6
  189. package/es/index.d.ts +9 -1
  190. package/es/index.js +6 -2
  191. package/es/index.scss +4 -0
  192. package/es/input/index.d.ts +5 -5
  193. package/es/input/input-password.vue.d.ts +2 -2
  194. package/es/input/input-password.vue_vue_type_script_lang.js +13 -0
  195. package/es/input/input-search.js +35 -1
  196. package/es/input/input.d.ts +1 -1
  197. package/es/input/input.js +129 -1
  198. package/es/input-number/index.d.ts +38 -26
  199. package/es/input-number/input-number.d.ts +20 -11
  200. package/es/input-number/input-number.js +205 -23
  201. package/es/input-tag/input-tag.js +137 -1
  202. package/es/input-tag/style/index.css +13 -6
  203. package/es/input-tag/utils.js +1 -1
  204. package/es/layout/content.js +5 -0
  205. package/es/layout/footer.js +5 -0
  206. package/es/layout/header.js +5 -0
  207. package/es/layout/layout.vue_vue_type_script_lang.js +6 -1
  208. package/es/layout/sider.vue_vue_type_script_lang.js +46 -0
  209. package/es/link/index.d.ts +44 -564
  210. package/es/link/interface.d.ts +15 -0
  211. package/es/link/link.js +2 -17
  212. package/es/link/link.vue.d.ts +31 -286
  213. package/es/link/link.vue_vue_type_script_setup_true_lang.js +112 -0
  214. package/es/link/style/index.css +6 -0
  215. package/es/link/style/index.scss +10 -0
  216. package/es/list/index.d.ts +3 -3
  217. package/es/list/list-item-meta.vue_vue_type_script_lang.js +23 -0
  218. package/es/list/list-item.js +21 -1
  219. package/es/list/list.d.ts +1 -1
  220. package/es/list/list.js +104 -2
  221. package/es/mention/index.d.ts +6 -6
  222. package/es/mention/mention.d.ts +2 -2
  223. package/es/mention/mention.js +87 -1
  224. package/es/menu/base-menu.vue.d.ts +1 -1
  225. package/es/menu/base-menu.vue_vue_type_script_lang.js +102 -0
  226. package/es/menu/item-group.vue_vue_type_script_lang.js +11 -1
  227. package/es/menu/item.d.ts +1 -1
  228. package/es/menu/item.js +13 -2
  229. package/es/menu/menu.d.ts +2 -2
  230. package/es/menu/menu.js +2 -1
  231. package/es/menu/sub-menu-pop.vue.d.ts +14 -14
  232. package/es/menu/sub-menu.js +40 -1
  233. package/es/message/index.js +1 -1
  234. package/es/message/message.vue.d.ts +1 -1
  235. package/es/modal/index.d.ts +5 -5
  236. package/es/modal/index.js +2 -2
  237. package/es/modal/modal.vue.d.ts +2 -2
  238. package/es/modal/modal.vue_vue_type_script_lang.js +193 -2
  239. package/es/notification/index.js +1 -1
  240. package/es/notification/notification.vue.d.ts +1 -1
  241. package/es/overflow-list/index.d.ts +3 -3
  242. package/es/overflow-list/overflow-list.d.ts +1 -1
  243. package/es/overflow-list/overflow-list.js +25 -1
  244. package/es/page-header/index.d.ts +2 -2
  245. package/es/page-header/page-header.vue.d.ts +1 -1
  246. package/es/page-header/page-header.vue_vue_type_script_lang.js +38 -0
  247. package/es/pagination/page-jumper.vue.d.ts +38 -25
  248. package/es/pagination/page-options.vue.d.ts +34 -34
  249. package/es/pagination/pagination.js +122 -0
  250. package/es/popconfirm/index.d.ts +24 -24
  251. package/es/popconfirm/popconfirm.vue.d.ts +12 -12
  252. package/es/popconfirm/popconfirm.vue_vue_type_script_lang.js +95 -1
  253. package/es/popover/index.d.ts +24 -24
  254. package/es/popover/popover.vue.d.ts +12 -12
  255. package/es/popover/popover.vue_vue_type_script_lang.js +62 -0
  256. package/es/progress/circle.vue.d.ts +3 -3
  257. package/es/progress/index.d.ts +23 -23
  258. package/es/progress/line.vue.d.ts +2 -2
  259. package/es/progress/line.vue_vue_type_script_lang.js +1 -1
  260. package/es/progress/progress.vue.d.ts +12 -12
  261. package/es/progress/progress.vue_vue_type_script_lang.js +48 -0
  262. package/es/progress/steps.vue.d.ts +2 -2
  263. package/es/radio/index.d.ts +2 -2
  264. package/es/radio/radio-group.js +53 -0
  265. package/es/radio/radio.d.ts +1 -1
  266. package/es/radio/radio.js +36 -0
  267. package/es/rate/rate.js +54 -0
  268. package/es/resize-box/resize-box.vue_vue_type_script_lang.js +47 -1
  269. package/es/result/result.vue_vue_type_script_lang.js +40 -0
  270. package/es/scrollbar/index.d.ts +6 -6
  271. package/es/scrollbar/scrollbar.vue.d.ts +3 -3
  272. package/es/scrollbar/scrollbar.vue_vue_type_script_lang.js +108 -2
  273. package/es/sd-vue.js +10 -2
  274. package/es/secret/index.d.ts +48 -0
  275. package/es/secret/index.js +10 -0
  276. package/es/secret/secret.js +5 -0
  277. package/es/secret/secret.vue.d.ts +17 -0
  278. package/es/secret/secret.vue_vue_type_script_setup_true_lang.js +64 -0
  279. package/es/secret/style/css.js +2 -0
  280. package/es/secret/style/index.css +54 -0
  281. package/es/secret/style/index.d.ts +2 -0
  282. package/es/secret/style/index.js +2 -0
  283. package/es/secret/style/index.scss +48 -0
  284. package/es/secret/style/token.scss +9 -0
  285. package/es/select/hooks/use-options.js +1 -1
  286. package/es/select/index.d.ts +34 -34
  287. package/es/select/optgroup.vue_vue_type_script_lang.js +12 -1
  288. package/es/select/option.vue.d.ts +4 -4
  289. package/es/select/option.vue_vue_type_script_lang.js +27 -0
  290. package/es/select/select-dropdown.vue.d.ts +7 -7
  291. package/es/select/select.d.ts +14 -14
  292. package/es/select/select.js +13 -9
  293. package/es/select/utils.js +1 -1
  294. package/es/skeleton/line.vue_vue_type_script_lang.js +16 -0
  295. package/es/skeleton/shape.vue_vue_type_script_lang.js +10 -0
  296. package/es/skeleton/skeleton.vue_vue_type_script_lang.js +8 -0
  297. package/es/slider/index.d.ts +120 -96
  298. package/es/slider/slider-button.vue.d.ts +24 -24
  299. package/es/slider/slider-input.vue.d.ts +36 -24
  300. package/es/slider/slider.vue.d.ts +60 -48
  301. package/es/slider/slider.vue_vue_type_script_lang.js +55 -0
  302. package/es/space/index.d.ts +6 -6
  303. package/es/space/space.d.ts +1 -1
  304. package/es/space/space.js +27 -0
  305. package/es/spin/spin.js +35 -0
  306. package/es/split/split.vue_vue_type_script_lang.js +62 -1
  307. package/es/statistic/countdown.vue_vue_type_script_lang.js +36 -1
  308. package/es/statistic/statistic.vue_vue_type_script_lang.js +74 -0
  309. package/es/steps/index.d.ts +3 -3
  310. package/es/steps/step.vue_vue_type_script_lang.js +36 -0
  311. package/es/steps/steps.vue.d.ts +1 -1
  312. package/es/steps/steps.vue_vue_type_script_lang.js +47 -0
  313. package/es/switch/switch.vue_vue_type_script_lang.js +98 -1
  314. package/es/table/index.d.ts +14 -14
  315. package/es/table/table-column.d.ts +2 -2
  316. package/es/table/table-column.js +115 -0
  317. package/es/table/table-operation-td.d.ts +4 -4
  318. package/es/table/table-operation-td.js +1 -1
  319. package/es/table/table-operation-th.js +1 -1
  320. package/es/table/table-td.js +1 -1
  321. package/es/table/table-th.js +1 -1
  322. package/es/table/table.d.ts +7 -7
  323. package/es/table/table.js +442 -3
  324. package/es/table/utils.js +1 -1
  325. package/es/tabs/tab-pane.vue_vue_type_script_lang.js +23 -1
  326. package/es/tabs/tabs-tab.vue.d.ts +1 -1
  327. package/es/tabs/tabs.js +104 -0
  328. package/es/tag/index.d.ts +29238 -75
  329. package/es/tag/interface.d.ts +9 -1
  330. package/es/tag/style/index.css +13 -6
  331. package/es/tag/style/index.scss +16 -4
  332. package/es/tag/tag.js +26 -5
  333. package/es/tag/tag.vue.d.ts +11690 -9
  334. package/es/tag/tag.vue_vue_type_script_lang.js +139 -3
  335. package/es/tag-group/index.d.ts +64 -0
  336. package/es/tag-group/index.js +10 -0
  337. package/es/tag-group/interface.d.ts +18 -0
  338. package/es/tag-group/style/css.js +2 -0
  339. package/es/tag-group/style/index.css +92 -0
  340. package/es/tag-group/style/index.d.ts +2 -0
  341. package/es/tag-group/style/index.js +2 -0
  342. package/es/tag-group/style/index.scss +108 -0
  343. package/es/tag-group/style/token.scss +6 -0
  344. package/es/tag-group/tag-group.js +5 -0
  345. package/es/tag-group/tag-group.vue.d.ts +46 -0
  346. package/es/tag-group/tag-group.vue_vue_type_script_setup_true_lang.js +360 -0
  347. package/es/textarea/index.d.ts +2 -2
  348. package/es/textarea/textarea.vue.d.ts +1 -1
  349. package/es/textarea/textarea.vue_vue_type_script_lang.js +90 -1
  350. package/es/time-picker/index.d.ts +35 -35
  351. package/es/time-picker/panel.vue.d.ts +1 -1
  352. package/es/time-picker/range-panel.d.ts +1 -1
  353. package/es/time-picker/range-panel.js +1 -1
  354. package/es/time-picker/time-picker.js +1 -1
  355. package/es/time-picker/time-picker.vue.d.ts +17 -17
  356. package/es/time-picker/time-picker.vue_vue_type_script_lang.js +132 -0
  357. package/es/timeline/item.vue_vue_type_script_lang.js +38 -1
  358. package/es/timeline/timeline.js +28 -0
  359. package/es/tooltip/index.d.ts +24 -24
  360. package/es/tooltip/tooltip.vue.d.ts +12 -12
  361. package/es/tooltip/tooltip.vue_vue_type_script_lang.js +61 -1
  362. package/es/transfer/index.d.ts +27 -27
  363. package/es/transfer/transfer-view.vue.d.ts +12 -12
  364. package/es/transfer/transfer.vue.d.ts +13 -13
  365. package/es/transfer/transfer.vue_vue_type_script_lang.js +136 -0
  366. package/es/tree/base-node.vue.d.ts +2 -2
  367. package/es/tree/base-node.vue_vue_type_script_lang.js +7 -0
  368. package/es/tree/node.js +1 -1
  369. package/es/tree/transition-node-list.vue.d.ts +2 -2
  370. package/es/tree/tree.vue.d.ts +8 -8
  371. package/es/tree/tree.vue_vue_type_script_lang.js +287 -2
  372. package/es/tree/utils/tree-data.js +1 -1
  373. package/es/tree-select/hooks/use-selected-state.js +1 -1
  374. package/es/tree-select/panel.js +1 -1
  375. package/es/tree-select/tree-select.js +1 -1
  376. package/es/tree-select/tree-select.vue.d.ts +17 -17
  377. package/es/tree-select/tree-select.vue_vue_type_script_lang.js +287 -10
  378. package/es/trigger/index.d.ts +12 -12
  379. package/es/trigger/trigger.d.ts +7 -7
  380. package/es/trigger/trigger.js +161 -1
  381. package/es/trigger/utils.js +1 -1
  382. package/es/typography/base.d.ts +8 -1
  383. package/es/typography/base.js +127 -3
  384. package/es/typography/edit-content.vue.d.ts +15 -15
  385. package/es/typography/index.d.ts +1 -1
  386. package/es/typography/interface.d.ts +2 -0
  387. package/es/typography/operations.js +30 -0
  388. package/es/typography/operations.vue.d.ts +24 -24
  389. package/es/typography/paragraph.js +8 -0
  390. package/es/typography/title.d.ts +1 -1
  391. package/es/typography/title.js +6 -1
  392. package/es/upload/upload-button.d.ts +1 -1
  393. package/es/upload/upload.js +279 -2
  394. package/es/verification-code/index.d.ts +3 -3
  395. package/es/verification-code/verification-code.d.ts +1 -1
  396. package/es/verification-code/verification-code.js +59 -0
  397. package/es/watermark/hooks/use-mutation-observer.js +1 -1
  398. package/es/watermark/index.d.ts +3 -3
  399. package/es/watermark/watermark.d.ts +1 -1
  400. package/es/watermark/watermark.js +58 -1
  401. package/es/web-vue.css +24 -24
  402. package/json/vetur-attributes.json +137 -218
  403. package/json/vetur-tags.json +59 -67
  404. package/json/web-types.json +312 -493
  405. package/package.json +9 -7
  406. package/es/_utils/clipboard.d.ts +0 -1
  407. package/es/_utils/clipboard.js +0 -35
  408. package/es/link/link.vue_vue_type_script_lang.js +0 -56
@@ -0,0 +1,95 @@
1
+ import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
2
+ import { getPrefixCls } from "../_utils/global-config.js";
3
+ import { _asyncToGenerator } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/asyncToGenerator.js";
4
+ import Button from "../button/index.js";
5
+ import Tooltip from "../tooltip/index.js";
6
+ import IconCopy from "../icon/icon-copy/index.js";
7
+ import Link from "../link/index.js";
8
+ import Message from "../message/index.js";
9
+ import { computed, createBlock, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderSlot, resolveDynamicComponent, unref, useAttrs, withCtx } from "vue";
10
+ import copy from "copy-to-clipboard";
11
+ //#region components/copy/copy.vue?vue&type=script&setup=true&lang.ts
12
+ var copy_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, {
13
+ name: "Copy",
14
+ inheritAttrs: false
15
+ }), {}, {
16
+ __name: "copy",
17
+ props: {
18
+ content: { default: "" },
19
+ tooltip: { default: "复制" },
20
+ tooltipProps: { default: void 0 },
21
+ clipboardProps: { default: void 0 },
22
+ textInherit: {
23
+ type: Boolean,
24
+ default: true
25
+ },
26
+ successMessage: { default: "复制成功" },
27
+ href: {},
28
+ status: {},
29
+ hoverable: { type: Boolean },
30
+ icon: { type: Boolean },
31
+ ellipsis: { type: Boolean },
32
+ ellipsisLineClamp: {},
33
+ ellipsisExpandTrigger: {},
34
+ ellipsisTooltip: { type: [Boolean, Object] },
35
+ iconTooltip: {},
36
+ loading: { type: Boolean },
37
+ disabled: { type: Boolean },
38
+ component: { default: "link" },
39
+ type: {},
40
+ shape: {},
41
+ size: {},
42
+ long: { type: Boolean },
43
+ htmlType: {},
44
+ autofocus: { type: Boolean }
45
+ },
46
+ emits: ["copy"],
47
+ setup(__props, { emit: __emit }) {
48
+ const props = __props;
49
+ const emit = __emit;
50
+ const attrs = useAttrs();
51
+ const prefixCls = getPrefixCls("copy");
52
+ const componentMap = {
53
+ link: Link,
54
+ button: Button
55
+ };
56
+ const renderComponent = computed(() => componentMap[props.component]);
57
+ const componentClass = computed(() => [prefixCls, { [`${prefixCls}-inherit`]: props.component === "link" && props.textInherit }]);
58
+ const isDisabled = computed(() => {
59
+ var _props$disabled;
60
+ const disabled = (_props$disabled = props.disabled) !== null && _props$disabled !== void 0 ? _props$disabled : attrs.disabled;
61
+ return disabled === "" || disabled === true || disabled === "true";
62
+ });
63
+ const mergedTooltipProps = computed(() => {
64
+ var _props$tooltipProps$c, _props$tooltipProps;
65
+ return _objectSpread2(_objectSpread2({}, props.tooltipProps), {}, { content: (_props$tooltipProps$c = (_props$tooltipProps = props.tooltipProps) === null || _props$tooltipProps === void 0 ? void 0 : _props$tooltipProps.content) !== null && _props$tooltipProps$c !== void 0 ? _props$tooltipProps$c : props.tooltip });
66
+ });
67
+ function handleCopy() {
68
+ return _handleCopy.apply(this, arguments);
69
+ }
70
+ function _handleCopy() {
71
+ _handleCopy = _asyncToGenerator(function* () {
72
+ if (isDisabled.value) return;
73
+ yield copy(props.content, props.clipboardProps);
74
+ Message.success(props.successMessage);
75
+ emit("copy", props.content);
76
+ });
77
+ return _handleCopy.apply(this, arguments);
78
+ }
79
+ return (_ctx, _cache) => {
80
+ return openBlock(), createBlock(unref(Tooltip), normalizeProps(guardReactiveProps(mergedTooltipProps.value)), {
81
+ default: withCtx(() => [(openBlock(), createBlock(resolveDynamicComponent(renderComponent.value), mergeProps(unref(attrs), {
82
+ class: componentClass.value,
83
+ onClick: handleCopy
84
+ }), {
85
+ icon: withCtx(() => [renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(unref(IconCopy))])]),
86
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
87
+ _: 3
88
+ }, 16, ["class"]))]),
89
+ _: 3
90
+ }, 16);
91
+ };
92
+ }
93
+ }));
94
+ //#endregion
95
+ export { copy_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,15 @@
1
+ import type { App } from 'vue';
2
+ import type { SDOptions } from '../_utils/types';
3
+ import _Copy from './copy.vue';
4
+ declare const Copy: import("vue").DefineSetupFnComponent<Record<string, any>, {}, {}, Record<string, any> & {}, import("vue").PublicProps> & (new () => {
5
+ $slots: {
6
+ icon?: (props: {}) => any;
7
+ } & {
8
+ default?: (props: {}) => any;
9
+ };
10
+ }) & {
11
+ install: (app: App, options?: SDOptions) => void;
12
+ };
13
+ export type CopyInstance = InstanceType<typeof _Copy>;
14
+ export type { CopyButtonProps, CopyComponentType, CopyLinkProps, CopyProps } from './types';
15
+ export default Copy;
@@ -0,0 +1,10 @@
1
+ import { getComponentPrefix, setGlobalConfig } from "../_utils/global-config.js";
2
+ import copy_default from "./copy.js";
3
+ //#region components/copy/index.ts
4
+ var Copy = Object.assign(copy_default, { install: (app, options) => {
5
+ setGlobalConfig(app, options);
6
+ const componentPrefix = getComponentPrefix(options);
7
+ app.component(componentPrefix + copy_default.name, copy_default);
8
+ } });
9
+ //#endregion
10
+ export { Copy as default };
@@ -0,0 +1,2 @@
1
+ import "../../style/index.css";
2
+ import "./index.css";
@@ -0,0 +1,25 @@
1
+ /******** borderSize *******/
2
+ /******** borderStyle *******/
3
+ /******** radius *******/
4
+ /******** shadow distance *******/
5
+ /******** size *******/
6
+ /******** spacing *******/
7
+ /******** shadow *******/
8
+ /******** opacity *******/
9
+ /******** fontSize *******/
10
+ /******** fontWeight ********/
11
+ /******** Primary *******/
12
+ /******** success *******/
13
+ /******** warning *******/
14
+ /******** danger *******/
15
+ /******** link *******/
16
+ /******** radius *******/
17
+ /********* icon hover *********/
18
+ .sd-copy {
19
+ border-radius: 2px;
20
+ }
21
+ .sd-copy.sd-copy-inherit {
22
+ color: inherit;
23
+ font: inherit;
24
+ line-height: inherit;
25
+ }
@@ -0,0 +1,2 @@
1
+ import '../../style/index.scss';
2
+ import './index.scss';
@@ -0,0 +1,2 @@
1
+ import "../../style/index.scss";
2
+ import "./index.scss";
@@ -0,0 +1,15 @@
1
+ @use '@style/theme/index.scss' as theme;
2
+ @use 'sass:string';
3
+ @use '@components/copy/style/token.scss' as *;
4
+
5
+ $copy-prefix-cls: string.unquote('#{theme.$prefix}-copy');
6
+
7
+ .#{$copy-prefix-cls} {
8
+ border-radius: $copy-border-radius;
9
+
10
+ &#{&}-inherit {
11
+ color: inherit;
12
+ font: inherit;
13
+ line-height: inherit;
14
+ }
15
+ }
@@ -0,0 +1,3 @@
1
+ @use '@style/theme/index.scss' as global;
2
+
3
+ $copy-border-radius: global.$border-radius-small;
@@ -0,0 +1,21 @@
1
+ import type { Options as ClipboardOptions } from 'copy-to-clipboard';
2
+ import type { ButtonProps } from '../button';
3
+ import type { LinkProps } from '../link';
4
+ import type { TooltipInstance } from '../tooltip';
5
+ export type CopyComponentType = 'link' | 'button';
6
+ type CopyBaseProps = {
7
+ content?: string;
8
+ tooltip?: string;
9
+ tooltipProps?: TooltipInstance['$props'];
10
+ clipboardProps?: ClipboardOptions;
11
+ textInherit?: boolean;
12
+ successMessage?: string;
13
+ };
14
+ export type CopyLinkProps = CopyBaseProps & LinkProps & {
15
+ component?: 'link';
16
+ };
17
+ export type CopyButtonProps = CopyBaseProps & ButtonProps & {
18
+ component: 'button';
19
+ };
20
+ export type CopyProps = CopyLinkProps | CopyButtonProps;
21
+ export {};
@@ -0,0 +1,5 @@
1
+ import cropper_vue_vue_type_script_setup_true_lang_default from "./cropper.vue_vue_type_script_setup_true_lang.js";
2
+ //#region components/cropper/cropper.vue
3
+ var cropper_default = cropper_vue_vue_type_script_setup_true_lang_default;
4
+ //#endregion
5
+ export { cropper_default as default };
@@ -0,0 +1,45 @@
1
+ import type { CropperCanvasProps, CropperExpose, CropperImageProps, CropperProps, CropperSelectionChangeDetail, CropperSelectionProps } from './interface';
2
+ declare const __VLS_export: import("vue").DefineComponent<CropperProps, CropperExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
3
+ "selection:change": (detail: CropperSelectionChangeDetail) => any;
4
+ "update:selectionX": (value: number) => any;
5
+ "update:selectionY": (value: number) => any;
6
+ "update:selectionWidth": (value: number) => any;
7
+ "update:selectionHeight": (value: number) => any;
8
+ "canvas:action": (detail: unknown) => any;
9
+ "canvas:actionstart": (detail: unknown) => any;
10
+ "canvas:actionmove": (detail: unknown) => any;
11
+ "canvas:actionend": (detail: unknown) => any;
12
+ "image:transform": (detail: {
13
+ matrix: number[];
14
+ oldMatrix: number[];
15
+ }) => any;
16
+ }, string, import("vue").PublicProps, Readonly<CropperProps> & Readonly<{
17
+ "onSelection:change"?: ((detail: CropperSelectionChangeDetail) => any) | undefined;
18
+ "onUpdate:selectionX"?: ((value: number) => any) | undefined;
19
+ "onUpdate:selectionY"?: ((value: number) => any) | undefined;
20
+ "onUpdate:selectionWidth"?: ((value: number) => any) | undefined;
21
+ "onUpdate:selectionHeight"?: ((value: number) => any) | undefined;
22
+ "onCanvas:action"?: ((detail: unknown) => any) | undefined;
23
+ "onCanvas:actionstart"?: ((detail: unknown) => any) | undefined;
24
+ "onCanvas:actionmove"?: ((detail: unknown) => any) | undefined;
25
+ "onCanvas:actionend"?: ((detail: unknown) => any) | undefined;
26
+ "onImage:transform"?: ((detail: {
27
+ matrix: number[];
28
+ oldMatrix: number[];
29
+ }) => any) | undefined;
30
+ }>, {
31
+ template: string;
32
+ width: number | string;
33
+ height: number | string;
34
+ src: string;
35
+ canvasProps: CropperCanvasProps;
36
+ imageProps: CropperImageProps;
37
+ selectionProps: CropperSelectionProps;
38
+ selectionX: number;
39
+ selectionY: number;
40
+ selectionWidth: number;
41
+ selectionHeight: number;
42
+ fitSelectionToImage: boolean;
43
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
44
+ declare const _default: typeof __VLS_export;
45
+ export default _default;
@@ -0,0 +1,266 @@
1
+ import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/objectSpread2.js";
2
+ import { getPrefixCls } from "../_utils/global-config.js";
3
+ import { _asyncToGenerator } from "../_virtual/_@oxc-project_runtime@0.130.0/helpers/asyncToGenerator.js";
4
+ import { computed, createElementBlock, createElementVNode, defineComponent, mergeProps, nextTick, normalizeClass, onBeforeUnmount, onMounted, openBlock, ref, unref, useAttrs, watch } from "vue";
5
+ import { isNumber, isString } from "es-toolkit";
6
+ //#region components/cropper/cropper.vue?vue&type=script&setup=true&lang.ts
7
+ var _hoisted_1 = ["src"];
8
+ var cropper_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent(_objectSpread2(_objectSpread2({}, {
9
+ name: "Cropper",
10
+ inheritAttrs: false
11
+ }), {}, {
12
+ __name: "cropper",
13
+ props: {
14
+ src: { default: "" },
15
+ canvasProps: { default: () => ({}) },
16
+ imageProps: { default: () => ({}) },
17
+ selectionProps: { default: () => ({}) },
18
+ template: { default: void 0 },
19
+ selectionX: { default: void 0 },
20
+ selectionY: { default: void 0 },
21
+ selectionWidth: { default: void 0 },
22
+ selectionHeight: { default: void 0 },
23
+ width: { default: "100%" },
24
+ height: { default: "100%" },
25
+ fitSelectionToImage: {
26
+ type: Boolean,
27
+ default: true
28
+ }
29
+ },
30
+ emits: [
31
+ "selection:change",
32
+ "update:selectionX",
33
+ "update:selectionY",
34
+ "update:selectionWidth",
35
+ "update:selectionHeight",
36
+ "canvas:action",
37
+ "canvas:actionstart",
38
+ "canvas:actionmove",
39
+ "canvas:actionend",
40
+ "image:transform"
41
+ ],
42
+ setup(__props, { expose: __expose, emit: __emit }) {
43
+ const props = __props;
44
+ const emit = __emit;
45
+ const attrs = useAttrs();
46
+ const prefixCls = getPrefixCls("cropper");
47
+ const imgRef = ref();
48
+ const trackedHandlers = [];
49
+ let cropperInstance = null;
50
+ let cropperConstructorPromise = null;
51
+ function loadCropperConstructor() {
52
+ if (!cropperConstructorPromise) cropperConstructorPromise = import("cropperjs").then((module) => module.default);
53
+ return cropperConstructorPromise;
54
+ }
55
+ const resolveSize = (value) => {
56
+ if (isNumber(value)) return `${value}px`;
57
+ if (isString(value)) return value;
58
+ return "100%";
59
+ };
60
+ const rootClass = computed(() => [prefixCls]);
61
+ const rootStyle = computed(() => ({
62
+ "--sd-cropper-width": resolveSize(props.width),
63
+ "--sd-cropper-height": resolveSize(props.height)
64
+ }));
65
+ function addTrackedListener(el, event, fn) {
66
+ el.addEventListener(event, fn);
67
+ trackedHandlers.push({
68
+ el,
69
+ event,
70
+ fn
71
+ });
72
+ }
73
+ function toKebabCase(key) {
74
+ return key.replace(/([A-Z])/g, "-$1").toLowerCase();
75
+ }
76
+ function syncPropsToElement(el, propsObject) {
77
+ if (!el) return;
78
+ for (const [key, value] of Object.entries(propsObject)) {
79
+ const attrName = toKebabCase(key);
80
+ if (value === void 0 || value === null || value === false) {
81
+ el.removeAttribute(attrName);
82
+ continue;
83
+ }
84
+ if (value === true) {
85
+ el.setAttribute(attrName, "");
86
+ continue;
87
+ }
88
+ el.setAttribute(attrName, String(value));
89
+ }
90
+ }
91
+ function getCropperCanvas() {
92
+ var _cropperInstance$getC;
93
+ return (_cropperInstance$getC = cropperInstance === null || cropperInstance === void 0 ? void 0 : cropperInstance.getCropperCanvas()) !== null && _cropperInstance$getC !== void 0 ? _cropperInstance$getC : null;
94
+ }
95
+ function getCropperImage() {
96
+ var _cropperInstance$getC2;
97
+ return (_cropperInstance$getC2 = cropperInstance === null || cropperInstance === void 0 ? void 0 : cropperInstance.getCropperImage()) !== null && _cropperInstance$getC2 !== void 0 ? _cropperInstance$getC2 : null;
98
+ }
99
+ function getCropperSelection() {
100
+ var _cropperInstance$getC3;
101
+ return (_cropperInstance$getC3 = cropperInstance === null || cropperInstance === void 0 ? void 0 : cropperInstance.getCropperSelection()) !== null && _cropperInstance$getC3 !== void 0 ? _cropperInstance$getC3 : null;
102
+ }
103
+ function getCropperSelections() {
104
+ var _cropperInstance$getC4;
105
+ return (_cropperInstance$getC4 = cropperInstance === null || cropperInstance === void 0 ? void 0 : cropperInstance.getCropperSelections()) !== null && _cropperInstance$getC4 !== void 0 ? _cropperInstance$getC4 : null;
106
+ }
107
+ function alignSelectionToImage() {
108
+ var _matrix$, _matrix$2;
109
+ const image = getCropperImage();
110
+ const selection = getCropperSelection();
111
+ const imageElement = imgRef.value;
112
+ if (!image || !selection || !imageElement) return;
113
+ const naturalWidth = imageElement.naturalWidth;
114
+ const naturalHeight = imageElement.naturalHeight;
115
+ if (!naturalWidth || !naturalHeight) return;
116
+ const matrix = image.$getTransform();
117
+ const scaleX = (_matrix$ = matrix[0]) !== null && _matrix$ !== void 0 ? _matrix$ : 0;
118
+ const scaleY = (_matrix$2 = matrix[3]) !== null && _matrix$2 !== void 0 ? _matrix$2 : 0;
119
+ if (!scaleX || !scaleY) return;
120
+ const renderedWidth = naturalWidth * scaleX;
121
+ const renderedHeight = naturalHeight * scaleY;
122
+ selection.$change(1, 1, (scaleX > 1 ? renderedWidth : image.clientWidth) - 2, (scaleY > 1 ? renderedHeight : image.clientHeight) - 2);
123
+ }
124
+ function bindCanvasEvents(canvas) {
125
+ for (const eventName of [
126
+ "action",
127
+ "actionstart",
128
+ "actionmove",
129
+ "actionend"
130
+ ]) addTrackedListener(canvas, eventName, (event) => {
131
+ const detail = event.detail;
132
+ if (eventName === "action") emit("canvas:action", detail);
133
+ if (eventName === "actionstart") emit("canvas:actionstart", detail);
134
+ if (eventName === "actionmove") emit("canvas:actionmove", detail);
135
+ if (eventName === "actionend") emit("canvas:actionend", detail);
136
+ });
137
+ }
138
+ function bindSelectionEvents(selection) {
139
+ addTrackedListener(selection, "change", (event) => {
140
+ const detail = event.detail;
141
+ emit("selection:change", detail);
142
+ emit("update:selectionX", detail.x);
143
+ emit("update:selectionY", detail.y);
144
+ emit("update:selectionWidth", detail.width);
145
+ emit("update:selectionHeight", detail.height);
146
+ });
147
+ }
148
+ function bindImageEvents(image) {
149
+ addTrackedListener(image, "transform", (event) => {
150
+ emit("image:transform", event.detail);
151
+ });
152
+ if (!props.fitSelectionToImage) return;
153
+ const imageElement = imgRef.value;
154
+ if (!imageElement) return;
155
+ const align = () => nextTick(() => alignSelectionToImage());
156
+ if (imageElement.complete && imageElement.naturalWidth > 0) {
157
+ align();
158
+ return;
159
+ }
160
+ const onLoad = () => {
161
+ imageElement.removeEventListener("load", onLoad);
162
+ align();
163
+ };
164
+ imageElement.addEventListener("load", onLoad);
165
+ }
166
+ function syncChildProps() {
167
+ syncPropsToElement(getCropperCanvas(), props.canvasProps);
168
+ syncPropsToElement(getCropperImage(), props.imageProps);
169
+ syncPropsToElement(getCropperSelection(), props.selectionProps);
170
+ }
171
+ function destroy() {
172
+ for (const { el, event, fn } of trackedHandlers) el.removeEventListener(event, fn);
173
+ trackedHandlers.length = 0;
174
+ cropperInstance === null || cropperInstance === void 0 || cropperInstance.destroy();
175
+ cropperInstance = null;
176
+ }
177
+ onMounted(_asyncToGenerator(function* () {
178
+ if (!imgRef.value) return;
179
+ const CropperConstructor = yield loadCropperConstructor();
180
+ const options = {};
181
+ if (props.template !== void 0) options.template = props.template;
182
+ cropperInstance = new CropperConstructor(imgRef.value, options);
183
+ nextTick(() => {
184
+ syncChildProps();
185
+ const canvas = getCropperCanvas();
186
+ if (canvas) bindCanvasEvents(canvas);
187
+ const selection = getCropperSelection();
188
+ if (selection) bindSelectionEvents(selection);
189
+ const image = getCropperImage();
190
+ if (image) bindImageEvents(image);
191
+ });
192
+ }));
193
+ onBeforeUnmount(() => {
194
+ destroy();
195
+ });
196
+ watch(() => props.src, (value) => {
197
+ const cropperImage = getCropperImage();
198
+ if (cropperImage) {
199
+ cropperImage.src = value !== null && value !== void 0 ? value : "";
200
+ return;
201
+ }
202
+ if (imgRef.value) imgRef.value.src = value !== null && value !== void 0 ? value : "";
203
+ });
204
+ watch(() => props.canvasProps, () => {
205
+ nextTick(() => {
206
+ syncPropsToElement(getCropperCanvas(), props.canvasProps);
207
+ });
208
+ }, { deep: true });
209
+ watch(() => props.imageProps, () => {
210
+ nextTick(() => {
211
+ syncPropsToElement(getCropperImage(), props.imageProps);
212
+ });
213
+ }, { deep: true });
214
+ watch(() => props.selectionProps, () => {
215
+ nextTick(() => {
216
+ syncPropsToElement(getCropperSelection(), props.selectionProps);
217
+ });
218
+ }, { deep: true });
219
+ watch([
220
+ () => props.selectionX,
221
+ () => props.selectionY,
222
+ () => props.selectionWidth,
223
+ () => props.selectionHeight
224
+ ], ([x, y, width, height]) => {
225
+ if (x === void 0 && y === void 0 && width === void 0 && height === void 0) return;
226
+ const selection = getCropperSelection();
227
+ if (!selection) return;
228
+ nextTick(() => {
229
+ const nextX = x !== null && x !== void 0 ? x : selection.x;
230
+ const nextY = y !== null && y !== void 0 ? y : selection.y;
231
+ const nextWidth = width !== null && width !== void 0 ? width : selection.width;
232
+ const nextHeight = height !== null && height !== void 0 ? height : selection.height;
233
+ if (typeof selection.$change !== "function") {
234
+ selection.x = nextX;
235
+ selection.y = nextY;
236
+ selection.width = nextWidth;
237
+ selection.height = nextHeight;
238
+ return;
239
+ }
240
+ selection.$change(nextX, nextY, nextWidth, nextHeight);
241
+ });
242
+ });
243
+ __expose({
244
+ getInstance: () => cropperInstance,
245
+ getCropperCanvas,
246
+ getCropperImage,
247
+ getCropperSelection,
248
+ getCropperSelections,
249
+ destroy
250
+ });
251
+ return (_ctx, _cache) => {
252
+ return openBlock(), createElementBlock("div", mergeProps({
253
+ class: rootClass.value,
254
+ style: rootStyle.value
255
+ }, unref(attrs)), [createElementVNode("img", {
256
+ ref_key: "imgRef",
257
+ ref: imgRef,
258
+ src: props.src,
259
+ alt: "",
260
+ class: normalizeClass(`${unref(prefixCls)}-source-image`)
261
+ }, null, 10, _hoisted_1)], 16);
262
+ };
263
+ }
264
+ }));
265
+ //#endregion
266
+ export { cropper_vue_vue_type_script_setup_true_lang_default as default };
@@ -0,0 +1,130 @@
1
+ import type { App } from 'vue';
2
+ import type { SDOptions } from '../_utils/types';
3
+ import _Cropper from './cropper.vue';
4
+ declare const Cropper: {
5
+ new (...args: any[]): import("vue").CreateComponentPublicInstanceWithMixins<Readonly<import("./interface").CropperProps> & Readonly<{
6
+ "onSelection:change"?: ((detail: import("./interface").CropperSelectionChangeDetail) => any) | undefined;
7
+ "onUpdate:selectionX"?: ((value: number) => any) | undefined;
8
+ "onUpdate:selectionY"?: ((value: number) => any) | undefined;
9
+ "onUpdate:selectionWidth"?: ((value: number) => any) | undefined;
10
+ "onUpdate:selectionHeight"?: ((value: number) => any) | undefined;
11
+ "onCanvas:action"?: ((detail: unknown) => any) | undefined;
12
+ "onCanvas:actionstart"?: ((detail: unknown) => any) | undefined;
13
+ "onCanvas:actionmove"?: ((detail: unknown) => any) | undefined;
14
+ "onCanvas:actionend"?: ((detail: unknown) => any) | undefined;
15
+ "onImage:transform"?: ((detail: {
16
+ matrix: number[];
17
+ oldMatrix: number[];
18
+ }) => any) | undefined;
19
+ }>, import("./interface").CropperExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
+ "selection:change": (detail: import("./interface").CropperSelectionChangeDetail) => any;
21
+ "update:selectionX": (value: number) => any;
22
+ "update:selectionY": (value: number) => any;
23
+ "update:selectionWidth": (value: number) => any;
24
+ "update:selectionHeight": (value: number) => any;
25
+ "canvas:action": (detail: unknown) => any;
26
+ "canvas:actionstart": (detail: unknown) => any;
27
+ "canvas:actionmove": (detail: unknown) => any;
28
+ "canvas:actionend": (detail: unknown) => any;
29
+ "image:transform": (detail: {
30
+ matrix: number[];
31
+ oldMatrix: number[];
32
+ }) => any;
33
+ }, import("vue").PublicProps, {
34
+ template: string;
35
+ width: number | string;
36
+ height: number | string;
37
+ src: string;
38
+ canvasProps: import("./interface").CropperCanvasProps;
39
+ imageProps: import("./interface").CropperImageProps;
40
+ selectionProps: import("./interface").CropperSelectionProps;
41
+ selectionX: number;
42
+ selectionY: number;
43
+ selectionWidth: number;
44
+ selectionHeight: number;
45
+ fitSelectionToImage: boolean;
46
+ }, false, {}, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, {}, any, import("vue").ComponentProvideOptions, {
47
+ P: {};
48
+ B: {};
49
+ D: {};
50
+ C: {};
51
+ M: {};
52
+ Defaults: {};
53
+ }, Readonly<import("./interface").CropperProps> & Readonly<{
54
+ "onSelection:change"?: ((detail: import("./interface").CropperSelectionChangeDetail) => any) | undefined;
55
+ "onUpdate:selectionX"?: ((value: number) => any) | undefined;
56
+ "onUpdate:selectionY"?: ((value: number) => any) | undefined;
57
+ "onUpdate:selectionWidth"?: ((value: number) => any) | undefined;
58
+ "onUpdate:selectionHeight"?: ((value: number) => any) | undefined;
59
+ "onCanvas:action"?: ((detail: unknown) => any) | undefined;
60
+ "onCanvas:actionstart"?: ((detail: unknown) => any) | undefined;
61
+ "onCanvas:actionmove"?: ((detail: unknown) => any) | undefined;
62
+ "onCanvas:actionend"?: ((detail: unknown) => any) | undefined;
63
+ "onImage:transform"?: ((detail: {
64
+ matrix: number[];
65
+ oldMatrix: number[];
66
+ }) => any) | undefined;
67
+ }>, import("./interface").CropperExpose, {}, {}, {}, {
68
+ template: string;
69
+ width: number | string;
70
+ height: number | string;
71
+ src: string;
72
+ canvasProps: import("./interface").CropperCanvasProps;
73
+ imageProps: import("./interface").CropperImageProps;
74
+ selectionProps: import("./interface").CropperSelectionProps;
75
+ selectionX: number;
76
+ selectionY: number;
77
+ selectionWidth: number;
78
+ selectionHeight: number;
79
+ fitSelectionToImage: boolean;
80
+ }>;
81
+ __isFragment?: never;
82
+ __isTeleport?: never;
83
+ __isSuspense?: never;
84
+ } & import("vue").ComponentOptionsBase<Readonly<import("./interface").CropperProps> & Readonly<{
85
+ "onSelection:change"?: ((detail: import("./interface").CropperSelectionChangeDetail) => any) | undefined;
86
+ "onUpdate:selectionX"?: ((value: number) => any) | undefined;
87
+ "onUpdate:selectionY"?: ((value: number) => any) | undefined;
88
+ "onUpdate:selectionWidth"?: ((value: number) => any) | undefined;
89
+ "onUpdate:selectionHeight"?: ((value: number) => any) | undefined;
90
+ "onCanvas:action"?: ((detail: unknown) => any) | undefined;
91
+ "onCanvas:actionstart"?: ((detail: unknown) => any) | undefined;
92
+ "onCanvas:actionmove"?: ((detail: unknown) => any) | undefined;
93
+ "onCanvas:actionend"?: ((detail: unknown) => any) | undefined;
94
+ "onImage:transform"?: ((detail: {
95
+ matrix: number[];
96
+ oldMatrix: number[];
97
+ }) => any) | undefined;
98
+ }>, import("./interface").CropperExpose, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
99
+ "selection:change": (detail: import("./interface").CropperSelectionChangeDetail) => any;
100
+ "update:selectionX": (value: number) => any;
101
+ "update:selectionY": (value: number) => any;
102
+ "update:selectionWidth": (value: number) => any;
103
+ "update:selectionHeight": (value: number) => any;
104
+ "canvas:action": (detail: unknown) => any;
105
+ "canvas:actionstart": (detail: unknown) => any;
106
+ "canvas:actionmove": (detail: unknown) => any;
107
+ "canvas:actionend": (detail: unknown) => any;
108
+ "image:transform": (detail: {
109
+ matrix: number[];
110
+ oldMatrix: number[];
111
+ }) => any;
112
+ }, string, {
113
+ template: string;
114
+ width: number | string;
115
+ height: number | string;
116
+ src: string;
117
+ canvasProps: import("./interface").CropperCanvasProps;
118
+ imageProps: import("./interface").CropperImageProps;
119
+ selectionProps: import("./interface").CropperSelectionProps;
120
+ selectionX: number;
121
+ selectionY: number;
122
+ selectionWidth: number;
123
+ selectionHeight: number;
124
+ fitSelectionToImage: boolean;
125
+ }, {}, string, {}, import("vue").GlobalComponents, import("vue").GlobalDirectives, string, import("vue").ComponentProvideOptions> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & {
126
+ install: (app: App, options?: SDOptions) => void;
127
+ };
128
+ export type CropperInstance = InstanceType<typeof _Cropper>;
129
+ export type { CropperCanvasProps, CropperExpose, CropperImageProps, CropperImageTransformDetail, CropperProps, CropperSelectionChangeDetail, CropperSelectionProps, } from './interface';
130
+ export default Cropper;
@@ -0,0 +1,10 @@
1
+ import { getComponentPrefix, setGlobalConfig } from "../_utils/global-config.js";
2
+ import cropper_default from "./cropper.js";
3
+ //#region components/cropper/index.ts
4
+ var Cropper = Object.assign(cropper_default, { install: (app, options) => {
5
+ setGlobalConfig(app, options);
6
+ const componentPrefix = getComponentPrefix(options);
7
+ app.component(componentPrefix + cropper_default.name, cropper_default);
8
+ } });
9
+ //#endregion
10
+ export { Cropper as default };