@antdv-next/x 1.1.0 → 1.1.2-beta.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 (117) hide show
  1. package/dist/attachments/index.js +2 -1
  2. package/dist/index.umd.js +41 -6
  3. package/dist/package.js +1 -1
  4. package/dist/sender/Sender.d.ts +4 -2
  5. package/dist/sender/Sender.js +5 -2
  6. package/dist/sender/components/SlotTextArea.js +26 -0
  7. package/dist/sources/Sources.d.ts +2 -1
  8. package/dist/sources/Sources.js +2 -1
  9. package/dist/suggestion/Suggestion.d.ts +2 -1
  10. package/dist/suggestion/Suggestion.js +6 -1
  11. package/dist/x-provider/hooks/use-x-provider-context.d.ts +2 -2
  12. package/es/{Serializer-y_SfSPKv.js → Serializer-D1JYN1kI.js} +4 -4
  13. package/es/{_basePickBy-Cy7KVmkk.js → _basePickBy-DFHEGO2M.js} +23 -23
  14. package/es/{_baseUniq-Ch3HuHeT.js → _baseUniq-BlS7rXTs.js} +83 -83
  15. package/es/antdv-next-x.esm.js +487 -472
  16. package/es/{arc-caEkbRYF.js → arc-BuXEd18J.js} +3 -3
  17. package/es/architecture-PBZL5I3N-D7tS55xM.js +3 -0
  18. package/es/{architectureDiagram-2XIMDMQ5-B4BHdsAL.js → architectureDiagram-2XIMDMQ5-CmfsCwJk.js} +9 -9
  19. package/es/{blockDiagram-WCTKOSBZ-nXanZ0sc.js → blockDiagram-WCTKOSBZ-lJAan65A.js} +12 -12
  20. package/es/{c4Diagram-IC4MRINW-C-gVp6th.js → c4Diagram-IC4MRINW-B1c2x_1Q.js} +6 -6
  21. package/es/channel-DFgF_2F7.js +5 -0
  22. package/es/{chunk-4BX2VUAB-fLFD6XW0.js → chunk-4BX2VUAB-J2N81Fpp.js} +2 -2
  23. package/es/{chunk-55IACEB6-OtyKJzCH.js → chunk-55IACEB6-DGtfGRgi.js} +2 -2
  24. package/es/{chunk-7E7YKBS2-C1dd36rm.js → chunk-7E7YKBS2-CL2d4WAf.js} +2 -2
  25. package/es/{chunk-7R4GIKGN-DuTRhdsf.js → chunk-7R4GIKGN-QT6IorJ_.js} +3 -3
  26. package/es/{chunk-C72U2L5F-ClmZGhFC.js → chunk-C72U2L5F-OHTVpS-m.js} +2 -2
  27. package/es/{chunk-EGIJ26TM-Bar_u1MN.js → chunk-EGIJ26TM-DyMPGYrB.js} +2 -2
  28. package/es/{chunk-FMBD7UC4-C_uJ_JJA.js → chunk-FMBD7UC4-DCcRjunY.js} +2 -2
  29. package/es/{chunk-GEFDOKGD-P7WhyrTU.js → chunk-GEFDOKGD-BWpC-zoH.js} +30 -30
  30. package/es/{chunk-GLR3WWYH-BvazRgdo.js → chunk-GLR3WWYH-DiXcKb5Y.js} +8 -8
  31. package/es/{chunk-HHEYEP7N-rv5s5WD4.js → chunk-HHEYEP7N-Cxc7E4dX.js} +3 -3
  32. package/es/{chunk-JSJVCQXG-89HUGe9V.js → chunk-JSJVCQXG-D8_heHOp.js} +4 -4
  33. package/es/{chunk-KX2RTZJC-pMHnNRQg.js → chunk-KX2RTZJC-D5cc4rj6.js} +3 -3
  34. package/es/{chunk-KYZI473N-DJmSs1gK.js → chunk-KYZI473N-BHJ3T5Zv.js} +8 -8
  35. package/es/{chunk-L3YUKLVL-Ck54qytQ.js → chunk-L3YUKLVL-7oGaUOdc.js} +2 -2
  36. package/es/{chunk-MX3YWQON-MkpK3uBD.js → chunk-MX3YWQON-BxE-Aq9c.js} +2 -2
  37. package/es/{chunk-NQ4KR5QH-DGshodQv.js → chunk-NQ4KR5QH-EYQBXkqP.js} +7 -7
  38. package/es/{chunk-O4XLMI2P-e-ZzDQwg.js → chunk-O4XLMI2P-qjOoGpnx.js} +11 -11
  39. package/es/{chunk-OZEHJAEY-DULNd43V.js → chunk-OZEHJAEY-D82nx27s.js} +2 -2
  40. package/es/{chunk-PQ6SQG4A-CQ9Csv7s.js → chunk-PQ6SQG4A-D3jtNCWN.js} +3 -3
  41. package/es/{chunk-PU5JKC2W-DkEFvrjH.js → chunk-PU5JKC2W-DdP8BS-S.js} +16 -16
  42. package/es/{chunk-QZHKN3VN-qww1plfw.js → chunk-QZHKN3VN-CW3cFN-h.js} +2 -2
  43. package/es/{chunk-R5LLSJPH-BERXSDGJ.js → chunk-R5LLSJPH-CreI2kO9.js} +2 -2
  44. package/es/{chunk-WL4C6EOR-C-d8WPS7.js → chunk-WL4C6EOR-BDbxJyGk.js} +9 -9
  45. package/es/{chunk-XIRO2GV7-CFHofxVB.js → chunk-XIRO2GV7-S5KkbVnN.js} +2 -2
  46. package/es/{chunk-XPW4576I-DgvoNZkW.js → chunk-XPW4576I-B0KVSHwE.js} +2 -2
  47. package/es/{chunk-XZSTWKYB-k8_EXrSa.js → chunk-XZSTWKYB-CucN1XvM.js} +93 -93
  48. package/es/{chunk-YBOYWFTD-BUW4AzEX.js → chunk-YBOYWFTD-CvaddD9G.js} +4 -4
  49. package/es/classDiagram-VBA2DB6C-Co3LMmg8.js +29 -0
  50. package/es/classDiagram-v2-RAHNMMFH-BZscgdF2.js +29 -0
  51. package/es/clone-r3YukIBB.js +8 -0
  52. package/es/{cose-bilkent-S5V4N54A-CnrS2OC1.js → cose-bilkent-S5V4N54A-B5OQuIhl.js} +3 -3
  53. package/es/{cytoscape.esm-BY3wHcbp.js → cytoscape.esm-i2CZcWd-.js} +1 -1
  54. package/es/{dagre-BJOzGlhW.js → dagre-5aGJFKmT.js} +57 -57
  55. package/es/{dagre-KLK3FWXG-CFC0naVr.js → dagre-KLK3FWXG-BI5QQMXo.js} +16 -16
  56. package/es/{defaultLocale-BaPFSbai.js → defaultLocale-bckJcYh1.js} +12 -12
  57. package/es/{diagram-E7M64L7V-DxuJj8ZG.js → diagram-E7M64L7V-Dz62Vz_a.js} +32 -32
  58. package/es/{diagram-IFDJBPK2-BOpPZ6pu.js → diagram-IFDJBPK2-9fjvFkSc.js} +7 -7
  59. package/es/{diagram-P4PSJMXO--ChDmcya.js → diagram-P4PSJMXO-BlX6jFjZ.js} +7 -7
  60. package/es/{dist-DltyvPj3.js → dist-BX_roQzC.js} +1 -1
  61. package/es/{erDiagram-INFDFZHY-BA3m-v87.js → erDiagram-INFDFZHY-BcRXu8Cp.js} +14 -14
  62. package/es/{flowDiagram-PKNHOUZH-BCq6k3kr.js → flowDiagram-PKNHOUZH-UeyfgU8z.js} +17 -17
  63. package/es/{ganttDiagram-A5KZAMGK-DdMePS21.js → ganttDiagram-A5KZAMGK-txCzqgQ5.js} +28 -28
  64. package/es/gitGraph-HDMCJU4V-CxsS0Qr1.js +3 -0
  65. package/es/{gitGraphDiagram-K3NZZRJ6-CLbRwChG.js → gitGraphDiagram-K3NZZRJ6-DghWYaFU.js} +7 -7
  66. package/es/{graphlib-C7ysKz4u.js → graphlib-dRkI1OCL.js} +4 -4
  67. package/es/{html-C2-_98S6.js → html-B6UxjOv0.js} +1 -1
  68. package/es/html-Hb1oe8XT.js +2 -0
  69. package/es/info-3K5VOQVL-COqdvM99.js +3 -0
  70. package/es/{infoDiagram-LFFYTUFH-DQAZ-vFk.js → infoDiagram-LFFYTUFH-CA-vlAvP.js} +5 -5
  71. package/es/{init-PAs0hR-b.js → init-B75p2clj.js} +1 -1
  72. package/es/{isArrayLikeObject-y3HlYDaX.js → isArrayLikeObject-jl2bjkAJ.js} +80 -80
  73. package/es/{isEmpty-2JxdWtc-.js → isEmpty-CmA-HYrg.js} +3 -3
  74. package/es/{ishikawaDiagram-PHBUUO56-B0r2IgGz.js → ishikawaDiagram-PHBUUO56-DjdpS9Lb.js} +6 -6
  75. package/es/{journeyDiagram-4ABVD52K-DnMUhOvg.js → journeyDiagram-4ABVD52K-CIJfC1fp.js} +6 -6
  76. package/es/{kanban-definition-K7BYSVSG-Da5Y-nJy.js → kanban-definition-K7BYSVSG-CC2vwGck.js} +11 -11
  77. package/es/{katex-b-xdokOf.js → katex-DCMiIo1z.js} +1 -1
  78. package/es/{line-h2iCTGsE.js → line-Cu9NTacD.js} +4 -4
  79. package/es/{linear-Bv7XrZCH.js → linear-C0rAYYmp.js} +23 -23
  80. package/es/{math-DPzKeDKn.js → math-CoDOuve-.js} +1 -1
  81. package/es/{mermaid-parser.core-kTgpNO7M.js → mermaid-parser.core-7Wn2L29P.js} +16 -16
  82. package/es/{mermaid.core-Db1VE3-f.js → mermaid.core-Bvy_Q6Hu.js} +44 -44
  83. package/es/{mindmap-definition-YRQLILUH-CYeqnCde.js → mindmap-definition-YRQLILUH-BzTYDYmK.js} +16 -16
  84. package/es/{ordinal-D8PKtxfM.js → ordinal-F3U6aXtP.js} +3 -3
  85. package/es/packet-RMMSAZCW-2PTjWKLd.js +3 -0
  86. package/es/{path-DZ-6AyWK.js → path-Dm3C8WEs.js} +3 -3
  87. package/es/pie-UPGHQEXC-Du8-k-EA.js +3 -0
  88. package/es/{pieDiagram-SKSYHLDU-DAsfTGvY.js → pieDiagram-SKSYHLDU-COvqE_C6.js} +14 -14
  89. package/es/{quadrantDiagram-337W2JSQ-CZLbmQS4.js → quadrantDiagram-337W2JSQ-Dgv8ccjt.js} +4 -4
  90. package/es/radar-KQ55EAFF-jJOhyjxC.js +3 -0
  91. package/es/{requirementDiagram-Z7DCOOCP-Cb_Ygnfe.js → requirementDiagram-Z7DCOOCP-B2NyhxO-.js} +13 -13
  92. package/es/{rough.esm-C_hJ3ICT.js → rough.esm-BhGP2Udb.js} +1 -1
  93. package/es/{sankeyDiagram-WA2Y5GQK-DBe5YfW4.js → sankeyDiagram-WA2Y5GQK-BfnH_gpl.js} +18 -18
  94. package/es/{sequenceDiagram-2WXFIKYE-C_KUoojT.js → sequenceDiagram-2WXFIKYE-DXssVQOF.js} +8 -8
  95. package/es/{src-BukXhifV.js → src-CUQ6oOYk.js} +86 -86
  96. package/es/{stateDiagram-RAJIS63D-boG6DyfW.js → stateDiagram-RAJIS63D-DvDLfupV.js} +17 -17
  97. package/es/stateDiagram-v2-FVOUBMTO-DIXyaX9W.js +27 -0
  98. package/es/{timeline-definition-YZTLITO2-pFt6rZ6S.js → timeline-definition-YZTLITO2-ErcRjbZf.js} +4 -4
  99. package/es/treemap-KZPCXAKY-CvZAIYVa.js +3 -0
  100. package/es/{vennDiagram-LZ73GAT5-VaCO6k4H.js → vennDiagram-LZ73GAT5-CDTZUtc8.js} +7 -7
  101. package/es/{vue-DTiWrQBM.js → vue-2aJw7p5p.js} +2 -2
  102. package/es/{vue-html-BG3Xflut.js → vue-html-DEjI8X9t.js} +1 -1
  103. package/es/{xychartDiagram-JWTSCODW-xS5ybemA.js → xychartDiagram-JWTSCODW-Y21jBOTg.js} +12 -12
  104. package/package.json +1 -1
  105. package/es/architecture-PBZL5I3N-DHfBr78A.js +0 -3
  106. package/es/channel-DoEe9DF9.js +0 -5
  107. package/es/classDiagram-VBA2DB6C-DWTAs0Zm.js +0 -29
  108. package/es/classDiagram-v2-RAHNMMFH-CoxCdmrt.js +0 -29
  109. package/es/clone-BXDbKCDu.js +0 -8
  110. package/es/gitGraph-HDMCJU4V-DbzpICZW.js +0 -3
  111. package/es/html-JbFqcNgP.js +0 -2
  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
