@antdv-next/x 1.1.3-beta.4 → 1.2.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 (117) hide show
  1. package/dist/index.umd.js +38 -29
  2. package/dist/package.js +1 -1
  3. package/dist/sender/components/SlotTextArea.js +2 -2
  4. package/dist/suggestion/style/index.js +5 -1
  5. package/dist/think/Think.d.ts +9 -0
  6. package/dist/think/Think.js +17 -9
  7. package/dist/think/interface.d.ts +6 -0
  8. package/dist/thought-chain/Node.d.ts +2 -11
  9. package/dist/thought-chain/Node.js +13 -16
  10. package/dist/thought-chain/ThoughtChain.d.ts +2 -2
  11. package/dist/thought-chain/ThoughtChain.js +1 -2
  12. package/dist/thought-chain/interface.d.ts +6 -0
  13. package/dist/thought-chain/style/thought-chain.js +1 -0
  14. package/dist/x-provider/hooks/use-x-provider-context.d.ts +2 -2
  15. package/es/{Serializer-y_SfSPKv.js → Serializer-D1JYN1kI.js} +4 -4
  16. package/es/{_basePickBy-Cy7KVmkk.js → _basePickBy-DFHEGO2M.js} +23 -23
  17. package/es/{_baseUniq-Ch3HuHeT.js → _baseUniq-BlS7rXTs.js} +83 -83
  18. package/es/antdv-next-x.esm.js +420 -410
  19. package/es/{arc-caEkbRYF.js → arc-BuXEd18J.js} +3 -3
  20. package/es/architecture-PBZL5I3N-D7tS55xM.js +3 -0
  21. package/es/{architectureDiagram-2XIMDMQ5-B4BHdsAL.js → architectureDiagram-2XIMDMQ5-CmfsCwJk.js} +9 -9
  22. package/es/{blockDiagram-WCTKOSBZ-nXanZ0sc.js → blockDiagram-WCTKOSBZ-lJAan65A.js} +12 -12
  23. package/es/{c4Diagram-IC4MRINW-C-gVp6th.js → c4Diagram-IC4MRINW-B1c2x_1Q.js} +6 -6
  24. package/es/channel-DFgF_2F7.js +5 -0
  25. package/es/{chunk-4BX2VUAB-fLFD6XW0.js → chunk-4BX2VUAB-J2N81Fpp.js} +2 -2
  26. package/es/{chunk-55IACEB6-OtyKJzCH.js → chunk-55IACEB6-DGtfGRgi.js} +2 -2
  27. package/es/{chunk-7E7YKBS2-C1dd36rm.js → chunk-7E7YKBS2-CL2d4WAf.js} +2 -2
  28. package/es/{chunk-7R4GIKGN-DuTRhdsf.js → chunk-7R4GIKGN-QT6IorJ_.js} +3 -3
  29. package/es/{chunk-C72U2L5F-ClmZGhFC.js → chunk-C72U2L5F-OHTVpS-m.js} +2 -2
  30. package/es/{chunk-EGIJ26TM-Bar_u1MN.js → chunk-EGIJ26TM-DyMPGYrB.js} +2 -2
  31. package/es/{chunk-FMBD7UC4-C_uJ_JJA.js → chunk-FMBD7UC4-DCcRjunY.js} +2 -2
  32. package/es/{chunk-GEFDOKGD-P7WhyrTU.js → chunk-GEFDOKGD-BWpC-zoH.js} +30 -30
  33. package/es/{chunk-GLR3WWYH-BvazRgdo.js → chunk-GLR3WWYH-DiXcKb5Y.js} +8 -8
  34. package/es/{chunk-HHEYEP7N-rv5s5WD4.js → chunk-HHEYEP7N-Cxc7E4dX.js} +3 -3
  35. package/es/{chunk-JSJVCQXG-89HUGe9V.js → chunk-JSJVCQXG-D8_heHOp.js} +4 -4
  36. package/es/{chunk-KX2RTZJC-pMHnNRQg.js → chunk-KX2RTZJC-D5cc4rj6.js} +3 -3
  37. package/es/{chunk-KYZI473N-DJmSs1gK.js → chunk-KYZI473N-BHJ3T5Zv.js} +8 -8
  38. package/es/{chunk-L3YUKLVL-Ck54qytQ.js → chunk-L3YUKLVL-7oGaUOdc.js} +2 -2
  39. package/es/{chunk-MX3YWQON-MkpK3uBD.js → chunk-MX3YWQON-BxE-Aq9c.js} +2 -2
  40. package/es/{chunk-NQ4KR5QH-DGshodQv.js → chunk-NQ4KR5QH-EYQBXkqP.js} +7 -7
  41. package/es/{chunk-O4XLMI2P-e-ZzDQwg.js → chunk-O4XLMI2P-qjOoGpnx.js} +11 -11
  42. package/es/{chunk-OZEHJAEY-DULNd43V.js → chunk-OZEHJAEY-D82nx27s.js} +2 -2
  43. package/es/{chunk-PQ6SQG4A-CQ9Csv7s.js → chunk-PQ6SQG4A-D3jtNCWN.js} +3 -3
  44. package/es/{chunk-PU5JKC2W-DkEFvrjH.js → chunk-PU5JKC2W-DdP8BS-S.js} +16 -16
  45. package/es/{chunk-QZHKN3VN-qww1plfw.js → chunk-QZHKN3VN-CW3cFN-h.js} +2 -2
  46. package/es/{chunk-R5LLSJPH-BERXSDGJ.js → chunk-R5LLSJPH-CreI2kO9.js} +2 -2
  47. package/es/{chunk-WL4C6EOR-C-d8WPS7.js → chunk-WL4C6EOR-BDbxJyGk.js} +9 -9
  48. package/es/{chunk-XIRO2GV7-CFHofxVB.js → chunk-XIRO2GV7-S5KkbVnN.js} +2 -2
  49. package/es/{chunk-XPW4576I-DgvoNZkW.js → chunk-XPW4576I-B0KVSHwE.js} +2 -2
  50. package/es/{chunk-XZSTWKYB-k8_EXrSa.js → chunk-XZSTWKYB-CucN1XvM.js} +93 -93
  51. package/es/{chunk-YBOYWFTD-BUW4AzEX.js → chunk-YBOYWFTD-CvaddD9G.js} +4 -4
  52. package/es/classDiagram-VBA2DB6C-Co3LMmg8.js +29 -0
  53. package/es/classDiagram-v2-RAHNMMFH-BZscgdF2.js +29 -0
  54. package/es/clone-r3YukIBB.js +8 -0
  55. package/es/{cose-bilkent-S5V4N54A-CnrS2OC1.js → cose-bilkent-S5V4N54A-B5OQuIhl.js} +3 -3
  56. package/es/{cytoscape.esm-BY3wHcbp.js → cytoscape.esm-i2CZcWd-.js} +1 -1
  57. package/es/{dagre-BJOzGlhW.js → dagre-5aGJFKmT.js} +57 -57
  58. package/es/{dagre-KLK3FWXG-CFC0naVr.js → dagre-KLK3FWXG-BI5QQMXo.js} +16 -16
  59. package/es/{defaultLocale-BaPFSbai.js → defaultLocale-bckJcYh1.js} +12 -12
  60. package/es/{diagram-E7M64L7V-DxuJj8ZG.js → diagram-E7M64L7V-Dz62Vz_a.js} +32 -32
  61. package/es/{diagram-IFDJBPK2-BOpPZ6pu.js → diagram-IFDJBPK2-9fjvFkSc.js} +7 -7
  62. package/es/{diagram-P4PSJMXO--ChDmcya.js → diagram-P4PSJMXO-BlX6jFjZ.js} +7 -7
  63. package/es/{dist-DltyvPj3.js → dist-BX_roQzC.js} +1 -1
  64. package/es/{erDiagram-INFDFZHY-BA3m-v87.js → erDiagram-INFDFZHY-BcRXu8Cp.js} +14 -14
  65. package/es/{flowDiagram-PKNHOUZH-BCq6k3kr.js → flowDiagram-PKNHOUZH-UeyfgU8z.js} +17 -17
  66. package/es/{ganttDiagram-A5KZAMGK-DdMePS21.js → ganttDiagram-A5KZAMGK-txCzqgQ5.js} +28 -28
  67. package/es/gitGraph-HDMCJU4V-CxsS0Qr1.js +3 -0
  68. package/es/{gitGraphDiagram-K3NZZRJ6-CLbRwChG.js → gitGraphDiagram-K3NZZRJ6-DghWYaFU.js} +7 -7
  69. package/es/{graphlib-C7ysKz4u.js → graphlib-dRkI1OCL.js} +4 -4
  70. package/es/{html-BNNJXCkq.js → html-CWvNBSxv.js} +1 -1
  71. package/es/info-3K5VOQVL-COqdvM99.js +3 -0
  72. package/es/{infoDiagram-LFFYTUFH-DQAZ-vFk.js → infoDiagram-LFFYTUFH-CA-vlAvP.js} +5 -5
  73. package/es/{init-PAs0hR-b.js → init-B75p2clj.js} +1 -1
  74. package/es/{isArrayLikeObject-y3HlYDaX.js → isArrayLikeObject-jl2bjkAJ.js} +80 -80
  75. package/es/{isEmpty-2JxdWtc-.js → isEmpty-CmA-HYrg.js} +3 -3
  76. package/es/{ishikawaDiagram-PHBUUO56-B0r2IgGz.js → ishikawaDiagram-PHBUUO56-DjdpS9Lb.js} +6 -6
  77. package/es/{journeyDiagram-4ABVD52K-DnMUhOvg.js → journeyDiagram-4ABVD52K-CIJfC1fp.js} +6 -6
  78. package/es/{kanban-definition-K7BYSVSG-Da5Y-nJy.js → kanban-definition-K7BYSVSG-CC2vwGck.js} +11 -11
  79. package/es/{katex-b-xdokOf.js → katex-DCMiIo1z.js} +1 -1
  80. package/es/{line-h2iCTGsE.js → line-Cu9NTacD.js} +4 -4
  81. package/es/{linear-Bv7XrZCH.js → linear-C0rAYYmp.js} +23 -23
  82. package/es/{math-DPzKeDKn.js → math-CoDOuve-.js} +1 -1
  83. package/es/{mermaid-parser.core-kTgpNO7M.js → mermaid-parser.core-7Wn2L29P.js} +16 -16
  84. package/es/{mermaid.core-Db1VE3-f.js → mermaid.core-Bvy_Q6Hu.js} +44 -44
  85. package/es/{mindmap-definition-YRQLILUH-CYeqnCde.js → mindmap-definition-YRQLILUH-BzTYDYmK.js} +16 -16
  86. package/es/{ordinal-D8PKtxfM.js → ordinal-F3U6aXtP.js} +3 -3
  87. package/es/packet-RMMSAZCW-2PTjWKLd.js +3 -0
  88. package/es/{path-DZ-6AyWK.js → path-Dm3C8WEs.js} +3 -3
  89. package/es/pie-UPGHQEXC-Du8-k-EA.js +3 -0
  90. package/es/{pieDiagram-SKSYHLDU-DAsfTGvY.js → pieDiagram-SKSYHLDU-COvqE_C6.js} +14 -14
  91. package/es/{quadrantDiagram-337W2JSQ-CZLbmQS4.js → quadrantDiagram-337W2JSQ-Dgv8ccjt.js} +4 -4
  92. package/es/radar-KQ55EAFF-jJOhyjxC.js +3 -0
  93. package/es/{requirementDiagram-Z7DCOOCP-Cb_Ygnfe.js → requirementDiagram-Z7DCOOCP-B2NyhxO-.js} +13 -13
  94. package/es/{rough.esm-C_hJ3ICT.js → rough.esm-BhGP2Udb.js} +1 -1
  95. package/es/{sankeyDiagram-WA2Y5GQK-DBe5YfW4.js → sankeyDiagram-WA2Y5GQK-BfnH_gpl.js} +18 -18
  96. package/es/{sequenceDiagram-2WXFIKYE-C_KUoojT.js → sequenceDiagram-2WXFIKYE-DXssVQOF.js} +8 -8
  97. package/es/{shiki-runtime-B7sqK6Yk.js → shiki-runtime-D0MO6er5.js} +49 -49
  98. package/es/{src-BukXhifV.js → src-CUQ6oOYk.js} +86 -86
  99. package/es/{stateDiagram-RAJIS63D-boG6DyfW.js → stateDiagram-RAJIS63D-DvDLfupV.js} +17 -17
  100. package/es/stateDiagram-v2-FVOUBMTO-DIXyaX9W.js +27 -0
  101. package/es/{timeline-definition-YZTLITO2-pFt6rZ6S.js → timeline-definition-YZTLITO2-ErcRjbZf.js} +4 -4
  102. package/es/treemap-KZPCXAKY-CvZAIYVa.js +3 -0
  103. package/es/{vennDiagram-LZ73GAT5-VaCO6k4H.js → vennDiagram-LZ73GAT5-CDTZUtc8.js} +7 -7
  104. package/es/{xychartDiagram-JWTSCODW-xS5ybemA.js → xychartDiagram-JWTSCODW-Y21jBOTg.js} +12 -12
  105. package/package.json +1 -1
  106. package/es/architecture-PBZL5I3N-DHfBr78A.js +0 -3
  107. package/es/channel-DoEe9DF9.js +0 -5
  108. package/es/classDiagram-VBA2DB6C-DWTAs0Zm.js +0 -29
  109. package/es/classDiagram-v2-RAHNMMFH-CoxCdmrt.js +0 -29
  110. package/es/clone-BXDbKCDu.js +0 -8
  111. package/es/gitGraph-HDMCJU4V-DbzpICZW.js +0 -3
  112. package/es/info-3K5VOQVL-CpUiQuel.js +0 -3
  113. package/es/packet-RMMSAZCW-UTFQ0FQx.js +0 -3
  114. package/es/pie-UPGHQEXC-CarAcBSi.js +0 -3
  115. package/es/radar-KQ55EAFF-NXK5PC9R.js +0 -3
  116. package/es/stateDiagram-v2-FVOUBMTO-DHCajhrN.js +0 -27
  117. package/es/treemap-KZPCXAKY-Cj9QakFB.js +0 -3
