@rustic-ai/ui-components 0.1.0 → 0.1.2
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.js +1 -1
- package/dist/components/input/baseInput/baseInput.d.ts.map +1 -1
- package/dist/components/input/multimodal/multimodalInput/index.css +5 -1
- package/dist/components/input/multimodal/multimodalInput/index.js +1 -1
- package/dist/components/input/multimodal/uploader/index.js +1 -1
- package/dist/components/input/textInput/index.css +1 -1
- 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.js +1 -1
- package/dist/components/multipart/multipart/index.js +1 -1
- package/dist/components/participantsContainer/index.js +1 -1
- package/dist/components/pdfViewer/index.js +1 -1
- package/dist/components/promptBuilder/index.js +1 -1
- package/dist/components/question/index.js +1 -1
- package/dist/components/question/question.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 +8 -0
- package/dist/components/types.d.ts.map +1 -1
- package/dist/components/visualization/perspectiveViz/index.js +1 -1
- package/dist/components/weather/index.js +1 -1
- package/dist/index.css +5 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
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,{MessageProcessStatus:()=>B,ParticipantRole:()=>L,ParticipantType:()=>E,default:()=>U});const t=require("react/jsx-runtime"),n=require("@mui/material/Box");var a=e.n(n);const i=require("@mui/material/Card");var o=e.n(i);const c=require("@mui/material/Stack");var s=e.n(c);const u=require("@mui/material/Typography");var l=e.n(u);const d=require("react");var m;function p(e){var r=["Sun","Mon","Tues","Wed","Thurs","Fri","Sat"][new Date(1e3*e).getDay()];return{shortName:r,fullName:{Sun:"Sunday",Mon:"Monday",Tues:"Tuesday",Wed:"Wednesday",Thurs:"Thursday",Fri:"Friday",Sat:"Saturday"}[r]}}!function(e){e[e.HOUR=0]="HOUR",e[e.MONTH_DATE=1]="MONTH_DATE"}(m||(m={}));var h=function(){return h=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},h.apply(this,arguments)};function x(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:h({},r),children:e.name})}const v=require("dompurify");var f=e.n(v);const b=require("marked");function y(e){var r=e.replace(/^[\u200B-\u200F\uFEFF]/,""),t=b.marked.parse(r,{async:!1});return f().sanitize(t)}const j=function(e){var r=(0,d.useState)(y(e.text)),n=r[0],a=r[1];return(0,d.useEffect)((function(){if(e.updatedData&&e.updatedData.length>0){var r=e.updatedData[e.updatedData.length-1].text;a(y(r))}}),[e.text,e.updatedData]),(0,t.jsx)(l(),{variant:"body1",className:"rustic-markdown",dangerouslySetInnerHTML:{__html:n}})},g=require("@mui/material"),w=require("@mui/material/Button");var N=e.n(w);const T=require("@mui/material/Drawer");var S=e.n(T);const D=require("@mui/material/IconButton");var q=e.n(D);const M=require("@mui/material/ListItemText");var O=e.n(M);const I=require("@mui/material/Menu");var F=e.n(I);const k=require("@mui/material/MenuItem");var C=e.n(k);const P=require("@mui/material/styles"),R=require("@mui/material/Tooltip");var _=e.n(R);const H=require("@mui/system");var B,L,E,A=function(){return A=Object.assign||function(e){for(var r,t=1,n=arguments.length;t<n;t++)for(var a in r=arguments[t])Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a]);return e},A.apply(this,arguments)};function W(e){var r=(0,d.useState)(!1),n=r[0],a=r[1],i=(0,d.useRef)(null),o=(0,P.useTheme)(),c=(0,g.useMediaQuery)(o.breakpoints.down("md")),s=c?S():F(),u={borderRadius:"".concat(o.shape.borderRadius,"px"),border:"1px solid ".concat(o.palette.divider)};function m(e){return(0,t.jsxs)(t.Fragment,{children:[e.startDecorator&&(0,t.jsx)(H.Box,{sx:{color:"primary.main"},className:"rustic-popover-menu-item-icon rustic-popover-menu-item-start-icon",children:e.startDecorator}),(0,t.jsx)(O(),{children:(0,t.jsx)(l(),{variant:"body2",children:e.label})}),e.endDecorator&&(0,t.jsx)(H.Box,{sx:{color:"secondary.main"},className:"rustic-popover-menu-item-icon rustic-popover-menu-item-end-icon",children:e.endDecorator})]})}c&&(u=A(A({},u),{borderRadius:"".concat(o.shape.borderRadius,"px ").concat(o.shape.borderRadius,"px 0 0"),borderBottom:0}));var p=e.menuItems.map((function(e){return e.href?(0,t.jsx)(C(),{component:"a",onClick:function(){return a(!1)},href:e.href,download:e.downloadFileName||e.isFiledownload,children:m(e)},e.label):(0,t.jsx)(C(),{onClick:function(r){e.onClick&&e.onClick(r),a(!1)},disabled:!e.onClick,children:m(e)},e.label)}));var h,v,f=c?{}:{anchorEl:i.current};return(0,t.jsxs)(t.Fragment,{children:[(h={onClick:function(e){e.stopPropagation(),a(!0)},"aria-label":e.ariaLabel,ref:i,className:"rustic-popover-menu-button"},v=(0,t.jsx)(x,{name:"more_vert"}),e.buttonText?(0,t.jsx)(N(),A({},h,{startIcon:e.icon?e.icon:null,children:e.buttonText})):(0,t.jsx)(_(),{title:e.ariaLabel,children:(0,t.jsx)(q(),A({},h,{children:e.icon?e.icon:v}))})),(0,t.jsx)(s,A({open:n,onClose:function(){return a(!1)}},f,{anchor:"bottom",className:"rustic-popover-menu",sx:{"& .MuiPaper-root":A(A({},u),{backgroundImage:"none",boxShadow:o.shadows[2]})},children:p}))]})}!function(e){e.Running="running",e.Completed="completed",e.Error="error"}(B||(B={})),function(e){e.Owner="owner",e.Member="member"}(L||(L={})),function(e){e.Human="human",e.Agent="agent"}(E||(E={}));const U=function(e){var r=(0,d.useState)(e.units),n=r[0],i=r[1];function c(r){return"metric"===e.units&&"imperial"===n?Math.round(1.8*r+32):"imperial"===e.units&&"metric"===n?Math.round(r*(5/9)-32):Math.round(r)}var u=new Date(1e3*e.weather[0].timestamp),m=p(e.weather[0].timestamp).shortName,h=u.getDate(),v=u.getFullYear().toString().slice(2),f="".concat(m," ").concat(h,"/").concat(v," TODAY"),b="HIGH: ".concat(c(e.weather[0].temp.high)," / LOW: ").concat(c(e.weather[0].temp.high)),y=e.weather.map((function(e,r){if(0!==r)return(0,t.jsxs)(o(),{variant:"outlined",className:"rustic-daily-weather-card",children:[(0,t.jsx)(l(),{variant:"h5",component:"span",color:"text.secondary","aria-label":p(e.timestamp).fullName,children:p(e.timestamp).shortName}),(0,t.jsx)("img",{src:e.weatherIcon.icon,alt:e.weatherIcon.description}),(0,t.jsxs)(l(),{variant:"body2",color:"text.secondary",children:["High: ",c(e.temp.high),"°"]}),(0,t.jsxs)(l(),{variant:"body2",color:"text.secondary",children:["Low: ",c(e.temp.low),"°"]})]},r)}));return(0,t.jsxs)(o(),{variant:"outlined",className:"rustic-weather",children:[e.title&&(0,t.jsx)(l(),{variant:"h6",children:e.title}),e.description&&(0,t.jsx)(j,{text:e.description}),(0,t.jsx)(W,{ariaLabel:"Temperature units",menuItems:[{label:"Celsius",endDecorator:"°C",onClick:function(){return i("metric")}},{label:"Fahrenheit",endDecorator:"°F",onClick:function(){return i("imperial")}}]}),(0,t.jsxs)(s(),{alignItems:"center",children:[(0,t.jsx)(l(),{variant:"h4",component:"span",children:e.location}),(0,t.jsxs)(s(),{direction:"row",alignItems:"center",spacing:1,className:"rustic-current-weather-description",children:[(0,t.jsx)("img",{src:e.weather[0].weatherIcon.icon,alt:""}),(0,t.jsx)(l(),{variant:"body2",children:e.weather[0].weatherIcon.description})]}),e.weather[0].temp.current&&(0,t.jsxs)(l(),{variant:"h1",component:"span",className:"rustic-current-temp",children:[c(e.weather[0].temp.current),"°",function(e){switch(e){case"imperial":return"F";case"metric":return"C"}}(n)]}),(0,t.jsxs)(s(),{direction:"row",spacing:2,children:[(0,t.jsx)(l(),{variant:"overline",children:f}),(0,t.jsx)(l(),{variant:"overline",children:b})]})]}),(0,t.jsx)(a(),{className:"rustic-daily-weather-container",children:y}),e.weatherProvider&&(0,t.jsxs)(s(),{alignItems:"center",direction:"row",spacing:1,alignSelf:"center",className:"rustic-weather-attribution",children:[(0,t.jsx)(x,{name:"cloud"}),(0,t.jsx)(l(),{variant:"body2",children:"Weather data provided by ".concat(e.weatherProvider)})]})]})};return r})()));
|
package/dist/index.css
CHANGED
|
@@ -128,6 +128,10 @@ code {
|
|
|
128
128
|
gap: 0;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
.rustic-multimodal-input .rustic-send-button {
|
|
132
|
+
margin: 10px 12px;
|
|
133
|
+
}
|
|
134
|
+
|
|
131
135
|
.rustic-multimodal-input .rustic-input-actions {
|
|
132
136
|
width: 100%;
|
|
133
137
|
position: relative;
|
|
@@ -189,7 +193,7 @@ code {
|
|
|
189
193
|
}
|
|
190
194
|
|
|
191
195
|
.rustic-base-input .rustic-send-button {
|
|
192
|
-
margin:
|
|
196
|
+
margin: 13px 12px 12px;
|
|
193
197
|
}
|
|
194
198
|
|
|
195
199
|
.rustic-base-input .rustic-input-actions {
|