@@ -118,7 +118,7 @@ var XAttachments = /* @__PURE__ */ defineComponent({
118
118
  default: true
119
119
  }
120
120
  },
121
- emits: ["change"],
121
+ emits: ["update:items", "change"],
122
122
  setup(props, { attrs, emit, slots, expose }) {
123
123
  const configCtx = useConfig();
124
124
  const contextConfig = useXComponentConfig("attachments");
@@ -142,6 +142,7 @@ var XAttachments = /* @__PURE__ */ defineComponent({
142
142
  });
143
143
  const triggerChange = (info) => {
144
144
  fileList.value = info.fileList;
145
+ emit("update:items", info.fileList);
145
146
  emit("change", info);
146
147
  };
147
148
  const onUploadChange = (info) => {
package/dist/index.umd.js CHANGED
@@ -48,7 +48,7 @@
48
48
  shiki_dist_themes_vitesse_dark_mjs = __toESM(shiki_dist_themes_vitesse_dark_mjs);
49
49
  shiki_dist_themes_vitesse_light_mjs = __toESM(shiki_dist_themes_vitesse_light_mjs);
50
50
  //#region package.json
51
- var version = "1.1.0";
51
+ var version = "1.1.2-beta.1";
52
52
  //#endregion
53
53
  //#region components/x-provider/context.ts
54
54
  var XProviderContextKey = Symbol("antdv-next-x-provider-context");
@@ -3060,7 +3060,7 @@
3060
3060
  default: true
3061
3061
  }
3062
3062
  },
