king-design-analyzer 2.1.9 → 2.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (327) hide show
  1. package/components/actions.json +109 -0
  2. package/components/advancedset.json +128 -0
  3. package/components/affix.json +8 -0
  4. package/components/aksk.json +172 -0
  5. package/components/anchor.json +220 -0
  6. package/components/anchorlink.json +111 -0
  7. package/components/az.json +15 -2
  8. package/components/badge.json +8 -0
  9. package/components/billtypes.json +14 -2
  10. package/components/breadcrumb.json +9 -1
  11. package/components/button.json +192 -0
  12. package/components/buttonlink.json +74 -0
  13. package/components/card.json +14 -4
  14. package/components/cardcol.json +142 -0
  15. package/components/cardcols.json +121 -0
  16. package/components/cardcontent.json +20 -3
  17. package/components/cardtabs.json +172 -0
  18. package/components/carousel.json +7 -0
  19. package/components/cascader.json +576 -368
  20. package/components/checkbox.json +51 -4
  21. package/components/cidrinput.json +140 -0
  22. package/components/code.json +8 -1
  23. package/components/collapse.json +335 -341
  24. package/components/colorpicker.json +217 -0
  25. package/components/configprovider.json +96 -0
  26. package/components/copy.json +7 -0
  27. package/components/copyhover.json +111 -0
  28. package/components/copyrow.json +125 -0
  29. package/components/datepicker.json +656 -524
  30. package/components/description.json +98 -0
  31. package/components/descriptions.json +10 -3
  32. package/components/diagram.json +295 -0
  33. package/components/dialog.json +526 -455
  34. package/components/divider.json +9 -1
  35. package/components/drawer.json +603 -558
  36. package/components/dropdown.json +464 -384
  37. package/components/duration.json +125 -0
  38. package/components/editable.json +66 -0
  39. package/components/ellipsis.json +34 -1
  40. package/components/filtertablefieldsdialog.json +128 -0
  41. package/components/flex.json +152 -0
  42. package/components/form.json +143 -3
  43. package/components/formiteminput.json +214 -0
  44. package/components/formitemspinner.json +213 -0
  45. package/components/formitemswitch.json +185 -0
  46. package/components/formitemtableconfigs.json +210 -0
  47. package/components/grid.json +7 -0
  48. package/components/header.json +165 -0
  49. package/components/icon.json +13 -1
  50. package/components/icontooltip.json +19 -1
  51. package/components/input.json +196 -8
  52. package/components/instancelist.json +194 -0
  53. package/components/instancenum.json +196 -0
  54. package/components/ipinput.json +117 -0
  55. package/components/kspstatus.json +205 -0
  56. package/components/kvcode.json +120 -0
  57. package/components/layoutcontent.json +24 -3
  58. package/components/layoutlistcontent.json +157 -0
  59. package/components/layoutpermissioncontent.json +156 -0
  60. package/components/layoutstandardlist.json +276 -0
  61. package/components/layouttabs.json +168 -0
  62. package/components/lazymount.json +87 -0
  63. package/components/lazyteleport.json +119 -0
  64. package/components/menu.json +11 -3
  65. package/components/notification.json +351 -0
  66. package/components/pagination.json +12 -0
  67. package/components/paginationplus.json +30 -3
  68. package/components/password.json +121 -0
  69. package/components/popover.json +457 -437
  70. package/components/projects.json +129 -0
  71. package/components/protable.json +99 -8
  72. package/components/queuevisualrange.json +110 -0
  73. package/components/radio.json +82 -2
  74. package/components/rate.json +200 -0
  75. package/components/region.json +14 -2
  76. package/components/scrollselect.json +140 -0
  77. package/components/search.json +221 -0
  78. package/components/searchinput.json +132 -0
  79. package/components/searchitems.json +215 -0
  80. package/components/searchselect.json +195 -0
  81. package/components/select.json +749 -666
  82. package/components/sidebar.json +198 -0
  83. package/components/skeleton.json +234 -0
  84. package/components/slider.json +12 -2
  85. package/components/spin.json +10 -2
  86. package/components/spinner.json +419 -429
  87. package/components/split.json +263 -0
  88. package/components/sshkeys.json +138 -0
  89. package/components/status.json +60 -3
  90. package/components/steps.json +7 -0
  91. package/components/switch.json +12 -3
  92. package/components/table.json +24 -2
  93. package/components/tablecolumnid.json +14 -2
  94. package/components/tabs.json +14 -2
  95. package/components/tag.json +8 -5
  96. package/components/timeline.json +215 -0
  97. package/components/timepicker.json +147 -3
  98. package/components/timerange.json +262 -0
  99. package/components/tip.json +27 -0
  100. package/components/tooltip.json +492 -395
  101. package/components/tour.json +418 -372
  102. package/components/transfer.json +79 -8
  103. package/components/tree.json +28 -5
  104. package/components/treeselect.json +612 -475
  105. package/components/upload.json +474 -473
  106. package/components/vdialog.json +309 -0
  107. package/components/vdrawer.json +335 -0
  108. package/components/virtuallist.json +7 -0
  109. package/dist/ast/index.d.mts +65 -2
  110. package/dist/ast/index.d.ts +65 -2
  111. package/dist/ast/index.js +4 -3
  112. package/dist/ast/index.mjs +2 -1
  113. package/dist/chunk-4OTQAQ6J.mjs +341 -0
  114. package/dist/{chunk-F26GUCGG.js → chunk-4WXOYU2N.js} +32 -9
  115. package/dist/chunk-6HOIRUQB.mjs +409 -0
  116. package/dist/chunk-DHLWNT53.js +364 -0
  117. package/dist/{chunk-H2ET6MMM.mjs → chunk-IPJJMPOO.mjs} +155 -66
  118. package/dist/{chunk-WYSRJVX4.js → chunk-JJ6AB4ZH.js} +2 -2
  119. package/dist/{chunk-2W6OCG2S.js → chunk-JNRGUR3O.js} +155 -67
  120. package/dist/chunk-KF5YBEM5.js +143 -0
  121. package/dist/{chunk-OJOHB64C.mjs → chunk-LRTDTFFQ.mjs} +28 -5
  122. package/dist/{chunk-DSWKLUIX.mjs → chunk-NZL6T22V.mjs} +1 -1
  123. package/dist/chunk-QC6VTSA3.mjs +117 -0
  124. package/dist/chunk-V5N65MRP.js +411 -0
  125. package/dist/full/index.d.mts +2 -0
  126. package/dist/full/index.d.ts +2 -0
  127. package/dist/full/index.js +7 -6
  128. package/dist/full/index.mjs +5 -4
  129. package/dist/index.d.mts +1 -0
  130. package/dist/index.d.ts +1 -0
  131. package/dist/index.js +14 -13
  132. package/dist/index.mjs +6 -5
  133. package/dist/metadata/index.d.mts +38 -3
  134. package/dist/metadata/index.d.ts +38 -3
  135. package/dist/metadata/index.js +26 -16
  136. package/dist/metadata/index.mjs +26 -15
  137. package/dist/resolve-BsLBxlBi.d.mts +24 -0
  138. package/dist/resolve-BsLBxlBi.d.ts +24 -0
  139. package/dist/runtime/index.d.mts +2 -0
  140. package/dist/runtime/index.d.ts +2 -0
  141. package/dist/runtime/index.js +4 -4
  142. package/dist/runtime/index.mjs +2 -2
  143. package/dist/shared/index.d.mts +10 -0
  144. package/dist/shared/index.d.ts +10 -0
  145. package/dist/shared/index.js +23 -0
  146. package/dist/shared/index.mjs +2 -0
  147. package/dist/static/index.js +5 -5
  148. package/dist/static/index.mjs +2 -2
  149. package/docs_for_llm/actions.doc.md +87 -0
  150. package/docs_for_llm/advancedset.doc.md +98 -0
  151. package/docs_for_llm/affix.doc.md +20 -7
  152. package/docs_for_llm/aksk.doc.md +111 -0
  153. package/docs_for_llm/anchor.doc.md +155 -0
  154. package/docs_for_llm/anchorlink.doc.md +75 -0
  155. package/docs_for_llm/az.doc.md +17 -11
  156. package/docs_for_llm/badge.doc.md +11 -5
  157. package/docs_for_llm/billtypes.doc.md +17 -11
  158. package/docs_for_llm/breadcrumb.doc.md +80 -4
  159. package/docs_for_llm/button.doc.md +91 -18
  160. package/docs_for_llm/buttonlink.doc.md +64 -0
  161. package/docs_for_llm/card.doc.md +58 -8
  162. package/docs_for_llm/cardcol.doc.md +78 -0
  163. package/docs_for_llm/cardcols.doc.md +84 -0
  164. package/docs_for_llm/cardcontent.doc.md +31 -10
  165. package/docs_for_llm/cardtabs.doc.md +106 -0
  166. package/docs_for_llm/carousel.doc.md +79 -7
  167. package/docs_for_llm/cascader.doc.md +106 -23
  168. package/docs_for_llm/checkbox.doc.md +25 -13
  169. package/docs_for_llm/cidrinput.doc.md +83 -0
  170. package/docs_for_llm/code.doc.md +22 -11
  171. package/docs_for_llm/collapse.doc.md +147 -14
  172. package/docs_for_llm/colorpicker.doc.md +104 -0
  173. package/docs_for_llm/configprovider.doc.md +77 -0
  174. package/docs_for_llm/copy.doc.md +15 -13
  175. package/docs_for_llm/copyhover.doc.md +59 -0
  176. package/docs_for_llm/copyrow.doc.md +80 -0
  177. package/docs_for_llm/datepicker.doc.md +66 -35
  178. package/docs_for_llm/description.doc.md +75 -0
  179. package/docs_for_llm/descriptions.doc.md +122 -10
  180. package/docs_for_llm/diagram.doc.md +343 -0
  181. package/docs_for_llm/dialog.doc.md +97 -77
  182. package/docs_for_llm/divider.doc.md +14 -7
  183. package/docs_for_llm/drawer.doc.md +114 -69
  184. package/docs_for_llm/dropdown.doc.md +290 -22
  185. package/docs_for_llm/duration.doc.md +76 -0
  186. package/docs_for_llm/editable.doc.md +36 -14
  187. package/docs_for_llm/ellipsis.doc.md +10 -5
  188. package/docs_for_llm/filtertablefieldsdialog.doc.md +99 -0
  189. package/docs_for_llm/flex.doc.md +83 -0
  190. package/docs_for_llm/form.doc.md +196 -18
  191. package/docs_for_llm/formiteminput.doc.md +128 -0
  192. package/docs_for_llm/formitemspinner.doc.md +105 -0
  193. package/docs_for_llm/formitemswitch.doc.md +113 -0
  194. package/docs_for_llm/formitemtableconfigs.doc.md +95 -0
  195. package/docs_for_llm/grid.doc.md +78 -5
  196. package/docs_for_llm/header.doc.md +114 -0
  197. package/docs_for_llm/icon.doc.md +12 -8
  198. package/docs_for_llm/icontooltip.doc.md +121 -0
  199. package/docs_for_llm/input.doc.md +199 -41
  200. package/docs_for_llm/instancelist.doc.md +113 -0
  201. package/docs_for_llm/instancenum.doc.md +95 -0
  202. package/docs_for_llm/ipinput.doc.md +77 -0
  203. package/docs_for_llm/kspstatus.doc.md +82 -0
  204. package/docs_for_llm/kvcode.doc.md +76 -0
  205. package/docs_for_llm/layoutcontent.doc.md +54 -17
  206. package/docs_for_llm/layoutlistcontent.doc.md +168 -0
  207. package/docs_for_llm/layoutpermissioncontent.doc.md +93 -0
  208. package/docs_for_llm/layoutstandardlist.doc.md +129 -0
  209. package/docs_for_llm/layouttabs.doc.md +101 -0
  210. package/docs_for_llm/lazymount.doc.md +82 -0
  211. package/docs_for_llm/lazyteleport.doc.md +85 -0
  212. package/docs_for_llm/menu.doc.md +139 -14
  213. package/docs_for_llm/message.doc.md +93 -10
  214. package/docs_for_llm/notification.doc.md +214 -0
  215. package/docs_for_llm/pagination.doc.md +30 -17
  216. package/docs_for_llm/paginationplus.doc.md +31 -10
  217. package/docs_for_llm/password.doc.md +86 -0
  218. package/docs_for_llm/popover.doc.md +24 -55
  219. package/docs_for_llm/progress.doc.md +13 -10
  220. package/docs_for_llm/projects.doc.md +91 -0
  221. package/docs_for_llm/protable.doc.md +98 -15
  222. package/docs_for_llm/queuevisualrange.doc.md +78 -0
  223. package/docs_for_llm/radio.doc.md +23 -8
  224. package/docs_for_llm/rate.doc.md +127 -0
  225. package/docs_for_llm/region.doc.md +25 -13
  226. package/docs_for_llm/scrollselect.doc.md +90 -0
  227. package/docs_for_llm/search.doc.md +120 -0
  228. package/docs_for_llm/searchinput.doc.md +111 -0
  229. package/docs_for_llm/searchitems.doc.md +116 -0
  230. package/docs_for_llm/searchselect.doc.md +126 -0
  231. package/docs_for_llm/select.doc.md +208 -49
  232. package/docs_for_llm/sidebar.doc.md +133 -0
  233. package/docs_for_llm/skeleton.doc.md +152 -0
  234. package/docs_for_llm/slider.doc.md +42 -22
  235. package/docs_for_llm/spin.doc.md +18 -6
  236. package/docs_for_llm/spinner.doc.md +28 -18
  237. package/docs_for_llm/split.doc.md +170 -0
  238. package/docs_for_llm/sshkeys.doc.md +88 -0
  239. package/docs_for_llm/status.doc.md +14 -9
  240. package/docs_for_llm/steps.doc.md +81 -7
  241. package/docs_for_llm/switch.doc.md +32 -16
  242. package/docs_for_llm/table.doc.md +317 -55
  243. package/docs_for_llm/tablecolumnid.doc.md +36 -16
  244. package/docs_for_llm/tabs.doc.md +117 -12
  245. package/docs_for_llm/tag.doc.md +167 -15
  246. package/docs_for_llm/timeline.doc.md +187 -0
  247. package/docs_for_llm/timepicker.doc.md +74 -36
  248. package/docs_for_llm/timerange.doc.md +157 -0
  249. package/docs_for_llm/tip.doc.md +50 -11
  250. package/docs_for_llm/tooltip.doc.md +99 -27
  251. package/docs_for_llm/tour.doc.md +125 -28
  252. package/docs_for_llm/transfer.doc.md +99 -33
  253. package/docs_for_llm/tree.doc.md +129 -24
  254. package/docs_for_llm/treeselect.doc.md +101 -44
  255. package/docs_for_llm/upload.doc.md +63 -32
  256. package/docs_for_llm/useCRUD.doc.md +49 -0
  257. package/docs_for_llm/useCountdown.doc.md +43 -0
  258. package/docs_for_llm/useDetail.doc.md +48 -0
  259. package/docs_for_llm/useDialog.doc.md +46 -0
  260. package/docs_for_llm/useEntity.doc.md +45 -0
  261. package/docs_for_llm/useEventListener.doc.md +44 -0
  262. package/docs_for_llm/useFalseUntilTruthy.doc.md +41 -0
  263. package/docs_for_llm/useGetCopyAuthText.doc.md +35 -0
  264. package/docs_for_llm/useGetUserPermission.doc.md +43 -0
  265. package/docs_for_llm/useGroup.doc.md +48 -0
  266. package/docs_for_llm/useIdEntities.doc.md +48 -0
  267. package/docs_for_llm/useIdEntity.doc.md +103 -0
  268. package/docs_for_llm/useInterval.doc.md +43 -0
  269. package/docs_for_llm/useLayoutStandardList.doc.md +38 -0
  270. package/docs_for_llm/useMessage.doc.md +46 -0
  271. package/docs_for_llm/useModifyCache.doc.md +37 -0
  272. package/docs_for_llm/useOpenDialog.doc.md +41 -0
  273. package/docs_for_llm/usePagination.doc.md +60 -0
  274. package/docs_for_llm/usePersist.doc.md +54 -0
  275. package/docs_for_llm/usePoll.doc.md +41 -0
  276. package/docs_for_llm/useRoutePlus.doc.md +34 -0
  277. package/docs_for_llm/useRouterPlus.doc.md +34 -0
  278. package/docs_for_llm/useSearch.doc.md +68 -0
  279. package/docs_for_llm/useShell.doc.md +43 -0
  280. package/docs_for_llm/useSkip.doc.md +41 -0
  281. package/docs_for_llm/useStorageIdEntity.doc.md +46 -0
  282. package/docs_for_llm/useStore.doc.md +34 -0
  283. package/docs_for_llm/useTable.doc.md +57 -0
  284. package/docs_for_llm/useTableGroup.doc.md +47 -0
  285. package/docs_for_llm/useTableSort.doc.md +40 -0
  286. package/docs_for_llm/useToState.doc.md +112 -0
  287. package/docs_for_llm/useUser.doc.md +38 -0
  288. package/docs_for_llm/useValidForm.doc.md +41 -0
  289. package/docs_for_llm/vdialog.doc.md +154 -0
  290. package/docs_for_llm/vdrawer.doc.md +148 -0
  291. package/docs_for_llm/virtuallist.doc.md +157 -3
  292. package/hooks/useCRUD.json +61 -0
  293. package/hooks/useCountdown.json +49 -0
  294. package/hooks/useDetail.json +67 -0
  295. package/hooks/useDialog.json +49 -0
  296. package/hooks/useEntity.json +61 -0
  297. package/hooks/useEventListener.json +61 -0
  298. package/hooks/useFalseUntilTruthy.json +43 -0
  299. package/hooks/useGetCopyAuthText.json +36 -0
  300. package/hooks/useGetUserPermission.json +55 -0
  301. package/hooks/useGroup.json +49 -0
  302. package/hooks/useIdEntities.json +61 -0
  303. package/hooks/useInterval.json +55 -0
  304. package/hooks/useLayoutStandardList.json +36 -0
  305. package/hooks/useMessage.json +73 -0
  306. package/hooks/useModifyCache.json +36 -0
  307. package/hooks/useOpenDialog.json +43 -0
  308. package/hooks/usePagination.json +49 -0
  309. package/hooks/usePersist.json +61 -0
  310. package/hooks/usePoll.json +43 -0
  311. package/hooks/useRoutePlus.json +36 -0
  312. package/hooks/useRouterPlus.json +36 -0
  313. package/hooks/useSearch.json +56 -0
  314. package/hooks/useShell.json +49 -0
  315. package/hooks/useSkip.json +43 -0
  316. package/hooks/useStorageIdEntity.json +67 -0
  317. package/hooks/useStore.json +36 -0
  318. package/hooks/useTable.json +49 -0
  319. package/hooks/useTableGroup.json +43 -0
  320. package/hooks/useTableSort.json +43 -0
  321. package/hooks/useUser.json +36 -0
  322. package/hooks/useValidForm.json +43 -0
  323. package/package.json +14 -8
  324. package/dist/chunk-D3Y6FGWA.js +0 -153
  325. package/dist/chunk-HPAUCD5I.js +0 -156
  326. package/dist/chunk-L4DS3EXI.mjs +0 -133
  327. package/dist/chunk-NZ6TLWMD.mjs +0 -151
