king-design-analyzer 2.2.0 → 2.2.2

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 (154) hide show
  1. package/components/actions.json +8 -0
  2. package/components/advancedset.json +1 -0
  3. package/components/affix.json +1 -0
  4. package/components/anchor.json +220 -0
  5. package/components/anchorlink.json +111 -0
  6. package/components/badge.json +1 -0
  7. package/components/breadcrumb.json +2 -1
  8. package/components/button.json +1 -0
  9. package/components/buttonlink.json +1 -0
  10. package/components/card.json +6 -3
  11. package/components/cardcontent.json +5 -0
  12. package/components/cascader.json +56 -0
  13. package/components/collapse.json +335 -348
  14. package/components/configprovider.json +96 -0
  15. package/components/copyrow.json +1 -0
  16. package/components/descriptions.json +10 -3
  17. package/components/diagram.json +295 -0
  18. package/components/dialog.json +4 -0
  19. package/components/divider.json +1 -0
  20. package/components/drawer.json +32 -0
  21. package/components/dropdown.json +13 -4
  22. package/components/flex.json +1 -0
  23. package/components/form.json +12 -3
  24. package/components/header.json +4 -0
  25. package/components/input.json +8 -4
  26. package/components/layoutcontent.json +9 -0
  27. package/components/layoutlistcontent.json +9 -0
  28. package/components/layoutpermissioncontent.json +1 -0
  29. package/components/layoutstandardlist.json +1 -0
  30. package/components/lazymount.json +1 -0
  31. package/components/lazyteleport.json +1 -0
  32. package/components/menu.json +4 -3
  33. package/components/notification.json +351 -0
  34. package/components/popover.json +23 -0
  35. package/components/protable.json +2 -0
  36. package/components/rate.json +1 -0
  37. package/components/scrollselect.json +140 -0
  38. package/components/select.json +72 -0
  39. package/components/skeleton.json +1 -0
  40. package/components/slider.json +12 -2
  41. package/components/spin.json +2 -1
  42. package/components/spinner.json +422 -428
  43. package/components/split.json +3 -0
  44. package/components/switch.json +4 -2
  45. package/components/table.json +6 -1
  46. package/components/tabs.json +2 -2
  47. package/components/tag.json +8 -5
  48. package/components/timeline.json +3 -1
  49. package/components/tip.json +20 -0
  50. package/components/tooltip.json +8 -0
  51. package/components/tour.json +16 -0
  52. package/components/transfer.json +52 -5
  53. package/components/tree.json +22 -1
  54. package/components/treeselect.json +56 -0
  55. package/components/upload.json +16 -0
  56. package/components/vdialog.json +1 -0
  57. package/components/vdrawer.json +4 -0
  58. package/components/virtuallist.json +9 -0
  59. package/dist/ast/index.d.mts +30 -1
  60. package/dist/ast/index.d.ts +30 -1
  61. package/dist/ast/index.js +3 -3
  62. package/dist/ast/index.mjs +1 -1
  63. package/dist/{chunk-BI5TIQID.mjs → chunk-4OTQAQ6J.mjs} +13 -2
  64. package/dist/chunk-6HOIRUQB.mjs +409 -0
  65. package/dist/{chunk-XGPHQHLR.mjs → chunk-BSCASJTV.mjs} +27 -4
  66. package/dist/{chunk-CR3GC4H3.js → chunk-DHLWNT53.js} +13 -2
  67. package/dist/{chunk-CJGGFVQJ.js → chunk-HARQRI4F.js} +31 -8
  68. package/dist/{chunk-TA3SV4SP.js → chunk-JJ6AB4ZH.js} +2 -2
  69. package/dist/{chunk-3LYQ5XFM.mjs → chunk-NZL6T22V.mjs} +1 -1
  70. package/dist/chunk-V5N65MRP.js +411 -0
  71. package/dist/{chunk-SZYVGYKK.js → chunk-XPHDD6XR.js} +113 -35
  72. package/dist/{chunk-KMIDURUR.mjs → chunk-YRGYDK2I.mjs} +113 -35
  73. package/dist/full/index.d.mts +2 -0
  74. package/dist/full/index.d.ts +2 -0
  75. package/dist/full/index.js +6 -6
  76. package/dist/full/index.mjs +4 -4
  77. package/dist/index.js +13 -13
  78. package/dist/index.mjs +5 -5
  79. package/dist/metadata/index.d.mts +17 -2
  80. package/dist/metadata/index.d.ts +17 -2
  81. package/dist/runtime/index.d.mts +2 -0
  82. package/dist/runtime/index.d.ts +2 -0
  83. package/dist/runtime/index.js +4 -4
  84. package/dist/runtime/index.mjs +2 -2
  85. package/dist/static/index.js +5 -5
  86. package/dist/static/index.mjs +2 -2
  87. package/docs_for_llm/actions.doc.md +11 -1
  88. package/docs_for_llm/advancedset.doc.md +10 -1
  89. package/docs_for_llm/affix.doc.md +5 -0
  90. package/docs_for_llm/anchor.doc.md +155 -0
  91. package/docs_for_llm/anchorlink.doc.md +75 -0
  92. package/docs_for_llm/badge.doc.md +5 -0
  93. package/docs_for_llm/breadcrumb.doc.md +74 -1
  94. package/docs_for_llm/button.doc.md +57 -0
  95. package/docs_for_llm/buttonlink.doc.md +10 -1
  96. package/docs_for_llm/card.doc.md +50 -3
  97. package/docs_for_llm/cardcontent.doc.md +21 -0
  98. package/docs_for_llm/carousel.doc.md +71 -0
  99. package/docs_for_llm/cascader.doc.md +62 -0
  100. package/docs_for_llm/collapse.doc.md +138 -8
  101. package/docs_for_llm/configprovider.doc.md +77 -0
  102. package/docs_for_llm/copyrow.doc.md +10 -1
  103. package/docs_for_llm/datepicker.doc.md +19 -0
  104. package/docs_for_llm/descriptions.doc.md +113 -4
  105. package/docs_for_llm/diagram.doc.md +343 -0
  106. package/docs_for_llm/dialog.doc.md +49 -0
  107. package/docs_for_llm/divider.doc.md +5 -0
  108. package/docs_for_llm/drawer.doc.md +86 -0
  109. package/docs_for_llm/dropdown.doc.md +257 -3
  110. package/docs_for_llm/flex.doc.md +10 -1
  111. package/docs_for_llm/form.doc.md +163 -4
  112. package/docs_for_llm/formitemspinner.doc.md +1 -1
  113. package/docs_for_llm/grid.doc.md +71 -0
  114. package/docs_for_llm/header.doc.md +33 -4
  115. package/docs_for_llm/input.doc.md +109 -2
  116. package/docs_for_llm/layoutcontent.doc.md +37 -0
  117. package/docs_for_llm/layoutlistcontent.doc.md +82 -9
  118. package/docs_for_llm/layoutpermissioncontent.doc.md +10 -1
  119. package/docs_for_llm/layoutstandardlist.doc.md +10 -1
  120. package/docs_for_llm/lazymount.doc.md +10 -1
  121. package/docs_for_llm/lazyteleport.doc.md +10 -1
  122. package/docs_for_llm/menu.doc.md +125 -3
  123. package/docs_for_llm/message.doc.md +45 -0
  124. package/docs_for_llm/notification.doc.md +214 -0
  125. package/docs_for_llm/popover.doc.md +34 -0
  126. package/docs_for_llm/protable.doc.md +9 -0
  127. package/docs_for_llm/rate.doc.md +5 -0
  128. package/docs_for_llm/scrollselect.doc.md +90 -0
  129. package/docs_for_llm/select.doc.md +189 -0
  130. package/docs_for_llm/skeleton.doc.md +35 -0
  131. package/docs_for_llm/slider.doc.md +11 -1
  132. package/docs_for_llm/spin.doc.md +10 -1
  133. package/docs_for_llm/spinner.doc.md +1 -1
  134. package/docs_for_llm/split.doc.md +13 -0
  135. package/docs_for_llm/steps.doc.md +71 -0
  136. package/docs_for_llm/switch.doc.md +15 -2
  137. package/docs_for_llm/table.doc.md +199 -4
  138. package/docs_for_llm/tabs.doc.md +98 -2
  139. package/docs_for_llm/tag.doc.md +148 -5
  140. package/docs_for_llm/timeline.doc.md +80 -2
  141. package/docs_for_llm/timepicker.doc.md +19 -0
  142. package/docs_for_llm/tip.doc.md +30 -0
  143. package/docs_for_llm/tooltip.doc.md +46 -0
  144. package/docs_for_llm/tour.doc.md +102 -0
  145. package/docs_for_llm/transfer.doc.md +59 -4
  146. package/docs_for_llm/tree.doc.md +64 -1
  147. package/docs_for_llm/treeselect.doc.md +68 -0
  148. package/docs_for_llm/upload.doc.md +28 -0
  149. package/docs_for_llm/vdialog.doc.md +26 -1
  150. package/docs_for_llm/vdrawer.doc.md +33 -4
  151. package/docs_for_llm/virtuallist.doc.md +165 -0
  152. package/package.json +3 -3
  153. package/dist/chunk-D2SXGGTX.mjs +0 -162
  154. package/dist/chunk-EYKZY2F3.js +0 -164
