one-design-next 0.0.104 → 0.0.105
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.
- package/dist/action-bar/index.d.ts +2 -2
- package/dist/action-bar/index.js +3 -1
- package/dist/agent-think/CircleIcon.d.ts +2 -2
- package/dist/agent-think/CircleIcon.js +1 -1
- package/dist/agent-think/JellyTriangleIcon.d.ts +2 -2
- package/dist/agent-think/JellyTriangleIcon.js +1 -1
- package/dist/agent-think/ThinkingDoneIcon.d.ts +2 -2
- package/dist/agent-think/ThinkingDoneIcon.js +1 -1
- package/dist/agent-think/ThinkingIcon.d.ts +2 -2
- package/dist/agent-think/ThinkingIcon.js +1 -1
- package/dist/agent-think/index.d.ts +2 -2
- package/dist/agent-think/index.js +6 -3
- package/dist/artifact/icons/ArtifactFileIcon.d.ts +2 -2
- package/dist/artifact/icons/ArtifactFileIcon.js +1 -0
- package/dist/artifact/index.d.ts +2 -2
- package/dist/artifact/index.js +1 -1
- package/dist/attachments/index.d.ts +2 -2
- package/dist/attachments/index.js +5 -1
- package/dist/chat-group/index.d.ts +2 -2
- package/dist/chat-group/index.js +1 -1
- package/dist/chat-group/presence-list.d.ts +3 -3
- package/dist/chat-group/presence-list.js +1 -1
- package/dist/chat-item/index.d.ts +3 -3
- package/dist/chat-item/index.js +1 -1
- package/dist/chat-list/index.d.ts +2 -2
- package/dist/chat-list/index.js +1 -1
- package/dist/code-block/index.d.ts +2 -2
- package/dist/code-block/index.js +2 -1
- package/dist/composer/editor.d.ts +2 -2
- package/dist/composer/editor.js +1 -1
- package/dist/composer/index.d.ts +2 -2
- package/dist/composer/index.js +1 -1
- package/dist/composer/inline-ref.d.ts +2 -2
- package/dist/composer/inline-ref.js +1 -0
- package/dist/error-block/index.d.ts +2 -2
- package/dist/error-block/index.js +2 -0
- package/dist/image/index.d.ts +2 -3
- package/dist/image/index.js +1 -1
- package/dist/invocation/index.d.ts +2 -2
- package/dist/invocation/index.js +1 -0
- package/dist/invocation/param-popover.d.ts +2 -2
- package/dist/invocation/param-popover.js +1 -1
- package/dist/mention/index.d.ts +2 -2
- package/dist/mention/index.js +1 -0
- package/dist/message-image/image-viewer.d.ts +2 -2
- package/dist/message-image/image-viewer.js +1 -1
- package/dist/message-image/index.d.ts +2 -2
- package/dist/message-image/index.js +2 -2
- package/dist/overlay-vertical-scrollbar/index.d.ts +2 -2
- package/dist/overlay-vertical-scrollbar/index.js +1 -1
- package/dist/preview-panel/CsvPreviewTable.d.ts +2 -2
- package/dist/preview-panel/CsvPreviewTable.js +1 -0
- package/dist/preview-panel/index.d.ts +2 -2
- package/dist/preview-panel/index.js +1 -1
- package/dist/provenance/index.d.ts +2 -2
- package/dist/provenance/index.js +1 -0
- package/dist/skill-slot/index.d.ts +2 -2
- package/dist/skill-slot/index.js +1 -1
- package/dist/sources/index.d.ts +2 -2
- package/dist/sources/index.js +1 -1
- package/dist/stream-pulse/index.d.ts +2 -2
- package/dist/stream-pulse/index.js +1 -0
- package/dist/suggestions/index.d.ts +2 -2
- package/dist/suggestions/index.js +2 -0
- package/dist/text-swap/index.d.ts +1 -1
- package/dist/text-swap/index.js +1 -1
- package/dist/user-bubble/index.d.ts +2 -2
- package/dist/user-bubble/index.js +2 -1
- package/dist/user-bubble/render-segments.d.ts +1 -1
- package/dist/user-bubble/render-segments.js +1 -0
- package/dist/welcome/index.d.ts +2 -2
- package/dist/welcome/index.js +2 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './style';
|
|
3
3
|
export interface ActionBarProps {
|
|
4
4
|
content: string;
|
|
@@ -10,7 +10,7 @@ export interface ActionBarProps {
|
|
|
10
10
|
currentVersion?: number;
|
|
11
11
|
onVersionChange?: (index: number) => void;
|
|
12
12
|
}
|
|
13
|
-
export declare function ActionBar({ content, onRegenerate, feedback: feedbackProp, onFeedback, versionCount, currentVersion, onVersionChange, }: ActionBarProps):
|
|
13
|
+
export declare function ActionBar({ content, onRegenerate, feedback: feedbackProp, onFeedback, versionCount, currentVersion, onVersionChange, }: ActionBarProps): React.JSX.Element;
|
|
14
14
|
export declare namespace ActionBar {
|
|
15
15
|
var displayName: string;
|
|
16
16
|
}
|
package/dist/action-bar/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
-
import { useCallback, useRef, useState } from 'react';
|
|
4
|
+
import React, { useCallback, useRef, useState } from 'react';
|
|
5
5
|
import Button from "../button";
|
|
6
6
|
import Icon from "../icon";
|
|
7
7
|
import Tooltip from "../tooltip";
|
|
@@ -130,6 +130,7 @@ export function ActionBar(_ref) {
|
|
|
130
130
|
}), /*#__PURE__*/React.createElement("div", {
|
|
131
131
|
"data-odn-action-bar-pager": true
|
|
132
132
|
}, /*#__PURE__*/React.createElement("button", {
|
|
133
|
+
type: "button",
|
|
133
134
|
onClick: function onClick() {
|
|
134
135
|
return onVersionChange === null || onVersionChange === void 0 ? void 0 : onVersionChange(currentVersion - 1);
|
|
135
136
|
},
|
|
@@ -142,6 +143,7 @@ export function ActionBar(_ref) {
|
|
|
142
143
|
})), /*#__PURE__*/React.createElement("span", {
|
|
143
144
|
"data-odn-action-bar-pager-text": true
|
|
144
145
|
}, currentVersion + 1, "/", versionCount), /*#__PURE__*/React.createElement("button", {
|
|
146
|
+
type: "button",
|
|
145
147
|
onClick: function onClick() {
|
|
146
148
|
return onVersionChange === null || onVersionChange === void 0 ? void 0 : onVersionChange(currentVersion + 1);
|
|
147
149
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface CircleIconProps {
|
|
3
3
|
size?: number;
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const CircleIcon:
|
|
6
|
+
export declare const CircleIcon: React.MemoExoticComponent<({ size, ...rest }: CircleIconProps) => React.JSX.Element>;
|
|
7
7
|
export default CircleIcon;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["size"];
|
|
4
|
-
import { memo } from 'react';
|
|
4
|
+
import React, { memo } from 'react';
|
|
5
5
|
export var CircleIcon = /*#__PURE__*/memo(function (_ref) {
|
|
6
6
|
var _ref$size = _ref.size,
|
|
7
7
|
size = _ref$size === void 0 ? 14 : _ref$size,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface JellyTriangleIconProps {
|
|
3
3
|
size?: number;
|
|
4
4
|
speed?: number;
|
|
5
5
|
}
|
|
6
|
-
export declare const JellyTriangleIcon:
|
|
6
|
+
export declare const JellyTriangleIcon: React.MemoExoticComponent<({ size, speed }: JellyTriangleIconProps) => React.JSX.Element>;
|
|
7
7
|
export default JellyTriangleIcon;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface ThinkingDoneIconProps {
|
|
3
3
|
size?: number;
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const ThinkingDoneIcon:
|
|
6
|
+
export declare const ThinkingDoneIcon: React.MemoExoticComponent<({ size, ...rest }: ThinkingDoneIconProps) => React.JSX.Element>;
|
|
7
7
|
export default ThinkingDoneIcon;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["size"];
|
|
4
|
-
import { memo } from 'react';
|
|
4
|
+
import React, { memo } from 'react';
|
|
5
5
|
export var ThinkingDoneIcon = /*#__PURE__*/memo(function (_ref) {
|
|
6
6
|
var _ref$size = _ref.size,
|
|
7
7
|
size = _ref$size === void 0 ? 18 : _ref$size,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface ThinkingIconProps {
|
|
3
3
|
size?: number;
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const ThinkingIcon:
|
|
6
|
+
export declare const ThinkingIcon: React.MemoExoticComponent<({ size, ...rest }: ThinkingIconProps) => React.JSX.Element>;
|
|
7
7
|
export default ThinkingIcon;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["size"];
|
|
4
|
-
import { memo } from 'react';
|
|
4
|
+
import React, { memo } from 'react';
|
|
5
5
|
export var ThinkingIcon = /*#__PURE__*/memo(function (_ref) {
|
|
6
6
|
var _ref$size = _ref.size,
|
|
7
7
|
size = _ref$size === void 0 ? 18 : _ref$size,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './style';
|
|
3
3
|
export interface AgentThinkProps {
|
|
4
4
|
content: string;
|
|
@@ -8,7 +8,7 @@ export interface AgentThinkProps {
|
|
|
8
8
|
variant?: 'block' | 'inline';
|
|
9
9
|
icon?: React.ReactNode;
|
|
10
10
|
}
|
|
11
|
-
export declare function AgentThink({ content, isThinking, duration: durationProp, defaultOpen, variant, icon }: AgentThinkProps):
|
|
11
|
+
export declare function AgentThink({ content, isThinking, duration: durationProp, defaultOpen, variant, icon, }: AgentThinkProps): React.JSX.Element;
|
|
12
12
|
export declare namespace AgentThink {
|
|
13
13
|
var displayName: string;
|
|
14
14
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
-
import { useState, useEffect, useRef, useCallback } from 'react';
|
|
4
3
|
import { AnimatePresence, motion } from 'motion/react';
|
|
4
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
5
|
import HoverFill from "../hover-fill";
|
|
6
6
|
import Icon from "../icon";
|
|
7
7
|
import "./style";
|
|
@@ -19,6 +19,8 @@ export function AgentThink(_ref) {
|
|
|
19
19
|
"data-odn-agent-think-inline": true
|
|
20
20
|
}, content.replace(/\n{2,}/g, '\n'));
|
|
21
21
|
}
|
|
22
|
+
|
|
23
|
+
// eslint-disable-next-line @typescript-eslint/no-use-before-define -- 内联变体先短路,块实现放在下方
|
|
22
24
|
return /*#__PURE__*/React.createElement(AgentThinkBlock, {
|
|
23
25
|
content: content,
|
|
24
26
|
isThinking: isThinking,
|
|
@@ -38,7 +40,7 @@ function AgentThinkBlock(_ref2) {
|
|
|
38
40
|
_useState2 = _slicedToArray(_useState, 2),
|
|
39
41
|
collapsed = _useState2[0],
|
|
40
42
|
setCollapsed = _useState2[1];
|
|
41
|
-
var _useState3 = useState(durationProp
|
|
43
|
+
var _useState3 = useState(durationProp !== undefined && durationProp !== null ? Math.round(durationProp / 1000) : 0),
|
|
42
44
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
43
45
|
seconds = _useState4[0],
|
|
44
46
|
setSeconds = _useState4[1];
|
|
@@ -46,7 +48,7 @@ function AgentThinkBlock(_ref2) {
|
|
|
46
48
|
var userToggledRef = useRef(false);
|
|
47
49
|
var scrollRef = useRef(null);
|
|
48
50
|
useEffect(function () {
|
|
49
|
-
if (durationProp
|
|
51
|
+
if (durationProp !== undefined && durationProp !== null) return;
|
|
50
52
|
if (isThinking) {
|
|
51
53
|
if (!startRef.current) startRef.current = Date.now();
|
|
52
54
|
var timer = setInterval(function () {
|
|
@@ -114,6 +116,7 @@ function AgentThinkBlock(_ref2) {
|
|
|
114
116
|
"data-odn-agent-think-trigger-wrap": true,
|
|
115
117
|
bgClassName: "odn-agent-think-trigger-bg"
|
|
116
118
|
}, /*#__PURE__*/React.createElement("button", {
|
|
119
|
+
type: "button",
|
|
117
120
|
onClick: handleToggle,
|
|
118
121
|
"data-odn-agent-think-trigger": true
|
|
119
122
|
}, /*#__PURE__*/React.createElement("span", null, "\u5DF2\u5B8C\u6210\u601D\u8003", timeLabel), /*#__PURE__*/React.createElement(Icon, _extends({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { type HTMLAttributes } from 'react';
|
|
2
2
|
import { type ArtifactFileIconSize, type ArtifactFileIconType } from './file-icons';
|
|
3
3
|
export interface ArtifactFileIconProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'children'> {
|
|
4
4
|
type: ArtifactFileIconType;
|
|
@@ -10,7 +10,7 @@ export interface ArtifactFileIconProps extends Omit<HTMLAttributes<HTMLSpanEleme
|
|
|
10
10
|
* - medium:占位 32×36,源 38×39
|
|
11
11
|
* - small:占位 14×16,源 17×18
|
|
12
12
|
*/
|
|
13
|
-
export declare function ArtifactFileIcon({ type, size, className, style, ...rest }: ArtifactFileIconProps):
|
|
13
|
+
export declare function ArtifactFileIcon({ type, size, className, style, ...rest }: ArtifactFileIconProps): React.JSX.Element;
|
|
14
14
|
export declare namespace ArtifactFileIcon {
|
|
15
15
|
var displayName: string;
|
|
16
16
|
}
|
|
@@ -2,6 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["type", "size", "className", "style"];
|
|
5
|
+
import React from 'react';
|
|
5
6
|
import { ARTIFACT_FILE_ICON_MEDIUM_SIZE, ARTIFACT_FILE_ICON_MEDIUM_VIEWBOX, ARTIFACT_FILE_ICON_SMALL_SIZE, ARTIFACT_FILE_ICON_SMALL_VIEWBOX, artifactFileIcons } from "./file-icons";
|
|
6
7
|
var ICON_LAYOUT = {
|
|
7
8
|
medium: {
|
package/dist/artifact/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type CSSProperties } from 'react';
|
|
1
|
+
import React, { type CSSProperties } from 'react';
|
|
2
2
|
import { type ArtifactActionKind } from './actions';
|
|
3
3
|
import { type ArtifactFileIconType } from './icons';
|
|
4
4
|
import './style';
|
|
@@ -42,7 +42,7 @@ export interface ArtifactProps {
|
|
|
42
42
|
* - medium / Card:左 Icon + 右标题 / 大小·日期;可点 hover 时 Icon 后退缩小、文案左移遮罩,右侧浮出操作预期
|
|
43
43
|
* - small / Small:无底色/描边;hover 用 HoverFill(Navi 默认色);不可预览类型额外浮出下载 Icon
|
|
44
44
|
*/
|
|
45
|
-
export declare function Artifact({ title, actionKind, fileType, fileSize, date, size, status, onOpen, className, style, }: ArtifactProps):
|
|
45
|
+
export declare function Artifact({ title, actionKind, fileType, fileSize, date, size, status, onOpen, className, style, }: ArtifactProps): React.JSX.Element;
|
|
46
46
|
export declare namespace Artifact {
|
|
47
47
|
var displayName: string;
|
|
48
48
|
}
|
package/dist/artifact/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
|
-
import { useCallback, useRef, useState } from 'react';
|
|
5
|
+
import React, { useCallback, useRef, useState } from 'react';
|
|
6
6
|
import HoverFill from "../hover-fill";
|
|
7
7
|
import Icon from "../icon";
|
|
8
8
|
import Tooltip from "../tooltip";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { Attachment } from '../_genui-types';
|
|
3
3
|
import './style';
|
|
4
4
|
export interface AttachmentsProps {
|
|
@@ -11,7 +11,7 @@ export interface AttachmentsProps {
|
|
|
11
11
|
onDownload?: (attachment: Attachment) => void;
|
|
12
12
|
compact?: boolean;
|
|
13
13
|
}
|
|
14
|
-
export declare function Attachments({ attachments, onRemove, onFileClick,
|
|
14
|
+
export declare function Attachments({ attachments, onRemove, onFileClick, onDownload, compact, }: AttachmentsProps): React.JSX.Element | null;
|
|
15
15
|
export declare namespace Attachments {
|
|
16
16
|
var displayName: string;
|
|
17
17
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import HoverFill from "../hover-fill";
|
|
3
4
|
import Icon from "../icon";
|
|
4
5
|
import Image from "../image";
|
|
@@ -143,7 +144,6 @@ export function Attachments(_ref2) {
|
|
|
143
144
|
var attachments = _ref2.attachments,
|
|
144
145
|
onRemove = _ref2.onRemove,
|
|
145
146
|
onFileClick = _ref2.onFileClick,
|
|
146
|
-
onRetry = _ref2.onRetry,
|
|
147
147
|
onDownload = _ref2.onDownload,
|
|
148
148
|
_ref2$compact = _ref2.compact,
|
|
149
149
|
compact = _ref2$compact === void 0 ? false : _ref2$compact;
|
|
@@ -217,6 +217,7 @@ export function Attachments(_ref2) {
|
|
|
217
217
|
"data-odn-attachments-thumb-card-image": isImage || undefined,
|
|
218
218
|
"data-odn-attachments-error": isError || undefined
|
|
219
219
|
}, thumbCardInner), onRemove && /*#__PURE__*/React.createElement("button", {
|
|
220
|
+
type: "button",
|
|
220
221
|
onClick: function onClick() {
|
|
221
222
|
return onRemove(i);
|
|
222
223
|
},
|
|
@@ -287,6 +288,7 @@ export function Attachments(_ref2) {
|
|
|
287
288
|
name: "alert-triangle",
|
|
288
289
|
size: 16
|
|
289
290
|
}))), onRemove && /*#__PURE__*/React.createElement("button", {
|
|
291
|
+
type: "button",
|
|
290
292
|
onClick: function onClick() {
|
|
291
293
|
return onRemove(i);
|
|
292
294
|
},
|
|
@@ -412,6 +414,7 @@ export function Attachments(_ref2) {
|
|
|
412
414
|
}, reportInner) : /*#__PURE__*/React.createElement("div", {
|
|
413
415
|
"data-odn-attachments-report-card": true
|
|
414
416
|
}, reportInner), onRemove && /*#__PURE__*/React.createElement("button", {
|
|
417
|
+
type: "button",
|
|
415
418
|
onClick: function onClick() {
|
|
416
419
|
return onRemove(i);
|
|
417
420
|
},
|
|
@@ -478,6 +481,7 @@ export function Attachments(_ref2) {
|
|
|
478
481
|
"data-odn-attachments-card": true,
|
|
479
482
|
"data-odn-attachments-error": isError || undefined
|
|
480
483
|
}, fileCardInner), onRemove && /*#__PURE__*/React.createElement("button", {
|
|
484
|
+
type: "button",
|
|
481
485
|
onClick: function onClick() {
|
|
482
486
|
return onRemove(i);
|
|
483
487
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
1
|
+
import React, { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
2
|
import './style';
|
|
3
3
|
/** 组内每页条数。首次展开与后续「展开更多」都按此分页。 */
|
|
4
4
|
export declare const CHAT_GROUP_PREVIEW_LIMIT = 5;
|
|
@@ -45,7 +45,7 @@ export interface ChatGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'ti
|
|
|
45
45
|
overflowHint?: boolean;
|
|
46
46
|
children?: ReactNode;
|
|
47
47
|
}
|
|
48
|
-
export declare function ChatGroup({ title, collapsible, collapsed: collapsedProp, defaultCollapsed, onCollapsedChange, renaming: renamingProp, defaultRenaming, onRenamingChange, onRename, folderIcon, section, extra, extraVisible, previewLimit, overflowHint, children, className, ...rest }: ChatGroupProps):
|
|
48
|
+
export declare function ChatGroup({ title, collapsible, collapsed: collapsedProp, defaultCollapsed, onCollapsedChange, renaming: renamingProp, defaultRenaming, onRenamingChange, onRename, folderIcon, section, extra, extraVisible, previewLimit, overflowHint, children, className, ...rest }: ChatGroupProps): React.JSX.Element;
|
|
49
49
|
export declare namespace ChatGroup {
|
|
50
50
|
var displayName: string;
|
|
51
51
|
}
|
package/dist/chat-group/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
4
|
var _excluded = ["title", "collapsible", "collapsed", "defaultCollapsed", "onCollapsedChange", "renaming", "defaultRenaming", "onRenamingChange", "onRename", "folderIcon", "section", "extra", "extraVisible", "previewLimit", "overflowHint", "children", "className"];
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
import { Children, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
6
|
+
import React, { Children, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
7
7
|
import HoverFill from "../hover-fill";
|
|
8
8
|
import Icon from "../icon";
|
|
9
9
|
import { PRESENCE_TOTAL_MS, PresenceSlots } from "./presence-list";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
2
|
export declare const PRESENCE_SHIFT_MS = 180;
|
|
3
3
|
export declare const PRESENCE_FADE_MS = 160;
|
|
4
4
|
export declare const PRESENCE_TOTAL_MS: number;
|
|
@@ -18,7 +18,7 @@ export declare function usePresence(childList: ReactNode[], enabled: boolean, em
|
|
|
18
18
|
entering: Entering | null;
|
|
19
19
|
leaving: Leaving | null;
|
|
20
20
|
};
|
|
21
|
-
export declare function buildPresenceSlots(childList: ReactNode[], entering: Entering | null, leaving: Leaving | null, displayLimit?: number, revealingKeys?: string[] | null):
|
|
21
|
+
export declare function buildPresenceSlots(childList: ReactNode[], entering: Entering | null, leaving: Leaving | null, displayLimit?: number, revealingKeys?: string[] | null): React.JSX.Element[];
|
|
22
22
|
export declare function PresenceSlots({ children, enabled, displayLimit, empty, emptyKind, host, }: {
|
|
23
23
|
children?: ReactNode;
|
|
24
24
|
enabled?: boolean;
|
|
@@ -27,5 +27,5 @@ export declare function PresenceSlots({ children, enabled, displayLimit, empty,
|
|
|
27
27
|
/** 0 ↔ 1 条时的入场/离场。默认 `fade`;置顶组消失用 `shift` 收高度。 */
|
|
28
28
|
emptyKind?: PresenceKind;
|
|
29
29
|
host?: (content: ReactNode, occupied: boolean) => ReactNode;
|
|
30
|
-
}):
|
|
30
|
+
}): React.JSX.Element;
|
|
31
31
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
import { Children, cloneElement, Fragment, isValidElement, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
2
|
+
import React, { Children, cloneElement, Fragment, isValidElement, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
3
3
|
export var PRESENCE_SHIFT_MS = 180;
|
|
4
4
|
export var PRESENCE_FADE_MS = 160;
|
|
5
5
|
export var PRESENCE_TOTAL_MS = PRESENCE_SHIFT_MS + PRESENCE_FADE_MS + 40;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './style';
|
|
3
3
|
type StatusIndicator = 'generating' | 'waiting' | 'unread' | 'error';
|
|
4
4
|
type ConversationType = 'ai' | 'human';
|
|
@@ -53,13 +53,13 @@ export interface ChatItemProps {
|
|
|
53
53
|
defaultDeleteOpen?: boolean;
|
|
54
54
|
onDeleteOpenChange?: (open: boolean) => void;
|
|
55
55
|
}
|
|
56
|
-
declare function ChatItemInner({ id, title, active, type, status, pinned, time, groupId, groupOptions, highlightQuery, onClick, onRename, onPin, onMoveToGroup, onDelete, actionMenuZIndex, renaming: renamingProp, defaultRenaming, onRenamingChange, menuOpen: menuOpenProp, defaultMenuOpen, onMenuOpenChange, deleteOpen: deleteOpenProp, defaultDeleteOpen, onDeleteOpenChange, }: ChatItemProps):
|
|
56
|
+
declare function ChatItemInner({ id, title, active, type, status, pinned, time, groupId, groupOptions, highlightQuery, onClick, onRename, onPin, onMoveToGroup, onDelete, actionMenuZIndex, renaming: renamingProp, defaultRenaming, onRenamingChange, menuOpen: menuOpenProp, defaultMenuOpen, onMenuOpenChange, deleteOpen: deleteOpenProp, defaultDeleteOpen, onDeleteOpenChange, }: ChatItemProps): React.JSX.Element;
|
|
57
57
|
/**
|
|
58
58
|
* 会话列表项。
|
|
59
59
|
*
|
|
60
60
|
* memo:列表里单项 hover / 选中会触发父级重渲染,未 memo 时其余项会一并
|
|
61
61
|
* 重跑 render 与相对时间计算。父级需传入稳定的回调引用才能生效。
|
|
62
62
|
*/
|
|
63
|
-
export declare const ChatItem:
|
|
63
|
+
export declare const ChatItem: React.MemoExoticComponent<typeof ChatItemInner>;
|
|
64
64
|
export default ChatItem;
|
|
65
65
|
export { formatRelativeTime } from './relative-time';
|
package/dist/chat-item/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
-
import { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import React, { memo, useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
4
4
|
import { scheduleLayoutBatch } from "../_util/layoutBatch";
|
|
5
5
|
import { observeResize } from "../_util/sharedResizeObserver";
|
|
6
6
|
import { fitToWidth, measureFit, resolveFont } from "../_util/textFit";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import React, { type ReactNode } from 'react';
|
|
2
2
|
import { type ChatItemProps } from '../chat-item';
|
|
3
3
|
import './style';
|
|
4
4
|
/** 系统「未分组」默认 id;不在「分组」模块内渲染。 */
|
|
@@ -137,7 +137,7 @@ export declare function matchChatListFilterTime(time: ChatListItem['time'], filt
|
|
|
137
137
|
export declare function matchChatListFilterType(type: ChatListItem['type'], filter: ChatListFilterType): boolean;
|
|
138
138
|
/** 按状态筛选项判断会话是否命中。无 `status` 时仅在「全部」下保留。 */
|
|
139
139
|
export declare function matchChatListFilterStatus(status: ChatListItem['status'], filter: ChatListFilterStatus): boolean;
|
|
140
|
-
export declare function ChatList({ items, title, groups, pinnedSectionTitle, recentSectionTitle, groupsSectionTitle, ungroupedTitle, ungroupedGroupId, filterTime: filterTimeProp, defaultFilterTime, filterType: filterTypeProp, defaultFilterType, onFilterTypeChange, filterStatus: filterStatusProp, defaultFilterStatus, onFilterStatusChange, search: searchProp, defaultSearch, onSearchChange, showSearch, filterOpen: filterOpenProp, defaultFilterOpen, onFilterOpenChange, showEmptyGroups, empty, actionMenuZIndex, filterMenuZIndex, className, onItemClick, onRename, onPin, onMoveToGroup, onDelete, onAddGroup, onRenameGroup, onDeleteGroup, onCreateConversation, renderItem, renderGroupHeader, collapsedGroupIds: collapsedProp, defaultCollapsedGroupIds, onCollapsedGroupIdsChange, groupPageSize, ungroupedPageSize, renderRestScroll, }: ChatListProps):
|
|
140
|
+
export declare function ChatList({ items, title, groups, pinnedSectionTitle, recentSectionTitle, groupsSectionTitle, ungroupedTitle, ungroupedGroupId, filterTime: filterTimeProp, defaultFilterTime, filterType: filterTypeProp, defaultFilterType, onFilterTypeChange, filterStatus: filterStatusProp, defaultFilterStatus, onFilterStatusChange, search: searchProp, defaultSearch, onSearchChange, showSearch, filterOpen: filterOpenProp, defaultFilterOpen, onFilterOpenChange, showEmptyGroups, empty, actionMenuZIndex, filterMenuZIndex, className, onItemClick, onRename, onPin, onMoveToGroup, onDelete, onAddGroup, onRenameGroup, onDeleteGroup, onCreateConversation, renderItem, renderGroupHeader, collapsedGroupIds: collapsedProp, defaultCollapsedGroupIds, onCollapsedGroupIdsChange, groupPageSize, ungroupedPageSize, renderRestScroll, }: ChatListProps): React.JSX.Element;
|
|
141
141
|
export declare namespace ChatList {
|
|
142
142
|
var displayName: string;
|
|
143
143
|
}
|
package/dist/chat-list/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
4
4
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
5
|
import clsx from 'clsx';
|
|
6
|
-
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
6
|
+
import React, { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
7
7
|
import ChatGroup, { CHAT_GROUP_PREVIEW_LIMIT } from "../chat-group";
|
|
8
8
|
import { PresenceSlots } from "../chat-group/presence-list";
|
|
9
9
|
import ChatItem from "../chat-item";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './style';
|
|
3
3
|
export interface CodeBlockProps {
|
|
4
4
|
code: string;
|
|
5
5
|
language?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const CodeBlock:
|
|
7
|
+
export declare const CodeBlock: React.ForwardRefExoticComponent<CodeBlockProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
8
|
export default CodeBlock;
|
package/dist/code-block/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
2
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
-
import { forwardRef,
|
|
4
|
+
import React, { forwardRef, useCallback, useRef, useState } from 'react';
|
|
5
5
|
import HoverFill from "../hover-fill";
|
|
6
6
|
import Icon from "../icon";
|
|
7
7
|
import "./style";
|
|
@@ -45,6 +45,7 @@ export var CodeBlock = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
45
45
|
"data-odn-code-block-copy-wrap": true,
|
|
46
46
|
bgClassName: "odn-code-block-copy-bg"
|
|
47
47
|
}, /*#__PURE__*/React.createElement("button", {
|
|
48
|
+
type: "button",
|
|
48
49
|
onClick: function onClick() {
|
|
49
50
|
return copy(code);
|
|
50
51
|
},
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* - 视觉由 React Portal 注入到 host 内:ComposerInlineRef 负责
|
|
17
17
|
* - chip 状态(id ↔ host)由 useChipManager 维护
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
import React from 'react';
|
|
20
20
|
import type { ChipData } from '../_genui-types';
|
|
21
21
|
/** Composer editor 触发态对外信号——告诉父组件该弹浮层选 skill 了。 */
|
|
22
22
|
export interface ComposerEditorTriggerInfo {
|
|
@@ -137,5 +137,5 @@ export interface ComposerEditorRef {
|
|
|
137
137
|
/** 底层 contenteditable 元素 */
|
|
138
138
|
nativeElement: HTMLDivElement | null;
|
|
139
139
|
}
|
|
140
|
-
export declare const ComposerEditor:
|
|
140
|
+
export declare const ComposerEditor: React.ForwardRefExoticComponent<ComposerEditorProps & React.RefAttributes<ComposerEditorRef>>;
|
|
141
141
|
export default ComposerEditor;
|
package/dist/composer/editor.js
CHANGED
|
@@ -20,7 +20,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
20
20
|
* - chip 状态(id ↔ host)由 useChipManager 维护
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
import { forwardRef, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from 'react';
|
|
23
|
+
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useRef, useState } from 'react';
|
|
24
24
|
import { createPortal } from 'react-dom';
|
|
25
25
|
import ScrollArea from "../scroll-area";
|
|
26
26
|
import { findChipHostBeforeCaret, mergeLineIntoPreviousAtCaretStart, normalizeCollapsedCaretAtChipBoundary, resolveCaretMove, splitLineAt } from "./caret";
|
package/dist/composer/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { Attachment, ChipData, ComposerSegment, SendMeta, SkillItem } from '../_genui-types';
|
|
3
3
|
import type { IconName } from '../icon';
|
|
4
4
|
import { type SkillSlotProps } from '../skill-slot';
|
|
@@ -256,5 +256,5 @@ export interface ComposerProps {
|
|
|
256
256
|
className?: string;
|
|
257
257
|
style?: React.CSSProperties;
|
|
258
258
|
}
|
|
259
|
-
export declare const Composer:
|
|
259
|
+
export declare const Composer: React.ForwardRefExoticComponent<ComposerProps & React.RefAttributes<ComposerRef>>;
|
|
260
260
|
export default Composer;
|
package/dist/composer/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import _createForOfIteratorHelper from "@babel/runtime/helpers/esm/createForOfIt
|
|
|
5
5
|
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
6
6
|
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
7
7
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
8
|
-
import { forwardRef, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
8
|
+
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
9
9
|
import { SKILL_CATEGORY_ICON } from "../_genui-inline-ref";
|
|
10
10
|
import useControlledState from "../_util/useControlledState";
|
|
11
11
|
import Attachments from "../attachments";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { ChipData } from '../_genui-types';
|
|
3
3
|
export declare function isMentionChip(chip: ChipData): boolean;
|
|
4
4
|
/** 仅待补充 / 已填参数的 invocation 可点开面板;无参数 skill 无 hover、不可点。 */
|
|
@@ -11,5 +11,5 @@ export interface ComposerInlineRefProps {
|
|
|
11
11
|
onClick?: (anchor: HTMLElement) => void;
|
|
12
12
|
}
|
|
13
13
|
/** Composer 内联引用视觉:按 kind 派发 Invocation(/)或 Mention(@)。 */
|
|
14
|
-
export declare function ComposerInlineRef({ data, active, onClick, }: ComposerInlineRefProps):
|
|
14
|
+
export declare function ComposerInlineRef({ data, active, onClick, }: ComposerInlineRefProps): React.JSX.Element;
|
|
15
15
|
export default ComposerInlineRef;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './style';
|
|
3
3
|
export interface ErrorBlockProps {
|
|
4
4
|
message: string;
|
|
5
5
|
retryable?: boolean;
|
|
6
6
|
onRetry?: () => void;
|
|
7
7
|
}
|
|
8
|
-
export declare function ErrorBlock({ message, retryable, onRetry }: ErrorBlockProps):
|
|
8
|
+
export declare function ErrorBlock({ message, retryable, onRetry, }: ErrorBlockProps): React.JSX.Element;
|
|
9
9
|
export declare namespace ErrorBlock {
|
|
10
10
|
var displayName: string;
|
|
11
11
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import Icon from "../icon";
|
|
2
3
|
import "./style";
|
|
3
4
|
export function ErrorBlock(_ref) {
|
|
@@ -13,6 +14,7 @@ export function ErrorBlock(_ref) {
|
|
|
13
14
|
}), /*#__PURE__*/React.createElement("div", {
|
|
14
15
|
"data-odn-error-block-body": true
|
|
15
16
|
}, /*#__PURE__*/React.createElement("p", null, message), retryable && onRetry && /*#__PURE__*/React.createElement("button", {
|
|
17
|
+
type: "button",
|
|
16
18
|
onClick: onRetry,
|
|
17
19
|
"data-odn-error-block-retry": true
|
|
18
20
|
}, /*#__PURE__*/React.createElement(Icon, {
|
package/dist/image/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
/// <reference types="react" />
|
|
1
|
+
import React from 'react';
|
|
3
2
|
import './style';
|
|
4
3
|
export interface ImageProps {
|
|
5
4
|
/** 图片地址(必填) */
|
|
@@ -52,7 +51,7 @@ export interface ImageProps {
|
|
|
52
51
|
* - 消息态:`<MessageImage>` 套一层 max 280×360 contain(单图)或 88×88 cover(多图)容器
|
|
53
52
|
* - Composer 待发送态:composer 内部直接套一层 72×72 cover 容器
|
|
54
53
|
*/
|
|
55
|
-
export declare function Image({ url, alt, onPreview, onRemove, unavailable, fallback, className, style, }: ImageProps):
|
|
54
|
+
export declare function Image({ url, alt, onPreview, onRemove, unavailable, fallback, className, style, }: ImageProps): React.JSX.Element;
|
|
56
55
|
export declare namespace Image {
|
|
57
56
|
var displayName: string;
|
|
58
57
|
}
|
package/dist/image/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { InvocationData } from '../_genui-types';
|
|
3
3
|
import './style';
|
|
4
4
|
export interface InvocationProps {
|
|
@@ -16,7 +16,7 @@ export interface InvocationProps {
|
|
|
16
16
|
/** 交互态单击;业务接管打开参数面板等行为 */
|
|
17
17
|
onClick?: (anchor: HTMLElement) => void;
|
|
18
18
|
}
|
|
19
|
-
export declare function Invocation({ data, interactive, active, onClick, }: InvocationProps):
|
|
19
|
+
export declare function Invocation({ data, interactive, active, onClick, }: InvocationProps): React.JSX.Element;
|
|
20
20
|
export { InvocationParamPopover } from './param-popover';
|
|
21
21
|
export type { InvocationParamPopoverProps } from './param-popover';
|
|
22
22
|
export default Invocation;
|
package/dist/invocation/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* 手写 portal + outside-click(排除 [data-odn-popup] 子树),与 ComposerMention
|
|
5
5
|
* SkillParamPopover 定位策略一致:贴在 anchor 上方。
|
|
6
6
|
*/
|
|
7
|
-
import { type ReactNode } from 'react';
|
|
7
|
+
import React, { type ReactNode } from 'react';
|
|
8
8
|
export interface InvocationParamPopoverProps {
|
|
9
9
|
anchor: HTMLElement;
|
|
10
10
|
label: string;
|
|
@@ -16,5 +16,5 @@ export interface InvocationParamPopoverProps {
|
|
|
16
16
|
*/
|
|
17
17
|
width?: number;
|
|
18
18
|
}
|
|
19
|
-
export declare function InvocationParamPopover({ anchor, label, icon, children, onClose, width, }: InvocationParamPopoverProps):
|
|
19
|
+
export declare function InvocationParamPopover({ anchor, label, icon, children, onClose, width, }: InvocationParamPopoverProps): React.ReactPortal | null;
|
|
20
20
|
export default InvocationParamPopover;
|
|
@@ -6,7 +6,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
6
6
|
* SkillParamPopover 定位策略一致:贴在 anchor 上方。
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
9
|
+
import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
10
10
|
import { createPortal } from 'react-dom';
|
|
11
11
|
import Icon from "../icon";
|
|
12
12
|
export function InvocationParamPopover(_ref) {
|
package/dist/mention/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { MentionData } from '../_genui-types';
|
|
3
3
|
import './style';
|
|
4
4
|
export interface MentionProps {
|
|
@@ -8,5 +8,5 @@ export interface MentionProps {
|
|
|
8
8
|
active?: boolean;
|
|
9
9
|
onClick?: (anchor: HTMLElement) => void;
|
|
10
10
|
}
|
|
11
|
-
export declare function Mention({ data, interactive, active, onClick, }: MentionProps):
|
|
11
|
+
export declare function Mention({ data, interactive, active, onClick, }: MentionProps): React.JSX.Element;
|
|
12
12
|
export default Mention;
|
package/dist/mention/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* 大图查看器的最小数据形态。刻意不复用 `MessageImageItem`——查看器只认
|
|
4
4
|
* url / alt,与「消息态」无关,保持解耦(MessageImageItem 结构上可直接传入)。
|
|
@@ -20,5 +20,5 @@ interface ImageViewerProps {
|
|
|
20
20
|
* 用 portal 挂到 body,规避祖先 `transform` / `overflow` 对 `position: fixed`
|
|
21
21
|
* 的截断(聊天流容器常带这些)。mounted guard 兜 SSR。
|
|
22
22
|
*/
|
|
23
|
-
export declare function ImageViewer({ images, initialIndex, onClose }: ImageViewerProps):
|
|
23
|
+
export declare function ImageViewer({ images, initialIndex, onClose, }: ImageViewerProps): React.ReactPortal | null;
|
|
24
24
|
export default ImageViewer;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
-
import { useCallback, useEffect, useState } from 'react';
|
|
4
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
5
5
|
import { createPortal } from 'react-dom';
|
|
6
6
|
import Icon from "../icon";
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './style';
|
|
3
3
|
/**
|
|
4
4
|
* MessageImage 渲染的图片项。
|
|
@@ -55,7 +55,7 @@ export interface MessageImageProps {
|
|
|
55
55
|
* Composer 待发送态等其他场景**不应消费此组件**——那是输入态语义,
|
|
56
56
|
* 应直接用 `Image` leaf + 自己的尺寸 wrap。
|
|
57
57
|
*/
|
|
58
|
-
export declare function MessageImage({ images, preview, onImageClick, onRemove, }: MessageImageProps):
|
|
58
|
+
export declare function MessageImage({ images, preview, onImageClick, onRemove, }: MessageImageProps): React.JSX.Element | null;
|
|
59
59
|
export declare namespace MessageImage {
|
|
60
60
|
var displayName: string;
|
|
61
61
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
-
import { useCallback, useMemo, useState } from 'react';
|
|
5
|
-
import Image from "../image";
|
|
4
|
+
import React, { useCallback, useMemo, useState } from 'react';
|
|
6
5
|
import Icon from "../icon";
|
|
6
|
+
import Image from "../image";
|
|
7
7
|
import ImageViewer from "./image-viewer";
|
|
8
8
|
import "./style";
|
|
9
9
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type RefObject } from 'react';
|
|
1
|
+
import React, { type RefObject } from 'react';
|
|
2
2
|
/** 与对话区一致:滚动后显示自定义滑块,无滚动一段时间后隐藏 */
|
|
3
3
|
export declare const ODN_OVERLAY_SCROLLBAR_HIDE_MS = 1000;
|
|
4
4
|
export declare function useOverlayScrollbarReveal(hideMs?: number): {
|
|
@@ -16,4 +16,4 @@ export interface OdnOverlayVerticalScrollbarProps {
|
|
|
16
16
|
/**
|
|
17
17
|
* 隐藏原生纵向滚动条占位,在容器右侧绝对定位自定义滑块(6px 宽,与对话区一致)。
|
|
18
18
|
*/
|
|
19
|
-
export declare function OdnOverlayVerticalScrollbar({ containerRef, reveal, resizeKey, active, }: OdnOverlayVerticalScrollbarProps):
|
|
19
|
+
export declare function OdnOverlayVerticalScrollbar({ containerRef, reveal, resizeKey, active, }: OdnOverlayVerticalScrollbarProps): React.JSX.Element | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
3
3
|
|
|
4
4
|
/** 与对话区一致:滚动后显示自定义滑块,无滚动一段时间后隐藏 */
|
|
5
5
|
export var ODN_OVERLAY_SCROLLBAR_HIDE_MS = 1000;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { ParsedCsv } from './parseCsv';
|
|
3
3
|
interface CsvPreviewTableProps {
|
|
4
4
|
data: ParsedCsv;
|
|
5
5
|
}
|
|
6
6
|
/** 预览用只读表格;列数按首行对齐,短行补空、长行多出的列仍展示。 */
|
|
7
|
-
export declare function CsvPreviewTable({ data }: CsvPreviewTableProps):
|
|
7
|
+
export declare function CsvPreviewTable({ data }: CsvPreviewTableProps): React.JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { PreviewTab } from '../_genui-types';
|
|
3
3
|
import { type ArtifactFileIconType } from '../artifact';
|
|
4
4
|
import './style';
|
|
@@ -89,7 +89,7 @@ export interface PreviewPanelProps {
|
|
|
89
89
|
*/
|
|
90
90
|
allowedNavigateDomains?: string[];
|
|
91
91
|
}
|
|
92
|
-
export declare function PreviewPanel({ tabs, activeTabId, onTabChange, onTabClose, onCloseAll, artifacts, onArtifactOpen, onDownload, onOpenInBrowser, onShare, fullscreen, onFullscreenChange, open, emptyTitle, emptyDescription, widthMode, actionTooltips, allowedNavigateDomains, }: PreviewPanelProps):
|
|
92
|
+
export declare function PreviewPanel({ tabs, activeTabId, onTabChange, onTabClose, onCloseAll, artifacts, onArtifactOpen, onDownload, onOpenInBrowser, onShare, fullscreen, onFullscreenChange, open, emptyTitle, emptyDescription, widthMode, actionTooltips, allowedNavigateDomains, }: PreviewPanelProps): React.JSX.Element;
|
|
93
93
|
export declare namespace PreviewPanel {
|
|
94
94
|
var displayName: string;
|
|
95
95
|
}
|
|
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
4
|
var _excluded = ["tooltip"];
|
|
5
|
-
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
5
|
+
import React, { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
6
6
|
import Artifact, { ARTIFACT_DEDICATED_FILE_ICON_TYPES, ArtifactFileIcon, getArtifactAction } from "../artifact";
|
|
7
7
|
import Button from "../button";
|
|
8
8
|
import Icon from "../icon";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './style';
|
|
3
3
|
declare const labels: {
|
|
4
4
|
readonly ai: "Gen";
|
|
@@ -9,7 +9,7 @@ export type ProvenanceType = keyof typeof labels;
|
|
|
9
9
|
export interface ProvenanceProps {
|
|
10
10
|
type: ProvenanceType;
|
|
11
11
|
}
|
|
12
|
-
export declare function Provenance({ type }: ProvenanceProps):
|
|
12
|
+
export declare function Provenance({ type }: ProvenanceProps): React.JSX.Element;
|
|
13
13
|
export declare namespace Provenance {
|
|
14
14
|
var displayName: string;
|
|
15
15
|
}
|
package/dist/provenance/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { SkillItem } from '../_genui-types';
|
|
3
3
|
import './style';
|
|
4
4
|
export interface SkillSlotProps {
|
|
@@ -66,5 +66,5 @@ export interface SkillSlotHandle {
|
|
|
66
66
|
/** 当前高亮 index(无则 -1)。 */
|
|
67
67
|
getActiveIndex: () => number;
|
|
68
68
|
}
|
|
69
|
-
export declare const SkillSlot:
|
|
69
|
+
export declare const SkillSlot: React.ForwardRefExoticComponent<SkillSlotProps & React.RefAttributes<SkillSlotHandle>>;
|
|
70
70
|
export default SkillSlot;
|
package/dist/skill-slot/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
3
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
-
import { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
4
|
+
import React, { forwardRef, useEffect, useImperativeHandle, useLayoutEffect, useMemo, useRef, useState } from 'react';
|
|
5
5
|
import HoverFill from "../hover-fill";
|
|
6
6
|
import Icon from "../icon";
|
|
7
7
|
import Input from "../input";
|
package/dist/sources/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { Source } from '../_genui-types';
|
|
3
3
|
import './style';
|
|
4
4
|
export interface SourcesProps {
|
|
@@ -6,7 +6,7 @@ export interface SourcesProps {
|
|
|
6
6
|
defaultOpen?: boolean;
|
|
7
7
|
onUrlClick?: (url: string, title?: string) => void;
|
|
8
8
|
}
|
|
9
|
-
export declare function Sources({ sources, defaultOpen, onUrlClick }: SourcesProps):
|
|
9
|
+
export declare function Sources({ sources, defaultOpen, onUrlClick, }: SourcesProps): React.JSX.Element | null;
|
|
10
10
|
export declare namespace Sources {
|
|
11
11
|
var displayName: string;
|
|
12
12
|
}
|
package/dist/sources/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React, { type HTMLAttributes } from 'react';
|
|
2
2
|
import './style';
|
|
3
3
|
export interface StreamPulseProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
4
|
size?: number;
|
|
@@ -9,7 +9,7 @@ export interface StreamPulseProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
9
9
|
* StreamPulse —— 流式生成中的风车旋转锚点。
|
|
10
10
|
* 几何来自 lucide loader 8 射线;CSS 线性旋转,零 JS 驱动。
|
|
11
11
|
*/
|
|
12
|
-
export declare function StreamPulse({ size, anchor, 'aria-label': ariaLabel, ...props }: StreamPulseProps):
|
|
12
|
+
export declare function StreamPulse({ size, anchor, 'aria-label': ariaLabel, ...props }: StreamPulseProps): React.JSX.Element;
|
|
13
13
|
export declare namespace StreamPulse {
|
|
14
14
|
var displayName: string;
|
|
15
15
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
var _excluded = ["size", "anchor", "aria-label"];
|
|
4
|
+
import React from 'react';
|
|
4
5
|
import "./style";
|
|
5
6
|
var PULSE_PATHS = ['M12 2v4', 'm16.2 7.8 2.9-2.9', 'M18 12h4', 'm16.2 16.2 2.9 2.9', 'M12 18v4', 'm4.9 19.1 2.9-2.9', 'M2 12h4', 'm4.9 4.9 2.9 2.9'];
|
|
6
7
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './style';
|
|
3
3
|
export interface SuggestionsProps {
|
|
4
4
|
suggestions: string[];
|
|
5
5
|
onSelect: (text: string) => void;
|
|
6
6
|
}
|
|
7
|
-
export declare function Suggestions({ suggestions, onSelect }: SuggestionsProps):
|
|
7
|
+
export declare function Suggestions({ suggestions, onSelect }: SuggestionsProps): React.JSX.Element | null;
|
|
8
8
|
export declare namespace Suggestions {
|
|
9
9
|
var displayName: string;
|
|
10
10
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import "./style";
|
|
2
3
|
export function Suggestions(_ref) {
|
|
3
4
|
var suggestions = _ref.suggestions,
|
|
@@ -7,6 +8,7 @@ export function Suggestions(_ref) {
|
|
|
7
8
|
"data-odn-suggestions": true
|
|
8
9
|
}, suggestions.map(function (text) {
|
|
9
10
|
return /*#__PURE__*/React.createElement("button", {
|
|
11
|
+
type: "button",
|
|
10
12
|
key: text,
|
|
11
13
|
onClick: function onClick() {
|
|
12
14
|
return onSelect(text);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './style';
|
|
3
3
|
export interface TextSwapProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onDrag' | 'onDragStart' | 'onDragEnd' | 'onDragCapture' | 'onDragStartCapture' | 'onDragEndCapture' | 'onAnimationStart' | 'onAnimationStartCapture'> {
|
|
4
4
|
/**
|
package/dist/text-swap/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
|
|
|
7
7
|
var _excluded = ["delay", "duration", "originalText", "swappedText", "flipped", "reversed", "blur", "y"],
|
|
8
8
|
_excluded2 = ["children", "style", "direction"];
|
|
9
9
|
import { AnimatePresence, motion } from 'motion/react';
|
|
10
|
-
import { useEffect, useRef, useState } from 'react';
|
|
10
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
11
11
|
import "./style";
|
|
12
12
|
export var Flip = function Flip(_ref) {
|
|
13
13
|
var _ref$delay = _ref.delay,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import type { Attachment, ChatMessage } from '../_genui-types';
|
|
3
3
|
import { type MessageImageItem } from '../message-image';
|
|
4
4
|
import './style';
|
|
@@ -16,7 +16,7 @@ export interface UserBubbleProps {
|
|
|
16
16
|
/** 搜索跳转:在用户气泡正文中精准高亮关键词 */
|
|
17
17
|
highlightQuery?: string;
|
|
18
18
|
}
|
|
19
|
-
export declare function UserBubble({ message, onFileClick, onImageClick, highlightQuery, }: UserBubbleProps):
|
|
19
|
+
export declare function UserBubble({ message, onFileClick, onImageClick, highlightQuery, }: UserBubbleProps): React.JSX.Element;
|
|
20
20
|
export declare namespace UserBubble {
|
|
21
21
|
var displayName: string;
|
|
22
22
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { Attachments } from "../attachments";
|
|
2
3
|
import MessageImage from "../message-image";
|
|
3
4
|
import { highlightQueryText } from "../stream-text/highlight-query-text";
|
|
@@ -42,7 +43,7 @@ export function UserBubble(_ref) {
|
|
|
42
43
|
onImageClick: onImageClick ? function (i) {
|
|
43
44
|
return onImageClick(i, images);
|
|
44
45
|
} : undefined
|
|
45
|
-
})), hasText && textBody
|
|
46
|
+
})), hasText && textBody !== undefined && textBody !== null && /*#__PURE__*/React.createElement("div", {
|
|
46
47
|
"data-odn-user-bubble-text": true
|
|
47
48
|
}, /*#__PURE__*/React.createElement("p", {
|
|
48
49
|
"data-odn-user-bubble-body": true
|
package/dist/welcome/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import './style';
|
|
3
3
|
export interface WelcomeProps {
|
|
4
4
|
title?: string;
|
|
@@ -11,7 +11,7 @@ export interface WelcomeProps {
|
|
|
11
11
|
*/
|
|
12
12
|
icon?: React.ReactNode;
|
|
13
13
|
}
|
|
14
|
-
export declare function Welcome({ title, description, suggestions, onSelect, icon, }: WelcomeProps):
|
|
14
|
+
export declare function Welcome({ title, description, suggestions, onSelect, icon, }: WelcomeProps): React.JSX.Element;
|
|
15
15
|
export declare namespace Welcome {
|
|
16
16
|
var displayName: string;
|
|
17
17
|
}
|
package/dist/welcome/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { Suggestions } from "../suggestions";
|
|
2
3
|
import "./style";
|
|
3
4
|
export function Welcome(_ref) {
|
|
@@ -11,7 +12,7 @@ export function Welcome(_ref) {
|
|
|
11
12
|
icon = _ref.icon;
|
|
12
13
|
return /*#__PURE__*/React.createElement("div", {
|
|
13
14
|
"data-odn-welcome": true
|
|
14
|
-
}, icon
|
|
15
|
+
}, icon !== undefined && icon !== null && icon !== false && /*#__PURE__*/React.createElement("div", {
|
|
15
16
|
"data-odn-welcome-icon": true
|
|
16
17
|
}, icon), /*#__PURE__*/React.createElement("h2", null, title), /*#__PURE__*/React.createElement("p", null, description), suggestions.length > 0 && onSelect && /*#__PURE__*/React.createElement("div", {
|
|
17
18
|
"data-odn-welcome-suggestions": true
|