package/dist/index.umd.js CHANGED
@@ -59,7 +59,7 @@
59
59
  shiki_dist_themes_vitesse_dark_mjs = __toESM(shiki_dist_themes_vitesse_dark_mjs);
60
60
  shiki_dist_themes_vitesse_light_mjs = __toESM(shiki_dist_themes_vitesse_light_mjs);
61
61
  //#region package.json
62
- var version = "1.1.3-beta.4";
62
+ var version = "1.2.0";
63
63
  //#endregion
64
64
  //#region components/x-provider/context.ts
65
65
  var XProviderContextKey = Symbol("antdv-next-x-provider-context");
@@ -8352,8 +8352,8 @@
8352
8352
  if (nodeInfo.slotKey) {
8353
8353
  if (nodeInfo.nodeType === "nbsp") return " ";
8354
8354
  const config = nodeInfo.slotConfig;
8355
- if (!config || config.type === "content") return element.innerText || "";
8356
- const rawValue = slotValues.value[nodeInfo.slotKey];
8355
+ if (!config) return element.innerText || "";
8356
+ const rawValue = config.type === "content" ? element.innerText || "" : slotValues.value[nodeInfo.slotKey];
8357
8357
  return config.formatResult?.(rawValue) ?? stringifyValue(rawValue);
8358
8358
  }
