@womp/kookie-ui 0.3.26 → 0.5.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/AUTHORS +27 -0
- package/LICENSE +29 -0
- package/README.md +21 -1
- package/components.css +472 -270
- package/dist/cjs/components/_internal/shell-bottom.js +1 -1
- package/dist/cjs/components/_internal/shell-bottom.js.map +3 -3
- package/dist/cjs/components/_internal/shell-inspector.js +1 -1
- package/dist/cjs/components/_internal/shell-inspector.js.map +3 -3
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +3 -3
- package/dist/cjs/components/alert-dialog.js +1 -1
- package/dist/cjs/components/alert-dialog.js.map +3 -3
- package/dist/cjs/components/badge.js +1 -1
- package/dist/cjs/components/badge.js.map +3 -3
- package/dist/cjs/components/button.js +1 -1
- package/dist/cjs/components/button.js.map +3 -3
- package/dist/cjs/components/chatbar.js +2 -2
- package/dist/cjs/components/chatbar.js.map +3 -3
- package/dist/cjs/components/checkbox-cards.js +1 -1
- package/dist/cjs/components/checkbox-cards.js.map +3 -3
- package/dist/cjs/components/combobox.js +1 -1
- package/dist/cjs/components/combobox.js.map +3 -3
- package/dist/cjs/components/context-menu.js +1 -1
- package/dist/cjs/components/context-menu.js.map +3 -3
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +3 -3
- package/dist/cjs/components/dropdown-menu.js +1 -1
- package/dist/cjs/components/dropdown-menu.js.map +3 -3
- package/dist/cjs/components/hover-card.js +1 -1
- package/dist/cjs/components/hover-card.js.map +3 -3
- package/dist/cjs/components/icon-button.js +2 -2
- package/dist/cjs/components/icon-button.js.map +3 -3
- package/dist/cjs/components/index.js +5 -5
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/popover.js +1 -1
- package/dist/cjs/components/popover.js.map +3 -3
- package/dist/cjs/components/radio-cards.js +1 -1
- package/dist/cjs/components/radio-cards.js.map +3 -3
- package/dist/cjs/components/select.js +1 -1
- package/dist/cjs/components/select.js.map +3 -3
- package/dist/cjs/components/sheet.js +1 -1
- package/dist/cjs/components/sheet.js.map +3 -3
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +3 -3
- package/dist/cjs/components/sidebar.js +1 -1
- package/dist/cjs/components/sidebar.js.map +3 -3
- package/dist/cjs/components/theme-panel.js +3 -3
- package/dist/cjs/components/theme-panel.js.map +3 -3
- package/dist/cjs/components/theme.d.ts +3 -0
- package/dist/cjs/components/theme.d.ts.map +1 -1
- package/dist/cjs/components/theme.js +1 -1
- package/dist/cjs/components/theme.js.map +3 -3
- package/dist/cjs/components/theme.props.d.ts +15 -1
- package/dist/cjs/components/theme.props.d.ts.map +1 -1
- package/dist/cjs/components/theme.props.js +1 -1
- package/dist/cjs/components/theme.props.js.map +2 -2
- package/dist/cjs/components/toggle-button.js +2 -2
- package/dist/cjs/components/toggle-button.js.map +3 -3
- package/dist/cjs/components/toggle-icon-button.js +3 -3
- package/dist/cjs/components/toggle-icon-button.js.map +3 -3
- package/dist/cjs/components/tooltip.js +1 -1
- package/dist/cjs/components/tooltip.js.map +3 -3
- package/dist/cjs/components/user-card.js +1 -1
- package/dist/cjs/components/user-card.js.map +3 -3
- package/dist/cjs/helpers/font-config.d.ts +84 -77
- package/dist/cjs/helpers/font-config.d.ts.map +1 -1
- package/dist/cjs/helpers/font-config.js +5 -2
- package/dist/cjs/helpers/font-config.js.map +3 -3
- package/dist/cjs/helpers/index.js +5 -2
- package/dist/cjs/helpers/index.js.map +3 -3
- package/dist/cjs/index.js +5 -5
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/props/index.js +1 -1
- package/dist/cjs/props/index.js.map +2 -2
- package/dist/esm/{chunk-4CKDU6FY.js → chunk-2FYJTSOP.js} +2 -2
- package/dist/esm/{chunk-ICIGZ3N7.js → chunk-374ZYJUP.js} +2 -2
- package/dist/esm/{chunk-F2HYQ3ZR.js → chunk-6IGTK4JE.js} +2 -2
- package/dist/esm/chunk-6XGZPIUT.js +2 -0
- package/dist/esm/{chunk-T27QHMW7.js.map → chunk-6XGZPIUT.js.map} +2 -2
- package/dist/esm/{chunk-FLFAXVFB.js → chunk-A2RZGGMY.js} +2 -2
- package/dist/esm/{chunk-KKM6T5P7.js → chunk-AU3D6F42.js} +2 -2
- package/dist/esm/{chunk-O3CDWEZA.js → chunk-CVWCKOHO.js} +2 -2
- package/dist/esm/{chunk-JQQIPEGY.js → chunk-CWRNW44F.js} +2 -2
- package/dist/esm/{chunk-UVCH7QKO.js → chunk-DNHUQLXO.js} +2 -2
- package/dist/esm/{chunk-FOEZLQTW.js → chunk-FXUUI6Z2.js} +2 -2
- package/dist/esm/{chunk-WO43WW3A.js → chunk-IKSN4RNB.js} +2 -2
- package/dist/esm/{chunk-4IY2PR6N.js → chunk-K6QZMNCD.js} +2 -2
- package/dist/esm/{chunk-DL2O3GKG.js → chunk-KKBP2CRH.js} +2 -2
- package/dist/esm/{chunk-VLO7NXSP.js → chunk-M24UXMOQ.js} +2 -2
- package/dist/esm/{chunk-MRECKC4D.js → chunk-MK2R6DAU.js} +2 -2
- package/dist/esm/{chunk-5IBGFL6O.js → chunk-MOR3NSXQ.js} +2 -2
- package/dist/esm/{chunk-PQZXQ4ST.js → chunk-OSRJRBKP.js} +2 -2
- package/dist/esm/{chunk-WTYNFBFV.js → chunk-PLWXTEVE.js} +2 -2
- package/dist/esm/{chunk-U2X2CAW4.js → chunk-QEOAXJLN.js} +2 -2
- package/dist/esm/{chunk-36ZQVP7F.js → chunk-RMKXWYOV.js} +2 -2
- package/dist/esm/{chunk-BJYUPIXO.js → chunk-S56YSRHP.js} +2 -2
- package/dist/esm/{chunk-22HGLMPQ.js → chunk-TOLLPRMM.js} +2 -2
- package/dist/esm/{chunk-ETMLMDW4.js → chunk-UGD7Z3L4.js} +2 -2
- package/dist/esm/chunk-VA5A4MHU.js +6 -0
- package/dist/esm/chunk-VA5A4MHU.js.map +7 -0
- package/dist/esm/{chunk-4BBOHEF4.js → chunk-W7N7V5YD.js} +2 -2
- package/dist/esm/{chunk-D5N627TH.js → chunk-WFMYNZXZ.js} +2 -2
- package/dist/esm/{chunk-JR2YOGII.js → chunk-YEB3H7QN.js} +2 -2
- package/dist/esm/chunk-YUP6EICB.js +2 -0
- package/dist/esm/chunk-YUP6EICB.js.map +7 -0
- package/dist/esm/components/_internal/shell-bottom.js +1 -1
- package/dist/esm/components/_internal/shell-inspector.js +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/alert-dialog.js +1 -1
- package/dist/esm/components/badge.js +1 -1
- package/dist/esm/components/button.js +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/checkbox-cards.js +1 -1
- package/dist/esm/components/combobox.js +1 -1
- package/dist/esm/components/context-menu.js +1 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dropdown-menu.js +1 -1
- package/dist/esm/components/hover-card.js +1 -1
- package/dist/esm/components/icon-button.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/popover.js +1 -1
- package/dist/esm/components/radio-cards.js +1 -1
- package/dist/esm/components/select.js +1 -1
- package/dist/esm/components/sheet.js +1 -1
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/sidebar.js +1 -1
- package/dist/esm/components/theme-panel.js +1 -1
- package/dist/esm/components/theme.d.ts +3 -0
- package/dist/esm/components/theme.d.ts.map +1 -1
- package/dist/esm/components/theme.js +1 -1
- package/dist/esm/components/theme.props.d.ts +15 -1
- package/dist/esm/components/theme.props.d.ts.map +1 -1
- package/dist/esm/components/theme.props.js +1 -1
- package/dist/esm/components/toggle-button.js +1 -1
- package/dist/esm/components/toggle-icon-button.js +1 -1
- package/dist/esm/components/tooltip.js +1 -1
- package/dist/esm/components/user-card.js +1 -1
- package/dist/esm/helpers/font-config.d.ts +84 -77
- package/dist/esm/helpers/font-config.d.ts.map +1 -1
- package/dist/esm/helpers/font-config.js +1 -1
- package/dist/esm/helpers/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/props/index.js +1 -1
- package/fonts.css +8 -0
- package/package.json +17 -7
- package/src/components/_internal/base-card.css +5 -5
- package/src/components/_internal/base-checkbox.css +17 -3
- package/src/components/_internal/base-dialog.css +4 -4
- package/src/components/_internal/base-menu.css +3 -3
- package/src/components/accordion.css +5 -5
- package/src/components/callout.css +5 -5
- package/src/components/chatbar.css +6 -6
- package/src/components/checkbox-cards.css +30 -0
- package/src/components/heading.css +10 -3
- package/src/components/hover-card.css +3 -3
- package/src/components/popover.css +4 -4
- package/src/components/radio-cards.css +30 -0
- package/src/components/select.css +2 -2
- package/src/components/shell.css +1 -1
- package/src/components/table.css +5 -5
- package/src/components/text.css +10 -3
- package/src/components/theme.props.tsx +13 -1
- package/src/components/theme.tsx +18 -0
- package/src/components/tooltip.css +1 -1
- package/src/helpers/font-config.ts +130 -148
- package/src/styles/fonts.css +24 -29
- package/src/styles/index.css +0 -1
- package/src/styles/tokens/base.css +1 -0
- package/src/styles/tokens/font-family.css +263 -0
- package/src/styles/tokens/radius.css +47 -4
- package/src/styles/tokens/typography.css +2 -216
- package/styles.css +9094 -8884
- package/tokens/base.css +55 -28
- package/tokens.css +55 -28
- package/dist/esm/chunk-LOGJJF4I.js +0 -2
- package/dist/esm/chunk-LOGJJF4I.js.map +0 -7
- package/dist/esm/chunk-Q7P6BTVU.js +0 -3
- package/dist/esm/chunk-Q7P6BTVU.js.map +0 -7
- package/dist/esm/chunk-T27QHMW7.js +0 -2
- /package/dist/esm/{chunk-4CKDU6FY.js.map → chunk-2FYJTSOP.js.map} +0 -0
- /package/dist/esm/{chunk-ICIGZ3N7.js.map → chunk-374ZYJUP.js.map} +0 -0
- /package/dist/esm/{chunk-F2HYQ3ZR.js.map → chunk-6IGTK4JE.js.map} +0 -0
- /package/dist/esm/{chunk-FLFAXVFB.js.map → chunk-A2RZGGMY.js.map} +0 -0
- /package/dist/esm/{chunk-KKM6T5P7.js.map → chunk-AU3D6F42.js.map} +0 -0
- /package/dist/esm/{chunk-O3CDWEZA.js.map → chunk-CVWCKOHO.js.map} +0 -0
- /package/dist/esm/{chunk-JQQIPEGY.js.map → chunk-CWRNW44F.js.map} +0 -0
- /package/dist/esm/{chunk-UVCH7QKO.js.map → chunk-DNHUQLXO.js.map} +0 -0
- /package/dist/esm/{chunk-FOEZLQTW.js.map → chunk-FXUUI6Z2.js.map} +0 -0
- /package/dist/esm/{chunk-WO43WW3A.js.map → chunk-IKSN4RNB.js.map} +0 -0
- /package/dist/esm/{chunk-4IY2PR6N.js.map → chunk-K6QZMNCD.js.map} +0 -0
- /package/dist/esm/{chunk-DL2O3GKG.js.map → chunk-KKBP2CRH.js.map} +0 -0
- /package/dist/esm/{chunk-VLO7NXSP.js.map → chunk-M24UXMOQ.js.map} +0 -0
- /package/dist/esm/{chunk-MRECKC4D.js.map → chunk-MK2R6DAU.js.map} +0 -0
- /package/dist/esm/{chunk-5IBGFL6O.js.map → chunk-MOR3NSXQ.js.map} +0 -0
- /package/dist/esm/{chunk-PQZXQ4ST.js.map → chunk-OSRJRBKP.js.map} +0 -0
- /package/dist/esm/{chunk-WTYNFBFV.js.map → chunk-PLWXTEVE.js.map} +0 -0
- /package/dist/esm/{chunk-U2X2CAW4.js.map → chunk-QEOAXJLN.js.map} +0 -0
- /package/dist/esm/{chunk-36ZQVP7F.js.map → chunk-RMKXWYOV.js.map} +0 -0
- /package/dist/esm/{chunk-BJYUPIXO.js.map → chunk-S56YSRHP.js.map} +0 -0
- /package/dist/esm/{chunk-22HGLMPQ.js.map → chunk-TOLLPRMM.js.map} +0 -0
- /package/dist/esm/{chunk-ETMLMDW4.js.map → chunk-UGD7Z3L4.js.map} +0 -0
- /package/dist/esm/{chunk-4BBOHEF4.js.map → chunk-W7N7V5YD.js.map} +0 -0
- /package/dist/esm/{chunk-D5N627TH.js.map → chunk-WFMYNZXZ.js.map} +0 -0
- /package/dist/esm/{chunk-JR2YOGII.js.map → chunk-YEB3H7QN.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as C}from"./chunk-MHANZINI.js";import{a as D}from"./chunk-TOOSHJOA.js";import{a as d}from"./chunk-MJJ7XDIP.js";import{a as y}from"./chunk-GCUGJXI2.js";import{c as S}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as C}from"./chunk-MHANZINI.js";import{a as D}from"./chunk-TOOSHJOA.js";import{a as d}from"./chunk-MJJ7XDIP.js";import{a as y}from"./chunk-GCUGJXI2.js";import{c as S}from"./chunk-YUP6EICB.js";import{a as R}from"./chunk-H7ST535H.js";import{a as u}from"./chunk-5TXQLK4G.js";import{a as c}from"./chunk-6FLLFCBU.js";import{a as F}from"./chunk-3XT5P2HO.js";var J={};F(J,{Close:()=>k,Content:()=>b,Description:()=>N,Root:()=>T,Title:()=>x,Trigger:()=>v});import*as e from"react";import K from"classnames";import{Dialog as a}from"radix-ui";var T=o=>e.createElement(a.Root,{...o,modal:!0});T.displayName="Sheet.Root";var v=e.forwardRef(({children:o,...t},r)=>e.createElement(a.Trigger,{...t,ref:r,asChild:!0},d(o)));v.displayName="Sheet.Trigger";var{align:ae,panelBackground:V,material:_,...E}=y,q={panelBackground:V,material:_},{default:ne,...I}=E.maxWidth,G={...E,maxWidth:I},b=e.forwardRef((o,t)=>{let{side:r="start",forceMount:n,container:M,className:B,panelBackground:f,material:W,...w}=o,H={left:"start",right:"end",start:"start",end:"end",top:"top",bottom:"bottom"}[r],{panelBackground:L,material:O}=c({panelBackground:f,material:W},q);u(f);let h=O??L,{className:z,...j}=c(w,G),g=e.useRef(null),A=e.useMemo(()=>i=>{g.current=i,typeof t=="function"?t(i):t&&(t.current=i)},[t]);return C(),e.useEffect(()=>{if(typeof window>"u")return;let i=g.current;if(!i)return;let s=i.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');if(s.length===0)return;let l=s[0],m=s[s.length-1],P=p=>{p.key==="Tab"&&(p.shiftKey?document.activeElement===l&&(p.preventDefault(),m.focus()):document.activeElement===m&&(p.preventDefault(),l.focus()))};return i.addEventListener("keydown",P),l.focus(),()=>{i.removeEventListener("keydown",P)}},[]),e.createElement(a.Portal,{container:M,forceMount:n},e.createElement(S,{asChild:!0},e.createElement(a.Overlay,{className:"rt-BaseDialogOverlay rt-DialogOverlay rt-SheetOverlay"},e.createElement(a.Content,{...j,ref:A,className:K("rt-BaseDialogContent","rt-SheetContent",B,z),"data-side":H,"data-material":h,"data-panel-background":h,tabIndex:-1,role:"dialog","aria-modal":"true"}))))});b.displayName="Sheet.Content";var x=e.forwardRef(({size:o="4",weight:t="medium",...r},n)=>e.createElement(a.Title,{asChild:!0},e.createElement(D,{ref:n,size:o,weight:t,...r})));x.displayName="Sheet.Title";var N=e.forwardRef(({size:o="2",color:t="gray",...r},n)=>e.createElement(a.Description,{asChild:!0},e.createElement(R,{ref:n,size:o,color:t,...r})));N.displayName="Sheet.Description";var k=e.forwardRef(({children:o,...t},r)=>e.createElement(a.Close,{...t,ref:r,asChild:!0},d(o)));k.displayName="Sheet.Close";export{T as a,v as b,b as c,x as d,N as e,k as f,J as g};
|
|
2
|
+
//# sourceMappingURL=chunk-MK2R6DAU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as Me}from"./chunk-WTYNFBFV.js";import{a as Ge}from"./chunk-GJSGKE7B.js";import{g as qe,j as Ye}from"./chunk-IX5HIHVI.js";import{a as Re}from"./chunk-H7ST535H.js";import{a as ce}from"./chunk-FHOCUZDR.js";import{b as U}from"./chunk-FWB47YCH.js";import{a as dt}from"./chunk-3XT5P2HO.js";var ft={};dt(ft,{AttachTrigger:()=>tt,Attachment:()=>Le,AttachmentsRow:()=>et,InlineEnd:()=>Ze,InlineStart:()=>Xe,Root:()=>Je,Row:()=>at,RowEnd:()=>ot,RowStart:()=>nt,Send:()=>rt,Textarea:()=>Qe});import*as e from"react";import M from"classnames";import{LazyMotion as mt,domAnimation as pt,m as ue}from"motion/react";import{useDropzone as ht}from"react-dropzone";var Oe=typeof window<"u"?e.useLayoutEffect:e.useEffect,_e=e.createContext(null),_=()=>{let l=e.useContext(_e);if(!l)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return l},Je=e.forwardRef((l,i)=>{let{className:r,style:h,children:d,value:g,defaultValue:y="",onValueChange:m,open:s,defaultOpen:v=!1,onOpenChange:f,expandOn:x="both",minLines:P=3,maxLines:n=6,sendMode:C="whenDirty",disabled:S,readOnly:z,onSubmit:w,size:T="2",variant:J,color:k,radius:Q,panelBackground:O,material:K,width:de,maxWidth:ne,asChild:me,attachments:oe,defaultAttachments:ge=[],onAttachmentsChange:I,accept:X,multiple:j=!0,maxAttachments:A,maxFileSize:p,paste:pe=!0,pasteAccept:Z,clearOnSubmit:he=!0,onAttachmentReject:$,dropzone:W=!0,apiRef:a,...c}=l,b=K||O,R=g!=null,[F,Ce]=e.useState(y),ee=R?g:F,L=s!=null,[re,te]=e.useState(v),ae=L?s:re,ye=e.useRef(null),fe=e.useRef(null),ve=e.useRef(!1),q="attachments"in l,[De,Fe]=e.useState(ge),Y=e.useMemo(()=>q?oe??[]:De,[q,oe,De]),be=e.useRef(new Set),xe=t=>Array.isArray(t)?t:typeof t=="string"?t.split(",").map(o=>o.trim()):[],se=xe(X),He=xe(Z).length>0?xe(Z):se,Ne=(t,o)=>{if(o.length===0)return!0;let D=t.type.toLowerCase(),B=t.name.toLowerCase();for(let H of o){let E=H.toLowerCase();if(E.includes("/")){let[N,V]=E.split("/"),[u,le]=D.split("/");if(N==="*"||N===u&&(V==="*"||V===le))return!0}else if(E.startsWith(".")&&B.endsWith(E))return!0}return!1},Ae=e.useRef(Y);Ae.current=Y;let we=e.useRef(se);we.current=se;let ze=e.useRef(He);ze.current=He;let Pe=e.useRef(A);Pe.current=A;let Ee=e.useRef(p);Ee.current=p;let Se=e.useRef($);Se.current=$;let ke=e.useRef(I);ke.current=I;let Ie=e.useRef(f);Ie.current=f;let ie=e.useCallback(t=>{let o=Ae.current,D=we.current,B=Pe.current,H=Ee.current,E=[],N=[],V=typeof B=="number"?Math.max(B-o.length,0):1/0;for(let u of t){if(E.length>=V){N.push({file:u,reason:"count"});continue}if(typeof H=="number"&&u.size>H){N.push({file:u,reason:"size"});continue}if(!Ne(u,D)){N.push({file:u,reason:"type"});continue}let le=`${Date.now()}-${Math.random().toString(36).slice(2,8)}`,G=/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(u.name),Te=(u.type||"").toLowerCase().startsWith("image/")||G?URL.createObjectURL(u):void 0;Te&&be.current.add(Te),E.push({id:le,name:u.name,size:u.size,type:u.type,file:u,url:Te,status:"idle"})}if(E.length>0){let u=o.concat(E);q||Fe(u),ke.current?.(u),L||te(!0),Ie.current?.(!0)}N.length>0&&Se.current?.(N)},[q,L]),je=e.useCallback(t=>{let o=we.current,D=ze.current,B=Pe.current,H=Ee.current,E=Ae.current,N=D.length>0?D:o,V=[],u=[],le=typeof B=="number"?Math.max(B-E.length,0):1/0;for(let G of t){if(V.length>=le){u.push({file:G,reason:"count"});continue}if(typeof H=="number"&&G.size>H){u.push({file:G,reason:"size"});continue}if(!Ne(G,N)){u.push({file:G,reason:"type"});continue}V.push(G)}V.length>0&&ie(V),u.length>0&&Se.current?.(u)},[ie]);e.useEffect(()=>{let t=new Set(Y.map(o=>o.url).filter(Boolean));for(let o of Array.from(be.current))t.has(o)||(URL.revokeObjectURL(o),be.current.delete(o))},[Y]),e.useEffect(()=>{let t=be.current;return()=>{for(let o of Array.from(t))URL.revokeObjectURL(o);t.clear()}},[]);let st=me?U:"div",We=e.useCallback(t=>{L||te(t),f?.(t)},[L,f]),Be=e.useCallback(t=>{R||Ce(t),m?.(t)},[R,m]),Ve=e.useCallback(t=>{q||Fe(t),I?.(t)},[q,I]),it=e.useCallback(t=>{let o=t.relatedTarget,D=ye.current;D&&(o&&D.contains(o)||ve.current||(ee?.trim?.()??"").length===0&&Y.length===0&&(L||te(!1),f?.(!1)))},[L,f,ee,Y]),{getRootProps:lt,getInputProps:ct,isDragActive:Ue,open:Ke}=ht({onDrop:(t,o)=>{if(t.length>0&&ie(t),o.length>0&&$){let D=o.map(({file:B,errors:H})=>{let E=H[0]?.code==="file-too-large"?"size":H[0]?.code==="file-invalid-type"?"type":"count";return{file:B,reason:E}});$(D)}},accept:se.length>0?se.reduce((t,o)=>(o.includes("/")?t[o]=[]:o.startsWith(".")&&(t[o]=[]),t),{}):void 0,multiple:j,maxSize:p,noClick:!0,noKeyboard:!0,disabled:!W||S});e.useImperativeHandle(a,()=>({focusTextarea:()=>fe.current?.focus({preventScroll:!0}),openFilePicker:()=>{ve.current=!0,Ke()}}),[Ke]);let $e=e.useCallback(t=>{if(!(t instanceof Element))return!1;let o=t;return o.closest(".rt-ChatbarDropOverlay")?!0:!!o.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')},[]),ut=e.useCallback(t=>{S||$e(t.target)||t.pointerType==="mouse"&&t.button!==0||(t.preventDefault(),fe.current?.focus({preventScroll:!0}))},[S,$e,fe]);return e.createElement(_e.Provider,{value:e.useMemo(()=>({open:ae,setOpen:We,isOpenControlled:L,value:ee,setValue:Be,isValueControlled:R,size:T,expandOn:x,minLines:P,maxLines:n,sendMode:C,disabled:S,readOnly:z,onSubmit:w,rootRef:ye,textareaRef:fe,attachments:Y,setAttachments:Ve,isAttachmentsControlled:q,accept:X,multiple:j,maxAttachments:A,maxFileSize:p,paste:pe,pasteAccept:Z,clearOnSubmit:he,onAttachmentReject:$,dropzone:W,appendFiles:ie,appendFilesFromPaste:je,fileDialogOpenRef:ve}),[ae,We,L,ee,Be,R,T,x,P,n,C,S,z,w,Y,Ve,q,X,j,A,p,pe,Z,he,$,W,ie,je])},e.createElement(mt,{features:pt},e.createElement(st,{...c,ref:t=>{typeof i=="function"?i(t):i&&(i.current=t),ye.current=t},className:M("rt-ChatbarRoot",`rt-r-size-${T}`,r),style:{position:"relative",width:de,maxWidth:ne,...h},"data-state":ae?"open":"closed","data-disabled":S?"":void 0,"data-readonly":z?"":void 0,"data-drop-active":W&&Ue?"":void 0,"data-accent-color":k,"data-radius":Q,"data-panel-background":b,"data-material":b,"aria-expanded":ae,onBlurCapture:it},W&&e.createElement("input",{...ct()}),e.createElement("div",{...W?lt():{},style:{width:"100%",height:"100%"},onPointerDown:ut},e.createElement(ue.div,{className:M("rt-ChatbarBox",`rt-variant-${J??"surface"}`),style:{position:"relative"},"data-accent-color":k,"data-radius":Q,"data-panel-background":b,"data-material":b,layout:!0,transition:{layout:{type:"spring",visualDuration:.15,bounce:.1}}},e.createElement(ue.div,{className:"rt-ChatbarGrid",layout:"position",transition:{layout:{type:"spring",visualDuration:.15,bounce:.1}}},d),W&&Ue&&e.createElement("div",{className:"rt-ChatbarDropOverlay"},e.createElement("div",{className:"rt-ChatbarDropContent"},e.createElement(Re,{color:"gray",size:T,weight:"medium"},"Drop files here to attach"))))))))});Je.displayName="Chatbar.Root";var Qe=e.forwardRef((l,i)=>{let{className:r,style:h,asChild:d,onFocus:g,onInput:y,onChange:m,onPaste:s,onKeyDown:v,submitOnEnter:f=!1,rows:x,...P}=l,n=_(),{open:C,minLines:S,maxLines:z,expandOn:w,disabled:T,readOnly:J,setOpen:k,setValue:Q,textareaRef:O,value:K,isValueControlled:de,sendMode:ne,paste:me,appendFilesFromPaste:oe,size:ge}=n,I=e.useRef(0),X=e.useRef(0),j=e.useRef(0),A=e.useCallback(()=>{let a=O.current;if(!a)return;let c=window.getComputedStyle(a),b=parseFloat(c.lineHeight)||20,R=parseFloat(c.paddingTop)||0,F=parseFloat(c.paddingBottom)||0;I.current=b,X.current=R+F,j.current=Math.ceil(1*b)+R+F},[O]),p=e.useCallback(a=>{let c=O.current;if(!c)return;c.style.height="auto",I.current===0&&A();let b=I.current,R=X.current,F=a??C,Ce=F?S:1,ee=F?z:1,L=Math.ceil(Ce*b)+R,re=Math.ceil(ee*b)+R,te=Math.max(c.scrollHeight,L),ae=Math.min(te,re);c.style.height=`${ae}px`,te>re?(c.style.overflowY="auto",c.style.maxHeight=`${re}px`):(c.style.overflowY="hidden",c.style.maxHeight="none")},[C,S,z,O,A]);Oe(()=>{p()},[p,K,C]),Oe(()=>{if(!(w==="overflow"||w==="both")||C)return;let a=O.current;if(!a)return;a.style.height="auto",j.current===0&&A(),a.scrollHeight>j.current+1&&(k(!0),p(!0),requestAnimationFrame(()=>p(!0)))},[K,w,C,k,O,A,p]),Oe(()=>{A(),p()},[A,p,ge]),e.useEffect(()=>{let a=O.current;if(!a||typeof ResizeObserver>"u")return;let c=I.current,b=new ResizeObserver(()=>{let R=window.getComputedStyle(a),F=parseFloat(R.lineHeight)||20;F!==c&&(c=F,A(),requestAnimationFrame(()=>p()))});return b.observe(a),()=>b.disconnect()},[O,A,p]),e.useEffect(()=>{},[]);let pe=e.useCallback(a=>{T||J||((w==="focus"||w==="both")&&!C&&k(!0),g?.(a))},[T,J,w,C,k,g]),Z=e.useCallback(a=>{let c=a.currentTarget,b=c.value;Q(b),(w==="overflow"||w==="both")&&!C&&(c.style.height="auto",j.current===0&&A(),c.scrollHeight>j.current+1&&(k(!0),p(!0),requestAnimationFrame(()=>p(!0)))),requestAnimationFrame(()=>p()),m?.(a)},[w,C,k,Q,m,p,A]),he=e.useCallback(a=>{if(me){let b=Array.from(a.clipboardData?.items??[]).filter(R=>R.kind==="file").map(R=>R.getAsFile()).filter(R=>!!R);b.length>0&&(a.preventDefault(),oe(b))}setTimeout(()=>{C?p():p(!0)},0),s?.(a)},[me,C,p,s,oe]),$=e.useCallback(a=>{if(!f){v?.(a);return}if(a.key==="Enter"&&!a.shiftKey&&!a.altKey&&!a.ctrlKey&&!a.metaKey&&!a.nativeEvent.isComposing){if(T||J){v?.(a);return}if(ne==="never"){v?.(a);return}let b=K.trim().length>0||n.attachments.length>0;if(ne==="whenDirty"&&!b){v?.(a);return}a.preventDefault(),n.onSubmit?.({value:K,attachments:n.attachments}),n.clearOnSubmit&&(de||Q(""),n.setAttachments([]))}v?.(a)},[f,T,J,ne,K,de,Q,n,v]),W=d?U:"textarea";return e.createElement(ue.div,{className:M("rt-ChatbarField","rt-ChatbarTextarea",r),layout:"position",transition:{layout:{type:"spring",visualDuration:.15,bounce:.1}}},e.createElement(W,{...P,ref:a=>{typeof i=="function"?i(a):i&&(i.current=a),O.current=a},className:"rt-ChatbarInput",value:K,onInput:y,onChange:Z,onFocus:pe,onPaste:he,onKeyDown:$,disabled:T,readOnly:J,rows:C?S:1,spellCheck:P.spellCheck??!0,autoCorrect:P.autoCorrect??"on",style:h}))});Qe.displayName="Chatbar.Textarea";var Xe=e.forwardRef((l,i)=>{let{children:r,asChild:h,style:d,className:g,...y}=l;return _().open?null:e.createElement(h?U:"div",{...y,ref:i,className:M("rt-ChatbarInlineStart",g),style:d},r)});Xe.displayName="Chatbar.InlineStart";var Ze=e.forwardRef((l,i)=>{let{children:r,asChild:h,style:d,className:g,...y}=l;return _().open?null:e.createElement(h?U:"div",{...y,ref:i,className:M("rt-ChatbarInlineEnd",g),style:d},r)});Ze.displayName="Chatbar.InlineEnd";var et=e.forwardRef((l,i)=>{let{asChild:r,forceMount:h,renderAttachment:d,className:g,style:y,...m}=l,s=_();if(!(s.attachments.length>0)&&!h)return null;let f=r?U:"div";return e.createElement(ue.div,{layout:"position",transition:{layout:{type:"spring",visualDuration:.15,bounce:.1}}},e.createElement(f,{...m,ref:i,className:M("rt-ChatbarAttachmentsRow",g),style:y,role:"list","aria-label":m["aria-label"]??"Attachments"},e.createElement(Ge,{className:"rt-ChatbarScrollArea",scrollbars:"horizontal",size:"1"},e.createElement(ce,{align:"center",gap:"2",style:{minWidth:"fit-content"}},s.attachments.map(x=>e.createElement(Le,{key:x.id,attachment:x,asChild:!!d},d?.(x)))))))});et.displayName="Chatbar.AttachmentsRow";var Le=e.forwardRef((l,i)=>{let{attachment:r,asChild:h,className:d,style:g,children:y,...m}=l,s=_(),v=h?U:"div",f=!!r.url&&r.type.startsWith("image/");return e.createElement(v,{...m,ref:i,className:M("rt-ChatbarAttachment",d),style:g,role:"listitem","data-kind":f?"image":"file",title:r.name},y??e.createElement(ce,{align:"center",gap:"2",pr:f?void 0:"6"},e.createElement("div",{className:"rt-ChatbarAttachmentPreview","aria-hidden":!0},f?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:r.url,alt:""}):e.createElement(Ye,null)),!f&&e.createElement(ce,{direction:"column",gap:"0",style:{minWidth:0}},e.createElement(Re,{size:s.size,weight:"medium",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},r.name),e.createElement(Re,{size:"1",color:"gray"},Math.ceil(r.size/1024)," KB")),e.createElement(Me,{className:"rt-ChatbarAttachmentRemove","aria-label":`Remove ${r.name}`,size:"1",variant:"classic",highContrast:!0,color:"gray",onClick:()=>s.setAttachments(s.attachments.filter(x=>x.id!==r.id))},e.createElement(qe,null))))});Le.displayName="Chatbar.Attachment";var tt=e.forwardRef((l,i)=>{let{asChild:r,accept:h,multiple:d,className:g,style:y,...m}=l,s=_(),v=e.useRef(null),f=r?U:"button",x=h??s.accept,P=(Array.isArray(x)?x:x?.split(",")??[]).join(",");return e.useEffect(()=>{let n=()=>{s.fileDialogOpenRef.current=!1};return window.addEventListener("focus",n),()=>window.removeEventListener("focus",n)},[s.fileDialogOpenRef]),e.createElement(e.Fragment,null,e.createElement(f,{...m,ref:i,className:M("rt-ChatbarAttachTrigger",g),style:y,type:m.type??"button","aria-label":m["aria-label"]??"Add attachments",onPointerDown:n=>{s.fileDialogOpenRef.current=!0,m.onPointerDown?.(n)},onMouseDown:n=>{s.fileDialogOpenRef.current=!0,m.onMouseDown?.(n)},onClick:n=>{s.fileDialogOpenRef.current=!0,v.current&&v.current.click(),m.onClick?.(n)}}),e.createElement("input",{ref:v,type:"file",accept:P,multiple:d??s.multiple,tabIndex:-1,style:{display:"none"},onChange:n=>{let C=Array.from(n.currentTarget.files??[]);C.length>0&&s.appendFiles(C),s.fileDialogOpenRef.current=!1,n.currentTarget.value=""}}))});tt.displayName="Chatbar.AttachTrigger";var at=e.forwardRef((l,i)=>{let{asChild:r,children:h,className:d,style:g,...y}=l;if(!_().open)return null;let s=r?U:"div";return e.createElement(ue.div,{layout:"position",transition:{layout:{type:"spring",visualDuration:.15,bounce:.1}}},e.createElement(s,{...y,ref:i,className:M("rt-ChatbarRow",d),style:g},e.createElement(ce,{align:"center",justify:"between",width:"100%"},h)))});at.displayName="Chatbar.Row";var nt=e.forwardRef((l,i)=>{let{className:r,style:h,...d}=l;return e.createElement("div",{...d,ref:i,className:M("rt-ChatbarRowStart",r),style:h})});nt.displayName="Chatbar.RowStart";var ot=e.forwardRef((l,i)=>{let{className:r,style:h,...d}=l;return e.createElement("div",{...d,ref:i,className:M("rt-ChatbarRowEnd",r),style:h})});ot.displayName="Chatbar.RowEnd";var rt=e.forwardRef((l,i)=>{let{asChild:r,clearOnSend:h=!0,disabled:d,children:g,className:y,style:m,size:s,variant:v,"aria-label":f,"aria-labelledby":x,...P}=l,n=_(),S=n.value.trim().length>0||n.attachments.length>0,z=n.sendMode==="always"||n.sendMode==="whenDirty"&&S;if(n.sendMode==="never")return null;let w=T=>{n.disabled||n.readOnly||(n.onSubmit?.({value:n.value,attachments:n.attachments}),h&&(n.isValueControlled||n.setValue(""),n.clearOnSubmit&&n.setAttachments([])),P.onClick?.(T))};return e.createElement(Me,{...P,ref:i,size:s??n.size,variant:v??(n.open?"solid":"ghost"),disabled:d||n.disabled||n.readOnly,className:M("rt-ChatbarSend",y),style:{opacity:z?1:0,pointerEvents:z?"auto":"none",...m},asChild:r,onClick:w,"aria-label":f??(x?void 0:"Send"),"aria-labelledby":x},g??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-arrow-right-icon lucide-arrow-right"},e.createElement("path",{d:"M5 12h14"}),e.createElement("path",{d:"m12 5 7 7-7 7"})))});rt.displayName="Chatbar.Send";export{Je as a,Qe as b,Xe as c,Ze as d,et as e,Le as f,tt as g,at as h,nt as i,ot as j,rt as k,ft as l};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as Me}from"./chunk-PLWXTEVE.js";import{a as Ge}from"./chunk-GJSGKE7B.js";import{g as qe,j as Ye}from"./chunk-IX5HIHVI.js";import{a as Re}from"./chunk-H7ST535H.js";import{a as ce}from"./chunk-FHOCUZDR.js";import{b as U}from"./chunk-FWB47YCH.js";import{a as dt}from"./chunk-3XT5P2HO.js";var ft={};dt(ft,{AttachTrigger:()=>tt,Attachment:()=>Le,AttachmentsRow:()=>et,InlineEnd:()=>Ze,InlineStart:()=>Xe,Root:()=>Je,Row:()=>at,RowEnd:()=>ot,RowStart:()=>nt,Send:()=>rt,Textarea:()=>Qe});import*as e from"react";import M from"classnames";import{LazyMotion as mt,domAnimation as pt,m as ue}from"motion/react";import{useDropzone as ht}from"react-dropzone";var Oe=typeof window<"u"?e.useLayoutEffect:e.useEffect,_e=e.createContext(null),_=()=>{let l=e.useContext(_e);if(!l)throw new Error("Chatbar context not found. Wrap parts in <Chatbar.Root>.");return l},Je=e.forwardRef((l,i)=>{let{className:r,style:h,children:d,value:g,defaultValue:y="",onValueChange:m,open:s,defaultOpen:v=!1,onOpenChange:f,expandOn:x="both",minLines:P=3,maxLines:n=6,sendMode:C="whenDirty",disabled:S,readOnly:z,onSubmit:w,size:T="2",variant:J,color:k,radius:Q,panelBackground:O,material:K,width:de,maxWidth:ne,asChild:me,attachments:oe,defaultAttachments:ge=[],onAttachmentsChange:I,accept:X,multiple:j=!0,maxAttachments:A,maxFileSize:p,paste:pe=!0,pasteAccept:Z,clearOnSubmit:he=!0,onAttachmentReject:$,dropzone:W=!0,apiRef:a,...c}=l,b=K||O,R=g!=null,[F,Ce]=e.useState(y),ee=R?g:F,L=s!=null,[re,te]=e.useState(v),ae=L?s:re,ye=e.useRef(null),fe=e.useRef(null),ve=e.useRef(!1),q="attachments"in l,[De,Fe]=e.useState(ge),Y=e.useMemo(()=>q?oe??[]:De,[q,oe,De]),be=e.useRef(new Set),xe=t=>Array.isArray(t)?t:typeof t=="string"?t.split(",").map(o=>o.trim()):[],se=xe(X),He=xe(Z).length>0?xe(Z):se,Ne=(t,o)=>{if(o.length===0)return!0;let D=t.type.toLowerCase(),B=t.name.toLowerCase();for(let H of o){let E=H.toLowerCase();if(E.includes("/")){let[N,V]=E.split("/"),[u,le]=D.split("/");if(N==="*"||N===u&&(V==="*"||V===le))return!0}else if(E.startsWith(".")&&B.endsWith(E))return!0}return!1},Ae=e.useRef(Y);Ae.current=Y;let we=e.useRef(se);we.current=se;let ze=e.useRef(He);ze.current=He;let Pe=e.useRef(A);Pe.current=A;let Ee=e.useRef(p);Ee.current=p;let Se=e.useRef($);Se.current=$;let ke=e.useRef(I);ke.current=I;let Ie=e.useRef(f);Ie.current=f;let ie=e.useCallback(t=>{let o=Ae.current,D=we.current,B=Pe.current,H=Ee.current,E=[],N=[],V=typeof B=="number"?Math.max(B-o.length,0):1/0;for(let u of t){if(E.length>=V){N.push({file:u,reason:"count"});continue}if(typeof H=="number"&&u.size>H){N.push({file:u,reason:"size"});continue}if(!Ne(u,D)){N.push({file:u,reason:"type"});continue}let le=`${Date.now()}-${Math.random().toString(36).slice(2,8)}`,G=/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(u.name),Te=(u.type||"").toLowerCase().startsWith("image/")||G?URL.createObjectURL(u):void 0;Te&&be.current.add(Te),E.push({id:le,name:u.name,size:u.size,type:u.type,file:u,url:Te,status:"idle"})}if(E.length>0){let u=o.concat(E);q||Fe(u),ke.current?.(u),L||te(!0),Ie.current?.(!0)}N.length>0&&Se.current?.(N)},[q,L]),je=e.useCallback(t=>{let o=we.current,D=ze.current,B=Pe.current,H=Ee.current,E=Ae.current,N=D.length>0?D:o,V=[],u=[],le=typeof B=="number"?Math.max(B-E.length,0):1/0;for(let G of t){if(V.length>=le){u.push({file:G,reason:"count"});continue}if(typeof H=="number"&&G.size>H){u.push({file:G,reason:"size"});continue}if(!Ne(G,N)){u.push({file:G,reason:"type"});continue}V.push(G)}V.length>0&&ie(V),u.length>0&&Se.current?.(u)},[ie]);e.useEffect(()=>{let t=new Set(Y.map(o=>o.url).filter(Boolean));for(let o of Array.from(be.current))t.has(o)||(URL.revokeObjectURL(o),be.current.delete(o))},[Y]),e.useEffect(()=>{let t=be.current;return()=>{for(let o of Array.from(t))URL.revokeObjectURL(o);t.clear()}},[]);let st=me?U:"div",We=e.useCallback(t=>{L||te(t),f?.(t)},[L,f]),Be=e.useCallback(t=>{R||Ce(t),m?.(t)},[R,m]),Ve=e.useCallback(t=>{q||Fe(t),I?.(t)},[q,I]),it=e.useCallback(t=>{let o=t.relatedTarget,D=ye.current;D&&(o&&D.contains(o)||ve.current||(ee?.trim?.()??"").length===0&&Y.length===0&&(L||te(!1),f?.(!1)))},[L,f,ee,Y]),{getRootProps:lt,getInputProps:ct,isDragActive:Ue,open:Ke}=ht({onDrop:(t,o)=>{if(t.length>0&&ie(t),o.length>0&&$){let D=o.map(({file:B,errors:H})=>{let E=H[0]?.code==="file-too-large"?"size":H[0]?.code==="file-invalid-type"?"type":"count";return{file:B,reason:E}});$(D)}},accept:se.length>0?se.reduce((t,o)=>(o.includes("/")?t[o]=[]:o.startsWith(".")&&(t[o]=[]),t),{}):void 0,multiple:j,maxSize:p,noClick:!0,noKeyboard:!0,disabled:!W||S});e.useImperativeHandle(a,()=>({focusTextarea:()=>fe.current?.focus({preventScroll:!0}),openFilePicker:()=>{ve.current=!0,Ke()}}),[Ke]);let $e=e.useCallback(t=>{if(!(t instanceof Element))return!1;let o=t;return o.closest(".rt-ChatbarDropOverlay")?!0:!!o.closest('button, [role="button"], a[href], input, textarea, select, [contenteditable], [tabindex]:not([tabindex="-1"])')},[]),ut=e.useCallback(t=>{S||$e(t.target)||t.pointerType==="mouse"&&t.button!==0||(t.preventDefault(),fe.current?.focus({preventScroll:!0}))},[S,$e,fe]);return e.createElement(_e.Provider,{value:e.useMemo(()=>({open:ae,setOpen:We,isOpenControlled:L,value:ee,setValue:Be,isValueControlled:R,size:T,expandOn:x,minLines:P,maxLines:n,sendMode:C,disabled:S,readOnly:z,onSubmit:w,rootRef:ye,textareaRef:fe,attachments:Y,setAttachments:Ve,isAttachmentsControlled:q,accept:X,multiple:j,maxAttachments:A,maxFileSize:p,paste:pe,pasteAccept:Z,clearOnSubmit:he,onAttachmentReject:$,dropzone:W,appendFiles:ie,appendFilesFromPaste:je,fileDialogOpenRef:ve}),[ae,We,L,ee,Be,R,T,x,P,n,C,S,z,w,Y,Ve,q,X,j,A,p,pe,Z,he,$,W,ie,je])},e.createElement(mt,{features:pt},e.createElement(st,{...c,ref:t=>{typeof i=="function"?i(t):i&&(i.current=t),ye.current=t},className:M("rt-ChatbarRoot",`rt-r-size-${T}`,r),style:{position:"relative",width:de,maxWidth:ne,...h},"data-state":ae?"open":"closed","data-disabled":S?"":void 0,"data-readonly":z?"":void 0,"data-drop-active":W&&Ue?"":void 0,"data-accent-color":k,"data-radius":Q,"data-panel-background":b,"data-material":b,"aria-expanded":ae,onBlurCapture:it},W&&e.createElement("input",{...ct()}),e.createElement("div",{...W?lt():{},style:{width:"100%",height:"100%"},onPointerDown:ut},e.createElement(ue.div,{className:M("rt-ChatbarBox",`rt-variant-${J??"surface"}`),style:{position:"relative"},"data-accent-color":k,"data-radius":Q,"data-panel-background":b,"data-material":b,layout:!0,transition:{layout:{type:"spring",visualDuration:.15,bounce:.1}}},e.createElement(ue.div,{className:"rt-ChatbarGrid",layout:"position",transition:{layout:{type:"spring",visualDuration:.15,bounce:.1}}},d),W&&Ue&&e.createElement("div",{className:"rt-ChatbarDropOverlay"},e.createElement("div",{className:"rt-ChatbarDropContent"},e.createElement(Re,{color:"gray",size:T,weight:"medium"},"Drop files here to attach"))))))))});Je.displayName="Chatbar.Root";var Qe=e.forwardRef((l,i)=>{let{className:r,style:h,asChild:d,onFocus:g,onInput:y,onChange:m,onPaste:s,onKeyDown:v,submitOnEnter:f=!1,rows:x,...P}=l,n=_(),{open:C,minLines:S,maxLines:z,expandOn:w,disabled:T,readOnly:J,setOpen:k,setValue:Q,textareaRef:O,value:K,isValueControlled:de,sendMode:ne,paste:me,appendFilesFromPaste:oe,size:ge}=n,I=e.useRef(0),X=e.useRef(0),j=e.useRef(0),A=e.useCallback(()=>{let a=O.current;if(!a)return;let c=window.getComputedStyle(a),b=parseFloat(c.lineHeight)||20,R=parseFloat(c.paddingTop)||0,F=parseFloat(c.paddingBottom)||0;I.current=b,X.current=R+F,j.current=Math.ceil(1*b)+R+F},[O]),p=e.useCallback(a=>{let c=O.current;if(!c)return;c.style.height="auto",I.current===0&&A();let b=I.current,R=X.current,F=a??C,Ce=F?S:1,ee=F?z:1,L=Math.ceil(Ce*b)+R,re=Math.ceil(ee*b)+R,te=Math.max(c.scrollHeight,L),ae=Math.min(te,re);c.style.height=`${ae}px`,te>re?(c.style.overflowY="auto",c.style.maxHeight=`${re}px`):(c.style.overflowY="hidden",c.style.maxHeight="none")},[C,S,z,O,A]);Oe(()=>{p()},[p,K,C]),Oe(()=>{if(!(w==="overflow"||w==="both")||C)return;let a=O.current;if(!a)return;a.style.height="auto",j.current===0&&A(),a.scrollHeight>j.current+1&&(k(!0),p(!0),requestAnimationFrame(()=>p(!0)))},[K,w,C,k,O,A,p]),Oe(()=>{A(),p()},[A,p,ge]),e.useEffect(()=>{let a=O.current;if(!a||typeof ResizeObserver>"u")return;let c=I.current,b=new ResizeObserver(()=>{let R=window.getComputedStyle(a),F=parseFloat(R.lineHeight)||20;F!==c&&(c=F,A(),requestAnimationFrame(()=>p()))});return b.observe(a),()=>b.disconnect()},[O,A,p]),e.useEffect(()=>{},[]);let pe=e.useCallback(a=>{T||J||((w==="focus"||w==="both")&&!C&&k(!0),g?.(a))},[T,J,w,C,k,g]),Z=e.useCallback(a=>{let c=a.currentTarget,b=c.value;Q(b),(w==="overflow"||w==="both")&&!C&&(c.style.height="auto",j.current===0&&A(),c.scrollHeight>j.current+1&&(k(!0),p(!0),requestAnimationFrame(()=>p(!0)))),requestAnimationFrame(()=>p()),m?.(a)},[w,C,k,Q,m,p,A]),he=e.useCallback(a=>{if(me){let b=Array.from(a.clipboardData?.items??[]).filter(R=>R.kind==="file").map(R=>R.getAsFile()).filter(R=>!!R);b.length>0&&(a.preventDefault(),oe(b))}setTimeout(()=>{C?p():p(!0)},0),s?.(a)},[me,C,p,s,oe]),$=e.useCallback(a=>{if(!f){v?.(a);return}if(a.key==="Enter"&&!a.shiftKey&&!a.altKey&&!a.ctrlKey&&!a.metaKey&&!a.nativeEvent.isComposing){if(T||J){v?.(a);return}if(ne==="never"){v?.(a);return}let b=K.trim().length>0||n.attachments.length>0;if(ne==="whenDirty"&&!b){v?.(a);return}a.preventDefault(),n.onSubmit?.({value:K,attachments:n.attachments}),n.clearOnSubmit&&(de||Q(""),n.setAttachments([]))}v?.(a)},[f,T,J,ne,K,de,Q,n,v]),W=d?U:"textarea";return e.createElement(ue.div,{className:M("rt-ChatbarField","rt-ChatbarTextarea",r),layout:"position",transition:{layout:{type:"spring",visualDuration:.15,bounce:.1}}},e.createElement(W,{...P,ref:a=>{typeof i=="function"?i(a):i&&(i.current=a),O.current=a},className:"rt-ChatbarInput",value:K,onInput:y,onChange:Z,onFocus:pe,onPaste:he,onKeyDown:$,disabled:T,readOnly:J,rows:C?S:1,spellCheck:P.spellCheck??!0,autoCorrect:P.autoCorrect??"on",style:h}))});Qe.displayName="Chatbar.Textarea";var Xe=e.forwardRef((l,i)=>{let{children:r,asChild:h,style:d,className:g,...y}=l;return _().open?null:e.createElement(h?U:"div",{...y,ref:i,className:M("rt-ChatbarInlineStart",g),style:d},r)});Xe.displayName="Chatbar.InlineStart";var Ze=e.forwardRef((l,i)=>{let{children:r,asChild:h,style:d,className:g,...y}=l;return _().open?null:e.createElement(h?U:"div",{...y,ref:i,className:M("rt-ChatbarInlineEnd",g),style:d},r)});Ze.displayName="Chatbar.InlineEnd";var et=e.forwardRef((l,i)=>{let{asChild:r,forceMount:h,renderAttachment:d,className:g,style:y,...m}=l,s=_();if(!(s.attachments.length>0)&&!h)return null;let f=r?U:"div";return e.createElement(ue.div,{layout:"position",transition:{layout:{type:"spring",visualDuration:.15,bounce:.1}}},e.createElement(f,{...m,ref:i,className:M("rt-ChatbarAttachmentsRow",g),style:y,role:"list","aria-label":m["aria-label"]??"Attachments"},e.createElement(Ge,{className:"rt-ChatbarScrollArea",scrollbars:"horizontal",size:"1"},e.createElement(ce,{align:"center",gap:"2",style:{minWidth:"fit-content"}},s.attachments.map(x=>e.createElement(Le,{key:x.id,attachment:x,asChild:!!d},d?.(x)))))))});et.displayName="Chatbar.AttachmentsRow";var Le=e.forwardRef((l,i)=>{let{attachment:r,asChild:h,className:d,style:g,children:y,...m}=l,s=_(),v=h?U:"div",f=!!r.url&&r.type.startsWith("image/");return e.createElement(v,{...m,ref:i,className:M("rt-ChatbarAttachment",d),style:g,role:"listitem","data-kind":f?"image":"file",title:r.name},y??e.createElement(ce,{align:"center",gap:"2",pr:f?void 0:"6"},e.createElement("div",{className:"rt-ChatbarAttachmentPreview","aria-hidden":!0},f?e.createElement("img",{className:"rt-ChatbarAttachmentImage",src:r.url,alt:""}):e.createElement(Ye,null)),!f&&e.createElement(ce,{direction:"column",gap:"0",style:{minWidth:0}},e.createElement(Re,{size:s.size,weight:"medium",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},r.name),e.createElement(Re,{size:"1",color:"gray"},Math.ceil(r.size/1024)," KB")),e.createElement(Me,{className:"rt-ChatbarAttachmentRemove","aria-label":`Remove ${r.name}`,size:"1",variant:"classic",highContrast:!0,color:"gray",onClick:()=>s.setAttachments(s.attachments.filter(x=>x.id!==r.id))},e.createElement(qe,null))))});Le.displayName="Chatbar.Attachment";var tt=e.forwardRef((l,i)=>{let{asChild:r,accept:h,multiple:d,className:g,style:y,...m}=l,s=_(),v=e.useRef(null),f=r?U:"button",x=h??s.accept,P=(Array.isArray(x)?x:x?.split(",")??[]).join(",");return e.useEffect(()=>{let n=()=>{s.fileDialogOpenRef.current=!1};return window.addEventListener("focus",n),()=>window.removeEventListener("focus",n)},[s.fileDialogOpenRef]),e.createElement(e.Fragment,null,e.createElement(f,{...m,ref:i,className:M("rt-ChatbarAttachTrigger",g),style:y,type:m.type??"button","aria-label":m["aria-label"]??"Add attachments",onPointerDown:n=>{s.fileDialogOpenRef.current=!0,m.onPointerDown?.(n)},onMouseDown:n=>{s.fileDialogOpenRef.current=!0,m.onMouseDown?.(n)},onClick:n=>{s.fileDialogOpenRef.current=!0,v.current&&v.current.click(),m.onClick?.(n)}}),e.createElement("input",{ref:v,type:"file",accept:P,multiple:d??s.multiple,tabIndex:-1,style:{display:"none"},onChange:n=>{let C=Array.from(n.currentTarget.files??[]);C.length>0&&s.appendFiles(C),s.fileDialogOpenRef.current=!1,n.currentTarget.value=""}}))});tt.displayName="Chatbar.AttachTrigger";var at=e.forwardRef((l,i)=>{let{asChild:r,children:h,className:d,style:g,...y}=l;if(!_().open)return null;let s=r?U:"div";return e.createElement(ue.div,{layout:"position",transition:{layout:{type:"spring",visualDuration:.15,bounce:.1}}},e.createElement(s,{...y,ref:i,className:M("rt-ChatbarRow",d),style:g},e.createElement(ce,{align:"center",justify:"between",width:"100%"},h)))});at.displayName="Chatbar.Row";var nt=e.forwardRef((l,i)=>{let{className:r,style:h,...d}=l;return e.createElement("div",{...d,ref:i,className:M("rt-ChatbarRowStart",r),style:h})});nt.displayName="Chatbar.RowStart";var ot=e.forwardRef((l,i)=>{let{className:r,style:h,...d}=l;return e.createElement("div",{...d,ref:i,className:M("rt-ChatbarRowEnd",r),style:h})});ot.displayName="Chatbar.RowEnd";var rt=e.forwardRef((l,i)=>{let{asChild:r,clearOnSend:h=!0,disabled:d,children:g,className:y,style:m,size:s,variant:v,"aria-label":f,"aria-labelledby":x,...P}=l,n=_(),S=n.value.trim().length>0||n.attachments.length>0,z=n.sendMode==="always"||n.sendMode==="whenDirty"&&S;if(n.sendMode==="never")return null;let w=T=>{n.disabled||n.readOnly||(n.onSubmit?.({value:n.value,attachments:n.attachments}),h&&(n.isValueControlled||n.setValue(""),n.clearOnSubmit&&n.setAttachments([])),P.onClick?.(T))};return e.createElement(Me,{...P,ref:i,size:s??n.size,variant:v??(n.open?"solid":"ghost"),disabled:d||n.disabled||n.readOnly,className:M("rt-ChatbarSend",y),style:{opacity:z?1:0,pointerEvents:z?"auto":"none",...m},asChild:r,onClick:w,"aria-label":f??(x?void 0:"Send"),"aria-labelledby":x},g??e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"lucide lucide-arrow-right-icon lucide-arrow-right"},e.createElement("path",{d:"M5 12h14"}),e.createElement("path",{d:"m12 5 7 7-7 7"})))});rt.displayName="Chatbar.Send";export{Je as a,Qe as b,Xe as c,Ze as d,et as e,Le as f,tt as g,at as h,nt as i,ot as j,rt as k,ft as l};
|
|
2
|
+
//# sourceMappingURL=chunk-MOR3NSXQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as c}from"./chunk-VK7RNXUO.js";import{a}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as c}from"./chunk-VK7RNXUO.js";import{a}from"./chunk-PLWXTEVE.js";import*as e from"react";import{Toggle as b}from"radix-ui";var m=e.forwardRef(({pressed:l,onPressedChange:i,defaultPressed:g,...s},p)=>{let{"aria-label":r,"aria-labelledby":o,children:t}=s,n=e.useRef(null);e.useEffect(()=>{n.current=null},[o]);let u=e.useCallback(()=>{if(r)return r;if(o){if(n.current===null){let f=document.getElementById(o);n.current=f?.textContent||"Toggle icon button"}return n.current}return typeof t=="string"?t:e.isValidElement(t)&&typeof t.props?.children=="string"?t.props.children:"Toggle icon button"},[r,o,t]),{handlePressedChange:d}=c({pressed:l,onPressedChange:i,getAccessibleName:u,componentName:"ToggleIconButton"});return e.createElement(b.Root,{pressed:l,onPressedChange:d,defaultPressed:g,asChild:!0},e.createElement(a,{...s,ref:p}))});m.displayName="ToggleIconButton";export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-OSRJRBKP.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as l}from"./chunk-2N2AQNJH.js";import{a as r}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-2N2AQNJH.js";import{a as r}from"./chunk-RMKXWYOV.js";import{a}from"./chunk-2UPAYDKR.js";import*as t from"react";import R from"classnames";var P=t.forwardRef(({className:i,tooltip:o,tooltipSide:s="top",tooltipAlign:c="center",tooltipDelayDuration:p,tooltipDisableHoverableContent:b,...e},u)=>{let{tooltipId:m,hasTooltip:d,accessibilityProps:B}=l(o),y="aria-label"in e&&e["aria-label"],f="aria-labelledby"in e&&e["aria-labelledby"],I="children"in e&&e.children;!y&&!f&&!I&&console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
|
|
2
2
|
- aria-label prop with descriptive text
|
|
3
3
|
- aria-labelledby prop referencing a label element
|
|
4
4
|
- or visible text children`);let n=t.createElement(a,{...e,...B,ref:u,className:R("rt-IconButton",i)});return d?t.createElement(r,{content:o,side:s,align:c,delayDuration:p,disableHoverableContent:b,id:m},n):n});P.displayName="IconButton";export{P as a};
|
|
5
|
-
//# sourceMappingURL=chunk-
|
|
5
|
+
//# sourceMappingURL=chunk-PLWXTEVE.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as v}from"./chunk-VX6ARMWP.js";import{a as f}from"./chunk-XGGLYV5D.js";import{b as P}from"./chunk-IX5HIHVI.js";import{a as h,e as l,f as u,g as R}from"./chunk-V32EP3S7.js";import{b}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as v}from"./chunk-VX6ARMWP.js";import{a as f}from"./chunk-XGGLYV5D.js";import{b as P}from"./chunk-IX5HIHVI.js";import{a as h,e as l,f as u,g as R}from"./chunk-V32EP3S7.js";import{b}from"./chunk-YUP6EICB.js";import{a as x}from"./chunk-GSTOGDAJ.js";import{a as m}from"./chunk-6FLLFCBU.js";import{a as k}from"./chunk-UMX5MGLG.js";import{a as z}from"./chunk-3XT5P2HO.js";var _={};z(_,{Item:()=>g,Root:()=>I});import*as o from"react";import d from"classnames";import{Context as D}from"radix-ui/internal";var y="CheckboxCards",[S]=D.createContextScope(y,[h]),G=h(),[B,E]=S(y),I=o.forwardRef((r,s)=>{let a=b(),c=r.panelBackground??a.panelBackground,{__scopeCheckboxCards:t,className:p,color:e,panelBackground:C,...i}=m(r,f,x),n=G(t);return o.createElement(B,{scope:t,size:r.size,variant:r.variant,highContrast:r.highContrast},o.createElement(v,{asChild:!0},o.createElement(l,{...n,"data-accent-color":e,"data-panel-background":c,...i,ref:s,className:d("rt-CheckboxCardsRoot",p)})))});I.displayName="CheckboxCards.Root";var g=o.forwardRef(({__scopeCheckboxCards:r,children:s,className:a,style:c,...t},p)=>{let e=E("CheckboxCardsItem",r),C=G(r),{className:i}=m({size:e?.size,variant:e?.variant||"solid",highContrast:e?.highContrast},k),n=e?.variant?`rt-variant-${e.variant}`:void 0,N=e?.size?`rt-r-size-${e.size}`:void 0;return o.createElement("label",{className:d("rt-BaseCard","rt-CheckboxCardsItem",n,N,a),style:c},s,o.createElement(u,{...C,...t,ref:p,className:d("rt-reset","rt-BaseCheckboxRoot","rt-CheckboxCardCheckbox",i)},o.createElement(R,{...C,asChild:!0,className:"rt-BaseCheckboxIndicator"},o.createElement(P,null))))});g.displayName="CheckboxCards.Item";export{I as a,g as b,_ as c};
|
|
2
|
+
//# sourceMappingURL=chunk-QEOAXJLN.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as r}from"./chunk-BPVVFHYD.js";import{c as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as r}from"./chunk-BPVVFHYD.js";import{c as i}from"./chunk-YUP6EICB.js";import{a as p}from"./chunk-H7ST535H.js";import{a as e}from"./chunk-6FLLFCBU.js";import*as o from"react";import v from"classnames";import{Tooltip as t}from"radix-ui";var u=o.forwardRef((n,s)=>{let{children:l,className:m,open:a,defaultOpen:f,onOpenChange:P,delayDuration:T,disableHoverableContent:c,content:d,container:R,forceMount:C,...y}=e(n,r),h={open:a,defaultOpen:f,onOpenChange:P,delayDuration:T,disableHoverableContent:c};return o.createElement(t.Root,{...h},o.createElement(t.Trigger,{asChild:!0},l),o.createElement(t.Portal,{container:R,forceMount:C},o.createElement(i,{asChild:!0},o.createElement(t.Content,{sideOffset:4,collisionPadding:10,...y,asChild:!1,ref:s,className:v("rt-TooltipContent",m)},o.createElement(p,{as:"p",className:"rt-TooltipText",size:"1"},d),o.createElement(t.Arrow,{className:"rt-TooltipArrow"})))))});u.displayName="Tooltip";export{u as a};
|
|
2
|
+
//# sourceMappingURL=chunk-RMKXWYOV.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as m,b as T,c as N}from"./chunk-TGN5ZJU5.js";import{b as h,c as I}from"./chunk-IX5HIHVI.js";import{b as v,c as y}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as m,b as T,c as N}from"./chunk-TGN5ZJU5.js";import{b as h,c as I}from"./chunk-IX5HIHVI.js";import{b as v,c as y}from"./chunk-YUP6EICB.js";import{a as g}from"./chunk-GSTOGDAJ.js";import{a as f}from"./chunk-6FLLFCBU.js";import{a as A}from"./chunk-3XT5P2HO.js";var M={};A(M,{Content:()=>w,Group:()=>G,Item:()=>E,Label:()=>L,Root:()=>x,Separator:()=>D,Trigger:()=>b});import*as e from"react";import c from"classnames";import{Select as a,ScrollArea as S}from"radix-ui";var u=e.createContext({}),x=t=>{let{children:o,size:r=m.size.default,...l}=t;return e.createElement(a.Root,{...l},e.createElement(u.Provider,{value:e.useMemo(()=>({size:r}),[r])},o))};x.displayName="Select.Root";var b=e.forwardRef((t,o)=>{let r=e.useContext(u),{children:l,className:i,color:n,radius:P,placeholder:d,error:p,loading:s,disabled:R,readOnly:C,...V}=f({size:r?.size,...t},{size:m.size},T,g),{panelBackground:z}=t,k=e.useMemo(()=>({"aria-invalid":p||void 0,"aria-busy":s||void 0,"aria-disabled":R||void 0,"aria-readonly":C||void 0}),[p,s,R,C]);return e.createElement(a.Trigger,{asChild:!0},e.createElement("button",{"data-accent-color":n,"data-radius":P,"data-panel-background":z,"data-error":p,"data-loading":s,...V,...k,ref:o,className:c("rt-reset","rt-SelectTrigger",i)},e.createElement("span",{className:"rt-SelectTriggerInner"},e.createElement(a.Value,{placeholder:d},l)),e.createElement(a.Icon,{asChild:!0},s?e.createElement("div",{className:"rt-SelectIcon rt-SelectLoadingIcon","aria-hidden":"true"},e.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},e.createElement("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeDasharray:"32",strokeDashoffset:"32",className:"rt-SelectLoadingIconCircle"}))):e.createElement(I,{className:"rt-SelectIcon"}))))});b.displayName="Select.Trigger";var w=e.forwardRef((t,o)=>{let r=e.useContext(u),{className:l,children:i,color:n,container:P,...d}=f({size:r?.size,...t},{size:m.size},N),p=v(),s=n||p.accentColor;return e.createElement(a.Portal,{container:P},e.createElement(y,{asChild:!0},e.createElement(a.Content,{"data-accent-color":s,sideOffset:4,...d,asChild:!1,ref:o,className:c("rt-PopperContent","rt-BaseMenuContent","rt-SelectContent",l)},e.createElement(S.Root,{type:"auto",className:"rt-ScrollAreaRoot"},e.createElement(a.Viewport,{asChild:!0,className:c("rt-BaseMenuViewport","rt-SelectViewport")},e.createElement(S.Viewport,{className:"rt-ScrollAreaViewport",style:{overflowY:void 0}},i)),e.createElement(S.Scrollbar,{className:"rt-ScrollAreaScrollbar rt-r-size-1",orientation:"vertical"},e.createElement(S.Thumb,{className:"rt-ScrollAreaThumb"}))))))});w.displayName="Select.Content";var E=e.forwardRef((t,o)=>{let{className:r,children:l,...i}=t,n=typeof l!="string";return e.createElement(a.Item,{...i,asChild:!1,ref:o,className:c("rt-reset","rt-BaseMenuItem","rt-SelectItem",{"rt-SelectItemRich":n},r)},e.createElement(a.ItemIndicator,{className:"rt-SelectItemIndicator"},e.createElement(h,{className:"rt-SelectItemIndicatorIcon"})),e.createElement(a.ItemText,null,l))});E.displayName="Select.Item";var G=e.forwardRef(({className:t,...o},r)=>e.createElement(a.Group,{...o,asChild:!1,ref:r,className:c("rt-SelectGroup",t)}));G.displayName="Select.Group";var L=e.forwardRef(({className:t,...o},r)=>e.createElement(a.Label,{...o,asChild:!1,ref:r,className:c("rt-BaseMenuLabel","rt-SelectLabel",t)}));L.displayName="Select.Label";var D=e.forwardRef(({className:t,...o},r)=>e.createElement(a.Separator,{...o,asChild:!1,ref:r,className:c("rt-BaseMenuSeparator","rt-SelectSeparator",t)}));D.displayName="Select.Separator";export{x as a,b,w as c,E as d,G as e,L as f,D as g,M as h};
|
|
2
|
+
//# sourceMappingURL=chunk-S56YSRHP.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as s}from"./chunk-VK7RNXUO.js";import{a as n}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as s}from"./chunk-VK7RNXUO.js";import{a as n}from"./chunk-6IGTK4JE.js";import*as e from"react";import{Toggle as f}from"radix-ui";var m=e.forwardRef(({pressed:o,onPressedChange:r,defaultPressed:a,children:t,...g},p)=>{let l=e.useCallback(()=>typeof t=="string"?t:e.isValidElement(t)&&typeof t.props?.children=="string"?t.props.children:"Toggle button",[t]),{handlePressedChange:u}=s({pressed:o,onPressedChange:r,getAccessibleName:l,componentName:"ToggleButton"});return e.createElement(f.Root,{pressed:o,onPressedChange:u,defaultPressed:a,asChild:!0},e.createElement(n,{...g,ref:p},t))});m.displayName="ToggleButton";export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-TOLLPRMM.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as U,b as X,c as Y}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as U,b as X,c as Y}from"./chunk-FXUUI6Z2.js";import{a as V,b as Q,c as I}from"./chunk-4Z33XHOK.js";import{b as K,c as J}from"./chunk-IX5HIHVI.js";import{a as A}from"./chunk-MJJ7XDIP.js";import{b as H,c as q}from"./chunk-YUP6EICB.js";import{c as j}from"./chunk-FWB47YCH.js";import{a as $}from"./chunk-GSTOGDAJ.js";import{a as w}from"./chunk-6FLLFCBU.js";import{a as xo}from"./chunk-3XT5P2HO.js";var fo={};xo(fo,{Content:()=>ao,Empty:()=>io,Group:()=>lo,Input:()=>no,Item:()=>bo,Label:()=>mo,List:()=>so,Root:()=>eo,Separator:()=>po,Trigger:()=>to,Value:()=>ro});import*as o from"react";import p from"classnames";import{useControllableState as z}from"radix-ui/internal";import{Command as h}from"cmdk";var Z=o.createContext(null),R=t=>{let a=o.useContext(Z);if(!a){let e=t?`Combobox.${t}`:"Combobox components";throw new Error(`${e} must be used within Combobox.Root`)}return a},_=o.createContext(null),oo=()=>o.useContext(_),eo=t=>{let{children:a,size:e=V.size.default,highContrast:r=V.highContrast.default,value:l,defaultValue:n=null,onValueChange:m,open:d,defaultOpen:C=!1,onOpenChange:b,placeholder:s="Select an option",searchPlaceholder:c="Search...",searchValue:P,defaultSearchValue:u="",onSearchValueChange:x,filter:i,shouldFilter:f=!0,loop:g=!0,disabled:S,resetSearchOnSelect:E=!0,color:O,displayValue:v,...co}=t,k=o.useId(),[L,y]=z({prop:d,defaultProp:C,onChange:b}),[N,D]=z({prop:l,defaultProp:n,onChange:m}),[M,T]=z({prop:P,defaultProp:u,onChange:x}),G=o.useMemo(()=>{if(v!=null)return typeof v=="function"?v(N):v},[v,N]),W=o.useCallback(uo=>{D(uo),y(!1),E&&T("")},[y,T,D,E]),Co=o.useMemo(()=>({value:N,onSelect:W,open:L,setOpen:y,size:e,highContrast:r,placeholder:s,searchPlaceholder:c,disabled:S,color:O,displayValue:G,listboxId:k}),[N,W,L,y,e,r,s,c,S,O,G,k]),B=o.useRef({filter:i,shouldFilter:f,loop:g,searchValue:M,setSearchValue:T});return B.current={filter:i,shouldFilter:f,loop:g,searchValue:M,setSearchValue:T},o.createElement(Z.Provider,{value:Co},o.createElement(F.Provider,{value:B},o.createElement(U,{open:L,onOpenChange:y,...co},a)))};eo.displayName="Combobox.Root";var F=o.createContext(null),to=o.forwardRef((t,a)=>{let e=R("Trigger"),{children:r,className:l,placeholder:n,disabled:m,readOnly:d,error:C,loading:b,color:s,radius:c,...P}=w({size:e.size,highContrast:e.highContrast,...t},{size:V.size,highContrast:V.highContrast},Q,$),{material:u,panelBackground:x}=t,i=m??e.disabled,f=s??e.color,g=o.createElement(o.Fragment,null,o.createElement("span",{className:"rt-SelectTriggerInner"},o.createElement("span",{className:"rt-ComboboxValue"},e.displayValue??e.value??n??e.placeholder)),b?o.createElement("div",{className:"rt-SelectIcon rt-SelectLoadingIcon","aria-hidden":"true"},o.createElement("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},o.createElement("circle",{cx:"8",cy:"8",r:"6.5",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeDasharray:"6 34",strokeDashoffset:"0",className:"rt-SelectLoadingSpinner"}))):o.createElement(J,{className:"rt-SelectIcon"})),{type:S,...E}=P;return o.createElement(X,{disabled:i},o.createElement("button",{"data-accent-color":f,"data-radius":c,"data-panel-background":x,"data-material":u,"data-error":C,"data-loading":b,"data-disabled":i||void 0,"data-read-only":d||void 0,...E,role:"combobox","aria-autocomplete":"list","aria-controls":e.open?e.listboxId:void 0,"aria-expanded":e.open,"aria-haspopup":"listbox","aria-disabled":i||void 0,type:S??"button",disabled:i,ref:a,className:p("rt-reset","rt-SelectTrigger","rt-ComboboxTrigger",l)},r?A(r):g))});to.displayName="Combobox.Trigger";var ro=o.forwardRef(({placeholder:t,children:a,className:e,...r},l)=>{let n=R("Value"),m=n.displayValue??n.value??void 0;return o.createElement("span",{...r,ref:l,className:p("rt-ComboboxValue",e)},m??a??t??n.placeholder)});ro.displayName="Combobox.Value";var ao=o.forwardRef((t,a)=>{let e=R("Content"),r=o.useContext(F),l=H(),n=l.panelBackground,m=t.size??e.size??I.size.default,d=t.variant??I.variant.default,C=t.highContrast??e.highContrast??I.highContrast.default,{className:b,children:s,color:c,forceMount:P,container:u,...x}=w({...t,size:m,variant:d,highContrast:C},I),i=c||e.color||l.accentColor,f=o.useMemo(()=>({variant:d,size:String(m),color:i,material:n,highContrast:C,loop:r?.current.loop,shouldFilter:r?.current.shouldFilter,filter:r?.current.filter}),[d,m,i,n,C,r]);return o.createElement(Y,{size:m,"data-accent-color":i,"data-material":n,"data-panel-background":n,align:"start",sideOffset:4,collisionPadding:10,...x,forceMount:P===!0?!0:void 0,container:u,ref:a,className:p("rt-PopperContent","rt-BaseMenuContent","rt-ComboboxContent",b)},o.createElement(q,{asChild:!0},o.createElement(_.Provider,{value:f},o.createElement(h,{loop:r?.current.loop,shouldFilter:r?.current.shouldFilter,filter:r?.current.filter,className:"rt-ComboboxCommand"},s))))});ao.displayName="Combobox.Content";var no=o.forwardRef(({className:t,startAdornment:a,endAdornment:e,placeholder:r,variant:l,value:n,onValueChange:m,...d},C)=>{let b=R("Input"),s=oo(),c=o.useContext(F),P=s?.variant??"solid",u=l??(P==="solid"?"surface":"soft"),x=n??c?.current.searchValue??"",i=m??c?.current.setSearchValue,f=s?.size?`rt-r-size-${s.size}`:void 0,g=o.createElement("div",{className:p("rt-TextFieldRoot","rt-ComboboxInputRoot",f,`rt-variant-${u}`),"data-accent-color":s?.color,"data-material":s?.material,"data-panel-background":s?.material},a?o.createElement("div",{className:"rt-TextFieldSlot"},a):null,o.createElement(h.Input,{...d,ref:C,value:x,onValueChange:i,placeholder:r??b.searchPlaceholder,className:p("rt-reset","rt-TextFieldInput",t)}),e?o.createElement("div",{className:"rt-TextFieldSlot","data-side":"right"},e):null);return s?o.createElement("div",{className:"rt-ComboboxSearch"},g):g});no.displayName="Combobox.Input";var so=o.forwardRef(({className:t,children:a,...e},r)=>{let l=R("List");return o.createElement("div",{className:"rt-ComboboxScrollArea"},o.createElement("div",{className:p("rt-BaseMenuViewport","rt-ComboboxViewport")},o.createElement(h.List,{...e,id:l.listboxId,ref:r,role:"listbox","aria-label":"Options",className:p("rt-ComboboxList",t)},a)))});so.displayName="Combobox.List";var io=o.forwardRef(({className:t,...a},e)=>o.createElement(h.Empty,{...a,ref:e,className:p("rt-ComboboxEmpty",t)}));io.displayName="Combobox.Empty";var lo=o.forwardRef(({className:t,...a},e)=>o.createElement(h.Group,{...a,ref:e,className:p("rt-BaseMenuGroup","rt-ComboboxGroup",t)}));lo.displayName="Combobox.Group";var mo=o.forwardRef(({className:t,...a},e)=>o.createElement("div",{...a,ref:e,className:p("rt-BaseMenuLabel","rt-ComboboxLabel",t)}));mo.displayName="Combobox.Label";var po=o.forwardRef(({className:t,...a},e)=>o.createElement(h.Separator,{...a,ref:e,className:p("rt-BaseMenuSeparator","rt-ComboboxSeparator",t)}));po.displayName="Combobox.Separator";var bo=o.forwardRef(({className:t,children:a,label:e,value:r,disabled:l,onSelect:n,keywords:m,...d},C)=>{let b=R("Item"),s=oo(),c=r!=null&&b.value===r,P=l??b.disabled??!1,u=s?.size?`rt-r-size-${s.size}`:void 0,x=b.onSelect,i=o.useCallback(()=>{r!=null&&(x(r),n?.(r))},[x,r,n]),f=m??(e?[e]:void 0);return o.createElement(h.Item,{...d,value:r,keywords:f,role:"option","aria-selected":c,disabled:P||void 0,ref:C,onSelect:i,className:p("rt-reset","rt-BaseMenuItem","rt-ComboboxItem",t)},c?o.createElement("span",{className:p("rt-BaseMenuItemIndicator","rt-ComboboxItemIndicator",u)},o.createElement(K,{className:p("rt-BaseMenuItemIndicatorIcon","rt-ComboboxItemIndicatorIcon",u)})):null,o.createElement(j,null,a))});bo.displayName="Combobox.Item";export{eo as a,to as b,ro as c,ao as d,no as e,so as f,io as g,lo as h,mo as i,po as j,bo as k,fo as l};
|
|
2
|
+
//# sourceMappingURL=chunk-UGD7Z3L4.js.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
var i={sans:"--font-sans",mono:"--font-mono",serif:"--font-serif"},s={body:"--font-body",heading:"--font-heading",code:"--font-code",strong:"--font-strong",em:"--font-em",quote:"--font-quote"},l={system:"-apple-system, BlinkMacSystemFont, 'Segoe UI (Custom)', Roboto, 'Helvetica Neue', system-ui, sans-serif",inter:"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI (Custom)', Roboto, system-ui, sans-serif",poppins:"'Poppins', -apple-system, BlinkMacSystemFont, system-ui, sans-serif",openSans:"'Open Sans (Custom)', -apple-system, BlinkMacSystemFont, system-ui, sans-serif",systemMono:"'Menlo', 'Consolas (Custom)', 'Bitstream Vera Sans Mono', monospace",jetbrainsMono:"'JetBrains Mono', 'Menlo', 'Consolas (Custom)', monospace",firaCode:"'Fira Code', 'Menlo', 'Consolas (Custom)', monospace",sourceCodePro:"'Source Code Pro', 'Menlo', 'Consolas (Custom)', monospace",systemSerif:"'Times New Roman', 'Times', 'Georgia', 'Cambria', serif",playfair:"'Playfair Display', 'Times New Roman', 'Georgia', serif",georgia:"'Georgia', 'Times New Roman', 'Times', serif",lora:"'Lora', 'Georgia', 'Times New Roman', serif"};function m(o,t,e){for(let r of Object.keys(t)){let n=e[r];n&&o.style.setProperty(t[r],n)}}function c(o,t){for(let e of Object.values(t))o.style.removeProperty(e)}function f(o,{root:t=document.documentElement,themeElement:e=document.querySelector(".radix-themes")}={}){o.stacks&&m(t,i,o.stacks),o.roles&&e&&m(e,s,o.roles)}function u(o){let t=[],e=Object.entries(o.stacks??{}).filter(([,n])=>n);e.length&&t.push([":root {",...e.map(([n,a])=>` ${i[n]}: ${a};`),"}"].join(`
|
|
2
|
+
`));let r=Object.entries(o.roles??{}).filter(([,n])=>n);return r.length&&t.push([".radix-themes {",...r.map(([n,a])=>` ${s[n]}: ${a};`),"}"].join(`
|
|
3
|
+
`)),t.join(`
|
|
4
|
+
|
|
5
|
+
`)}function d({root:o=document.documentElement,themeElement:t=document.querySelector(".radix-themes")}={}){c(o,i),t&&c(t,s)}function g({themeElement:o=document.querySelector(".radix-themes")}={}){let t=getComputedStyle(o??document.documentElement),e=r=>t.getPropertyValue(r).trim()||void 0;return{stacks:{sans:e(i.sans),mono:e(i.mono),serif:e(i.serif)},roles:{body:e(s.body),heading:e(s.heading),code:e(s.code),strong:e(s.strong),em:e(s.em),quote:e(s.quote)}}}export{i as a,s as b,l as c,f as d,u as e,d as f,g};
|
|
6
|
+
//# sourceMappingURL=chunk-VA5A4MHU.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/helpers/font-config.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Runtime font configuration for Kookie UI.\n *\n * This is a thin, typed wrapper over the CSS tokens in `styles/tokens/font-family.css` \u2014\n * it writes the same variables you would write by hand, and nothing else. Prefer plain CSS\n * where you can; reach for this when the stacks are only known at runtime (a theme editor,\n * a user-selectable typeface).\n *\n * Two tiers, matching the CSS:\n *\n * - `stacks` \u2014 which typefaces exist: `sans`, `mono`, `serif`. Written to `:root`.\n * - `roles` \u2014 which stack each role uses: `body`, `heading`, `code`, `strong`, `em`,\n * `quote`. Written to the theme element, since roles are per-theme.\n */\n\n/** Tier 1 \u2014 the typefaces available to the theme. */\nexport interface FontStacks {\n /** Sans-serif stack. Backs `font=\"sans\"` and, by default, body text. */\n sans?: string;\n /** Monospace stack. Backs `font=\"mono\"` and `Code`. */\n mono?: string;\n /** Serif stack. Backs `font=\"serif\"`, `Em` and `Quote`. */\n serif?: string;\n}\n\n/** Tier 2 \u2014 which stack each role of text uses. */\nexport interface FontRoles {\n /** Body text: `Text`, inputs, buttons, and anything that does not opt out. */\n body?: string;\n /** `Heading`. Follows `body` when left unset. */\n heading?: string;\n /** `Code`. */\n code?: string;\n /** `Strong`. */\n strong?: string;\n /** `Em`. */\n em?: string;\n /** `Quote`. */\n quote?: string;\n}\n\nexport interface FontConfig {\n stacks?: FontStacks;\n roles?: FontRoles;\n}\n\n/** CSS custom properties backing each stack. Declared on `:root`. */\nexport const FONT_STACK_VARIABLES = {\n sans: '--font-sans',\n mono: '--font-mono',\n serif: '--font-serif',\n} as const satisfies Record<keyof FontStacks, `--font-${string}`>;\n\n/** CSS custom properties backing each role. Declared on the theme element. */\nexport const FONT_ROLE_VARIABLES = {\n body: '--font-body',\n heading: '--font-heading',\n code: '--font-code',\n strong: '--font-strong',\n em: '--font-em',\n quote: '--font-quote',\n} as const satisfies Record<keyof FontRoles, `--font-${string}`>;\n\n/**\n * Ready-made stacks, each ending in a system fallback.\n *\n * The webfont entries assume the face is already loaded \u2014 via\n * `import '@womp/kookie-ui/fonts.css'`, `next/font`, or your own `@font-face`.\n * Kookie's core stylesheet deliberately loads none.\n */\nexport const FONT_STACKS = {\n // Sans\n system: \"-apple-system, BlinkMacSystemFont, 'Segoe UI (Custom)', Roboto, 'Helvetica Neue', system-ui, sans-serif\",\n inter: \"'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI (Custom)', Roboto, system-ui, sans-serif\",\n poppins: \"'Poppins', -apple-system, BlinkMacSystemFont, system-ui, sans-serif\",\n openSans: \"'Open Sans (Custom)', -apple-system, BlinkMacSystemFont, system-ui, sans-serif\",\n\n // Mono\n systemMono: \"'Menlo', 'Consolas (Custom)', 'Bitstream Vera Sans Mono', monospace\",\n jetbrainsMono: \"'JetBrains Mono', 'Menlo', 'Consolas (Custom)', monospace\",\n firaCode: \"'Fira Code', 'Menlo', 'Consolas (Custom)', monospace\",\n sourceCodePro: \"'Source Code Pro', 'Menlo', 'Consolas (Custom)', monospace\",\n\n // Serif\n systemSerif: \"'Times New Roman', 'Times', 'Georgia', 'Cambria', serif\",\n playfair: \"'Playfair Display', 'Times New Roman', 'Georgia', serif\",\n georgia: \"'Georgia', 'Times New Roman', 'Times', serif\",\n lora: \"'Lora', 'Georgia', 'Times New Roman', serif\",\n} as const;\n\nfunction write<K extends string>(target: HTMLElement, variables: Record<K, string>, values: Partial<Record<K, string>>) {\n for (const key of Object.keys(variables) as K[]) {\n const value = values[key];\n if (value) target.style.setProperty(variables[key], value);\n }\n}\n\nfunction clear(target: HTMLElement, variables: Record<string, string>) {\n for (const variable of Object.values(variables)) {\n target.style.removeProperty(variable);\n }\n}\n\n/**\n * Apply a font configuration.\n *\n * Stacks land on `:root` and roles on `themeElement`, mirroring where the stylesheet\n * declares them \u2014 writing a role to `:root` would not survive, because the theme\n * element declares its own.\n *\n * @example\n * ```ts\n * // Serif headings over a sans body\n * applyFontConfig({\n * stacks: { sans: FONT_STACKS.inter, serif: FONT_STACKS.playfair },\n * roles: { heading: 'var(--font-serif)' },\n * });\n * ```\n */\nexport function applyFontConfig(\n config: FontConfig,\n { root = document.documentElement, themeElement = document.querySelector<HTMLElement>('.radix-themes') }: { root?: HTMLElement; themeElement?: HTMLElement | null } = {},\n): void {\n if (config.stacks) write(root, FONT_STACK_VARIABLES, config.stacks);\n if (config.roles && themeElement) write(themeElement, FONT_ROLE_VARIABLES, config.roles);\n}\n\n/**\n * Render a font configuration as a CSS string, for injecting into a stylesheet or\n * emitting server-side.\n */\nexport function generateFontCSS(config: FontConfig): string {\n const blocks: string[] = [];\n\n const stacks = Object.entries(config.stacks ?? {}).filter(([, value]) => value);\n if (stacks.length) {\n blocks.push([':root {', ...stacks.map(([key, value]) => ` ${FONT_STACK_VARIABLES[key as keyof FontStacks]}: ${value};`), '}'].join('\\n'));\n }\n\n const roles = Object.entries(config.roles ?? {}).filter(([, value]) => value);\n if (roles.length) {\n blocks.push(['.radix-themes {', ...roles.map(([key, value]) => ` ${FONT_ROLE_VARIABLES[key as keyof FontRoles]}: ${value};`), '}'].join('\\n'));\n }\n\n return blocks.join('\\n\\n');\n}\n\n/** Drop every inline font override, falling back to the stylesheet's defaults. */\nexport function resetFonts({ root = document.documentElement, themeElement = document.querySelector<HTMLElement>('.radix-themes') }: { root?: HTMLElement; themeElement?: HTMLElement | null } = {}): void {\n clear(root, FONT_STACK_VARIABLES);\n if (themeElement) clear(themeElement, FONT_ROLE_VARIABLES);\n}\n\n/** Read the stacks and roles currently in effect. */\nexport function getCurrentFontConfig({ themeElement = document.querySelector<HTMLElement>('.radix-themes') }: { themeElement?: HTMLElement | null } = {}): Required<FontConfig> {\n // Roles resolve against the theme element, so read both tiers from it \u2014 it inherits\n // the stacks from `:root` and is the only place the roles are declared.\n const computed = getComputedStyle(themeElement ?? document.documentElement);\n const read = (variable: string) => computed.getPropertyValue(variable).trim() || undefined;\n\n return {\n stacks: {\n sans: read(FONT_STACK_VARIABLES.sans),\n mono: read(FONT_STACK_VARIABLES.mono),\n serif: read(FONT_STACK_VARIABLES.serif),\n },\n roles: {\n body: read(FONT_ROLE_VARIABLES.body),\n heading: read(FONT_ROLE_VARIABLES.heading),\n code: read(FONT_ROLE_VARIABLES.code),\n strong: read(FONT_ROLE_VARIABLES.strong),\n em: read(FONT_ROLE_VARIABLES.em),\n quote: read(FONT_ROLE_VARIABLES.quote),\n },\n };\n}\n"],
|
|
5
|
+
"mappings": "AA+CO,IAAMA,EAAuB,CAClC,KAAM,cACN,KAAM,cACN,MAAO,cACT,EAGaC,EAAsB,CACjC,KAAM,cACN,QAAS,iBACT,KAAM,cACN,OAAQ,gBACR,GAAI,YACJ,MAAO,cACT,EASaC,EAAc,CAEzB,OAAQ,0GACR,MAAO,iGACP,QAAS,sEACT,SAAU,iFAGV,WAAY,sEACZ,cAAe,4DACf,SAAU,uDACV,cAAe,6DAGf,YAAa,0DACb,SAAU,0DACV,QAAS,+CACT,KAAM,6CACR,EAEA,SAASC,EAAwBC,EAAqBC,EAA8BC,EAAoC,CACtH,QAAWC,KAAO,OAAO,KAAKF,CAAS,EAAU,CAC/C,IAAMG,EAAQF,EAAOC,CAAG,EACpBC,GAAOJ,EAAO,MAAM,YAAYC,EAAUE,CAAG,EAAGC,CAAK,CAC3D,CACF,CAEA,SAASC,EAAML,EAAqBC,EAAmC,CACrE,QAAWK,KAAY,OAAO,OAAOL,CAAS,EAC5CD,EAAO,MAAM,eAAeM,CAAQ,CAExC,CAkBO,SAASC,EACdC,EACA,CAAE,KAAAC,EAAO,SAAS,gBAAiB,aAAAC,EAAe,SAAS,cAA2B,eAAe,CAAE,EAA+D,CAAC,EACjK,CACFF,EAAO,QAAQT,EAAMU,EAAMb,EAAsBY,EAAO,MAAM,EAC9DA,EAAO,OAASE,GAAcX,EAAMW,EAAcb,EAAqBW,EAAO,KAAK,CACzF,CAMO,SAASG,EAAgBH,EAA4B,CAC1D,IAAMI,EAAmB,CAAC,EAEpBC,EAAS,OAAO,QAAQL,EAAO,QAAU,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAEJ,CAAK,IAAMA,CAAK,EAC1ES,EAAO,QACTD,EAAO,KAAK,CAAC,UAAW,GAAGC,EAAO,IAAI,CAAC,CAACV,EAAKC,CAAK,IAAM,KAAKR,EAAqBO,CAAuB,CAAC,KAAKC,CAAK,GAAG,EAAG,GAAG,EAAE,KAAK;AAAA,CAAI,CAAC,EAG3I,IAAMU,EAAQ,OAAO,QAAQN,EAAO,OAAS,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAEJ,CAAK,IAAMA,CAAK,EAC5E,OAAIU,EAAM,QACRF,EAAO,KAAK,CAAC,kBAAmB,GAAGE,EAAM,IAAI,CAAC,CAACX,EAAKC,CAAK,IAAM,KAAKP,EAAoBM,CAAsB,CAAC,KAAKC,CAAK,GAAG,EAAG,GAAG,EAAE,KAAK;AAAA,CAAI,CAAC,EAGzIQ,EAAO,KAAK;AAAA;AAAA,CAAM,CAC3B,CAGO,SAASG,EAAW,CAAE,KAAAN,EAAO,SAAS,gBAAiB,aAAAC,EAAe,SAAS,cAA2B,eAAe,CAAE,EAA+D,CAAC,EAAS,CACzML,EAAMI,EAAMb,CAAoB,EAC5Bc,GAAcL,EAAMK,EAAcb,CAAmB,CAC3D,CAGO,SAASmB,EAAqB,CAAE,aAAAN,EAAe,SAAS,cAA2B,eAAe,CAAE,EAA2C,CAAC,EAAyB,CAG9K,IAAMO,EAAW,iBAAiBP,GAAgB,SAAS,eAAe,EACpEQ,EAAQZ,GAAqBW,EAAS,iBAAiBX,CAAQ,EAAE,KAAK,GAAK,OAEjF,MAAO,CACL,OAAQ,CACN,KAAMY,EAAKtB,EAAqB,IAAI,EACpC,KAAMsB,EAAKtB,EAAqB,IAAI,EACpC,MAAOsB,EAAKtB,EAAqB,KAAK,CACxC,EACA,MAAO,CACL,KAAMsB,EAAKrB,EAAoB,IAAI,EACnC,QAASqB,EAAKrB,EAAoB,OAAO,EACzC,KAAMqB,EAAKrB,EAAoB,IAAI,EACnC,OAAQqB,EAAKrB,EAAoB,MAAM,EACvC,GAAIqB,EAAKrB,EAAoB,EAAE,EAC/B,MAAOqB,EAAKrB,EAAoB,KAAK,CACvC,CACF,CACF",
|
|
6
|
+
"names": ["FONT_STACK_VARIABLES", "FONT_ROLE_VARIABLES", "FONT_STACKS", "write", "target", "variables", "values", "key", "value", "clear", "variable", "applyFontConfig", "config", "root", "themeElement", "generateFontCSS", "blocks", "stacks", "roles", "resetFonts", "getCurrentFontConfig", "computed", "read"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as be}from"./chunk-2LYX5S7H.js";import{a as pe,c as fe}from"./chunk-5LXFJMFB.js";import{l as ie,n as le,p as de,r as ce,v as ue}from"./chunk-SNHEJU2S.js";import{a as re,c as se,d as ae}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as be}from"./chunk-2LYX5S7H.js";import{a as pe,c as fe}from"./chunk-5LXFJMFB.js";import{l as ie,n as le,p as de,r as ce,v as ue}from"./chunk-SNHEJU2S.js";import{a as re,c as se,d as ae}from"./chunk-MK2R6DAU.js";import{a as Re,e as S}from"./chunk-TLWTUKKL.js";import{b as he,c as I}from"./chunk-CECQNGUL.js";import{a as me}from"./chunk-NNO7M466.js";import{a as oe}from"./chunk-AGAQC4HH.js";import*as t from"react";import Ue from"classnames";var Le=["className","children","defaultOpen","open","onOpenChange","size","defaultSize","onSizeChange","sizeUpdate","sizeUpdateMs","style","inset"],ye=t.forwardRef((U,p)=>{let{className:ze,presentation:Pe="fixed",defaultOpen:L,open:a,onOpenChange:_,expandedSize:C=200,minSize:l=100,maxSize:d=400,resizable:B=!1,collapsible:Se=!0,onExpand:$,onCollapse:A,onResize:v,onResizeStart:Ce,onResizeEnd:Be,snapPoints:ve,snapTolerance:ge,collapseThreshold:xe,paneId:g,persistence:x,children:Me,style:Ee,size:j,defaultSize:F,onSizeChange:M,sizeUpdate:E,sizeUpdateMs:O=50,inset:T}=U,Oe=he(U,Le),{bottomMode:s,setBottomMode:N}=ie(),{currentBreakpointReady:f}=le(),{peekTarget:Te}=de(),{togglePane:Ne}=ce(),{registerInset:q,unregisterInset:K}=ue();t.useLayoutEffect(()=>{if(T)return q("bottom"),()=>K("bottom")},[T,q,K]);let w=pe(Pe),R=w==="overlay",we=w==="stacked",i=t.useRef(null),ke=t.useCallback(e=>{i.current=e,typeof p=="function"?p(e):p&&(p.current=e)},[p]),W=t.Children.toArray(Me),Y=W.filter(e=>t.isValidElement(e)&&e.type===S),G=W.filter(e=>!(t.isValidElement(e)&&e.type===S)),h=t.useRef(_),k=t.useRef(a);t.useLayoutEffect(()=>{h.current=_,k.current=a});let De=t.useMemo(()=>I(a),[a]),Ve=t.useMemo(()=>I(L),[L]),He=typeof a=="object"&&a!==null,{resolvedControlled:m}=fe({controlledValue:De,defaultValue:Ve,currentValue:s,setValue:N,breakpointReady:f,controlledIsResponsive:He,onResponsiveChange:e=>h.current?.(e==="expanded",{reason:"responsive"}),onInit:e=>{typeof k.current>"u"&&h.current?.(e==="expanded",{reason:"init"})}}),c=t.useRef(null);t.useEffect(()=>()=>{c.current&&(clearTimeout(c.current),c.current=null)},[M,E,O]);let b=t.useMemo(()=>{let e=M,o=E,r=O??50;if(!e)return()=>{};if(o==="debounce")return(n,u)=>{c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{e(n,u),c.current=null},r)};if(o==="throttle"){let n=0;return(u,te)=>{let ne=Date.now();ne-n>=r&&(n=ne,e(u,te))}}return(n,u)=>e(n,u)},[M,E,O]),y=t.useRef(null);t.useEffect(()=>{let e=typeof a<"u";if(y.current===null){y.current=e;return}y.current!==e&&(console.warn("Shell.Bottom: Switching between controlled and uncontrolled `open` is not supported."),y.current=e)},[a]);let J=t.useRef(null),Q=t.useRef(void 0);t.useEffect(()=>{let e=J.current,r=Q.current!==m;if(e!==null&&e!==s){let n=s==="expanded";(!(typeof k.current<"u")||!r&&n!==(m===void 0?void 0:m==="expanded"))&&h.current?.(n,{reason:"toggle"})}J.current=s,Q.current=m},[s,m]);let X=t.useRef($),Z=t.useRef(A);t.useLayoutEffect(()=>{X.current=$,Z.current=A});let z=t.useRef(null),ee=t.useRef(!1);t.useEffect(()=>{let e=s;if(!f){z.current=e;return}if(!ee.current){ee.current=!0,z.current=e;return}let o=z.current;o!==null&&o!==e&&(e==="expanded"?X.current?.():e==="collapsed"&&Z.current?.(),z.current=e)},[s,f]);let D=s==="expanded",P=t.useMemo(()=>{if(!g||x)return x;let e=`kookie-ui:shell:bottom:${g}`;return{load:()=>{if(!(typeof window>"u"))try{let r=window.localStorage.getItem(e);return r?Number(r):void 0}catch{return}},save:r=>{if(!(typeof window>"u"))try{window.localStorage.setItem(e,String(r))}catch{}}}},[g,x]);t.useEffect(()=>{let e=!0;if(!B||!P?.load||R)return;let o=P.load(),r=n=>{!e||typeof n!="number"||!i.current||(i.current.style.setProperty("--bottom-size",`${n}px`),v?.(n))};return o instanceof Promise?o.then(r).catch(n=>{}):r(o),()=>{e=!1}},[B,P,v,R]);let Ie=B&&!R&&D?t.createElement(me.Provider,{value:{containerRef:i,cssVarName:"--bottom-size",minSize:l,maxSize:d,defaultSize:C,orientation:"horizontal",edge:"start",computeNext:(e,o,r)=>{let n=e-o;return r-n},onResize:v,onResizeStart:Ce,onResizeEnd:e=>{Be?.(e),b(e,{reason:"resize"}),P?.save?.(e)},target:"bottom",collapsible:Se,snapPoints:ve,snapTolerance:ge??8,collapseThreshold:xe,requestCollapse:()=>N("collapsed"),requestToggle:()=>Ne("bottom")}},Y.length>0?Y.map((e,o)=>t.cloneElement(e,{key:e.key??o})):t.createElement(Re,null)):null,V=t.useCallback(e=>be(e,"vertical"),[]);t.useEffect(()=>{if(i.current&&typeof j>"u"&&typeof F<"u"){let e=V(F);if(typeof e=="number"&&Number.isFinite(e)){let n=Math.min((typeof d=="number"?d:void 0)??e,Math.max((typeof l=="number"?l:void 0)??e,e));i.current.style.setProperty("--bottom-size",`${n}px`),b(n,{reason:"init"})}}},[]);let H=j;return t.useEffect(()=>{if(!i.current||typeof H>"u")return;let e=V(H);if(typeof e=="number"&&Number.isFinite(e)){let n=Math.min((typeof d=="number"?d:void 0)??e,Math.max((typeof l=="number"?l:void 0)??e,e));i.current.style.setProperty("--bottom-size",`${n}px`),b(n,{reason:"controlled"})}},[H,l,d,V,b]),R?t.createElement(re,{open:s==="expanded",onOpenChange:o=>N(o?"expanded":"collapsed")},t.createElement(se,{side:"bottom",style:{padding:0},"aria-label":"Bottom panel","aria-describedby":void 0,height:{initial:`${C}px`}},t.createElement(oe,null,t.createElement(ae,null,"Bottom panel")),G)):t.createElement("div",{...Oe,ref:ke,className:Ue("rt-ShellBottom",ze),"data-mode":s,"data-peek":Te==="bottom"||void 0,"data-presentation":f?w:void 0,"data-open":f&&we&&D||void 0,"data-inset":T||void 0,style:{...Ee,"--bottom-size":`${C}px`,"--bottom-min-size":`${l}px`,"--bottom-max-size":`${d}px`}},t.createElement("div",{className:"rt-ShellBottomContent","data-visible":D||void 0},G),Ie)});ye.displayName="Shell.Bottom";ye.Handle=S;export{ye as a};
|
|
2
|
+
//# sourceMappingURL=chunk-W7N7V5YD.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as d}from"./chunk-RMKXWYOV.js";import{a as m}from"./chunk-MJ47O7KH.js";import{a as l}from"./chunk-5TXQLK4G.js";import{a as n}from"./chunk-GSTOGDAJ.js";import{a as i}from"./chunk-6FLLFCBU.js";import*as o from"react";import v from"classnames";import{Slot as T}from"radix-ui";var M=o.forwardRef((c,f)=>{let{asChild:t,className:g,children:P,color:u,radius:b,material:r,panelBackground:e,tooltip:a,tooltipSide:B="top",tooltipAlign:y="center",tooltipDelayDuration:D,tooltipDisableHoverableContent:R,...C}=i(c,m,n),p=o.useMemo(()=>r??e,[r,e]);l(e);let h=o.useMemo(()=>t?T.Root:"span",[t]),s=o.createElement(h,{"data-accent-color":u,"data-radius":b,"data-material":p,"data-panel-background":p,...C,ref:f,className:v("rt-reset","rt-Badge",g)},P);return a?o.createElement(d,{content:a,side:B,align:y,delayDuration:D,disableHoverableContent:R},s):s});M.displayName="Badge";export{M as a};
|
|
2
|
+
//# sourceMappingURL=chunk-WFMYNZXZ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as h}from"./chunk-E67CIG6A.js";import{a as b}from"./chunk-GJSGKE7B.js";import{b as I,d as k}from"./chunk-IX5HIHVI.js";import{a as G}from"./chunk-MJJ7XDIP.js";import{b as E,c as R}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as h}from"./chunk-E67CIG6A.js";import{a as b}from"./chunk-GJSGKE7B.js";import{b as I,d as k}from"./chunk-IX5HIHVI.js";import{a as G}from"./chunk-MJJ7XDIP.js";import{b as E,c as R}from"./chunk-YUP6EICB.js";import{a as v}from"./chunk-5TXQLK4G.js";import{a as f}from"./chunk-6FLLFCBU.js";import{b as p,d as y,e as T,f as N}from"./chunk-HUKPWYG2.js";import{a as J}from"./chunk-3XT5P2HO.js";var Q={};J(Q,{CheckboxItem:()=>A,Content:()=>D,Group:()=>V,Item:()=>O,Label:()=>L,RadioGroup:()=>z,RadioItem:()=>_,Root:()=>B,Separator:()=>q,Sub:()=>K,SubContent:()=>F,SubTrigger:()=>j,Trigger:()=>w});import*as e from"react";import s from"classnames";import{ContextMenu as r,Slot as g}from"radix-ui";var B=t=>e.createElement(r.Root,{...t});B.displayName="ContextMenu.Root";var w=e.forwardRef(({children:t,...n},o)=>e.createElement(r.Trigger,{...n,ref:o,asChild:!0},G(t)));w.displayName="ContextMenu.Trigger";var W=e.createContext({}),D=e.forwardRef((t,n)=>{let o=E();v(t.panelBackground);let u=t.material??t.panelBackground??o.panelBackground,a=e.useMemo(()=>({material:u,accentColor:o.accentColor}),[u,o.accentColor]),{size:i=p.size.default,variant:C=p.variant.default,highContrast:c=p.highContrast.default,material:m=a.material}=t,{className:x,children:M,color:l,container:S,forceMount:d,material:U,panelBackground:X,...H}=f(t,p),P=e.useMemo(()=>l||a.accentColor,[l,a.accentColor]);return e.createElement(r.Portal,{container:S,forceMount:d},e.createElement(R,{asChild:!0},e.createElement(r.Content,{"data-accent-color":P,"data-material":m,"data-panel-background":m,alignOffset:-Number(i)*4,collisionPadding:10,...H,asChild:!1,ref:n,className:s("rt-PopperContent","rt-BaseMenuContent","rt-ContextMenuContent",x)},e.createElement(b,{type:"auto"},e.createElement("div",{className:s("rt-BaseMenuViewport","rt-ContextMenuViewport")},e.createElement(W.Provider,{value:e.useMemo(()=>({size:i,variant:C,color:P,highContrast:c,material:m}),[i,C,P,c,m])},M))))))});D.displayName="ContextMenu.Content";var L=e.forwardRef(({className:t,...n},o)=>e.createElement(r.Label,{...n,asChild:!1,ref:o,className:s("rt-BaseMenuLabel","rt-ContextMenuLabel",t)}));L.displayName="ContextMenu.Label";var O=e.forwardRef((t,n)=>{let{className:o,children:u,color:a=y.color.default,shortcut:i,...C}=t;return e.createElement(r.Item,{"data-accent-color":a,...C,ref:n,className:s("rt-reset","rt-BaseMenuItem","rt-ContextMenuItem",o)},e.createElement(g.Slottable,null,u),i&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-ContextMenuShortcut"},e.createElement(h,{size:"1"},i)))});O.displayName="ContextMenu.Item";var V=e.forwardRef(({className:t,...n},o)=>e.createElement(r.Group,{...n,asChild:!1,ref:o,className:s("rt-BaseMenuGroup","rt-ContextMenuGroup",t)}));V.displayName="ContextMenu.Group";var z=e.forwardRef(({className:t,...n},o)=>e.createElement(r.RadioGroup,{...n,asChild:!1,ref:o,className:s("rt-BaseMenuRadioGroup","rt-ContextMenuRadioGroup",t)}));z.displayName="ContextMenu.RadioGroup";var _=e.forwardRef((t,n)=>{let{children:o,className:u,color:a=N.color.default,...i}=t;return e.createElement(r.RadioItem,{...i,asChild:!1,ref:n,"data-accent-color":a,className:s("rt-BaseMenuItem","rt-BaseMenuRadioItem","rt-ContextMenuItem","rt-ContextMenuRadioItem",u)},e.createElement(g.Slottable,null,o),e.createElement(r.ItemIndicator,{className:"rt-BaseMenuItemIndicator rt-ContextMenuItemIndicator"},e.createElement(I,{className:"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon"})))});_.displayName="ContextMenu.RadioItem";var A=e.forwardRef((t,n)=>{let{children:o,className:u,shortcut:a,color:i=T.color.default,...C}=t;return e.createElement(r.CheckboxItem,{...C,asChild:!1,ref:n,"data-accent-color":i,className:s("rt-BaseMenuItem","rt-BaseMenuCheckboxItem","rt-ContextMenuItem","rt-ContextMenuCheckboxItem",u)},e.createElement(g.Slottable,null,o),e.createElement(r.ItemIndicator,{className:"rt-BaseMenuItemIndicator rt-ContextMenuItemIndicator"},e.createElement(I,{className:"rt-BaseMenuItemIndicatorIcon rt-ContextMenuItemIndicatorIcon"})),a&&e.createElement("div",{className:"rt-BaseMenuShortcut rt-ContextMenuShortcut"},e.createElement(h,{size:"1"},a)))});A.displayName="ContextMenu.CheckboxItem";var K=t=>e.createElement(r.Sub,{...t});K.displayName="ContextMenu.Sub";var j=e.forwardRef((t,n)=>{let{className:o,children:u,...a}=t;return e.createElement(r.SubTrigger,{...a,asChild:!1,ref:n,className:s("rt-BaseMenuItem","rt-BaseMenuSubTrigger","rt-ContextMenuItem","rt-ContextMenuSubTrigger",o)},u,e.createElement("div",{className:"rt-BaseMenuShortcut rt-ContextMenuShortcut"},e.createElement(k,{className:"rt-BaseMenuSubTriggerIcon rt-ContextMenuSubTriggerIcon"})))});j.displayName="ContextMenu.SubTrigger";var F=e.forwardRef((t,n)=>{let{size:o,variant:u,color:a,highContrast:i,material:C}=e.useContext(W),{className:c,children:m,container:x,forceMount:M,material:l,panelBackground:S,...d}=f({size:o,variant:u,color:a,highContrast:i,material:C,...t},p);return e.createElement(r.Portal,{container:x,forceMount:M},e.createElement(R,{asChild:!0},e.createElement(r.SubContent,{"data-accent-color":a,"data-material":C,"data-panel-background":C,alignOffset:-Number(o)*4,sideOffset:1,collisionPadding:10,...d,asChild:!1,ref:n,className:s("rt-PopperContent","rt-BaseMenuContent","rt-BaseMenuSubContent","rt-ContextMenuContent","rt-ContextMenuSubContent",c)},e.createElement(b,{type:"auto"},e.createElement("div",{className:s("rt-BaseMenuViewport","rt-ContextMenuViewport")},m)))))});F.displayName="ContextMenu.SubContent";var q=e.forwardRef(({className:t,...n},o)=>e.createElement(r.Separator,{...n,asChild:!1,ref:o,className:s("rt-BaseMenuSeparator","rt-ContextMenuSeparator",t)}));q.displayName="ContextMenu.Separator";export{B as a,w as b,D as c,L as d,O as e,V as f,z as g,_ as h,A as i,K as j,j as k,F as l,q as m,Q as n};
|
|
2
|
+
//# sourceMappingURL=chunk-YEB3H7QN.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as r}from"./chunk-WAURCNAS.js";import{a as j}from"./chunk-F22ZRNWL.js";import{a as e}from"./chunk-6XGZPIUT.js";import{a as W}from"./chunk-5TXQLK4G.js";import*as n from"react";import q from"classnames";import{Direction as z,Slot as J,Tooltip as K}from"radix-ui";import{useComposedRefs as Q,useLayoutEffect as U}from"radix-ui/internal";var o=()=>{},X={appearance:e.appearance.default,accentColor:e.accentColor.default,grayColor:e.grayColor.default,resolvedGrayColor:e.grayColor.default,material:e.material.default,panelBackground:e.panelBackground.default,radius:e.radius.default,scaling:e.scaling.default,fontFamily:e.fontFamily.default,headingFontFamily:void 0,onAppearanceChange:o,onAccentColorChange:o,onGrayColorChange:o,onMaterialChange:o,onPanelBackgroundChange:o,onRadiusChange:o,onScalingChange:o,onFontFamilyChange:o,onHeadingFontFamilyChange:o},S=n.createContext(void 0);function re(){return n.useContext(S)??X}var Y=n.forwardRef((a,l)=>n.useContext(S)===void 0?n.createElement(K.Provider,{delayDuration:200},n.createElement(z.Provider,{dir:"ltr"},n.createElement(L,{...a,ref:l}))):n.createElement(O,{...a,ref:l}));Y.displayName="Theme";var L=n.forwardRef((a,l)=>{let{appearance:t=e.appearance.default,accentColor:P=e.accentColor.default,grayColor:i=e.grayColor.default,material:s=e.material.default,panelBackground:c=e.panelBackground.default,radius:m=e.radius.default,scaling:d=e.scaling.default,fontFamily:u=e.fontFamily.default,headingFontFamily:p,hasBackground:h=e.hasBackground.default,...g}=a;W(a.panelBackground);let[f,C]=r(t),[v,k]=r(P),[R,x]=r(i),B=s!==e.material.default?s:c,[y,A]=r(B),[b,I]=r(y),[F,M]=r(m),[T,H]=r(d),[E,G]=r(u),[w,D]=r(p);return n.createElement(O,{...g,ref:l,isRoot:!0,hasBackground:h,appearance:f,accentColor:v,grayColor:R,material:y,panelBackground:b,radius:F,scaling:T,fontFamily:E,headingFontFamily:w,onAppearanceChange:C,onAccentColorChange:k,onGrayColorChange:x,onMaterialChange:A,onPanelBackgroundChange:I,onRadiusChange:M,onScalingChange:H,onFontFamilyChange:G,onHeadingFontFamilyChange:D})});L.displayName="ThemeRoot";function Z(){if(typeof navigator>"u")return;let a=navigator.userAgent;if(a.includes("Win"))return"windows";if(a.includes("Mac"))return"macos";if(a.includes("Linux"))return"linux"}var O=n.forwardRef((a,l)=>{let t=n.useContext(S),{asChild:P,isRoot:i,hasBackground:s,appearance:c=a.appearance??t?.appearance??e.appearance.default,accentColor:m=a.accentColor??t?.accentColor??e.accentColor.default,grayColor:d=a.grayColor??t?.resolvedGrayColor??e.grayColor.default,material:u=a.material??t?.material??e.material.default,panelBackground:p=a.panelBackground??t?.panelBackground??e.panelBackground.default,radius:h=a.radius??t?.radius??e.radius.default,scaling:g=a.scaling??t?.scaling??e.scaling.default,fontFamily:f=a.fontFamily??t?.fontFamily??e.fontFamily.default,headingFontFamily:C=a.headingFontFamily??t?.headingFontFamily,onAppearanceChange:v=o,onAccentColorChange:k=o,onGrayColorChange:R=o,onMaterialChange:x=o,onPanelBackgroundChange:B=o,onRadiusChange:y=o,onScalingChange:A=o,onFontFamilyChange:b=o,onHeadingFontFamilyChange:I=o,...F}=a,M=P?J.Root:"div",T=d==="auto"?j(m):d,H=a.appearance==="light"||a.appearance==="dark",E=s===void 0?i||H:s,G=n.useRef(null),w=Q(l,G),D="data-os"in F;return U(()=>{if(!i||D)return;let N=G.current;if(!N)return;let V=Z();if(V)return N.setAttribute("data-os",V),()=>N.removeAttribute("data-os")},[i,D]),n.createElement(S.Provider,{value:n.useMemo(()=>({appearance:c,accentColor:m,grayColor:d,resolvedGrayColor:T,material:u,panelBackground:p,radius:h,scaling:g,fontFamily:f,headingFontFamily:C,onAppearanceChange:v,onAccentColorChange:k,onGrayColorChange:R,onMaterialChange:x,onPanelBackgroundChange:B,onRadiusChange:y,onScalingChange:A,onFontFamilyChange:b,onHeadingFontFamilyChange:I}),[c,m,d,T,u,p,h,g,f,C,v,k,R,x,B,y,A,b,I])},n.createElement(M,{"data-is-root-theme":i?"true":"false","data-accent-color":m,"data-gray-color":T,"data-has-background":E?"true":"false","data-material":u,"data-panel-background":p,"data-radius":h,"data-scaling":g,"data-font-family":f,"data-heading-font-family":C,ref:w,...F,className:q("radix-themes",{light:c==="light",dark:c==="dark"},F.className)}))});O.displayName="ThemeImpl";export{S as a,re as b,Y as c};
|
|
2
|
+
//# sourceMappingURL=chunk-YUP6EICB.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/components/theme.tsx"],
|
|
4
|
+
"sourcesContent": ["'use client';\n\nimport * as React from 'react';\nimport classNames from 'classnames';\nimport { Direction, Slot, Tooltip as TooltipPrimitive } from 'radix-ui';\nimport { useComposedRefs, useLayoutEffect } from 'radix-ui/internal';\n\nimport { getMatchingGrayColor } from '../helpers/get-matching-gray-color.js';\nimport { usePropSyncedState } from '../hooks/use-prop-synced-state.js';\nimport { useDeprecatedPanelBackgroundWarning } from '../helpers/use-deprecation-warning.js';\nimport { themePropDefs } from './theme.props.js';\n\nimport type { ThemeOwnProps } from './theme.props.js';\nimport type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';\n\nconst noop = () => {};\n\ntype ThemeAppearance = (typeof themePropDefs.appearance.values)[number];\ntype ThemeAccentColor = (typeof themePropDefs.accentColor.values)[number];\ntype ThemeGrayColor = (typeof themePropDefs.grayColor.values)[number];\ntype ThemeMaterial = (typeof themePropDefs.material.values)[number];\ntype ThemePanelBackground = (typeof themePropDefs.panelBackground.values)[number];\ntype ThemeRadius = (typeof themePropDefs.radius.values)[number];\ntype ThemeScaling = (typeof themePropDefs.scaling.values)[number];\ntype ThemeFontFamily = (typeof themePropDefs.fontFamily.values)[number];\n// Headings follow the body font until something sets this, so `undefined` is a\n// meaningful value here rather than a missing one.\ntype ThemeHeadingFontFamily = ThemeFontFamily | undefined;\n\ninterface ThemeChangeHandlers {\n onAppearanceChange: (appearance: ThemeAppearance) => void;\n onAccentColorChange: (accentColor: ThemeAccentColor) => void;\n onGrayColorChange: (grayColor: ThemeGrayColor) => void;\n onMaterialChange: (material: ThemeMaterial) => void;\n onPanelBackgroundChange: (panelBackground: ThemePanelBackground) => void;\n onRadiusChange: (radius: ThemeRadius) => void;\n onScalingChange: (scaling: ThemeScaling) => void;\n onFontFamilyChange: (fontFamily: ThemeFontFamily) => void;\n onHeadingFontFamilyChange: (headingFontFamily: ThemeHeadingFontFamily) => void;\n}\n\ninterface ThemeContextValue extends ThemeChangeHandlers {\n appearance: ThemeAppearance;\n accentColor: ThemeAccentColor;\n grayColor: ThemeGrayColor;\n resolvedGrayColor: ThemeGrayColor;\n material: ThemeMaterial;\n panelBackground: ThemePanelBackground;\n radius: ThemeRadius;\n scaling: ThemeScaling;\n fontFamily: ThemeFontFamily;\n headingFontFamily: ThemeHeadingFontFamily;\n}\n// Default theme values used when components render outside a Theme provider\nconst defaultThemeContext: ThemeContextValue = {\n appearance: themePropDefs.appearance.default,\n accentColor: themePropDefs.accentColor.default,\n grayColor: themePropDefs.grayColor.default,\n resolvedGrayColor: themePropDefs.grayColor.default,\n material: themePropDefs.material.default,\n panelBackground: themePropDefs.panelBackground.default,\n radius: themePropDefs.radius.default,\n scaling: themePropDefs.scaling.default,\n fontFamily: themePropDefs.fontFamily.default,\n headingFontFamily: undefined,\n onAppearanceChange: noop,\n onAccentColorChange: noop,\n onGrayColorChange: noop,\n onMaterialChange: noop,\n onPanelBackgroundChange: noop,\n onRadiusChange: noop,\n onScalingChange: noop,\n onFontFamilyChange: noop,\n onHeadingFontFamilyChange: noop,\n};\n\nconst ThemeContext = React.createContext<ThemeContextValue | undefined>(undefined);\n\nfunction useThemeContext() {\n const context = React.useContext(ThemeContext);\n // Return default context if used outside Theme provider (e.g., during SSR)\n return context ?? defaultThemeContext;\n}\n\ninterface ThemeProps extends ThemeImplPublicProps {}\nconst Theme = React.forwardRef<ThemeImplElement, ThemeProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const isRoot = context === undefined;\n if (isRoot) {\n return (\n <TooltipPrimitive.Provider delayDuration={200}>\n <Direction.Provider dir=\"ltr\">\n <ThemeRoot {...props} ref={forwardedRef} />\n </Direction.Provider>\n </TooltipPrimitive.Provider>\n );\n }\n return <ThemeImpl {...props} ref={forwardedRef} />;\n});\nTheme.displayName = 'Theme';\n\nconst ThemeRoot = React.forwardRef<ThemeImplElement, ThemeImplPublicProps>(\n (props, forwardedRef) => {\n const {\n appearance: appearanceProp = themePropDefs.appearance.default,\n accentColor: accentColorProp = themePropDefs.accentColor.default,\n grayColor: grayColorProp = themePropDefs.grayColor.default,\n material: materialProp = themePropDefs.material.default,\n panelBackground: panelBackgroundProp = themePropDefs.panelBackground.default,\n radius: radiusProp = themePropDefs.radius.default,\n scaling: scalingProp = themePropDefs.scaling.default,\n fontFamily: fontFamilyProp = themePropDefs.fontFamily.default,\n headingFontFamily: headingFontFamilyProp,\n hasBackground = themePropDefs.hasBackground.default,\n ...rootProps\n } = props;\n\n useDeprecatedPanelBackgroundWarning(props.panelBackground);\n\n // Each of these follows its prop but stays independently settable, so\n // `ThemePanel` can change the theme at runtime. Syncing during render\n // rather than in an effect matters here: an effect would commit the old\n // theme first and re-render every consumer of the context a second time.\n const [appearance, setAppearance] = usePropSyncedState(appearanceProp);\n const [accentColor, setAccentColor] = usePropSyncedState(accentColorProp);\n const [grayColor, setGrayColor] = usePropSyncedState(grayColorProp);\n\n // Material takes precedence over panelBackground\n const effectiveMaterial =\n materialProp !== themePropDefs.material.default ? materialProp : panelBackgroundProp;\n const [material, setMaterial] = usePropSyncedState(effectiveMaterial);\n\n // Keep panelBackground in sync with material for backward compatibility\n const [panelBackground, setPanelBackground] = usePropSyncedState(material);\n\n const [radius, setRadius] = usePropSyncedState(radiusProp);\n const [scaling, setScaling] = usePropSyncedState(scalingProp);\n const [fontFamily, setFontFamily] = usePropSyncedState(fontFamilyProp);\n const [headingFontFamily, setHeadingFontFamily] = usePropSyncedState(headingFontFamilyProp);\n\n return (\n <ThemeImpl\n {...rootProps}\n ref={forwardedRef}\n isRoot\n hasBackground={hasBackground}\n //\n appearance={appearance}\n accentColor={accentColor}\n grayColor={grayColor}\n material={material}\n panelBackground={panelBackground}\n radius={radius}\n scaling={scaling}\n fontFamily={fontFamily}\n headingFontFamily={headingFontFamily}\n //\n onAppearanceChange={setAppearance}\n onAccentColorChange={setAccentColor}\n onGrayColorChange={setGrayColor}\n onMaterialChange={setMaterial}\n onPanelBackgroundChange={setPanelBackground}\n onRadiusChange={setRadius}\n onScalingChange={setScaling}\n onFontFamilyChange={setFontFamily}\n onHeadingFontFamilyChange={setHeadingFontFamily}\n />\n );\n },\n);\nThemeRoot.displayName = 'ThemeRoot';\n\ntype ThemeImplElement = React.ElementRef<'div'>;\ninterface ThemeImplProps extends ThemeImplPublicProps, ThemeImplPrivateProps {}\ninterface ThemeImplPublicProps\n extends ComponentPropsWithout<'div', RemovedProps | 'dir'>,\n ThemeOwnProps {}\ninterface ThemeImplPrivateProps extends Partial<ThemeChangeHandlers> {\n isRoot?: boolean;\n}\nfunction getClientOS(): 'windows' | 'macos' | 'linux' | undefined {\n if (typeof navigator === 'undefined') return undefined;\n const ua = navigator.userAgent;\n if (ua.includes('Win')) return 'windows';\n if (ua.includes('Mac')) return 'macos';\n if (ua.includes('Linux')) return 'linux';\n return undefined;\n}\n\nconst ThemeImpl = React.forwardRef<ThemeImplElement, ThemeImplProps>((props, forwardedRef) => {\n const context = React.useContext(ThemeContext);\n const {\n asChild,\n isRoot,\n hasBackground: hasBackgroundProp,\n //\n appearance = props.appearance ?? context?.appearance ?? themePropDefs.appearance.default,\n accentColor = props.accentColor ?? context?.accentColor ?? themePropDefs.accentColor.default,\n grayColor = props.grayColor ?? context?.resolvedGrayColor ?? themePropDefs.grayColor.default,\n material = props.material ?? context?.material ?? themePropDefs.material.default,\n panelBackground = props.panelBackground ??\n context?.panelBackground ??\n themePropDefs.panelBackground.default,\n radius = props.radius ?? context?.radius ?? themePropDefs.radius.default,\n scaling = props.scaling ?? context?.scaling ?? themePropDefs.scaling.default,\n fontFamily = props.fontFamily ?? context?.fontFamily ?? themePropDefs.fontFamily.default,\n headingFontFamily = props.headingFontFamily ?? context?.headingFontFamily,\n //\n onAppearanceChange = noop,\n onAccentColorChange = noop,\n onGrayColorChange = noop,\n onMaterialChange = noop,\n onPanelBackgroundChange = noop,\n onRadiusChange = noop,\n onScalingChange = noop,\n onFontFamilyChange = noop,\n onHeadingFontFamilyChange = noop,\n //\n ...themeProps\n } = props;\n const Comp = asChild ? Slot.Root : 'div';\n const resolvedGrayColor = grayColor === 'auto' ? getMatchingGrayColor(accentColor) : grayColor;\n const isExplicitAppearance = props.appearance === 'light' || props.appearance === 'dark';\n const hasBackground =\n hasBackgroundProp === undefined ? isRoot || isExplicitAppearance : hasBackgroundProp;\n\n // `data-os` can only be resolved on the client. Writing it straight to the\n // DOM keeps it out of the server markup \u2014 so hydration still matches \u2014 without\n // spending a render pass, and a state update here would re-render the whole\n // application on mount.\n const rootRef = React.useRef<ThemeImplElement>(null);\n const composedRef = useComposedRefs(forwardedRef, rootRef);\n const hasExplicitOS = 'data-os' in themeProps;\n\n useLayoutEffect(() => {\n if (!isRoot || hasExplicitOS) return;\n const node = rootRef.current;\n if (!node) return;\n\n const os = getClientOS();\n if (!os) return;\n node.setAttribute('data-os', os);\n return () => node.removeAttribute('data-os');\n }, [isRoot, hasExplicitOS]);\n\n return (\n <ThemeContext.Provider\n value={React.useMemo(\n () => ({\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n }),\n [\n appearance,\n accentColor,\n grayColor,\n resolvedGrayColor,\n material,\n panelBackground,\n radius,\n scaling,\n fontFamily,\n headingFontFamily,\n //\n onAppearanceChange,\n onAccentColorChange,\n onGrayColorChange,\n onMaterialChange,\n onPanelBackgroundChange,\n onRadiusChange,\n onScalingChange,\n onFontFamilyChange,\n onHeadingFontFamilyChange,\n ],\n )}\n >\n <Comp\n data-is-root-theme={isRoot ? 'true' : 'false'}\n data-accent-color={accentColor}\n data-gray-color={resolvedGrayColor}\n // for nested `Theme` background\n data-has-background={hasBackground ? 'true' : 'false'}\n data-material={material}\n data-panel-background={panelBackground}\n data-radius={radius}\n data-scaling={scaling}\n data-font-family={fontFamily}\n data-heading-font-family={headingFontFamily}\n ref={composedRef}\n {...themeProps}\n className={classNames(\n 'radix-themes',\n {\n light: appearance === 'light',\n dark: appearance === 'dark',\n },\n themeProps.className,\n )}\n />\n </ThemeContext.Provider>\n );\n});\nThemeImpl.displayName = 'ThemeImpl';\n\nexport { Theme, ThemeContext, useThemeContext };\nexport type { ThemeProps, ThemeContextValue };\n"],
|
|
5
|
+
"mappings": "gKAEA,UAAYA,MAAW,QACvB,OAAOC,MAAgB,aACvB,OAAS,aAAAC,EAAW,QAAAC,EAAM,WAAWC,MAAwB,WAC7D,OAAS,mBAAAC,EAAiB,mBAAAC,MAAuB,oBAUjD,IAAMC,EAAO,IAAM,CAAC,EAuCdC,EAAyC,CAC7C,WAAYC,EAAc,WAAW,QACrC,YAAaA,EAAc,YAAY,QACvC,UAAWA,EAAc,UAAU,QACnC,kBAAmBA,EAAc,UAAU,QAC3C,SAAUA,EAAc,SAAS,QACjC,gBAAiBA,EAAc,gBAAgB,QAC/C,OAAQA,EAAc,OAAO,QAC7B,QAASA,EAAc,QAAQ,QAC/B,WAAYA,EAAc,WAAW,QACrC,kBAAmB,OACnB,mBAAoBF,EACpB,oBAAqBA,EACrB,kBAAmBA,EACnB,iBAAkBA,EAClB,wBAAyBA,EACzB,eAAgBA,EAChB,gBAAiBA,EACjB,mBAAoBA,EACpB,0BAA2BA,CAC7B,EAEMG,EAAqB,gBAA6C,MAAS,EAEjF,SAASC,IAAkB,CAGzB,OAFsB,aAAWD,CAAY,GAE3BF,CACpB,CAGA,IAAMI,EAAc,aAAyC,CAACC,EAAOC,IAC7C,aAAWJ,CAAY,IAClB,OAGvB,gBAACK,EAAiB,SAAjB,CAA0B,cAAe,KACxC,gBAACC,EAAU,SAAV,CAAmB,IAAI,OACtB,gBAACC,EAAA,CAAW,GAAGJ,EAAO,IAAKC,EAAc,CAC3C,CACF,EAGG,gBAACI,EAAA,CAAW,GAAGL,EAAO,IAAKC,EAAc,CACjD,EACDF,EAAM,YAAc,QAEpB,IAAMK,EAAkB,aACtB,CAACJ,EAAOC,IAAiB,CACvB,GAAM,CACJ,WAAYK,EAAiBV,EAAc,WAAW,QACtD,YAAaW,EAAkBX,EAAc,YAAY,QACzD,UAAWY,EAAgBZ,EAAc,UAAU,QACnD,SAAUa,EAAeb,EAAc,SAAS,QAChD,gBAAiBc,EAAsBd,EAAc,gBAAgB,QACrE,OAAQe,EAAaf,EAAc,OAAO,QAC1C,QAASgB,EAAchB,EAAc,QAAQ,QAC7C,WAAYiB,EAAiBjB,EAAc,WAAW,QACtD,kBAAmBkB,EACnB,cAAAC,EAAgBnB,EAAc,cAAc,QAC5C,GAAGoB,CACL,EAAIhB,EAEJiB,EAAoCjB,EAAM,eAAe,EAMzD,GAAM,CAACkB,EAAYC,CAAa,EAAIC,EAAmBd,CAAc,EAC/D,CAACe,EAAaC,CAAc,EAAIF,EAAmBb,CAAe,EAClE,CAACgB,EAAWC,CAAY,EAAIJ,EAAmBZ,CAAa,EAG5DiB,EACJhB,IAAiBb,EAAc,SAAS,QAAUa,EAAeC,EAC7D,CAACgB,EAAUC,CAAW,EAAIP,EAAmBK,CAAiB,EAG9D,CAACG,EAAiBC,CAAkB,EAAIT,EAAmBM,CAAQ,EAEnE,CAACI,EAAQC,CAAS,EAAIX,EAAmBT,CAAU,EACnD,CAACqB,EAASC,CAAU,EAAIb,EAAmBR,CAAW,EACtD,CAACsB,EAAYC,CAAa,EAAIf,EAAmBP,CAAc,EAC/D,CAACuB,EAAmBC,CAAoB,EAAIjB,EAAmBN,CAAqB,EAE1F,OACE,gBAACT,EAAA,CACE,GAAGW,EACJ,IAAKf,EACL,OAAM,GACN,cAAec,EAEf,WAAYG,EACZ,YAAaG,EACb,UAAWE,EACX,SAAUG,EACV,gBAAiBE,EACjB,OAAQE,EACR,QAASE,EACT,WAAYE,EACZ,kBAAmBE,EAEnB,mBAAoBjB,EACpB,oBAAqBG,EACrB,kBAAmBE,EACnB,iBAAkBG,EAClB,wBAAyBE,EACzB,eAAgBE,EAChB,gBAAiBE,EACjB,mBAAoBE,EACpB,0BAA2BE,EAC7B,CAEJ,CACF,EACAjC,EAAU,YAAc,YAUxB,SAASkC,GAAyD,CAChE,GAAI,OAAO,UAAc,IAAa,OACtC,IAAMC,EAAK,UAAU,UACrB,GAAIA,EAAG,SAAS,KAAK,EAAG,MAAO,UAC/B,GAAIA,EAAG,SAAS,KAAK,EAAG,MAAO,QAC/B,GAAIA,EAAG,SAAS,OAAO,EAAG,MAAO,OAEnC,CAEA,IAAMlC,EAAkB,aAA6C,CAACL,EAAOC,IAAiB,CAC5F,IAAMuC,EAAgB,aAAW3C,CAAY,EACvC,CACJ,QAAA4C,EACA,OAAAC,EACA,cAAeC,EAEf,WAAAzB,EAAalB,EAAM,YAAcwC,GAAS,YAAc5C,EAAc,WAAW,QACjF,YAAAyB,EAAcrB,EAAM,aAAewC,GAAS,aAAe5C,EAAc,YAAY,QACrF,UAAA2B,EAAYvB,EAAM,WAAawC,GAAS,mBAAqB5C,EAAc,UAAU,QACrF,SAAA8B,EAAW1B,EAAM,UAAYwC,GAAS,UAAY5C,EAAc,SAAS,QACzE,gBAAAgC,EAAkB5B,EAAM,iBACtBwC,GAAS,iBACT5C,EAAc,gBAAgB,QAChC,OAAAkC,EAAS9B,EAAM,QAAUwC,GAAS,QAAU5C,EAAc,OAAO,QACjE,QAAAoC,EAAUhC,EAAM,SAAWwC,GAAS,SAAW5C,EAAc,QAAQ,QACrE,WAAAsC,EAAalC,EAAM,YAAcwC,GAAS,YAAc5C,EAAc,WAAW,QACjF,kBAAAwC,EAAoBpC,EAAM,mBAAqBwC,GAAS,kBAExD,mBAAAI,EAAqBlD,EACrB,oBAAAmD,EAAsBnD,EACtB,kBAAAoD,EAAoBpD,EACpB,iBAAAqD,EAAmBrD,EACnB,wBAAAsD,EAA0BtD,EAC1B,eAAAuD,EAAiBvD,EACjB,gBAAAwD,EAAkBxD,EAClB,mBAAAyD,EAAqBzD,EACrB,0BAAA0D,EAA4B1D,EAE5B,GAAG2D,CACL,EAAIrD,EACEsD,EAAOb,EAAUc,EAAK,KAAO,MAC7BC,EAAoBjC,IAAc,OAASkC,EAAqBpC,CAAW,EAAIE,EAC/EmC,EAAuB1D,EAAM,aAAe,SAAWA,EAAM,aAAe,OAC5Ee,EACJ4B,IAAsB,OAAYD,GAAUgB,EAAuBf,EAM/DgB,EAAgB,SAAyB,IAAI,EAC7CC,EAAcC,EAAgB5D,EAAc0D,CAAO,EACnDG,EAAgB,YAAaT,EAEnC,OAAAU,EAAgB,IAAM,CACpB,GAAI,CAACrB,GAAUoB,EAAe,OAC9B,IAAME,EAAOL,EAAQ,QACrB,GAAI,CAACK,EAAM,OAEX,IAAMC,EAAK3B,EAAY,EACvB,GAAK2B,EACL,OAAAD,EAAK,aAAa,UAAWC,CAAE,EACxB,IAAMD,EAAK,gBAAgB,SAAS,CAC7C,EAAG,CAACtB,EAAQoB,CAAa,CAAC,EAGxB,gBAACjE,EAAa,SAAb,CACC,MAAa,UACX,KAAO,CACL,WAAAqB,EACA,YAAAG,EACA,UAAAE,EACA,kBAAAiC,EACA,SAAA9B,EACA,gBAAAE,EACA,OAAAE,EACA,QAAAE,EACA,WAAAE,EACA,kBAAAE,EAEA,mBAAAQ,EACA,oBAAAC,EACA,kBAAAC,EACA,iBAAAC,EACA,wBAAAC,EACA,eAAAC,EACA,gBAAAC,EACA,mBAAAC,EACA,0BAAAC,CACF,GACA,CACElC,EACAG,EACAE,EACAiC,EACA9B,EACAE,EACAE,EACAE,EACAE,EACAE,EAEAQ,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,EACAC,CACF,CACF,GAEA,gBAACE,EAAA,CACC,qBAAoBZ,EAAS,OAAS,QACtC,oBAAmBrB,EACnB,kBAAiBmC,EAEjB,sBAAqBzC,EAAgB,OAAS,QAC9C,gBAAeW,EACf,wBAAuBE,EACvB,cAAaE,EACb,eAAcE,EACd,mBAAkBE,EAClB,2BAA0BE,EAC1B,IAAKwB,EACJ,GAAGP,EACJ,UAAWa,EACT,eACA,CACE,MAAOhD,IAAe,QACtB,KAAMA,IAAe,MACvB,EACAmC,EAAW,SACb,EACF,CACF,CAEJ,CAAC,EACDhD,EAAU,YAAc",
|
|
6
|
+
"names": ["React", "classNames", "Direction", "Slot", "TooltipPrimitive", "useComposedRefs", "useLayoutEffect", "noop", "defaultThemeContext", "themePropDefs", "ThemeContext", "useThemeContext", "Theme", "props", "forwardedRef", "TooltipPrimitive", "Direction", "ThemeRoot", "ThemeImpl", "appearanceProp", "accentColorProp", "grayColorProp", "materialProp", "panelBackgroundProp", "radiusProp", "scalingProp", "fontFamilyProp", "headingFontFamilyProp", "hasBackground", "rootProps", "useDeprecatedPanelBackgroundWarning", "appearance", "setAppearance", "usePropSyncedState", "accentColor", "setAccentColor", "grayColor", "setGrayColor", "effectiveMaterial", "material", "setMaterial", "panelBackground", "setPanelBackground", "radius", "setRadius", "scaling", "setScaling", "fontFamily", "setFontFamily", "headingFontFamily", "setHeadingFontFamily", "getClientOS", "ua", "context", "asChild", "isRoot", "hasBackgroundProp", "onAppearanceChange", "onAccentColorChange", "onGrayColorChange", "onMaterialChange", "onPanelBackgroundChange", "onRadiusChange", "onScalingChange", "onFontFamilyChange", "onHeadingFontFamilyChange", "themeProps", "Comp", "Slot", "resolvedGrayColor", "getMatchingGrayColor", "isExplicitAppearance", "rootRef", "composedRef", "useComposedRefs", "hasExplicitOS", "useLayoutEffect", "node", "os", "classNames"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-W7N7V5YD.js";import"../../chunk-2LYX5S7H.js";import"../../chunk-5LXFJMFB.js";import"../../chunk-SNHEJU2S.js";import"../../chunk-MK2R6DAU.js";import"../../chunk-MHANZINI.js";import"../../chunk-TOOSHJOA.js";import"../../chunk-N2B7TWIP.js";import"../../chunk-MJJ7XDIP.js";import"../../chunk-GCUGJXI2.js";import"../../chunk-YUP6EICB.js";import"../../chunk-WAURCNAS.js";import"../../chunk-F22ZRNWL.js";import"../../chunk-6XGZPIUT.js";import"../../chunk-H7ST535H.js";import"../../chunk-4TCXI3L3.js";import"../../chunk-G2CKYO2I.js";import"../../chunk-AXUDFYLY.js";import"../../chunk-KNQBAOMV.js";import"../../chunk-FD2TR343.js";import"../../chunk-WYADYDPN.js";import"../../chunk-ZE2KAVXW.js";import"../../chunk-TLWTUKKL.js";import"../../chunk-CECQNGUL.js";import"../../chunk-NNO7M466.js";import"../../chunk-AGAQC4HH.js";import"../../chunk-VX44UTQ5.js";import"../../chunk-5TXQLK4G.js";import"../../chunk-ERGJN7FJ.js";import"../../chunk-GSTOGDAJ.js";import"../../chunk-6FLLFCBU.js";import"../../chunk-AX5S56DS.js";import"../../chunk-E23RKOQJ.js";import"../../chunk-JUY7CBSL.js";import"../../chunk-WRWNN2NW.js";import"../../chunk-QM3RCK5P.js";import"../../chunk-RZCX6IBE.js";import"../../chunk-KRJTW535.js";import"../../chunk-NZJGC6ZW.js";import"../../chunk-HOHUDTTL.js";import"../../chunk-66ZLZAAJ.js";import"../../chunk-KFA53SVQ.js";import"../../chunk-3XT5P2HO.js";export{a as Bottom};
|
|
2
2
|
//# sourceMappingURL=shell-bottom.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-CVWCKOHO.js";import"../../chunk-2LYX5S7H.js";import"../../chunk-5LXFJMFB.js";import"../../chunk-SNHEJU2S.js";import"../../chunk-MK2R6DAU.js";import"../../chunk-MHANZINI.js";import"../../chunk-TOOSHJOA.js";import"../../chunk-N2B7TWIP.js";import"../../chunk-MJJ7XDIP.js";import"../../chunk-GCUGJXI2.js";import"../../chunk-YUP6EICB.js";import"../../chunk-WAURCNAS.js";import"../../chunk-F22ZRNWL.js";import"../../chunk-6XGZPIUT.js";import"../../chunk-H7ST535H.js";import"../../chunk-4TCXI3L3.js";import"../../chunk-G2CKYO2I.js";import"../../chunk-AXUDFYLY.js";import"../../chunk-KNQBAOMV.js";import"../../chunk-FD2TR343.js";import"../../chunk-WYADYDPN.js";import"../../chunk-ZE2KAVXW.js";import"../../chunk-TLWTUKKL.js";import"../../chunk-CECQNGUL.js";import"../../chunk-NNO7M466.js";import"../../chunk-AGAQC4HH.js";import"../../chunk-VX44UTQ5.js";import"../../chunk-5TXQLK4G.js";import"../../chunk-ERGJN7FJ.js";import"../../chunk-GSTOGDAJ.js";import"../../chunk-6FLLFCBU.js";import"../../chunk-AX5S56DS.js";import"../../chunk-E23RKOQJ.js";import"../../chunk-JUY7CBSL.js";import"../../chunk-WRWNN2NW.js";import"../../chunk-QM3RCK5P.js";import"../../chunk-RZCX6IBE.js";import"../../chunk-KRJTW535.js";import"../../chunk-NZJGC6ZW.js";import"../../chunk-HOHUDTTL.js";import"../../chunk-66ZLZAAJ.js";import"../../chunk-KFA53SVQ.js";import"../../chunk-3XT5P2HO.js";export{a as Inspector};
|
|
2
2
|
//# sourceMappingURL=shell-inspector.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-M24UXMOQ.js";import"../../chunk-2LYX5S7H.js";import"../../chunk-5LXFJMFB.js";import"../../chunk-SNHEJU2S.js";import"../../chunk-MK2R6DAU.js";import"../../chunk-MHANZINI.js";import"../../chunk-TOOSHJOA.js";import"../../chunk-N2B7TWIP.js";import"../../chunk-MJJ7XDIP.js";import"../../chunk-GCUGJXI2.js";import"../../chunk-YUP6EICB.js";import"../../chunk-WAURCNAS.js";import"../../chunk-F22ZRNWL.js";import"../../chunk-6XGZPIUT.js";import"../../chunk-H7ST535H.js";import"../../chunk-4TCXI3L3.js";import"../../chunk-G2CKYO2I.js";import"../../chunk-AXUDFYLY.js";import"../../chunk-KNQBAOMV.js";import"../../chunk-FD2TR343.js";import"../../chunk-WYADYDPN.js";import"../../chunk-ZE2KAVXW.js";import"../../chunk-TLWTUKKL.js";import"../../chunk-CECQNGUL.js";import"../../chunk-NNO7M466.js";import"../../chunk-AGAQC4HH.js";import"../../chunk-VX44UTQ5.js";import"../../chunk-5TXQLK4G.js";import"../../chunk-ERGJN7FJ.js";import"../../chunk-GSTOGDAJ.js";import"../../chunk-6FLLFCBU.js";import"../../chunk-AX5S56DS.js";import"../../chunk-E23RKOQJ.js";import"../../chunk-JUY7CBSL.js";import"../../chunk-WRWNN2NW.js";import"../../chunk-QM3RCK5P.js";import"../../chunk-RZCX6IBE.js";import"../../chunk-KRJTW535.js";import"../../chunk-NZJGC6ZW.js";import"../../chunk-HOHUDTTL.js";import"../../chunk-66ZLZAAJ.js";import"../../chunk-KFA53SVQ.js";import"../../chunk-3XT5P2HO.js";export{a as Sidebar};
|
|
2
2
|
//# sourceMappingURL=shell-sidebar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g}from"../chunk-374ZYJUP.js";import"../chunk-XKBLNVOD.js";import"../chunk-TOOSHJOA.js";import"../chunk-N2B7TWIP.js";import"../chunk-MJJ7XDIP.js";import"../chunk-GCUGJXI2.js";import"../chunk-YUP6EICB.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-6XGZPIUT.js";import"../chunk-H7ST535H.js";import"../chunk-4TCXI3L3.js";import"../chunk-G2CKYO2I.js";import"../chunk-AXUDFYLY.js";import"../chunk-KNQBAOMV.js";import"../chunk-FD2TR343.js";import"../chunk-WYADYDPN.js";import"../chunk-ZE2KAVXW.js";import"../chunk-VX44UTQ5.js";import"../chunk-5TXQLK4G.js";import"../chunk-ERGJN7FJ.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-KRJTW535.js";import"../chunk-NZJGC6ZW.js";import"../chunk-HOHUDTTL.js";import"../chunk-66ZLZAAJ.js";import"../chunk-3XT5P2HO.js";export{f as Action,g as Cancel,c as Content,e as Description,a as Root,d as Title,b as Trigger};
|
|
2
2
|
//# sourceMappingURL=alert-dialog.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-WFMYNZXZ.js";import"../chunk-RMKXWYOV.js";import"../chunk-BPVVFHYD.js";import"../chunk-MJ47O7KH.js";import"../chunk-YUP6EICB.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-6XGZPIUT.js";import"../chunk-H7ST535H.js";import"../chunk-4TCXI3L3.js";import"../chunk-G2CKYO2I.js";import"../chunk-AXUDFYLY.js";import"../chunk-KNQBAOMV.js";import"../chunk-FD2TR343.js";import"../chunk-WYADYDPN.js";import"../chunk-ZE2KAVXW.js";import"../chunk-5TXQLK4G.js";import"../chunk-ERGJN7FJ.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-KRJTW535.js";import"../chunk-NZJGC6ZW.js";import"../chunk-HOHUDTTL.js";import"../chunk-66ZLZAAJ.js";import"../chunk-3XT5P2HO.js";export{a as Badge};
|
|
2
2
|
//# sourceMappingURL=badge.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-6IGTK4JE.js";import"../chunk-2N2AQNJH.js";import"../chunk-RMKXWYOV.js";import"../chunk-BPVVFHYD.js";import"../chunk-YUP6EICB.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-6XGZPIUT.js";import"../chunk-H7ST535H.js";import"../chunk-4TCXI3L3.js";import"../chunk-G2CKYO2I.js";import"../chunk-AXUDFYLY.js";import"../chunk-KNQBAOMV.js";import"../chunk-FD2TR343.js";import"../chunk-WYADYDPN.js";import"../chunk-ZE2KAVXW.js";import"../chunk-2UPAYDKR.js";import"../chunk-HF5WY5YE.js";import"../chunk-3KB2XWBE.js";import"../chunk-FHOCUZDR.js";import"../chunk-SMGDH54W.js";import"../chunk-SNR5VFWG.js";import"../chunk-FWB47YCH.js";import"../chunk-K53W3ELO.js";import"../chunk-TTFUM47A.js";import"../chunk-5T6K7VPP.js";import"../chunk-AGAQC4HH.js";import"../chunk-VX44UTQ5.js";import"../chunk-5TXQLK4G.js";import"../chunk-ERGJN7FJ.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-D2AZAGGP.js";import"../chunk-KRJTW535.js";import"../chunk-NZJGC6ZW.js";import"../chunk-HOHUDTTL.js";import"../chunk-66ZLZAAJ.js";import"../chunk-3XT5P2HO.js";export{a as Button};
|
|
2
2
|
//# sourceMappingURL=button.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g,h,i,j,k}from"../chunk-
|
|
1
|
+
import{a,b,c,d,e,f,g,h,i,j,k}from"../chunk-MOR3NSXQ.js";import"../chunk-PLWXTEVE.js";import"../chunk-GJSGKE7B.js";import"../chunk-5GXFBLBJ.js";import"../chunk-YV2KYHGR.js";import"../chunk-5KICSAT7.js";import"../chunk-IX5HIHVI.js";import"../chunk-2N2AQNJH.js";import"../chunk-PS6NEG5A.js";import"../chunk-RMKXWYOV.js";import"../chunk-BPVVFHYD.js";import"../chunk-YUP6EICB.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-6XGZPIUT.js";import"../chunk-H7ST535H.js";import"../chunk-4TCXI3L3.js";import"../chunk-G2CKYO2I.js";import"../chunk-AXUDFYLY.js";import"../chunk-KNQBAOMV.js";import"../chunk-FD2TR343.js";import"../chunk-WYADYDPN.js";import"../chunk-ZE2KAVXW.js";import"../chunk-2UPAYDKR.js";import"../chunk-HF5WY5YE.js";import"../chunk-3KB2XWBE.js";import"../chunk-FHOCUZDR.js";import"../chunk-SMGDH54W.js";import"../chunk-SNR5VFWG.js";import"../chunk-FWB47YCH.js";import"../chunk-K53W3ELO.js";import"../chunk-TTFUM47A.js";import"../chunk-5T6K7VPP.js";import"../chunk-AGAQC4HH.js";import"../chunk-VX44UTQ5.js";import"../chunk-5TXQLK4G.js";import"../chunk-ERGJN7FJ.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-D2AZAGGP.js";import"../chunk-KRJTW535.js";import"../chunk-NZJGC6ZW.js";import"../chunk-HOHUDTTL.js";import"../chunk-66ZLZAAJ.js";import"../chunk-3XT5P2HO.js";export{g as AttachTrigger,f as Attachment,e as AttachmentsRow,d as InlineEnd,c as InlineStart,a as Root,h as Row,j as RowEnd,i as RowStart,k as Send,b as Textarea};
|
|
2
2
|
//# sourceMappingURL=chatbar.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a,b}from"../chunk-
|
|
1
|
+
"use client";import{a,b}from"../chunk-QEOAXJLN.js";import"../chunk-VX6ARMWP.js";import"../chunk-XGGLYV5D.js";import"../chunk-HAGKI7NA.js";import"../chunk-IX5HIHVI.js";import"../chunk-V32EP3S7.js";import"../chunk-YUP6EICB.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-6XGZPIUT.js";import"../chunk-SNR5VFWG.js";import"../chunk-FWB47YCH.js";import"../chunk-K53W3ELO.js";import"../chunk-TTFUM47A.js";import"../chunk-VX44UTQ5.js";import"../chunk-5TXQLK4G.js";import"../chunk-ERGJN7FJ.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-KRJTW535.js";import"../chunk-UMX5MGLG.js";import"../chunk-NZJGC6ZW.js";import"../chunk-HOHUDTTL.js";import"../chunk-66ZLZAAJ.js";import"../chunk-3XT5P2HO.js";export{b as Item,a as Root};
|
|
2
2
|
//# sourceMappingURL=checkbox-cards.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a,b,c,d,e,f,g,h,i,j,k}from"../chunk-
|
|
1
|
+
"use client";import{a,b,c,d,e,f,g,h,i,j,k}from"../chunk-UGD7Z3L4.js";import"../chunk-YVBCDTTD.js";import"../chunk-FXUUI6Z2.js";import"../chunk-72AHPGPN.js";import"../chunk-4Z33XHOK.js";import"../chunk-IX5HIHVI.js";import"../chunk-MJJ7XDIP.js";import"../chunk-YUP6EICB.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-6XGZPIUT.js";import"../chunk-SMGDH54W.js";import"../chunk-SNR5VFWG.js";import"../chunk-FWB47YCH.js";import"../chunk-TTFUM47A.js";import"../chunk-VX44UTQ5.js";import"../chunk-5TXQLK4G.js";import"../chunk-ERGJN7FJ.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-KRJTW535.js";import"../chunk-NZJGC6ZW.js";import"../chunk-HOHUDTTL.js";import"../chunk-66ZLZAAJ.js";import"../chunk-3XT5P2HO.js";export{d as Content,g as Empty,h as Group,e as Input,k as Item,i as Label,f as List,a as Root,j as Separator,b as Trigger,c as Value};
|
|
2
2
|
//# sourceMappingURL=combobox.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"../chunk-
|
|
1
|
+
"use client";import{a,b,c,d,e,f,g,h,i,j,k,l,m}from"../chunk-YEB3H7QN.js";import"../chunk-OA7C34MJ.js";import"../chunk-E67CIG6A.js";import"../chunk-ARIV4AT5.js";import"../chunk-GJSGKE7B.js";import"../chunk-5GXFBLBJ.js";import"../chunk-YV2KYHGR.js";import"../chunk-5KICSAT7.js";import"../chunk-IX5HIHVI.js";import"../chunk-PS6NEG5A.js";import"../chunk-MJJ7XDIP.js";import"../chunk-YUP6EICB.js";import"../chunk-WAURCNAS.js";import"../chunk-F22ZRNWL.js";import"../chunk-6XGZPIUT.js";import"../chunk-5TXQLK4G.js";import"../chunk-GSTOGDAJ.js";import"../chunk-6FLLFCBU.js";import"../chunk-AX5S56DS.js";import"../chunk-E23RKOQJ.js";import"../chunk-JUY7CBSL.js";import"../chunk-WRWNN2NW.js";import"../chunk-QM3RCK5P.js";import"../chunk-RZCX6IBE.js";import"../chunk-KRJTW535.js";import"../chunk-HUKPWYG2.js";import"../chunk-NZJGC6ZW.js";import"../chunk-HOHUDTTL.js";import"../chunk-66ZLZAAJ.js";import"../chunk-3XT5P2HO.js";export{i as CheckboxItem,c as Content,f as Group,e as Item,d as Label,g as RadioGroup,h as RadioItem,a as Root,m as Separator,j as Sub,l as SubContent,k as SubTrigger,b as Trigger};
|
|
2
2
|
//# sourceMappingURL=context-menu.js.map
|