@@ -0,0 +1,411 @@
1
+ 'use strict';
2
+
3
+ var chunkDHLWNT53_js = require('./chunk-DHLWNT53.js');
4
+
5
+ // src/runtime/index.ts
6
+ var scopeIdCounter = 0;
7
+ var ENVIRONMENT_SENSITIVE_IDENTIFIERS = [
8
+ "window",
9
+ "document",
10
+ "location",
11
+ "navigator"
12
+ ];
13
+ var ENVIRONMENT_SENSITIVE_CALLS = [
14
+ "getCurrentInstance",
15
+ "useRouter",
16
+ "useRoute",
17
+ "onBeforeRouteLeave",
18
+ "onBeforeRouteUpdate"
19
+ ];
20
+ function createMockProxy(path) {
21
+ const target = function mockTarget() {
22
+ };
23
+ return new Proxy(target, {
24
+ get: (_target, prop, receiver) => {
25
+ const existing = Reflect.get(target, prop, receiver);
26
+ if (existing !== void 0) return existing;
27
+ if (prop === Symbol.toPrimitive) return () => 0;
28
+ if (prop === "then") return void 0;
29
+ if (prop === "toString") return () => `[MockProxy ${path}]`;
30
+ if (prop === "valueOf") return () => 0;
31
+ if (prop === "__path") return path;
32
+ return createMockProxy(`${path}.${String(prop)}`);
33
+ },
34
+ apply: () => createMockProxy(`${path}()`),
35
+ construct: () => createMockProxy(`new ${path}()`),
36
+ has: (_target, prop) => Reflect.has(target, prop),
37
+ set: (_target, prop, value, receiver) => Reflect.set(target, prop, value, receiver)
38
+ });
39
+ }
40
+ function createWhitelistedModule(source, context) {
41
+ if (source === "vue" || source.startsWith("@vue/")) {
42
+ return context;
43
+ }
44
+ if (source === "vue-router") {
45
+ return context.__mockVueRouter;
46
+ }
47
+ return new Proxy({}, {
48
+ get: (_target, prop) => {
49
+ if (prop === "default") return createMockProxy(source);
50
+ if (typeof prop === "string" && prop in context) {
51
+ return context[prop];
52
+ }
53
+ return createMockProxy(`${source}.${String(prop)}`);
54
+ }
55
+ });
56
+ }
57
+ function createMockElement(path) {
58
+ const element = createMockProxy(path);
59
+ element.style = {};
60
+ element.classList = {
61
+ add: () => {
62
+ },
63
+ remove: () => {
64
+ },
65
+ contains: () => false
66
+ };
67
+ element.dataset = {};
68
+ element.getBoundingClientRect = () => ({
69
+ x: 0,
70
+ y: 0,
71
+ top: 0,
72
+ left: 0,
73
+ right: 0,
74
+ bottom: 0,
75
+ width: 0,
76
+ height: 0
77
+ });
78
+ return element;
79
+ }
80
+ var MOCK_LOCATION = {
81
+ href: "https://mock.local/",
82
+ pathname: "/",
83
+ search: "",
84
+ hash: "",
85
+ origin: "https://mock.local",
86
+ host: "mock.local",
87
+ hostname: "mock.local",
88
+ port: "",
89
+ protocol: "https:",
90
+ assign: () => {
91
+ },
92
+ replace: () => {
93
+ },
94
+ reload: () => {
95
+ }
96
+ };
97
+ var MOCK_NAVIGATOR = {
98
+ userAgent: "king-design-analyzer-runtime-mock",
99
+ language: "zh-CN",
100
+ languages: ["zh-CN"],
101
+ clipboard: {
102
+ writeText: async () => {
103
+ },
104
+ readText: async () => ""
105
+ }
106
+ };
107
+ var MOCK_DOCUMENT = {
108
+ body: createMockElement("document.body"),
109
+ head: createMockElement("document.head"),
110
+ documentElement: createMockElement("document.documentElement"),
111
+ createElement: (_tag) => createMockElement("document.createElement()"),
112
+ createTextNode: (_text) => createMockElement("document.createTextNode()"),
113
+ getElementById: (_id) => createMockElement("document.getElementById()"),
114
+ querySelector: (_selector) => createMockElement("document.querySelector()"),
115
+ querySelectorAll: () => [],
116
+ addEventListener: () => {
117
+ },
118
+ removeEventListener: () => {
119
+ }
120
+ };
121
+ var MOCK_WINDOW = {
122
+ document: MOCK_DOCUMENT,
123
+ navigator: MOCK_NAVIGATOR,
124
+ location: MOCK_LOCATION,
125
+ innerWidth: 1440,
126
+ innerHeight: 900,
127
+ addEventListener: () => {
128
+ },
129
+ removeEventListener: () => {
130
+ },
131
+ matchMedia: () => ({
132
+ matches: false,
133
+ media: "",
134
+ onchange: null,
135
+ addListener: () => {
136
+ },
137
+ removeListener: () => {
138
+ },
139
+ addEventListener: () => {
140
+ },
141
+ removeEventListener: () => {
142
+ },
143
+ dispatchEvent: () => false
144
+ }),
145
+ requestAnimationFrame: (cb) => {
146
+ cb(0);
147
+ return 0;
148
+ },
149
+ cancelAnimationFrame: () => {
150
+ },
151
+ setTimeout,
152
+ clearTimeout,
153
+ setInterval,
154
+ clearInterval,
155
+ open: () => createMockProxy("window.open()")
156
+ };
157
+ var MOCK_ROUTE = {
158
+ path: "/",
159
+ name: void 0,
160
+ fullPath: "/",
161
+ params: {},
162
+ query: {},
163
+ hash: "",
164
+ meta: {},
165
+ matched: []
166
+ };
167
+ var MOCK_ROUTER = {
168
+ currentRoute: { value: MOCK_ROUTE },
169
+ push: async () => void 0,
170
+ replace: async () => void 0,
171
+ back: () => {
172
+ },
173
+ go: () => {
174
+ },
175
+ forward: () => {
176
+ },
177
+ beforeEach: () => () => {
178
+ },
179
+ afterEach: () => () => {
180
+ }
181
+ };
182
+ function detectEnvironmentSensitivity(code, strippedImports = []) {
183
+ const warnings = [];
184
+ let status = "passed";
185
+ for (const identifier of ENVIRONMENT_SENSITIVE_IDENTIFIERS) {
186
+ if (new RegExp(`\\b${identifier}\\b`).test(code)) {
187
+ warnings.push(`\u68C0\u6D4B\u5230\u6D4F\u89C8\u5668\u73AF\u5883\u5BF9\u8C61 ${identifier}\uFF0C\u8FD0\u884C\u65F6\u7ED3\u679C\u4F9D\u8D56\u5BBF\u4E3B\u73AF\u5883 mock\u3002`);
188
+ status = "env_dependent";
189
+ }
190
+ }
191
+ for (const callee of ENVIRONMENT_SENSITIVE_CALLS) {
192
+ if (new RegExp(`\\b${callee}\\s*\\(`).test(code)) {
193
+ warnings.push(`\u68C0\u6D4B\u5230\u73AF\u5883\u654F\u611F\u8C03\u7528 ${callee}()\uFF0C\u8FD0\u884C\u65F6\u7ED3\u679C\u4F9D\u8D56 mock\u3002`);
194
+ status = "env_dependent";
195
+ }
196
+ }
197
+ const skippedImports = strippedImports.filter(
198
+ (item) => item.reason === "unknown" && !item.source.startsWith(".")
199
+ );
200
+ if (skippedImports.length > 0) {
201
+ status = "runtime_skipped";
202
+ warnings.push(
203
+ `\u68C0\u6D4B\u5230\u7B2C\u4E09\u65B9\u5BFC\u5165 ${skippedImports.map((item) => item.source).join(", ")}\uFF0C\u5DF2\u4F7F\u7528\u6A21\u5757 mock\uFF0C\u8FD0\u884C\u65F6\u7ED3\u679C\u4EC5\u4F9B\u53C2\u8003\u3002`
204
+ );
205
+ }
206
+ return { status, warnings };
207
+ }
208
+ function isEnvironmentRelatedRuntimeError(message) {
209
+ return /(window|document|location|navigator|getCurrentInstance|useRouter|useRoute|route|router)/i.test(message);
210
+ }
211
+ var MOCK_VUE_CONTEXT = {
212
+ // Reactivity
213
+ ref: (v) => ({ value: v }),
214
+ reactive: (v) => v,
215
+ computed: (fn) => ({ value: typeof fn === "function" ? fn() : fn }),
216
+ readonly: (v) => v,
217
+ shallowRef: (v) => ({ value: v }),
218
+ shallowReactive: (v) => v,
219
+ toRef: () => ({ value: void 0 }),
220
+ toRefs: (obj) => Object.fromEntries(
221
+ Object.keys(obj || {}).map((k) => [k, { value: obj[k] }])
222
+ ),
223
+ toRaw: (v) => v,
224
+ markRaw: (v) => v,
225
+ isRef: () => false,
226
+ isReactive: () => false,
227
+ isReadonly: () => false,
228
+ isProxy: () => false,
229
+ triggerRef: () => {
230
+ },
231
+ customRef: (factory) => factory(() => {
232
+ }, () => {
233
+ }),
234
+ // Lifecycle
235
+ onMounted: () => {
236
+ },
237
+ onUnmounted: () => {
238
+ },
239
+ onBeforeMount: () => {
240
+ },
241
+ onBeforeUnmount: () => {
242
+ },
243
+ onUpdated: () => {
244
+ },
245
+ onBeforeUpdate: () => {
246
+ },
247
+ onActivated: () => {
248
+ },
249
+ onDeactivated: () => {
250
+ },
251
+ onErrorCaptured: () => {
252
+ },
253
+ // Watchers
254
+ watch: () => () => {
255
+ },
256
+ watchEffect: () => () => {
257
+ },
258
+ watchPostEffect: () => () => {
259
+ },
260
+ watchSyncEffect: () => () => {
261
+ },
262
+ // Composition API
263
+ defineProps: () => ({}),
264
+ defineEmits: () => () => {
265
+ },
266
+ defineExpose: () => {
267
+ },
268
+ defineOptions: () => {
269
+ },
270
+ defineSlots: () => ({}),
271
+ defineModel: () => ({ value: void 0 }),
272
+ withDefaults: (_props, defaults) => defaults,
273
+ useSlots: () => ({}),
274
+ useAttrs: () => ({}),
275
+ // Dependency Injection
276
+ inject: () => void 0,
277
+ provide: () => {
278
+ },
279
+ // Utilities
280
+ nextTick: () => Promise.resolve(),
281
+ getCurrentInstance: () => ({
282
+ proxy: createMockProxy("instance.proxy"),
283
+ appContext: createMockProxy("instance.appContext"),
284
+ emit: () => {
285
+ },
286
+ attrs: {},
287
+ slots: {}
288
+ }),
289
+ h: () => ({}),
290
+ createVNode: () => ({}),
291
+ resolveComponent: () => ({}),
292
+ // Browser-ish globals
293
+ window: MOCK_WINDOW,
294
+ document: MOCK_DOCUMENT,
295
+ location: MOCK_LOCATION,
296
+ navigator: MOCK_NAVIGATOR,
297
+ self: MOCK_WINDOW,
298
+ globalThis: MOCK_WINDOW,
299
+ // vue-router
300
+ useRouter: () => MOCK_ROUTER,
301
+ useRoute: () => MOCK_ROUTE,
302
+ onBeforeRouteLeave: () => {
303
+ },
304
+ onBeforeRouteUpdate: () => {
305
+ },
306
+ RouterLink: createMockProxy("vue-router.RouterLink"),
307
+ RouterView: createMockProxy("vue-router.RouterView"),
308
+ __mockVueRouter: {
309
+ useRouter: () => MOCK_ROUTER,
310
+ useRoute: () => MOCK_ROUTE,
311
+ onBeforeRouteLeave: () => {
312
+ },
313
+ onBeforeRouteUpdate: () => {
314
+ },
315
+ RouterLink: createMockProxy("vue-router.RouterLink"),
316
+ RouterView: createMockProxy("vue-router.RouterView"),
317
+ createRouter: () => createMockProxy("vue-router.createRouter()"),
318
+ createWebHistory: () => createMockProxy("vue-router.createWebHistory()"),
319
+ createWebHashHistory: () => createMockProxy("vue-router.createWebHashHistory()")
320
+ },
321
+ // =========================================================================
322
+ // @ksyun-internal/versatile Hooks
323
+ // =========================================================================
324
+ useToState: (_props, _key, _emit, defaultValue) => ({ value: defaultValue ?? void 0 }),
325
+ useIdEntity: () => ({ value: void 0 }),
326
+ // =========================================================================
327
+ // Module Mocking
328
+ // =========================================================================
329
+ __mockModule: (modulePath) => createMockProxy(modulePath),
330
+ __getWhitelistedModule: (source) => createWhitelistedModule(source, MOCK_VUE_CONTEXT)
331
+ };
332
+ function validateRuntimePrecheck(code) {
333
+ const scopeId = `runtime-${Date.now()}-${++scopeIdCounter}`;
334
+ const { script, bindings, strippedImports, error } = chunkDHLWNT53_js.compileSFC(code, scopeId);
335
+ if (error) {
336
+ return {
337
+ name: "\u8FD0\u884C\u65F6\u9884\u68C0\u67E5",
338
+ passed: false,
339
+ status: "failed",
340
+ errors: [error]
341
+ };
342
+ }
343
+ const sensitivity = detectEnvironmentSensitivity(code, strippedImports);
344
+ try {
345
+ const funcBody = `
346
+ "use strict";
347
+ ${script}
348
+ return { ${bindings.join(", ")} };
349
+ `;
350
+ const keys = Object.keys(MOCK_VUE_CONTEXT);
351
+ const values = Object.values(MOCK_VUE_CONTEXT);
352
+ const runner = new Function(...keys, funcBody);
353
+ const result = runner(...values);
354
+ const missingBindings = bindings.filter((binding) => !(binding in result));
355
+ if (missingBindings.length > 0) {
356
+ return {
357
+ name: "\u8FD0\u884C\u65F6\u9884\u68C0\u67E5",
358
+ passed: false,
359
+ status: "failed",
360
+ errors: missingBindings.map((b) => `\u53D8\u91CF ${b} \u672A\u6B63\u786E\u5BFC\u51FA`),
361
+ warnings: sensitivity.warnings.length > 0 ? sensitivity.warnings : void 0
362
+ };
363
+ }
364
+ return {
365
+ name: "\u8FD0\u884C\u65F6\u9884\u68C0\u67E5",
366
+ passed: true,
367
+ status: sensitivity.status,
368
+ errors: [],
369
+ warnings: sensitivity.warnings.length > 0 ? sensitivity.warnings : void 0
370
+ };
371
+ } catch (e) {
372
+ const errorMessage = e.message || String(e);
373
+ const errorLocation = e.stack?.split("\n")[1]?.trim() || "";
374
+ if (sensitivity.status === "runtime_skipped") {
375
+ return {
376
+ name: "\u8FD0\u884C\u65F6\u9884\u68C0\u67E5",
377
+ passed: true,
378
+ status: "runtime_skipped",
379
+ errors: [],
380
+ warnings: [
381
+ ...sensitivity.warnings,
382
+ `\u8FD0\u884C\u65F6\u6267\u884C\u5DF2\u8DF3\u8FC7\u4E25\u683C\u5224\u5B9A: ${errorMessage}`
383
+ ]
384
+ };
385
+ }
386
+ if (sensitivity.status === "env_dependent" && isEnvironmentRelatedRuntimeError(errorMessage)) {
387
+ return {
388
+ name: "\u8FD0\u884C\u65F6\u9884\u68C0\u67E5",
389
+ passed: true,
390
+ status: "env_dependent",
391
+ errors: [],
392
+ warnings: [
393
+ ...sensitivity.warnings,
394
+ `\u8FD0\u884C\u65F6\u6267\u884C\u53D7\u5BBF\u4E3B\u73AF\u5883\u5F71\u54CD: ${errorMessage}`
395
+ ]
396
+ };
397
+ }
398
+ return {
399
+ name: "\u8FD0\u884C\u65F6\u9884\u68C0\u67E5",
400
+ passed: false,
401
+ status: "failed",
402
+ errors: [
403
+ `JavaScript \u6267\u884C\u9519\u8BEF: ${errorMessage}`,
404
+ ...errorLocation ? [`\u4F4D\u7F6E: ${errorLocation}`] : []
405
+ ],
406
+ warnings: sensitivity.warnings.length > 0 ? sensitivity.warnings : void 0
407
+ };
408
+ }
409
+ }
410
+
411
+ exports.validateRuntimePrecheck = validateRuntimePrecheck;
@@ -2,6 +2,8 @@ interface ValidationLayer {
2
2
  name: string;
3
3
  passed: boolean;
4
4
  errors: string[];
5
+ warnings?: string[];
6
+ status?: 'passed' | 'failed' | 'env_dependent' | 'runtime_skipped';
5
7
  }