8359
8359
  return element.innerText || "";
@@ -10685,7 +10685,11 @@
10685
10685
  var genSuggestionStyle = (token) => {
10686
10686
  const { componentCls, antCls } = token;
10687
10687
  return { [componentCls]: {
10688
- [`${antCls}-cascader-menus ${antCls}-cascader-menu`]: { height: "auto" },
10688
+ [`${antCls}-cascader-menus ${antCls}-cascader-menu`]: {
10689
+ height: "auto",
10690
+ maxHeight: 256,
10691
+ overflowY: "auto"
10692
+ },
10689
10693
  [`${componentCls}-item`]: {
10690
10694
  "&-icon": { marginInlineEnd: token.paddingXXS },
10691
10695
  "&-extra": { marginInlineStart: token.padding }
@@ -11114,6 +11118,10 @@
11114
11118
  blink: {
11115
11119
  type: Boolean,
11116
11120
  default: false
11121
+ },
11122
+ destroyOnHidden: {
11123
+ type: Boolean,
11124
+ default: true
11117
11125
  }
11118
11126
  },
11119
11127
  emits: ["update:expanded", "expand"],
@@ -11174,6 +11182,16 @@
11174
11182
  return rest;
11175
11183
  });
11176
11184
  const prefixCls = (0, vue.computed)(() => props.prefixCls);
11185
+ function renderContent() {
11186
+ return (0, vue.withDirectives)((0, vue.createVNode)("div", { "ref": contentRef }, [(0, vue.createVNode)("div", {
11187
+ "class": [
11188
+ `${prefixCls.value}-content`,
11189
+ contextConfig.value.classes?.content,
11190
+ props.classes?.content
11191
+ ],
11192
+ "style": [contextConfig.value.styles?.content, props.styles?.content]
11193
+ }, [slots.default?.()])]), [[vue.vShow, mergedExpanded.value]]);
11194
+ }
11177
11195
  expose({ get nativeElement() {
11178
11196
  return rootRef.value;
11179
11197
  } });
@@ -11213,20 +11231,14 @@
11213
11231
  }, [(0, vue.createVNode)(_antdv_next_icons.RightOutlined, null, null)])
