@silver-formily/element-plus 0.0.1-alpha.0 → 0.0.1-beta.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 (322) hide show
  1. package/README.md +4 -0
  2. package/package.json +40 -33
  3. package/esm/__builtins__/configs/index.d.ts +0 -1
  4. package/esm/__builtins__/configs/index.mjs +0 -5
  5. package/esm/__builtins__/configs/index.mjs.map +0 -1
  6. package/esm/__builtins__/index.d.ts +0 -2
  7. package/esm/__builtins__/index.mjs +0 -27
  8. package/esm/__builtins__/index.mjs.map +0 -1
  9. package/esm/__builtins__/shared/hooks.d.ts +0 -7
  10. package/esm/__builtins__/shared/hooks.mjs +0 -59
  11. package/esm/__builtins__/shared/hooks.mjs.map +0 -1
  12. package/esm/__builtins__/shared/index.d.ts +0 -7
  13. package/esm/__builtins__/shared/index.mjs +0 -25
  14. package/esm/__builtins__/shared/index.mjs.map +0 -1
  15. package/esm/__builtins__/shared/load-config-provider.d.ts +0 -2
  16. package/esm/__builtins__/shared/load-config-provider.mjs +0 -13
  17. package/esm/__builtins__/shared/load-config-provider.mjs.map +0 -1
  18. package/esm/__builtins__/shared/loading.d.ts +0 -12
  19. package/esm/__builtins__/shared/loading.mjs +0 -49
  20. package/esm/__builtins__/shared/loading.mjs.map +0 -1
  21. package/esm/__builtins__/shared/simple-version-compare.d.ts +0 -2
  22. package/esm/__builtins__/shared/simple-version-compare.mjs +0 -18
  23. package/esm/__builtins__/shared/simple-version-compare.mjs.map +0 -1
  24. package/esm/__builtins__/shared/transform-component.d.ts +0 -8
  25. package/esm/__builtins__/shared/transform-component.mjs +0 -50
  26. package/esm/__builtins__/shared/transform-component.mjs.map +0 -1
  27. package/esm/__builtins__/shared/types.d.ts +0 -2
  28. package/esm/__builtins__/shared/types.mjs +0 -2
  29. package/esm/__builtins__/shared/types.mjs.map +0 -1
  30. package/esm/__builtins__/shared/utils.d.ts +0 -8
  31. package/esm/__builtins__/shared/utils.mjs +0 -34
  32. package/esm/__builtins__/shared/utils.mjs.map +0 -1
  33. package/esm/array-base/array-base-addition.d.ts +0 -5
  34. package/esm/array-base/array-base-index.d.ts +0 -19
  35. package/esm/array-base/array-base-inner.d.ts +0 -18
  36. package/esm/array-base/array-base-item.d.ts +0 -18
  37. package/esm/array-base/array-base-move-down.d.ts +0 -18
  38. package/esm/array-base/array-base-move-up.d.ts +0 -18
  39. package/esm/array-base/array-base-remove.d.ts +0 -18
  40. package/esm/array-base/array-base-sort-handle.d.ts +0 -2
  41. package/esm/array-base/index.d.ts +0 -114
  42. package/esm/array-base/index.mjs +0 -225
  43. package/esm/array-base/index.mjs.map +0 -1
  44. package/esm/array-base/symbols.d.ts +0 -4
  45. package/esm/array-base/symbols.mjs +0 -6
  46. package/esm/array-base/symbols.mjs.map +0 -1
  47. package/esm/array-base/types.d.ts +0 -28
  48. package/esm/array-base/types.mjs +0 -2
  49. package/esm/array-base/types.mjs.map +0 -1
  50. package/esm/array-base/utils.d.ts +0 -18
  51. package/esm/array-base/utils.mjs +0 -88
  52. package/esm/array-base/utils.mjs.map +0 -1
  53. package/esm/array-cards/array-cards.d.ts +0 -13
  54. package/esm/array-cards/index.d.ts +0 -122
  55. package/esm/array-cards/index.mjs +0 -119
  56. package/esm/array-cards/index.mjs.map +0 -1
  57. package/esm/array-collapse/array-collapse-item.d.ts +0 -18
  58. package/esm/array-collapse/array-collapse.d.ts +0 -16
  59. package/esm/array-collapse/index.d.ts +0 -134
  60. package/esm/array-collapse/index.mjs +0 -180
  61. package/esm/array-collapse/index.mjs.map +0 -1
  62. package/esm/array-collapse/utils.d.ts +0 -1
  63. package/esm/array-collapse/utils.mjs +0 -12
  64. package/esm/array-collapse/utils.mjs.map +0 -1
  65. package/esm/array-items/array-items-item.d.ts +0 -30
  66. package/esm/array-items/array-items.d.ts +0 -2
  67. package/esm/array-items/index.d.ts +0 -130
  68. package/esm/array-items/index.mjs +0 -105
  69. package/esm/array-items/index.mjs.map +0 -1
  70. package/esm/array-list-tabs/array-list-tabs.d.ts +0 -31
  71. package/esm/array-list-tabs/index.d.ts +0 -83
  72. package/esm/array-list-tabs/index.mjs +0 -183
  73. package/esm/array-list-tabs/index.mjs.map +0 -1
  74. package/esm/array-list-tabs/utils.d.ts +0 -3
  75. package/esm/array-list-tabs/utils.mjs +0 -16
  76. package/esm/array-list-tabs/utils.mjs.map +0 -1
  77. package/esm/array-table/index.mjs +0 -230
  78. package/esm/array-table/index.mjs.map +0 -1
  79. package/esm/array-table/types.d.ts +0 -6
  80. package/esm/array-table/types.mjs +0 -2
  81. package/esm/array-table/types.mjs.map +0 -1
  82. package/esm/array-table/utils.d.ts +0 -5
  83. package/esm/array-table/utils.mjs +0 -26
  84. package/esm/array-table/utils.mjs.map +0 -1
  85. package/esm/array-tabs/array-tabs.d.ts +0 -2
  86. package/esm/array-tabs/index.d.ts +0 -2
  87. package/esm/array-tabs/index.mjs +0 -88
  88. package/esm/array-tabs/index.mjs.map +0 -1
  89. package/esm/cascader/cascader.d.ts +0 -30
  90. package/esm/cascader/index.d.ts +0 -41
  91. package/esm/cascader/index.mjs +0 -54
  92. package/esm/cascader/index.mjs.map +0 -1
  93. package/esm/checkbox/checkbox-group.d.ts +0 -58
  94. package/esm/checkbox/index.d.ts +0 -716
  95. package/esm/checkbox/index.mjs +0 -86
  96. package/esm/checkbox/index.mjs.map +0 -1
  97. package/esm/date-picker/index.d.ts +0 -2
  98. package/esm/date-picker/index.mjs +0 -57
  99. package/esm/date-picker/index.mjs.map +0 -1
  100. package/esm/editable/editable-popover.d.ts +0 -25
  101. package/esm/editable/editable.d.ts +0 -187
  102. package/esm/editable/index.d.ts +0 -147
  103. package/esm/editable/index.mjs +0 -231
  104. package/esm/editable/index.mjs.map +0 -1
  105. package/esm/form/form.d.ts +0 -46
  106. package/esm/form/form.mjs +0 -77
  107. package/esm/form/form.mjs.map +0 -1
  108. package/esm/form/index.d.ts +0 -1
  109. package/esm/form/index.mjs +0 -6
  110. package/esm/form/index.mjs.map +0 -1
  111. package/esm/form-button-group/form-button-group-sticky.d.ts +0 -17
  112. package/esm/form-button-group/form-button-group.d.ts +0 -48
  113. package/esm/form-button-group/index.d.ts +0 -87
  114. package/esm/form-button-group/index.mjs +0 -90
  115. package/esm/form-button-group/index.mjs.map +0 -1
  116. package/esm/form-button-group/utils.d.ts +0 -1
  117. package/esm/form-button-group/utils.mjs +0 -12
  118. package/esm/form-button-group/utils.mjs.map +0 -1
  119. package/esm/form-collapse/form-collapse.d.ts +0 -18
  120. package/esm/form-collapse/index.d.ts +0 -45
  121. package/esm/form-collapse/index.mjs +0 -103
  122. package/esm/form-collapse/index.mjs.map +0 -1
  123. package/esm/form-collapse/utils.d.ts +0 -31
  124. package/esm/form-collapse/utils.mjs +0 -54
  125. package/esm/form-collapse/utils.mjs.map +0 -1
  126. package/esm/form-dialog/dialog-content.d.ts +0 -60
  127. package/esm/form-dialog/index.d.ts +0 -4
  128. package/esm/form-dialog/index.mjs +0 -209
  129. package/esm/form-dialog/index.mjs.map +0 -1
  130. package/esm/form-dialog/types.d.ts +0 -32
  131. package/esm/form-dialog/types.mjs +0 -2
  132. package/esm/form-dialog/types.mjs.map +0 -1
  133. package/esm/form-drawer/drawer-content.d.ts +0 -60
  134. package/esm/form-drawer/index.d.ts +0 -4
  135. package/esm/form-drawer/index.mjs +0 -203
  136. package/esm/form-drawer/index.mjs.map +0 -1
  137. package/esm/form-drawer/types.d.ts +0 -32
  138. package/esm/form-drawer/types.mjs +0 -2
  139. package/esm/form-drawer/types.mjs.map +0 -1
  140. package/esm/form-grid/form-grid-column.d.ts +0 -29
  141. package/esm/form-grid/form-grid.d.ts +0 -101
  142. package/esm/form-grid/hooks.d.ts +0 -4
  143. package/esm/form-grid/hooks.mjs +0 -7
  144. package/esm/form-grid/hooks.mjs.map +0 -1
  145. package/esm/form-grid/index.d.ts +0 -182
  146. package/esm/form-grid/index.mjs +0 -106
  147. package/esm/form-grid/index.mjs.map +0 -1
  148. package/esm/form-item/form-item.d.ts +0 -18
  149. package/esm/form-item/index.d.ts +0 -70
  150. package/esm/form-item/index.mjs +0 -346
  151. package/esm/form-item/index.mjs.map +0 -1
  152. package/esm/form-item/types.d.ts +0 -25
  153. package/esm/form-item/types.mjs +0 -2
  154. package/esm/form-item/types.mjs.map +0 -1
  155. package/esm/form-item/utils.d.ts +0 -3
  156. package/esm/form-item/utils.mjs +0 -18
  157. package/esm/form-item/utils.mjs.map +0 -1
  158. package/esm/form-layout/form-layout.d.ts +0 -32
  159. package/esm/form-layout/form-layout.mjs +0 -86
  160. package/esm/form-layout/form-layout.mjs.map +0 -1
  161. package/esm/form-layout/index.d.ts +0 -1
  162. package/esm/form-layout/index.mjs +0 -6
  163. package/esm/form-layout/index.mjs.map +0 -1
  164. package/esm/form-layout/types.d.ts +0 -43
  165. package/esm/form-layout/types.mjs +0 -2
  166. package/esm/form-layout/types.mjs.map +0 -1
  167. package/esm/form-layout/utils.d.ts +0 -57
  168. package/esm/form-layout/utils.mjs +0 -109
  169. package/esm/form-layout/utils.mjs.map +0 -1
  170. package/esm/form-step/form-step-pane.d.ts +0 -2
  171. package/esm/form-step/form-step.d.ts +0 -5
  172. package/esm/form-step/index.d.ts +0 -24
  173. package/esm/form-step/index.mjs +0 -96
  174. package/esm/form-step/index.mjs.map +0 -1
  175. package/esm/form-step/types.d.ts +0 -21
  176. package/esm/form-step/types.mjs +0 -2
  177. package/esm/form-step/types.mjs.map +0 -1
  178. package/esm/form-step/utils.d.ts +0 -11
  179. package/esm/form-step/utils.mjs +0 -66
  180. package/esm/form-step/utils.mjs.map +0 -1
  181. package/esm/form-tab/form-tab.d.ts +0 -7
  182. package/esm/form-tab/hooks.d.ts +0 -7
  183. package/esm/form-tab/hooks.mjs +0 -32
  184. package/esm/form-tab/hooks.mjs.map +0 -1
  185. package/esm/form-tab/index.d.ts +0 -28
  186. package/esm/form-tab/index.mjs +0 -80
  187. package/esm/form-tab/index.mjs.map +0 -1
  188. package/esm/form-tab/types.d.ts +0 -12
  189. package/esm/form-tab/types.mjs +0 -2
  190. package/esm/form-tab/types.mjs.map +0 -1
  191. package/esm/form-tab/utils.d.ts +0 -4
  192. package/esm/form-tab/utils.mjs +0 -14
  193. package/esm/form-tab/utils.mjs.map +0 -1
  194. package/esm/index.d.ts +0 -37
  195. package/esm/index.mjs +0 -81
  196. package/esm/index.mjs.map +0 -1
  197. package/esm/input/index.d.ts +0 -84
  198. package/esm/input/index.mjs +0 -77
  199. package/esm/input/index.mjs.map +0 -1
  200. package/esm/input/input.d.ts +0 -32
  201. package/esm/input-number/index.d.ts +0 -4
  202. package/esm/input-number/index.mjs +0 -30
  203. package/esm/input-number/index.mjs.map +0 -1
  204. package/esm/pagination/components/jumper.d.ts +0 -16
  205. package/esm/pagination/components/jumper.mjs +0 -12
  206. package/esm/pagination/components/jumper.mjs.map +0 -1
  207. package/esm/pagination/components/next.d.ts +0 -42
  208. package/esm/pagination/components/next.mjs +0 -23
  209. package/esm/pagination/components/next.mjs.map +0 -1
  210. package/esm/pagination/components/pager.d.ts +0 -42
  211. package/esm/pagination/components/pager.mjs +0 -23
  212. package/esm/pagination/components/pager.mjs.map +0 -1
  213. package/esm/pagination/components/prev.d.ts +0 -39
  214. package/esm/pagination/components/prev.mjs +0 -22
  215. package/esm/pagination/components/prev.mjs.map +0 -1
  216. package/esm/pagination/components/sizes.d.ts +0 -56
  217. package/esm/pagination/components/sizes.mjs +0 -7
  218. package/esm/pagination/components/sizes.mjs.map +0 -1
  219. package/esm/pagination/components/total.d.ts +0 -8
  220. package/esm/pagination/components/total.mjs +0 -11
  221. package/esm/pagination/components/total.mjs.map +0 -1
  222. package/esm/pagination/pagination.d.ts +0 -128
  223. package/esm/pagination/pagination.mjs +0 -631
  224. package/esm/pagination/pagination.mjs.map +0 -1
  225. package/esm/password/index.d.ts +0 -86
  226. package/esm/password/index.mjs +0 -14
  227. package/esm/password/index.mjs.map +0 -1
  228. package/esm/preview-text/cascader.d.ts +0 -5
  229. package/esm/preview-text/date-picker.d.ts +0 -5
  230. package/esm/preview-text/index.d.ts +0 -102
  231. package/esm/preview-text/index.mjs +0 -321
  232. package/esm/preview-text/index.mjs.map +0 -1
  233. package/esm/preview-text/input.d.ts +0 -28
  234. package/esm/preview-text/preview.d.ts +0 -18
  235. package/esm/preview-text/select.d.ts +0 -5
  236. package/esm/preview-text/time-picker.d.ts +0 -5
  237. package/esm/preview-text/tree.d.ts +0 -22
  238. package/esm/preview-text/utils.d.ts +0 -14
  239. package/esm/preview-text/utils.mjs +0 -16
  240. package/esm/preview-text/utils.mjs.map +0 -1
  241. package/esm/radio/index.d.ts +0 -634
  242. package/esm/radio/index.mjs +0 -80
  243. package/esm/radio/index.mjs.map +0 -1
  244. package/esm/radio/radio-group.d.ts +0 -44
  245. package/esm/reset/index.d.ts +0 -63
  246. package/esm/reset/index.mjs +0 -48
  247. package/esm/reset/index.mjs.map +0 -1
  248. package/esm/reset/reset.d.ts +0 -45
  249. package/esm/select/index.d.ts +0 -142
  250. package/esm/select/index.mjs +0 -132
  251. package/esm/select/index.mjs.map +0 -1
  252. package/esm/select/select.d.ts +0 -50
  253. package/esm/select-table/index.mjs +0 -204
  254. package/esm/select-table/index.mjs.map +0 -1
  255. package/esm/select-table/types.d.ts +0 -14
  256. package/esm/select-table/types.mjs +0 -2
  257. package/esm/select-table/types.mjs.map +0 -1
  258. package/esm/space/index.d.ts +0 -1
  259. package/esm/space/index.mjs +0 -6
  260. package/esm/space/index.mjs.map +0 -1
  261. package/esm/styles/array-base/index.css +0 -1
  262. package/esm/styles/array-cards/index.css +0 -1
  263. package/esm/styles/array-collapse/index.css +0 -1
  264. package/esm/styles/array-items/index.css +0 -1
  265. package/esm/styles/array-list-tabs/index.css +0 -1
  266. package/esm/styles/array-table/index.css +0 -1
  267. package/esm/styles/array-tabs/index.css +0 -1
  268. package/esm/styles/editable/index.css +0 -1
  269. package/esm/styles/form-button-group/index.css +0 -1
  270. package/esm/styles/form-collapse/index.css +0 -1
  271. package/esm/styles/form-grid/index.css +0 -1
  272. package/esm/styles/form-item/index.css +0 -1
  273. package/esm/styles/form-tab/index.css +0 -1
  274. package/esm/styles/preview-text/index.css +0 -1
  275. package/esm/styles/radio/index.css +0 -1
  276. package/esm/styles/select-table/index.css +0 -1
  277. package/esm/submit/index.d.ts +0 -48
  278. package/esm/submit/index.mjs +0 -47
  279. package/esm/submit/index.mjs.map +0 -1
  280. package/esm/submit/submit.d.ts +0 -36
  281. package/esm/switch/index.d.ts +0 -4
  282. package/esm/switch/index.mjs +0 -19
  283. package/esm/switch/index.mjs.map +0 -1
  284. package/esm/time-picker/index.d.ts +0 -4
  285. package/esm/time-picker/index.mjs +0 -21
  286. package/esm/time-picker/index.mjs.map +0 -1
  287. package/esm/time-select/index.d.ts +0 -2
  288. package/esm/time-select/index.mjs +0 -21
  289. package/esm/time-select/index.mjs.map +0 -1
  290. package/esm/transfer/index.d.ts +0 -1509
  291. package/esm/transfer/index.mjs +0 -11
  292. package/esm/transfer/index.mjs.map +0 -1
  293. package/esm/tree/index.d.ts +0 -42
  294. package/esm/tree/index.mjs +0 -105
  295. package/esm/tree/index.mjs.map +0 -1
  296. package/esm/tree/tree.d.ts +0 -20
  297. package/esm/tree/types.d.ts +0 -13
  298. package/esm/tree/types.mjs +0 -2
  299. package/esm/tree/types.mjs.map +0 -1
  300. package/esm/tree/utils.d.ts +0 -45
  301. package/esm/tree/utils.mjs +0 -161
  302. package/esm/tree/utils.mjs.map +0 -1
  303. package/esm/tree-select/index.d.ts +0 -32
  304. package/esm/tree-select/index.mjs +0 -51
  305. package/esm/tree-select/index.mjs.map +0 -1
  306. package/esm/tree-select/tree-select.d.ts +0 -17
  307. package/esm/upload/index.d.ts +0 -889
  308. package/esm/upload/index.mjs +0 -185
  309. package/esm/upload/index.mjs.map +0 -1
  310. package/esm/upload/upload.d.ts +0 -1613
  311. package/esm/vendor/icon.mjs +0 -11
  312. package/esm/vendor/icon.mjs.map +0 -1
  313. package/esm/vendor/lodash.mjs +0 -1400
  314. package/esm/vendor/lodash.mjs.map +0 -1
  315. package/esm/vendor/runtime.mjs +0 -29
  316. package/esm/vendor/runtime.mjs.map +0 -1
  317. package/esm/vendor/shared.esm-bundler.mjs +0 -14
  318. package/esm/vendor/shared.esm-bundler.mjs.map +0 -1
  319. package/esm/vendor/sizes.mjs +0 -27
  320. package/esm/vendor/sizes.mjs.map +0 -1
  321. package/esm/vendor/types.mjs +0 -19
  322. package/esm/vendor/types.mjs.map +0 -1