3063
- emits: ["change"],
3063
+ emits: ["update:items", "change"],
3064
3064
  setup(props, { attrs, emit, slots, expose }) {
3065
3065
  const configCtx = (0, antdv_next_config_provider_context.useConfig)();
3066
3066
  const contextConfig = useXComponentConfig("attachments");
@@ -3084,6 +3084,7 @@
3084
3084
  });
3085
3085
  const triggerChange = (info) => {
3086
3086
  fileList.value = info.fileList;
3087
+ emit("update:items", info.fileList);
3087
3088
  emit("change", info);
3088
3089
  };
3089
3090
  const onUploadChange = (info) => {
@@ -8709,8 +8710,34 @@
8709
8710
  if (event.key === "Enter") keyLock.value = false;
8710
8711
  senderCtx.value.onKeyUp?.(event);
8711
8712
  };
8713
+ const normalizeSkillTextInput = () => {
8714
+ const editable = editableRef.value;
8715
+ const skillDom = skillDomRef.value;
8716
+ if (!editable || !skillDom) return;
8717
+ const selection = getSelection();
8718
+ const cursorNode = selection?.anchorNode && skillDom.contains(selection.anchorNode) ? selection.anchorNode : null;
8719
+ const cursorOffset = selection?.anchorOffset ?? 0;
8720
+ const wrapperCls = `${prefixCls.value}-skill-wrapper`;
8721
+ const textNodes = Array.from(skillDom.childNodes).filter((node) => {
8722
+ if (node instanceof HTMLElement && node.classList.contains(wrapperCls)) return false;
8723
+ return node.textContent;
8724
+ });
8725
+ const referenceNode = skillDom.nextSibling;
8726
+ textNodes.forEach((node) => {
8727
+ editable.insertBefore(node, referenceNode);
8728
+ });
8729
+ if (cursorNode && editable.contains(cursorNode)) {
8730
+ const range = document.createRange();
8731
+ const nextOffset = cursorNode.nodeType === Node.TEXT_NODE ? Math.min(cursorOffset, cursorNode.textContent?.length ?? 0) : Math.min(cursorOffset, cursorNode.childNodes.length);
8732
+ range.setStart(cursorNode, nextOffset);
8733
+ range.collapse(true);
8734
+ selection?.removeAllRanges();
8735
+ selection?.addRange(range);
8736
+ }
8737
+ };
8712
8738
  const onInternalInput = (event) => {
8713
8739
  removeSpecificBRs();
8740
+ normalizeSkillTextInput();
8714
8741
  triggerValueChange(event);
8715
8742
  };