@@ -32244,7 +32244,14 @@ var ComponentRegistry = class {
32244
32244
  newComponents.set(resolvedData.name, resolvedData);
32245
32245
  if (resolvedData.subComponents) {
32246
32246
  for (const sub of resolvedData.subComponents) {
32247
- newComponents.set(sub.name, sub);
32247
+ newComponents.set(sub.name, {
32248
+ id: sub.name,
32249
+ name: sub.name,
32250
+ props: sub.props || [],
32251
+ events: sub.events || [],
32252
+ slots: sub.slots || [],
32253
+ methods: sub.methods || []
32254
+ });
32248
32255
  }
32249
32256
  }
32250
32257
  }
@@ -33060,23 +33067,7 @@ function checkNestingRules(tagName, metadata, ancestors, violations) {
33060
33067
  });
33061
33068
  }
33062
33069
  }
33063
- function checkComponentSpecificRules(tagName, node, violations) {
33064
- if (tagName === "Dropdown") {
33065
- node.children?.forEach((child) => {
33066
- if (child.type === 1 && child.tag === "template") {
33067
- const slotProp = child.props?.find(
33068
- (p) => p.type === 7 && p.name === "slot" && p.arg?.content === "menu"
33069
- );
33070
- if (slotProp) {
33071
- violations.push({
33072
- rule: "DropdownMenu \u4E0D\u80FD\u653E\u5728 #menu \u63D2\u69FD\u4E2D",
33073
- match: "<template #menu>",
33074
- suggestion: "\u8BF7\u79FB\u9664 <template #menu>\uFF0C\u5C06 DropdownMenu \u76F4\u63A5\u4F5C\u4E3A Dropdown \u7684\u7B2C\u4E8C\u4E2A\u5B50\u5143\u7D20"
33075
- });
33076
- }
33077
- }
33078
- });
33079
- }
33070
+ function checkComponentSpecificRules(tagName, node, metadata, violations) {
33080
33071
  if (tagName === "Table") {
33081
33072
  node.props.forEach((prop) => {
33082
33073
  if (prop.type === 6 && (prop.name === "rowKey" || prop.name === "row-key")) {
@@ -33099,23 +33090,110 @@ function checkComponentSpecificRules(tagName, node, violations) {
33099
33090
  }
33100
33091
  });
33101
33092
  }
33102
- if (tagName === "TableColumn") {
33103
- node.children?.forEach((child) => {
33104
- if (child.type === 1 && child.tag === "template") {
33105
- const slotProp = child.props?.find((p) => p.type === 7 && p.name === "slot");
33106
- if (slotProp && slotProp.exp && slotProp.exp.content) {
33107
- const exp = slotProp.exp.content.trim();
33108
- if (exp.startsWith("{") && exp.endsWith("}")) {
33109
- violations.push({
33110
- rule: "TableColumn \u63D2\u69FD\u53C2\u6570\u5E94\u4E3A\u6570\u7EC4\u7ED3\u6784",
33111
- match: exp,
33112
- suggestion: `King Design \u8868\u683C\u63D2\u69FD\u53C2\u6570\u4E3A\u6570\u7EC4\u987A\u5E8F\u4F20\u9012\uFF0C\u8BF7\u5C06 ${exp} \u6539\u4E3A [row]`
33113
- });
33114
- }
33115
- }
33116
- }
33117
- });
33093
+ if (!metadata?.slots?.length) {
33094
+ return;
33095
+ }
33096
+ const validateSlotBinding = (slotName, expression) => {
33097
+ if (!expression) return;
33098
+ const slot = metadata.slots.find((item) => item.name === slotName);
33099
+ if (!slot) return;
33100
+ const exp = expression.trim();
33101
+ const bindingType = resolveSlotBindingType(slot);
33102
+ if (!bindingType) return;
33103
+ if (bindingType === "none") {
33104
+ violations.push({
33105
+ rule: `${tagName} \u63D2\u69FD #${slotName} \u4E0D\u63D0\u4F9B\u53C2\u6570`,
33106
+ match: exp,
33107
+ suggestion: `\u8BF7\u79FB\u9664 ${slotName} \u63D2\u69FD\u4E0A\u7684\u53C2\u6570\u58F0\u660E`
33108
+ });
33109
+ return;
33110
+ }
33111
+ if (bindingType === "array" && isObjectDestructuringExpression(exp)) {
33112
+ violations.push({
33113
+ rule: `${tagName} \u63D2\u69FD\u53C2\u6570\u5E94\u4E3A\u6570\u7EC4\u7ED3\u6784`,
33114
+ match: exp,
33115
+ suggestion: `\u8BF7\u5C06 ${exp} \u6539\u4E3A ${getSlotBindingExample(slot, "array")}`
33116
+ });
33117
+ return;
33118
+ }
33119
+ if (bindingType === "object" && isArrayDestructuringExpression(exp)) {
33120
+ violations.push({
33121
+ rule: `${tagName} \u63D2\u69FD\u53C2\u6570\u5E94\u4E3A\u5BF9\u8C61\u7ED3\u6784`,
33122
+ match: exp,
33123
+ suggestion: `\u8BF7\u5C06 ${exp} \u6539\u4E3A ${getSlotBindingExample(slot, "object")}`
33124
+ });
33125
+ return;
33126
+ }
33127
+ if (bindingType === "single" && (isArrayDestructuringExpression(exp) || isObjectDestructuringExpression(exp))) {
33128
+ violations.push({
33129
+ rule: `${tagName} \u63D2\u69FD\u53C2\u6570\u5E94\u4E3A\u5355\u503C\u7ED3\u6784`,
33130
+ match: exp,
33131
+ suggestion: `\u8BF7\u5C06 ${exp} \u6539\u4E3A ${getSlotBindingExample(slot, "single")}`
33132
+ });
33133
+ }
33134
+ };
33135
+ node.props.forEach((prop) => {
33136
+ if (prop.type !== 7 || prop.name !== "slot") return;
33137
+ validateSlotBinding(slotNameFromVSlotDirective(prop), getDirectiveExpressionContent(prop.exp));
33138
+ });
33139
+ node.children?.forEach((child) => {
33140
+ if (child.type !== 1 || child.tag !== "template") return;
33141
+ const slotProp = child.props?.find((p) => p.type === 7 && p.name === "slot");
33142
+ if (!slotProp) return;
33143
+ validateSlotBinding(slotNameFromVSlotDirective(slotProp), getDirectiveExpressionContent(slotProp.exp));
33144
+ });
33145
+ }
33146
+ function isArrayDestructuringExpression(expression) {
33147
+ return expression.startsWith("[") && expression.endsWith("]");
33148
+ }
33149
+ function isObjectDestructuringExpression(expression) {
33150
+ return expression.startsWith("{") && expression.endsWith("}");
33151
+ }
33152
+ function extractBindingExpressionFromVueTemplate(vueTemplate) {
33153
+ if (!vueTemplate) return void 0;
33154
+ const match = vueTemplate.match(/=\s*"([^"]+)"/);
33155
+ return match?.[1]?.trim();
33156
+ }
33157
+ function getDirectiveExpressionContent(exp) {
33158
+ if (!exp || !("content" in exp)) return void 0;
33159
+ return typeof exp.content === "string" ? exp.content : void 0;
33160
+ }
33161
+ function resolveSlotBindingType(slot) {
33162
+ if (slot.bindingType) {
33163
+ return slot.bindingType;
33164
+ }
33165
+ const templateExpression = extractBindingExpressionFromVueTemplate(slot.vueTemplate);
33166
+ if (templateExpression) {
33167
+ if (isArrayDestructuringExpression(templateExpression)) return "array";
33168
+ if (isObjectDestructuringExpression(templateExpression)) return "object";
33169
+ }
33170
+ const destructuringExample = slot.slotProps?.find((prop) => prop.destructuringExample)?.destructuringExample?.trim();
33171
+ if (destructuringExample) {
33172
+ if (isArrayDestructuringExpression(destructuringExample)) return "array";
33173
+ if (isObjectDestructuringExpression(destructuringExample)) return "object";
33174
+ }
33175
+ return void 0;
33176
+ }
33177
+ function getSlotBindingExample(slot, fallbackType) {
33178
+ const templateExpression = extractBindingExpressionFromVueTemplate(slot.vueTemplate);
33179
+ if (templateExpression) {
33180
+ return templateExpression;
33181
+ }
33182
+ const destructuringExample = slot.slotProps?.find((prop) => prop.destructuringExample)?.destructuringExample?.trim();
33183
+ if (destructuringExample) {
33184
+ return destructuringExample;
33185
+ }
33186
+ const paramNames = slot.slotProps?.map((prop) => prop.name).filter(Boolean) || [];
33187
+ if (paramNames.length > 0) {
33188
+ if (fallbackType === "single") {
33189
+ return paramNames[0];
33190
+ }
33191
+ return fallbackType === "array" ? `[${paramNames.join(", ")}]` : `{ ${paramNames.join(", ")} }`;
33192
+ }
33193
+ if (fallbackType === "single") {
33194
+ return "slotProp";
33118
33195
  }
33196
+ return fallbackType === "array" ? "[slotProps]" : "{ slotProps }";
33119
33197
  }
33120
33198
  function typeRawAllowsNumber(typeRaw) {
33121
33199
  if (!typeRaw) return false;
@@ -33281,7 +33359,7 @@ function checkTemplate(node, violations, ancestors) {
33281
33359
  if (metadata) {
33282
33360
  checkNestingRules(displayTag, metadata, ancestors, violations);
33283
33361
  }
33284
- checkComponentSpecificRules(displayTag, elementNode, violations);
33362
+ checkComponentSpecificRules(displayTag, elementNode, metadata, violations);
33285
33363
  if (metadata) {
33286
33364
  checkProps(displayTag, elementNode, metadata, violations);
33287
33365
  checkEvents(displayTag, elementNode, metadata, violations);
@@ -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,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkCJGGFVQJ_js = require('../chunk-CJGGFVQJ.js');
4
- require('../chunk-SZYVGYKK.js');
5
- require('../chunk-EYKZY2F3.js');
6
- require('../chunk-CR3GC4H3.js');
3
+ var chunkHARQRI4F_js = require('../chunk-HARQRI4F.js');
4
+ require('../chunk-XPHDD6XR.js');
5
+ require('../chunk-V5N65MRP.js');
6
+ require('../chunk-DHLWNT53.js');
7
7
  require('../chunk-KF5YBEM5.js');
8
8
  require('../chunk-JSBRDJBE.js');
9
9
 
@@ -11,9 +11,9 @@ require('../chunk-JSBRDJBE.js');
11
11
 
12
12
  Object.defineProperty(exports, "validateCode", {
13
13
  enumerable: true,
14
- get: function () { return chunkCJGGFVQJ_js.validateCode; }
14
+ get: function () { return chunkHARQRI4F_js.validateCode; }
15
15
  });
16
16
  Object.defineProperty(exports, "validateCodeSync", {
17
17
  enumerable: true,
18
- get: function () { return chunkCJGGFVQJ_js.validateCodeSync; }
18
+ get: function () { return chunkHARQRI4F_js.validateCodeSync; }
19
19
  });
@@ -1,6 +1,6 @@
1
- export { validateCode, validateCodeSync } from '../chunk-XGPHQHLR.mjs';
2
- import '../chunk-KMIDURUR.mjs';
3
- import '../chunk-D2SXGGTX.mjs';
4
- import '../chunk-BI5TIQID.mjs';
1
+ export { validateCode, validateCodeSync } from '../chunk-BSCASJTV.mjs';
2
+ import '../chunk-YRGYDK2I.mjs';
3
+ import '../chunk-6HOIRUQB.mjs';
4
+ import '../chunk-4OTQAQ6J.mjs';
5
5
  import '../chunk-QC6VTSA3.mjs';
6
6
  import '../chunk-UJCSKKID.mjs';
package/dist/index.js CHANGED
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkTA3SV4SP_js = require('./chunk-TA3SV4SP.js');
3
+ var chunkJJ6AB4ZH_js = require('./chunk-JJ6AB4ZH.js');
4
4
  require('./chunk-YTEYDSDW.js');
5
- var chunkCJGGFVQJ_js = require('./chunk-CJGGFVQJ.js');
6
- var chunkSZYVGYKK_js = require('./chunk-SZYVGYKK.js');
7
- var chunkEYKZY2F3_js = require('./chunk-EYKZY2F3.js');
8
- var chunkCR3GC4H3_js = require('./chunk-CR3GC4H3.js');
5
+ var chunkHARQRI4F_js = require('./chunk-HARQRI4F.js');
6
+ var chunkXPHDD6XR_js = require('./chunk-XPHDD6XR.js');
7
+ var chunkV5N65MRP_js = require('./chunk-V5N65MRP.js');
8
+ var chunkDHLWNT53_js = require('./chunk-DHLWNT53.js');
9
9
  require('./chunk-KF5YBEM5.js');
10
10
  require('./chunk-JSBRDJBE.js');
11
11
 
@@ -13,33 +13,33 @@ require('./chunk-JSBRDJBE.js');
13
13
 
14
14
  Object.defineProperty(exports, "validateCompilation", {
15
15
  enumerable: true,
16
- get: function () { return chunkTA3SV4SP_js.validateCompilation; }
16
+ get: function () { return chunkJJ6AB4ZH_js.validateCompilation; }
17
17
  });
18
18
  Object.defineProperty(exports, "validateCode", {
19
19
  enumerable: true,
20
- get: function () { return chunkCJGGFVQJ_js.validateCode; }
20
+ get: function () { return chunkHARQRI4F_js.validateCode; }
21
21
  });
22
22
  Object.defineProperty(exports, "validateCodeSync", {
23
23
  enumerable: true,
24
- get: function () { return chunkCJGGFVQJ_js.validateCodeSync; }
24
+ get: function () { return chunkHARQRI4F_js.validateCodeSync; }
25
25
  });
26
26
  Object.defineProperty(exports, "analyzeCodeWithAST", {
27
27
  enumerable: true,
28
- get: function () { return chunkSZYVGYKK_js.analyzeCodeWithAST; }
28
+ get: function () { return chunkXPHDD6XR_js.analyzeCodeWithAST; }
29
29
  });
30
30
  Object.defineProperty(exports, "componentRegistry", {
31
31
  enumerable: true,
32
- get: function () { return chunkSZYVGYKK_js.componentRegistry; }
32
+ get: function () { return chunkXPHDD6XR_js.componentRegistry; }
33
33
  });
34
34
  Object.defineProperty(exports, "validateRuntimePrecheck", {
35
35
  enumerable: true,
36
- get: function () { return chunkEYKZY2F3_js.validateRuntimePrecheck; }
36
+ get: function () { return chunkV5N65MRP_js.validateRuntimePrecheck; }
37
37
  });
38
38
  Object.defineProperty(exports, "compileSFC", {
39
39
  enumerable: true,
40
- get: function () { return chunkCR3GC4H3_js.compileSFC; }
40
+ get: function () { return chunkDHLWNT53_js.compileSFC; }
41
41
  });
42
42
  Object.defineProperty(exports, "scopeStyles", {
43
43
  enumerable: true,
44
- get: function () { return chunkCR3GC4H3_js.scopeStyles; }
44
+ get: function () { return chunkDHLWNT53_js.scopeStyles; }
45
45
  });
package/dist/index.mjs CHANGED
@@ -1,8 +1,8 @@
1
- export { validateCompilation } from './chunk-3LYQ5XFM.mjs';
1
+ export { validateCompilation } from './chunk-NZL6T22V.mjs';
2
2
  import './chunk-5H7N2A5X.mjs';
3
- export { validateCode, validateCodeSync } from './chunk-XGPHQHLR.mjs';
4
- export { analyzeCodeWithAST, componentRegistry } from './chunk-KMIDURUR.mjs';
5
- export { validateRuntimePrecheck } from './chunk-D2SXGGTX.mjs';
6
- export { compileSFC, scopeStyles } from './chunk-BI5TIQID.mjs';
3
+ export { validateCode, validateCodeSync } from './chunk-BSCASJTV.mjs';
4
+ export { analyzeCodeWithAST, componentRegistry } from './chunk-YRGYDK2I.mjs';
5
+ export { validateRuntimePrecheck } from './chunk-6HOIRUQB.mjs';
6
+ export { compileSFC, scopeStyles } from './chunk-4OTQAQ6J.mjs';
7
7
  import './chunk-QC6VTSA3.mjs';
8
8
  import './chunk-UJCSKKID.mjs';
@@ -51,6 +51,21 @@ interface ComponentSlot {
51
51
  description: string;
52
52
  vueTemplate?: string;
53
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[];
54
69
  }
55
70
  interface ComponentMetadata {
56
71
  id: string;
@@ -64,7 +79,7 @@ interface ComponentMetadata {
64
79
  slots: ComponentSlot[];
65
80
  methods?: ComponentMethod[];
66
81
  examples?: any[];
67
- subComponents?: any[];
82
+ subComponents?: ComponentSubComponent[];
68
83
  commonMistakes?: any[];
69
84
  searchKeywords?: string[];
70
85
  useCases?: string[];
@@ -94,4 +109,4 @@ declare function getComponentsDir(): string;
94
109
  */
95
110
  declare function getComponentPath(componentName: string): string;
96
111
 
97
- export { type ComponentActionParam, type ComponentEvent, type ComponentMetadata, type ComponentMethod, 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 };
@@ -51,6 +51,21 @@ interface ComponentSlot {
51
51
  description: string;
52
52
  vueTemplate?: string;
53
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[];
54
69
  }
55
70
  interface ComponentMetadata {
56
71
  id: string;
@@ -64,7 +79,7 @@ interface ComponentMetadata {
64
79
  slots: ComponentSlot[];
65
80
  methods?: ComponentMethod[];
66
81
  examples?: any[];
67
- subComponents?: any[];
82
+ subComponents?: ComponentSubComponent[];
68
83
  commonMistakes?: any[];
69
84
  searchKeywords?: string[];
70
85
  useCases?: string[];
@@ -94,4 +109,4 @@ declare function getComponentsDir(): string;
94
109
  */
95
110
  declare function getComponentPath(componentName: string): string;
96
111
 
97
- export { type ComponentActionParam, type ComponentEvent, type ComponentMetadata, type ComponentMethod, 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 };
@@ -4,6 +4,8 @@ interface ValidationLayer {
4
4
  name: string;
5
5
  passed: boolean;
6
6
  errors: string[];
7
+ warnings?: string[];
8
+ status?: 'passed' | 'failed' | 'env_dependent' | 'runtime_skipped';
7
9
  }
8
10
  /**
9
11
  * 运行时预检查 (模拟执行)
@@ -4,6 +4,8 @@ interface ValidationLayer {
4
4
  name: string;
5
5
  passed: boolean;
6
6
  errors: string[];
7
+ warnings?: string[];
8
+ status?: 'passed' | 'failed' | 'env_dependent' | 'runtime_skipped';
7
9
  }
8
10
  /**
9
11
  * 运行时预检查 (模拟执行)
@@ -1,16 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var chunkEYKZY2F3_js = require('../chunk-EYKZY2F3.js');
4
- var chunkCR3GC4H3_js = require('../chunk-CR3GC4H3.js');
3
+ var chunkV5N65MRP_js = require('../chunk-V5N65MRP.js');
4
+ var chunkDHLWNT53_js = require('../chunk-DHLWNT53.js');
5
5
  require('../chunk-JSBRDJBE.js');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "validateRuntimePrecheck", {
10
10
  enumerable: true,
11
- get: function () { return chunkEYKZY2F3_js.validateRuntimePrecheck; }
11
+ get: function () { return chunkV5N65MRP_js.validateRuntimePrecheck; }
12
12
  });
13
13
  Object.defineProperty(exports, "compileSFC", {
14
14
  enumerable: true,
15
- get: function () { return chunkCR3GC4H3_js.compileSFC; }
15
+ get: function () { return chunkDHLWNT53_js.compileSFC; }
16
16
  });
@@ -1,3 +1,3 @@
1
- export { validateRuntimePrecheck } from '../chunk-D2SXGGTX.mjs';
2
- export { compileSFC } from '../chunk-BI5TIQID.mjs';
1
+ export { validateRuntimePrecheck } from '../chunk-6HOIRUQB.mjs';
2
+ export { compileSFC } from '../chunk-4OTQAQ6J.mjs';
3
3
  import '../chunk-UJCSKKID.mjs';
@@ -1,20 +1,20 @@
1
1
  'use strict';
2
2
 
3
- var chunkTA3SV4SP_js = require('../chunk-TA3SV4SP.js');
4
- var chunkCR3GC4H3_js = require('../chunk-CR3GC4H3.js');
3
+ var chunkJJ6AB4ZH_js = require('../chunk-JJ6AB4ZH.js');
4
+ var chunkDHLWNT53_js = require('../chunk-DHLWNT53.js');
5
5
  require('../chunk-JSBRDJBE.js');
6
6
 
7
7
 
8
8
 
9
9
  Object.defineProperty(exports, "validateCompilation", {
10
10
  enumerable: true,
11
- get: function () { return chunkTA3SV4SP_js.validateCompilation; }
11
+ get: function () { return chunkJJ6AB4ZH_js.validateCompilation; }
12
12
  });
13
13
  Object.defineProperty(exports, "compileSFC", {
14
14
  enumerable: true,
15
- get: function () { return chunkCR3GC4H3_js.compileSFC; }
15
+ get: function () { return chunkDHLWNT53_js.compileSFC; }
16
16
  });
17
17
  Object.defineProperty(exports, "scopeStyles", {
18
18
  enumerable: true,
19
- get: function () { return chunkCR3GC4H3_js.scopeStyles; }
19
+ get: function () { return chunkDHLWNT53_js.scopeStyles; }
20
20
  });
@@ -1,3 +1,3 @@
1
- export { validateCompilation } from '../chunk-3LYQ5XFM.mjs';
2
- export { compileSFC, scopeStyles } from '../chunk-BI5TIQID.mjs';
1
+ export { validateCompilation } from '../chunk-NZL6T22V.mjs';
2
+ export { compileSFC, scopeStyles } from '../chunk-4OTQAQ6J.mjs';
3
3
  import '../chunk-UJCSKKID.mjs';
@@ -20,7 +20,17 @@ import { Actions } from '@ksyun-internal/versatile';
20
20
  ## 插槽 (Slots)
21
21
  | 插槽名 | 说明 | 模板写法 | 示例 |
22
22
  | --- | --- | --- | --- |
23
- | btnText | 自定义按钮文案渲染 | `<template #btnText="{ action }">...</template>` | - |
23
+ | btnText | 自定义按钮文案渲染 | `<template #btnText="{ action }">...</template>` | `<Actions>
24
+ <template <template #btnText="{ action }">...</template>>
25
+ {{ action }}
26
+ </template>
27
+ </Actions>` |
28
+
29
+ ### 插槽参数说明
30
+ **btnText**
31
+
32
+ - 参数结构: <template #btnText="{ action }">...</template>
33
+ - 参数列表: `action: ActionConfig`
24
34
 
25
35
  ## 使用示例
26
36
  ### 表格操作列中的主次操作
@@ -33,7 +33,16 @@ import { AdvancedSet } from '@ksyun-internal/versatile';
33
33
  ## 插槽 (Slots)
34
34
  | 插槽名 | 说明 | 模板写法 | 示例 |
35
35
  | --- | --- | --- | --- |
36
- | default | 高级设置内容区域 | `<AdvancedSet>...</AdvancedSet>` | - |
36
+ | default | 高级设置内容区域 | `<AdvancedSet>...</AdvancedSet>` | `<AdvancedSet>
37
+ <template <AdvancedSet>...</AdvancedSet>>
38
+ 自定义default内容
39
+ </template>
40
+ </AdvancedSet>` |
41
+
42
+ ### 插槽参数说明
43
+ **default**
44
+
45
+ - 参数结构: 无参数
37
46
 
38
47
  ## 使用示例
39
48
  ### 购买页中的高级设置折叠区
@@ -37,6 +37,11 @@ import { Affix } from '@king-design/vue';
37
37
  | --- | --- | --- | --- |
38
38
  | default | 需要被固定的元素 | `#default` | `<Affix><Button>Fixed Button</Button></Affix>` |
39
39
 
40
+ ### 插槽参数说明
41
+ **default**
42
+
43
+ - 参数结构: 无参数
44
+
40
45
  ## 常见错误与正确用法 (Anti-Hallucination)
41
46
  ### 父容器滚动问题
42
47
  > **错误用法**: `<div style="overflow: auto; height: 200px;">