@rustic-ai/ui-components 0.0.10 → 0.0.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.
@@ -1,6 +1,15 @@
1
1
  import './multimodalInput.css';
2
2
  import '../../../../index.css';
3
3
  import type { MultimodalInputProps } from '../../../types';
4
+ /** The `MultimodalInput` component is designed to serve as a foundation for accommodating diverse input modes in conversational apps. Currently, it supports sending text as well as files. The text messages, are directly sent via the WebSocket while for files, it uses a combination of HTTP APIs and the WebSocket.
5
+
6
+ __How does file upload work?__
7
+
8
+ 1. Users can select files to send alongside text messages.
9
+ 2. Selected files are sent to a designated HTTP API.
10
+ 3. The HTTP API can update the upload progress for each file and is responsible for transforming and storing the files securely.
11
+ 4. Once uploaded, the file names are appended to the data sent over WebSocket. Files can also be deleted after being uploaded and an HTTP API is sent to delete the file from storage.
12
+ 5. The backend server of the application utilizes the uploaded files along with the text messages for message processing. */
4
13
  declare function MultimodalInput(props: MultimodalInputProps): import("react/jsx-runtime").JSX.Element;
5
14
  declare namespace MultimodalInput {
6
15
  var defaultProps: {
@@ -1 +1 @@
1
- {"version":3,"file":"multimodalInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/multimodal/multimodalInput/multimodalInput.tsx"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAA;AAC9B,OAAO,uBAAuB,CAAA;AAO9B,OAAO,KAAK,EAAqB,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAI7E,iBAAwB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAqElE;kBArEuB,eAAe;;;;;;;;;eAAf,eAAe"}
1
+ {"version":3,"file":"multimodalInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/input/multimodal/multimodalInput/multimodalInput.tsx"],"names":[],"mappings":"AAAA,OAAO,uBAAuB,CAAA;AAC9B,OAAO,uBAAuB,CAAA;AAO9B,OAAO,KAAK,EAAqB,oBAAoB,EAAE,MAAM,gBAAgB,CAAA;AAI7E;;;;;;;;4HAQ4H;AAC5H,iBAAwB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAqElE;kBArEuB,eAAe;;;;;;;;;eAAf,eAAe"}
@@ -1,6 +1,6 @@
1
1
  interface MediaIconButtonProps {
2
2
  onClick: () => void;
3
- action: 'play' | 'pause' | 'forward' | 'replay' | 'volumeUp' | 'volumeOff' | 'pictureInPicture' | 'pictureInPictureExit' | 'fullscreen' | 'fullscreenExit' | 'captionsOn' | 'captionsOff';
3
+ action: 'play' | 'pause' | 'forward' | 'replay' | 'volumeUp' | 'volumeOff' | 'miniPlayer' | 'miniPlayerExit' | 'fullscreen' | 'fullscreenExit' | 'captionsOn' | 'captionsOff';
4
4
  className?: string;
5
5
  }
6
6
  export declare function MediaIconButton(props: MediaIconButtonProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"mediaIconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/media/controls/mediaIconButton.tsx"],"names":[],"mappings":"AAMA,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,EACF,MAAM,GACN,OAAO,GACP,SAAS,GACT,QAAQ,GACR,UAAU,GACV,WAAW,GACX,kBAAkB,GAClB,sBAAsB,GACtB,YAAY,GACZ,gBAAgB,GAChB,YAAY,GACZ,aAAa,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAuC1D"}
1
+ {"version":3,"file":"mediaIconButton.d.ts","sourceRoot":"","sources":["../../../../src/components/media/controls/mediaIconButton.tsx"],"names":[],"mappings":"AAMA,UAAU,oBAAoB;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,MAAM,EACF,MAAM,GACN,OAAO,GACP,SAAS,GACT,QAAQ,GACR,UAAU,GACV,WAAW,GACX,YAAY,GACZ,gBAAgB,GAChB,YAAY,GACZ,gBAAgB,GAChB,YAAY,GACZ,aAAa,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAuC1D"}
@@ -3,10 +3,10 @@ interface FullscreenButtonProps {
3
3
  element: HTMLElement;
4
4
  onError: (errorMessage: string) => void;
5
5
  }
6
- interface PictureInPictureButtonProps extends MediaControls {
6
+ interface MiniPlayerButtonProps extends MediaControls {
7
7
  onError: (errorMessage: string) => void;
8
8
  }
9
- export declare function PictureInPictureButton(props: PictureInPictureButtonProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function MiniPlayerButton(props: MiniPlayerButtonProps): import("react/jsx-runtime").JSX.Element;
10
10
  export declare function FullscreenButton(props: FullscreenButtonProps): import("react/jsx-runtime").JSX.Element;
11
11
  export {};
12
12
  //# sourceMappingURL=videoControls.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"videoControls.d.ts","sourceRoot":"","sources":["../../../../src/components/media/controls/videoControls.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAGrD,UAAU,qBAAqB;IAC7B,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC;AAED,UAAU,2BAA4B,SAAQ,aAAa;IACzD,OAAO,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,2BAA2B,2CA2CxE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAuC5D"}
1
+ {"version":3,"file":"videoControls.d.ts","sourceRoot":"","sources":["../../../../src/components/media/controls/videoControls.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AAGrD,UAAU,qBAAqB;IAC7B,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC;AAED,UAAU,qBAAsB,SAAQ,aAAa;IACnD,OAAO,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;CACxC;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAqC5D;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAuC5D"}
@@ -1 +1 @@
1
- {"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../src/components/media/video/video.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AASpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAiB9C,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,WAAW,2CAqT/C"}
1
+ {"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../src/components/media/video/video.tsx"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAA;AASpB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAc9C,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,KAAK,EAAE,WAAW,2CAqT/C"}
@@ -5,9 +5,17 @@ export interface MessageSpaceProps extends MessageContainerProps {
5
5
  /** A component map contains message formats as keys and their corresponding React components as values. */
6
6
  supportedElements: ComponentMap;
7
7
  messages?: ThreadableMessage[];
8
+ /** Text label for scroll down button. Default value is 'scroll down'. */
9
+ scrollDownLabel?: string;
8
10
  }
9
11
  /**
10
12
  The `MessageSpace` component uses `MessageCanvas` and `ElementRenderer` to render a list of messages. It serves as a container for individual message items, each encapsulated within a `MessageCanvas` for consistent styling and layout. \n\n Note: For more information about the `getActionsComponent` and `getProfileComponent` fields, refer to the [MessageCanvas' docs](http://localhost:6006/?path=/docs/rustic-ui-message-canvas-message-canvas--docs).
11
13
  */
12
- export default function MessageSpace(props: MessageSpaceProps): import("react/jsx-runtime").JSX.Element;
14
+ declare function MessageSpace(props: MessageSpaceProps): import("react/jsx-runtime").JSX.Element;
15
+ declare namespace MessageSpace {
16
+ var defaultProps: {
17
+ scrollDownLabel: string;
18
+ };
19
+ }
20
+ export default MessageSpace;
13
21
  //# sourceMappingURL=messageSpace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"messageSpace.d.ts","sourceRoot":"","sources":["../../../src/components/messageSpace/messageSpace.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAM3B,OAAsB,EACpB,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE/D,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D,2GAA2G;IAC3G,iBAAiB,EAAE,YAAY,CAAA;IAC/B,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAA;CAC/B;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAsB5D"}
1
+ {"version":3,"file":"messageSpace.d.ts","sourceRoot":"","sources":["../../../src/components/messageSpace/messageSpace.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAA;AAQ3B,OAAsB,EACpB,KAAK,qBAAqB,EAC3B,MAAM,gCAAgC,CAAA;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAE/D,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D,2GAA2G;IAC3G,iBAAiB,EAAE,YAAY,CAAA;IAC/B,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAA;IAC9B,yEAAyE;IACzE,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;GAEG;AACH,iBAAwB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAyG5D;kBAzGuB,YAAY;;;;;eAAZ,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"multipart.d.ts","sourceRoot":"","sources":["../../../src/components/multipart/multipart.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAA;AACxB,OAAO,iBAAiB,CAAA;AAOxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,aAAa,2CAerD"}
1
+ {"version":3,"file":"multipart.d.ts","sourceRoot":"","sources":["../../../src/components/multipart/multipart.tsx"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAA;AACxB,OAAO,iBAAiB,CAAA;AAUxB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAE7C,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,aAAa,2CA8BrD"}
package/dist/index.css CHANGED
@@ -331,7 +331,6 @@ span.rustic-open-layers-map-marker {
331
331
  }
332
332
 
333
333
  .rustic-transcript-toggle span {
334
- text-transform: none;
335
334
  line-height: 1.5;
336
335
  }
337
336
 
@@ -399,7 +398,6 @@ span.rustic-open-layers-map-marker {
399
398
  }
400
399
 
401
400
  .rustic-transcript-header span {
402
- text-transform: none;
403
401
  padding-left: 14px;
404
402
  line-height: 1.5;
405
403
  }
@@ -564,11 +562,23 @@ span.rustic-open-layers-map-marker {
564
562
  }
565
563
 
566
564
  .rustic-message-space {
567
- overflow-y: scroll;
568
565
  display: flex;
569
566
  flex-direction: column;
570
567
  flex: 1;
571
568
  gap: 16px;
569
+ height: 100%;
570
+ overflow: auto;
571
+ position: relative;
572
+ scroll-behavior: smooth;
573
+ }
574
+
575
+ .rustic-message-space .rustic-scroll-down-button {
576
+ position: sticky;
577
+ bottom: 16px;
578
+ left: 50%;
579
+ transform: translateX(-50%);
580
+ z-index: 10;
581
+ width: fit-content;
572
582
  }
573
583
 
574
584
  .rustic-multipart {
@@ -595,6 +605,7 @@ span.rustic-open-layers-map-marker {
595
605
  @media (max-width: 900px) {
596
606
  .rustic-nav-bar-button {
597
607
  display: flex;
608
+ margin: 0 -8px;
598
609
  }
599
610
  }
600
611