8716
8743
  const onInternalPaste = (event) => {
@@ -9680,7 +9707,8 @@
9680
9707
  default: void 0
9681
9708
  }
9682
9709
  },
9683
- setup(props, { expose, slots }) {
9710
+ emits: ["update:value"],
9711
+ setup(props, { expose, slots, emit }) {
9684
9712
  const attrs = (0, vue.useAttrs)();
9685
9713
  const configCtx = (0, antdv_next_config_provider_context.useConfig)();
9686
9714
  const contextConfig = useXComponentConfig("sender");
@@ -9694,6 +9722,7 @@
9694
9722
  const mergedValue = (0, vue.computed)(() => props.value ?? innerValue.value);
9695
9723
  const triggerValueChange = (nextValue, event, slotConfig, skill) => {
9696
9724
  innerValue.value = nextValue;
9725
+ emit("update:value", nextValue);
9697
9726
  props.onChange?.(nextValue, event, slotConfig, skill);
9698
9727
  };
9699
9728
  const submitDisabled = (0, vue.ref)(!mergedValue.value);
@@ -9806,7 +9835,7 @@
9806
9835
  return () => {
9807
9836
  const cls = prefixCls.value;
9808
9837
  const actionListCls = `${cls}-actions-list`;
9809
- const actionNode = (0, vue.createVNode)("div", { "class": `${actionListCls}-presets` }, [props.allowSpeech && (0, vue.createVNode)(SpeechButton_default, null, null), props.loading ? (0, vue.createVNode)(LoadingButton_default, null, null) : (0, vue.createVNode)(SendButton_default, null, null)]);
9838
+ const actionNode = (0, vue.createVNode)(antdv_next.Flex, { "class": `${actionListCls}-presets` }, { default: () => [props.allowSpeech && (0, vue.createVNode)(SpeechButton_default, null, null), props.loading ? (0, vue.createVNode)(LoadingButton_default, null, null) : (0, vue.createVNode)(SendButton_default, null, null)] });
9810
9839
  const suffixNode = renderNode(props.suffix, "suffix", actionNode) ?? actionNode;
9811
9840
  const prefixNode = renderNode(props.prefix, "prefix", actionNode);
9812
9841
  const headerNode = renderNode(props.header, "header", actionNode);
@@ -10418,7 +10447,7 @@
10418
10447
  default: void 0
10419
10448
  }
10420
10449
  },
10421
- emits: ["expand"],
10450
+ emits: ["update:expanded", "expand"],
10422
10451
  setup(props, { slots, expose, emit }) {
10423
10452
  const configCtx = (0, antdv_next_config_provider_context.useConfig)();
10424
10453
  const attrs = (0, vue.useAttrs)();
@@ -10438,6 +10467,7 @@
10438
10467
  const toggleExpand = () => {
10439
10468
  const newExpand = !isExpand.value;
10440
10469
  if (props.expanded === void 0) innerExpanded.value = newExpand;
10470
+ emit("update:expanded", newExpand);
10441
10471
  emit("expand", newExpand);
10442
10472
  };
10443
10473
  const domAttrs = (0, vue.computed)(() => {
@@ -10687,7 +10717,11 @@
10687
10717
  default: false
10688
10718
  }
10689
10719
  },
10690
- emits: ["openChange", "select"],
10720
+ emits: [
10721
+ "update:open",
10722
+ "openChange",
10723
+ "select"
10724
+ ],
10691
10725
  setup(props, { slots, emit }) {
10692
10726
  const attrs = (0, vue.useAttrs)();
10693
10727
  const configCtx = (0, antdv_next_config_provider_context.useConfig)();
@@ -10720,6 +10754,7 @@
10720
10754
  }, { immediate: true });
10721
10755
  const triggerOpen = (nextOpen) => {
10722
10756
  if (props.open === void 0) innerOpen.value = nextOpen;
10757
+ emit("update:open", nextOpen);
10723
10758
  emit("openChange", nextOpen);
10724
10759
  };
10725
10760
  const onClose = () => {
package/dist/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "1.1.0";
2
+ var version = "1.1.2-beta.1";
3
3
  //#endregion
4
4
  export { version };
@@ -126,7 +126,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
126
126
  type: PropType<(event: FocusEvent) => void>;
127
127
  default: undefined;
128
128
  };
129
- }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
129
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "update:value"[], "update:value", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
130
130
  prefixCls: {
131
131
  type: StringConstructor;
132
132
  default: string;
@@ -252,7 +252,9 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
252
252
  type: PropType<(event: FocusEvent) => void>;
253
253
  default: undefined;
254
254
  };
