@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.js CHANGED
@@ -3345,20 +3345,35 @@ var Visualization = function() {
3345
3345
  ]
3346
3346
  });
3347
3347
  };
3348
- // src/components/threads/AudioThread/Status/StatusMessage.tsx
3348
+ // src/components/threads/AudioThread/Status/StatusMessages.tsx
3349
3349
  import { Flex as Flex23, Text as Text7 } from "@radix-ui/themes";
3350
- import { jsx as jsx58 } from "react/jsx-runtime";
3351
- var StatusMessage = function(param) {
3352
- var children = param.children;
3353
- return /* @__PURE__ */ jsx58(Flex23, {
3350
+ import { jsx as jsx58, jsxs as jsxs19 } from "react/jsx-runtime";
3351
+ var html = function(param) {
3352
+ var texts = param.texts;
3353
+ 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) {
3354
+ return "\n ".concat(i * 100 / texts.length, '% {\n content: "').concat(texts[i], '";\n }\n ');
3355
+ }).join(""), "\n }");
3356
+ };
3357
+ var StatusMessages = function(param) {
3358
+ var texts = param.texts;
3359
+ return /* @__PURE__ */ jsxs19(Flex23, {
3354
3360
  justify: "center",
3355
- pb: "9",
3356
- children: /* @__PURE__ */ jsx58(Text7, {
3357
- size: "2",
3358
- weight: "regular",
3359
- color: "gray",
3360
- children: children
3361
- })
3361
+ pb: "5",
3362
+ children: [
3363
+ /* @__PURE__ */ jsx58(Text7, {
3364
+ size: "2",
3365
+ weight: "regular",
3366
+ color: "gray",
3367
+ className: "status-messages-texts"
3368
+ }),
3369
+ /* @__PURE__ */ jsx58("style", {
3370
+ dangerouslySetInnerHTML: {
3371
+ __html: html({
3372
+ texts: texts
3373
+ })
3374
+ }
3375
+ })
3376
+ ]
3362
3377
  });
3363
3378
  };
3364
3379
  // src/components/threads/AudioThread/Status/index.tsx
