@superinterface/react 5.3.0-beta.10 → 5.3.0-beta.11

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.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { MessagesPage, ThreadStorageOptions, StyleProps, SerializedMessage, UseCreateMessageVariables, DefaultAudioSegment, PlayInputArgs, AudioRuntime, MessageAudioOverrides, Avatar as Avatar$1, SerializedRunStep, ToolCall, MessageGroup as MessageGroup$1 } from './types/index.cjs';
2
+ import { MessagesPage, ThreadStorageOptions, StyleProps, SerializedMessage, UseCreateMessageVariables, DefaultAudioSegment, PlayInputArgs, MessageAudioOverrides, AudioRuntime, Avatar as Avatar$1, SerializedRunStep, ToolCall, MessageGroup as MessageGroup$1 } from './types/index.cjs';
3
3
  import * as _tanstack_react_query from '@tanstack/react-query';
4
4
  import { UseInfiniteQueryOptions, InfiniteData, UseMutationOptions } from '@tanstack/react-query';
5
5
  import * as react_hook_form from 'react-hook-form';
@@ -582,15 +582,16 @@ declare const AudioThreadDialog: {
582
582
  type Args$6<TSegment = DefaultAudioSegment> = {
583
583
  children: React.ReactNode;
584
584
  play?: (args: PlayInputArgs) => Promise<void> | void;
585
+ playSegments?: MessageAudioOverrides<TSegment>['playSegments'];
586
+ getSegments?: MessageAudioOverrides<TSegment>['getSegments'];
585
587
  onEnd?: () => void;
586
588
  audioRuntime?: AudioRuntime;
587
- playback?: MessageAudioOverrides<TSegment>;
588
589
  } & StyleProps;
589
590
 
590
591
  type Args$5 = Omit<Args$6, 'children'>;
591
592
  declare const AudioThread: {
592
593
  (props: Args$5): react_jsx_runtime.JSX.Element;
593
- Root: <TSegment = DefaultAudioSegment>({ children, play, onEnd, className, style, playback, ...rest }: Args$6<TSegment>) => react_jsx_runtime.JSX.Element;
594
+ Root: <TSegment = DefaultAudioSegment>({ children, play, playSegments, getSegments, onEnd, className, style, ...rest }: Args$6<TSegment>) => react_jsx_runtime.JSX.Element;
594
595
  Visualization: {
595
596
  (props: StyleProps): react_jsx_runtime.JSX.Element;
596
597
  Root: ({ children, ...rest }: {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { MessagesPage, ThreadStorageOptions, StyleProps, SerializedMessage, UseCreateMessageVariables, DefaultAudioSegment, PlayInputArgs, AudioRuntime, MessageAudioOverrides, Avatar as Avatar$1, SerializedRunStep, ToolCall, MessageGroup as MessageGroup$1 } from './types/index.js';
2
+ import { MessagesPage, ThreadStorageOptions, StyleProps, SerializedMessage, UseCreateMessageVariables, DefaultAudioSegment, PlayInputArgs, MessageAudioOverrides, AudioRuntime, Avatar as Avatar$1, SerializedRunStep, ToolCall, MessageGroup as MessageGroup$1 } from './types/index.js';
3
3
  import * as _tanstack_react_query from '@tanstack/react-query';
4
4
  import { UseInfiniteQueryOptions, InfiniteData, UseMutationOptions } from '@tanstack/react-query';
5
5
  import * as react_hook_form from 'react-hook-form';
@@ -582,15 +582,16 @@ declare const AudioThreadDialog: {
582
582
  type Args$6<TSegment = DefaultAudioSegment> = {
583
583
  children: React.ReactNode;
584
584
  play?: (args: PlayInputArgs) => Promise<void> | void;
585
+ playSegments?: MessageAudioOverrides<TSegment>['playSegments'];
586
+ getSegments?: MessageAudioOverrides<TSegment>['getSegments'];
585
587
  onEnd?: () => void;
586
588
  audioRuntime?: AudioRuntime;
587
- playback?: MessageAudioOverrides<TSegment>;
588
589
  } & StyleProps;
589
590
 
590
591
  type Args$5 = Omit<Args$6, 'children'>;
591
592
  declare const AudioThread: {
592
593
  (props: Args$5): react_jsx_runtime.JSX.Element;
593
- Root: <TSegment = DefaultAudioSegment>({ children, play, onEnd, className, style, playback, ...rest }: Args$6<TSegment>) => react_jsx_runtime.JSX.Element;
594
+ Root: <TSegment = DefaultAudioSegment>({ children, play, playSegments, getSegments, onEnd, className, style, ...rest }: Args$6<TSegment>) => react_jsx_runtime.JSX.Element;
594
595
  Visualization: {
595
596
  (props: StyleProps): react_jsx_runtime.JSX.Element;
596
597
  Root: ({ children, ...rest }: {
package/dist/index.js CHANGED
@@ -48593,29 +48593,12 @@ var _excluded7 = [
48593
48593
  var _excluded22 = [
48594
48594
  "children",
48595
48595
  "play",
48596
+ "playSegments",
48597
+ "getSegments",
48596
48598
  "onEnd",
48597
48599
  "className",
48598
- "style",
48599
- "playback"
48600
+ "style"
48600
48601
  ];
48601
- function _objectWithoutProperties7(e, t) {
48602
- if (null == e) return {};
48603
- var o, r, i = _objectWithoutPropertiesLoose7(e, t);
48604
- if (Object.getOwnPropertySymbols) {
48605
- var n = Object.getOwnPropertySymbols(e);
48606
- for(r = 0; r < n.length; r++)o = n[r], -1 === t.indexOf(o) && ({}).propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
48607
- }
48608
- return i;
48609
- }
48610
- function _objectWithoutPropertiesLoose7(r, e) {
48611
- if (null == r) return {};
48612
- var t = {};
48613
- for(var n in r)if (({}).hasOwnProperty.call(r, n)) {
48614
- if (-1 !== e.indexOf(n)) continue;
48615
- t[n] = r[n];
48616
- }
48617
- return t;
48618
- }
48619
48602
  function ownKeys50(e, r) {
48620
48603
  var t = Object.keys(e);
48621
48604
  if (Object.getOwnPropertySymbols) {
@@ -48659,6 +48642,24 @@ function _toPrimitive50(t, r) {
48659
48642
  }
48660
48643
  return ("string" === r ? String : Number)(t);
48661
48644
  }
48645
+ function _objectWithoutProperties7(e, t) {
48646
+ if (null == e) return {};
48647
+ var o, r, i = _objectWithoutPropertiesLoose7(e, t);
48648
+ if (Object.getOwnPropertySymbols) {
48649
+ var n = Object.getOwnPropertySymbols(e);
48650
+ for(r = 0; r < n.length; r++)o = n[r], -1 === t.indexOf(o) && ({}).propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
48651
+ }
48652
+ return i;
48653
+ }
48654
+ function _objectWithoutPropertiesLoose7(r, e) {
48655
+ if (null == r) return {};
48656
+ var t = {};
48657
+ for(var n in r)if (({}).hasOwnProperty.call(r, n)) {
48658
+ if (-1 !== e.indexOf(n)) continue;
48659
+ t[n] = r[n];
48660
+ }
48661
+ return t;
48662
+ }
48662
48663
  var Content9 = function(t0) {
48663
48664
  var $ = _c90(4);
48664
48665
  var children = t0.children, className = t0.className, style = t0.style;
@@ -48683,34 +48684,30 @@ var Content9 = function(t0) {
48683
48684
  };
48684
48685
  var AudioRuntimeProvider = function(t0) {
48685
48686
  var $ = _c90(6);
48686
- var children = t0.children, onEnd = t0.onEnd, playback = t0.playback;
48687
+ var children = t0.children, onEnd = t0.onEnd, play = t0.play, playSegments = t0.playSegments, getSegments = t0.getSegments;
48687
48688
  var audioThreadContext = useAudioThreadContext();
48688
48689
  if (audioThreadContext.audioRuntime) {
48689
48690
  return children;
48690
48691
  }
48691
48692
  var t1;
48692
- if ($[0] !== playback) {
48693
- t1 = playback !== null && playback !== void 0 ? playback : {};
48694
- $[0] = playback;
48695
- $[1] = t1;
48696
- } else {
48697
- t1 = $[1];
48698
- }
48699
- var t2;
48700
- if ($[2] !== children || $[3] !== onEnd || $[4] !== t1) {
48701
- t2 = /* @__PURE__ */ _jsx88(TtsAudioRuntimeProvider, _objectSpread50(_objectSpread50({
48702
- onEnd: onEnd
48703
- }, t1), {}, {
48693
+ if ($[0] !== children || $[1] !== getSegments || $[2] !== onEnd || $[3] !== play || $[4] !== playSegments) {
48694
+ t1 = /* @__PURE__ */ _jsx88(TtsAudioRuntimeProvider, {
48695
+ onEnd: onEnd,
48696
+ play: play,
48697
+ playSegments: playSegments,
48698
+ getSegments: getSegments,
48704
48699
  children: children
48705
- }));
48706
- $[2] = children;
48707
- $[3] = onEnd;
48708
- $[4] = t1;
48709
- $[5] = t2;
48700
+ });
48701
+ $[0] = children;
48702
+ $[1] = getSegments;
48703
+ $[2] = onEnd;
48704
+ $[3] = play;
48705
+ $[4] = playSegments;
48706
+ $[5] = t1;
48710
48707
  } else {
48711
- t2 = $[5];
48708
+ t1 = $[5];
48712
48709
  }
48713
- return t2;
48710
+ return t1;
48714
48711
  };
48715
48712
  var Provider5 = function(t0) {
48716
48713
  var $ = _c90(9);
@@ -48756,88 +48753,83 @@ var Root16 = function(t0) {
48756
48753
  var $ = _c90(22);
48757
48754
  var children;
48758
48755
  var className;
48756
+ var getSegments;
48759
48757
  var onEnd;
48760
48758
  var play;
48761
- var playback;
48759
+ var playSegments;
48762
48760
  var rest;
48763
48761
  var style;
48764
48762
  if ($[0] !== t0) {
48765
48763
  var _t2 = t0;
48766
48764
  var ref;
48767
- ref = _t2, children = ref.children, play = ref.play, onEnd = ref.onEnd, className = ref.className, style = ref.style, playback = ref.playback, ref;
48765
+ ref = _t2, children = ref.children, play = ref.play, playSegments = ref.playSegments, getSegments = ref.getSegments, onEnd = ref.onEnd, className = ref.className, style = ref.style, ref;
48768
48766
  rest = _objectWithoutProperties7(_t2, _excluded22);
48769
48767
  _t2;
48770
48768
  $[0] = t0;
48771
48769
  $[1] = children;
48772
48770
  $[2] = className;
48773
- $[3] = onEnd;
48774
- $[4] = play;
48775
- $[5] = playback;
48776
- $[6] = rest;
48777
- $[7] = style;
48771
+ $[3] = getSegments;
48772
+ $[4] = onEnd;
48773
+ $[5] = play;
48774
+ $[6] = playSegments;
48775
+ $[7] = rest;
48776
+ $[8] = style;
48778
48777
  } else {
48779
48778
  children = $[1];
48780
48779
  className = $[2];
48781
- onEnd = $[3];
48782
- play = $[4];
48783
- playback = $[5];
48784
- rest = $[6];
48785
- style = $[7];
48780
+ getSegments = $[3];
48781
+ onEnd = $[4];
48782
+ play = $[5];
48783
+ playSegments = $[6];
48784
+ rest = $[7];
48785
+ style = $[8];
48786
48786
  }
48787
48787
  var t1;
48788
- if ($[8] !== play || $[9] !== playback) {
48789
- t1 = playback !== null && playback !== void 0 ? playback : play ? {
48790
- play: play
48791
- } : void 0;
48792
- $[8] = play;
48793
- $[9] = playback;
48794
- $[10] = t1;
48795
- } else {
48796
- t1 = $[10];
48797
- }
48798
- var playbackOverrides = t1;
48799
- var t2;
48800
- if ($[11] !== children || $[12] !== className || $[13] !== style) {
48801
- t2 = /* @__PURE__ */ _jsx88(ToastsProvider, {
48788
+ if ($[9] !== children || $[10] !== className || $[11] !== style) {
48789
+ t1 = /* @__PURE__ */ _jsx88(ToastsProvider, {
48802
48790
  children: /* @__PURE__ */ _jsx88(Content9, {
48803
48791
  className: className,
48804
48792
  style: style,
48805
48793
  children: children
48806
48794
  })
48807
48795
  });
48808
- $[11] = children;
48809
- $[12] = className;
48810
- $[13] = style;
48811
- $[14] = t2;
48796
+ $[9] = children;
48797
+ $[10] = className;
48798
+ $[11] = style;
48799
+ $[12] = t1;
48812
48800
  } else {
48813
- t2 = $[14];
48801
+ t1 = $[12];
48814
48802
  }
48815
- var t3;
48816
- if ($[15] !== onEnd || $[16] !== playbackOverrides || $[17] !== t2) {
48817
- t3 = /* @__PURE__ */ _jsx88(AudioRuntimeProvider, {
48803
+ var t2;
48804
+ if ($[13] !== getSegments || $[14] !== onEnd || $[15] !== play || $[16] !== playSegments || $[17] !== t1) {
48805
+ t2 = /* @__PURE__ */ _jsx88(AudioRuntimeProvider, {
48818
48806
  onEnd: onEnd,
48819
- playback: playbackOverrides,
48820
- children: t2
48807
+ play: play,
48808
+ playSegments: playSegments,
48809
+ getSegments: getSegments,
48810
+ children: t1
48821
48811
  });
48822
- $[15] = onEnd;
48823
- $[16] = playbackOverrides;
48824
- $[17] = t2;
48825
- $[18] = t3;
48812
+ $[13] = getSegments;
48813
+ $[14] = onEnd;
48814
+ $[15] = play;
48815
+ $[16] = playSegments;
48816
+ $[17] = t1;
48817
+ $[18] = t2;
48826
48818
  } else {
48827
- t3 = $[18];
48819
+ t2 = $[18];
48828
48820
  }
48829
- var t4;
48830
- if ($[19] !== rest || $[20] !== t3) {
48831
- t4 = /* @__PURE__ */ _jsx88(Provider5, _objectSpread50(_objectSpread50({}, rest), {}, {
48832
- children: t3
48821
+ var t3;
48822
+ if ($[19] !== rest || $[20] !== t2) {
48823
+ t3 = /* @__PURE__ */ _jsx88(Provider5, _objectSpread50(_objectSpread50({}, rest), {}, {
48824
+ children: t2
48833
48825
  }));
48834
48826
  $[19] = rest;
48835
- $[20] = t3;
48836
- $[21] = t4;
48827
+ $[20] = t2;
48828
+ $[21] = t3;
48837
48829
  } else {
48838
- t4 = $[21];
48830
+ t3 = $[21];
48839
48831
  }
48840
- return t4;
48832
+ return t3;
48841
48833
  };
48842
48834
  // src/components/threads/AudioThread/Visualization/index.tsx
48843
48835
  import { c as _c92 } from "react-compiler-runtime";