package/README.md CHANGED
@@ -29,3 +29,7 @@ All new components come with comprehensive component testing, ensuring component
29
29
  ### 📝 Vue Template Syntax Based
30
30
 
31
31
  New components are developed using Vue template syntax whenever possible, providing better readability and runtime optimization, making the code more maintainable and performant.
32
+
33
+ ## Contributor Guide
34
+
35
+ Please review [`AGENTS.md`](AGENTS.md) for repository structure, workflows, and PR expectations before submitting changes.
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@silver-formily/element-plus",
3
3
  "type": "module",
4
- "version": "0.0.1-alpha.0",
5
- "description": "Element Plus 的 Formily 封装",
4
+ "version": "0.0.1-beta.0",
5
+ "description": "Formily 的 Element Plus 封装",
6
6
  "author": "hezhengxu",
7
7
  "license": "MIT",
8
+ "homepage": "https://silver-formily-element-plus.pages.dev/",
8
9
  "sideEffects": [
9
10
  "**/*.css"
10
11
  ],
@@ -40,63 +41,69 @@
40
41
  "vue": "^3.3.0"
41
42
  },
42
43
  "dependencies": {
43
- "@element-plus/icons-vue": "^2.3.1",
44
+ "@element-plus/icons-vue": "^2.3.0",
44
45
  "vue-draggable-plus": "^0.5.0"
45
46
  },
