@upstep/js 0.10.0 → 0.11.0

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/react.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),V=require("./api-j3GMTEE7.js"),x=require("./theme.cjs"),_='-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif';function L(o,t){return x.withAlpha(o,t)??`color-mix(in srgb, ${o} ${Math.round(t*100)}%, transparent)`}function B(){if(typeof document>"u")return!1;const o=document.documentElement;return o.classList.contains("dark")||o.getAttribute("data-theme")==="dark"}function q(o,t){const[n,u]=s.useState(()=>o==="dark");s.useEffect(()=>{if(o!=="auto"){u(o==="dark");return}if(u(B()),typeof MutationObserver>"u")return;const d=new MutationObserver(()=>u(B()));return d.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}),()=>d.disconnect()},[o]);const{accentColor:c,colors:m,radius:r}=t;return s.useMemo(()=>x.buildWidgetPalette({mode:n?"dark":"light",accentColor:c,colors:m,radius:r}),[n,c,JSON.stringify(m??null),r])}const M=s.createContext(null);function Y({children:o,...t}){const[n]=s.useState(()=>new V.UpstepApiClient(t)),[u,c]=s.useState([]),[m,r]=s.useState(!1),[d,a]=s.useState(!0);s.useEffect(()=>{n.setUserId(t.userId)},[n,t.userId]),s.useEffect(()=>{n.supportIdentityToken=t.supportIdentityToken,document.querySelectorAll("iframe[data-upstep-support]").forEach(l=>{var p;return(p=l.contentWindow)==null?void 0:p.postMessage({type:"upstep:support:identity",token:t.supportIdentityToken},new URL(n.baseUrl).origin)})},[n,t.supportIdentityToken]);const i=s.useCallback(async()=>{try{const l=await n.listFeedback({sort:"votes",limit:20});c(l.items),a(l.showBranding??!0)}catch{}},[n]);s.useEffect(()=>{i()},[i]);const g=s.useCallback(async(l,p,y)=>{const j={content:p};l.trim()&&(j.title=l.trim()),y!==void 0&&(j.type=y),await n.submitFeedback(j),await i()},[n,i]),S=s.useCallback(async(l,p)=>{try{await n.vote(l,p),await i()}catch{}},[n,i]),f=s.useCallback(l=>n.getItem(l),[n]),k=s.useCallback(()=>r(!0),[]),w=s.useCallback(()=>r(!1),[]),C=s.useCallback(l=>n.setUserId(l),[n]);return e.jsx(M.Provider,{value:{client:n,feedItems:u,loadFeed:i,submit:g,vote:S,getItem:f,isOpen:m,open:k,close:w,identify:C,accentColor:t.accentColor??x.DEFAULT_ACCENT,customAccentColor:t.accentColor,theme:t.theme??"auto",colors:t.colors,radius:t.radius,fontFamily:t.fontFamily,showBranding:d,chat:t.chat!==!1},children:o})}function F(){const o=s.useContext(M);if(!o)throw new Error("useUpstep must be used inside <UpstepProvider>");return o}function J({position:o="bottom-right",accentColor:t,theme:n,colors:u,radius:c,fontFamily:m,hideLauncher:r=!1,chat:d=!0}){var W;const a=F(),i=q(n??a.theme,{accentColor:t??a.customAccentColor,colors:u??a.colors,radius:c??a.radius}),g=i.accent,S={colors:u??a.colors,radius:c??a.radius,fontFamily:m??a.fontFamily},{isOpen:f,open:k,close:w,showBranding:C}=a,[l,p]=s.useState("list"),[y,j]=s.useState(!1);s.useEffect(()=>{let h=!0;if(a.client.chat=a.chat,!a.chat||!d){j(!1);return}return a.client.supportEnabled().then(v=>{h&&j(v)}),()=>{h=!1}},[a.client,a.chat,d]),s.useEffect(()=>{(!a.chat||!d)&&l==="support"&&p("list")},[a.chat,d,l]),s.useEffect(()=>{f&&p(y&&d&&a.chat?"support":"list")},[f,y,d,a.chat]);const[b,z]=s.useState(null),[E,I]=s.useState(!1);s.useEffect(()=>{const h=window.matchMedia("(max-width: 639px)");I(h.matches);const v=O=>I(O.matches);return h.addEventListener("change",v),()=>h.removeEventListener("change",v)},[]);const $={position:"fixed",bottom:24,right:24},R=((W=S.fontFamily)==null?void 0:W.trim())||_;function T(){w(),z(null)}function G(h){z(h),p("detail")}return e.jsxs(e.Fragment,{children:[!r&&e.jsxs("button",{"aria-label":"Open help and feedback",onClick:k,style:{...$,zIndex:9998,display:"inline-flex",alignItems:"center",gap:7,background:g,color:i.accentText,border:"none",borderRadius:x.scaleRadius(9999,i.radius),padding:E?"12px":"12px 18px",fontSize:14,fontWeight:600,cursor:"pointer",fontFamily:R,boxShadow:"0 6px 20px rgba(26,25,21,.18)"},children:[e.jsx(re,{size:16}),!E&&(y&&d&&a.chat?"Help & feedback":"Feedback")]}),f&&e.jsx("div",{onClick:h=>h.target===h.currentTarget&&T(),style:{position:"fixed",inset:0,background:"transparent",zIndex:9999,display:"flex",alignItems:"flex-end",justifyContent:"flex-end",padding:E?"0 12px 80px":"0 24px 88px",fontFamily:R},children:e.jsxs("div",{style:{background:i.bg,border:`1px solid ${i.border}`,borderRadius:x.scaleRadius(20,i.radius),width:"100%",maxWidth:y&&d&&a.chat?460:440,maxHeight:"calc(100dvh - 112px)",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"0 24px 64px rgba(0,0,0,.28)"},children:[y&&d&&a.chat?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"10px 14px",borderBottom:`1px solid ${i.border}`,flexShrink:0},children:[e.jsx("div",{style:{display:"flex",flex:1,gap:4},children:[["support","Support"],["list","Ideas"]].map(([h,v])=>e.jsx("button",{onClick:()=>p(h),style:{flex:1,border:0,borderRadius:x.scaleRadius(8,i.radius),padding:"9px 12px",background:(l==="support"?h==="support":h==="list")?i.bgSoft:"transparent",color:(l==="support"?h==="support":h==="list")?i.text:i.textSoft,fontSize:14,fontWeight:600,cursor:"pointer"},children:v},h))}),e.jsx("button",{"aria-label":"Close",onClick:T,style:{border:0,background:"transparent",color:i.textSoft,padding:6,cursor:"pointer",fontSize:14},children:"✕"})]}):e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:`1px solid ${i.border}`,flexShrink:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[l!=="list"&&e.jsx("button",{onClick:()=>p("list"),style:{background:"none",border:"none",cursor:"pointer",color:g,fontSize:14,fontWeight:600,padding:0},children:"← Back"}),l==="list"&&e.jsx("span",{style:{fontWeight:700,fontSize:16,color:i.text,letterSpacing:"-.01em"},children:"Feedback"}),l==="create"&&e.jsx("span",{style:{fontWeight:700,fontSize:16,color:i.text,letterSpacing:"-.01em"},children:"New feedback"})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[l==="list"&&e.jsx("button",{onClick:()=>p("create"),style:{background:g,color:i.accentText,border:"none",borderRadius:x.scaleRadius(20,i.radius),padding:"6px 14px",fontSize:14,fontWeight:700,cursor:"pointer"},children:"+ New"}),e.jsx("button",{onClick:T,style:{background:i.bgSoft,border:"none",width:28,height:28,borderRadius:x.scaleRadius(8,i.radius),fontSize:14,cursor:"pointer",color:i.textSoft,display:"flex",alignItems:"center",justifyContent:"center"},children:"✕"})]})]}),e.jsxs("div",{style:{flex:1,overflowY:"auto",padding:l==="support"?0:"16px 20px 24px"},children:[l==="support"&&d&&a.chat&&e.jsx(K,{client:a.client,accentColor:g,theme:i.dark?"dark":"light",appearance:S}),y&&d&&a.chat&&l!=="support"&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:l==="list"?e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{fontSize:14,fontWeight:600,color:i.text},children:"Ideas"}),e.jsx("button",{onClick:()=>p("create"),style:{border:0,borderRadius:x.scaleRadius(8,i.radius),background:g,color:i.accentText,fontSize:14,padding:"7px 10px",cursor:"pointer"},children:"+ Suggest an idea"})]}):e.jsx("button",{onClick:()=>p("list"),style:{border:0,background:"none",padding:0,color:i.textSoft,fontSize:14,cursor:"pointer"},children:"← Back to ideas"})}),l==="list"&&e.jsx(Q,{onSelect:G,accent:g,p:i}),l==="detail"&&b&&e.jsx(X,{feedbackId:b,accent:g,p:i,font:R}),l==="create"&&e.jsx(ee,{accent:g,p:i,font:R,ideasOnly:!!(y&&d&&a.chat),onDone:()=>p("list")})]}),C&&l!=="support"&&e.jsxs("a",{href:"https://upstep.dev",target:"_blank",rel:"noopener noreferrer",style:{display:"block",textAlign:"center",padding:"8px 0",borderTop:`1px solid ${i.border}`,fontSize:11,color:i.textFaint,textDecoration:"none",flexShrink:0},children:["Powered by"," ",e.jsx("strong",{style:{fontWeight:700},children:"Upstep.dev"})]})]})})]})}function K({client:o,theme:t,accentColor:n,appearance:u}){const c=s.useRef(null);return s.useEffect(()=>{if(c.current)return o.connectSupportFrame(c.current)},[o]),e.jsx("iframe",{ref:c,"data-upstep-support":!0,title:"Customer support",src:o.supportFrameUrl(t,n,u),style:{color:n,width:"100%",height:"min(560px, calc(100dvh - 168px))",minHeight:300,border:0,display:"block"}})}function Q({onSelect:o,accent:t,p:n}){const{feedItems:u,vote:c}=F(),m=u.filter(r=>r.status!=="CLOSED");return m.length?e.jsx(e.Fragment,{children:m.map(r=>{const d=r.userVote==="UP",a=r.title??r.content;return e.jsxs("div",{onClick:()=>o(r.id),style:{display:"flex",gap:12,padding:14,border:`1px solid ${n.border}`,borderRadius:x.scaleRadius(14,n.radius),marginBottom:10,background:n.bg,cursor:"pointer"},children:[e.jsxs("button",{onClick:i=>{i.stopPropagation(),c(r.id,"UP")},style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,minWidth:46,padding:"7px 0",borderRadius:x.scaleRadius(11,n.radius),cursor:"pointer",flexShrink:0,border:`1px solid ${d?t:n.border}`,background:d?n.accentTint:n.bgSoft},children:[e.jsx(N,{color:t}),e.jsx("span",{style:{fontSize:14,fontWeight:700,color:n.text,lineHeight:1.1},children:r.upvotes})]}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("p",{style:{fontSize:14,fontWeight:600,lineHeight:1.4,color:n.text,margin:"0 0 6px",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:a}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[e.jsx(A,{type:r.type,p:n}),r.status==="PENDING"?e.jsx(P,{}):e.jsx(D,{status:r.status,boardStatus:r.boardStatus,p:n}),e.jsx("span",{style:{fontSize:11,color:n.textFaint},children:H(r.createdAt)})]})]}),e.jsx("span",{style:{color:n.textFaint,fontSize:18,alignSelf:"center",flexShrink:0},children:"›"})]},r.id)})}):e.jsxs("div",{style:{textAlign:"center",padding:"40px 0"},children:[e.jsx("div",{style:{color:n.textSoft,fontSize:15,fontWeight:600,marginBottom:4},children:"No open feedback yet"}),e.jsx("div",{style:{color:n.textFaint,fontSize:14},children:"Be the first to share one."})]})}function X({feedbackId:o,accent:t,p:n,font:u}){const{vote:c,getItem:m}=F(),[r,d]=s.useState(null),[a,i]=s.useState(!1);s.useEffect(()=>{let f=!1;return m(o).then(k=>{f||d(k)}).catch(()=>{}),()=>{f=!0}},[o,m]);async function g(){if(!(!r||a)){i(!0);try{await c(r.id,"UP");const f=await m(o);d(f)}catch{}finally{i(!1)}}}if(!r)return e.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:n.textFaint,fontSize:14},children:"Loading…"});const S=r.title;return e.jsxs("div",{children:[S&&e.jsx("div",{style:{fontSize:20,fontWeight:700,color:n.text,letterSpacing:"-.02em",marginBottom:10,lineHeight:1.3},children:S}),e.jsxs("div",{style:{display:"flex",gap:6,marginBottom:14,flexWrap:"wrap"},children:[e.jsx(A,{type:r.type,p:n}),r.status==="PENDING"?e.jsx(P,{}):e.jsx(D,{status:r.status,boardStatus:r.boardStatus,p:n})]}),e.jsx("p",{style:{fontSize:15,lineHeight:1.6,color:n.textSoft,marginBottom:20},children:r.content}),e.jsxs("button",{onClick:g,disabled:a,style:{display:"inline-flex",alignItems:"center",gap:8,border:`1px solid ${r.userVote==="UP"?t:n.border}`,background:r.userVote==="UP"?L(t,.08):n.bgSoft,borderRadius:x.scaleRadius(12,n.radius),padding:"10px 16px",cursor:"pointer",fontFamily:u},children:[e.jsx(N,{color:t,size:13}),e.jsx("span",{style:{fontSize:18,fontWeight:700,color:n.text},children:r.upvotes}),e.jsx("span",{style:{fontSize:14,color:n.textFaint},children:r.userVote==="UP"?"Upvoted":"Upvote"})]}),r.comments.length>0&&e.jsxs("div",{style:{marginTop:28,borderTop:`1px solid ${n.border}`,paddingTop:20},children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:n.textFaint,marginBottom:12,textTransform:"uppercase"},children:"Comments"}),r.comments.map(f=>e.jsx(Z,{comment:f,p:n,accent:t},f.id))]})]})}function Z({comment:o,p:t,accent:n}){var u;return e.jsxs("div",{style:{background:t.bgSoft,border:`1px solid ${t.border}`,borderRadius:x.scaleRadius(12,t.radius),padding:14,marginBottom:10},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[e.jsx("span",{style:{background:L(n,.125),color:n,fontSize:11,fontWeight:700,borderRadius:x.scaleRadius(20,t.radius),padding:"2px 8px"},children:((u=o.authorName)==null?void 0:u.trim())||"UpStep Team"}),e.jsx("span",{style:{fontSize:11,color:t.textFaint},children:H(o.createdAt)})]}),e.jsx("p",{style:{fontSize:16,lineHeight:1.6,color:t.textSoft,margin:0},children:o.content})]})}function ee({accent:o,p:t,font:n,onDone:u,ideasOnly:c=!1}){const{submit:m}=F(),[r,d]=s.useState(""),[a,i]=s.useState(""),[g,S]=s.useState(c?"FEATURE":"GENERAL"),[f,k]=s.useState(!1),[w,C]=s.useState(!1),[l,p]=s.useState("");async function y(){if(!(!r.trim()||f)){k(!0),p("");try{await m(r.trim(),a.trim()||r.trim(),g),C(!0),setTimeout(u,1200)}catch{p("Something went wrong. Please try again.")}finally{k(!1)}}}if(w)return e.jsxs("div",{style:{textAlign:"center",paddingTop:40},children:[e.jsx("div",{style:{fontSize:18,fontWeight:700,color:t.text,marginBottom:6},children:"Submitted"}),e.jsx("div",{style:{fontSize:14,color:t.textFaint},children:c?"Idea received. Thank you.":"Feedback received. Thank you."})]});const j={width:"100%",border:`1px solid ${t.border}`,borderRadius:x.scaleRadius(12,t.radius),padding:"10px 12px",fontSize:16,lineHeight:1.6,outline:"none",background:t.bgSoft,color:t.text,fontFamily:n,boxSizing:"border-box"};return e.jsxs("div",{children:[!c&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:t.textFaint,marginBottom:8,textTransform:"uppercase"},children:"Type"}),e.jsx("div",{style:{display:"flex",gap:7,marginBottom:16},children:["BUG","FEATURE","GENERAL"].map(b=>e.jsxs("button",{onClick:()=>S(b),style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",gap:5,padding:"8px 10px",borderRadius:x.scaleRadius(9,t.radius),fontSize:14,fontWeight:600,cursor:"pointer",background:g===b?o:t.bg,color:g===b?t.accentText:t.textSoft,border:`1px solid ${g===b?o:t.border}`,fontFamily:n},children:[U[b].icon,U[b].label]},b))})]}),e.jsx("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:t.textFaint,marginBottom:8,textTransform:"uppercase"},children:"Title"}),e.jsx("input",{value:r,onChange:b=>d(b.target.value),placeholder:c?"What would you like us to build?":"Short summary of the issue or idea",maxLength:200,style:{...j,marginBottom:16,display:"block"}}),e.jsxs("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:t.textFaint,marginBottom:8,textTransform:"uppercase"},children:["Description"," ",e.jsx("span",{style:{fontWeight:400,textTransform:"none",letterSpacing:0},children:"(optional)"})]}),e.jsx("textarea",{value:a,onChange:b=>i(b.target.value),placeholder:c?"Why would it help? (optional)":"Steps to reproduce, expected behaviour, or more context",maxLength:2e3,rows:4,style:{...j,resize:"vertical",marginBottom:16}}),l&&e.jsx("p",{style:{fontSize:14,color:"#d6453d",marginBottom:12},children:l}),e.jsx("button",{onClick:y,disabled:f||!r.trim(),style:{width:"100%",padding:12,background:o,color:t.accentText,border:"none",borderRadius:x.scaleRadius(11,t.radius),fontSize:14,fontWeight:600,cursor:"pointer",opacity:f||!r.trim()?.5:1,fontFamily:n},children:f?"Submitting…":c?"Suggest idea":"Submit feedback"})]})}const U={BUG:{label:"Bug",icon:e.jsxs("svg",{width:12,height:12,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("ellipse",{cx:"8",cy:"10",rx:"3.5",ry:"4.5"}),e.jsx("path",{d:"M8 5.5V4M5.5 6.5 3.5 5M10.5 6.5 12.5 5M4.5 10.5 2.5 10M11.5 10.5 13.5 10"})]})},FEATURE:{label:"Feature",icon:e.jsxs("svg",{width:12,height:12,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M8 2v1.5M8 12.5V14M2 8h1.5M12.5 8H14M4.1 4.1l1 1M10.9 10.9l1 1M11.9 4.1l-1 1M5.1 10.9l-1 1"}),e.jsx("circle",{cx:"8",cy:"8",r:"2.5"})]})},GENERAL:{label:"General",icon:e.jsx("svg",{width:12,height:12,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M14 9a2 2 0 0 1-2 2H5L2 14V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v5z"})})}},te={BUG:"#fdecec",FEATURE:"#e9f0fd"},ne={BUG:"#d6453d",FEATURE:"#3b76d6"};function A({type:o,p:t}){return e.jsx("span",{style:{padding:"2px 8px",borderRadius:x.scaleRadius(9999,t.radius),fontSize:10.5,fontWeight:700,letterSpacing:".02em",background:te[o]??t.bgSoft,color:ne[o]??t.textSoft},children:o})}const oe={OPEN:"#b45309",IN_PROGRESS:"#1d4ed8",DONE:"#15803d",CLOSED:"#6b7280"};function P(){return e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,background:"#fff7ed",border:"1px solid #fed7aa",borderRadius:6,padding:"1px 6px",fontSize:10,fontWeight:700,color:"#ea580c"},children:[e.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:"#ea580c",display:"inline-block"}}),"Pending review"]})}function D({status:o,boardStatus:t,p:n}){const u=(t==null?void 0:t.color)??oe[o]??"#9ca3af";return e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,background:n.bgSoft,border:`1px solid ${n.border}`,borderRadius:x.scaleRadius(6,n.radius),padding:"2px 8px",fontSize:10,fontWeight:600,color:n.textSoft},children:[e.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:u,display:"inline-block",flexShrink:0}}),(t==null?void 0:t.name)??o.replace("_"," ")]})}function re({size:o=16,color:t="currentColor"}){return e.jsx("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function N({color:o="currentColor",size:t=11}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"none",stroke:o,strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M8 13V3M3 8l5-5 5 5"})})}function H(o){return new Date(o).toLocaleDateString(void 0,{month:"short",day:"numeric"})}exports.FeedbackWidget=J;exports.UpstepProvider=Y;exports.useUpstep=F;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),a=require("react"),Y=require("./api-j3GMTEE7.js"),x=require("./theme.cjs"),J='-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif';function P(o,t){return x.withAlpha(o,t)??`color-mix(in srgb, ${o} ${Math.round(t*100)}%, transparent)`}function M(){if(typeof document>"u")return!1;const o=document.documentElement;return o.classList.contains("dark")||o.getAttribute("data-theme")==="dark"}function K(o,t){const[n,u]=a.useState(()=>o==="dark");a.useEffect(()=>{if(o!=="auto"){u(o==="dark");return}if(u(M()),typeof MutationObserver>"u")return;const l=new MutationObserver(()=>u(M()));return l.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"]}),()=>l.disconnect()},[o]);const{accentColor:c,colors:m,radius:r}=t;return a.useMemo(()=>x.buildWidgetPalette({mode:n?"dark":"light",accentColor:c,colors:m,radius:r}),[n,c,JSON.stringify(m??null),r])}const D=a.createContext(null);function Q({children:o,...t}){const[n]=a.useState(()=>new Y.UpstepApiClient(t)),[u,c]=a.useState([]),[m,r]=a.useState(!1),[l,S]=a.useState(!0);a.useEffect(()=>{n.setUserId(t.userId)},[n,t.userId]),a.useEffect(()=>{n.supportIdentityToken=t.supportIdentityToken,document.querySelectorAll("iframe[data-upstep-support]").forEach(f=>{var k;return(k=f.contentWindow)==null?void 0:k.postMessage({type:"upstep:support:identity",token:t.supportIdentityToken},new URL(n.baseUrl).origin)})},[n,t.supportIdentityToken]);const i=a.useCallback(async()=>{try{const f=await n.listFeedback({sort:"votes",limit:20});c(f.items),S(f.showBranding??!0)}catch{}},[n]);a.useEffect(()=>{i()},[i]);const y=a.useCallback(async(f,k,p)=>{const b={content:k};f.trim()&&(b.title=f.trim()),p!==void 0&&(b.type=p),await n.submitFeedback(b),await i()},[n,i]),s=a.useCallback(async(f,k)=>{try{await n.vote(f,k),await i()}catch{}},[n,i]),d=a.useCallback(f=>n.getItem(f),[n]),j=a.useCallback(()=>r(!0),[]),v=a.useCallback(()=>r(!1),[]),C=a.useCallback(f=>n.setUserId(f),[n]);return e.jsx(D.Provider,{value:{client:n,feedItems:u,loadFeed:i,submit:y,vote:s,getItem:d,isOpen:m,open:j,close:v,identify:C,accentColor:t.accentColor??x.DEFAULT_ACCENT,customAccentColor:t.accentColor,theme:t.theme??"auto",colors:t.colors,radius:t.radius,fontFamily:t.fontFamily,showBranding:l,chat:t.chat!==!1,feedback:t.feedback!==!1},children:o})}function R(){const o=a.useContext(D);if(!o)throw new Error("useUpstep must be used inside <UpstepProvider>");return o}function X({position:o="bottom-right",accentColor:t,theme:n,colors:u,radius:c,fontFamily:m,hideLauncher:r=!1,chat:l=!0,feedback:S}){var L;const i=R(),y=(S??!0)&&i.feedback,s=K(n??i.theme,{accentColor:t??i.customAccentColor,colors:u??i.colors,radius:c??i.radius}),d=s.accent,j={colors:u??i.colors,radius:c??i.radius,fontFamily:m??i.fontFamily},{isOpen:v,open:C,close:f,showBranding:k}=i,[p,b]=a.useState("list"),[h,I]=a.useState(!1),F=h&&l&&i.chat;a.useEffect(()=>{let g=!0;if(i.client.chat=i.chat,!i.chat||!l){I(!1);return}return i.client.supportEnabled().then(w=>{g&&I(w)}),()=>{g=!1}},[i.client,i.chat,l]),a.useEffect(()=>{(!i.chat||!l)&&p==="support"&&b("list")},[i.chat,l,p]),a.useEffect(()=>{v&&b(h&&l&&i.chat?"support":"list")},[v,h,l,i.chat]);const[W,B]=a.useState(null),[T,U]=a.useState(!1);a.useEffect(()=>{const g=window.matchMedia("(max-width: 639px)");U(g.matches);const w=q=>U(q.matches);return g.addEventListener("change",w),()=>g.removeEventListener("change",w)},[]);const V={position:"fixed",bottom:24,right:24},E=((L=j.fontFamily)==null?void 0:L.trim())||J;function z(){f(),B(null)}function _(g){B(g),b("detail")}return e.jsxs(e.Fragment,{children:[!r&&(y||F)&&e.jsxs("button",{"aria-label":y?"Open help and feedback":"Open support chat",onClick:C,style:{...V,zIndex:9998,display:"inline-flex",alignItems:"center",gap:7,background:d,color:s.accentText,border:"none",borderRadius:x.scaleRadius(9999,s.radius),padding:T?"12px":"12px 18px",fontSize:14,fontWeight:600,cursor:"pointer",fontFamily:E,boxShadow:"0 6px 20px rgba(26,25,21,.18)"},children:[e.jsx(ae,{size:16}),!T&&(F?y?"Help & feedback":"Help":"Feedback")]}),v&&(y||F)&&e.jsx("div",{onClick:g=>g.target===g.currentTarget&&z(),style:{position:"fixed",inset:0,background:"transparent",zIndex:9999,display:"flex",alignItems:"flex-end",justifyContent:"flex-end",padding:T?"0 12px 80px":"0 24px 88px",fontFamily:E},children:e.jsxs("div",{style:{background:s.bg,border:`1px solid ${s.border}`,borderRadius:x.scaleRadius(20,s.radius),width:"100%",maxWidth:h&&l&&i.chat?460:440,maxHeight:"calc(100dvh - 112px)",display:"flex",flexDirection:"column",overflow:"hidden",boxShadow:"0 24px 64px rgba(0,0,0,.28)"},children:[F&&!y?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"14px 16px 14px 20px",borderBottom:`1px solid ${s.border}`,flexShrink:0},children:[e.jsx("span",{style:{flex:1,fontSize:16,fontWeight:600,color:s.text},children:"Support"}),e.jsx("button",{"aria-label":"Close",onClick:z,style:{border:0,background:"transparent",color:s.textSoft,padding:6,cursor:"pointer",fontSize:14},children:"✕"})]}):F?e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:14,padding:"10px 14px",borderBottom:`1px solid ${s.border}`,flexShrink:0},children:[e.jsx("div",{style:{display:"flex",flex:1,gap:4},children:[["support","Support"],["list","Ideas"]].map(([g,w])=>e.jsx("button",{onClick:()=>b(g),style:{flex:1,border:0,borderRadius:x.scaleRadius(8,s.radius),padding:"9px 12px",background:(p==="support"?g==="support":g==="list")?s.bgSoft:"transparent",color:(p==="support"?g==="support":g==="list")?s.text:s.textSoft,fontSize:14,fontWeight:600,cursor:"pointer"},children:w},g))}),e.jsx("button",{"aria-label":"Close",onClick:z,style:{border:0,background:"transparent",color:s.textSoft,padding:6,cursor:"pointer",fontSize:14},children:"✕"})]}):e.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:`1px solid ${s.border}`,flexShrink:0},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[p!=="list"&&e.jsx("button",{onClick:()=>b("list"),style:{background:"none",border:"none",cursor:"pointer",color:d,fontSize:14,fontWeight:600,padding:0},children:"← Back"}),p==="list"&&e.jsx("span",{style:{fontWeight:700,fontSize:16,color:s.text,letterSpacing:"-.01em"},children:"Feedback"}),p==="create"&&e.jsx("span",{style:{fontWeight:700,fontSize:16,color:s.text,letterSpacing:"-.01em"},children:"New feedback"})]}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[p==="list"&&e.jsx("button",{onClick:()=>b("create"),style:{background:d,color:s.accentText,border:"none",borderRadius:x.scaleRadius(20,s.radius),padding:"6px 14px",fontSize:14,fontWeight:700,cursor:"pointer"},children:"+ New"}),e.jsx("button",{onClick:z,style:{background:s.bgSoft,border:"none",width:28,height:28,borderRadius:x.scaleRadius(8,s.radius),fontSize:14,cursor:"pointer",color:s.textSoft,display:"flex",alignItems:"center",justifyContent:"center"},children:"✕"})]})]}),e.jsxs("div",{style:{flex:1,overflowY:"auto",padding:p==="support"?0:"16px 20px 24px"},children:[p==="support"&&l&&i.chat&&e.jsx(Z,{client:i.client,accentColor:d,theme:s.dark?"dark":"light",appearance:j}),h&&l&&i.chat&&p!=="support"&&e.jsx("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:16},children:p==="list"?e.jsxs(e.Fragment,{children:[e.jsx("span",{style:{fontSize:14,fontWeight:600,color:s.text},children:"Ideas"}),e.jsx("button",{onClick:()=>b("create"),style:{border:0,borderRadius:x.scaleRadius(8,s.radius),background:d,color:s.accentText,fontSize:14,padding:"7px 10px",cursor:"pointer"},children:"+ Suggest an idea"})]}):e.jsx("button",{onClick:()=>b("list"),style:{border:0,background:"none",padding:0,color:s.textSoft,fontSize:14,cursor:"pointer"},children:"← Back to ideas"})}),p==="list"&&e.jsx(ee,{onSelect:_,accent:d,p:s}),p==="detail"&&W&&e.jsx(te,{feedbackId:W,accent:d,p:s,font:E}),p==="create"&&e.jsx(oe,{accent:d,p:s,font:E,ideasOnly:!!(h&&l&&i.chat),onDone:()=>b("list")})]}),k&&p!=="support"&&e.jsxs("a",{href:"https://upstep.dev",target:"_blank",rel:"noopener noreferrer",style:{display:"block",textAlign:"center",padding:"8px 0",borderTop:`1px solid ${s.border}`,fontSize:11,color:s.textFaint,textDecoration:"none",flexShrink:0},children:["Powered by"," ",e.jsx("strong",{style:{fontWeight:700},children:"Upstep.dev"})]})]})})]})}function Z({client:o,theme:t,accentColor:n,appearance:u}){const c=a.useRef(null);return a.useEffect(()=>{if(c.current)return o.connectSupportFrame(c.current)},[o]),e.jsx("iframe",{ref:c,"data-upstep-support":!0,title:"Customer support",src:o.supportFrameUrl(t,n,u),style:{color:n,width:"100%",height:"min(560px, calc(100dvh - 168px))",minHeight:300,border:0,display:"block"}})}function ee({onSelect:o,accent:t,p:n}){const{feedItems:u,vote:c}=R(),m=u.filter(r=>r.status!=="CLOSED");return m.length?e.jsx(e.Fragment,{children:m.map(r=>{const l=r.userVote==="UP",S=r.title??r.content;return e.jsxs("div",{onClick:()=>o(r.id),style:{display:"flex",gap:12,padding:14,border:`1px solid ${n.border}`,borderRadius:x.scaleRadius(14,n.radius),marginBottom:10,background:n.bg,cursor:"pointer"},children:[e.jsxs("button",{onClick:i=>{i.stopPropagation(),c(r.id,"UP")},style:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:2,minWidth:46,padding:"7px 0",borderRadius:x.scaleRadius(11,n.radius),cursor:"pointer",flexShrink:0,border:`1px solid ${l?t:n.border}`,background:l?n.accentTint:n.bgSoft},children:[e.jsx(O,{color:t}),e.jsx("span",{style:{fontSize:14,fontWeight:700,color:n.text,lineHeight:1.1},children:r.upvotes})]}),e.jsxs("div",{style:{flex:1,minWidth:0},children:[e.jsx("p",{style:{fontSize:14,fontWeight:600,lineHeight:1.4,color:n.text,margin:"0 0 6px",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical"},children:S}),e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[e.jsx(N,{type:r.type,p:n}),r.status==="PENDING"?e.jsx(H,{}):e.jsx($,{status:r.status,boardStatus:r.boardStatus,p:n}),e.jsx("span",{style:{fontSize:11,color:n.textFaint},children:G(r.createdAt)})]})]}),e.jsx("span",{style:{color:n.textFaint,fontSize:18,alignSelf:"center",flexShrink:0},children:"›"})]},r.id)})}):e.jsxs("div",{style:{textAlign:"center",padding:"40px 0"},children:[e.jsx("div",{style:{color:n.textSoft,fontSize:15,fontWeight:600,marginBottom:4},children:"No open feedback yet"}),e.jsx("div",{style:{color:n.textFaint,fontSize:14},children:"Be the first to share one."})]})}function te({feedbackId:o,accent:t,p:n,font:u}){const{vote:c,getItem:m}=R(),[r,l]=a.useState(null),[S,i]=a.useState(!1);a.useEffect(()=>{let d=!1;return m(o).then(j=>{d||l(j)}).catch(()=>{}),()=>{d=!0}},[o,m]);async function y(){if(!(!r||S)){i(!0);try{await c(r.id,"UP");const d=await m(o);l(d)}catch{}finally{i(!1)}}}if(!r)return e.jsx("div",{style:{textAlign:"center",padding:"40px 0",color:n.textFaint,fontSize:14},children:"Loading…"});const s=r.title;return e.jsxs("div",{children:[s&&e.jsx("div",{style:{fontSize:20,fontWeight:700,color:n.text,letterSpacing:"-.02em",marginBottom:10,lineHeight:1.3},children:s}),e.jsxs("div",{style:{display:"flex",gap:6,marginBottom:14,flexWrap:"wrap"},children:[e.jsx(N,{type:r.type,p:n}),r.status==="PENDING"?e.jsx(H,{}):e.jsx($,{status:r.status,boardStatus:r.boardStatus,p:n})]}),e.jsx("p",{style:{fontSize:15,lineHeight:1.6,color:n.textSoft,marginBottom:20},children:r.content}),e.jsxs("button",{onClick:y,disabled:S,style:{display:"inline-flex",alignItems:"center",gap:8,border:`1px solid ${r.userVote==="UP"?t:n.border}`,background:r.userVote==="UP"?P(t,.08):n.bgSoft,borderRadius:x.scaleRadius(12,n.radius),padding:"10px 16px",cursor:"pointer",fontFamily:u},children:[e.jsx(O,{color:t,size:13}),e.jsx("span",{style:{fontSize:18,fontWeight:700,color:n.text},children:r.upvotes}),e.jsx("span",{style:{fontSize:14,color:n.textFaint},children:r.userVote==="UP"?"Upvoted":"Upvote"})]}),r.comments.length>0&&e.jsxs("div",{style:{marginTop:28,borderTop:`1px solid ${n.border}`,paddingTop:20},children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:n.textFaint,marginBottom:12,textTransform:"uppercase"},children:"Comments"}),r.comments.map(d=>e.jsx(ne,{comment:d,p:n,accent:t},d.id))]})]})}function ne({comment:o,p:t,accent:n}){var u;return e.jsxs("div",{style:{background:t.bgSoft,border:`1px solid ${t.border}`,borderRadius:x.scaleRadius(12,t.radius),padding:14,marginBottom:10},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[e.jsx("span",{style:{background:P(n,.125),color:n,fontSize:11,fontWeight:700,borderRadius:x.scaleRadius(20,t.radius),padding:"2px 8px"},children:((u=o.authorName)==null?void 0:u.trim())||"UpStep Team"}),e.jsx("span",{style:{fontSize:11,color:t.textFaint},children:G(o.createdAt)})]}),e.jsx("p",{style:{fontSize:16,lineHeight:1.6,color:t.textSoft,margin:0},children:o.content})]})}function oe({accent:o,p:t,font:n,onDone:u,ideasOnly:c=!1}){const{submit:m}=R(),[r,l]=a.useState(""),[S,i]=a.useState(""),[y,s]=a.useState(c?"FEATURE":"GENERAL"),[d,j]=a.useState(!1),[v,C]=a.useState(!1),[f,k]=a.useState("");async function p(){if(!(!r.trim()||d)){j(!0),k("");try{await m(r.trim(),S.trim()||r.trim(),y),C(!0),setTimeout(u,1200)}catch{k("Something went wrong. Please try again.")}finally{j(!1)}}}if(v)return e.jsxs("div",{style:{textAlign:"center",paddingTop:40},children:[e.jsx("div",{style:{fontSize:18,fontWeight:700,color:t.text,marginBottom:6},children:"Submitted"}),e.jsx("div",{style:{fontSize:14,color:t.textFaint},children:c?"Idea received. Thank you.":"Feedback received. Thank you."})]});const b={width:"100%",border:`1px solid ${t.border}`,borderRadius:x.scaleRadius(12,t.radius),padding:"10px 12px",fontSize:16,lineHeight:1.6,outline:"none",background:t.bgSoft,color:t.text,fontFamily:n,boxSizing:"border-box"};return e.jsxs("div",{children:[!c&&e.jsxs(e.Fragment,{children:[e.jsx("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:t.textFaint,marginBottom:8,textTransform:"uppercase"},children:"Type"}),e.jsx("div",{style:{display:"flex",gap:7,marginBottom:16},children:["BUG","FEATURE","GENERAL"].map(h=>e.jsxs("button",{onClick:()=>s(h),style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",gap:5,padding:"8px 10px",borderRadius:x.scaleRadius(9,t.radius),fontSize:14,fontWeight:600,cursor:"pointer",background:y===h?o:t.bg,color:y===h?t.accentText:t.textSoft,border:`1px solid ${y===h?o:t.border}`,fontFamily:n},children:[A[h].icon,A[h].label]},h))})]}),e.jsx("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:t.textFaint,marginBottom:8,textTransform:"uppercase"},children:"Title"}),e.jsx("input",{value:r,onChange:h=>l(h.target.value),placeholder:c?"What would you like us to build?":"Short summary of the issue or idea",maxLength:200,style:{...b,marginBottom:16,display:"block"}}),e.jsxs("div",{style:{fontSize:10,fontWeight:700,letterSpacing:".08em",color:t.textFaint,marginBottom:8,textTransform:"uppercase"},children:["Description"," ",e.jsx("span",{style:{fontWeight:400,textTransform:"none",letterSpacing:0},children:"(optional)"})]}),e.jsx("textarea",{value:S,onChange:h=>i(h.target.value),placeholder:c?"Why would it help? (optional)":"Steps to reproduce, expected behaviour, or more context",maxLength:2e3,rows:4,style:{...b,resize:"vertical",marginBottom:16}}),f&&e.jsx("p",{style:{fontSize:14,color:"#d6453d",marginBottom:12},children:f}),e.jsx("button",{onClick:p,disabled:d||!r.trim(),style:{width:"100%",padding:12,background:o,color:t.accentText,border:"none",borderRadius:x.scaleRadius(11,t.radius),fontSize:14,fontWeight:600,cursor:"pointer",opacity:d||!r.trim()?.5:1,fontFamily:n},children:d?"Submitting…":c?"Suggest idea":"Submit feedback"})]})}const A={BUG:{label:"Bug",icon:e.jsxs("svg",{width:12,height:12,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("ellipse",{cx:"8",cy:"10",rx:"3.5",ry:"4.5"}),e.jsx("path",{d:"M8 5.5V4M5.5 6.5 3.5 5M10.5 6.5 12.5 5M4.5 10.5 2.5 10M11.5 10.5 13.5 10"})]})},FEATURE:{label:"Feature",icon:e.jsxs("svg",{width:12,height:12,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M8 2v1.5M8 12.5V14M2 8h1.5M12.5 8H14M4.1 4.1l1 1M10.9 10.9l1 1M11.9 4.1l-1 1M5.1 10.9l-1 1"}),e.jsx("circle",{cx:"8",cy:"8",r:"2.5"})]})},GENERAL:{label:"General",icon:e.jsx("svg",{width:12,height:12,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M14 9a2 2 0 0 1-2 2H5L2 14V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v5z"})})}},re={BUG:"#fdecec",FEATURE:"#e9f0fd"},ie={BUG:"#d6453d",FEATURE:"#3b76d6"};function N({type:o,p:t}){return e.jsx("span",{style:{padding:"2px 8px",borderRadius:x.scaleRadius(9999,t.radius),fontSize:10.5,fontWeight:700,letterSpacing:".02em",background:re[o]??t.bgSoft,color:ie[o]??t.textSoft},children:o})}const se={OPEN:"#b45309",IN_PROGRESS:"#1d4ed8",DONE:"#15803d",CLOSED:"#6b7280"};function H(){return e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:4,background:"#fff7ed",border:"1px solid #fed7aa",borderRadius:6,padding:"1px 6px",fontSize:10,fontWeight:700,color:"#ea580c"},children:[e.jsx("span",{style:{width:5,height:5,borderRadius:"50%",background:"#ea580c",display:"inline-block"}}),"Pending review"]})}function $({status:o,boardStatus:t,p:n}){const u=(t==null?void 0:t.color)??se[o]??"#9ca3af";return e.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:5,background:n.bgSoft,border:`1px solid ${n.border}`,borderRadius:x.scaleRadius(6,n.radius),padding:"2px 8px",fontSize:10,fontWeight:600,color:n.textSoft},children:[e.jsx("span",{style:{width:6,height:6,borderRadius:"50%",background:u,display:"inline-block",flexShrink:0}}),(t==null?void 0:t.name)??o.replace("_"," ")]})}function ae({size:o=16,color:t="currentColor"}){return e.jsx("svg",{width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}function O({color:o="currentColor",size:t=11}){return e.jsx("svg",{width:t,height:t,viewBox:"0 0 16 16",fill:"none",stroke:o,strokeWidth:2.2,strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("path",{d:"M8 13V3M3 8l5-5 5 5"})})}function G(o){return new Date(o).toLocaleDateString(void 0,{month:"short",day:"numeric"})}exports.FeedbackWidget=X;exports.UpstepProvider=Q;exports.useUpstep=R;
package/dist/react.d.ts CHANGED
@@ -23,6 +23,8 @@ interface UpstepContextValue {
23
23
  fontFamily: string | undefined;
24
24
  showBranding: boolean;
25
25
  chat: boolean;
26
+ /** False for a support-chat-only widget with no Ideas board or feedback form. */
27
+ feedback: boolean;
26
28
  }
27
29
  export declare function UpstepProvider({ children, ...config }: UpstepConfig & {
28
30
  children: ReactNode;
@@ -41,7 +43,13 @@ interface FeedbackWidgetProps {
41
43
  hideLauncher?: boolean;
42
44
  /** Override chat visibility for this widget. Project/plan access still applies. */
43
45
  chat?: boolean;
46
+ /**
47
+ * Override the provider's `feedback` option for this widget. False shows only
48
+ * the support chat: no Ideas tab or feedback form, and no launcher until
49
+ * support chat is confirmed for the project.
50
+ */
51
+ feedback?: boolean;
44
52
  }
45
- export declare function FeedbackWidget({ position, accentColor, theme, colors, radius, fontFamily, hideLauncher, chat, }: FeedbackWidgetProps): React.JSX.Element;
53
+ export declare function FeedbackWidget({ position, accentColor, theme, colors, radius, fontFamily, hideLauncher, chat, feedback, }: FeedbackWidgetProps): React.JSX.Element;
46
54
  export {};
47
55
  //# sourceMappingURL=react.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../src/react.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAOZ,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAEV,QAAQ,EACR,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACb,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AAcxC,KAAK,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AA+E3C,UAAU,kBAAkB;IAC1B,MAAM,EAAE,eAAe,CAAC;IACxB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,QAAQ,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,MAAM,EAAE,CACN,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EACf,IAAI,CAAC,EAAE,YAAY,KAChB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,IAAI,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,GAAG,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAClE,OAAO,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAC/D,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/C,0EAA0E;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,iBAAiB,EAAE,MAAM,GAAG,SAAS,CAAC;I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