@ant-design/agentic-ui 2.29.59 → 2.30.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 (99) hide show
  1. package/dist/Bubble/List/index.d.ts +11 -0
  2. package/dist/Bubble/List/index.js +13 -1
  3. package/dist/Bubble/MessagesContent/EXCEPTION.js +11 -2
  4. package/dist/Bubble/MessagesContent/MarkdownPreview.js +34 -4
  5. package/dist/Bubble/MessagesContent/index.js +39 -10
  6. package/dist/Bubble/MessagesContent/style.js +55 -22
  7. package/dist/Bubble/UserBubble.js +3 -1
  8. package/dist/Bubble/type.d.ts +11 -0
  9. package/dist/Hooks/useLanguage.d.ts +1 -0
  10. package/dist/I18n/locales.d.ts +1 -0
  11. package/dist/I18n/locales.js +5 -3
  12. package/dist/MarkdownEditor/BaseMarkdownEditor.js +37 -5
  13. package/dist/MarkdownEditor/editor/elements/AgenticUiBlocks/AgenticUiTaskBlock.d.ts +4 -0
  14. package/dist/MarkdownEditor/editor/elements/AgenticUiBlocks/AgenticUiTaskBlock.js +74 -0
  15. package/dist/MarkdownEditor/editor/elements/AgenticUiBlocks/AgenticUiToolUseBarBlock.d.ts +4 -0
  16. package/dist/MarkdownEditor/editor/elements/AgenticUiBlocks/AgenticUiToolUseBarBlock.js +114 -0
  17. package/dist/MarkdownEditor/editor/elements/AgenticUiBlocks/agenticUiEmbedUtils.d.ts +20 -0
  18. package/dist/MarkdownEditor/editor/elements/AgenticUiBlocks/agenticUiEmbedUtils.js +169 -0
  19. package/dist/MarkdownEditor/editor/elements/Table/EditableTable.d.ts +11 -0
  20. package/dist/MarkdownEditor/editor/elements/Table/EditableTable.js +207 -0
  21. package/dist/MarkdownEditor/editor/elements/Table/Table.js +10 -276
  22. package/dist/MarkdownEditor/editor/elements/Table/TableCellIndex/index.js +7 -227
  23. package/dist/MarkdownEditor/editor/elements/Table/TableCellIndexSpacer/index.js +20 -229
  24. package/dist/MarkdownEditor/editor/elements/Table/commands/tableCommands.d.ts +9 -0
  25. package/dist/MarkdownEditor/editor/elements/Table/commands/tableCommands.js +242 -0
  26. package/dist/MarkdownEditor/editor/elements/Table/utils/editableTableWidth.d.ts +20 -0
  27. package/dist/MarkdownEditor/editor/elements/Table/utils/editableTableWidth.js +60 -0
  28. package/dist/MarkdownEditor/editor/elements/Table/utils/useEditableTableColWidths.d.ts +6 -0
  29. package/dist/MarkdownEditor/editor/elements/Table/utils/useEditableTableColWidths.js +20 -0
  30. package/dist/MarkdownEditor/editor/elements/Table/utils/useEditableTableContentWidth.d.ts +10 -0
  31. package/dist/MarkdownEditor/editor/elements/Table/utils/useEditableTableContentWidth.js +103 -0
  32. package/dist/MarkdownEditor/editor/elements/index.js +7 -0
  33. package/dist/MarkdownEditor/editor/parser/parse/parseCode.js +33 -2
  34. package/dist/MarkdownEditor/editor/parser/parserSlateNodeToMarkdown.js +3 -0
  35. package/dist/MarkdownEditor/editor/plugins/handlePaste.js +4 -1
  36. package/dist/MarkdownEditor/plugin.d.ts +15 -0
  37. package/dist/MarkdownEditor/style.js +258 -326
  38. package/dist/MarkdownEditor/types.d.ts +14 -0
  39. package/dist/MarkdownInputField/AttachmentButton/AttachmentButtonPopover.js +1 -1
  40. package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileIcon.js +2 -2
  41. package/dist/MarkdownInputField/AttachmentButton/AttachmentFileList/AttachmentFileListItem.js +11 -8
  42. package/dist/MarkdownInputField/AttachmentButton/index.js +7 -2
  43. package/dist/MarkdownInputField/AttachmentButton/types.d.ts +5 -1
  44. package/dist/MarkdownInputField/AttachmentButton/utils.d.ts +7 -0
  45. package/dist/MarkdownInputField/AttachmentButton/utils.js +9 -1
  46. package/dist/MarkdownInputField/FileMapView/FileMapViewItem.js +10 -5
  47. package/dist/MarkdownInputField/FileUploadManager/index.d.ts +9 -0
  48. package/dist/MarkdownInputField/FileUploadManager/index.js +20 -4
  49. package/dist/MarkdownInputField/MarkdownInputField.js +5 -3
  50. package/dist/MarkdownInputField/SendActions/index.d.ts +9 -0
  51. package/dist/MarkdownInputField/SendActions/index.js +3 -2
  52. package/dist/MarkdownInputField/hooks/useMarkdownInputFieldRefs.js +10 -3
  53. package/dist/MarkdownInputField/utils/renderHelpers.d.ts +8 -1
  54. package/dist/MarkdownInputField/utils/renderHelpers.js +5 -1
  55. package/dist/MarkdownRenderer/AnimationText.d.ts +19 -0
  56. package/dist/MarkdownRenderer/AnimationText.js +226 -0
  57. package/dist/MarkdownRenderer/CharacterQueue.d.ts +36 -0
  58. package/dist/MarkdownRenderer/CharacterQueue.js +188 -0
  59. package/dist/MarkdownRenderer/MarkdownRenderer.d.ts +13 -0
  60. package/dist/MarkdownRenderer/MarkdownRenderer.js +362 -0
  61. package/dist/MarkdownRenderer/index.d.ts +11 -0
  62. package/dist/MarkdownRenderer/index.js +9 -0
  63. package/dist/MarkdownRenderer/renderers/AgenticUiTaskBlockRenderer.d.ts +6 -0
  64. package/dist/MarkdownRenderer/renderers/AgenticUiTaskBlockRenderer.js +66 -0
  65. package/dist/MarkdownRenderer/renderers/AgenticUiToolUseBarBlockRenderer.d.ts +6 -0
  66. package/dist/MarkdownRenderer/renderers/AgenticUiToolUseBarBlockRenderer.js +134 -0
  67. package/dist/MarkdownRenderer/renderers/ChartRenderer.d.ts +12 -0
  68. package/dist/MarkdownRenderer/renderers/ChartRenderer.js +395 -0
  69. package/dist/MarkdownRenderer/renderers/CodeRenderer.d.ts +7 -0
  70. package/dist/MarkdownRenderer/renderers/CodeRenderer.js +218 -0
  71. package/dist/MarkdownRenderer/renderers/MermaidRenderer.d.ts +7 -0
  72. package/dist/MarkdownRenderer/renderers/MermaidRenderer.js +43 -0
  73. package/dist/MarkdownRenderer/renderers/SchemaRenderer.d.ts +15 -0
  74. package/dist/MarkdownRenderer/renderers/SchemaRenderer.js +115 -0
  75. package/dist/MarkdownRenderer/renderers/index.d.ts +4 -0
  76. package/dist/MarkdownRenderer/renderers/index.js +4 -0
  77. package/dist/MarkdownRenderer/style.d.ts +16 -0
  78. package/dist/MarkdownRenderer/style.js +47 -0
  79. package/dist/MarkdownRenderer/types.d.ts +74 -0
  80. package/dist/MarkdownRenderer/types.js +1 -0
  81. package/dist/MarkdownRenderer/useMarkdownToReact.d.ts +23 -0
  82. package/dist/MarkdownRenderer/useMarkdownToReact.js +1241 -0
  83. package/dist/MarkdownRenderer/useStreaming.d.ts +29 -0
  84. package/dist/MarkdownRenderer/useStreaming.js +399 -0
  85. package/dist/Plugins/chart/AreaChart/index.js +4 -2
  86. package/dist/Plugins/chart/ChartRender.js +1 -0
  87. package/dist/Plugins/chart/LineChart/index.js +4 -2
  88. package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.d.ts +8 -0
  89. package/dist/Plugins/chart/components/ChartContainer/ChartErrorBoundary.js +31 -6
  90. package/dist/Plugins/chart/index.js +3 -1
  91. package/dist/Plugins/mermaid/style.js +0 -3
  92. package/dist/TaskList/TaskList.js +3 -12
  93. package/dist/TaskList/components/TaskListItem.js +3 -12
  94. package/dist/ThoughtChainList/ThoughtChainListItem.js +2 -4
  95. package/dist/ThoughtChainList/index.js +4 -21
  96. package/dist/ToolUseBarThink/index.js +20 -59
  97. package/dist/index.d.ts +1 -0
  98. package/dist/index.js +2 -0
  99. package/package.json +2 -1