11214
11232
  ]), (0, vue.createVNode)(vue.Transition, {
11215
11233
  "name": `${prefixCls.value}-collapse`,
11234
+ "persisted": !props.destroyOnHidden,
11216
11235
  "onBeforeEnter": onBeforeEnter,
11217
11236
  "onEnter": onEnter,
11218
11237
  "onAfterEnter": onAfterEnter,
11219
11238
  "onBeforeLeave": onBeforeLeave,
11220
11239
  "onLeave": onLeave,
11221
11240
  "onAfterLeave": onAfterLeave
11222
- }, { default: () => [mergedExpanded.value ? (0, vue.createVNode)("div", { "ref": contentRef }, [(0, vue.createVNode)("div", {
11223
- "class": [
11224
- `${prefixCls.value}-content`,
11225
- contextConfig.value.classes?.content,
11226
- props.classes?.content
11227
- ],
11228
- "style": [contextConfig.value.styles?.content, props.styles?.content]
11229
- }, [slots.default?.()])]) : null] })]);
11241
+ }, { default: () => [props.destroyOnHidden && !mergedExpanded.value ? null : renderContent()] })]);
11230
11242
  }
11231
11243
  });
11232
11244
  //#endregion
@@ -11371,6 +11383,7 @@
11371
11383
  top: (0, _antdv_next_cssinjs.unit)(calc(iconSize).mul(token.lineHeight).equal())
11372
11384
  }
11373
11385
  },