6
8
  interface UnifiedValidationResult {
7
9
  passed: boolean;
@@ -2,6 +2,8 @@ interface ValidationLayer {
2
2
  name: string;
3
3
  passed: boolean;
4
4
  errors: string[];
5
+ warnings?: string[];
6
+ status?: 'passed' | 'failed' | 'env_dependent' | 'runtime_skipped';
5
7
  }
6
8
  interface UnifiedValidationResult {
7
9
  passed: boolean;
@@ -1,18 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var chunkF26GUCGG_js = require('../chunk-F26GUCGG.js');
4
- require('../chunk-2W6OCG2S.js');
5
- require('../chunk-D3Y6FGWA.js');
6
- require('../chunk-HPAUCD5I.js');
3
+ var chunk4WXOYU2N_js = require('../chunk-4WXOYU2N.js');
4
+ require('../chunk-JNRGUR3O.js');
5
+ require('../chunk-V5N65MRP.js');
6
+ require('../chunk-DHLWNT53.js');
7
+ require('../chunk-KF5YBEM5.js');
7
8
  require('../chunk-JSBRDJBE.js');
8
9
 
9
10
 
10
11
 
11
12
  Object.defineProperty(exports, "validateCode", {
12
13
  enumerable: true,
13
- get: function () { return chunkF26GUCGG_js.validateCode; }
14
+ get: function () { return chunk4WXOYU2N_js.validateCode; }
14
15
  });
15
16
  Object.defineProperty(exports, "validateCodeSync", {
16
17
  enumerable: true,
17
- get: function () { return chunkF26GUCGG_js.validateCodeSync; }
18
+ get: function () { return chunk4WXOYU2N_js.validateCodeSync; }
18
19
  });
@@ -1,5 +1,6 @@
1
- export { validateCode, validateCodeSync } from '../chunk-OJOHB64C.mjs';
2
- import '../chunk-H2ET6MMM.mjs';
3
- import '../chunk-NZ6TLWMD.mjs';
4
- import '../chunk-L4DS3EXI.mjs';
1
+ export { validateCode, validateCodeSync } from '../chunk-LRTDTFFQ.mjs';
2
+ import '../chunk-IPJJMPOO.mjs';
3
+ import '../chunk-6HOIRUQB.mjs';
4
+ import '../chunk-4OTQAQ6J.mjs';
5
+ import '../chunk-QC6VTSA3.mjs';
5
6
  import '../chunk-UJCSKKID.mjs';
package/dist/index.d.mts CHANGED
@@ -3,3 +3,4 @@ export { ComponentEvent, ComponentMetadata, ComponentProp, ComponentSlot, Mistak
3
3
  export { ValidationLayer as RuntimeValidationLayer, validateRuntimePrecheck } from './runtime/index.mjs';
4
4
  export { UnifiedValidationResult, ValidationLayer, validateCode, validateCodeSync } from './full/index.mjs';
5
5
  export { C as CompilationResult, c as compileSFC, s as scopeStyles } from './sfcCompiler-Co_Km3LU.mjs';
6
+ import './resolve-BsLBxlBi.mjs';
package/dist/index.d.ts CHANGED
@@ -3,3 +3,4 @@ export { ComponentEvent, ComponentMetadata, ComponentProp, ComponentSlot, Mistak
3
3
  export { ValidationLayer as RuntimeValidationLayer, validateRuntimePrecheck } from './runtime/index.js';
4
4
  export { UnifiedValidationResult, ValidationLayer, validateCode, validateCodeSync } from './full/index.js';
5
5
  export { C as CompilationResult, c as compileSFC, s as scopeStyles } from './sfcCompiler-Co_Km3LU.js';
6
+ import './resolve-BsLBxlBi.js';
package/dist/index.js CHANGED
@@ -1,44 +1,45 @@
1
1
  'use strict';
2
2
 
3
- var chunkWYSRJVX4_js = require('./chunk-WYSRJVX4.js');
3
+ var chunkJJ6AB4ZH_js = require('./chunk-JJ6AB4ZH.js');
4
4
  require('./chunk-YTEYDSDW.js');
5
- var chunkF26GUCGG_js = require('./chunk-F26GUCGG.js');
6
- var chunk2W6OCG2S_js = require('./chunk-2W6OCG2S.js');
7
- var chunkD3Y6FGWA_js = require('./chunk-D3Y6FGWA.js');
8
- var chunkHPAUCD5I_js = require('./chunk-HPAUCD5I.js');
5
+ var chunk4WXOYU2N_js = require('./chunk-4WXOYU2N.js');
6
+ var chunkJNRGUR3O_js = require('./chunk-JNRGUR3O.js');
7
+ var chunkV5N65MRP_js = require('./chunk-V5N65MRP.js');
8
+ var chunkDHLWNT53_js = require('./chunk-DHLWNT53.js');
9
+ require('./chunk-KF5YBEM5.js');
9
10
  require('./chunk-JSBRDJBE.js');
10
11
 
11
12
 
12
13
 
13
14
  Object.defineProperty(exports, "validateCompilation", {
14
15
  enumerable: true,
15
- get: function () { return chunkWYSRJVX4_js.validateCompilation; }
16
+ get: function () { return chunkJJ6AB4ZH_js.validateCompilation; }
16
17
  });
17
18
  Object.defineProperty(exports, "validateCode", {
18
19
  enumerable: true,
19
- get: function () { return chunkF26GUCGG_js.validateCode; }
20
+ get: function () { return chunk4WXOYU2N_js.validateCode; }
20
21
  });
21
22
  Object.defineProperty(exports, "validateCodeSync", {
22
23
  enumerable: true,
23
- get: function () { return chunkF26GUCGG_js.validateCodeSync; }
24
+ get: function () { return chunk4WXOYU2N_js.validateCodeSync; }
24
25
  });
25
26
  Object.defineProperty(exports, "analyzeCodeWithAST", {
26
27
  enumerable: true,
27
- get: function () { return chunk2W6OCG2S_js.analyzeCodeWithAST; }
28
+ get: function () { return chunkJNRGUR3O_js.analyzeCodeWithAST; }
28
29
  });
29
30
  Object.defineProperty(exports, "componentRegistry", {
30
31
  enumerable: true,
31
- get: function () { return chunk2W6OCG2S_js.componentRegistry; }
32
+ get: function () { return chunkJNRGUR3O_js.componentRegistry; }
32
33
  });
33
34
  Object.defineProperty(exports, "validateRuntimePrecheck", {
34
35
  enumerable: true,
35
- get: function () { return chunkD3Y6FGWA_js.validateRuntimePrecheck; }
36
+ get: function () { return chunkV5N65MRP_js.validateRuntimePrecheck; }
36
37
  });
37
38
  Object.defineProperty(exports, "compileSFC", {
38
39
  enumerable: true,
39
- get: function () { return chunkHPAUCD5I_js.compileSFC; }
40
+ get: function () { return chunkDHLWNT53_js.compileSFC; }
40
41
  });
41
42
  Object.defineProperty(exports, "scopeStyles", {
42
43
  enumerable: true,
43
- get: function () { return chunkHPAUCD5I_js.scopeStyles; }
44
+ get: function () { return chunkDHLWNT53_js.scopeStyles; }
44
45
  });
package/dist/index.mjs CHANGED
@@ -1,7 +1,8 @@
1
- export { validateCompilation } from './chunk-DSWKLUIX.mjs';
1
+ export { validateCompilation } from './chunk-NZL6T22V.mjs';
2
2
  import './chunk-5H7N2A5X.mjs';
3
- export { validateCode, validateCodeSync } from './chunk-OJOHB64C.mjs';
4
- export { analyzeCodeWithAST, componentRegistry } from './chunk-H2ET6MMM.mjs';
5
- export { validateRuntimePrecheck } from './chunk-NZ6TLWMD.mjs';
6
- export { compileSFC, scopeStyles } from './chunk-L4DS3EXI.mjs';
3
+ export { validateCode, validateCodeSync } from './chunk-LRTDTFFQ.mjs';
4
+ export { analyzeCodeWithAST, componentRegistry } from './chunk-IPJJMPOO.mjs';
5
+ export { validateRuntimePrecheck } from './chunk-6HOIRUQB.mjs';
6
+ export { compileSFC, scopeStyles } from './chunk-4OTQAQ6J.mjs';
7
+ import './chunk-QC6VTSA3.mjs';
7
8
  import './chunk-UJCSKKID.mjs';
@@ -1,7 +1,10 @@
1
+ import { C as ComponentInheritance } from '../resolve-BsLBxlBi.mjs';
2
+
1
3
  /**
2
4
  * Components 元数据模块入口
3
5
  * 提供对 components 目录中 JSON 元数据的访问
4
6
  */
7
+
5
8
  /**
6
9
  * 组件元数据类型定义
7
10
  */
@@ -15,11 +18,13 @@ interface ComponentProp {
15
18
  required?: boolean;
16
19
  default?: string;
17
20
  usageExample?: string;
21
+ tags?: string[];
18
22
  }
19
23
  interface ComponentEvent {
20
24
  name: string;
21
25
  vueEventName?: string;
22
26
  description: string;
27
+ params?: ComponentActionParam[];
23
28
  payload?: {
24
29
  name: string;
25
30
  type: string;
@@ -27,11 +32,40 @@ interface ComponentEvent {
27
32
  }[];
28
33
  usageExample?: string;
29
34
  }
35
+ interface ComponentActionParam {
36
+ name: string;
37
+ type: string;
38
+ description: string;
39
+ optional?: boolean;
40
+ default?: string;
41
+ }
42
+ interface ComponentMethod {
43
+ name: string;
44
+ description: string;
45
+ params?: ComponentActionParam[];
46
+ returnType?: string;
47
+ usageExample?: string;
48
+ }
30
49
  interface ComponentSlot {
31
50
  name: string;
32
51
  description: string;
33
52
  vueTemplate?: string;
34
53
  usageExample?: string;
54
+ bindingType?: 'array' | 'object' | 'single' | 'none';
55
+ slotProps?: {
56
+ name: string;
57
+ type?: string;
58
+ description?: string;
59
+ destructuringExample?: string;
60
+ }[];
61
+ }
62
+ interface ComponentSubComponent {
63
+ name: string;
64
+ description: string;
65
+ props?: ComponentProp[];
66
+ events?: ComponentEvent[];
67
+ slots?: ComponentSlot[];
68
+ methods?: ComponentMethod[];
35
69
  }
36
70
  interface ComponentMetadata {
37
71
  id: string;
@@ -43,13 +77,14 @@ interface ComponentMetadata {
43
77
  props: ComponentProp[];
44
78
  events: ComponentEvent[];
45
79
  slots: ComponentSlot[];
46
- methods?: any[];
80
+ methods?: ComponentMethod[];
47
81
  examples?: any[];
48
- subComponents?: any[];
82
+ subComponents?: ComponentSubComponent[];
49
83
  commonMistakes?: any[];
50
84
  searchKeywords?: string[];
51
85
  useCases?: string[];
52
86
  relatedComponents?: string[];
87
+ inherits?: ComponentInheritance[];
53
88
  }
54
89
  /**
55
90
  * 获取所有可用的组件名称列表
@@ -74,4 +109,4 @@ declare function getComponentsDir(): string;
74
109
  */
75
110
  declare function getComponentPath(componentName: string): string;
76
111
 
77
- export { type ComponentEvent, type ComponentMetadata, type ComponentProp, type ComponentSlot, getAllComponentsMetadata, getComponentMetadata, getComponentPath, getComponentsDir, getComponentsList };
112
+ export { type ComponentActionParam, type ComponentEvent, type ComponentMetadata, type ComponentMethod, type ComponentProp, type ComponentSlot, type ComponentSubComponent, getAllComponentsMetadata, getComponentMetadata, getComponentPath, getComponentsDir, getComponentsList };