46
47
  "devDependencies": {
47
- "@antfu/eslint-config": "^4.13.3",
48
+ "@antfu/eslint-config": "^4.19.0",
48
49
  "@commitlint/cli": "^19.8.1",
49
50
  "@commitlint/config-conventional": "^19.8.1",
50
- "@eslint/js": "^9.28.0",
51
- "@eslint/markdown": "^6.4.0",
51
+ "@eslint/js": "^9.36.0",
52
+ "@eslint/markdown": "^6.6.0",
52
53
  "@iconify-json/ri": "^1.2.5",
53
54
  "@mdit-vue/shared": "^2.1.4",
54
55
  "@release-it/conventional-changelog": "^10.0.1",
55
- "@shikijs/langs": "^3.7.0",
56
+ "@shikijs/langs": "^3.13.0",
56
57
  "@types/lodash-es": "^4.17.12",
57
58
  "@types/markdown-it": "^14.1.2",
58
59
  "@types/markdown-it-container": "^2.0.10",
59
- "@types/node": "^20.17.57",
60
- "@vitejs/plugin-vue": "^5.2.4",
61
- "@vitejs/plugin-vue-jsx": "^4.2.0",
62
- "@vitest/browser": "^3.2.1",
63
- "@vitest/coverage-istanbul": "^3.2.1",
64
- "@vitest/ui": "^3.2.1",
65
- "@vue/shared": "^3.5.16",
66
- "@vueuse/core": "^13.3.0",
67
- "cz-git": "^1.11.1",
68
- "czg": "^1.11.1",
69
- "eslint": "^9.28.0",
60
+ "@types/node": "^20.19.19",
61
+ "@vitejs/plugin-vue": "^6.0.1",
62
+ "@vitejs/plugin-vue-jsx": "^5.1.1",
63
+ "@vitest/browser": "^3.2.4",
64
+ "@vitest/coverage-istanbul": "^3.2.4",
65
+ "@vitest/ui": "^3.2.4",
66
+ "@vue/shared": "^3.5.22",
67
+ "@vueuse/core": "^13.9.0",
68
+ "baseline-browser-mapping": "^2.9.11",
69
+ "cz-git": "^1.12.0",
70
+ "czg": "^1.12.0",
71
+ "eslint": "^9.36.0",
70
72
  "eslint-plugin-unicorn": "^59.0.1",
71
- "eslint-plugin-vue": "^10.1.0",
73
+ "eslint-plugin-vue": "^10.5.0",
72
74
  "execa": "^9.6.0",
73
75
  "fast-glob": "^3.3.3",
74
76
  "husky": "^9.1.7",
75
- "lint-staged": "^16.1.0",
77
+ "lint-staged": "^16.2.3",
76
78
  "lodash-es": "^4.17.21",
77
79
  "markdown-it": "^14.1.0",
78
80
  "markdown-it-container": "^4.0.0",
79
81
  "normalize.css": "^8.0.1",
80
82
  "nprogress": "^0.2.0",
81
- "playwright": "^1.52.0",
82
- "release-it": "^19.0.3",
83
+ "playwright": "^1.55.1",
84
+ "release-it": "^19.0.5",
83
85
  "rimraf": "^6.0.1",
84
- "sass-embedded": "^1.87.0",
85
- "shiki": "^3.7.0",
86
- "tsx": "^4.19.4",
87
- "typescript": "^5.8.3",
88
- "unocss": "^66.1.3",
89
- "unplugin-icons": "^22.1.0",
90
- "unplugin-vue-components": "^28.7.0",
86
+ "sass-embedded": "^1.93.2",
87
+ "shiki": "^3.13.0",
88
+ "tsx": "^4.20.6",
89
+ "typescript": "^5.9.3",
90
+ "unocss": "^66.5.2",
91
+ "unplugin-icons": "^22.4.2",
92
+ "unplugin-vue-components": "^28.8.0",
91
93
  "unplugin-vue-macros": "^2.14.5",
92
- "vite": "^6.3.5",
94
+ "vite": "^7.0.0",
93
95
  "vite-plugin-dts": "^4.5.4",
94
96
  "vite-plugin-lib-inject-css": "^2.2.2",
95
- "vitepress": "^1.6.3",
97
+ "vitepress": "2.0.0-alpha.12",
98
+ "vitepress-better-demo-plugin": "^0.3.1",
99
+ "vitepress-demo-plugin": "^1.5.0",
100
+ "vitepress-demoblock": "^1.0.4",
101
+ "vitepress-plugin-group-icons": "^1.6.5",
96
102
  "vitepress-plugin-nprogress": "^0.0.4",
97
- "vitest": "^3.2.1",
103
+ "vitepress-theme-element-plus": "^1.0.1",
104
+ "vitest": "^3.2.4",
98
105
  "vitest-browser-vue": "^0.2.0",
99
- "vue-eslint-parser": "^10.1.3"
106
+ "vue-eslint-parser": "^10.2.0"
100
107
  },
