@ant-design/agentic-ui 2.0.16 → 2.0.17

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.
@@ -404,9 +404,10 @@ var MarkdownInputField = (_a) => {
404
404
  [`${baseCls}-enlarged`]: isEnlarged
405
405
  }),
406
406
  style: __spreadProps(__spreadValues(__spreadValues({}, props.style), enlargedStyle), {
407
- height: isEnlarged ? `${(_k = (_j = props.enlargeable) == null ? void 0 : _j.height) != null ? _k : 980}px` : `${collapsedHeight}px`,
407
+ minHeight: `${collapsedHeight}px`,
408
+ height: isEnlarged ? `${(_k = (_j = props.enlargeable) == null ? void 0 : _j.height) != null ? _k : 980}px` : `max(${collapsedHeight}px,100%)`,
408
409
  borderRadius: borderRadius || 16,
409
- maxHeight: isEnlarged ? "none" : `${collapsedHeightPx}px`,
410
+ maxHeight: isEnlarged ? "none" : `max(${collapsedHeightPx}px,100%)`,
410
411
  transition: "height, max-height 0.3s,border-radius 0.3s,box-shadow 0.3s,transform 0.3s,opacity 0.3s,background 0.3s"
411
412
  }),
412
413
  tabIndex: 1,
@@ -431,28 +432,24 @@ var MarkdownInputField = (_a) => {
431
432
  /* @__PURE__ */ React.createElement(
432
433
  "div",
433
434
  {
435
+ className: classNames(`${baseCls}-border-wrapper`, hashId),
434
436
  style: {
435
- backgroundColor: "#fff",
436
- width: "calc(100% - 4px)",
437
- height: isEnlarged ? "calc(100% - 4px)" : "calc(100% - 4px)",
438
- maxHeight: isEnlarged ? "calc(100% - 4px)" : "calc(100% - 4px)",
439
- display: "flex",
440
- zIndex: 9,
441
- flexDirection: "column",
442
- boxSizing: "border-box",
437
+ height: isEnlarged ? "100%" : "auto",
438
+ maxHeight: isEnlarged ? "100%" : "auto",
443
439
  borderRadius: (borderRadius || 16) - 2 || 10,
444
440
  cursor: isLoading || props.disabled ? "not-allowed" : "auto",
445
441
  opacity: props.disabled ? 0.5 : 1,
446
442
  minHeight: isEnlarged ? "auto" : isMultiRowLayout ? 106 : void 0
447
443
  }
448
444
  },
449
- /* @__PURE__ */ React.createElement(
445
+ /* @__PURE__ */ React.createElement("div", { className: classNames(`${baseCls}-content-wrapper`, hashId) }, /* @__PURE__ */ React.createElement(
450
446
  "div",
451
447
  {
452
448
  style: {
453
449
  display: "flex",
454
450
  flexDirection: "column",
455
- borderRadius: (borderRadius || 16) - 2 || 10,
451
+ borderTopLeftRadius: (borderRadius || 16) - 2 || 10,
452
+ borderTopRightRadius: (borderRadius || 16) - 2 || 10,
456
453
  maxHeight: isEnlarged ? "none" : (() => {
457
454
  var _a3, _b3;
458
455
  const mh = (_a3 = props.style) == null ? void 0 : _a3.maxHeight;
@@ -475,65 +472,74 @@ var MarkdownInputField = (_a) => {
475
472
  onSkillModeOpenChange: props.onSkillModeOpenChange
476
473
  }
477
474
  ),
478
- /* @__PURE__ */ React.createElement("div", { className: classNames(`${baseCls}-editor-content`, hashId) }, attachmentList, /* @__PURE__ */ React.createElement(
479
- BaseMarkdownEditor,
480
- __spreadValues({
481
- editorRef: markdownEditorRef,
482
- leafRender: props.leafRender,
483
- style: {
484
- width: "100%",
485
- flex: 1,
486
- padding: 0,
487
- paddingRight: computedRightPadding
488
- },
489
- toolBar: {
490
- enable: false
491
- },
492
- floatBar: {
493
- enable: false
494
- },
495
- readonly: isLoading,
496
- contentStyle: {
497
- padding: "var(--padding-card-base)"
498
- },
499
- textAreaProps: {
500
- enable: true,
501
- placeholder: props.placeholder,
502
- triggerSendKey: props.triggerSendKey || "Enter"
503
- },
504
- tagInputProps: __spreadValues({
505
- enable: true,
506
- type: "dropdown"
507
- }, tagInputProps),
508
- initValue: props.value,
509
- onChange: (value2) => {
510
- var _a3;
511
- setValue(value2);
512
- (_a3 = props.onChange) == null ? void 0 : _a3.call(props, value2);
513
- },
514
- onFocus: (value2, schema, e) => {
515
- onFocus == null ? void 0 : onFocus(value2, schema, e);
516
- activeInput(true);
517
- },
518
- onBlur: (value2, schema, e) => {
519
- onBlur == null ? void 0 : onBlur(value2, schema, e);
520
- activeInput(false);
521
- },
522
- onPaste: (e) => {
523
- handlePaste(e);
524
- },
525
- titlePlaceholderContent: props.placeholder,
526
- toc: false,
527
- pasteConfig: props.pasteConfig
528
- }, markdownProps)
529
- ))
530
- ),
531
- props.toolsRender ? /* @__PURE__ */ React.createElement(
475
+ /* @__PURE__ */ React.createElement(
476
+ "div",
477
+ {
478
+ className: classNames(`${baseCls}-editor-content`, hashId)
479
+ },
480
+ attachmentList,
481
+ /* @__PURE__ */ React.createElement(
482
+ BaseMarkdownEditor,
483
+ __spreadValues({
484
+ editorRef: markdownEditorRef,
485
+ leafRender: props.leafRender,
486
+ style: {
487
+ width: "100%",
488
+ flex: 1,
489
+ padding: 0,
490
+ paddingRight: computedRightPadding
491
+ },
492
+ toolBar: {
493
+ enable: false
494
+ },
495
+ floatBar: {
496
+ enable: false
497
+ },
498
+ readonly: isLoading,
499
+ contentStyle: {
500
+ padding: "var(--padding-card-base)"
501
+ },
502
+ textAreaProps: {
503
+ enable: true,
504
+ placeholder: props.placeholder,
505
+ triggerSendKey: props.triggerSendKey || "Enter"
506
+ },
507
+ tagInputProps: __spreadValues({
508
+ enable: true,
509
+ type: "dropdown"
510
+ }, tagInputProps),
511
+ initValue: props.value,
512
+ onChange: (value2) => {
513
+ var _a3;
514
+ setValue(value2);
515
+ (_a3 = props.onChange) == null ? void 0 : _a3.call(props, value2);
516
+ },
517
+ onFocus: (value2, schema, e) => {
518
+ onFocus == null ? void 0 : onFocus(value2, schema, e);
519
+ activeInput(true);
520
+ },
521
+ onBlur: (value2, schema, e) => {
522
+ onBlur == null ? void 0 : onBlur(value2, schema, e);
523
+ activeInput(false);
524
+ },
525
+ onPaste: (e) => {
526
+ handlePaste(e);
527
+ },
528
+ titlePlaceholderContent: props.placeholder,
529
+ toc: false,
530
+ pasteConfig: props.pasteConfig
531
+ }, markdownProps)
532
+ )
533
+ )
534
+ ), props.toolsRender ? /* @__PURE__ */ React.createElement(
532
535
  "div",
533
536
  {
534
537
  style: {
538
+ backgroundColor: "#fff",
535
539
  display: "flex",
536
540
  boxSizing: "border-box",
541
+ borderBottomLeftRadius: (borderRadius || 16) - 2 || 10,
542
+ borderBottomRightRadius: (borderRadius || 16) - 2 || 10,
537
543
  flexDirection: "row",
538
544
  alignItems: "center",
539
545
  justifyContent: "space-between",
@@ -562,8 +568,7 @@ var MarkdownInputField = (_a) => {
562
568
  }))
563
569
  ),
564
570
  sendActionsNode
565
- ) : sendActionsNode,
566
- (props == null ? void 0 : props.quickActionRender) || ((_m = props.refinePrompt) == null ? void 0 : _m.enable) ? /* @__PURE__ */ React.createElement(
571
+ ) : sendActionsNode, (props == null ? void 0 : props.quickActionRender) || ((_m = props.refinePrompt) == null ? void 0 : _m.enable) ? /* @__PURE__ */ React.createElement(
567
572
  QuickActions,
568
573
  {
569
574
  ref: quickActionsRef,
@@ -592,7 +597,7 @@ var MarkdownInputField = (_a) => {
592
597
  setQuickRightOffset(rightOffset);
593
598
  }
594
599
  }
595
- ) : null
600
+ ) : null)
596
601
  )
597
602
  )
598
603
  ))
