@ant-design/agentic-ui 2.29.32 → 2.29.36

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.
@@ -742,7 +742,7 @@ var defaultAllowedTypes = [
742
742
  * 处理粘贴事件,会把粘贴的内容转换为对应的节点
743
743
  * @description paste event
744
744
  * @param {React.ClipboardEvent<HTMLDivElement>} e
745
- */ var onPaste = function onPaste(event) {
745
+ */ var onPaste = useRefFunction(function(event) {
746
746
  return _async_to_generator(function() {
747
747
  return _ts_generator(this, function(_state) {
748
748
  switch(_state.label){
@@ -759,7 +759,7 @@ var defaultAllowedTypes = [
759
759
  }
760
760
  });
761
761
  })();
762
- };
762
+ });
763
763
  /**
764
764
  * 实际的粘贴处理逻辑
765
765
  */ var handlePasteEvent = function handlePasteEvent(event) {
@@ -768,6 +768,8 @@ var defaultAllowedTypes = [
768
768
  return _ts_generator(this, function(_state) {
769
769
  switch(_state.label){
770
770
  case 0:
771
+ event.stopPropagation();
772
+ event.preventDefault();
771
773
  // 检查粘贴配置
772
774
  pasteConfig = props.pasteConfig;
773
775
  if ((pasteConfig === null || pasteConfig === void 0 ? void 0 : pasteConfig.enabled) === false) {
@@ -816,13 +818,15 @@ var defaultAllowedTypes = [
816
818
  3,
817
819
  2
818
820
  ];
821
+ event.stopPropagation();
822
+ event.preventDefault();
819
823
  return [
820
824
  4,
821
825
  handleHtmlPaste(markdownEditorRef.current, event.clipboardData, props)
822
826
  ];
823
827
  case 1:
824
828
  result1 = _state.sent();
825
- if (result1 === false) {
829
+ if (result1) {
826
830
  return [
827
831
  2
828
832
  ];
@@ -833,6 +837,8 @@ var defaultAllowedTypes = [
833
837
  3,
834
838
  4
835
839
  ];
840
+ event.stopPropagation();
841
+ event.preventDefault();
836
842
  return [
837
843
  4,
838
844
  handleFilesPaste(markdownEditorRef.current, event.clipboardData, props)
@@ -847,6 +853,8 @@ var defaultAllowedTypes = [
847
853
  case 4:
848
854
  if (types.includes('text/markdown') && allowedTypes.includes('text/markdown')) {
849
855
  ;
856
+ event.stopPropagation();
857
+ event.preventDefault();
850
858
  text = ((_event_clipboardData1 = event.clipboardData) === null || _event_clipboardData1 === void 0 ? void 0 : (_event_clipboardData_getData1 = _event_clipboardData1.getData) === null || _event_clipboardData_getData1 === void 0 ? void 0 : (_event_clipboardData_getData = _event_clipboardData_getData1.call(_event_clipboardData1, 'text/markdown')) === null || _event_clipboardData_getData === void 0 ? void 0 : _event_clipboardData_getData.trim()) || '';
851
859
  if (text) {
852
860
  Transforms.insertFragment(markdownEditorRef.current, parserMdToSchema(text, plugins).schema);
@@ -859,6 +867,8 @@ var defaultAllowedTypes = [
859
867
  3,
860
868
  8
861
869
  ];
870
+ event.stopPropagation();
871
+ event.preventDefault();
862
872
  text1 = ((_event_clipboardData2 = event.clipboardData) === null || _event_clipboardData2 === void 0 ? void 0 : (_event_clipboardData_getData3 = _event_clipboardData2.getData) === null || _event_clipboardData_getData3 === void 0 ? void 0 : (_event_clipboardData_getData2 = _event_clipboardData_getData3.call(_event_clipboardData2, 'text/plain')) === null || _event_clipboardData_getData2 === void 0 ? void 0 : _event_clipboardData_getData2.trim()) || '';
863
873
  if (!text1) return [
864
874
  2
@@ -572,7 +572,7 @@ import { loadAceEditor, loadAceTheme } from "../loadAceEditor";
572
572
  value = JSON.stringify(partialParse(value), null, 2);
573
573
  } catch (e) {}
574
574
  }
575
- if (value !== codeRef.current) {
575
+ if (value !== codeRef.current || readonly) {
576
576
  var _editorRef_current, _editorRef_current1;
577
577
  if (element) (_editorRef_current = editorRef.current) === null || _editorRef_current === void 0 ? void 0 : _editorRef_current.setValue(value);
578
578
  (_editorRef_current1 = editorRef.current) === null || _editorRef_current1 === void 0 ? void 0 : _editorRef_current1.clearSelection();
@@ -309,6 +309,7 @@ var genStyle = function genStyle(token) {
309
309
  },
310
310
  '&-tool-content': {
311
311
  flex: 1,
312
+ minWidth: 0,
312
313
  fontSize: 'var(--font-size-sm)',
313
314
  fontWeight: 'normal',
314
315
  lineHeight: '160%',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ant-design/agentic-ui",
3
- "version": "2.29.32",
3
+ "version": "2.29.36",
4
4
  "description": "面向智能体的 UI 组件库,提供多步推理可视化、工具调用展示、任务执行协同等 Agentic UI 能力",
5
5
  "repository": "git@github.com:ant-design/agentic-ui.git",
6
6
  "license": "MIT",