@@ -3366,8 +3381,13 @@ import { jsx as jsx59 } from "react/jsx-runtime";
3366
3381
  var Status = function() {
3367
3382
  var audioThreadContext = useAudioThreadContext();
3368
3383
  if (audioThreadContext.status === "recording") {
3369
- return /* @__PURE__ */ jsx59(StatusMessage, {
3370
- children: "Listening"
3384
+ return /* @__PURE__ */ jsx59(StatusMessages, {
3385
+ texts: [
3386
+ "Start speaking",
3387
+ "Listening",
3388
+ "Finish speaking to send",
3389
+ "Click the button below to send manually"
3390
+ ]
3371
3391
  });
3372
3392
  }
3373
3393
  if ([
@@ -3375,17 +3395,23 @@ var Status = function() {
3375
3395
  "idle",
3376
3396
  "playerPaused"
3377
3397
  ].includes(audioThreadContext.status)) {
3378
- return /* @__PURE__ */ jsx59(StatusMessage, {
3379
- children: "Click to activate"
3398
+ return /* @__PURE__ */ jsx59(StatusMessages, {
3399
+ texts: [
3400
+ "Click the button below to activate"
3401
+ ]
3380
3402
  });
3381
3403
  }
3382
3404
  if (audioThreadContext.status === "playing") {
3383
- return /* @__PURE__ */ jsx59(StatusMessage, {
3384
- children: "Click to interrupt"
3405
+ return /* @__PURE__ */ jsx59(StatusMessages, {
3406
+ texts: [
3407
+ "Click the button below to interrupt"
3408
+ ]
3385
3409
  });
3386
3410
  }
3387
- return /* @__PURE__ */ jsx59(StatusMessage, {
3388
- children: "Thinking"
3411
+ return /* @__PURE__ */ jsx59(StatusMessages, {
3412
+ texts: [
3413
+ "Thinking"
3414
+ ]
3389
3415
  });
3390
3416
  };
3391
3417
  // src/components/threads/AudioThread/Form/index.tsx
@@ -3411,12 +3437,12 @@ var MicIcon = function(props) {
3411
3437
  // src/components/threads/AudioThread/Form/ActionButton/index.tsx
3412
3438
  import { Flex as Flex24, IconButton as IconButton4 } from "@radix-ui/themes";
3413
3439
  import { StopIcon as StopIcon2, PauseIcon, ArrowUpIcon as ArrowUpIcon2, ResumeIcon } from "@radix-ui/react-icons";
3414
- import { jsx as jsx61, jsxs as jsxs19 } from "react/jsx-runtime";
3440
+ import { jsx as jsx61, jsxs as jsxs20 } from "react/jsx-runtime";
3415
3441
  var ActionButton = function() {
3416
3442
  var audioThreadContext = useAudioThreadContext();
3417
3443
  var superinterfaceContext = useSuperinterfaceContext();
3418
3444
  if (audioThreadContext.status === "recording") {
3419
- return /* @__PURE__ */ jsxs19(Flex24, {
3445
+ return /* @__PURE__ */ jsxs20(Flex24, {
3420
3446
  align: "center",
3421
3447
  children: [
3422
3448
  /* @__PURE__ */ jsx61(Flex24, {
@@ -3487,14 +3513,14 @@ var ActionButton = function() {
3487
3513
  });
3488
3514
  };
3489
3515
  // src/components/threads/AudioThread/Form/index.tsx
3490
- import { jsx as jsx62, jsxs as jsxs20 } from "react/jsx-runtime";
3516
+ import { jsx as jsx62, jsxs as jsxs21 } from "react/jsx-runtime";
3491
3517
  var Form = function() {
3492
3518
  var audioThreadContext = useAudioThreadContext();
3493
- return /* @__PURE__ */ jsxs20(Flex25, {
3519
+ return /* @__PURE__ */ jsxs21(Flex25, {
3494
3520
  direction: "column",
3495
3521
  align: "center",
3496
3522
  children: [
3497
- /* @__PURE__ */ jsxs20(Flex25, {
3523
+ /* @__PURE__ */ jsxs21(Flex25, {
3498
3524
  pb: "3",
3499
3525
  align: "center",
3500
3526
  children: [
@@ -3529,9 +3555,9 @@ var Form = function() {
3529
3555
  });
3530
3556
  };
3531
3557
  // src/components/threads/AudioThread/index.tsx
3532
- import { jsx as jsx63, jsxs as jsxs21 } from "react/jsx-runtime";
3558
+ import { jsx as jsx63, jsxs as jsxs22 } from "react/jsx-runtime";
3533
3559
  var AudioThread = function(props) {
3534
- return /* @__PURE__ */ jsxs21(Root8, _object_spread_props(_object_spread({}, props), {
3560
+ return /* @__PURE__ */ jsxs22(Root8, _object_spread_props(_object_spread({}, props), {
3535
3561
  children: [
3536
3562
  /* @__PURE__ */ jsx63(Visualization, {}),
3537
3563
  /* @__PURE__ */ jsx63(Status, {}),
@@ -3543,9 +3569,9 @@ AudioThread.Root = Root8;
3543
3569
  AudioThread.Visualization = Visualization;
3544
3570
  AudioThread.Form = Form;
3545
3571
  // src/components/threads/AudioThreadDialog/index.tsx
3546
- import { jsx as jsx64, jsxs as jsxs22 } from "react/jsx-runtime";
3572
+ import { jsx as jsx64, jsxs as jsxs23 } from "react/jsx-runtime";
3547
3573
  var AudioThreadDialog = function() {
3548
- return /* @__PURE__ */ jsxs22(Root6, {
3574
+ return /* @__PURE__ */ jsxs23(Root6, {
3549
3575
  children: [
3550
3576
  /* @__PURE__ */ jsx64(Content4.Root, {
3551
3577
  children: /* @__PURE__ */ jsx64(AudioThread, {})
@@ -3570,7 +3596,7 @@ import { Flex as Flex26 } from "@radix-ui/themes";
3570
3596
  // src/components/suggestions/Suggestions/Item.tsx
3571
3597
  import { ArrowUpIcon as ArrowUpIcon3 } from "@radix-ui/react-icons";
3572
3598
  import { Text as Text8, Button as Button3, Spinner } from "@radix-ui/themes";
3573
- import { jsx as jsx65, jsxs as jsxs23 } from "react/jsx-runtime";
3599
+ import { jsx as jsx65, jsxs as jsxs24 } from "react/jsx-runtime";
3574
3600
  var Item = function(param) {
3575
3601
  var suggestion = param.suggestion, isDisabled = param.isDisabled;
3576
3602
  var _useCreateMessage = useCreateMessage(), createMessage = _useCreateMessage.createMessage, isPending = _useCreateMessage.isPending;
@@ -3588,7 +3614,7 @@ var Item = function(param) {
3588
3614
  };
3589
3615
  var Content5 = function(param) {
3590
3616
  var onClick = param.onClick, isDisabled = param.isDisabled, isPending = param.isPending, children = param.children;
3591
- return /* @__PURE__ */ jsxs23(Button3, {
3617
+ return /* @__PURE__ */ jsxs24(Button3, {
3592
3618
  variant: "soft",
3593
3619
  onClick: onClick,
3594
3620
  disabled: isDisabled,