101
108
  "config": {
102
109
  "commitizen": {
@@ -1 +0,0 @@
1
- export declare const stylePrefix = "formily-element-plus";
@@ -1,5 +0,0 @@
1
- const e = "formily-element-plus";
2
- export {
3
- e as stylePrefix
4
- };
5
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":["../../../src/__builtins__/configs/index.ts"],"sourcesContent":["export const stylePrefix = 'formily-element-plus'\n"],"names":["stylePrefix"],"mappings":"AAAO,MAAMA,IAAc;"}
@@ -1,2 +0,0 @@
1
- export * from './configs';
2
- export * from './shared';
@@ -1,27 +0,0 @@
1
- import { stylePrefix as r } from "./configs/index.mjs";
2
- import { useDebounceFn as n, useResizeObserver as s, useThrottleFn as i } from "./shared/hooks.mjs";
3
- import { loadElConfigProvider as p } from "./shared/load-config-provider.mjs";
4
- import { getTransitionDuration as f, loading as u, useDebonceSubmitting as x } from "./shared/loading.mjs";
5
- import { lt as d, quickVersionCompare as C } from "./shared/simple-version-compare.mjs";
6
- import { mapReadPretty as c, transformComponent as g } from "./shared/transform-component.mjs";
7
- import { composeExport as D, hasSlotContent as E, isVnodeEmpty as P, isVueOptions as V, useCleanAttrs as h } from "./shared/utils.mjs";
8
- export {
9
- D as composeExport,
10
- f as getTransitionDuration,
11
- E as hasSlotContent,
12
- P as isVnodeEmpty,
13
- V as isVueOptions,
14
- p as loadElConfigProvider,
15
- u as loading,
16
- d as lt,
17
- c as mapReadPretty,
18
- C as quickVersionCompare,
19
- r as stylePrefix,
20
- g as transformComponent,
21
- h as useCleanAttrs,
22
- x as useDebonceSubmitting,
23
- n as useDebounceFn,
24
- s as useResizeObserver,
25
- i as useThrottleFn
26
- };
27
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
@@ -1,7 +0,0 @@
1
- import { Ref } from 'vue';
2
- export declare function useDebounceFn<T extends (...args: any[]) => any>(fn: T, delay: number | (() => number)): T;
3
- export declare function useThrottleFn<T extends (...args: any[]) => any>(fn: T, delay: number, trailing?: boolean, leading?: boolean): T;
4
- export declare function useResizeObserver(target: Ref<Element | null> | Element | null, callback: (entries: ResizeObserverEntry[], observer: ResizeObserver) => void, options?: ResizeObserverOptions): {
5
- isSupported: boolean;
6
- stop: () => void;
7
- };
@@ -1,59 +0,0 @@
1
- import { watch as f, onUnmounted as m } from "vue";
2
- function T(e, o) {
3
- let u = null;
4
- return (...l) => {
5
- u !== null && clearTimeout(u);
6
- const t = typeof o == "function" ? o() : o;
7
- u = setTimeout(() => {
8
- e(...l), u = null;
9
- }, t);
10
- };
11
- }
12
- function b(e, o, u = !0, l = !0) {
13
- let t = null, n = 0, s = null;
14
- return (...r) => {
15
- const i = Date.now();
16
- if (n === 0 && l) {
17
- n = i, e(...r);
18
- return;
19
- }
20
- n === 0 && !l && (n = i);
21
- const c = o - (i - n);
22
- s = r, t !== null && clearTimeout(t), c <= 0 && n !== i ? (n = i, e(...r), s = null) : u && (t = setTimeout(() => {
23
- n = Date.now(), s !== null && (e(...s), s = null), t = null;
24
- }, c));
25
- };
26
- }
27
- function p(e, o, u) {
28
- let l = null;
29
- const t = globalThis.window !== void 0 && "ResizeObserver" in globalThis, n = () => {
30
- l && (l.disconnect(), l = null);
31
- }, s = () => {
32
- n();
33
- }, r = () => {
34
- n();
35
- /* istanbul ignore if @preserve */
36
- if (!t)
37
- return;
38
- const i = e && "value" in e ? e.value : e;
39
- i && (l = new ResizeObserver(o), l.observe(i, u));
40
- };
41
- return e && "value" in e ? f(
42
- e,
43
- () => {
44
- r();
45
- },
46
- { immediate: !0, flush: "post" }
47
- ) : r(), m(() => {
48
- n();
49
- }), {
50
- isSupported: t,
51
- stop: s
52
- };
53
- }
54
- export {
55
- T as useDebounceFn,
56
- p as useResizeObserver,
57
- b as useThrottleFn
58
- };
59
- //# sourceMappingURL=hooks.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hooks.mjs","sources":["../../../src/__builtins__/shared/hooks.ts"],"sourcesContent":["import type { Ref } from 'vue'\nimport { onUnmounted, watch } from 'vue'\n\nexport function useDebounceFn<T extends (...args: any[]) => any>(\n fn: T,\n delay: number | (() => number),\n): T {\n let timeoutId: ReturnType<typeof setTimeout> | null = null\n\n return ((...args: Parameters<T>) => {\n if (timeoutId !== null) {\n clearTimeout(timeoutId)\n }\n\n const delayMs = typeof delay === 'function' ? delay() : delay\n\n timeoutId = setTimeout(() => {\n fn(...args)\n timeoutId = null\n }, delayMs)\n }) as T\n}\n\nexport function useThrottleFn<T extends (...args: any[]) => any>(\n fn: T,\n delay: number,\n trailing = true,\n leading = true,\n): T {\n let timeoutId: ReturnType<typeof setTimeout> | null = null\n let lastCallTime = 0\n let lastArgs: Parameters<T> | null = null\n\n return ((...args: Parameters<T>) => {\n const now = Date.now()\n if (lastCallTime === 0 && leading) {\n lastCallTime = now\n fn(...args)\n return\n }\n if (lastCallTime === 0 && !leading) {\n lastCallTime = now\n }\n\n const remainingTime = delay - (now - lastCallTime)\n\n lastArgs = args\n\n if (timeoutId !== null) {\n clearTimeout(timeoutId)\n }\n\n if (remainingTime <= 0 && lastCallTime !== now) {\n lastCallTime = now\n fn(...args)\n lastArgs = null\n }\n else if (trailing) {\n timeoutId = setTimeout(() => {\n lastCallTime = Date.now()\n if (lastArgs !== null) {\n fn(...lastArgs)\n lastArgs = null\n }\n timeoutId = null\n }, remainingTime)\n }\n }) as T\n}\n\nexport function useResizeObserver(\n target: Ref<Element | null> | Element | null,\n callback: (entries: ResizeObserverEntry[], observer: ResizeObserver) => void,\n options?: ResizeObserverOptions,\n): {\n isSupported: boolean\n stop: () => void\n} {\n let observer: ResizeObserver | null = null\n const isSupported = globalThis.window !== undefined && 'ResizeObserver' in globalThis\n\n const cleanup = () => {\n if (observer) {\n observer.disconnect()\n observer = null\n }\n }\n\n const stop = () => {\n cleanup()\n }\n\n const start = () => {\n cleanup()\n\n /* istanbul ignore if @preserve */\n if (!isSupported) {\n return\n }\n\n const element = (target && 'value' in target ? target.value : target) as Element\n\n if (!element) {\n return\n }\n\n observer = new ResizeObserver(callback)\n observer.observe(element, options)\n }\n\n if (target && 'value' in target) {\n watch(\n target,\n () => {\n start()\n },\n { immediate: true, flush: 'post' },\n )\n }\n else {\n start()\n }\n onUnmounted(() => {\n cleanup()\n })\n\n return {\n isSupported,\n stop,\n }\n}\n"],"names":["useDebounceFn","fn","delay","timeoutId","args","delayMs","useThrottleFn","trailing","leading","lastCallTime","lastArgs","now","remainingTime","useResizeObserver","target","callback","options","observer","isSupported","cleanup","stop","start","element","watch","onUnmounted"],"mappings":";AAGO,SAASA,EACdC,GACAC,GACG;AACH,MAAIC,IAAkD;AAEtD,SAAQ,IAAIC,MAAwB;AAClC,IAAID,MAAc,QAChB,aAAaA,CAAS;AAGxB,UAAME,IAAU,OAAOH,KAAU,aAAaA,MAAUA;AAExD,IAAAC,IAAY,WAAW,MAAM;AAC3B,MAAAF,EAAG,GAAGG,CAAI,GACVD,IAAY;AAAA,IACd,GAAGE,CAAO;AAAA,EACZ;AACF;AAEO,SAASC,EACdL,GACAC,GACAK,IAAW,IACXC,IAAU,IACP;AACH,MAAIL,IAAkD,MAClDM,IAAe,GACfC,IAAiC;AAErC,SAAQ,IAAIN,MAAwB;AAClC,UAAMO,IAAM,KAAK,IAAA;AACjB,QAAIF,MAAiB,KAAKD,GAAS;AACjC,MAAAC,IAAeE,GACfV,EAAG,GAAGG,CAAI;AACV;AAAA,IACF;AACA,IAAIK,MAAiB,KAAK,CAACD,MACzBC,IAAeE;AAGjB,UAAMC,IAAgBV,KAASS,IAAMF;AAErC,IAAAC,IAAWN,GAEPD,MAAc,QAChB,aAAaA,CAAS,GAGpBS,KAAiB,KAAKH,MAAiBE,KACzCF,IAAeE,GACfV,EAAG,GAAGG,CAAI,GACVM,IAAW,QAEJH,MACPJ,IAAY,WAAW,MAAM;AAC3B,MAAAM,IAAe,KAAK,IAAA,GAChBC,MAAa,SACfT,EAAG,GAAGS,CAAQ,GACdA,IAAW,OAEbP,IAAY;AAAA,IACd,GAAGS,CAAa;AAAA,EAEpB;AACF;AAEO,SAASC,EACdC,GACAC,GACAC,GAIA;AACA,MAAIC,IAAkC;AACtC,QAAMC,IAAc,WAAW,WAAW,UAAa,oBAAoB,YAErEC,IAAU,MAAM;AACpB,IAAIF,MACFA,EAAS,WAAA,GACTA,IAAW;AAAA,EAEf,GAEMG,IAAO,MAAM;AACjB,IAAAD,EAAA;AAAA,EACF,GAEME,IAAQ,MAAM;AAClB,IAAAF,EAAA;AAAA,IAAQ;AAGR,QAAI,CAACD;AACH;AAGF,UAAMI,IAAWR,KAAU,WAAWA,IAASA,EAAO,QAAQA;AAE9D,IAAKQ,MAILL,IAAW,IAAI,eAAeF,CAAQ,GACtCE,EAAS,QAAQK,GAASN,CAAO;AAAA,EACnC;AAEA,SAAIF,KAAU,WAAWA,IACvBS;AAAA,IACET;AAAA,IACA,MAAM;AACJ,MAAAO,EAAA;AAAA,IACF;AAAA,IACA,EAAE,WAAW,IAAM,OAAO,OAAA;AAAA,EAAO,IAInCA,EAAA,GAEFG,EAAY,MAAM;AAChB,IAAAL,EAAA;AAAA,EACF,CAAC,GAEM;AAAA,IACL,aAAAD;AAAA,IACA,MAAAE;AAAA,EAAA;AAEJ;"}
@@ -1,7 +0,0 @@
1
- export * from './hooks';
2
- export * from './load-config-provider';
3
- export * from './loading';
4
- export * from './simple-version-compare';
5
- export * from './transform-component';
6
- export * from './types';
7
- export * from './utils';
@@ -1,25 +0,0 @@
1
- import { useDebounceFn as r, useResizeObserver as t, useThrottleFn as n } from "./hooks.mjs";
2
- import { loadElConfigProvider as i } from "./load-config-provider.mjs";
3
- import { getTransitionDuration as p, loading as a, useDebonceSubmitting as u } from "./loading.mjs";
4
- import { lt as l, quickVersionCompare as x } from "./simple-version-compare.mjs";
5
- import { mapReadPretty as C, transformComponent as b } from "./transform-component.mjs";
6
- import { composeExport as g, hasSlotContent as D, isVnodeEmpty as E, isVueOptions as V, useCleanAttrs as h } from "./utils.mjs";
7
- export {
8
- g as composeExport,
9
- p as getTransitionDuration,
10
- D as hasSlotContent,
11
- E as isVnodeEmpty,
12
- V as isVueOptions,
13
- i as loadElConfigProvider,
14
- a as loading,
15
- l as lt,
16
- C as mapReadPretty,
17
- x as quickVersionCompare,
18
- b as transformComponent,
19
- h as useCleanAttrs,
20
- u as useDebonceSubmitting,
21
- r as useDebounceFn,
22
- t as useResizeObserver,
23
- n as useThrottleFn
24
- };
25
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,2 +0,0 @@
1
- import { ConfigProviderProps } from 'element-plus';
2
- export declare const loadElConfigProvider: () => Partial<ConfigProviderProps>;
@@ -1,13 +0,0 @@
1
- import { useGlobalConfig as r, useZIndex as u } from "element-plus";
2
- const i = () => {
3
- var t;
4
- const n = (t = document.querySelector("[data-v-app]")) == null ? void 0 : t.__vue_app__;
5
- if (!n || !n.runWithContext)
6
- return {};
7
- const e = n.runWithContext(() => r().value), o = n.runWithContext(() => u().nextZIndex());
8
- return { ...e, zIndex: o };
9
- };
10
- export {
11
- i as loadElConfigProvider
12
- };
13
- //# sourceMappingURL=load-config-provider.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"load-config-provider.mjs","sources":["../../../src/__builtins__/shared/load-config-provider.ts"],"sourcesContent":["/*\r\n * @Author: Hezhengxu\r\n * @Date: 2024-08-28 11:15:56\r\n * @LastEditors: Hezhengxu\r\n * @Description: 加载现有项目中的element-plus配置项\r\n */\r\nimport type { ConfigProviderProps } from 'element-plus'\r\nimport type { App } from 'vue'\r\nimport { useGlobalConfig, useZIndex } from 'element-plus'\r\n\r\nexport const loadElConfigProvider: () => Partial<ConfigProviderProps> = () => {\r\n const _appInstance = (\r\n document.querySelector('[data-v-app]') as Element & { __vue_app__: App }\r\n )?.__vue_app__\r\n if (!_appInstance || !_appInstance.runWithContext) {\r\n return {}\r\n }\r\n const elConfig = _appInstance.runWithContext(() => {\r\n return useGlobalConfig().value\r\n })\r\n const zIndex = _appInstance.runWithContext(() => {\r\n return useZIndex().nextZIndex()\r\n })\r\n\r\n return { ...elConfig, zIndex }\r\n}\r\n"],"names":["loadElConfigProvider","_appInstance","_a","elConfig","useGlobalConfig","zIndex","useZIndex"],"mappings":";AAUO,MAAMA,IAA2D,MAAM;;AAC5E,QAAMC,KACJC,IAAA,SAAS,cAAc,cAAc,MAArC,gBAAAA,EACC;AACH,MAAI,CAACD,KAAgB,CAACA,EAAa;AACjC,WAAO,CAAA;AAET,QAAME,IAAWF,EAAa,eAAe,MACpCG,IAAkB,KAC1B,GACKC,IAASJ,EAAa,eAAe,MAClCK,EAAA,EAAY,WAAA,CACpB;AAED,SAAO,EAAE,GAAGH,GAAU,QAAAE,EAAA;AACxB;"}
@@ -1,12 +0,0 @@
1
- import { Form } from '@formily/core';
2
- export declare function loading(loadingText: string, processor: () => Promise<any>): Promise<any>;
3
- /**
4
- * 获取当前element-plus的过渡时长并转换为毫秒
5
- * @param cssVarName CSS 变量名,默认为 '--el-transition-duration'
6
- * @param defaultValue 默认值(毫秒),默认为 200
7
- * @returns 过渡时长(毫秒)
8
- */
9
- export declare function getTransitionDuration(cssVarName?: string, defaultValue?: number): number;
10
- export declare function useDebonceSubmitting(form: Form): {
11
- internalSubmitting: import('vue').Ref<boolean, boolean>;
12
- };
@@ -1,49 +0,0 @@
1
- import { reaction as o } from "@formily/reactive";
2
- import { ElLoading as s } from "element-plus";
3
- import { ref as a } from "vue";
4
- import { useDebounceFn as u } from "./hooks.mjs";
5
- async function p(r = "Loading...", n) {
6
- let t;
7
- const e = setTimeout(() => {
8
- t = s.service({
9
- text: r,
10
- background: "transparent"
11
- });
12
- }, 100);
13
- try {
14
- return await n();
15
- } finally {
16
- t == null || t.close(), clearTimeout(e);
17
- }
18
- }
19
- function c(r = "--el-transition-duration", n = 200) {
20
- const t = getComputedStyle(document.documentElement).getPropertyValue(r).trim();
21
- if (!t)
22
- return n;
23
- const e = t.match(/^([\d.]+)\s*(s|ms)?$/);
24
- if (!e)
25
- return n;
26
- const i = Number.parseFloat(e[1]);
27
- switch (e[2] || "ms") {
28
- case "s":
29
- return i * 1e3;
30
- case "ms":
31
- return i;
32
- }
33
- }
34
- function b(r) {
35
- const n = a(!1), t = c(), e = u(() => {
36
- n.value = !1;
37
- }, () => t);
38
- return o(() => r.submitting, (i) => {
39
- i === !1 ? e() : n.value = i;
40
- }), {
41
- internalSubmitting: n
42
- };
43
- }
44
- export {
45
- c as getTransitionDuration,
46
- p as loading,
47
- b as useDebonceSubmitting
48
- };
49
- //# sourceMappingURL=loading.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"loading.mjs","sources":["../../../src/__builtins__/shared/loading.ts"],"sourcesContent":["import type { Form } from '@formily/core'\nimport { reaction } from '@formily/reactive'\nimport { ElLoading } from 'element-plus'\nimport { ref } from 'vue'\nimport { useDebounceFn } from './hooks'\n\nexport async function loading(loadingText = 'Loading...', processor: () => Promise<any>) {\n let loadingInstance\n const loading = setTimeout(() => {\n loadingInstance = ElLoading.service({\n text: loadingText,\n background: 'transparent',\n })\n }, 100)\n try {\n return await processor()\n }\n finally {\n loadingInstance?.close()\n clearTimeout(loading)\n }\n}\n\n/**\n * 获取当前element-plus的过渡时长并转换为毫秒\n * @param cssVarName CSS 变量名,默认为 '--el-transition-duration'\n * @param defaultValue 默认值(毫秒),默认为 200\n * @returns 过渡时长(毫秒)\n */\nexport function getTransitionDuration(cssVarName = '--el-transition-duration', defaultValue = 200): number {\n const cssVar = getComputedStyle(document.documentElement)\n .getPropertyValue(cssVarName)\n .trim()\n if (!cssVar) {\n return defaultValue\n }\n const durationMatch = cssVar.match(/^([\\d.]+)\\s*(s|ms)?$/)\n if (!durationMatch) {\n return defaultValue\n }\n\n const value = Number.parseFloat(durationMatch[1])\n const unit = durationMatch[2] || 'ms'\n\n switch (unit) {\n case 's': {\n return value * 1000\n }\n case 'ms': {\n return value\n }\n }\n}\n\nexport function useDebonceSubmitting(form: Form) {\n const internalSubmitting = ref(false)\n const transitionDuration = getTransitionDuration()\n\n const setSubmittingFalse = useDebounceFn(() => {\n internalSubmitting.value = false\n }, () => transitionDuration)\n\n reaction(() => form.submitting, (val) => {\n if (val === false) {\n setSubmittingFalse()\n }\n else {\n internalSubmitting.value = val\n }\n })\n\n return {\n internalSubmitting,\n }\n}\n"],"names":["loading","loadingText","processor","loadingInstance","ElLoading","getTransitionDuration","cssVarName","defaultValue","cssVar","durationMatch","value","useDebonceSubmitting","form","internalSubmitting","ref","transitionDuration","setSubmittingFalse","useDebounceFn","reaction","val"],"mappings":";;;;AAMA,eAAsBA,EAAQC,IAAc,cAAcC,GAA+B;AACvF,MAAIC;AACJ,QAAMH,IAAU,WAAW,MAAM;AAC/B,IAAAG,IAAkBC,EAAU,QAAQ;AAAA,MAClC,MAAMH;AAAA,MACN,YAAY;AAAA,IAAA,CACb;AAAA,EACH,GAAG,GAAG;AACN,MAAI;AACF,WAAO,MAAMC,EAAA;AAAA,EACf,UAAA;AAEE,IAAAC,KAAA,QAAAA,EAAiB,SACjB,aAAaH,CAAO;AAAA,EACtB;AACF;AAQO,SAASK,EAAsBC,IAAa,4BAA4BC,IAAe,KAAa;AACzG,QAAMC,IAAS,iBAAiB,SAAS,eAAe,EACrD,iBAAiBF,CAAU,EAC3B,KAAA;AACH,MAAI,CAACE;AACH,WAAOD;AAET,QAAME,IAAgBD,EAAO,MAAM,sBAAsB;AACzD,MAAI,CAACC;AACH,WAAOF;AAGT,QAAMG,IAAQ,OAAO,WAAWD,EAAc,CAAC,CAAC;AAGhD,UAFaA,EAAc,CAAC,KAAK,MAEzB;AAAA,IACN,KAAK;AACH,aAAOC,IAAQ;AAAA,IAEjB,KAAK;AACH,aAAOA;AAAA,EACT;AAEJ;AAEO,SAASC,EAAqBC,GAAY;AAC/C,QAAMC,IAAqBC,EAAI,EAAK,GAC9BC,IAAqBV,EAAA,GAErBW,IAAqBC,EAAc,MAAM;AAC7C,IAAAJ,EAAmB,QAAQ;AAAA,EAC7B,GAAG,MAAME,CAAkB;AAE3B,SAAAG,EAAS,MAAMN,EAAK,YAAY,CAACO,MAAQ;AACvC,IAAIA,MAAQ,KACVH,EAAA,IAGAH,EAAmB,QAAQM;AAAA,EAE/B,CAAC,GAEM;AAAA,IACL,oBAAAN;AAAA,EAAA;AAEJ;"}
@@ -1,2 +0,0 @@
1
- export declare function quickVersionCompare(v1: string, v2: string): number;
2
- export declare function lt(v1: string, v2: string): boolean;
@@ -1,18 +0,0 @@
1
- function e(n) {
2
- return n.split(".").map((t) => {
3
- const r = Number.parseInt(t, 10);
4
- return Number.isNaN(r) ? "0".padStart(10, "0") : r.toString().padStart(10, "0");
5
- }).join(".");
6
- }
7
- function i(n, t) {
8
- const r = e(n), o = e(t);
9
- return r > o ? 1 : r < o ? -1 : 0;
10
- }
11
- function u(n, t) {
12
- return i(n, t) < 0;
13
- }
14
- export {
15
- u as lt,
16
- i as quickVersionCompare
17
- };
18
- //# sourceMappingURL=simple-version-compare.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"simple-version-compare.mjs","sources":["../../../src/__builtins__/shared/simple-version-compare.ts"],"sourcesContent":["function normalizeVersion(v: string) {\n return v.split('.').map((n) => {\n const num = Number.parseInt(n, 10)\n return Number.isNaN(num) ? '0'.padStart(10, '0') : num.toString().padStart(10, '0')\n }).join('.')\n}\n\nexport function quickVersionCompare(v1: string, v2: string): number {\n const nv1 = normalizeVersion(v1)\n const nv2 = normalizeVersion(v2)\n return nv1 > nv2 ? 1 : (nv1 < nv2 ? -1 : 0)\n}\n\nexport function lt(v1: string, v2: string): boolean {\n return quickVersionCompare(v1, v2) < 0\n}\n"],"names":["normalizeVersion","v","n","num","quickVersionCompare","v1","v2","nv1","nv2","lt"],"mappings":"AAAA,SAASA,EAAiBC,GAAW;AACnC,SAAOA,EAAE,MAAM,GAAG,EAAE,IAAI,CAACC,MAAM;AAC7B,UAAMC,IAAM,OAAO,SAASD,GAAG,EAAE;AACjC,WAAO,OAAO,MAAMC,CAAG,IAAI,IAAI,SAAS,IAAI,GAAG,IAAIA,EAAI,SAAA,EAAW,SAAS,IAAI,GAAG;AAAA,EACpF,CAAC,EAAE,KAAK,GAAG;AACb;AAEO,SAASC,EAAoBC,GAAYC,GAAoB;AAClE,QAAMC,IAAMP,EAAiBK,CAAE,GACzBG,IAAMR,EAAiBM,CAAE;AAC/B,SAAOC,IAAMC,IAAM,IAAKD,IAAMC,IAAM,KAAK;AAC3C;AAEO,SAASC,EAAGJ,GAAYC,GAAqB;AAClD,SAAOF,EAAoBC,GAAIC,CAAE,IAAI;AACvC;"}
@@ -1,8 +0,0 @@
1
- import { VueComponent } from '@formily/vue';
2
- import { Component } from 'vue';
3
- type ListenersTransformRules = Record<string, string>;
4
- export declare function transformComponent<T extends Record<string, any>>(tag: any, transformRules?: ListenersTransformRules): Component<T> | any;
5
- export declare function mapReadPretty<T extends VueComponent, C extends VueComponent>(component: C, readPrettyProps?: Record<string, any>): (target: T) => import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
6
- [key: string]: any;
7
- }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
8
- export {};
@@ -1,50 +0,0 @@
1
- import { isVoidField as c } from "@formily/core";
2
- import { observer as l } from "@formily/reactive-vue";
3
- import { each as C } from "@formily/shared";
4
- import { useField as $ } from "@formily/vue";
5
- import { defineComponent as i, h as u } from "vue";
6
- import { useCleanAttrs as y } from "./utils.mjs";
7
- function E(t, o) {
8
- const r = t.name.split("El")[1];
9
- return i({
10
- name: `F${r}`,
11
- setup(d, { attrs: a, slots: m }) {
12
- return () => {
13
- const { props: n } = y();
14
- return o && C(o, (p, e) => {
15
- n.value[`on${p[0].toUpperCase()}${p.slice(1)}`] = a[`on${e[0].toUpperCase()}${e.slice(1)}`];
16
- }), u(t, n.value, m);
17
- };
18
- }
19
- });
20
- }
21
- function U(t, o) {
22
- return (r) => l(
23
- i({
24
- name: r.name ? `Read${r.name}` : "ReadComponent",
25
- setup(d, { attrs: a, slots: m, listeners: n }) {
26
- const p = $();
27
- return () => {
28
- var s;
29
- const e = p.value, f = !!((s = e == null ? void 0 : e.data) != null && s.readPretty);
30
- return u(
31
- e && !c(e) && (e.pattern === "readPretty" || f) ? t : r,
32
- {
33
- attrs: {
34
- ...o,
35
- ...a
36
- },
37
- on: n
38
- },
39
- m
40
- );
41
- };
42
- }
43
- })
44
- );
45
- }
46
- export {
47
- U as mapReadPretty,
48
- E as transformComponent
49
- };
50
- //# sourceMappingURL=transform-component.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transform-component.mjs","sources":["../../../src/__builtins__/shared/transform-component.ts"],"sourcesContent":["import type { VueComponent } from '@formily/vue'\nimport type { Component } from 'vue'\nimport { isVoidField } from '@formily/core'\nimport { observer } from '@formily/reactive-vue'\nimport { each } from '@formily/shared'\nimport { useField } from '@formily/vue'\nimport { defineComponent, h } from 'vue'\nimport { useCleanAttrs } from './utils'\n\ntype ListenersTransformRules = Record<string, string>\n\nexport function transformComponent<T extends Record<string, any>>(tag: any, transformRules?: ListenersTransformRules): Component<T> | any {\n const componentName = tag.name.split('El')[1]\n return defineComponent({\n name: `F${componentName}`,\n setup(props, { attrs, slots }) {\n return () => {\n const { props: data } = useCleanAttrs()\n if (transformRules) {\n each(transformRules, (event, extract) => {\n data.value[`on${event[0].toUpperCase()}${event.slice(1)}`]\n = attrs[`on${extract[0].toUpperCase()}${extract.slice(1)}`]\n })\n }\n return h(tag, data.value, slots)\n }\n },\n })\n}\n\n// fork from https://github.com/alibaba/formily/blob/7c64c671252adf85471ac5aabfddbaf4fc537354/packages/vue/src/shared/connect.ts#L65\nexport function mapReadPretty<T extends VueComponent, C extends VueComponent>(\n component: C,\n readPrettyProps?: Record<string, any>,\n) {\n return (target: T) => {\n return observer(\n defineComponent({\n name: target.name ? `Read${target.name}` : `ReadComponent`,\n setup(props, { attrs, slots, listeners }: Record<string, any>) {\n const fieldRef = useField()\n return () => {\n const field = fieldRef.value\n const isEditableReadPretty = !!field?.data?.readPretty\n return h(\n field && !isVoidField(field) && (field.pattern === 'readPretty' || isEditableReadPretty)\n ? component\n : target,\n {\n attrs: {\n ...readPrettyProps,\n ...attrs,\n },\n on: listeners,\n },\n slots,\n )\n }\n },\n }),\n )\n }\n}\n"],"names":["transformComponent","tag","transformRules","componentName","defineComponent","props","attrs","slots","data","useCleanAttrs","each","event","extract","h","mapReadPretty","component","readPrettyProps","target","observer","listeners","fieldRef","useField","field","isEditableReadPretty","_a","isVoidField"],"mappings":";;;;;;AAWO,SAASA,EAAkDC,GAAUC,GAA8D;AACxI,QAAMC,IAAgBF,EAAI,KAAK,MAAM,IAAI,EAAE,CAAC;AAC5C,SAAOG,EAAgB;AAAA,IACrB,MAAM,IAAID,CAAa;AAAA,IACvB,MAAME,GAAO,EAAE,OAAAC,GAAO,OAAAC,KAAS;AAC7B,aAAO,MAAM;AACX,cAAM,EAAE,OAAOC,EAAA,IAASC,EAAA;AACxB,eAAIP,KACFQ,EAAKR,GAAgB,CAACS,GAAOC,MAAY;AACvC,UAAAJ,EAAK,MAAM,KAAKG,EAAM,CAAC,EAAE,YAAA,CAAa,GAAGA,EAAM,MAAM,CAAC,CAAC,EAAE,IACrDL,EAAM,KAAKM,EAAQ,CAAC,EAAE,aAAa,GAAGA,EAAQ,MAAM,CAAC,CAAC,EAAE;AAAA,QAC9D,CAAC,GAEIC,EAAEZ,GAAKO,EAAK,OAAOD,CAAK;AAAA,MACjC;AAAA,IACF;AAAA,EAAA,CACD;AACH;AAGO,SAASO,EACdC,GACAC,GACA;AACA,SAAO,CAACC,MACCC;AAAA,IACLd,EAAgB;AAAA,MACd,MAAMa,EAAO,OAAO,OAAOA,EAAO,IAAI,KAAK;AAAA,MAC3C,MAAMZ,GAAO,EAAE,OAAAC,GAAO,OAAAC,GAAO,WAAAY,KAAkC;AAC7D,cAAMC,IAAWC,EAAA;AACjB,eAAO,MAAM;;AACX,gBAAMC,IAAQF,EAAS,OACjBG,IAAuB,CAAC,GAACC,IAAAF,KAAA,gBAAAA,EAAO,SAAP,QAAAE,EAAa;AAC5C,iBAAOX;AAAA,YACLS,KAAS,CAACG,EAAYH,CAAK,MAAMA,EAAM,YAAY,gBAAgBC,KAC/DR,IACAE;AAAA,YACJ;AAAA,cACE,OAAO;AAAA,gBACL,GAAGD;AAAA,gBACH,GAAGV;AAAA,cAAA;AAAA,cAEL,IAAIa;AAAA,YAAA;AAAA,YAENZ;AAAA,UAAA;AAAA,QAEJ;AAAA,MACF;AAAA,IAAA,CACD;AAAA,EAAA;AAGP;"}
@@ -1,2 +0,0 @@
1
- import { Component, VNode } from 'vue';
2
- export type SlotTypes = Component | string | number | ((props: Record<string, any>) => VNode[] | VNode) | VNode;
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=types.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- import { Component, ComputedRef, Slot, VNode } from 'vue';
2
- export declare function useCleanAttrs(removeAttrsList?: string[]): {
3
- props: ComputedRef<Record<string, any>>;
4
- };
5
- export declare function isVueOptions(options: any): options is Component;
6
- export declare function composeExport<T0 extends object, T1 extends object>(s0: T0, s1: T1): T0 & T1;
7
- export declare function isVnodeEmpty(vnodes: Array<VNode>): boolean;
8
- export declare function hasSlotContent(slot: Slot<any> | undefined): boolean;
@@ -1,34 +0,0 @@
1
- import { isPlainObj as o } from "@formily/shared";
2
- import { useAttrs as i } from "element-plus";
3
- import { computed as a, Fragment as s } from "vue";
4
- import { o as n } from "../../vendor/lodash.mjs";
5
- function y(t = []) {
6
- const r = i();
7
- return {
8
- props: a(() => {
9
- const e = ["modelValue", "value", "onChange", "attrs", "on", "readOnly"];
10
- return o(r.value.attrs) ? n({ ...r.value, ...r.value.attrs }, e.concat(t)) : n(r.value, e.concat(t));
11
- })
12
- };
13
- }
14
- function g(t) {
15
- return t && (typeof t.template == "string" || typeof t.render == "function");
16
- }
17
- function h(t, r) {
18
- return Object.assign(t, r);
19
- }
20
- /* istanbul ignore next -- @preserve */
21
- function u(t) {
22
- return t.every((r) => !!(r.type === Comment || r.type === Text && typeof r.children == "string" && !r.children.trim() || r.type === s && u(r.children)));
23
- }
24
- function v(t) {
25
- return t ? !u(t()) : !1;
26
- }
27
- export {
28
- h as composeExport,
29
- v as hasSlotContent,
30
- u as isVnodeEmpty,
31
- g as isVueOptions,
32
- y as useCleanAttrs
33
- };
34
- //# sourceMappingURL=utils.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.mjs","sources":["../../../src/__builtins__/shared/utils.ts"],"sourcesContent":["import type { Component, ComputedRef, Slot, VNode } from 'vue'\nimport { isPlainObj } from '@formily/shared'\nimport { useAttrs } from 'element-plus'\nimport { omit } from 'lodash-es'\nimport { computed, Fragment } from 'vue'\n\nexport function useCleanAttrs(removeAttrsList: string[] = []): {\n props: ComputedRef<Record<string, any>>\n} {\n const attrs = useAttrs()\n const props = computed(() => {\n const DEFAULT_REMOVE_ATTRS = ['modelValue', 'value', 'onChange', 'attrs', 'on', 'readOnly']\n if (isPlainObj(attrs.value.attrs)) {\n return omit({ ...attrs.value, ...attrs.value.attrs }, DEFAULT_REMOVE_ATTRS.concat(removeAttrsList))\n }\n return omit(attrs.value, DEFAULT_REMOVE_ATTRS.concat(removeAttrsList))\n })\n return {\n props,\n }\n}\n\nexport function isVueOptions(options: any): options is Component {\n return (\n options\n && (typeof options.template === 'string'\n || typeof options.render === 'function')\n )\n}\n\nexport function composeExport<T0 extends object, T1 extends object>(\n s0: T0,\n s1: T1,\n): T0 & T1 {\n return Object.assign(s0, s1)\n}\n\n// Adapted from https://github.com/vuejs/vue-next/blob/ca17162e377e0a0bf3fae9d92d0fdcb32084a9fe/packages/runtime-core/src/helpers/renderSlot.ts#L77\n/* istanbul ignore next -- @preserve */\nexport function isVnodeEmpty(vnodes: Array<VNode>) {\n return vnodes.every((node: VNode) => {\n if (node.type === Comment) {\n return true\n }\n\n if (node.type === Text && typeof node.children === 'string' && !node.children.trim()) {\n return true\n }\n\n if (\n node.type === Fragment\n && isVnodeEmpty(node.children as Array<VNode>)\n ) {\n return true\n }\n\n return false\n })\n}\n\nexport function hasSlotContent(slot: Slot<any> | undefined) {\n if (!slot) {\n return false\n }\n return !isVnodeEmpty(slot())\n}\n"],"names":["useCleanAttrs","removeAttrsList","attrs","useAttrs","computed","DEFAULT_REMOVE_ATTRS","isPlainObj","omit","isVueOptions","options","composeExport","s0","s1","isVnodeEmpty","vnodes","node","Fragment","hasSlotContent","slot"],"mappings":";;;;AAMO,SAASA,EAAcC,IAA4B,IAExD;AACA,QAAMC,IAAQC,EAAA;AAQd,SAAO;AAAA,IACL,OARYC,EAAS,MAAM;AAC3B,YAAMC,IAAuB,CAAC,cAAc,SAAS,YAAY,SAAS,MAAM,UAAU;AAC1F,aAAIC,EAAWJ,EAAM,MAAM,KAAK,IACvBK,EAAK,EAAE,GAAGL,EAAM,OAAO,GAAGA,EAAM,MAAM,MAAA,GAASG,EAAqB,OAAOJ,CAAe,CAAC,IAE7FM,EAAKL,EAAM,OAAOG,EAAqB,OAAOJ,CAAe,CAAC;AAAA,IACvE,CAAC;AAAA,EAEC;AAEJ;AAEO,SAASO,EAAaC,GAAoC;AAC/D,SACEA,MACI,OAAOA,EAAQ,YAAa,YAC3B,OAAOA,EAAQ,UAAW;AAEnC;AAEO,SAASC,EACdC,GACAC,GACS;AACT,SAAO,OAAO,OAAOD,GAAIC,CAAE;AAC7B;AAGA;AACO,SAASC,EAAaC,GAAsB;AACjD,SAAOA,EAAO,MAAM,CAACC,MACf,GAAAA,EAAK,SAAS,WAIdA,EAAK,SAAS,QAAQ,OAAOA,EAAK,YAAa,YAAY,CAACA,EAAK,SAAS,KAAA,KAK5EA,EAAK,SAASC,KACXH,EAAaE,EAAK,QAAwB,EAMhD;AACH;AAEO,SAASE,EAAeC,GAA6B;AAC1D,SAAKA,IAGE,CAACL,EAAaK,GAAM,IAFlB;AAGX;"}
@@ -1,5 +0,0 @@
1
- import { IArrayBaseAdditionProps } from './types';
2
- declare const _default: import('vue').DefineComponent<IArrayBaseAdditionProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IArrayBaseAdditionProps> & Readonly<{}>, {
3
- method: "push" | "unshift";
4
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
5
- export default _default;
@@ -1,19 +0,0 @@
1
- declare function __VLS_template(): {
2
- attrs: Partial<{}>;
3
- slots: {
4
- default?(_: {
5
- index: number;
6
- }): any;
7
- };
8
- refs: {};
9
- rootEl: HTMLSpanElement;
10
- };
11
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
12
- declare const __VLS_component: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLSpanElement>;
13
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
14
- export default _default;
15
- type __VLS_WithTemplateSlots<T, S> = T & {
16
- new (): {
17
- $slots: S;
18
- };
19
- };
@@ -1,18 +0,0 @@
1
- import { IArrayBaseProps } from './types';
2
- declare function __VLS_template(): {
3
- attrs: Partial<{}>;
4
- slots: {
5
- default?(_: {}): any;
6
- };
7
- refs: {};
8
- rootEl: any;
9
- };
10
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<IArrayBaseProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IArrayBaseProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
- export default _default;
14
- type __VLS_WithTemplateSlots<T, S> = T & {
15
- new (): {
16
- $slots: S;
17
- };
18
- };
@@ -1,18 +0,0 @@
1
- import { IArrayBaseItemProps } from './types';
2
- declare function __VLS_template(): {
3
- attrs: Partial<{}>;
4
- slots: {
5
- default?(_: {}): any;
6
- };
7
- refs: {};
8
- rootEl: any;
9
- };
10
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
11
- declare const __VLS_component: import('vue').DefineComponent<IArrayBaseItemProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<IArrayBaseItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
12
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
13
- export default _default;
14
- type __VLS_WithTemplateSlots<T, S> = T & {
15
- new (): {
16
- $slots: S;
17
- };
18
- };