@rustic-ai/ui-components 0.0.35 → 0.0.36
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/components/calendar/index.js +1 -1
- package/dist/components/codeSnippet/index.js +1 -1
- package/dist/components/image/index.css +11 -0
- package/dist/components/image/index.js +1 -1
- package/dist/components/input/baseInput/baseInput.d.ts +1 -0
- package/dist/components/input/baseInput/baseInput.d.ts.map +1 -1
- package/dist/components/input/emoji/emoji.d.ts.map +1 -1
- package/dist/components/input/multimodal/multimodalInput/index.css +18 -0
- package/dist/components/input/multimodal/multimodalInput/index.js +1 -1
- package/dist/components/input/multimodal/uploader/index.css +11 -0
- package/dist/components/input/multimodal/uploader/index.js +1 -1
- package/dist/components/input/textInput/index.css +56 -0
- package/dist/components/input/textInput/index.js +1 -1
- package/dist/components/map/index.js +1 -1
- package/dist/components/markdown/index.js +1 -1
- package/dist/components/media/audio/index.js +1 -1
- package/dist/components/media/video/index.js +1 -1
- package/dist/components/messageCanvas/actions/copy/index.js +1 -1
- package/dist/components/messageCanvas/actions/index.js +1 -1
- package/dist/components/messageCanvas/actions/textToSpeech/index.js +1 -1
- package/dist/components/multipart/chatCompletion/index.css +11 -0
- package/dist/components/multipart/chatCompletion/index.js +1 -1
- package/dist/components/multipart/multipart/index.css +11 -0
- package/dist/components/participantsContainer/index.css +49 -0
- package/dist/components/participantsContainer/index.d.ts +2 -1
- package/dist/components/participantsContainer/index.d.ts.map +1 -1
- package/dist/components/participantsContainer/index.js +1 -1
- package/dist/components/participantsContainer/participantsContainer.d.ts +2 -14
- package/dist/components/participantsContainer/participantsContainer.d.ts.map +1 -1
- package/dist/components/pdfViewer/index.js +1 -1
- package/dist/components/promptBuilder/index.css +11 -0
- package/dist/components/promptBuilder/index.js +1 -1
- package/dist/components/question/index.js +1 -1
- package/dist/components/sharedDescription.d.ts +2 -0
- package/dist/components/sharedDescription.d.ts.map +1 -1
- package/dist/components/table/index.js +1 -1
- package/dist/components/text/index.js +1 -1
- package/dist/components/types.d.ts +18 -0
- package/dist/components/types.d.ts.map +1 -1
- package/dist/components/video/index.css +11 -0
- package/dist/components/visualization/perspectiveViz/index.js +1 -1
- package/dist/components/visualization/perspectiveViz/perspectiveViz.d.ts.map +1 -1
- package/dist/components/weather/index.js +1 -1
- package/dist/index.css +18 -0
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports["@rustic-ai/ui-components"]=r():e["@rustic-ai/ui-components"]=r()}(global,(()=>(()=>{"use strict";var e={n:r=>{var n=r&&r.__esModule?()=>r.default:()=>r;return e.d(n,{a:n}),n},d:(r,n)=>{for(var t in n)e.o(n,t)&&!e.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:n[t]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>A});const n=require("react/jsx-runtime"),t=require("@mui/material"),i=require("@mui/material/Alert");var a=e.n(i);const o=require("@mui/material/CircularProgress");var c=e.n(o);const l=require("@mui/material/Typography");var s=e.n(l);const u=require("@mui/system"),m=require("react"),d=require("@mui/material/Box");var f=e.n(d);const p=require("@mui/material/Button");var v=e.n(p);const x=require("@mui/material/LinearProgress");var E=e.n(x);const y=require("@mui/material/Slider");var b=e.n(y);const j=require("@mui/material/Tooltip");var h,g=e.n(j);function N(e){var r=Math.floor(e/3600),n=Math.floor(e%3600/60),t=Math.floor(e%60),i=r>0?"".concat(r,":"):"",a="".concat(r>0?n.toString().padStart(2,"0"):n),o=t.toString().padStart(2,"0");return"".concat(i).concat(a,":").concat(o)}!function(e){e[e.HOUR=0]="HOUR",e[e.MONTH_DATE=1]="MONTH_DATE"}(h||(h={}));var S=function(){return S=Object.assign||function(e){for(var r,n=1,t=arguments.length;n<t;n++)for(var i in r=arguments[n])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},S.apply(this,arguments)};function T(e){e.name.replaceAll("_","-");var r={};return e.color&&(r={color:e.color}),(0,n.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:S({},r),children:e.name})}const k=require("@mui/material/IconButton");var _=e.n(k);function P(e){var r,t={play:{symbol:"play_circle",label:"Play"},pause:{symbol:"pause_circle",label:"Pause"},forward:{symbol:"forward_10",label:"Forward ten seconds"},replay:{symbol:"replay_10",label:"Replay ten seconds"},volumeUp:{symbol:"volume_up",label:"Mute"},volumeOff:{symbol:"volume_off",label:"Unmute"},miniPlayer:{symbol:"picture_in_picture",label:"Mini player"},miniPlayerExit:{symbol:"picture_in_picture_off",label:"Exit mini player"},fullscreen:{symbol:"fullscreen",label:"Fullscreen"},fullscreenExit:{symbol:"fullscreen_exit",label:"Exit fullscreen"},captionsOn:{symbol:"closed_caption",label:"Show captions"},captionsOff:{symbol:"closed_caption_disabled",label:"Hide captions"}};return t[e.action].label.replaceAll(" ","-").toLowerCase(),(0,n.jsx)(g(),{title:t[e.action].label,PopperProps:{container:null!==(r=document.fullscreenElement)&&void 0!==r?r:document.body},children:(0,n.jsx)(_(),{onClick:e.onClick,className:e.className,color:"primary",children:(0,n.jsx)(T,{name:t[e.action].symbol,className:"rustic-icon-large"})})})}function C(e){var r="dark"===(0,t.useTheme)().palette.mode,i=N(e.mediaElement.currentTime);return(0,n.jsxs)(f(),{className:"rustic-progress",children:[function(){for(var t=e.mediaElement.buffered,i=0,a=t.length-1;a>=0;--a){var o=t.start(a),c=t.end(a);if(o<e.mediaElement.currentTime){i=c;break}}var l=i/e.mediaElement.duration*100;return(0,n.jsx)(E(),{className:"rustic-progress-buffered",variant:"determinate",value:l,sx:{backgroundColor:"action.focus","& .MuiLinearProgress-bar":{backgroundColor:r?"secondary.light":"action.selected"}}})}(),(0,n.jsx)(b(),{className:"rustic-progress-slider",size:"small","aria-label":"Time","aria-valuetext":"Current time: ".concat(i),max:e.mediaElement.duration,value:e.mediaElement.currentTime,onChange:function(r,n){e.mediaElement.currentTime=n},valueLabelDisplay:"auto",valueLabelFormat:function(e){return N(e)},color:"secondary",sx:{"& .MuiSlider-rail":{color:"action.focus"}}})]})}function w(e){var r=(0,m.useState)(e.mediaElement.volume),t=r[0],i=r[1],a=(0,m.useState)(e.mediaElement.volume),o=a[0],c=a[1],l=e.mediaElement.muted?"volumeOff":"volumeUp";return(0,n.jsxs)(f(),{className:"rustic-volume-settings",children:[(0,n.jsx)(P,{onClick:function(){e.mediaElement.muted=!e.mediaElement.muted,e.mediaElement.muted?(c(e.mediaElement.volume),i(0)):i(o)},className:"rustic-mute-button",action:l}),(0,n.jsx)(b(),{className:"rustic-volume-slider",size:"small",max:1,step:.1,"aria-label":"Volume","aria-valuetext":"Volume: ".concat(100*t,"%"),value:t,onChange:function(r,n){var t=n;e.mediaElement.muted=0===t,e.mediaElement.volume=t,i(e.mediaElement.volume)}})]})}function B(e){var r=e.isTranscriptVisible?"keyboard_arrow_up":"keyboard_arrow_down",t="".concat(e.isTranscriptVisible?"Hide":"Show"," Transcript");return(0,n.jsx)(v(),{className:"rustic-transcript-toggle",onClick:e.setIsTranscriptVisible,endIcon:(0,n.jsx)(T,{name:r}),children:(0,n.jsx)(s(),{variant:"overline",children:t})})}function O(e){var r=(0,m.useState)(!e.mediaElement.paused),t=r[0],i=r[1],a=t?"pause":"play";return e.mediaElement.onended=function(){i(!1)},e.mediaElement.onpause=function(){i(!1)},e.mediaElement.onplay=function(){i(!0)},(0,n.jsx)(P,{onClick:function(){t?e.mediaElement.pause():e.mediaElement.play().catch((function(r){e.onError("Failed to play the media. Error: ".concat(r.message))}))},action:a,className:"rustic-pause-play-icon"})}function q(e){var r,t=(0,m.useState)(e.mediaElement.playbackRate),i=t[0],a=t[1];return(0,n.jsx)(g(),{title:"Playback rate",PopperProps:{container:null!==(r=document.fullscreenElement)&&void 0!==r?r:document.body},children:(0,n.jsx)(v(),{onClick:function(){var r=1;e.mediaElement.playbackRate<2&&(r=e.mediaElement.playbackRate+.5),e.mediaElement.playbackRate=r,a(r)},className:"rustic-playback-rate-button",children:(0,n.jsxs)(s(),{variant:"body1",children:[i,"X"]})})})}function F(e){var r="replay"===e.movement,t=r?function(){e.mediaElement.currentTime-=10}:function(){e.mediaElement.currentTime+=10},i=r?"replay":"forward";return(0,n.jsx)(P,{onClick:t,action:i})}function I(e){var r=(0,m.useState)(!!document.pictureInPictureElement),t=r[0],i=r[1],a=e.mediaElement,o=t?"miniPlayerExit":"miniPlayer";return a.onleavepictureinpicture=function(){i(!1)},(0,n.jsx)(P,{onClick:function(){t?document.exitPictureInPicture().then((function(){i(!1)})).catch((function(r){e.onError("Failed to exit mini player. Error: ".concat(r.message))})):a.requestPictureInPicture().then((function(){i(!0)})).catch((function(r){e.onError("Failed to enter mini player. Error: ".concat(r.message))}))},action:o})}function L(e){var r=(0,m.useState)(!!document.fullscreenElement),t=r[0],i=r[1],a=e.element,o=t?"fullscreenExit":"fullscreen";return a.onfullscreenchange=function(){i(!!document.fullscreenElement)},(0,n.jsx)(P,{onClick:function(){t?document.exitFullscreen().then((function(){i(!1)})).catch((function(r){e.onError("Failed to exit fullscreen mode. Error: ".concat(r.message))})):a.requestFullscreen().then((function(){i(!0)})).catch((function(r){e.onError("Failed to enter fullscreen mode. Error: ".concat(r.message))}))},action:o})}function M(e){var r=N(e.elapsedTimeInSeconds),t=N(e.durationTimeInSeconds),i="".concat(r," / ").concat(t);return"wide"===e.style?(0,n.jsxs)(f(),{className:"rustic-time-container",children:[(0,n.jsx)(s(),{variant:"overline",children:r}),(0,n.jsx)(s(),{variant:"overline",children:t})]}):(0,n.jsx)(s(),{variant:"overline",className:"rustic-time-display",children:i})}M.defaultProps={style:"condensed"};const R=require("@mui/material/Divider");var V=e.n(R);function H(e){var r=!!document.fullscreenElement;return(0,n.jsxs)(u.Box,{className:"rustic-transcript-container",children:[!r&&(0,n.jsx)(V(),{orientation:"vertical",flexItem:!0}),(0,n.jsx)(s(),{className:"rustic-transcript-content",variant:"body2",children:e.transcript})]})}const A=function(e){var r=(0,m.useState)(!1),i=r[0],o=r[1],l=(0,m.useState)(!1),d=l[0],f=l[1],p=(0,m.useState)(!0),v=p[0],x=p[1],E=(0,m.useState)(!!document.fullscreenElement),y=E[0],b=E[1],j=(0,m.useState)(!1),h=j[0],g=j[1],N=(0,m.useState)(""),S=N[0],T=N[1],k=(0,m.useState)(""),_=k[0],R=k[1],V=(0,m.useState)(0),A=V[0],U=V[1],D=(0,m.useRef)(null),z=(0,m.useRef)(null),Q=(0,t.useTheme)(),X=(0,t.useMediaQuery)(Q.breakpoints.down("md"));(0,m.useEffect)((function(){var e,r,n,t,i,a,o,c;function l(e){R(e),x(!1)}function s(){clearTimeout(c),c=setTimeout((function(){return g(!1)}),3e3)}null===(e=z.current)||void 0===e||e.addEventListener("timeupdate",(function(){z.current&&U(z.current.currentTime)})),null===(r=z.current)||void 0===r||r.addEventListener("canplay",(function(){R(""),x(!1)})),null===(n=z.current)||void 0===n||n.addEventListener("error",(function(){return l("Failed to load the video.")})),null===(t=z.current)||void 0===t||t.addEventListener("stalled",(function(){return l("Failed to fetch video data, but trying.")})),document.addEventListener("fullscreenchange",(function(){b(!!document.fullscreenElement)})),null===(i=D.current)||void 0===i||i.addEventListener("mousemove",(function(){g(!0),s()})),null===(a=D.current)||void 0===a||a.addEventListener("mouseleave",(function(){g(!1)})),null===(o=D.current)||void 0===o||o.addEventListener("keydown",(function(){g(!0),s()}))}),[]);var G={backgroundColor:Q.palette.background.paper,opacity:h?1:0};function J(){if(e.transcript&&i)return(0,n.jsx)(H,{transcript:e.transcript})}function K(){if(e.captions&&e.captions.length>0){var r=d?"captionsOff":"captionsOn";return(0,n.jsx)(P,{action:r,onClick:function(){return f(!d)}})}}function W(){if(e.transcript)return(0,n.jsx)(B,{isTranscriptVisible:i,setIsTranscriptVisible:function(){return o(!i)}})}var Y=X?function(){return y?(0,n.jsx)(n.Fragment,{children:z.current&&D.current&&(0,n.jsxs)(u.Box,{className:"rustic-video-controls",sx:G,children:[(0,n.jsxs)(u.Box,{className:"rustic-video-top-controls",children:[(0,n.jsx)(O,{mediaElement:z.current,onError:T}),(0,n.jsx)(C,{mediaElement:z.current}),(0,n.jsx)(M,{elapsedTimeInSeconds:A,durationTimeInSeconds:z.current.duration})]}),(0,n.jsxs)(u.Box,{className:"rustic-video-bottom-controls",children:[(0,n.jsxs)(u.Box,{className:"rustic-time-controls",children:[(0,n.jsx)(F,{mediaElement:z.current,movement:"replay"}),(0,n.jsx)(F,{mediaElement:z.current,movement:"forward"}),K(),(0,n.jsx)(q,{mediaElement:z.current})]}),W()]}),J()]})}):(0,n.jsx)(n.Fragment,{children:z.current&&D.current&&(0,n.jsxs)(u.Box,{className:"rustic-video-controls-mobile-preview",children:[(0,n.jsx)(O,{mediaElement:z.current,onError:T}),(0,n.jsxs)(u.Box,{className:"rustic-video-controls-right",children:[W(),(0,n.jsx)(L,{element:D.current,onError:T})]})]})})}:function(){return(0,n.jsx)(n.Fragment,{children:z.current&&D.current&&(0,n.jsxs)(u.Box,{className:"rustic-video-controls",sx:G,children:[(0,n.jsx)(C,{mediaElement:z.current}),(0,n.jsxs)(u.Box,{className:"rustic-video-bottom-controls",children:[(0,n.jsxs)(u.Box,{className:"rustic-video-bottom-controls-left",children:[(0,n.jsx)(O,{mediaElement:z.current,onError:T}),(0,n.jsx)(F,{mediaElement:z.current,movement:"replay"}),(0,n.jsx)(F,{mediaElement:z.current,movement:"forward"}),K(),(0,n.jsx)(q,{mediaElement:z.current}),(0,n.jsx)(w,{mediaElement:z.current}),(0,n.jsx)(M,{elapsedTimeInSeconds:A,durationTimeInSeconds:z.current.duration,style:"condensed"})]}),(0,n.jsxs)(u.Box,{className:"rustic-video-bottom-controls-right",children:[W(),(0,n.jsx)(I,{mediaElement:z.current,onError:T}),(0,n.jsx)(L,{element:D.current,onError:T})]})]}),y&&J()]})})};return _.length>0?(0,n.jsx)(a(),{severity:"error",children:_}):(0,n.jsxs)(u.Box,{className:"rustic-video",children:[v&&(0,n.jsx)(c(),{className:"rustic-video-loading-spinner"}),(0,n.jsxs)(u.Box,{ref:D,className:"rustic-video-screen",sx:{visibility:v?"hidden":"visible"},children:[S.length>0&&(0,n.jsx)(a(),{severity:"error",className:"rustic-control-error",onClose:function(){return T("")},children:S}),(!X||y)&&function(){if(z.current&&D.current)return(0,n.jsxs)(u.Box,{className:"rustic-video-title",sx:G,children:[(0,n.jsx)(s(),{variant:"body2",children:e.title}),y&&X&&(0,n.jsxs)(u.Box,{children:[(0,n.jsx)(I,{mediaElement:z.current,onError:T}),(0,n.jsx)(L,{element:D.current,onError:T})]})]})}(),(0,n.jsx)("video",{className:"rustic-video-element",ref:z,src:e.src,poster:e.poster,children:d&&(0,n.jsx)("track",{src:e.captions,kind:"captions",default:!0})}),Y()]}),!y&&J()]})};return r})()));
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["@rustic-ai/ui-components"]=n():e["@rustic-ai/ui-components"]=n()}(global,(()=>(()=>{"use strict";var e={n:n=>{var r=n&&n.__esModule?()=>n.default:()=>n;return e.d(r,{a:r}),r},d:(n,r)=>{for(var t in r)e.o(r,t)&&!e.o(n,t)&&Object.defineProperty(n,t,{enumerable:!0,get:r[t]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},n={};e.r(n),e.d(n,{ParticipantRole:()=>H,ParticipantType:()=>V,default:()=>D});const r=require("react/jsx-runtime"),t=require("@mui/material"),i=require("@mui/material/Alert");var a=e.n(i);const o=require("@mui/material/CircularProgress");var c=e.n(o);const l=require("@mui/material/Typography");var s=e.n(l);const u=require("@mui/system"),m=require("react"),d=require("@mui/material/Box");var f=e.n(d);const p=require("@mui/material/Button");var v=e.n(p);const x=require("@mui/material/LinearProgress");var y=e.n(x);const E=require("@mui/material/Slider");var b=e.n(E);const j=require("@mui/material/Tooltip");var h,g=e.n(j);function N(e){var n=Math.floor(e/3600),r=Math.floor(e%3600/60),t=Math.floor(e%60),i=n>0?"".concat(n,":"):"",a="".concat(n>0?r.toString().padStart(2,"0"):r),o=t.toString().padStart(2,"0");return"".concat(i).concat(a,":").concat(o)}!function(e){e[e.HOUR=0]="HOUR",e[e.MONTH_DATE=1]="MONTH_DATE"}(h||(h={}));var S=function(){return S=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var i in n=arguments[r])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},S.apply(this,arguments)};function T(e){e.name.replaceAll("_","-");var n={};return e.color&&(n={color:e.color}),(0,r.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:S({},n),children:e.name})}const k=require("@mui/material/IconButton");var P=e.n(k);function _(e){var n,t={play:{symbol:"play_circle",label:"Play"},pause:{symbol:"pause_circle",label:"Pause"},forward:{symbol:"forward_10",label:"Forward ten seconds"},replay:{symbol:"replay_10",label:"Replay ten seconds"},volumeUp:{symbol:"volume_up",label:"Mute"},volumeOff:{symbol:"volume_off",label:"Unmute"},miniPlayer:{symbol:"picture_in_picture",label:"Mini player"},miniPlayerExit:{symbol:"picture_in_picture_off",label:"Exit mini player"},fullscreen:{symbol:"fullscreen",label:"Fullscreen"},fullscreenExit:{symbol:"fullscreen_exit",label:"Exit fullscreen"},captionsOn:{symbol:"closed_caption",label:"Show captions"},captionsOff:{symbol:"closed_caption_disabled",label:"Hide captions"}};return t[e.action].label.replaceAll(" ","-").toLowerCase(),(0,r.jsx)(g(),{title:t[e.action].label,PopperProps:{container:null!==(n=document.fullscreenElement)&&void 0!==n?n:document.body},children:(0,r.jsx)(P(),{onClick:e.onClick,className:e.className,color:"primary",children:(0,r.jsx)(T,{name:t[e.action].symbol,className:"rustic-icon-large"})})})}function w(e){var n="dark"===(0,t.useTheme)().palette.mode,i=N(e.mediaElement.currentTime);return(0,r.jsxs)(f(),{className:"rustic-progress",children:[function(){for(var t=e.mediaElement.buffered,i=0,a=t.length-1;a>=0;--a){var o=t.start(a),c=t.end(a);if(o<e.mediaElement.currentTime){i=c;break}}var l=i/e.mediaElement.duration*100;return(0,r.jsx)(y(),{className:"rustic-progress-buffered",variant:"determinate",value:l,sx:{backgroundColor:"action.focus","& .MuiLinearProgress-bar":{backgroundColor:n?"secondary.light":"action.selected"}}})}(),(0,r.jsx)(b(),{className:"rustic-progress-slider",size:"small","aria-label":"Time","aria-valuetext":"Current time: ".concat(i),max:e.mediaElement.duration,value:e.mediaElement.currentTime,onChange:function(n,r){e.mediaElement.currentTime=r},valueLabelDisplay:"auto",valueLabelFormat:function(e){return N(e)},color:"secondary",sx:{"& .MuiSlider-rail":{color:"action.focus"}}})]})}function C(e){var n=(0,m.useState)(e.mediaElement.volume),t=n[0],i=n[1],a=(0,m.useState)(e.mediaElement.volume),o=a[0],c=a[1],l=e.mediaElement.muted?"volumeOff":"volumeUp";return(0,r.jsxs)(f(),{className:"rustic-volume-settings",children:[(0,r.jsx)(_,{onClick:function(){e.mediaElement.muted=!e.mediaElement.muted,e.mediaElement.muted?(c(e.mediaElement.volume),i(0)):i(o)},className:"rustic-mute-button",action:l}),(0,r.jsx)(b(),{className:"rustic-volume-slider",size:"small",max:1,step:.1,"aria-label":"Volume","aria-valuetext":"Volume: ".concat(100*t,"%"),value:t,onChange:function(n,r){var t=r;e.mediaElement.muted=0===t,e.mediaElement.volume=t,i(e.mediaElement.volume)}})]})}function O(e){var n=e.isTranscriptVisible?"keyboard_arrow_up":"keyboard_arrow_down",t="".concat(e.isTranscriptVisible?"Hide":"Show"," Transcript");return(0,r.jsx)(v(),{className:"rustic-transcript-toggle",onClick:e.setIsTranscriptVisible,endIcon:(0,r.jsx)(T,{name:n}),children:(0,r.jsx)(s(),{variant:"overline",children:t})})}function B(e){var n=(0,m.useState)(!e.mediaElement.paused),t=n[0],i=n[1],a=t?"pause":"play";return e.mediaElement.onended=function(){i(!1)},e.mediaElement.onpause=function(){i(!1)},e.mediaElement.onplay=function(){i(!0)},(0,r.jsx)(_,{onClick:function(){t?e.mediaElement.pause():e.mediaElement.play().catch((function(n){e.onError("Failed to play the media. Error: ".concat(n.message))}))},action:a,className:"rustic-pause-play-icon"})}function q(e){var n,t=(0,m.useState)(e.mediaElement.playbackRate),i=t[0],a=t[1];return(0,r.jsx)(g(),{title:"Playback rate",PopperProps:{container:null!==(n=document.fullscreenElement)&&void 0!==n?n:document.body},children:(0,r.jsx)(v(),{onClick:function(){var n=1;e.mediaElement.playbackRate<2&&(n=e.mediaElement.playbackRate+.5),e.mediaElement.playbackRate=n,a(n)},className:"rustic-playback-rate-button",children:(0,r.jsxs)(s(),{variant:"body1",children:[i,"X"]})})})}function F(e){var n="replay"===e.movement,t=n?function(){e.mediaElement.currentTime-=10}:function(){e.mediaElement.currentTime+=10},i=n?"replay":"forward";return(0,r.jsx)(_,{onClick:t,action:i})}function I(e){var n=(0,m.useState)(!!document.pictureInPictureElement),t=n[0],i=n[1],a=e.mediaElement,o=t?"miniPlayerExit":"miniPlayer";return a.onleavepictureinpicture=function(){i(!1)},(0,r.jsx)(_,{onClick:function(){t?document.exitPictureInPicture().then((function(){i(!1)})).catch((function(n){e.onError("Failed to exit mini player. Error: ".concat(n.message))})):a.requestPictureInPicture().then((function(){i(!0)})).catch((function(n){e.onError("Failed to enter mini player. Error: ".concat(n.message))}))},action:o})}function M(e){var n=(0,m.useState)(!!document.fullscreenElement),t=n[0],i=n[1],a=e.element,o=t?"fullscreenExit":"fullscreen";return a.onfullscreenchange=function(){i(!!document.fullscreenElement)},(0,r.jsx)(_,{onClick:function(){t?document.exitFullscreen().then((function(){i(!1)})).catch((function(n){e.onError("Failed to exit fullscreen mode. Error: ".concat(n.message))})):a.requestFullscreen().then((function(){i(!0)})).catch((function(n){e.onError("Failed to enter fullscreen mode. Error: ".concat(n.message))}))},action:o})}function L(e){var n=N(e.elapsedTimeInSeconds),t=N(e.durationTimeInSeconds),i="".concat(n," / ").concat(t);return"wide"===e.style?(0,r.jsxs)(f(),{className:"rustic-time-container",children:[(0,r.jsx)(s(),{variant:"overline",children:n}),(0,r.jsx)(s(),{variant:"overline",children:t})]}):(0,r.jsx)(s(),{variant:"overline",className:"rustic-time-display",children:i})}L.defaultProps={style:"condensed"};const R=require("@mui/material/Divider");var H,V,A=e.n(R);function U(e){var n=!!document.fullscreenElement;return(0,r.jsxs)(u.Box,{className:"rustic-transcript-container",children:[!n&&(0,r.jsx)(A(),{orientation:"vertical",flexItem:!0}),(0,r.jsx)(s(),{className:"rustic-transcript-content",variant:"body2",children:e.transcript})]})}!function(e){e.Owner="owner",e.Member="member"}(H||(H={})),function(e){e.Human="human",e.Agent="agent"}(V||(V={}));const D=function(e){var n=(0,m.useState)(!1),i=n[0],o=n[1],l=(0,m.useState)(!1),d=l[0],f=l[1],p=(0,m.useState)(!0),v=p[0],x=p[1],y=(0,m.useState)(!!document.fullscreenElement),E=y[0],b=y[1],j=(0,m.useState)(!1),h=j[0],g=j[1],N=(0,m.useState)(""),S=N[0],T=N[1],k=(0,m.useState)(""),P=k[0],R=k[1],H=(0,m.useState)(0),V=H[0],A=H[1],D=(0,m.useRef)(null),z=(0,m.useRef)(null),Q=(0,t.useTheme)(),X=(0,t.useMediaQuery)(Q.breakpoints.down("md"));(0,m.useEffect)((function(){var e,n,r,t,i,a,o,c;function l(e){R(e),x(!1)}function s(){clearTimeout(c),c=setTimeout((function(){return g(!1)}),3e3)}null===(e=z.current)||void 0===e||e.addEventListener("timeupdate",(function(){z.current&&A(z.current.currentTime)})),null===(n=z.current)||void 0===n||n.addEventListener("canplay",(function(){R(""),x(!1)})),null===(r=z.current)||void 0===r||r.addEventListener("error",(function(){return l("Failed to load the video.")})),null===(t=z.current)||void 0===t||t.addEventListener("stalled",(function(){return l("Failed to fetch video data, but trying.")})),document.addEventListener("fullscreenchange",(function(){b(!!document.fullscreenElement)})),null===(i=D.current)||void 0===i||i.addEventListener("mousemove",(function(){g(!0),s()})),null===(a=D.current)||void 0===a||a.addEventListener("mouseleave",(function(){g(!1)})),null===(o=D.current)||void 0===o||o.addEventListener("keydown",(function(){g(!0),s()}))}),[]);var G={backgroundColor:Q.palette.background.paper,opacity:h?1:0};function J(){if(e.transcript&&i)return(0,r.jsx)(U,{transcript:e.transcript})}function K(){if(e.captions&&e.captions.length>0){var n=d?"captionsOff":"captionsOn";return(0,r.jsx)(_,{action:n,onClick:function(){return f(!d)}})}}function W(){if(e.transcript)return(0,r.jsx)(O,{isTranscriptVisible:i,setIsTranscriptVisible:function(){return o(!i)}})}var Y=X?function(){return E?(0,r.jsx)(r.Fragment,{children:z.current&&D.current&&(0,r.jsxs)(u.Box,{className:"rustic-video-controls",sx:G,children:[(0,r.jsxs)(u.Box,{className:"rustic-video-top-controls",children:[(0,r.jsx)(B,{mediaElement:z.current,onError:T}),(0,r.jsx)(w,{mediaElement:z.current}),(0,r.jsx)(L,{elapsedTimeInSeconds:V,durationTimeInSeconds:z.current.duration})]}),(0,r.jsxs)(u.Box,{className:"rustic-video-bottom-controls",children:[(0,r.jsxs)(u.Box,{className:"rustic-time-controls",children:[(0,r.jsx)(F,{mediaElement:z.current,movement:"replay"}),(0,r.jsx)(F,{mediaElement:z.current,movement:"forward"}),K(),(0,r.jsx)(q,{mediaElement:z.current})]}),W()]}),J()]})}):(0,r.jsx)(r.Fragment,{children:z.current&&D.current&&(0,r.jsxs)(u.Box,{className:"rustic-video-controls-mobile-preview",children:[(0,r.jsx)(B,{mediaElement:z.current,onError:T}),(0,r.jsxs)(u.Box,{className:"rustic-video-controls-right",children:[W(),(0,r.jsx)(M,{element:D.current,onError:T})]})]})})}:function(){return(0,r.jsx)(r.Fragment,{children:z.current&&D.current&&(0,r.jsxs)(u.Box,{className:"rustic-video-controls",sx:G,children:[(0,r.jsx)(w,{mediaElement:z.current}),(0,r.jsxs)(u.Box,{className:"rustic-video-bottom-controls",children:[(0,r.jsxs)(u.Box,{className:"rustic-video-bottom-controls-left",children:[(0,r.jsx)(B,{mediaElement:z.current,onError:T}),(0,r.jsx)(F,{mediaElement:z.current,movement:"replay"}),(0,r.jsx)(F,{mediaElement:z.current,movement:"forward"}),K(),(0,r.jsx)(q,{mediaElement:z.current}),(0,r.jsx)(C,{mediaElement:z.current}),(0,r.jsx)(L,{elapsedTimeInSeconds:V,durationTimeInSeconds:z.current.duration,style:"condensed"})]}),(0,r.jsxs)(u.Box,{className:"rustic-video-bottom-controls-right",children:[W(),(0,r.jsx)(I,{mediaElement:z.current,onError:T}),(0,r.jsx)(M,{element:D.current,onError:T})]})]}),E&&J()]})})};return P.length>0?(0,r.jsx)(a(),{severity:"error",children:P}):(0,r.jsxs)(u.Box,{className:"rustic-video",children:[v&&(0,r.jsx)(c(),{className:"rustic-video-loading-spinner"}),(0,r.jsxs)(u.Box,{ref:D,className:"rustic-video-screen",sx:{visibility:v?"hidden":"visible"},children:[S.length>0&&(0,r.jsx)(a(),{severity:"error",className:"rustic-control-error",onClose:function(){return T("")},children:S}),(!X||E)&&function(){if(z.current&&D.current)return(0,r.jsxs)(u.Box,{className:"rustic-video-title",sx:G,children:[(0,r.jsx)(s(),{variant:"body2",children:e.title}),E&&X&&(0,r.jsxs)(u.Box,{children:[(0,r.jsx)(I,{mediaElement:z.current,onError:T}),(0,r.jsx)(M,{element:D.current,onError:T})]})]})}(),(0,r.jsx)("video",{className:"rustic-video-element",ref:z,src:e.src,poster:e.poster,children:d&&(0,r.jsx)("track",{src:e.captions,kind:"captions",default:!0})}),Y()]}),!E&&J()]})};return n})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={4445:(e,t,o)=>{o.d(t,{default:()=>l});var r=o(8732),n=o(909),a=o.n(n),i=o(4603),c=o.n(i);o(2015);const l=function(e){return(0,r.jsx)(c(),{title:e.label,children:(0,r.jsx)(a(),{color:"inherit","aria-label":e.label,onClick:function(t){t.stopPropagation(),t.preventDefault(),e.onClick(e.message)},className:"rustic-message-actions",children:e.icon})})}},909:e=>{e.exports=require("@mui/material/IconButton")},4603:e=>{e.exports=require("@mui/material/Tooltip")},2015:e=>{e.exports=require("react")},8732:e=>{e.exports=require("react/jsx-runtime")}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,o),a.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};o.r(r),o.d(r,{default:()=>s});var n=o(8732),a=o(2015),i=function(){return i=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)};function c(e){e.name.replaceAll("_","-");var t={};return e.color&&(t={color:e.color}),(0,n.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:i({},t),children:e.name})}var l=o(4445);const s=function(e){var t=(0,a.useState)("Copy text"),o=t[0],r=t[1];return(0,n.jsx)(l.default,{message:e.message,icon:(0,n.jsx)(c,{name:"file_copy"}),onClick:function(e){e.data.text&&navigator.clipboard.writeText(e.data.text).then((function(){r("Copied"),setTimeout((function(){r("Copy text")}),2e3)})).catch((function(){r("Failed to copy")}))},label:o})};return r})()));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={4445:(e,t,o)=>{o.d(t,{default:()=>l});var r=o(8732),n=o(909),a=o.n(n),i=o(4603),c=o.n(i);o(2015),o(7159);const l=function(e){return(0,r.jsx)(c(),{title:e.label,children:(0,r.jsx)(a(),{color:"inherit","aria-label":e.label,onClick:function(t){t.stopPropagation(),t.preventDefault(),e.onClick(e.message)},className:"rustic-message-actions",children:e.icon})})}},7159:(e,t,o)=>{var r,n;!function(e){e.Owner="owner",e.Member="member"}(r||(r={})),function(e){e.Human="human",e.Agent="agent"}(n||(n={}))},909:e=>{e.exports=require("@mui/material/IconButton")},4603:e=>{e.exports=require("@mui/material/Tooltip")},2015:e=>{e.exports=require("react")},8732:e=>{e.exports=require("react/jsx-runtime")}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,o),a.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};o.r(r),o.d(r,{default:()=>s});var n=o(8732),a=o(2015),i=function(){return i=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++)for(var n in t=arguments[o])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},i.apply(this,arguments)};function c(e){e.name.replaceAll("_","-");var t={};return e.color&&(t={color:e.color}),(0,n.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:i({},t),children:e.name})}var l=o(4445);const s=function(e){var t=(0,a.useState)("Copy text"),o=t[0],r=t[1];return(0,n.jsx)(l.default,{message:e.message,icon:(0,n.jsx)(c,{name:"file_copy"}),onClick:function(e){e.data.text&&navigator.clipboard.writeText(e.data.text).then((function(){r("Copied"),setTimeout((function(){r("Copy text")}),2e3)})).catch((function(){r("Failed to copy")}))},label:o})};return r})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={909:e=>{e.exports=require("@mui/material/IconButton")},4603:e=>{e.exports=require("@mui/material/Tooltip")},2015:e=>{e.exports=require("react")},8732:e=>{e.exports=require("react/jsx-runtime")}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};r.r(o),r.d(o,{default:()=>
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={7159:(e,t,r)=>{var o,n;r.d(t,{s:()=>o,y:()=>n}),function(e){e.Owner="owner",e.Member="member"}(o||(o={})),function(e){e.Human="human",e.Agent="agent"}(n||(n={}))},909:e=>{e.exports=require("@mui/material/IconButton")},4603:e=>{e.exports=require("@mui/material/Tooltip")},2015:e=>{e.exports=require("react")},8732:e=>{e.exports=require("react/jsx-runtime")}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};r.r(o),r.d(o,{ParticipantRole:()=>c.s,ParticipantType:()=>c.y,default:()=>l});var n=r(8732),i=r(909),a=r.n(i),u=r(4603),s=r.n(u);r(2015);var c=r(7159);const l=function(e){return(0,n.jsx)(s(),{title:e.label,children:(0,n.jsx)(a(),{color:"inherit","aria-label":e.label,onClick:function(t){t.stopPropagation(),t.preventDefault(),e.onClick(e.message)},className:"rustic-message-actions",children:e.icon})})};return o})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={4445:(e,t,r)=>{r.d(t,{default:()=>
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={4445:(e,t,r)=>{r.d(t,{default:()=>c});var n=r(8732),a=r(909),o=r.n(a),s=r(4603),i=r.n(s);r(2015),r(7159);const c=function(e){return(0,n.jsx)(i(),{title:e.label,children:(0,n.jsx)(o(),{color:"inherit","aria-label":e.label,onClick:function(t){t.stopPropagation(),t.preventDefault(),e.onClick(e.message)},className:"rustic-message-actions",children:e.icon})})}},7159:(e,t,r)=>{var n,a;!function(e){e.Owner="owner",e.Member="member"}(n||(n={})),function(e){e.Human="human",e.Agent="agent"}(a||(a={}))},909:e=>{e.exports=require("@mui/material/IconButton")},4603:e=>{e.exports=require("@mui/material/Tooltip")},2015:e=>{e.exports=require("react")},8732:e=>{e.exports=require("react/jsx-runtime")}},t={};function r(n){var a=t[n];if(void 0!==a)return a.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{default:()=>l});var a=r(8732),o=r(2015),s=function(){return s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},s.apply(this,arguments)};function i(e){e.name.replaceAll("_","-");var t={};return e.color&&(t={color:e.color}),(0,a.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:s({},t),children:e.name})}var c=r(4445);const l=function(e){var t=(0,o.useState)("Start reading aloud"),r=t[0],n=t[1],s=[e.message.data.title,e.message.data.description,e.message.data.alt,e.message.data.text,e.message.data.transcript].filter(Boolean).join(" "),l=new SpeechSynthesisUtterance(s);return(0,a.jsx)(c.default,{message:e.message,icon:(0,a.jsx)(i,{name:"text_to_speech"}),onClick:function(){window.speechSynthesis.speaking?(window.speechSynthesis.cancel(),n("Start reading aloud")):(l.onend=function(){n("Start reading aloud")},window.speechSynthesis.speak(l),n("Stop reading aloud"))},label:r})};return n})()));
|
|
@@ -42,6 +42,17 @@ code {
|
|
|
42
42
|
margin-right: -8px;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
.rustic-participant-profile {
|
|
46
|
+
display: flex;
|
|
47
|
+
gap: 8px;
|
|
48
|
+
align-items: center;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.rustic-participant-profile .rustic-participant-avatar {
|
|
52
|
+
width: 16px;
|
|
53
|
+
height: 16px;
|
|
54
|
+
}
|
|
55
|
+
|
|
45
56
|
.rustic-file-preview {
|
|
46
57
|
position: relative;
|
|
47
58
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={9767:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(8732),i=(r(2015),function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)});function a(e){e.name.replaceAll("_","-");var t={};return e.color&&(t={color:e.color}),(0,n.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:i({},t),children:e.name})}},3110:(e,t,r)=>{r.d(t,{default:()=>n});const n=r(9767).A},2500:(e,t,r)=>{r.d(t,{default:()=>
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={9767:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(8732),i=(r(2015),function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},i.apply(this,arguments)});function a(e){e.name.replaceAll("_","-");var t={};return e.color&&(t={color:e.color}),(0,n.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:i({},t),children:e.name})}},3110:(e,t,r)=>{r.d(t,{default:()=>n});const n=r(9767).A},2500:(e,t,r)=>{r.d(t,{default:()=>i}),r(1737);var n=r(7131);r(7159);const i=n.A},1737:(e,t,r)=>{r(8732),r(5642),r(785),r(7447),r(2015)},7131:(e,t,r)=>{r.d(t,{A:()=>l});var n=r(8732),i=r(785),a=r.n(i),o=r(7447),s=r.n(o);r(2015);const l=function(e){return(0,n.jsx)(a(),{variant:"body2",className:"rustic-text",children:s().sanitize(e.text)})}},7159:(e,t,r)=>{var n,i;!function(e){e.Owner="owner",e.Member="member"}(n||(n={})),function(e){e.Human="human",e.Agent="agent"}(i||(i={}))},5642:e=>{e.exports=require("@mui/material/Alert")},785:e=>{e.exports=require("@mui/material/Typography")},7447:e=>{e.exports=require("dompurify")},2015:e=>{e.exports=require("react")},8732:e=>{e.exports=require("react/jsx-runtime")}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{default:()=>z});var i=r(8732);const a=require("@mui/material/Box");var o=r.n(a);const s=require("@mui/material/IconButton");var l=r.n(s);const c=require("@mui/material/Tooltip");var u=r.n(c),d=r(2015);const m=require("@mui/material/Card");var f=r.n(m);const p=require("@mui/material/Modal");var h=r.n(p);const x=require("@mui/material/styles");var v,j=r(785),b=r.n(j);!function(e){e[e.HOUR=0]="HOUR",e[e.MONTH_DATE=1]="MONTH_DATE"}(v||(v={}));var w=r(9767);const y=require("@mui/material/TextField");var g=r.n(y);const N=require("@mui/material/useMediaQuery");var C=r.n(N);const k=require("@mui/system/Stack");var P=r.n(k);const O=require("@mui/system/useTheme");var q=r.n(O);const S=require("pdfjs-dist"),A=function(e){var t={zoomIn:{symbol:"zoom_in",label:"Zoom in"},zoomOut:{symbol:"zoom_out",label:"Zoom out"},close:{symbol:"close",label:"Close"},previousPage:{symbol:"arrow_back",label:"Previous page"},nextPage:{symbol:"arrow_forward",label:"Next page"}},r=(t[e.action].label.replaceAll(" ","-").toLowerCase(),t[e.action]);return(0,i.jsx)(u(),{title:r.label,children:(0,i.jsx)("span",{children:(0,i.jsx)(l(),{onClick:e.onClick,className:e.className,disabled:e.isDisabled,children:(0,i.jsx)(w.A,{name:r.symbol})})})})};var T={pdf:function(e){var t,r=(0,d.useRef)(null),n=(0,d.useState)(1),a=n[0],s=n[1],l=(0,d.useState)(1),c=l[0],u=l[1],m=(0,d.useState)(1),p=m[0],h=m[1],x=(0,d.useState)(!1),v=x[0],j=x[1],w=(0,d.useState)(),y=w[0],N=w[1],k=q()(),O=C()(k.breakpoints.down("sm")),T=C()(k.breakpoints.between("sm","md"));if(t=e.url,!/\/[^/]+\.pdf$/.test(t))return(0,i.jsx)(f(),{variant:"outlined",className:"rustic-pdf-error",children:(0,i.jsx)(b(),{variant:"body2",children:"The provided URL does not point to a PDF file."})});var _=(0,d.useState)((function(){return O?.5:T?1:1.5})),F=_[0],D=_[1];return(0,d.useEffect)((function(){S.GlobalWorkerOptions.workerSrc||(S.GlobalWorkerOptions.workerSrc="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(S.version,"/pdf.worker.mjs")),S.getDocument({url:"".concat(e.url)}).promise.then((function(e){u(e.numPages),function(e){e.getPage(a).then((function(e){var t=e.getViewport({scale:F}),n=r.current;if(n){var i=n.getContext("2d");if(i){var a=window.devicePixelRatio||1;n.style.width="".concat(t.width,"px"),n.style.height="".concat(t.height,"px"),n.width=t.width*a,n.height=t.height*a;var o={canvasContext:i,viewport:t,transform:[a,0,0,a,0,0]};y&&y.cancel();var s=e.render(o);N(s),s.promise.then((function(){N(void 0)})).catch((function(e){console.error(e)}))}}}))}(e)})).catch((function(){j(!0)}))}),[e.url,a,F]),v?(0,i.jsx)(f(),{variant:"outlined",className:"rustic-pdf-error",children:(0,i.jsx)(b(),{variant:"body2",children:"Failed to load the PDF file."})}):(0,i.jsxs)(f(),{variant:"outlined",className:"rustic-pdf-viewer",children:[(0,i.jsxs)(o(),{className:"rustic-pdf-viewer-header",children:[(0,i.jsx)(A,{action:"zoomOut",onClick:function(){D((function(e){return Math.max(e-.2,.2)}))}}),(0,i.jsx)(A,{action:"zoomIn",onClick:function(){D((function(e){return e+.2}))}})]}),(0,i.jsx)(o(),{className:"rustic-pdf-viewer-body",children:(0,i.jsx)(o(),{className:"rustic-pdf-viewer-body-inner",children:(0,i.jsx)("canvas",{ref:r})})}),(0,i.jsxs)(P(),{direction:"row",justifyContent:"center",alignItems:"center",gap:1,children:[(0,i.jsx)(A,{action:"previousPage",onClick:function(){a>1&&(s(a-1),h(a-1))},isDisabled:1===a}),(0,i.jsx)(b(),{variant:"body1",className:"rustic-page-indicator",children:"Page"}),(0,i.jsx)(g(),{type:"number",value:p,onChange:function(e){var t=parseInt(e.target.value);h(t),!isNaN(t)&&t>=1&&t<=c&&s(t)},size:"small",className:"rustic-pdf-page-input"}),(0,i.jsxs)(b(),{variant:"body1",className:"rustic-page-indicator",children:["of ",c]}),(0,i.jsx)(A,{action:"nextPage",onClick:function(){a<c&&(s(a+1),h(a+1))},isDisabled:a===c})]})]})}};function _(e){var t=(0,x.useTheme)(),r=(0,d.useState)(!1),n=r[0],a=r[1];function o(){a(!1)}var s,c,m=e.file.url&&(s=e.file.url.split("."))[s.length-1].toLowerCase(),p=m&&e.supportedViewers?e.supportedViewers[m]:null,v=!!p,j=e.showFullName?"rustic-flexible-file-preview-width":"rustic-fixed-file-preview-width",y=v?" rustic-cursor-pointer":"",g="rustic-file-preview ".concat(j).concat(y),N=e.showFullName?e.file.name:(c=e.file.name).length<=15?c:c.substring(0,12)+"...";return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(f(),{className:g,variant:"outlined",sx:{boxShadow:t.shadows[1]},onClick:function(){a(!0)},children:[(0,i.jsx)(b(),{variant:"subtitle2",className:"rustic-file-preview-name",children:N}),(0,i.jsx)("div",{onClick:function(e){return e.stopPropagation()},children:e.children})]}),v&&(0,i.jsx)(h(),{open:n,onClose:o,className:"rustic-file-preview-modal",children:(0,i.jsxs)("div",{className:"rustic-modal-content",children:[(0,i.jsx)(u(),{title:"Close",children:(0,i.jsx)(l(),{onClick:o,className:"rustic-close-button",children:(0,i.jsx)(w.A,{name:"close"})})}),e.file.url&&(0,i.jsx)(p,{url:e.file.url})]})})]})}_.defaultProps={supportedViewers:T,showFullName:!0};var F=r(3110),D=r(2500);function M(e){return new URL(e).pathname.split("/").pop()}const z=function(e){return(0,i.jsx)(o(),{className:"rustic-multipart",children:e.messages.map((function(t){return"string"==typeof t.content?(0,i.jsx)(D.default,{text:t.content}):(r=t.content,n=[],a="",r.map((function(t){if("text"===t.type)a+=t.text;else if(t.type.endsWith("_url")){var r=t[t.type].url,o={url:r,name:t[t.type].name||M(r)},s=(0,i.jsx)(_,{file:o,showFullName:e.showFullName,children:o.url&&(0,i.jsx)(u(),{title:"Download",className:"rustic-shift-to-right-by-8",children:(0,i.jsx)(l(),{component:"a",href:o.url,download:o.name,children:(0,i.jsx)(F.default,{name:"download"})})})});n.push(s)}})),(0,i.jsxs)(i.Fragment,{children:[a.length>0&&(0,i.jsx)(D.default,{text:a}),n.length>0&&(0,i.jsx)(o(),{className:"rustic-files",children:n})]}));var r,n,a}))})};return n})()));
|
|
@@ -42,6 +42,17 @@ code {
|
|
|
42
42
|
margin-right: -8px;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
.rustic-participant-profile {
|
|
46
|
+
display: flex;
|
|
47
|
+
gap: 8px;
|
|
48
|
+
align-items: center;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.rustic-participant-profile .rustic-participant-avatar {
|
|
52
|
+
width: 16px;
|
|
53
|
+
height: 16px;
|
|
54
|
+
}
|
|
55
|
+
|
|
45
56
|
.rustic-file-preview {
|
|
46
57
|
position: relative;
|
|
47
58
|
display: flex;
|
|
@@ -36,6 +36,55 @@
|
|
|
36
36
|
margin-inline: 24px;
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
body {
|
|
40
|
+
margin: 0;
|
|
41
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
42
|
+
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
43
|
+
sans-serif;
|
|
44
|
+
-webkit-font-smoothing: antialiased;
|
|
45
|
+
-moz-osx-font-smoothing: grayscale;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
code {
|
|
49
|
+
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
|
50
|
+
monospace;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.rustic-fit-container {
|
|
54
|
+
object-fit: contain;
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: 100%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.rustic-files {
|
|
60
|
+
display: flex;
|
|
61
|
+
gap: 8px;
|
|
62
|
+
flex-wrap: wrap;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.rustic-cursor-pointer {
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.rustic-align-self-center {
|
|
70
|
+
align-self: center;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.rustic-shift-to-right-by-8 {
|
|
74
|
+
margin-right: -8px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.rustic-participant-profile {
|
|
78
|
+
display: flex;
|
|
79
|
+
gap: 8px;
|
|
80
|
+
align-items: center;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.rustic-participant-profile .rustic-participant-avatar {
|
|
84
|
+
width: 16px;
|
|
85
|
+
height: 16px;
|
|
86
|
+
}
|
|
87
|
+
|
|
39
88
|
span.rustic-icon-large {
|
|
40
89
|
font-size: 32px;
|
|
41
90
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import './participantsContainer.css';
|
|
2
|
-
import
|
|
2
|
+
import { type Participant, ParticipantRole, ParticipantType } from '../types';
|
|
3
|
+
import ParticipantsContainer from './participantsContainer';
|
|
3
4
|
export default ParticipantsContainer;
|
|
4
5
|
export { type Participant, ParticipantRole, ParticipantType };
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/participantsContainer/index.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AAEpC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/participantsContainer/index.ts"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AAEpC,OAAO,EAAE,KAAK,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC7E,OAAO,qBAAqB,MAAM,yBAAyB,CAAA;AAE3D,eAAe,qBAAqB,CAAA;AAEpC,OAAO,EAAE,KAAK,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,
|
|
1
|
+
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports["@rustic-ai/ui-components"]=r():t["@rustic-ai/ui-components"]=r()}(global,(()=>(()=>{"use strict";var t,r,e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var a in r)e.o(r,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:r[a]})},o:(t,r)=>Object.prototype.hasOwnProperty.call(t,r),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},a={};e.r(a),e.d(a,{ParticipantRole:()=>t,ParticipantType:()=>r,default:()=>H}),function(t){t.Owner="owner",t.Member="member"}(t||(t={})),function(t){t.Human="human",t.Agent="agent"}(r||(r={}));const i=require("react/jsx-runtime"),n=require("@mui/material/Avatar");var c=e.n(n);const s=require("@mui/material/Button");var o=e.n(s);const l=require("@mui/material/Dialog");var p=e.n(l);const u=require("@mui/material/DialogTitle");var m=e.n(u);const d=require("@mui/material/Divider");var y=e.n(d);const f=require("@mui/material/List");var h=e.n(f);const v=require("@mui/material/ListItem");var x=e.n(v);const j=require("@mui/material/ListSubheader");var b=e.n(j);const g=require("@mui/material/Typography");var T=e.n(g);const N=require("@mui/system"),O=require("pluralize");var q=e.n(O);const A=require("react");var _;!function(t){t[t.HOUR=0]="HOUR",t[t.MONTH_DATE=1]="MONTH_DATE"}(_||(_={}));var w=function(){return w=Object.assign||function(t){for(var r,e=1,a=arguments.length;e<a;e++)for(var i in r=arguments[e])Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);return t},w.apply(this,arguments)};function S(t){t.name.replaceAll("_","-");var r={};return t.color&&(r={color:t.color}),(0,i.jsx)("span",{className:"".concat(t.className?t.className+" ":"","material-symbols-rounded"),style:w({},r),children:t.name})}function P(r){var e=(0,A.useState)(!1),a=e[0],n=e[1],s=r.participants.length,l=a?r.participants:r.participants.slice(0,3),p="".concat(q()(r.participantType,s)," (").concat(s,")"),u=a?"Show Less":"Show All ".concat(s);return 0===s?(0,i.jsx)(T(),{variant:"caption",className:"rustic-participant-list-no-participants-message",children:"There are currently no participants."}):(0,i.jsx)(h(),{className:"rustic-participant-list",subheader:(0,i.jsxs)(b(),{disableSticky:!0,className:"rustic-participant-list-subheader",children:[(0,i.jsxs)(N.Box,{className:"rustic-participant-list-subheader-title",children:[r.participantTypeIcon,(0,i.jsx)(T(),{variant:"subtitle2",color:"text.secondary",children:p})]}),s>3&&(0,i.jsx)(o(),{onClick:function(){return n(!a)},color:"primary",size:"small",startIcon:(0,i.jsx)(S,{name:"keyboard_arrow_down"}),children:u})]}),children:l.map((function(r){return(0,i.jsxs)(x(),{className:"rustic-participant-list-item",children:[(0,i.jsxs)(N.Box,{className:"rustic-participant-profile",children:[(0,i.jsx)(c(),{src:r.icon,className:"rustic-participant-avatar"}),(0,i.jsx)(T(),{variant:"subtitle2",children:r.displayName})]}),(0,i.jsx)(T(),{variant:r.participantRole===t.Owner?"subtitle2":"caption",children:(e=r.participantRole||t.Member,e.charAt(0).toUpperCase()+e.slice(1))})]},r.id);var e}))})}const H=function(e){function a(r,e){return function(r){return function(t,r,e){if(e||2===arguments.length)for(var a,i=0,n=r.length;i<n;i++)!a&&i in r||(a||(a=Array.prototype.slice.call(r,0,i)),a[i]=r[i]);return t.concat(a||Array.prototype.slice.call(r))}([],r,!0).sort((function(r,e){return e.participantRole===t.Owner?1:-1}))}(r.filter((function(t){return t.participantType===e})))}var n=a(e.participants,r.Human),c=a(e.participants,r.Agent),s="".concat(q()("Participant",e.participants.length)," (").concat(e.participants.length,")");return(0,i.jsxs)(p(),{open:e.isParticipantListOpen,onClose:e.onClose,className:"rustic-participants-container",maxWidth:"sm",fullWidth:!0,children:[(0,i.jsx)(m(),{sx:{borderBottom:"1px solid",borderColor:"divider"},component:"h6",className:"rustic-participants-container-title",children:s}),(0,i.jsx)(P,{participantType:"Human",participantTypeIcon:(0,i.jsx)(S,{name:"account_circle"}),participants:n}),c.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(y(),{className:"rustic-participants-container-divider"}),(0,i.jsx)(P,{participantType:"Agent",participantTypeIcon:(0,i.jsx)(S,{name:"smart_toy"}),participants:c})]})]})};return a})()));
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import './participantsContainer.css';
|
|
2
|
+
import '../../index.css';
|
|
3
|
+
import { type Participant } from '../types';
|
|
2
4
|
export interface ParticipantsContainerProps {
|
|
3
5
|
participants: Participant[];
|
|
4
6
|
/** Boolean that dictates the open/closed state of the participants modal. */
|
|
@@ -6,20 +8,6 @@ export interface ParticipantsContainerProps {
|
|
|
6
8
|
/** Callback function to close the participants modal. */
|
|
7
9
|
onClose: () => void;
|
|
8
10
|
}
|
|
9
|
-
export declare enum ParticipantRole {
|
|
10
|
-
Owner = "owner",
|
|
11
|
-
Member = "member"
|
|
12
|
-
}
|
|
13
|
-
export declare enum ParticipantType {
|
|
14
|
-
Human = "human",
|
|
15
|
-
Agent = "agent"
|
|
16
|
-
}
|
|
17
|
-
export interface Participant {
|
|
18
|
-
id: string;
|
|
19
|
-
displayName: string;
|
|
20
|
-
participantRole: ParticipantRole;
|
|
21
|
-
participantType: ParticipantType;
|
|
22
|
-
}
|
|
23
11
|
/** The `ParticipantsContainer` component is responsible for displaying a list of participants within a dialog window. It organizes participants into separate lists based on their type (human or agent) and provides options to toggle between showing a subset of participants and displaying the full list. This component enhances the user experience by presenting participant information in a structured format and allowing users to view additional details as needed.
|
|
24
12
|
*
|
|
25
13
|
* Note: The component does not include the button displayed to toggle between the two views. This button is typically implemented in the parent component that uses the `ParticipantsContainer` component. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"participantsContainer.d.ts","sourceRoot":"","sources":["../../../src/components/participantsContainer/participantsContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"participantsContainer.d.ts","sourceRoot":"","sources":["../../../src/components/participantsContainer/participantsContainer.tsx"],"names":[],"mappings":"AAAA,OAAO,6BAA6B,CAAA;AACpC,OAAO,iBAAiB,CAAA;AAmBxB,OAAO,EAAE,KAAK,WAAW,EAAoC,MAAM,UAAU,CAAA;AAE7E,MAAM,WAAW,0BAA0B;IACzC,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,6EAA6E;IAC7E,qBAAqB,EAAE,OAAO,CAAA;IAC9B,yDAAyD;IACzD,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAwGD;;8MAE8M;AAC9M,iBAAS,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,2CAyE/D;AAED,eAAe,qBAAqB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ParticipantRole:()=>S,ParticipantType:()=>C,default:()=>O});const r=require("react/jsx-runtime"),n=require("@mui/material/Box");var a=e.n(n);const o=require("@mui/material/Card");var i=e.n(o);const s=require("@mui/material/TextField");var c=e.n(s);const l=require("@mui/material/Typography");var u=e.n(l);const d=require("@mui/material/useMediaQuery");var m=e.n(d);const p=require("@mui/system/Stack");var f=e.n(p);const v=require("@mui/system/useTheme");var b=e.n(v);const h=require("pdfjs-dist"),y=require("react"),x=require("@mui/material/IconButton");var j=e.n(x);const g=require("@mui/material/Tooltip");var w=e.n(g),P=function(){return P=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},P.apply(this,arguments)};function N(e){e.name.replaceAll("_","-");var t={};return e.color&&(t={color:e.color}),(0,r.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:P({},t),children:e.name})}const k=function(e){var t={zoomIn:{symbol:"zoom_in",label:"Zoom in"},zoomOut:{symbol:"zoom_out",label:"Zoom out"},close:{symbol:"close",label:"Close"},previousPage:{symbol:"arrow_back",label:"Previous page"},nextPage:{symbol:"arrow_forward",label:"Next page"}},n=(t[e.action].label.replaceAll(" ","-").toLowerCase(),t[e.action]);return(0,r.jsx)(w(),{title:n.label,children:(0,r.jsx)("span",{children:(0,r.jsx)(j(),{onClick:e.onClick,className:e.className,disabled:e.isDisabled,children:(0,r.jsx)(N,{name:n.symbol})})})})};var S,C;!function(e){e.Owner="owner",e.Member="member"}(S||(S={})),function(e){e.Human="human",e.Agent="agent"}(C||(C={}));const O=function(e){var t,n=(0,y.useRef)(null),o=(0,y.useState)(1),s=o[0],l=o[1],d=(0,y.useState)(1),p=d[0],v=d[1],x=(0,y.useState)(1),j=x[0],g=x[1],w=(0,y.useState)(!1),P=w[0],N=w[1],S=(0,y.useState)(),C=S[0],O=S[1],q=b()(),_=m()(q.breakpoints.down("sm")),T=m()(q.breakpoints.between("sm","md"));if(t=e.url,!/\/[^/]+\.pdf$/.test(t))return(0,r.jsx)(i(),{variant:"outlined",className:"rustic-pdf-error",children:(0,r.jsx)(u(),{variant:"body2",children:"The provided URL does not point to a PDF file."})});var z=(0,y.useState)((function(){return _?.5:T?1:1.5})),D=z[0],M=z[1];return(0,y.useEffect)((function(){h.GlobalWorkerOptions.workerSrc||(h.GlobalWorkerOptions.workerSrc="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(h.version,"/pdf.worker.mjs")),h.getDocument({url:"".concat(e.url)}).promise.then((function(e){v(e.numPages),function(e){e.getPage(s).then((function(e){var t=e.getViewport({scale:D}),r=n.current;if(r){var a=r.getContext("2d");if(a){var o=window.devicePixelRatio||1;r.style.width="".concat(t.width,"px"),r.style.height="".concat(t.height,"px"),r.width=t.width*o,r.height=t.height*o;var i={canvasContext:a,viewport:t,transform:[o,0,0,o,0,0]};C&&C.cancel();var s=e.render(i);O(s),s.promise.then((function(){O(void 0)})).catch((function(e){console.error(e)}))}}}))}(e)})).catch((function(){N(!0)}))}),[e.url,s,D]),P?(0,r.jsx)(i(),{variant:"outlined",className:"rustic-pdf-error",children:(0,r.jsx)(u(),{variant:"body2",children:"Failed to load the PDF file."})}):(0,r.jsxs)(i(),{variant:"outlined",className:"rustic-pdf-viewer",children:[(0,r.jsxs)(a(),{className:"rustic-pdf-viewer-header",children:[(0,r.jsx)(k,{action:"zoomOut",onClick:function(){M((function(e){return Math.max(e-.2,.2)}))}}),(0,r.jsx)(k,{action:"zoomIn",onClick:function(){M((function(e){return e+.2}))}})]}),(0,r.jsx)(a(),{className:"rustic-pdf-viewer-body",children:(0,r.jsx)(a(),{className:"rustic-pdf-viewer-body-inner",children:(0,r.jsx)("canvas",{ref:n})})}),(0,r.jsxs)(f(),{direction:"row",justifyContent:"center",alignItems:"center",gap:1,children:[(0,r.jsx)(k,{action:"previousPage",onClick:function(){s>1&&(l(s-1),g(s-1))},isDisabled:1===s}),(0,r.jsx)(u(),{variant:"body1",className:"rustic-page-indicator",children:"Page"}),(0,r.jsx)(c(),{type:"number",value:j,onChange:function(e){var t=parseInt(e.target.value);g(t),!isNaN(t)&&t>=1&&t<=p&&l(t)},size:"small",className:"rustic-pdf-page-input"}),(0,r.jsxs)(u(),{variant:"body1",className:"rustic-page-indicator",children:["of ",p]}),(0,r.jsx)(k,{action:"nextPage",onClick:function(){s<p&&(l(s+1),g(s+1))},isDisabled:s===p})]})]})};return t})()));
|
|
@@ -94,6 +94,17 @@ code {
|
|
|
94
94
|
margin-right: -8px;
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
+
.rustic-participant-profile {
|
|
98
|
+
display: flex;
|
|
99
|
+
gap: 8px;
|
|
100
|
+
align-items: center;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.rustic-participant-profile .rustic-participant-avatar {
|
|
104
|
+
width: 16px;
|
|
105
|
+
height: 16px;
|
|
106
|
+
}
|
|
107
|
+
|
|
97
108
|
span.rustic-icon-large {
|
|
98
109
|
font-size: 32px;
|
|
99
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports["@rustic-ai/ui-components"]=r():e["@rustic-ai/ui-components"]=r()}(global,(()=>(()=>{"use strict";var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{default:()=>
|
|
1
|
+
!function(e,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports["@rustic-ai/ui-components"]=r():e["@rustic-ai/ui-components"]=r()}(global,(()=>(()=>{"use strict";var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var n in t)e.o(t,n)&&!e.o(r,n)&&Object.defineProperty(r,n,{enumerable:!0,get:t[n]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{ParticipantRole:()=>I,ParticipantType:()=>A,default:()=>E});const t=require("react/jsx-runtime"),n=require("@mui/material/Button");var i=e.n(n);const o=require("@mui/material/Card");var a=e.n(o);const s=require("@mui/material/CircularProgress");var l=e.n(s);const c=require("@mui/material/Dialog");var u=e.n(c);const d=require("@mui/material/DialogActions");var m=e.n(d);const p=require("@mui/material/DialogContent");var f=e.n(p);const g=require("@mui/material/DialogContentText");var b=e.n(g);const h=require("@mui/material/DialogTitle");var v=e.n(h);const x=require("@mui/material/Divider");var y=e.n(x);const j=require("@mui/material/Typography");var q=e.n(j);const w=require("@mui/system"),O=require("react");var C=e.n(O),N=function(){return N=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},N.apply(this,arguments)};const P=function(e){var r=e.messages[0],n=e.messages.slice(1),i=e.supportedElements[r.format];return(0,t.jsx)(t.Fragment,{children:i?C().createElement(i,N(N({sender:e.sender,ws:e.ws,messageId:r.id,conversationId:r.conversationId},r.data),n.length>0&&{updatedData:n.map((function(e){return e.data}))})):(0,t.jsxs)(q(),{variant:"body2",children:["Unsupported element format: ",r.format]})})};var S=function(){return S=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},S.apply(this,arguments)};function B(e){e.name.replaceAll("_","-");var r={};return e.color&&(r={color:e.color}),(0,t.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:S({},r),children:e.name})}var I,A,D=function(){return D=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var i in r=arguments[t])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e},D.apply(this,arguments)},T=function(e,r,t){if(t||2===arguments.length)for(var n,i=0,o=r.length;i<o;i++)!n&&i in r||(n||(n=Array.prototype.slice.call(r,0,i)),n[i]=r[i]);return e.concat(n||Array.prototype.slice.call(r))};!function(e){e.Owner="owner",e.Member="member"}(I||(I={})),function(e){e.Human="human",e.Agent="agent"}(A||(A={}));const E=function(e){var r=(0,O.useState)(!1),n=r[0],o=r[1],s=(0,O.useState)(!1),c=s[0],d=s[1],p=(0,O.useState)(!1),g=p[0],h=p[1],x=(0,O.useState)(!1),j=x[0],C=x[1],N=(0,O.useState)([]),S=N[0],I=N[1],A=(0,O.useState)(null),E=A[0],_=A[1],k=(0,w.useTheme)(),M=S[S.length-1],Q=D(D({},e.ws),{send:function(e){_(e)}});function R(e){I((function(r){return T(T([],r,!0),[e],!1)}))}function F(){if(E){var r=D(D({},E),{threadId:e.messageId});e.ws.send(r)}}if((0,O.useEffect)((function(){e.ws.onReceive&&e.ws.onReceive(R)}),[e.ws]),(0,O.useEffect)((function(){S.length>0&&(M&&M.sender.id!==e.sender.id&&d(!1),"promptBuilder"===M.format&&M.data.isLastQuestion&&o(!0))}),[S.length]),0!==S.length)return(0,t.jsxs)(a(),{variant:"outlined",className:"rustic-prompt-builder",children:[(0,t.jsxs)(u(),{open:g,onClose:function(){return h(!1)},"aria-labelledby":"quit-dialog-title","aria-describedby":"quit-dialog-description",sx:{"& .MuiPaper-root":{width:"clamp(320px,50vw,600px)",border:"1px solid ".concat(k.palette.divider)}},children:[(0,t.jsx)(v(),{id:"quit-dialog-title",className:"rustic-align-self-center",children:"Are you sure?"}),(0,t.jsx)(y(),{}),(0,t.jsx)(f(),{children:(0,t.jsx)(b(),{id:"quit-dialog-description",className:"rustic-align-self-center",children:"All progress will be lost."})}),(0,t.jsxs)(m(),{className:"rustic-prompt-builder-dialog-buttons",disableSpacing:!0,children:[(0,t.jsx)(i(),{variant:"outlined",color:"secondary",startIcon:(0,t.jsx)(B,{name:"close"}),onClick:function(){h(!1),e.onCancel()},children:"Quit"}),(0,t.jsx)(i(),{variant:"contained",color:"primary",onClick:function(){return h(!1)},children:"Continue build"})]})]}),e.getProfileComponent?e.getProfileComponent(S[0]):(0,t.jsx)(q(),{color:"text.secondary",children:"Prompt Builder"}),(0,t.jsx)(y(),{className:"rustic-prompt-builder-divider"}),(0,t.jsxs)(w.Box,{className:"rustic-prompt-builder-questions",children:[function(){if(!j&&S.length>0)return S.map((function(r){if(r.sender.id!==e.sender.id&&"promptBuilder"!==r.format)return(0,t.jsx)(P,{ws:Q,sender:e.sender,messages:[r],supportedElements:e.supportedElements},r.id)}))}(),c&&(0,t.jsx)(l(),{color:"secondary",className:"rustic-align-self-center"})]}),(0,t.jsx)(t.Fragment,{children:!j&&(0,t.jsxs)(w.Box,{className:"rustic-prompt-builder-buttons",children:[(0,t.jsxs)(w.Box,{className:"rustic-prompt-builder-buttons-left",children:[(0,t.jsx)(i(),{variant:"outlined",color:"secondary",startIcon:(0,t.jsx)(B,{name:"close"}),onClick:function(){return h(!0)},children:"Quit"}),(0,t.jsx)(i(),{variant:"outlined",color:"secondary",endIcon:(0,t.jsx)(B,{name:"chevron_right"}),onClick:function(){F(),_(null),d(!0)},disabled:!E,"aria-disabled":!E,children:"Next question"})]}),n&&(0,t.jsx)(w.Box,{className:"rustic-prompt-builder-buttons-right",children:(0,t.jsx)(i(),{variant:"contained",color:"primary",onClick:function(){F(),C(!0),d(!0),e.onSubmit()},disabled:c,"aria-disabled":c,children:"Generate"})})]})})]})};return r})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{default:()=>
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var i in r)e.o(r,i)&&!e.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:r[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};e.r(t),e.d(t,{ParticipantRole:()=>f,ParticipantType:()=>b,default:()=>y});const r=require("react/jsx-runtime"),i=require("@mui/material"),n=require("@mui/material/Box");var o=e.n(n);const a=require("@mui/material/Chip");var s=e.n(a);const c=require("@mui/material/Stack");var u=e.n(c);const l=require("@mui/material/Typography");var d=e.n(l);const m=require("react"),p=require("uuid");var f,b;!function(e){e.Owner="owner",e.Member="member"}(f||(f={})),function(e){e.Human="human",e.Agent="agent"}(b||(b={}));const y=function(e){var t=(0,m.useState)(""),n=t[0],a=t[1],c=(0,i.useTheme)(),l=(0,i.useMediaQuery)(c.breakpoints.down("md"))?"column":"row",f=e.options.map((function(t,i){return(0,r.jsx)(s(),{onClick:function(){return function(t){a(t);var r=(new Date).toISOString(),i={id:(0,p.v4)(),timestamp:r,sender:e.sender,conversationId:e.conversationId,format:"text",data:{text:t},inReplyTo:e.messageId};e.ws.send(i)}(t)},color:"secondary",size:"small",sx:n===t?{"&.Mui-disabled":{backgroundColor:"secondary.light",color:"text.primary"}}:{},className:"rustic-option",disabled:!!n,"aria-disabled":!!n,label:t},i)}));return(0,r.jsxs)(o(),{className:"rustic-question",children:[(e.title||e.description)&&(0,r.jsxs)(o(),{className:"rustic-question-text",children:[e.title&&(0,r.jsx)(d(),{variant:"subtitle2",className:"rustic-title",children:e.title}),e.description&&(0,r.jsx)(d(),{variant:"caption",children:e.description})]}),(0,r.jsx)(u(),{direction:l,className:"rustic-options-container",children:f})]})};return t})()));
|
|
@@ -2,4 +2,6 @@ import type { InputType } from 'storybook/internal/types';
|
|
|
2
2
|
export declare const conversationIdDescription: InputType;
|
|
3
3
|
export declare const senderDescription: InputType;
|
|
4
4
|
export declare const wsDescription: InputType;
|
|
5
|
+
export declare const participantDetail: string;
|
|
6
|
+
export declare const getMembersDescription: InputType;
|
|
5
7
|
//# sourceMappingURL=sharedDescription.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sharedDescription.d.ts","sourceRoot":"","sources":["../../src/components/sharedDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEzD,eAAO,MAAM,yBAAyB,EAAE,SAIvC,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,SAmB/B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,SAwB3B,CAAA"}
|
|
1
|
+
{"version":3,"file":"sharedDescription.d.ts","sourceRoot":"","sources":["../../src/components/sharedDescription.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAEzD,eAAO,MAAM,yBAAyB,EAAE,SAIvC,CAAA;AAED,eAAO,MAAM,iBAAiB,EAAE,SAmB/B,CAAA;AAED,eAAO,MAAM,aAAa,EAAE,SAwB3B,CAAA;AAED,eAAO,MAAM,iBAAiB,QAMoC,CAAA;AAElE,eAAO,MAAM,qBAAqB,EAAE,SASnC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?exports["@rustic-ai/ui-components"]=a():e["@rustic-ai/ui-components"]=a()}(global,(()=>(()=>{"use strict";var e={n:a=>{var t=a&&a.__esModule?()=>a.default:()=>a;return e.d(t,{a:t}),t},d:(a,t)=>{for(var r in t)e.o(t,r)&&!e.o(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:t[r]})},o:(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},a={};e.r(a),e.d(a,{default:()=>
|
|
1
|
+
!function(e,a){"object"==typeof exports&&"object"==typeof module?module.exports=a():"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?exports["@rustic-ai/ui-components"]=a():e["@rustic-ai/ui-components"]=a()}(global,(()=>(()=>{"use strict";var e={n:a=>{var t=a&&a.__esModule?()=>a.default:()=>a;return e.d(t,{a:t}),t},d:(a,t)=>{for(var r in t)e.o(t,r)&&!e.o(a,r)&&Object.defineProperty(a,r,{enumerable:!0,get:t[r]})},o:(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},a={};e.r(a),e.d(a,{ParticipantRole:()=>k,ParticipantType:()=>A,default:()=>R});const t=require("react/jsx-runtime"),r=require("@mui/material"),n=require("@mui/material/Stack");var i=e.n(n);const c=require("@mui/material/Table");var o=e.n(c);const s=require("@mui/material/TableBody");var l=e.n(s);const u=require("@mui/material/TableCell");var d=e.n(u);const m=require("@mui/material/TableContainer");var b=e.n(m);const p=require("@mui/material/TableHead");var f=e.n(p);const y=require("@mui/material/TablePagination");var g=e.n(y);const h=require("@mui/material/TableRow");var v=e.n(h);const j=require("@mui/material/TableSortLabel");var x=e.n(j);const O=require("@mui/material/Tooltip");var T=e.n(O);const P=require("@mui/material/Typography");var q=e.n(P);const w=require("react");var S;!function(e){e[e.HOUR=0]="HOUR",e[e.MONTH_DATE=1]="MONTH_DATE"}(S||(S={}));var N,k,A,D=function(){return D=Object.assign||function(e){for(var a,t=1,r=arguments.length;t<r;t++)for(var n in a=arguments[t])Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);return e},D.apply(this,arguments)};function K(e){e.name.replaceAll("_","-");var a={};return e.color&&(a={color:e.color}),(0,t.jsx)("span",{className:"".concat(e.className?e.className+" ":"","material-symbols-rounded"),style:D({},a),children:e.name})}function M(){return(0,t.jsx)(K,{name:"expand_all"})}!function(e){e.Ascending="asc",e.Descending="desc"}(N||(N={})),function(e){e.Owner="owner",e.Member="member"}(k||(k={})),function(e){e.Human="human",e.Agent="agent"}(A||(A={}));const R=function(e){if(0===e.data.length)return(0,t.jsx)(q(),{variant:"body2",children:"No data available"});var a,n,c,s=e.data.length>10,u=(0,w.useState)({}),m=u[0],p=u[1],y=(0,w.useState)(s?10:-1),h=y[0],j=y[1],O=(0,w.useState)(0),P=O[0],S=O[1],k=(0,r.useTheme)(),A=Array.from(new Set(e.data.flatMap((function(e){return Object.keys(e)})))),D=e.headers||A.map((function(e){return{dataKey:e}})),K=(a=e.data,n=Object.keys(m)[0],c=m[n],n&&c?a.slice().sort((function(e,a){var t=Object.keys(m)[0],r=m[t];return e[t]<a[t]?r===N.Descending?1:-1:e[t]>a[t]?r===N.Descending?-1:1:0})):a),R=K.slice(P*h,P*h+h),_=h>0?R:K;function C(e){if(!m[e])return M}return(0,t.jsxs)(i(),{className:"rustic-table",spacing:1,children:[e.title&&(0,t.jsx)(q(),{variant:"h6",className:"rustic-table-title",children:e.title}),e.description&&(0,t.jsx)(q(),{variant:"body1",children:e.description}),(0,t.jsx)(b(),{className:"rustic-table-container",children:(0,t.jsxs)(o(),{"aria-label":e.title||"a table of data",size:"small",stickyHeader:!0,children:[D.length>0&&(0,t.jsx)(f(),{children:(0,t.jsx)(v(),{children:D.map((function(e,a){return(0,t.jsx)(d(),{sortDirection:m[e.dataKey]||!1,children:(0,t.jsx)(T(),{title:(n=e.dataKey,i=m[n],i?Object.keys(N)[Object.values(N).indexOf(i)]:"Sort"),children:(0,t.jsx)(x(),{active:!0,direction:m[e.dataKey],onClick:function(){return function(e){p((function(a){var t,r,n={};switch(a[e]){case N.Ascending:(t={})[e]=N.Descending,n=t;break;case N.Descending:n={};break;default:(r={})[e]=N.Ascending,n=r}return n}))}(e.dataKey)},className:"rustic-table-header",IconComponent:C(e.dataKey),children:e.label||(r=e.dataKey,r.charAt(0).toUpperCase()+r.slice(1))})})},"header-".concat(a));var r,n,i}))})}),(0,t.jsx)(l(),{children:_.map((function(e,a){return(0,t.jsx)(v(),{children:D.map((function(r,n){return(0,t.jsx)(d(),{children:e[r.dataKey]},"cell-".concat(a,"-").concat(n))}))},"row-".concat(a))}))})]})}),s&&(0,t.jsx)(g(),{className:"rustic-table-pagination",component:"div",count:e.data.length,rowsPerPage:h,labelRowsPerPage:"Rows:",page:P,onPageChange:function(e,a){return S(a)},onRowsPerPageChange:function(e){j(+e.target.value),S(0)},sx:{"& .MuiTablePagination-selectLabel":{color:k.palette.text.disabled}},classes:{toolbar:"rustic-table-toolbar",input:"rustic-table-input",spacer:"rustic-table-spacer",displayedRows:"rustic-table-displayed-rows",actions:"rustic-table-actions"}})]})};return a})()));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={1737:(e,t,r)=>{r.d(t,{A:()=>p});var
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@rustic-ai/ui-components"]=t():e["@rustic-ai/ui-components"]=t()}(global,(()=>(()=>{"use strict";var e={1737:(e,t,r)=>{r.d(t,{A:()=>p});var n=r(8732),o=r(5642),a=r.n(o),i=r(785),u=r.n(i),s=r(7447),d=r.n(s),c=r(2015);const p=function(e){var t=(0,c.useState)(d().sanitize(e.text)),r=t[0],o=t[1],i=(0,c.useState)(""),s=i[0],p=i[1];return(0,c.useEffect)((function(){if(e.updatedData&&e.updatedData.length>0){for(var t=e.text,r=0,n=e.updatedData;r<n.length;r++){var a=n[r];"string"!=typeof a.text&&(t+=" [MISSING TEXT]",p("Some of the incoming text was not correctly formatted. Some data may be missing.")),t+=a.text}o(d().sanitize(t))}}),[e.text,e.updatedData]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(u(),{variant:"body2",children:r}),s&&(0,n.jsx)(a(),{severity:"error",children:s})]})}},7131:(e,t,r)=>{r.d(t,{A:()=>s});var n=r(8732),o=r(785),a=r.n(o),i=r(7447),u=r.n(i);r(2015);const s=function(e){return(0,n.jsx)(a(),{variant:"body2",className:"rustic-text",children:u().sanitize(e.text)})}},7159:(e,t,r)=>{var n,o;r.d(t,{s:()=>n,y:()=>o}),function(e){e.Owner="owner",e.Member="member"}(n||(n={})),function(e){e.Human="human",e.Agent="agent"}(o||(o={}))},5642:e=>{e.exports=require("@mui/material/Alert")},785:e=>{e.exports=require("@mui/material/Typography")},7447:e=>{e.exports=require("dompurify")},2015:e=>{e.exports=require("react")},8732:e=>{e.exports=require("react/jsx-runtime")}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};r.r(n),r.d(n,{ParticipantRole:()=>i.s,ParticipantType:()=>i.y,StreamingText:()=>o.A,Text:()=>a.A,default:()=>u});var o=r(1737),a=r(7131),i=r(7159);const u=a.A;return n})()));
|
|
@@ -118,6 +118,7 @@ export type TableConfig = {
|
|
|
118
118
|
};
|
|
119
119
|
sort?: TableSort[];
|
|
120
120
|
filter?: TableFilter[];
|
|
121
|
+
expansionDepth?: number;
|
|
121
122
|
};
|
|
122
123
|
export interface TableFormat extends VisualizationFormat {
|
|
123
124
|
/** Data to be displayed in the table. */
|
|
@@ -169,6 +170,21 @@ export interface MultipartProps extends MultipartData {
|
|
|
169
170
|
/** Setting this to true will display long file names in full. If set to false, long names will be shortened. */
|
|
170
171
|
showFullName?: boolean;
|
|
171
172
|
}
|
|
173
|
+
export declare enum ParticipantRole {
|
|
174
|
+
Owner = "owner",
|
|
175
|
+
Member = "member"
|
|
176
|
+
}
|
|
177
|
+
export declare enum ParticipantType {
|
|
178
|
+
Human = "human",
|
|
179
|
+
Agent = "agent"
|
|
180
|
+
}
|
|
181
|
+
export interface Participant {
|
|
182
|
+
id: string;
|
|
183
|
+
displayName: string;
|
|
184
|
+
participantType: ParticipantType;
|
|
185
|
+
participantRole?: ParticipantRole;
|
|
186
|
+
icon?: string;
|
|
187
|
+
}
|
|
172
188
|
export interface BaseInputProps {
|
|
173
189
|
/** Current user. */
|
|
174
190
|
sender: Sender;
|
|
@@ -194,6 +210,8 @@ export interface BaseInputProps {
|
|
|
194
210
|
maximumEmojiSearchResults?: number;
|
|
195
211
|
/** URL to fetch the emoji data from. You need to host the emoji data by yourself. If not provided, the default url will be used. */
|
|
196
212
|
emojiDataSource?: string;
|
|
213
|
+
/** Function to fetch the list of members. Should return a promise that resolves to an array of members. */
|
|
214
|
+
getMembers?: () => Promise<Participant[]>;
|
|
197
215
|
}
|
|
198
216
|
export interface TextInputProps extends Omit<BaseInputProps, 'send' | 'isSendEnabled'> {
|
|
199
217
|
/** WebSocket connection to send and receive messages to and from a backend.*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAGpE,MAAM,MAAM,WAAW,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,CAAA;AAEhD,uEAAuE;AACvE,MAAM,WAAW,MAAM;IACrB,sBAAsB;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,sCAAsC;IACtC,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,MAAM,C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