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

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, PlayArgs, AudioRuntime, Avatar as Avatar$1, SerializedRunStep, ToolCall, MessageGroup as MessageGroup$1 } from './types/index.cjs';
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';
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';
@@ -579,17 +579,18 @@ declare const AudioThreadDialog: {
579
579
  };
580
580
  };
581
581
 
582
- type Args$6 = {
582
+ type Args$6<TSegment = DefaultAudioSegment> = {
583
583
  children: React.ReactNode;
584
- play?: (args: PlayArgs) => void;
584
+ play?: (args: PlayInputArgs) => Promise<void> | void;
585
585
  onEnd?: () => void;
586
586
  audioRuntime?: AudioRuntime;
587
+ playback?: MessageAudioOverrides<TSegment>;
587
588
  } & StyleProps;
588
589
 
589
590
  type Args$5 = Omit<Args$6, 'children'>;
590
591
  declare const AudioThread: {
591
592
  (props: Args$5): react_jsx_runtime.JSX.Element;
592
- Root: ({ children, play, onEnd, className, style, ...rest }: Args$6) => react_jsx_runtime.JSX.Element;
593
+ Root: <TSegment = DefaultAudioSegment>({ children, play, onEnd, className, style, playback, ...rest }: Args$6<TSegment>) => react_jsx_runtime.JSX.Element;
593
594
  Visualization: {
594
595
  (props: StyleProps): react_jsx_runtime.JSX.Element;
595
596
  Root: ({ children, ...rest }: {
@@ -623,18 +624,16 @@ declare const useAudioThreadContext: () => {
623
624
  audioRuntime: AudioRuntime | null;
624
625
  };
625
626
 
626
- declare const useTtsAudioRuntime: ({ play, onEnd: passedOnEnd, }: {
627
- play?: (args: PlayArgs) => void;
627
+ declare const useTtsAudioRuntime: <TSegment = DefaultAudioSegment>({ onEnd: passedOnEnd, ...overrides }: {
628
628
  onEnd?: () => void;
629
- }) => {
629
+ } & MessageAudioOverrides<TSegment>) => {
630
630
  ttsAudioRuntime: AudioRuntime;
631
631
  };
632
632
 
633
- declare const TtsAudioRuntimeProvider: ({ children, play, onEnd, }: {
633
+ declare const TtsAudioRuntimeProvider: <TSegment = DefaultAudioSegment>({ children, onEnd, ...overrides }: {
634
634
  children: React.ReactNode;
635
- play?: (args: PlayArgs) => void;
636
635
  onEnd?: () => void;
637
- }) => react_jsx_runtime.JSX.Element;
636
+ } & MessageAudioOverrides<TSegment>) => react_jsx_runtime.JSX.Element;
638
637
 
639
638
  declare const useWebrtcAudioRuntime: () => {
640
639
  webrtcAudioRuntime: {
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, PlayArgs, AudioRuntime, Avatar as Avatar$1, SerializedRunStep, ToolCall, MessageGroup as MessageGroup$1 } from './types/index.js';
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';
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';
@@ -579,17 +579,18 @@ declare const AudioThreadDialog: {
579
579
  };
580
580
  };
581
581
 
582
- type Args$6 = {
582
+ type Args$6<TSegment = DefaultAudioSegment> = {
583
583
  children: React.ReactNode;
584
- play?: (args: PlayArgs) => void;
584
+ play?: (args: PlayInputArgs) => Promise<void> | void;
585
585
  onEnd?: () => void;
586
586
  audioRuntime?: AudioRuntime;
587
+ playback?: MessageAudioOverrides<TSegment>;
587
588
  } & StyleProps;
588
589
 
589
590
  type Args$5 = Omit<Args$6, 'children'>;
590
591
  declare const AudioThread: {
591
592
  (props: Args$5): react_jsx_runtime.JSX.Element;
592
- Root: ({ children, play, onEnd, className, style, ...rest }: Args$6) => react_jsx_runtime.JSX.Element;
593
+ Root: <TSegment = DefaultAudioSegment>({ children, play, onEnd, className, style, playback, ...rest }: Args$6<TSegment>) => react_jsx_runtime.JSX.Element;
593
594
  Visualization: {
594
595
  (props: StyleProps): react_jsx_runtime.JSX.Element;
595
596
  Root: ({ children, ...rest }: {
@@ -623,18 +624,16 @@ declare const useAudioThreadContext: () => {
623
624
  audioRuntime: AudioRuntime | null;
624
625
  };
625
626
 
626
- declare const useTtsAudioRuntime: ({ play, onEnd: passedOnEnd, }: {
627
- play?: (args: PlayArgs) => void;
627
+ declare const useTtsAudioRuntime: <TSegment = DefaultAudioSegment>({ onEnd: passedOnEnd, ...overrides }: {
628
628
  onEnd?: () => void;
629
- }) => {
629
+ } & MessageAudioOverrides<TSegment>) => {
630
630
  ttsAudioRuntime: AudioRuntime;
631
631
  };
632
632
 
633
- declare const TtsAudioRuntimeProvider: ({ children, play, onEnd, }: {
633
+ declare const TtsAudioRuntimeProvider: <TSegment = DefaultAudioSegment>({ children, onEnd, ...overrides }: {
634
634
  children: React.ReactNode;
635
- play?: (args: PlayArgs) => void;
636
635
  onEnd?: () => void;
637
- }) => react_jsx_runtime.JSX.Element;
636
+ } & MessageAudioOverrides<TSegment>) => react_jsx_runtime.JSX.Element;
638
637
 
639
638
  declare const useWebrtcAudioRuntime: () => {
640
639
  webrtcAudioRuntime: {