@autobe/ui 0.30.0-dev.20260315 → 0.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.
- package/LICENSE +661 -661
- package/lib/components/AutoBeChatMain.js +5 -5
- package/lib/components/AutoBeConfigModal.js +9 -9
- package/package.json +2 -2
- package/src/components/AutoBeAssistantMessageMovie.tsx +22 -22
- package/src/components/AutoBeChatMain.tsx +376 -376
- package/src/components/AutoBeChatSidebar.tsx +414 -414
- package/src/components/AutoBeConfigButton.tsx +83 -83
- package/src/components/AutoBeConfigModal.tsx +443 -443
- package/src/components/AutoBeStatusButton.tsx +75 -75
- package/src/components/AutoBeStatusModal.tsx +486 -486
- package/src/components/AutoBeUserMessageMovie.tsx +27 -27
- package/src/components/common/ActionButton.tsx +205 -205
- package/src/components/common/ActionButtonGroup.tsx +80 -80
- package/src/components/common/AutoBeConfigInput.tsx +185 -185
- package/src/components/common/ChatBubble.tsx +119 -119
- package/src/components/common/Collapsible.tsx +95 -95
- package/src/components/common/CompactSessionIndicator.tsx +73 -73
- package/src/components/common/CompactSessionList.tsx +82 -82
- package/src/components/common/index.ts +8 -8
- package/src/components/common/openai/OpenAIContent.tsx +53 -53
- package/src/components/common/openai/OpenAIUserAudioContent.tsx +70 -70
- package/src/components/common/openai/OpenAIUserFileContent.tsx +76 -76
- package/src/components/common/openai/OpenAIUserImageContent.tsx +34 -34
- package/src/components/common/openai/OpenAIUserTextContent.tsx +15 -15
- package/src/components/common/openai/index.ts +5 -5
- package/src/components/events/AutoBeCompleteEventMovie.tsx +402 -402
- package/src/components/events/AutoBeCorrectEventMovie.tsx +354 -354
- package/src/components/events/AutoBeEventGroupMovie.tsx +18 -18
- package/src/components/events/AutoBeEventMovie.tsx +158 -158
- package/src/components/events/AutoBeProgressEventMovie.tsx +217 -217
- package/src/components/events/AutoBeScenarioEventMovie.tsx +135 -135
- package/src/components/events/AutoBeStartEventMovie.tsx +82 -82
- package/src/components/events/AutoBeValidateEventMovie.tsx +249 -249
- package/src/components/events/README.md +300 -300
- package/src/components/events/common/CollapsibleEventGroup.tsx +211 -211
- package/src/components/events/common/EventCard.tsx +61 -61
- package/src/components/events/common/EventContent.tsx +31 -31
- package/src/components/events/common/EventHeader.tsx +85 -85
- package/src/components/events/common/EventIcon.tsx +82 -82
- package/src/components/events/common/ProgressBar.tsx +64 -64
- package/src/components/events/common/index.ts +13 -13
- package/src/components/events/groups/CorrectEventGroup.tsx +183 -183
- package/src/components/events/groups/ValidateEventGroup.tsx +143 -143
- package/src/components/events/groups/index.ts +8 -8
- package/src/components/events/index.ts +16 -16
- package/src/components/events/utils/eventGrouper.tsx +116 -116
- package/src/components/events/utils/index.ts +1 -1
- package/src/components/index.ts +13 -13
- package/src/components/upload/AutoBeChatUploadBox.tsx +425 -425
- package/src/components/upload/AutoBeChatUploadSendButton.tsx +66 -66
- package/src/components/upload/AutoBeFileUploadBox.tsx +123 -123
- package/src/components/upload/AutoBeUploadConfig.ts +5 -5
- package/src/components/upload/AutoBeVoiceRecoderButton.tsx +100 -100
- package/src/components/upload/index.ts +5 -5
- package/src/constant/color.ts +28 -28
- package/src/context/AutoBeAgentContext.tsx +245 -245
- package/src/context/AutoBeAgentSessionList.tsx +58 -58
- package/src/context/SearchParamsContext.tsx +49 -49
- package/src/hooks/index.ts +3 -3
- package/src/hooks/useEscapeKey.ts +24 -24
- package/src/hooks/useIsomorphicLayoutEffect.ts +8 -8
- package/src/hooks/useMediaQuery.ts +73 -73
- package/src/hooks/useSessionStorage.ts +10 -10
- package/src/icons/Receipt.tsx +74 -74
- package/src/index.ts +9 -9
- package/src/strategy/AutoBeAgentSessionStorageStrategy.ts +127 -127
- package/src/structure/AutoBeListener.ts +373 -373
- package/src/structure/AutoBeListenerState.ts +53 -53
- package/src/structure/IAutoBeAgentSessionStorageStrategy.ts +87 -87
- package/src/structure/IAutoBeEventGroup.ts +6 -6
- package/src/structure/index.ts +4 -4
- package/src/types/config.ts +44 -44
- package/src/types/index.ts +1 -1
- package/src/utils/AutoBeFileUploader.ts +279 -279
- package/src/utils/AutoBeVoiceRecorder.ts +95 -95
- package/src/utils/__tests__/crypto.test.ts +286 -286
- package/src/utils/__tests__/storage.test.ts +229 -229
- package/src/utils/crypto.ts +95 -95
- package/src/utils/index.ts +6 -6
- package/src/utils/number.ts +17 -17
- package/src/utils/storage.ts +96 -96
- package/src/utils/time.ts +14 -14
- package/tsconfig.json +9 -9
- package/vitest.config.ts +15 -15
- package/README.md +0 -261
|
@@ -188,11 +188,11 @@ const AutoBeChatMain = (props) => {
|
|
|
188
188
|
backgroundColor: "#28a745",
|
|
189
189
|
borderRadius: "50%",
|
|
190
190
|
animation: "pulse 1.5s infinite",
|
|
191
|
-
} }), "Connected"] })), (0, jsx_runtime_1.jsx)("style", { children: `
|
|
192
|
-
@keyframes pulse {
|
|
193
|
-
0%, 100% { opacity: 1; }
|
|
194
|
-
50% { opacity: 0.5; }
|
|
195
|
-
}
|
|
191
|
+
} }), "Connected"] })), (0, jsx_runtime_1.jsx)("style", { children: `
|
|
192
|
+
@keyframes pulse {
|
|
193
|
+
0%, 100% { opacity: 1; }
|
|
194
|
+
50% { opacity: 0.5; }
|
|
195
|
+
}
|
|
196
196
|
` }), props.isUnusedConfig === false &&
|
|
197
197
|
((_a = props.configFields) === null || _a === void 0 ? void 0 : _a.length) != null &&
|
|
198
198
|
props.configFields.length > 0 && ((0, jsx_runtime_1.jsx)(AutoBeConfigButton_1.default, { fields: props.configFields || [] })), (0, jsx_runtime_1.jsx)(AutoBeStatusButton_1.default, {})] }), (0, jsx_runtime_1.jsx)("div", { style: {
|
|
@@ -118,11 +118,11 @@ const AutoBeConfigModal = (props) => {
|
|
|
118
118
|
fontSize: "1rem",
|
|
119
119
|
color: "#6b7280",
|
|
120
120
|
transition: "all 0.2s",
|
|
121
|
-
}, className: "modal-close-button", children: "\u2716\uFE0F" }), (0, jsx_runtime_1.jsx)("style", { children: `
|
|
122
|
-
.modal-close-button:hover {
|
|
123
|
-
background-color: #f3f4f6 !important;
|
|
124
|
-
color: #374151 !important;
|
|
125
|
-
}
|
|
121
|
+
}, className: "modal-close-button", children: "\u2716\uFE0F" }), (0, jsx_runtime_1.jsx)("style", { children: `
|
|
122
|
+
.modal-close-button:hover {
|
|
123
|
+
background-color: #f3f4f6 !important;
|
|
124
|
+
color: #374151 !important;
|
|
125
|
+
}
|
|
126
126
|
` })] }), (0, jsx_runtime_1.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "1rem" }, children: props.fields.map((field) => {
|
|
127
127
|
var _a;
|
|
128
128
|
return ((0, jsx_runtime_1.jsx)("div", { children: field.type === "checkbox" ? ((0, jsx_runtime_1.jsxs)("div", { style: { marginBottom: "0.25rem" }, children: [(0, jsx_runtime_1.jsx)("label", { style: {
|
|
@@ -183,12 +183,12 @@ const ConfigButton = ({ variant, onClick, children, disabled, }) => {
|
|
|
183
183
|
border: "1px solid #d1d5db",
|
|
184
184
|
},
|
|
185
185
|
};
|
|
186
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("style", { children: `
|
|
187
|
-
.config-button-${variant}:hover:not(:disabled) {
|
|
186
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("style", { children: `
|
|
187
|
+
.config-button-${variant}:hover:not(:disabled) {
|
|
188
188
|
${variant === "primary"
|
|
189
189
|
? "background-color: #2563eb !important; border-color: #2563eb !important;"
|
|
190
|
-
: "background-color: #f3f4f6 !important; border-color: #9ca3af !important;"}
|
|
191
|
-
}
|
|
190
|
+
: "background-color: #f3f4f6 !important; border-color: #9ca3af !important;"}
|
|
191
|
+
}
|
|
192
192
|
` }), (0, jsx_runtime_1.jsx)("button", { className: `config-button-${variant}`, style: Object.assign(Object.assign({}, baseStyles), variantStyles[variant]), onClick: onClick, disabled: disabled, children: children })] }));
|
|
193
193
|
};
|
|
194
194
|
/** All available AutoBE configuration fields */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autobe/ui",
|
|
3
3
|
"type": "commonjs",
|
|
4
|
-
"version": "0.30.
|
|
4
|
+
"version": "0.30.1",
|
|
5
5
|
"description": "AutoBE UI",
|
|
6
6
|
"author": "Wrtn Technologies",
|
|
7
7
|
"homepage": "https://autobe.dev",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"react-dom": "^19.1.1",
|
|
28
28
|
"typescript": "~5.9.3",
|
|
29
29
|
"vitest": "^2.0.0",
|
|
30
|
-
"@autobe/interface": "0.30.
|
|
30
|
+
"@autobe/interface": "0.30.1"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@stackblitz/sdk": "^1.11.0",
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import ChatBubble from "./common/ChatBubble";
|
|
2
|
-
|
|
3
|
-
interface IAssistantMessageProps {
|
|
4
|
-
text: string;
|
|
5
|
-
isoTimestamp?: string; // ISO format: "2025-08-13T04:45:20.341Z"
|
|
6
|
-
assistantName?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export const AutoBeAssistantMessageMovie = (props: IAssistantMessageProps) => {
|
|
10
|
-
const { text, isoTimestamp, assistantName = "AutoBe" } = props;
|
|
11
|
-
|
|
12
|
-
return (
|
|
13
|
-
<ChatBubble
|
|
14
|
-
content={[text]}
|
|
15
|
-
direction="left"
|
|
16
|
-
timestamp={isoTimestamp}
|
|
17
|
-
assistantName={assistantName}
|
|
18
|
-
/>
|
|
19
|
-
);
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
export default AutoBeAssistantMessageMovie;
|
|
1
|
+
import ChatBubble from "./common/ChatBubble";
|
|
2
|
+
|
|
3
|
+
interface IAssistantMessageProps {
|
|
4
|
+
text: string;
|
|
5
|
+
isoTimestamp?: string; // ISO format: "2025-08-13T04:45:20.341Z"
|
|
6
|
+
assistantName?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export const AutoBeAssistantMessageMovie = (props: IAssistantMessageProps) => {
|
|
10
|
+
const { text, isoTimestamp, assistantName = "AutoBe" } = props;
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<ChatBubble
|
|
14
|
+
content={[text]}
|
|
15
|
+
direction="left"
|
|
16
|
+
timestamp={isoTimestamp}
|
|
17
|
+
assistantName={assistantName}
|
|
18
|
+
/>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export default AutoBeAssistantMessageMovie;
|