@@ -52,9 +52,254 @@ function _object_spread_props(target, source) {
52
52
  }
53
53
  import { MOBILE_BREAKPOINT, MOBILE_PADDING } from "../Constants/mobile";
54
54
  import { resetComponent, useEditorStyleRegister } from "../Hooks/useStyle";
55
+ // ── Table ──────────────────────────────────────────────────────────────────
56
+ var TABLE_BORDER = '1px solid var(--agentic-ui-table-border-color, #E7E9E8)';
57
+ var TABLE_RADIUS = 'var(--agentic-ui-table-border-radius, 8px)';
58
+ var TABLE_ACTION_BUTTON_SIZE = 20;
59
+ var TABLE_ACTION_BUTTON_GAP = '2px';
60
+ var TABLE_ACTION_BUTTON_ICON_SIZE = 12;
61
+ var TABLE_CELL = {
62
+ verticalAlign: 'top',
63
+ padding: 'var(--agentic-ui-table-cell-padding, 16px 12px)',
64
+ textAlign: 'left',
65
+ lineHeight: '24px',
66
+ fontSize: '1em',
67
+ minWidth: 'var(--agentic-ui-table-cell-min-width, 120px)',
68
+ width: 'var(--agentic-ui-table-cell-min-width, 120px)',
69
+ whiteSpace: 'nowrap',
70
+ overflow: 'hidden',
71
+ textOverflow: 'ellipsis',
72
+ zIndex: 1,
73
+ background: 'inherit'
74
+ };
75
+ var genTableStyle = function genTableStyle(token, mobileBreakpoint, mobilePadding) {
76
+ var tableCls = "".concat(token.componentCls, "-content-table");
77
+ var _obj, _obj1;
78
+ return _obj1 = {}, _define_property(_obj1, tableCls, {
79
+ width: '100%',
80
+ maxWidth: '100%',
81
+ minWidth: 0,
82
+ position: 'relative',
83
+ '&-container': _define_property({
84
+ maxWidth: '100%',
85
+ minWidth: 0,
86
+ outline: 'none',
87
+ position: 'relative',
88
+ marginBottom: 12
89
+ }, "&:hover ".concat(tableCls, "-readonly-table-actions"), {
90
+ opacity: 1,
91
+ transform: 'translateX(50%)',
92
+ top: -24
93
+ }),
94
+ '&-editor-table': {
95
+ marginTop: '1em'
96
+ },
97
+ '&-readonly-table-actions': {
98
+ opacity: 0,
99
+ position: 'absolute',
100
+ top: 20,
101
+ display: 'flex',
102
+ gap: 8,
103
+ right: '50%',
104
+ zIndex: 1000,
105
+ backgroundColor: 'var(--color-gray-bg-page-light)',
106
+ borderRadius: 'var(--radius-control-base)',
107
+ padding: '4px 8px',
108
+ boxShadow: 'var(--shadow-control-base)',
109
+ border: 'none',
110
+ transform: 'translateX(50%)',
111
+ transition: 'all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)'
112
+ },
113
+ table: (_obj = {
114
+ borderCollapse: 'separate',
115
+ borderSpacing: 0,
116
+ width: 'max-content',
117
+ tableLayout: 'fixed',
118
+ margin: '16px 0',
119
+ maxWidth: '100%',
120
+ position: 'relative',
121
+ fontVariant: 'tabular-nums',
122
+ borderRadius: TABLE_RADIUS,
123
+ border: TABLE_BORDER
124
+ }, // readonly:overflow: hidden,不影响编辑态 UI
125
+ _define_property(_obj, "&".concat(tableCls, "-readonly-table"), {
126
+ width: '100%',
127
+ tableLayout: 'auto',
128
+ overflow: 'hidden',
129
+ border: TABLE_BORDER
130
+ }), _define_property(_obj, "th", _object_spread_props(_object_spread({}, TABLE_CELL), {
131
+ backgroundColor: 'var(--agentic-ui-table-header-bg, #f7f7f9)',
132
+ border: 'none',
133
+ borderBottom: TABLE_BORDER,
134
+ borderLeft: 'none',
135
+ borderTop: 'none',
136
+ fontWeight: 600
137
+ })), _define_property(_obj, 'th:not(:first-child)', {
138
+ borderLeft: TABLE_BORDER
139
+ }), _define_property(_obj, 'td:not(.config-td)', _object_spread_props(_object_spread({}, TABLE_CELL), {
140
+ position: 'relative',
141
+ borderBottom: TABLE_BORDER,
142
+ borderLeft: TABLE_BORDER,
143
+ 'div[data-be="paragraph"]': {
144
+ margin: 0,
145
+ textWrap: 'auto'
146
+ }
147
+ })), _define_property(_obj, 'th.config-th, td.config-td', {
148
+ borderBottom: TABLE_BORDER,
149
+ borderLeft: TABLE_BORDER
150
+ }), _define_property(_obj, 'tr td.config-td:first-child', {
151
+ borderLeft: 'none'
152
+ }), _define_property(_obj, 'td:first-child:not(.config-td)', {
153
+ borderLeft: 'none'
154
+ }), _define_property(_obj, 'tr:last-child td:not(.config-td)', {
155
+ borderBottom: 'none'
156
+ }), _define_property(_obj, 'tr td:first-child:not(.config-td)', {
157
+ fontWeight: 600
158
+ }), _define_property(_obj, 'tbody tr:not(.config-tr):hover', {
159
+ background: 'linear-gradient(var(--agentic-ui-table-hover-bg, rgba(0, 0, 0, 0.04)), var(--agentic-ui-table-hover-bg, rgba(0, 0, 0, 0.04))), linear-gradient(var(--agentic-ui-table-cell-bg, #ffffff), var(--agentic-ui-table-cell-bg, #ffffff))'
160
+ }), _define_property(_obj, "@media (max-width: ".concat(mobileBreakpoint, ")"), {
161
+ 'th, td': {
162
+ padding: mobilePadding
163
+ }
164
+ }), _obj)
165
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-td"), _define_property({
166
+ padding: '8px',
167
+ verticalAlign: 'middle',
168
+ wordWrap: 'break-word',
169
+ wordBreak: 'break-all',
170
+ overflow: 'hidden',
171
+ textOverflow: 'ellipsis',
172
+ whiteSpace: 'pre-wrap',
173
+ '&[data-select="true"]:after': {
174
+ content: '" "',
175
+ position: 'absolute',
176
+ top: 0,
177
+ left: 0,
178
+ right: 0,
179
+ bottom: 0,
180
+ zIndex: 2,
181
+ pointerEvents: 'none',
182
+ backgroundColor: 'var(--color-primary-control-fill-secondary-hover)'
183
+ }
184
+ }, "@media (max-width: ".concat(mobileBreakpoint, ")"), {
185
+ padding: '2px'
186
+ })), _define_property(_obj1, "".concat(token.componentCls, "-table-row-index"), {
187
+ display: 'table-row'
188
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index"), {
189
+ width: 12,
190
+ maxWidth: 12,
191
+ padding: 0,
192
+ position: 'relative',
193
+ verticalAlign: 'middle',
194
+ backgroundColor: 'var(--color-gray-control-fill-secondary)',
195
+ '&:hover': {
196
+ backgroundColor: 'var(--color-gray-control-fill-secondary-hover)'
197
+ }
198
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-action-buttons"), {
199
+ position: 'absolute',
200
+ top: 4,
201
+ left: -24,
202
+ zIndex: 1000,
203
+ alignItems: 'center',
204
+ flexDirection: 'column',
205
+ gap: TABLE_ACTION_BUTTON_GAP,
206
+ opacity: 0,
207
+ display: 'none',
208
+ transition: 'opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)'
209
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-action-buttons-visible"), {
210
+ opacity: 1,
211
+ display: 'flex'
212
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-action-button"), {
213
+ padding: 2,
214
+ display: 'flex',
215
+ alignItems: 'center',
216
+ zIndex: 1000,
217
+ justifyContent: 'center',
218
+ fontSize: TABLE_ACTION_BUTTON_ICON_SIZE,
219
+ border: TABLE_BORDER,
220
+ width: TABLE_ACTION_BUTTON_SIZE,
221
+ height: TABLE_ACTION_BUTTON_SIZE,
222
+ cursor: 'pointer',
223
+ backgroundPosition: '50%',
224
+ backgroundRepeat: 'no-repeat',
225
+ transition: 'color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)',
226
+ borderRadius: '4px',
227
+ background: 'var(--color-gray-bg-card-white)',
228
+ boxShadow: 'var(--shadow-border-base)',
229
+ color: 'var(--color-gray-text-secondary)',
230
+ '&:hover': {
231
+ backgroundColor: '#FFF',
232
+ boxShadow: 'var(--shadow-control-lg)'
233
+ }
234
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-delete-icon"), {
235
+ '&:hover': {
236
+ color: '#ff4d4f'
237
+ }
238
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-insert-row-before"), {
239
+ '&:hover': {
240
+ color: '#52c41a'
241
+ }
242
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-insert-row-after"), {
243
+ '&:hover': {
244
+ color: '#52c41a'
245
+ }
246
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-spacer"), {
247
+ cursor: 'pointer',
248
+ backgroundColor: 'var(--color-gray-control-fill-secondary)',
249
+ '&:hover': {
250
+ backgroundColor: 'var(--color-gray-control-fill-secondary-hover)'
251
+ }
252
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-spacer-action-buttons"), {
253
+ position: 'absolute',
254
+ top: -28,
255
+ right: '50%',
256
+ transform: 'translateX(50%)',
257
+ zIndex: 10,
258
+ display: 'flex',
259
+ alignItems: 'center',
260
+ gap: TABLE_ACTION_BUTTON_GAP,
261
+ opacity: 0,
262
+ transition: 'opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)'
263
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-spacer-action-buttons-visible"), {
264
+ opacity: 1
265
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-spacer-action-button"), {
266
+ padding: 2,
267
+ display: 'flex',
268
+ alignItems: 'center',
269
+ justifyContent: 'center',
270
+ fontSize: TABLE_ACTION_BUTTON_ICON_SIZE,
271
+ border: TABLE_BORDER,
272
+ width: TABLE_ACTION_BUTTON_SIZE,
273
+ height: TABLE_ACTION_BUTTON_SIZE,
274
+ cursor: 'pointer',
275
+ backgroundPosition: '50%',
276
+ backgroundRepeat: 'no-repeat',
277
+ transition: 'color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)',
278
+ borderRadius: '4px',
279
+ background: 'var(--color-gray-bg-card-white)',
280
+ boxShadow: 'var(--shadow-border-base)',
281
+ color: 'var(--color-gray-text-secondary)',
282
+ '&:hover': {
283
+ backgroundColor: '#FFF',
284
+ boxShadow: 'var(--shadow-control-lg)'
285
+ }
286
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-spacer-delete-icon"), {
287
+ '&:hover': {
288
+ color: '#ff4d4f'
289
+ }
290
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-spacer-insert-column-before"), {
291
+ '&:hover': {
292
+ color: '#52c41a'
293
+ }
294
+ }), _define_property(_obj1, "".concat(token.componentCls, "-table-cell-index-spacer-insert-column-after"), {
295
+ '&:hover': {
296
+ color: '#52c41a'
297
+ }
298
+ }), _obj1;
299
+ };
55
300
  var genStyle = function genStyle(token) {
56
- var _obj, _obj1, _obj2;
57
- return _define_property({}, token.componentCls, (_obj2 = {
301
+ var _obj, _obj1;
302
+ return _define_property({}, token.componentCls, _object_spread((_obj1 = {
58
303
  boxSizing: 'border-box',
59
304
  height: 'max-content',
60
305
  maxWidth: '100%',
@@ -114,7 +359,7 @@ var genStyle = function genStyle(token) {
114
359
  '&-focus': {
115
360
  height: 64
116
361
  }
117
- }, _define_property(_obj2, "".concat(token.componentCls, "-list"), (_obj = {
362
+ }, _define_property(_obj1, "".concat(token.componentCls, "-list"), (_obj = {
118
363
  listStyle: 'disc',
119
364
  marginBottom: '0',
120
365
  marginTop: '0',
@@ -183,12 +428,12 @@ var genStyle = function genStyle(token) {
183
428
  listStyle: 'none !important',
184
429
  paddingLeft: '0'
185
430
  }), _obj)), // --- LinkCard (BEM: block__element) ---
186
- _define_property(_obj2, "".concat(token.componentCls, "-link-card"), {
431
+ _define_property(_obj1, "".concat(token.componentCls, "-link-card"), {
187
432
  cursor: 'pointer',
188
433
  position: 'relative',
189
434
  display: 'flex',
190
435
  alignItems: 'center'
191
- }), _define_property(_obj2, "".concat(token.componentCls, "-link-card__container"), {
436
+ }), _define_property(_obj1, "".concat(token.componentCls, "-link-card__container"), {
192
437
  padding: 12,
193
438
  border: '1px solid #f0f0f0',
194
439
  borderRadius: '0.5em',
@@ -211,7 +456,7 @@ var genStyle = function genStyle(token) {
211
456
  color: '#1667ff'
212
457
  }
213
458
  }
214
- }), _define_property(_obj2, "".concat(token.componentCls, "-link-card__content"), {
459
+ }), _define_property(_obj1, "".concat(token.componentCls, "-link-card__content"), {
215
460
  display: 'flex',
216
461
  alignItems: 'center',
217
462
  gap: 12,
@@ -219,14 +464,14 @@ var genStyle = function genStyle(token) {
219
464
  fontSize: 16,
220
465
  flex: 1,
221
466
  minWidth: 0
222
- }), _define_property(_obj2, "".concat(token.componentCls, "-link-card__title"), {
467
+ }), _define_property(_obj1, "".concat(token.componentCls, "-link-card__title"), {
223
468
  overflow: 'ellipsis',
224
469
  textOverflow: 'ellipsis',
225
470
  textWrap: 'nowrap',
226
471
  textDecoration: 'none',
227
472
  display: 'block',
228
473
  color: '#262626'
229
- }), _define_property(_obj2, "".concat(token.componentCls, "-link-card__description"), {
474
+ }), _define_property(_obj1, "".concat(token.componentCls, "-link-card__description"), {
230
475
  flex: 1,
231
476
  minWidth: 0,
232
477
  marginTop: 4,
@@ -235,16 +480,16 @@ var genStyle = function genStyle(token) {
235
480
  fontSize: 12,
236
481
  color: 'rgba(0,0,0,0.45)',
237
482
  justifyContent: 'space-between'
238
- }), _define_property(_obj2, "".concat(token.componentCls, "-link-card__collaborators"), {
483
+ }), _define_property(_obj1, "".concat(token.componentCls, "-link-card__collaborators"), {
239
484
  flex: 1,
240
485
  minWidth: 0,
241
486
  display: 'flex',
242
487
  justifyContent: 'space-between'
243
- }), _define_property(_obj2, "".concat(token.componentCls, "-link-card__update-time"), {
488
+ }), _define_property(_obj1, "".concat(token.componentCls, "-link-card__update-time"), {
244
489
  color: 'rgba(0,0,0,0.45)',
245
490
  fontSize: 12
246
491
  }), // --- TagPopup ---
247
- _define_property(_obj2, "".concat(token.componentCls, "-tag-popup"), {
492
+ _define_property(_obj1, "".concat(token.componentCls, "-tag-popup"), {
248
493
  position: 'relative',
249
494
  cursor: 'pointer',
250
495
  padding: '0px 4px',
@@ -290,7 +535,7 @@ var genStyle = function genStyle(token) {
290
535
  '&-loading': {
291
536
  }
292
537
  }), // --- Mermaid ---
293
- _define_property(_obj2, "".concat(token.componentCls, "-mermaid"), {
538
+ _define_property(_obj1, "".concat(token.componentCls, "-mermaid"), {
294
539
  // 基础容器样式
295
540
  height: '240px',
296
541
  minWidth: '300px',
@@ -364,320 +609,7 @@ var genStyle = function genStyle(token) {
364
609
  fontSize: '12px'
365
610
  }
366
611
  }
367
- }), // --- Table ---
368
- // 表格样式使用 CSS 变量 + fallback,支持通过父级 style 或 ConfigProvider 覆盖:
369
- // --agentic-ui-table-border-radius, --agentic-ui-table-border-color,
370
- // --agentic-ui-table-header-bg, --agentic-ui-table-hover-bg,
371
- // --agentic-ui-table-cell-bg, --agentic-ui-table-cell-min-width,
372
- // --agentic-ui-table-cell-padding
373
- _define_property(_obj2, "".concat(token.componentCls, "-content-table"), {
374
- width: '100%',
375
- overflow: 'auto',
376
- flex: 1,
377
- minWidth: 0,
378
- position: 'relative',
379
- '&-container': _define_property({
380
- display: 'flex',
381
- gap: 1,
382
- maxWidth: '100%',
383
- minWidth: 0,
384
- outline: 'none',
385
- position: 'relative',
386
- marginBottom: 12
387
- }, "&:hover ".concat(token.componentCls, "-content-table-readonly-table-actions"), {
388
- opacity: 1,
389
- transform: 'translateX(50%)',
390
- top: -24
391
- }),
392
- '&-editor-table': {
393
- marginTop: '1em'
394
- },
395
- '&-readonly-table-actions': {
396
- opacity: 0,
397
- position: 'absolute',
398
- top: 20,
399
- display: 'flex',
400
- gap: 8,
401
- right: '50%',
402
- zIndex: 1000,
403
- backgroundColor: 'var(--color-gray-bg-page-light)',
404
- borderRadius: 'var(--radius-control-base)',
405
- padding: '4px 8px',
406
- boxShadow: 'var(--shadow-control-base)',
407
- border: 'none',
408
- transform: 'translateX(50%)',
409
- transition: 'all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)'
410
- },
411
- table: (_obj1 = {
412
- borderCollapse: 'separate',
413
- borderSpacing: 0,
414
- width: 'max-content',
415
- tableLayout: 'fixed',
416
- margin: '16px 0',
417
- maxWidth: '100%'
418
- }, _define_property(_obj1, "&".concat(token.componentCls, "-content-table-readonly-table"), {
419
- width: '100%',
420
- minWidth: 'max-content'
421
- }), _define_property(_obj1, "position", 'relative'), _define_property(_obj1, "fontVariant", 'tabular-nums'), _define_property(_obj1, "borderRadius", 'var(--agentic-ui-table-border-radius, 8px)'), _define_property(_obj1, "border", '1px solid var(--agentic-ui-table-border-color, #E7E9E8)'), _define_property(_obj1, "&".concat(token.componentCls, "-content-table-readonly-pure"), {
422
- border: 'none',
423
- borderRadius: 'none',
424
- 'tr:not(.config-tr) td:not(.config-td)': {
425
- borderLeft: 'none'
426
- },
427
- 'tr:not(.config-tr):last-child td:not(.config-td)': {
428
- borderBottom: '1px solid var(--agentic-ui-table-border-color, #E7E9E8)'
429
- },
430
- 'tr:not(.config-tr):first-child th:first-child:not(.config-td):not([colspan]):not([rowspan]), tr:not(.config-tr):first-child td:first-child:not(.config-td):not([colspan]):not([rowspan])': {
431
- borderTopLeftRadius: 'unset'
432
- },
433
- 'tr:not(.config-tr):first-child th:last-child:not(.config-td):not([colspan]):not([rowspan]), tr:not(.config-tr):first-child td:last-child:not(.config-td):not([colspan]):not([rowspan])': {
434
- borderTopRightRadius: 'unset'
435
- },
436
- 'tr:not(.config-tr):last-child td:first-child:not(.config-td):not([colspan]):not([rowspan]), tr:not(.config-tr):last-child th:first-child:not(.config-td):not([colspan]):not([rowspan])': {
437
- borderBottomLeftRadius: 'unset'
438
- },
439
- 'tr:not(.config-tr):last-child td:last-child:not(.config-td):not([colspan]):not([rowspan]), tr:not(.config-tr):last-child th:last-child:not(.config-td):not([colspan]):not([rowspan])': {
440
- borderBottomRightRadius: 'unset'
441
- }
442
- }), _define_property(_obj1, 'th.config-th,td.config-td', {
443
- borderBottom: '1px solid var(--agentic-ui-table-border-color, #E7E9E8)',
444
- borderLeft: '1px solid var(--agentic-ui-table-border-color, #E7E9E8)'
445
- }), _define_property(_obj1, 'tr td.config-td:first-child', {
446
- borderLeft: 'none'
447
- }), _define_property(_obj1, 'th:not(.config-td)', {
448
- backgroundColor: 'var(--agentic-ui-table-header-bg, #f7f7f9)',
449
- borderBottom: '1px solid var(--agentic-ui-table-border-color, #E7E9E8)',
450
- textWrap: 'nowrap',
451
- verticalAlign: 'top',
452
- padding: 'var(--agentic-ui-table-cell-padding, 16px 12px)',
453
- textAlign: 'left',
454
- lineHeight: '24px',
455
- fontSize: '1em',
456
- fontWeight: 600,
457
- borderTop: 'none',
458
- minWidth: 'var(--agentic-ui-table-cell-min-width, 120px)',
459
- width: 'var(--agentic-ui-table-cell-min-width, 120px)',
460
- whiteSpace: 'nowrap',
461
- overflow: 'hidden',
462
- textOverflow: 'ellipsis',
463
- zIndex: 1,
464
- background: 'inherit'
465
- }), _define_property(_obj1, 'td:not(.config-td)', {
466
- verticalAlign: 'top',
467
- padding: 'var(--agentic-ui-table-cell-padding, 16px 12px)',
468
- textAlign: 'left',
469
- position: 'relative',
470
- lineHeight: '24px',
471
- fontSize: '1em',
472
- minWidth: 'var(--agentic-ui-table-cell-min-width, 120px)',
473
- width: 'var(--agentic-ui-table-cell-min-width, 120px)',
474
- whiteSpace: 'nowrap',
475
- overflow: 'hidden',
476
- textOverflow: 'ellipsis',
477
- zIndex: 1,
478
- background: 'inherit',
479
- 'div[data-be="paragraph"]': {
480
- margin: 0,
481
- textWrap: 'auto'
482
- }
483
- }), _define_property(_obj1, 'tr:not(.config-tr)', {
484
- background: 'inherit',
485
- '&:first-child td:not(.config-td)': {
486
- borderTop: 'none'
487
- },
488
- 'td:not(.config-td)': {
489
- borderBottom: '1px solid var(--agentic-ui-table-border-color, #E7E9E8)',
490
- borderLeft: '1px solid var(--agentic-ui-table-border-color, #E7E9E8)',
491
- '&:first-child': {
492
- fontSize: '1em',
493
- lineHeight: '24px',
494
- fontWeight: 600
495
- }
496
- },
497
- 'td:first-child:not(.config-td)': {
498
- borderLeft: 'none'
499
- },
500
- '&:last-child td:not(.config-td)': {
501
- borderBottom: 'none'
502
- }
503
- }), _define_property(_obj1, 'tbody tr:not(.config-tr):hover', {
504
- background: 'linear-gradient(var(--agentic-ui-table-hover-bg, rgba(0, 0, 0, 0.04)), var(--agentic-ui-table-hover-bg, rgba(0, 0, 0, 0.04))), linear-gradient(var(--agentic-ui-table-cell-bg, #ffffff), var(--agentic-ui-table-cell-bg, #ffffff))'
505
- }), // 表格圆角处理
506
- _define_property(_obj1, 'th:not(.config-td), td:not(.config-td)', {
507
- borderRadius: '0'
508
- }), _define_property(_obj1, 'tr:not(.config-tr):first-child th:first-child:not(.config-td):not([colspan]):not([rowspan]), tr:not(.config-tr):first-child td:first-child:not(.config-td):not([colspan]):not([rowspan])', {
509
- borderTopLeftRadius: 'var(--agentic-ui-table-border-radius, 8px)'
510
- }), _define_property(_obj1, 'tr:not(.config-tr):first-child th:last-child:not(.config-td):not([colspan]):not([rowspan]), tr:not(.config-tr):first-child td:last-child:not(.config-td):not([colspan]):not([rowspan])', {
511
- borderTopRightRadius: 'var(--agentic-ui-table-border-radius, 8px)'
512
- }), _define_property(_obj1, 'tr:not(.config-tr):last-child td:first-child:not(.config-td):not([colspan]):not([rowspan]), tr:not(.config-tr):last-child th:first-child:not(.config-td):not([colspan]):not([rowspan])', {
513
- borderBottomLeftRadius: 'var(--agentic-ui-table-border-radius, 8px)'
514
- }), _define_property(_obj1, 'tr:not(.config-tr):last-child td:last-child:not(.config-td):not([colspan]):not([rowspan]), tr:not(.config-tr):last-child th:last-child:not(.config-td):not([colspan]):not([rowspan])', {
515
- borderBottomRightRadius: 'var(--agentic-ui-table-border-radius, 8px)'
516
- }), // 处理合并单元格的圆角
517
- _define_property(_obj1, 'tr:not(.config-tr):first-child th:not(.config-td)[colspan]:first-child, tr:not(.config-tr):first-child td:not(.config-td)[colspan]:first-child,tr:not(.config-tr):first-child th:not(.config-td)[rowspan]:first-child, tr:not(.config-tr):first-child td:not(.config-td)[rowspan]:first-child', {
518
- borderTopLeftRadius: 'var(--agentic-ui-table-border-radius, 8px)'
519
- }), _define_property(_obj1, 'tr:not(.config-tr):first-child th:not(.config-td)[colspan]:last-child, tr:not(.config-tr):first-child td:not(.config-td)[colspan]:last-child,tr:not(.config-tr):first-child th:not(.config-td)[rowspan]:last-child, tr:not(.config-tr):first-child td:not(.config-td)[rowspan]:last-child', {
520
- borderTopRightRadius: 'var(--agentic-ui-table-border-radius, 8px)'
521
- }), _define_property(_obj1, 'tr:not(.config-tr):last-child td:not(.config-td)[colspan]:first-child, tr:not(.config-tr):last-child th:not(.config-td)[colspan]:first-child,tr:not(.config-tr):last-child td:not(.config-td)[rowspan]:first-child, tr:not(.config-tr):last-child th:not(.config-td)[rowspan]:first-child', {
522
- borderBottomLeftRadius: 'var(--agentic-ui-table-border-radius, 8px)'
523
- }), _define_property(_obj1, 'tr:not(.config-tr):last-child td:not(.config-td)[colspan]:last-child, tr:not(.config-tr):last-child th:not(.config-td)[colspan]:last-child,tr:not(.config-tr):last-child td:not(.config-td)[rowspan]:last-child, tr:not(.config-tr):last-child th:not(.config-td)[rowspan]:last-child', {
524
- borderBottomRightRadius: 'var(--agentic-ui-table-border-radius, 8px)'
525
- }), _define_property(_obj1, 'tr:not(.config-tr):first-child:last-child th:not(.config-td)[colspan]:first-child:last-child, tr:not(.config-tr):first-child:last-child td:not(.config-td)[colspan]:first-child:last-child', {
526
- borderRadius: 'var(--agentic-ui-table-border-radius, 8px)'
527
- }), _define_property(_obj1, 'th:not(.config-td)[rowspan]:first-child:last-child, td:not(.config-td)[rowspan]:first-child:last-child', {
528
- borderTopLeftRadius: 'var(--agentic-ui-table-border-radius, 8px)',
529
- borderBottomLeftRadius: 'var(--agentic-ui-table-border-radius, 8px)'
530
- }), _define_property(_obj1, "@media (max-width: ".concat(MOBILE_BREAKPOINT, ")"), {
531
- 'th:not(.config-td), td:not(.config-td)': {
532
- padding: "".concat(MOBILE_PADDING)
533
- }
534
- }), _obj1),
535
- 'table.htCore': {
536
- boxSizing: 'content-box',
537
- '*': {
538
- boxSizing: 'content-box'
539
- }
540
- }
541
- }), // --- Table Td ---
542
- _define_property(_obj2, "".concat(token.componentCls, "-table-td"), _define_property({
543
- padding: '8px',
544
- verticalAlign: 'middle',
545
- wordWrap: 'break-word',
546
- wordBreak: 'break-all',
547
- overflow: 'hidden',
548
- textOverflow: 'ellipsis',
549
- whiteSpace: 'pre-wrap',
550
- '&[data-select="true"]:after': {
551
- content: '" "',
552
- position: 'absolute',
553
- top: '0',
554
- left: '0',
555
- right: '0',
556
- bottom: '0',
557
- zIndex: 2,
558
- pointerEvents: 'none',
559
- backgroundColor: 'var(--color-primary-control-fill-secondary-hover)'
560
- }
561
- }, "@media (max-width: ".concat(MOBILE_BREAKPOINT, ")"), {
562
- padding: '2px'
563
- })), // --- Table Row Index ---
564
- _define_property(_obj2, "".concat(token.componentCls, "-table-row-index"), {
565
- display: 'table-row'
566
- }), // --- Table Cell Index ---
567
- _define_property(_obj2, "".concat(token.componentCls, "-table-cell-index"), {
568
- width: '12px',
569
- maxWidth: 12,
570
- padding: 0,
571
- position: 'relative',
572
- verticalAlign: 'middle',
573
- contentEditable: false,
574
- backgroundColor: 'var(--color-gray-control-fill-secondary)',
575
- '&:hover': {
576
- backgroundColor: 'var(--color-gray-control-fill-secondary-hover)'
577
- }
578
- }), _define_property(_obj2, "".concat(token.componentCls, "-table-cell-index-action-buttons"), {
579
- position: 'absolute',
580
- top: '4px',
581
- left: '-24px',
582
- zIndex: 1000,
583
- alignItems: 'center',
584
- flexDirection: 'column',
585
- gap: '2px',
586
- opacity: 0,
587
- display: 'none',
588
- transition: 'opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)'
589
- }), _define_property(_obj2, "".concat(token.componentCls, "-table-cell-index-action-buttons-visible"), {
590
- opacity: 1,
591
- display: 'flex'
592
- }), _define_property(_obj2, "".concat(token.componentCls, "-table-cell-index-action-button"), {
593
- padding: '2px',
594
- display: 'flex',
595
- alignItems: 'center',
596
- zIndex: 1000,
597
- justifyContent: 'center',
598
- fontSize: 12,
599
- border: '1px solid var(--agentic-ui-table-border-color, #E7E9E8)',
600
- width: '20px',
601
- height: '20px',
602
- cursor: 'pointer',
603
- backgroundPosition: '50%',
604
- backgroundRepeat: 'no-repeat',
605
- transition: 'color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)',
606
- borderRadius: '4px',
607
- background: 'var(--color-gray-bg-card-white)',
608
- boxShadow: 'var(--shadow-border-base)',
609
- color: 'var(--color-gray-text-secondary)',
610
- '&:hover': {
611
- backgroundColor: '#FFF',
612
- boxShadow: 'var(--shadow-control-lg)'
613
- }
614
- }), _define_property(_obj2, "".concat(token.componentCls, "-table-cell-index-delete-icon"), {
615
- '&:hover': {
616
- color: '#ff4d4f'
617
- }
618
- }), _define_property(_obj2, "".concat(token.componentCls, "-table-cell-index-insert-row-before"), {
619
- '&:hover': {
620
- color: '#52c41a'
621
- }
622
- }), _define_property(_obj2, "".concat(token.componentCls, "-table-cell-index-insert-row-after"), {
623
- '&:hover': {
624
- color: '#52c41a'
625
- }
626
- }), // --- Table Cell Index Spacer ---
627
- _define_property(_obj2, "".concat(token.componentCls, "-table-cell-index-spacer"), {
628
- contentEditable: false,
629
- cursor: 'pointer',
630
- backgroundColor: 'var(--color-gray-control-fill-secondary)',
631
- '&:hover': {
632
- backgroundColor: 'var(--color-gray-control-fill-secondary-hover)'
633
- }
634
- }), _define_property(_obj2, "".concat(token.componentCls, "-table-cell-index-spacer-action-buttons"), {
635
- position: 'absolute',
636
- top: '-28px',
637
- right: '50%',
638
- transform: 'translateX(50%)',
639
- zIndex: 10,
640
- display: 'flex',
641
- alignItems: 'center',
642
- gap: '2px',
643
- opacity: 0,
644
- transition: 'opacity 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)'
645
- }), _define_property(_obj2, "".concat(token.componentCls, "-table-cell-index-spacer-action-buttons-visible"), {
646
- opacity: 1
647
- }), _define_property(_obj2, "".concat(token.componentCls, "-table-cell-index-spacer-action-button"), {
648
- padding: '2px',
649
- display: 'flex',
650
- alignItems: 'center',
651
- justifyContent: 'center',
652
- fontSize: 12,
653
- border: '1px solid var(--agentic-ui-table-border-color, #E7E9E8)',
654
- width: '20px',
655
- height: '20px',
656
- cursor: 'pointer',
657
- backgroundPosition: '50%',
658
- backgroundRepeat: 'no-repeat',
659
- transition: 'color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1), background-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)',
660
- borderRadius: '4px',
661
- background: 'var(--color-gray-bg-card-white)',
662
- boxShadow: 'var(--shadow-border-base)',
663
- color: 'var(--color-gray-text-secondary)',
664
- '&:hover': {
665
- backgroundColor: '#FFF',
666
- boxShadow: 'var(--shadow-control-lg)'
667
- }
668
- }), _define_property(_obj2, "".concat(token.componentCls, "-table-cell-index-spacer-delete-icon"), {
669
- '&:hover': {
670
- color: '#ff4d4f'
671
- }
672
- }), _define_property(_obj2, "".concat(token.componentCls, "-table-cell-index-spacer-insert-column-before"), {
673
- '&:hover': {
674
- color: '#52c41a'
675
- }
676
- }), _define_property(_obj2, "".concat(token.componentCls, "-table-cell-index-spacer-insert-column-after"), {
677
- '&:hover': {
678
- color: '#52c41a'
679
- }
680
- }), _obj2));
612
+ }), _obj1), genTableStyle(token, MOBILE_BREAKPOINT, MOBILE_PADDING)));
681
613
  };
682
614
  /**
683
615
  * BubbleChat