11386
+ [`${componentCls}-node-icon-none`]: { "&:after": { display: "none" } },
11374
11387
  [`${componentCls}-node-icon-dashed`]: { "&:after": { borderInlineStart: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} dashed ${token.colorFillContent}` } },
11375
11388
  [`${componentCls}-node-icon-dotted`]: { "&:after": { borderInlineStart: `${(0, _antdv_next_cssinjs.unit)(token.lineWidth)} dotted ${token.colorFillContent}` } },
11376
11389
  [`${componentCls}-node-index-icon`]: {
@@ -11590,17 +11603,13 @@
11590
11603
  type: Number,
11591
11604
  required: true
11592
11605
  },
11593
- isLast: {
11594
- type: Boolean,
11595
- default: false
11596
- },
11597
11606
  prefixCls: {
11598
11607
  type: String,
11599
11608
  required: true
11600
11609
  },
11601
11610
  lineStyle: {
11602
11611
  type: [Boolean, String],
11603
- default: "solid"
11612
+ default: true
11604
11613
  },
11605
11614
  expanded: {
11606
11615
  type: Boolean,
@@ -11640,11 +11649,6 @@
11640
11649
  const configCtx = (0, antdv_next_config_provider_context.useConfig)();
11641
11650
  const isRtl = (0, vue.computed)(() => configCtx.value.direction === "rtl");
11642
11651
  const nodePrefixCls = (0, vue.computed)(() => `${props.prefixCls}-node`);
11643
- const resolvedLineStyle = (0, vue.computed)(() => {
11644
- if (props.lineStyle === false || props.isLast) return "none";
11645
- if (props.lineStyle === true) return "solid";
11646
- return props.lineStyle;
11647
- });
11648
11652
  const statusCls = (0, vue.computed)(() => `${props.prefixCls}-status`);
11649
11653
  const createSharedSlotInfo = (collapsible) => ({
11650
11654
  item: props.item,
@@ -11670,7 +11674,8 @@
11670
11674
  props.classes?.itemIcon,
11671
11675
  {
11672
11676
  [`${statusCls.value}-${item.status}`]: item.status,
11673
- [`${nodePrefixCls.value}-icon-${resolvedLineStyle.value}`]: typeof props.lineStyle !== "boolean" && resolvedLineStyle.value !== "none"
11677
+ [`${nodePrefixCls.value}-icon-${props.lineStyle}`]: typeof props.lineStyle === "string",
11678
+ [`${nodePrefixCls.value}-icon-none`]: props.lineStyle === false
11674
11679
  }
11675
11680
  ],
11676
11681
  "style": props.styles?.itemIcon
@@ -11747,6 +11752,13 @@
11747
11752
  originNode: item.footer
11748
11753
  }) : item.footer;
11749
11754
  const showContent = hasContent && (!collapsible || props.expanded);
11755
+ const destroyOnHidden = item.destroyOnHidden ?? true;
11756
+ const renderContent = () => {
11757
+ return (0, vue.withDirectives)((0, vue.createVNode)("div", null, [(0, vue.createVNode)("div", {
11758
+ "class": [`${cls}-content`, props.classes?.itemContent],
11759
+ "style": props.styles?.itemContent
11760
+ }, [(0, vue.createVNode)("div", { "class": `${cls}-content-box` }, [contentNode])])]), [[vue.vShow, showContent]]);
11761
+ };
11750
11762
  return (0, vue.createVNode)("div", {
11751
11763
  "class": [`${cls}`, props.classes?.item],
11752
11764
  "style": props.styles?.item
@@ -11754,16 +11766,14 @@
11754
11766
  renderHeader(contentNode),
11755
11767
  hasContent && (0, vue.createVNode)(vue.Transition, {
11756
11768
  "name": `${props.prefixCls}-collapse`,
11769
+ "persisted": !destroyOnHidden,
11757
11770
  "onBeforeEnter": onBeforeEnter,
11758
11771
  "onEnter": onEnter,
11759
11772
  "onAfterEnter": onAfterEnter,
11760
11773
  "onBeforeLeave": onBeforeLeave,
11761
11774
  "onLeave": onLeave,
11762
11775
  "onAfterLeave": onAfterLeave
11763
- }, { default: () => [showContent ? (0, vue.createVNode)("div", null, [(0, vue.createVNode)("div", {
11764
- "class": [`${cls}-content`, props.classes?.itemContent],
11765
- "style": props.styles?.itemContent
11766
- }, [(0, vue.createVNode)("div", { "class": `${cls}-content-box` }, [contentNode])])]) : null] }),
11776
+ }, { default: () => [destroyOnHidden && !showContent ? null : renderContent()] }),
11767
11777
  hasRenderableNode(footerNode) && (0, vue.createVNode)("div", {
11768
11778
  "class": [`${cls}-footer`, props.classes?.itemFooter],
11769
11779
  "style": props.styles?.itemFooter
@@ -11824,7 +11834,7 @@
11824
11834
  },
11825
11835
  line: {
11826
11836
  type: [Boolean, String],
11827
- default: "solid"
11837
+ default: true
11828
11838
  }
11829
11839
  },
11830
11840
  emits: ["update:expandedKeys", "expand"],
@@ -11906,7 +11916,6 @@
11906
11916
  "key": key,
11907
11917
  "item": item,
11908
11918
  "index": index,
11909
- "isLast": index === items.length - 1,
11910
11919
  "prefixCls": prefixCls.value,
11911
11920
  "lineStyle": props.line,
11912
11921
  "expanded": mergedExpandedKeys.value.includes(key),
package/dist/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "1.1.3-beta.4";
2
+ var version = "1.2.0";
3
3
  //#endregion
4
4
  export { version };
@@ -120,8 +120,8 @@ var SlotTextArea_default = /* @__PURE__ */ defineComponent({
120
120
  if (nodeInfo.slotKey) {
121
121
  if (nodeInfo.nodeType === "nbsp") return " ";
122
122
  const config = nodeInfo.slotConfig;
123
- if (!config || config.type === "content") return element.innerText || "";
124
- const rawValue = slotValues.value[nodeInfo.slotKey];
123
+ if (!config) return element.innerText || "";
124
+ const rawValue = config.type === "content" ? element.innerText || "" : slotValues.value[nodeInfo.slotKey];
125
125
  return config.formatResult?.(rawValue) ?? stringifyValue(rawValue);
126
126
  }
127
127
  return element.innerText || "";
@@ -4,7 +4,11 @@ import { mergeToken } from "@antdv-next/cssinjs/cssinjs-utils";
4
4
  var genSuggestionStyle = (token) => {
5
5
  const { componentCls, antCls } = token;
6
6
  return { [componentCls]: {
7
- [`${antCls}-cascader-menus ${antCls}-cascader-menu`]: { height: "auto" },
7
+ [`${antCls}-cascader-menus ${antCls}-cascader-menu`]: {
8
+ height: "auto",
9
+ maxHeight: 256,
10
+ overflowY: "auto"
11
+ },
8
12
  [`${componentCls}-item`]: {
9
13
  "&-icon": { marginInlineEnd: token.paddingXXS },
10
14
  "&-extra": { marginInlineStart: token.padding }
@@ -49,6 +49,10 @@ export declare const XThink: import('vue').DefineComponent<import('vue').Extract
49
49
  type: BooleanConstructor;
50
50
  default: boolean;
51
51
  };
52
+ destroyOnHidden: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
52
56
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("expand" | "update:expanded")[], "expand" | "update:expanded", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
53
57
  prefixCls: {
54
58
  type: StringConstructor;
@@ -98,6 +102,10 @@ export declare const XThink: import('vue').DefineComponent<import('vue').Extract
98
102
  type: BooleanConstructor;
99
103
  default: boolean;
100
104
  };
105
+ destroyOnHidden: {
106
+ type: BooleanConstructor;
107
+ default: boolean;
108
+ };
101
109
  }>> & Readonly<{
102
110
  onExpand?: ((...args: any[]) => any) | undefined;
103
111
  "onUpdate:expanded"?: ((...args: any[]) => any) | undefined;
@@ -113,6 +121,7 @@ export declare const XThink: import('vue').DefineComponent<import('vue').Extract
113
121
  classes: Partial<Record<SemanticType, string>>;
114
122
  styles: Partial<Record<SemanticType, CSSProperties>>;
115
123
  title: VNodeChild;
124
+ destroyOnHidden: boolean;
116
125
  defaultExpanded: boolean;
117
126
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
118
127
  export default XThink;
@@ -1,7 +1,7 @@
1
1
  import useXComponentConfig from "../_utils/hooks/use-x-component-config.js";
2
2
  import think_default from "./icons/think.js";
3
3
  import style_default from "./style/index.js";
4
- import { Transition, computed, createVNode, defineComponent, mergeProps, ref, useAttrs, watch } from "vue";
4
+ import { Transition, computed, createVNode, defineComponent, mergeProps, ref, useAttrs, vShow, watch, withDirectives } from "vue";
5
5
  import { useConfig } from "antdv-next/config-provider/context";
6
6
  import { LoadingOutlined, RightOutlined } from "@antdv-next/icons";
7
7
  //#region components/think/Think.tsx
@@ -77,6 +77,10 @@ var XThink = /* @__PURE__ */ defineComponent({
77
77
  blink: {
78
78
  type: Boolean,
79
79
  default: false
80
+ },
81
+ destroyOnHidden: {
82
+ type: Boolean,
83
+ default: true
80
84
  }
81
85
  },
82
86
  emits: ["update:expanded", "expand"],
@@ -137,6 +141,16 @@ var XThink = /* @__PURE__ */ defineComponent({
137
141
  return rest;
138
142
  });
139
143
  const prefixCls = computed(() => props.prefixCls);
144
+ function renderContent() {
145
+ return withDirectives(createVNode("div", { "ref": contentRef }, [createVNode("div", {
146
+ "class": [
147
+ `${prefixCls.value}-content`,
148
+ contextConfig.value.classes?.content,
149
+ props.classes?.content
150
+ ],
151
+ "style": [contextConfig.value.styles?.content, props.styles?.content]
152
+ }, [slots.default?.()])]), [[vShow, mergedExpanded.value]]);
153
+ }
140
154
  expose({ get nativeElement() {
141
155
  return rootRef.value;
142
156
  } });
@@ -176,20 +190,14 @@ var XThink = /* @__PURE__ */ defineComponent({
176
190
  }, [createVNode(RightOutlined, null, null)])
177
191
  ]), createVNode(Transition, {
178
192
  "name": `${prefixCls.value}-collapse`,
193
+ "persisted": !props.destroyOnHidden,
179
194
  "onBeforeEnter": onBeforeEnter,
180
195
  "onEnter": onEnter,
181
196
  "onAfterEnter": onAfterEnter,
182
197
  "onBeforeLeave": onBeforeLeave,
183
198
  "onLeave": onLeave,
184
199
  "onAfterLeave": onAfterLeave
185
- }, { default: () => [mergedExpanded.value ? createVNode("div", { "ref": contentRef }, [createVNode("div", {
186
- "class": [
187
- `${prefixCls.value}-content`,
188
- contextConfig.value.classes?.content,
189
- props.classes?.content
190
- ],
191
- "style": [contextConfig.value.styles?.content, props.styles?.content]
192
- }, [slots.default?.()])]) : null] })]);
200
+ }, { default: () => [props.destroyOnHidden && !mergedExpanded.value ? null : renderContent()] })]);
193
201
  }
194
202
  });
195
203
  //#endregion
@@ -61,6 +61,12 @@ export interface ThinkProps extends Omit<HTMLAttributes, "title"> {
61
61
  * @descZH 标题文字闪烁动画
62
62
  */
63
63
  blink?: boolean;
64
+ /**
65
+ * @desc Whether to destroy the content node when collapsed
66
+ * @descZH 折叠时是否销毁内容节点
67
+ * @default true
68
+ */
69
+ destroyOnHidden?: boolean;
64
70
  }
65
71
  export interface ThinkRef {
66
72
  nativeElement: HTMLDivElement;
@@ -9,17 +9,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
9
9
  type: NumberConstructor;
10
10
  required: true;
11
11
  };
12
- isLast: {
13
- type: BooleanConstructor;
14
- default: boolean;
15
- };
16
12
  prefixCls: {
17
13
  type: StringConstructor;
18
14
  required: true;
19
15
  };
20
16
  lineStyle: {
21
17
  type: PropType<boolean | "solid" | "dashed" | "dotted">;
22
- default: string;
18
+ default: boolean;
23
19
  };
24
20
  expanded: {
25
21
  type: BooleanConstructor;
@@ -62,17 +58,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
62
58
  type: NumberConstructor;
63
59
  required: true;
64
60
  };
65
- isLast: {
66
- type: BooleanConstructor;
67
- default: boolean;
68
- };
69
61
  prefixCls: {
70
62
  type: StringConstructor;
71
63
  required: true;
72
64
  };
73
65
  lineStyle: {
74
66
  type: PropType<boolean | "solid" | "dashed" | "dotted">;
75
- default: string;
67
+ default: boolean;
76
68
  };
77
69
  expanded: {
78
70
  type: BooleanConstructor;
@@ -115,7 +107,6 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
115
107
  descriptionRenderSlot: ((info: ThoughtChainDescriptionSlotInfo) => VNodeChild) | undefined;
116
108
  iconRenderSlot: ((info: ThoughtChainIconSlotInfo) => VNodeChild) | undefined;
117
109
  titleRenderSlot: ((info: ThoughtChainTitleSlotInfo) => VNodeChild) | undefined;
118
- isLast: boolean;
119
110
  lineStyle: boolean | "dashed" | "dotted" | "solid";
120
111
  contentRenderSlot: ((info: ThoughtChainContentSlotInfo) => VNodeChild) | undefined;
121
112
  footerRenderSlot: ((info: ThoughtChainFooterSlotInfo) => VNodeChild) | undefined;
@@ -1,6 +1,6 @@
1
1
  import { hasRenderableNode } from "../_utils/vue.js";
2
2
  import { STATUS_ICON_MAP } from "./Status.js";
3
- import { Transition, computed, createVNode, defineComponent } from "vue";
3
+ import { Transition, computed, createVNode, defineComponent, vShow, withDirectives } from "vue";
4
4
  import { useConfig } from "antdv-next/config-provider/context";
5
5
  import { LeftOutlined, RightOutlined } from "@antdv-next/icons";
6
6
  //#region components/thought-chain/Node.tsx
@@ -15,17 +15,13 @@ var Node_default = /* @__PURE__ */ defineComponent({
15
15
  type: Number,
16
16
  required: true
17
17
  },
18
- isLast: {
19
- type: Boolean,
20
- default: false
21
- },
22
18
  prefixCls: {
23
19
  type: String,
24
20
  required: true
25
21
  },
26
22
  lineStyle: {
27
23
  type: [Boolean, String],
28
- default: "solid"
24
+ default: true
29
25
  },
30
26
  expanded: {
31
27
  type: Boolean,
@@ -65,11 +61,6 @@ var Node_default = /* @__PURE__ */ defineComponent({
65
61
  const configCtx = useConfig();
66
62
  const isRtl = computed(() => configCtx.value.direction === "rtl");
67
63
  const nodePrefixCls = computed(() => `${props.prefixCls}-node`);
68
- const resolvedLineStyle = computed(() => {
69
- if (props.lineStyle === false || props.isLast) return "none";
70
- if (props.lineStyle === true) return "solid";
71
- return props.lineStyle;
72
- });
73
64
  const statusCls = computed(() => `${props.prefixCls}-status`);
74
65
  const createSharedSlotInfo = (collapsible) => ({
75
66
  item: props.item,
@@ -95,7 +86,8 @@ var Node_default = /* @__PURE__ */ defineComponent({
95
86
  props.classes?.itemIcon,
96
87
  {
97
88
  [`${statusCls.value}-${item.status}`]: item.status,
98
- [`${nodePrefixCls.value}-icon-${resolvedLineStyle.value}`]: typeof props.lineStyle !== "boolean" && resolvedLineStyle.value !== "none"
89
+ [`${nodePrefixCls.value}-icon-${props.lineStyle}`]: typeof props.lineStyle === "string",
90
+ [`${nodePrefixCls.value}-icon-none`]: props.lineStyle === false
99
91
  }
100
92
  ],
101
93
  "style": props.styles?.itemIcon
@@ -172,6 +164,13 @@ var Node_default = /* @__PURE__ */ defineComponent({
172
164
  originNode: item.footer
173
165
  }) : item.footer;
174
166
  const showContent = hasContent && (!collapsible || props.expanded);
167
+ const destroyOnHidden = item.destroyOnHidden ?? true;
168
+ const renderContent = () => {
169
+ return withDirectives(createVNode("div", null, [createVNode("div", {
170
+ "class": [`${cls}-content`, props.classes?.itemContent],
171
+ "style": props.styles?.itemContent
172
+ }, [createVNode("div", { "class": `${cls}-content-box` }, [contentNode])])]), [[vShow, showContent]]);
173
+ };
175
174
  return createVNode("div", {
176
175
  "class": [`${cls}`, props.classes?.item],
177
176
  "style": props.styles?.item
@@ -179,16 +178,14 @@ var Node_default = /* @__PURE__ */ defineComponent({
179
178
  renderHeader(contentNode),
180
179
  hasContent && createVNode(Transition, {
181
180
  "name": `${props.prefixCls}-collapse`,
181
+ "persisted": !destroyOnHidden,
182
182
  "onBeforeEnter": onBeforeEnter,
183
183
  "onEnter": onEnter,
184
184
  "onAfterEnter": onAfterEnter,
185
185
  "onBeforeLeave": onBeforeLeave,
186
186
  "onLeave": onLeave,
187
187
  "onAfterLeave": onAfterLeave
188
- }, { default: () => [showContent ? createVNode("div", null, [createVNode("div", {
189
- "class": [`${cls}-content`, props.classes?.itemContent],
190
- "style": props.styles?.itemContent
191
- }, [createVNode("div", { "class": `${cls}-content-box` }, [contentNode])])]) : null] }),
188
+ }, { default: () => [destroyOnHidden && !showContent ? null : renderContent()] }),
192
189
  hasRenderableNode(footerNode) && createVNode("div", {
193
190
  "class": [`${cls}-footer`, props.classes?.itemFooter],
194
191
  "style": props.styles?.itemFooter
@@ -39,7 +39,7 @@ export declare const XThoughtChain: import('vue').DefineComponent<import('vue').
39
39
  };
40
40
  line: {
41
41
  type: PropType<boolean | "solid" | "dashed" | "dotted">;
42
- default: string;
42
+ default: boolean;
43
43
  };
44
44
  }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("expand" | "update:expandedKeys")[], "expand" | "update:expandedKeys", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
45
45
  prefixCls: {
@@ -80,7 +80,7 @@ export declare const XThoughtChain: import('vue').DefineComponent<import('vue').
80
80
  };
81
81
  line: {
82
82
  type: PropType<boolean | "solid" | "dashed" | "dotted">;
83
- default: string;
83
+ default: boolean;
84
84
  };
85
85
  }>> & Readonly<{
86
86
  onExpand?: ((...args: any[]) => any) | undefined;
@@ -54,7 +54,7 @@ var XThoughtChain = /* @__PURE__ */ defineComponent({
54
54
  },
55
55
  line: {
56
56
  type: [Boolean, String],
57
- default: "solid"
57
+ default: true
58
58
  }
59
59
  },
60
60
  emits: ["update:expandedKeys", "expand"],
@@ -136,7 +136,6 @@ var XThoughtChain = /* @__PURE__ */ defineComponent({
136
136
  "key": key,
137
137
  "item": item,
138
138
  "index": index,
139
- "isLast": index === items.length - 1,
140
139
  "prefixCls": prefixCls.value,
141
140
  "lineStyle": props.line,
142
141
  "expanded": mergedExpandedKeys.value.includes(key),
@@ -70,6 +70,12 @@ export interface ThoughtChainItemType {
70
70
  * @descZH 标题闪烁动画
71
71
  */
72
72
  blink?: boolean;
73
+ /**
74
+ * @desc Whether to destroy the content node when collapsed
75
+ * @descZH 折叠时是否销毁内容节点
76
+ * @default true
77
+ */
78
+ destroyOnHidden?: boolean;
73
79
  }
74
80
  export interface ThoughtChainProps extends Omit<HTMLAttributes, "title"> {
75
81
  /**
@@ -52,6 +52,7 @@ var genThoughtChainStyle = (token) => {
52
52
  top: unit(calc(iconSize).mul(token.lineHeight).equal())
53
53
  }
54
54
  },
55
+ [`${componentCls}-node-icon-none`]: { "&:after": { display: "none" } },
55
56
  [`${componentCls}-node-icon-dashed`]: { "&:after": { borderInlineStart: `${unit(token.lineWidth)} dashed ${token.colorFillContent}` } },
56
57
  [`${componentCls}-node-icon-dotted`]: { "&:after": { borderInlineStart: `${unit(token.lineWidth)} dotted ${token.colorFillContent}` } },
57
58
  [`${componentCls}-node-index-icon`]: {
@@ -2,7 +2,7 @@ export declare const defaultPrefixCls = "ant";
2
2
  export default function useXProviderContext(): {
3
3
  theme: import('antdv-next').ThemeConfig | undefined;
4
4
  getPrefixCls: (suffixCls?: string, customizePrefixCls?: string) => string;
5
- direction: import('antdv-next/config-provider/context').DirectionType;
6
- csp: import('antdv-next/config-provider/context').CSPConfig | undefined;
5
+ direction: import('antdv-next/dist/config-provider/context').DirectionType;
6
+ csp: import('antdv-next/dist/config-provider/context').CSPConfig | undefined;
7
7
  iconPrefixCls: string;
8
8
  };
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/stylis/src/Enum.js
1
+ //#region ../../node_modules/.pnpm/stylis@4.3.6/node_modules/stylis/src/Enum.js
2
2
  var e = "-ms-", t = "-moz-", n = "-webkit-", r = "comm", i = "rule", a = "decl", o = "@import", s = "@namespace", c = "@keyframes", l = "@layer", u = Math.abs, d = String.fromCharCode, f = Object.assign;
3
3
  function p(e, t) {
4
4
  return v(e, 0) ^ 45 ? (((t << 2 ^ v(e, 0)) << 2 ^ v(e, 1)) << 2 ^ v(e, 2)) << 2 ^ v(e, 3) : 0;
@@ -39,7 +39,7 @@ function w(e, t) {
39
39
  });
40
40
  }
41
41
  //#endregion
42
- //#region ../../node_modules/stylis/src/Tokenizer.js
42
+ //#region ../../node_modules/.pnpm/stylis@4.3.6/node_modules/stylis/src/Tokenizer.js
43
43
  var T = 1, E = 1, D = 0, O = 0, k = 0, A = "";
44
44
  function j(e, t, n, r, i, a, o, s) {
45
45
  return {
@@ -150,7 +150,7 @@ function J(e) {
150
150
  return z(e, O);
151
151
  }
152
152
  //#endregion
153
- //#region ../../node_modules/stylis/src/Parser.js
153
+ //#region ../../node_modules/.pnpm/stylis@4.3.6/node_modules/stylis/src/Parser.js
154
154
  function Y(e) {
155
155
  return H(X("", null, null, null, [""], e = V(e), 0, [0], e));
156
156
  }
@@ -241,7 +241,7 @@ function Q(e, t, n, r, i) {
241
241
  return j(e, t, n, a, y(e, 0, r), y(e, r + 1, -1), r, i);
242
242
  }
243
243
  //#endregion
244
- //#region ../../node_modules/stylis/src/Serializer.js
244
+ //#region ../../node_modules/.pnpm/stylis@4.3.6/node_modules/stylis/src/Serializer.js
245
245
  function $(e, t) {
246
246
  for (var n = "", r = 0; r < e.length; r++) n += t(e[r], r, e, t) || "";
247
247
  return n;