@superinterface/react 2.13.0 → 2.13.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/dist/index.cjs +45 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +57 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3472,20 +3472,35 @@ var Visualization = function() {
|
|
|
3472
3472
|
]
|
|
3473
3473
|
});
|
|
3474
3474
|
};
|
|
3475
|
-
// src/components/threads/AudioThread/Status/
|
|
3475
|
+
// src/components/threads/AudioThread/Status/StatusMessages.tsx
|
|
3476
3476
|
var import_themes44 = require("@radix-ui/themes");
|
|
3477
3477
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3478
|
-
var
|
|
3479
|
-
var
|
|
3480
|
-
return
|
|
3478
|
+
var html = function(param) {
|
|
3479
|
+
var texts = param.texts;
|
|
3480
|
+
return "\n .status-messages-texts:after {\n content: '".concat(texts[0], "';\n animation: texts ").concat(texts.length * 3, "s linear infinite;\n }\n\n @keyframes texts {\n ").concat(texts.map(function(_9, i) {
|
|
3481
|
+
return "\n ".concat(i * 100 / texts.length, '% {\n content: "').concat(texts[i], '";\n }\n ');
|
|
3482
|
+
}).join(""), "\n }");
|
|
3483
|
+
};
|
|
3484
|
+
var StatusMessages = function(param) {
|
|
3485
|
+
var texts = param.texts;
|
|
3486
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_themes44.Flex, {
|
|
3481
3487
|
justify: "center",
|
|
3482
|
-
pb: "
|
|
3483
|
-
children:
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3488
|
+
pb: "5",
|
|
3489
|
+
children: [
|
|
3490
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_themes44.Text, {
|
|
3491
|
+
size: "2",
|
|
3492
|
+
weight: "regular",
|
|
3493
|
+
color: "gray",
|
|
3494
|
+
className: "status-messages-texts"
|
|
3495
|
+
}),
|
|
3496
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("style", {
|
|
3497
|
+
dangerouslySetInnerHTML: {
|
|
3498
|
+
__html: html({
|
|
3499
|
+
texts: texts
|
|
3500
|
+
})
|
|
3501
|
+
}
|
|
3502
|
+
})
|
|
3503
|
+
]
|
|
3489
3504
|
});
|
|
3490
3505
|
};
|
|
3491
3506
|
// src/components/threads/AudioThread/Status/index.tsx
|
|
@@ -3493,8 +3508,13 @@ var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
|
3493
3508
|
var Status = function() {
|
|
3494
3509
|
var audioThreadContext = useAudioThreadContext();
|
|
3495
3510
|
if (audioThreadContext.status === "recording") {
|
|
3496
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3497
|
-
|
|
3511
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(StatusMessages, {
|
|
3512
|
+
texts: [
|
|
3513
|
+
"Start speaking",
|
|
3514
|
+
"Listening",
|
|
3515
|
+
"Finish speaking to send",
|
|
3516
|
+
"Click the button below to send manually"
|
|
3517
|
+
]
|
|
3498
3518
|
});
|
|
3499
3519
|
}
|
|
3500
3520
|
if ([
|
|
@@ -3502,17 +3522,23 @@ var Status = function() {
|
|
|
3502
3522
|
"idle",
|
|
3503
3523
|
"playerPaused"
|
|
3504
3524
|
].includes(audioThreadContext.status)) {
|
|
3505
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3506
|
-
|
|
3525
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(StatusMessages, {
|
|
3526
|
+
texts: [
|
|
3527
|
+
"Click the button below to activate"
|
|
3528
|
+
]
|
|
3507
3529
|
});
|
|
3508
3530
|
}
|
|
3509
3531
|
if (audioThreadContext.status === "playing") {
|
|
3510
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3511
|
-
|
|
3532
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(StatusMessages, {
|
|
3533
|
+
texts: [
|
|
3534
|
+
"Click the button below to interrupt"
|
|
3535
|
+
]
|
|
3512
3536
|
});
|
|
3513
3537
|
}
|
|
3514
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
3515
|
-
|
|
3538
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(StatusMessages, {
|
|
3539
|
+
texts: [
|
|
3540
|
+
"Thinking"
|
|
3541
|
+
]
|
|
3516
3542
|
});
|
|
3517
3543
|
};
|
|
3518
3544
|
// src/components/threads/AudioThread/Form/index.tsx
|