@@ -162,6 +162,20 @@ var genStyle = (token) => {
162
162
  opacity: 1
163
163
  }
164
164
  },
165
+ "&-border-wrapper": {
166
+ width: "100%",
167
+ border: "2px solid transparent",
168
+ zIndex: 9,
169
+ boxSizing: "border-box"
170
+ },
171
+ "&-content-wrapper": {
172
+ backgroundColor: "#fff",
173
+ display: "flex",
174
+ flexDirection: "column",
175
+ width: "100%",
176
+ height: "100%",
177
+ borderRadius: "inherit"
178
+ },
165
179
  "&-editor": {
166
180
  boxSizing: "border-box",
167
181
  backgroundColor: "var(--color-gray-bg-card-white)",
@@ -169,7 +183,6 @@ var genStyle = (token) => {
169
183
  zIndex: 9,
170
184
  maxHeight: 400,
171
185
  height: "100%",
172
- borderRadius: "inherit",
173
186
  overflowY: "visible",
174
187
  scrollbarColor: "var(--color-gray-text-tertiary) transparent",
175
188
  scrollbarWidth: "thin",
@@ -186,8 +199,7 @@ var genStyle = (token) => {
186
199
  overflowY: "auto",
187
200
  maxHeight: "inherit",
188
201
  scrollbarColor: "var(--color-gray-text-tertiary) transparent",
189
- scrollbarWidth: "thin",
190
- borderRadius: "inherit"
202
+ scrollbarWidth: "thin"
191
203
  },
192
204
  "&&-disabled": {
193
205
  backgroundColor: "rgba(0,0,0,0.04)",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ant-design/agentic-ui",
3
- "version": "2.0.16",
3
+ "version": "2.0.17",
4
4
  "description": "面向智能体的 UI 组件库,提供多步推理可视化、工具调用展示、任务执行协同等 Agentic UI 能力",
5
5
  "repository": "git@github.com:ant-design/agentic-ui.git",
6
6
  "license": "MIT",
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function useStyle(prefixCls?: string): {
3
- wrapSSR: (node: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>) => import("react").JSX.Element;
4
- hashId: string;
5
- };
@@ -1,46 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
-
21
- // src/Components/Loading/style.ts
22
- import {
23
- useEditorStyleRegister
24
- } from "../../Hooks/useStyle";
25
- var genStyle = (token) => {
26
- return {
27
- [token.componentCls]: {
28
- display: "flex",
29
- alignItems: "center",
30
- justifyContent: "center",
31
- position: "relative",
32
- zIndex: 0
33
- }
34
- };
35
- };
36
- function useStyle(prefixCls) {
37
- return useEditorStyleRegister("loading", (token) => {
38
- const loadingToken = __spreadProps(__spreadValues({}, token), {
39
- componentCls: `.${prefixCls}`
40
- });
41
- return [genStyle(loadingToken)];
42
- });
43
- }
44
- export {
45
- useStyle
46
- };