255
- }>> & Readonly<{}>, {
255
+ }>> & Readonly<{
256
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
257
+ }>, {
256
258
  prefixCls: string;
257
259
  style: StyleValue;
258
260
  disabled: boolean;
@@ -11,6 +11,7 @@ import useSpeech from "./hooks/use-speech.js";
11
11
  import style_default from "./style/index.js";
12
12
  import { computed, createVNode, defineComponent, mergeProps, ref, useAttrs, watch } from "vue";
13
13
  import { useConfig } from "antdv-next/config-provider/context";
14
+ import { Flex } from "antdv-next";
14
15
  //#region components/sender/Sender.tsx
15
16
  var sharedRenderComponents = {
16
17
  SendButton: SendButton_default,
@@ -163,7 +164,8 @@ var Sender_default = /* @__PURE__ */ defineComponent({
163
164
  default: void 0
164
165
  }
165
166
  },
166
- setup(props, { expose, slots }) {
167
+ emits: ["update:value"],
168
+ setup(props, { expose, slots, emit }) {
167
169
  const attrs = useAttrs();
168
170
  const configCtx = useConfig();
169
171
  const contextConfig = useXComponentConfig("sender");
@@ -177,6 +179,7 @@ var Sender_default = /* @__PURE__ */ defineComponent({
177
179
  const mergedValue = computed(() => props.value ?? innerValue.value);
178
180
  const triggerValueChange = (nextValue, event, slotConfig, skill) => {
179
181
  innerValue.value = nextValue;
182
+ emit("update:value", nextValue);
180
183
  props.onChange?.(nextValue, event, slotConfig, skill);
181
184
  };
182
185
  const submitDisabled = ref(!mergedValue.value);
@@ -289,7 +292,7 @@ var Sender_default = /* @__PURE__ */ defineComponent({
289
292
  return () => {
290
293
  const cls = prefixCls.value;
291
294
  const actionListCls = `${cls}-actions-list`;
292
- const actionNode = createVNode("div", { "class": `${actionListCls}-presets` }, [props.allowSpeech && createVNode(SpeechButton_default, null, null), props.loading ? createVNode(LoadingButton_default, null, null) : createVNode(SendButton_default, null, null)]);
295
+ const actionNode = createVNode(Flex, { "class": `${actionListCls}-presets` }, { default: () => [props.allowSpeech && createVNode(SpeechButton_default, null, null), props.loading ? createVNode(LoadingButton_default, null, null) : createVNode(SendButton_default, null, null)] });
293
296
  const suffixNode = renderNode(props.suffix, "suffix", actionNode) ?? actionNode;
294
297
  const prefixNode = renderNode(props.prefix, "prefix", actionNode);
295
298
  const headerNode = renderNode(props.header, "header", actionNode);
@@ -542,8 +542,34 @@ var SlotTextArea_default = /* @__PURE__ */ defineComponent({
542
542
  if (event.key === "Enter") keyLock.value = false;
543
543
  senderCtx.value.onKeyUp?.(event);
544
544
  };
545
+ const normalizeSkillTextInput = () => {
546
+ const editable = editableRef.value;
547
+ const skillDom = skillDomRef.value;
548
+ if (!editable || !skillDom) return;
549
+ const selection = getSelection();
550
+ const cursorNode = selection?.anchorNode && skillDom.contains(selection.anchorNode) ? selection.anchorNode : null;
551
+ const cursorOffset = selection?.anchorOffset ?? 0;
552
+ const wrapperCls = `${prefixCls.value}-skill-wrapper`;
553
+ const textNodes = Array.from(skillDom.childNodes).filter((node) => {
554
+ if (node instanceof HTMLElement && node.classList.contains(wrapperCls)) return false;
555
+ return node.textContent;
556
+ });
557
+ const referenceNode = skillDom.nextSibling;
558
+ textNodes.forEach((node) => {
559
+ editable.insertBefore(node, referenceNode);
560
+ });
561
+ if (cursorNode && editable.contains(cursorNode)) {
562
+ const range = document.createRange();
563
+ const nextOffset = cursorNode.nodeType === Node.TEXT_NODE ? Math.min(cursorOffset, cursorNode.textContent?.length ?? 0) : Math.min(cursorOffset, cursorNode.childNodes.length);
564
+ range.setStart(cursorNode, nextOffset);
565
+ range.collapse(true);
566
+ selection?.removeAllRanges();
567
+ selection?.addRange(range);
568
+ }
569
+ };
545
570
  const onInternalInput = (event) => {
546
571
  removeSpecificBRs();
572
+ normalizeSkillTextInput();
547
573
  triggerValueChange(event);
548
574
  };
549
575
  const onInternalPaste = (event) => {
@@ -61,7 +61,7 @@ export declare const XSources: import('vue').DefineComponent<import('vue').Extra
61
61
  type: BooleanConstructor;
62
62
  default: undefined;
63
63
  };
64
- }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, "expand"[], "expand", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
64
+ }>, () => 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<{
65
65
  prefixCls: {
66
66
  type: StringConstructor;
67
67
  default: string;
@@ -124,6 +124,7 @@ export declare const XSources: import('vue').DefineComponent<import('vue').Extra
124
124
  };
125
125
  }>> & Readonly<{
126
126
  onExpand?: ((...args: any[]) => any) | undefined;
127
+ "onUpdate:expanded"?: ((...args: any[]) => any) | undefined;
127
128
  }>, {
128
129
  prefixCls: string;
129
130
  inline: boolean;
@@ -85,7 +85,7 @@ var XSources = /* @__PURE__ */ defineComponent({
85
85
  default: void 0
86
86
  }
87
87
  },
88
- emits: ["expand"],
88
+ emits: ["update:expanded", "expand"],
89
89
  setup(props, { slots, expose, emit }) {
90
90
  const configCtx = useConfig();
91
91
  const attrs = useAttrs();
@@ -105,6 +105,7 @@ var XSources = /* @__PURE__ */ defineComponent({
105
105
  const toggleExpand = () => {
106
106
  const newExpand = !isExpand.value;
107
107
  if (props.expanded === void 0) innerExpanded.value = newExpand;
108
+ emit("update:expanded", newExpand);
108
109
  emit("expand", newExpand);
109
110
  };
110
111
  const domAttrs = computed(() => {
@@ -37,7 +37,7 @@ declare const XSuggestion: import('vue').DefineComponent<import('vue').ExtractPr
37
37
  type: BooleanConstructor;
38
38
  default: boolean;
39
39
  };
40
- }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("select" | "openChange")[], "select" | "openChange", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
40
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, ("select" | "update:open" | "openChange")[], "select" | "update:open" | "openChange", import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
41
41
  prefixCls: {
42
42
  type: StringConstructor;
43
43
  default: string;
@@ -76,6 +76,7 @@ declare const XSuggestion: import('vue').DefineComponent<import('vue').ExtractPr
76
76
  };
77
77
  }>> & Readonly<{
78
78
  onOpenChange?: ((...args: any[]) => any) | undefined;
79
+ "onUpdate:open"?: ((...args: any[]) => any) | undefined;
79
80
  onSelect?: ((...args: any[]) => any) | undefined;
80
81
  }>, {
81
82
  prefixCls: string;
@@ -55,7 +55,11 @@ var XSuggestion = /* @__PURE__ */ defineComponent({
55
55
  default: false
56
56
  }
57
57
  },
58
- emits: ["openChange", "select"],
58
+ emits: [
59
+ "update:open",
60
+ "openChange",
61
+ "select"
62
+ ],
59
63
  setup(props, { slots, emit }) {
60
64
  const attrs = useAttrs();
61
65
  const configCtx = useConfig();
@@ -88,6 +92,7 @@ var XSuggestion = /* @__PURE__ */ defineComponent({
88
92
  }, { immediate: true });
89
93
  const triggerOpen = (nextOpen) => {
90
94
  if (props.open === void 0) innerOpen.value = nextOpen;
95
+ emit("update:open", nextOpen);
91
96
  emit("openChange", nextOpen);
92
97
  };
93
98
  const onClose = () => {
@@ -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;
@@ -1,19 +1,19 @@
1
- import { A as e, B as t, C as n, E as r, H as i, M as a, U as o, V as s, k as c, p as l, w as u, z as d } from "./isArrayLikeObject-y3HlYDaX.js";
2
- import { A as f, C as p, D as m, M as h, N as g, S as _, T as v, f as y, h as b, u as x, w as S } from "./_baseUniq-Ch3HuHeT.js";
3
- //#region ../../node_modules/lodash-es/_trimmedEndIndex.js
1
+ import { A as e, B as t, C as n, E as r, H as i, M as a, U as o, V as s, k as c, p as l, w as u, z as d } from "./isArrayLikeObject-jl2bjkAJ.js";
2
+ import { A as f, C as p, D as m, M as h, N as g, S as _, T as v, f as y, h as b, u as x, w as S } from "./_baseUniq-BlS7rXTs.js";
3
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_trimmedEndIndex.js
4
4
  var C = /\s/;
5
5
  function w(e) {
6
6
  for (var t = e.length; t-- && C.test(e.charAt(t)););
7
7
  return t;
8
8
  }
9
9
  //#endregion
10
- //#region ../../node_modules/lodash-es/_baseTrim.js
10
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseTrim.js
11
11
  var ee = /^\s+/;
12
12
  function T(e) {
13
13
  return e && e.slice(0, w(e) + 1).replace(ee, "");
14
14
  }
15
15
  //#endregion
16
- //#region ../../node_modules/lodash-es/toNumber.js
16
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toNumber.js
17
17
  var E = NaN, D = /^[-+]0x[0-9a-f]+$/i, O = /^0b[01]+$/i, k = /^0o[0-7]+$/i, A = parseInt;
18
18
  function j(e) {
19
19
  if (typeof e == "number") return e;
@@ -28,24 +28,24 @@ function j(e) {
28
28
  return r || k.test(e) ? A(e.slice(2), r ? 2 : 8) : D.test(e) ? E : +e;
29
29
  }
30
30
  //#endregion
31
- //#region ../../node_modules/lodash-es/toFinite.js
31
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toFinite.js
32
32
  var M = Infinity, N = 17976931348623157e292;
33
33
  function P(e) {
34
34
  return e ? (e = j(e), e === M || e === -M ? (e < 0 ? -1 : 1) * N : e === e ? e : 0) : e === 0 ? e : 0;
35
35
  }
36
36
  //#endregion
37
- //#region ../../node_modules/lodash-es/toInteger.js
37
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/toInteger.js
38
38
  function F(e) {
39
39
  var t = P(e), n = t % 1;
40
40
  return t === t ? n ? t - n : t : 0;
41
41
  }
42
42
  //#endregion
43
- //#region ../../node_modules/lodash-es/flatten.js
43
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/flatten.js
44
44
  function I(e) {
45
45
  return e != null && e.length ? _(e, 1) : [];
46
46
  }
47
47
  //#endregion
48
- //#region ../../node_modules/lodash-es/defaults.js
48
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/defaults.js
49
49
  var L = Object.prototype, R = L.hasOwnProperty, z = r(function(t, r) {
50
50
  t = Object(t);
51
51
  var i = -1, a = r.length, o = a > 2 ? r[2] : void 0;
@@ -56,13 +56,13 @@ var L = Object.prototype, R = L.hasOwnProperty, z = r(function(t, r) {
56
56
  return t;
57
57
  });
58
58
  //#endregion
59
- //#region ../../node_modules/lodash-es/last.js
59
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/last.js
60
60
  function B(e) {
61
61
  var t = e == null ? 0 : e.length;
62
62
  return t ? e[t - 1] : void 0;
63
63
  }
64
64
  //#endregion
65
- //#region ../../node_modules/lodash-es/_createFind.js
65
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_createFind.js
66
66
  function V(e) {
67
67
  return function(t, n, r) {
68
68
  var i = Object(t);
@@ -77,7 +77,7 @@ function V(e) {
77
77
  };
78
78
  }
79
79
  //#endregion
80
- //#region ../../node_modules/lodash-es/findIndex.js
80
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/findIndex.js
81
81
  var H = Math.max;
82
82
  function U(e, t, n) {
83
83
  var r = e == null ? 0 : e.length;
@@ -86,10 +86,10 @@ function U(e, t, n) {
86
86
  return i < 0 && (i = H(r + i, 0)), f(e, y(t, 3), i);
87
87
  }
88
88
  //#endregion
89
- //#region ../../node_modules/lodash-es/find.js
89
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/find.js
90
90
  var W = V(U);
91
91
  //#endregion
92
- //#region ../../node_modules/lodash-es/_baseMap.js
92
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseMap.js
93
93
  function G(e, t) {
94
94
  var n = -1, r = u(e) ? Array(e.length) : [];
95
95
  return x(e, function(e, i, a) {
@@ -97,34 +97,34 @@ function G(e, t) {
97
97
  }), r;
98
98
  }
99
99
  //#endregion
100
- //#region ../../node_modules/lodash-es/map.js
100
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/map.js
101
101
  function K(e, t) {
102
102
  return (s(e) ? h : G)(e, y(t, 3));
103
103
  }
104
104
  //#endregion
105
- //#region ../../node_modules/lodash-es/_baseHas.js
105
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseHas.js
106
106
  var q = Object.prototype.hasOwnProperty;
107
107
  function J(e, t) {
108
108
  return e != null && q.call(e, t);
109
109
  }
110
110
  //#endregion
111
- //#region ../../node_modules/lodash-es/has.js
111
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/has.js
112
112
  function Y(e, t) {
113
113
  return e != null && b(e, t, J);
114
114
  }
115
115
  //#endregion
116
- //#region ../../node_modules/lodash-es/isString.js
116
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/isString.js
117
117
  var X = "[object String]";
118
118
  function Z(e) {
119
119
  return typeof e == "string" || !s(e) && i(e) && o(e) == X;
120
120
  }
121
121
  //#endregion
122
- //#region ../../node_modules/lodash-es/_baseLt.js
122
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseLt.js
123
123
  function Q(e, t) {
124
124
  return e < t;
125
125
  }
126
126
  //#endregion
127
- //#region ../../node_modules/lodash-es/_baseExtremum.js
127
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseExtremum.js
128
128
  function $(e, t, n) {
129
129
  for (var r = -1, i = e.length; ++r < i;) {
130
130
  var a = e[r], o = t(a);
@@ -133,12 +133,12 @@ function $(e, t, n) {
133
133
  return c;
134
134
  }
135
135
  //#endregion
136
- //#region ../../node_modules/lodash-es/min.js
136
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/min.js
137
137
  function te(e) {
138
138
  return e && e.length ? $(e, d, Q) : void 0;
139
139
  }
140
140
  //#endregion
141
- //#region ../../node_modules/lodash-es/_baseSet.js
141
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_baseSet.js
142
142
  function ne(e, n, r, i) {
143
143
  if (!t(e)) return e;
144
144
  n = v(n, e);
@@ -154,7 +154,7 @@ function ne(e, n, r, i) {
154
154
  return e;
155
155
  }
156
156
  //#endregion
157
- //#region ../../node_modules/lodash-es/_basePickBy.js
157
+ //#region ../../node_modules/.pnpm/lodash-es@4.17.23/node_modules/lodash-es/_basePickBy.js
158
158
  function re(e, t, n) {
159
159
  for (var r = -1, i = t.length, a = {}; ++r < i;) {
160
160
  var o = t[r], s = p(e, o);