@alwith/module-chat 0.1.8 → 0.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/approval/choice-elicitation-form.d.ts +1 -1
- package/dist/approval/permission-view.d.ts +1 -1
- package/dist/approval/schema-elicitation-form.d.ts +1 -1
- package/dist/codex/activity-group.d.ts +2 -1
- package/dist/codex/activity-group.js +6 -6
- package/dist/codex/assistant-message.js +2 -2
- package/dist/codex/edited-files-card.js +2 -2
- package/dist/codex/markdown.css +27 -4
- package/dist/codex/navigation-rail.js +1 -1
- package/dist/codex/styles.css +113 -0
- package/dist/codex/user-message.d.ts +5 -1
- package/dist/codex/user-message.js +1 -1
- package/dist/codex/virtualized-turn-list.js +1 -1
- package/dist/composer/completion-menu.d.ts +5 -1
- package/dist/composer/completion-menu.js +2 -2
- package/dist/composer/completion-trigger.js +2 -2
- package/dist/composer/effort-slider.d.ts +1 -1
- package/dist/composer/menu-radio.d.ts +1 -1
- package/dist/composer/permission-mode-select.d.ts +1 -1
- package/dist/composer/prompt-input-textarea.js +3 -3
- package/dist/composer/prompt-input.js +1 -1
- package/dist/image-preview-dialog.js +1 -1
- package/dist/lib/limits.js +1 -1
- package/dist/lib/markdown-rules.js +1 -1
- package/dist/lib/streaming-markdown.js +1 -1
- package/dist/locales.d.ts +10 -1
- package/dist/locales.js +1 -1
- package/dist/search/chat-search.d.ts +1 -1
- package/dist/search/chat-search.js +1 -1
- package/dist/search/find-bar.d.ts +1 -1
- package/dist/ui/card.d.ts +1 -1
- package/dist/ui/card.js +1 -1
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/dialog.d.ts +1 -1
- package/dist/ui/dialog.js +1 -1
- package/dist/ui/dropdown-menu.d.ts +1 -1
- package/dist/ui/dropdown-menu.js +1 -1
- package/dist/ui/field.d.ts +1 -1
- package/dist/ui/field.js +1 -1
- package/dist/ui/hover-card.js +1 -1
- package/dist/ui/input-group.d.ts +1 -1
- package/dist/ui/input-group.js +1 -1
- package/dist/ui/input.js +1 -1
- package/dist/ui/radio-group.js +1 -1
- package/dist/ui/separator.js +1 -1
- package/dist/ui/switch.js +1 -1
- package/dist/ui/textarea.js +1 -1
- package/dist/ui/tooltip.js +1 -1
- package/package.json +4 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as c,jsxs as E,Fragment as ot}from"react/jsx-runtime";import{autoUpdate as st}from"@floating-ui/dom";import{BookOpenTextIcon as it,FileIcon as lt,StoreIcon as ut}from"lucide-react";import{useCallback as at,useEffect as p,useLayoutEffect as Q,useMemo as G,useRef as J,useState as v}from"react";import{createPortal as ct}from"react-dom";import{Button as X}from"../ui/button.js";import{Separator as dt}from"../ui/separator.js";import{cn as Y}from"cn";import{filterSlashCommands as Z}from"./completion-filter.js";import{detectTrigger as ft}from"./completion-trigger.js";import{usePromptInputController as mt}from"./prompt-input-context.js";function It({handleRef:d,anchorRef:u,commands:T,searchFiles:l,onMention:F,onSearchError:A,fileSearchDebounceMs:q=0,bashMode:B=!1,forcedOpen:s=!1,onForcedOpenChange:f,emptyLabel:R,fileStatusLabels:h,morePlugins:D}){let S=mt(),i=S.textInput.value,[z,_]=v(0),[x,N]=v(null),[y,L]=v(0),U=J(null);p(()=>{let t=d.current?.getTextarea();if(!t)return;let e=()=>_(t.selectionStart??0),n=()=>{if(document.activeElement===t)e()};return t.addEventListener("keyup",e),t.addEventListener("click",e),t.addEventListener("input",e),t.addEventListener("select",e),t.addEventListener("focus",e),document.addEventListener("selectionchange",n),()=>{t.removeEventListener("keyup",e),t.removeEventListener("click",e),t.removeEventListener("input",e),t.removeEventListener("select",e),t.removeEventListener("focus",e),document.removeEventListener("selectionchange",n)}});let V=G(()=>B&&i.startsWith("!")?null:ft(i,z),[i,z,B]),r=V?.kind==="at"&&!l?null:V,P=`${r?.kind??"forced"}:${r?.query??""}:${s}`,[O,tt]=v(P);if(O!==P)tt(P),L(0);let b=J(null);p(()=>{if(!s){b.current=null;return}if(b.current===null)b.current=i;else if(i!==b.current)f?.(!1)},[s,i,f]);let g=r?.kind==="at"?r.query:null;p(()=>{if(g===null||!l){N(null);return}let t=!0,e=()=>{l(g).then((o)=>{if(t)N({query:g,search:l,items:o})},(o)=>{if(t)N({query:g,search:l,items:[]}),A(o)})},n=q>0?window.setTimeout(e,q):null;if(n===null)e();return()=>{if(t=!1,n!==null)window.clearTimeout(n)}},[g,l,q,A]);let m=G(()=>{if(r?.kind==="at")return x?.query===r.query&&x.search===l?x.items:[];if(r)return Z(T,r.query);if(s)return Z(T,"");return[]},[r,s,T,x,l]),[et,j]=v(!1);p(()=>{let t=d.current?.getTextarea();if(!t)return;let e=()=>j(!0),n=()=>{if(j(!1),s)f?.(!1)};return j(document.activeElement===t),t.addEventListener("focus",e),t.addEventListener("blur",n),()=>{t.removeEventListener("focus",e),t.removeEventListener("blur",n)}},[d,s,f]),p(()=>{if(s)d.current?.getTextarea()?.focus()},[s,d]);let a=et&&(r!==null?r.kind==="slash"||m.length>0||!!h:s);p(()=>{if(!a)return;U.current?.querySelector(`[data-idx="${y}"]`)?.scrollIntoView({block:"nearest"})},[y,a]);function W(t){let e=d.current?.getTextarea();if(!e)return;let n,o;if(r){let M=r.kind==="slash"?`/${t.payload} `:`@${t.label} `;if(n=i.slice(0,r.start)+M+i.slice(r.end),r.kind==="at")F?.(t.payload);o=r.start+M.length}else if(s)n=`${i.length===0||i.endsWith(`
|
|
2
2
|
`)?i:`${i}
|
|
3
|
-
`}/${t.payload} `,o=n.length,f?.(!1);else return;
|
|
3
|
+
`}/${t.payload} `,o=n.length,f?.(!1);else return;S.textInput.setInput(n),requestAnimationFrame(()=>{e.focus(),e.setSelectionRange(o,o)})}p(()=>{let t=d.current?.getTextarea();if(!t)return;let e=(n)=>{if(!a)return;if(n.isComposing||n.keyCode===229)return;if(n.key==="ArrowDown")n.preventDefault(),n.stopPropagation(),L((o)=>m.length===0?0:Math.min(m.length-1,o+1));else if(n.key==="ArrowUp")n.preventDefault(),n.stopPropagation(),L((o)=>Math.max(0,o-1));else if(n.key==="Enter"||n.key==="Tab"){n.preventDefault(),n.stopPropagation();let o=m[y];if(o)W(o)}else if(n.key==="Escape")if(n.preventDefault(),n.stopPropagation(),r)_(Math.max(0,r.start-1)),t.setSelectionRange(r.start,r.start);else f?.(!1)};return t.addEventListener("keydown",e,!0),()=>t.removeEventListener("keydown",e,!0)});let[w,H]=v(null),[C,nt]=v(null),I=at(()=>{let t=u?.current;if(!t)return;let e=t.getBoundingClientRect();H({left:e.left,width:e.width,bottom:window.innerHeight-e.top+8})},[u]);if(Q(()=>{if(!a){H(null);return}I()},[a,I]),Q(()=>{let t=u?.current;if(!a||!t||!C)return;return st(t,C,I,{animationFrame:!0})},[a,C,u,I]),!a||u&&!w)return null;let k=r?r.kind==="slash":s,rt=k?it:lt,K=c("div",{ref:nt,className:u?"fixed z-50":"absolute inset-x-0 bottom-full z-50 mb-2",style:u&&w?{left:w.left,width:w.width,bottom:w.bottom}:void 0,children:E("div",{ref:U,role:"listbox",onMouseDown:(t)=>t.preventDefault(),className:"bg-popover text-popover-foreground ring-foreground/10 pointer-events-auto w-full overflow-hidden rounded-lg p-1 shadow-md ring-1 outline-hidden",children:[E("div",{className:"max-h-72 overflow-y-auto",children:[m.length===0&&k&&c("div",{className:"text-muted-foreground px-2 py-3 text-xs",children:R}),m.length===0&&!k&&h&&c("div",{role:"status",className:"text-muted-foreground px-2 py-3 text-xs",children:x?.query===g&&x.search===l?h.empty:h.loading}),m.map((t,e)=>E(X,{type:"button",variant:"ghost",role:"option","aria-selected":e===y,"data-idx":e,onMouseDown:(n)=>{n.preventDefault(),W(t)},onMouseEnter:()=>L(e),className:Y("flex h-auto w-full items-center justify-start gap-2.5 rounded-md px-2.5 py-2 text-start",e===y&&"bg-muted"),children:[c(rt,{className:Y("size-4 shrink-0",k?"text-blue-500":"text-muted-foreground")}),c("span",{className:"text-foreground shrink-0 text-sm font-medium",children:t.label}),t.description&&c("span",{className:"text-muted-foreground min-w-0 flex-1 truncate text-xs",children:t.description})]},t.key))]}),k&&D&&E(ot,{children:[c(dt,{}),E(X,{type:"button",variant:"ghost",onMouseDown:(t)=>{t.preventDefault(),f?.(!1),D.open()},className:"h-auto w-full justify-start px-2.5 py-2",children:[c(ut,{"data-icon":"inline-start"}),D.label]})]})]})});return u?ct(K,document.body):K}export{It as CompletionMenu};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
function
|
|
1
|
+
function u(r,e){if(e===0)return null;let n=e-1;while(n>=0){let t=r[n];if(t===" "||t==="\t"||t===`
|
|
2
2
|
`)return null;if(t==="@"||t==="/"){let i=n===0?"":r[n-1],l=n===0||i===`
|
|
3
|
-
`;if(t==="/"?l:l||i===" "||i==="\t")return{kind:t==="/"?"slash":"at",start:n,end:e,query:r.slice(n+1,e)}}n-=1}return null}export{
|
|
3
|
+
`;if(t==="/"?l&&!/[\/\\]/.test(r.slice(n+1,e)):l||i===" "||i==="\t")return{kind:t==="/"?"slash":"at",start:n,end:e,query:r.slice(n+1,e)}}n-=1}return null}export{u as detectTrigger};
|
|
@@ -7,7 +7,7 @@ export interface MenuRadioOption {
|
|
|
7
7
|
title?: string;
|
|
8
8
|
disabled?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export declare function MenuRadioSelect({ value, onValueChange, options, itemClassName
|
|
10
|
+
export declare function MenuRadioSelect({ value, onValueChange, options, itemClassName }: {
|
|
11
11
|
value: string;
|
|
12
12
|
onValueChange: (value: string) => void;
|
|
13
13
|
options: MenuRadioOption[];
|
|
@@ -10,4 +10,4 @@ export interface PermissionModeSelectProps {
|
|
|
10
10
|
showLabel?: boolean;
|
|
11
11
|
disabled?: boolean;
|
|
12
12
|
}
|
|
13
|
-
export declare function PermissionModeSelect({ value, currentName, icon, options, label, onValueChange, showLabel, disabled
|
|
13
|
+
export declare function PermissionModeSelect({ value, currentName, icon, options, label, onValueChange, showLabel, disabled }: PermissionModeSelectProps): import("react").JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jsx as
|
|
2
|
-
`&&t.key!=="\r"&&t.key!=="\t"){t.preventDefault();return}if(
|
|
3
|
-
${c.substring(
|
|
1
|
+
import{jsx as D}from"react/jsx-runtime";import{forwardRef as E,useCallback as P,useEffect as R,useImperativeHandle as F,useRef as m}from"react";import{InputGroupTextarea as A}from"../ui/input-group-textarea.js";import{cn as H}from"cn";import{clipboardHasStringItem as j,sanitizeTextareaTargetValue as g,scanClipboardForImageFiles as q}from"./prompt-input-clipboard.js";import{useOptionalPromptInputController as z,usePromptInputAttachments as N}from"./prompt-input-context.js";var B=(o)=>!o.shiftKey,K=()=>!1,V=E(({onChange:o,className:v,placeholder:x,bashMode:y=!1,isSendShortcut:I=B,isNewlineShortcut:b=K,...k},T)=>{let n=z(),i=N(),l=m(!1),u=m(!1),a=m(null),s=P(()=>{let t=a.current;if(!t)return;t.style.height="auto",t.style.height=`${t.scrollHeight}px`},[]);R(()=>{let t=a.current;if(!t)return;let e=new ResizeObserver(()=>{requestAnimationFrame(s)});return e.observe(t),()=>e.disconnect()},[s]);let p=y&&(n?.textInput.value??"").startsWith("!"),C=(t)=>{if(l.current||t.nativeEvent.isComposing||t.nativeEvent.keyCode===229||u.current)return;if(t.key.length===1&&t.key.charCodeAt(0)<32&&t.key!==`
|
|
2
|
+
`&&t.key!=="\r"&&t.key!=="\t"){t.preventDefault();return}if(p&&n){let e=t.currentTarget.selectionStart===0&&t.currentTarget.selectionEnd===0;if(t.key==="Escape"||(t.key==="Backspace"||t.key==="Delete")&&e){t.preventDefault(),n.textInput.setInput(n.textInput.value.slice(1));return}}if(t.key==="Enter"){if(b(t.nativeEvent)){t.preventDefault();let e=t.currentTarget,{selectionStart:r,selectionEnd:f,value:c}=e,h=`${c.substring(0,r)}
|
|
3
|
+
${c.substring(f)}`;if(n)n.textInput.setInput(h);else e.value=h;let d=r+1;e.setSelectionRange(d,d),s();return}if(I(t.nativeEvent)){t.preventDefault();let e=t.currentTarget.form;if(!e)return;let r=e.querySelector('button[type="submit"]');if(!r||r.disabled)return;e.requestSubmit(r)}}if(t.key==="Backspace"&&t.currentTarget.value===""&&i.files.length>0){t.preventDefault();let e=i.files.at(-1);if(e)i.remove(e.id)}},S=(t)=>{let e=t.clipboardData?.items;if(!e)return;let{imageFiles:r,sawNonImageFile:f}=q(e),c=j(e);if(r.length>0)t.preventDefault(),i.add(r);else if(f&&!c)t.preventDefault()},w=n?{value:p?n.textInput.value.slice(1):n.textInput.value,onChange:(t)=>{let e=g(t.currentTarget);n.textInput.setInput(p?`!${e}`:e),s(),o?.(t)}}:{onChange:(t)=>{g(t.currentTarget),s(),o?.(t)}};return F(T,()=>({resetHeight:()=>{if(a.current)a.current.style.height="auto"},focus:()=>{a.current?.focus()},getTextarea:()=>a.current}),[]),D(A,{"data-chat-input":!0,ref:a,rows:3,className:H("field-sizing-content max-h-(--chat-input-max-height) min-h-[calc(var(--chat-input-line-height)*3)] min-w-0 flex-1 overflow-x-hidden","leading-(--chat-input-line-height)","placeholder:text-chat-input-placeholder p-0 pe-2.5","bg-chat-input-bg",v),name:"message",onCompositionEnd:()=>{l.current=!1,u.current=!0,requestAnimationFrame(()=>{u.current=!1})},onCompositionStart:()=>{u.current=!1,l.current=!0},onKeyDown:C,onPaste:S,placeholder:x,...k,...w})});V.displayName="PromptInputTextarea";export{V as PromptInputTextarea};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as o,jsxs as ce}from"react/jsx-runtime";import{ArrowUpIcon as ue,Loader2Icon as le,SquareIcon as fe,XIcon as de}from"lucide-react";import{Children as X,useCallback as g,useEffect as w,useMemo as me,useRef as N,useState as pe}from"react";import{flushSync as ge}from"react-dom";import{cn as h}from"cn";import{InputGroup as he,InputGroupAddon as H,InputGroupButton as J}from"../ui/input-group.js";import{exceedsImageLimit as ve,MAX_TOTAL_IMAGE_MB as be}from"../lib/limits.js";import{preparePromptFiles as xe}from"../lib/prepare-prompt-files.js";import{LocalAttachmentsContext as ye,PromptInputSubmitContext as Ie,ProviderAttachmentsContext as Le,useOptionalPromptInputController as Te}from"./prompt-input-context.js";import{MAX_TOTAL_IMAGE_MB as Ge}from"../lib/limits.js";var Re=({className:a,bashMode:c=!1,attachmentPolicy:v,onCommand:m,onSubmitError:b,accept:l,multiple:I,globalDrop:z,syncHiddenInput:U,maxFiles:P,maxFileSize:j,onError:p,onSubmit:K,children:Q,...V})=>{let i=Te(),s=!!i,Y=c&&s&&i.textInput.value.startsWith("!"),x=N(null),C=N(null),M=N(!1),[Z,R]=pe([]),f=s?i.attachments.files:Z,W=N(f);W.current=f;let ee=g(()=>{x.current?.click()},[]),k=g((e)=>{if(!l||l.trim()==="")return!0;return l.split(",").map((r)=>r.trim()).filter(Boolean).some((r)=>{if(r.endsWith("/*")){let n=r.slice(0,-1);return e.type.startsWith(n)}return e.type===r})},[l]),D=g((e)=>{if(e.type)return e.type;let t=(e.name||"").toLowerCase();if(t.endsWith(".png"))return"image/png";if(t.endsWith(".jpg")||t.endsWith(".jpeg"))return"image/jpeg";if(t.endsWith(".webp"))return"image/webp";if(t.endsWith(".gif"))return"image/gif";if(t.endsWith(".bmp"))return"image/bmp";if(t.endsWith(".svg"))return"image/svg+xml";return""},[]),te=g((e)=>{let t=Array.from(e),r=t.filter((u)=>k(u));if(t.length&&r.length===0){p?.({code:"accept",message:"No files match the accepted types."});return}let n=(u)=>j?u.size<=j:!0,d=r.filter(n);if(r.length>0&&d.length===0){p?.({code:"max_file_size",message:"All files exceed the maximum size."});return}R((u)=>{let T=v?v.uniqueFiles(d,u):d,A=typeof P==="number"?Math.max(0,P-u.length):void 0,ae=typeof A==="number"?T.slice(0,A):T;if(typeof A==="number"&&T.length>A)p?.({code:"max_files",message:"Too many files. Some were not added."});let q=[];for(let L of ae){let E=v?.sourcePath(L);q.push({id:crypto.randomUUID(),type:"file",url:URL.createObjectURL(L),mediaType:D(L),filename:L.name,size:L.size,lastModified:L.lastModified,...E===void 0?{}:{sourcePath:E}})}return u.concat(q)})},[v,D,k,P,j,p]),re=g((e)=>R((t)=>{let r=t.find((n)=>n.id===e);if(r?.url)URL.revokeObjectURL(r.url);return t.filter((n)=>n.id!==e)}),[]),ne=g(()=>R((e)=>{for(let t of e)if(t.url)URL.revokeObjectURL(t.url);return[]}),[]),O=s?i.attachments.add:te,y=g((e)=>{let t=Array.from(e),r=t.filter((d)=>!(d.type??"").toLowerCase().startsWith("image/"));if(r.length>0){p?.({code:"unsupported_type",message:`Only image attachments are supported. ${r.length} non-image file(s) were ignored.`});return}let n=t.reduce((d,u)=>d+u.size,0);if(n>0){let d=f.filter((u)=>(u.mediaType??"").toLowerCase().startsWith("image/")).reduce((u,T)=>u+(T.size??0),0);if(ve(d,n)){p?.({code:"max_total_size",message:`Total image size must not exceed ${be}MB.`});return}}O(t)},[f,O,p]),S=s?i.attachments.remove:re,_=s?i.attachments.clear:ne,B=s?i.attachments.openFileDialog:ee;w(()=>{if(!s)return;i.__registerFileInput(x,()=>x.current?.click())},[s,i]),w(()=>{if(U&&x.current&&f.length===0)x.current.value=""},[f,U]),w(()=>{let e=C.current;if(!e)return;if(z)return;let t=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault()},r=(n)=>{if(n.dataTransfer?.types?.includes("Files"))n.preventDefault();if(n.dataTransfer?.files&&n.dataTransfer.files.length>0)y(n.dataTransfer.files)};return e.addEventListener("dragover",t),e.addEventListener("drop",r),()=>{e.removeEventListener("dragover",t),e.removeEventListener("drop",r)}},[y,z]),w(()=>{if(!z)return;let e=(r)=>{if(r.dataTransfer?.types?.includes("Files"))r.preventDefault()},t=(r)=>{if(r.dataTransfer?.types?.includes("Files"))r.preventDefault();if(r.dataTransfer?.files&&r.dataTransfer.files.length>0)y(r.dataTransfer.files)};return document.addEventListener("dragover",e),document.addEventListener("drop",t),()=>{document.removeEventListener("dragover",e),document.removeEventListener("drop",t)}},[y,z]),w(()=>()=>{if(!s){for(let e of W.current)if(e.url)URL.revokeObjectURL(e.url)}},[s]);let se=(e)=>{if(e.currentTarget.files)y(e.currentTarget.files);e.currentTarget.value=""},F=me(()=>({files:f.map((e)=>({...e,id:e.id})),add:y,remove:S,clear:_,openFileDialog:B,fileInputRef:x}),[f,y,S,_,B]),ie=async(e)=>{if(e.preventDefault(),M.current)return;M.current=!0;try{let t=e.currentTarget,r=s?i.textInput.value:new FormData(t).get("message")||"";if(m?.(r.trim())){if(t.reset(),_(),s)i.textInput.clear();return}if(!s)t.reset();let n=await xe(f);if(n.rejectedCount>0)p?.({code:"accept",message:"One or more images are corrupted and were removed before sending."});if(await K({text:r,files:n.files},e),_(),s)i.textInput.clear()}catch(t){b(t)}finally{M.current=!1}},oe=g((e)=>{if(!e.trim())return;if(s&&i)ge(()=>{i.textInput.setInput(e)});C.current?.requestSubmit()},[i,s]),G=ce(Ie.Provider,{value:oe,children:[o("input",{accept:l,"aria-label":"Upload files",className:"hidden",multiple:I,onChange:se,ref:x,title:"Upload files",type:"file"}),o("form",{className:h("w-full",a),onSubmit:ie,ref:C,"data-tour":"chat-input",...V,children:o(he,{className:h("codex-composer-surface overflow-y-auto has-[[data-slot=input-group-control]:focus-visible]:ring-0",Y&&"border! border-[rgb(255,0,135)] has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(255,0,135)] dark:border-[rgb(253,93,177)] dark:has-[[data-slot=input-group-control]:focus-visible]:border-[rgb(253,93,177)]"),children:Q})})]});return s?o(Le.Provider,{value:F,children:G}):o(ye.Provider,{value:F,children:G})};function Ue({className:a,...c}){return o("div",{className:h("flex w-full min-w-0 flex-row items-end gap-2",a),...c})}function We({className:a,...c}){return o(H,{align:"block-end",className:h("order-first flex-wrap gap-1 p-2 pb-1.5",a),...c})}function ke({className:a,...c}){return o(H,{align:"block-end",className:h("mt-3.5 justify-between gap-1 p-0",a),...c})}function De({className:a,...c}){return o("div",{className:h("flex items-center gap-1",a),...c})}var Oe=({variant:a="ghost",className:c,size:v,collapsed:m=!1,...b})=>{let l=m||X.count(b.children)<=1?"icon-xs":"xs";return o(J,{className:h("h-7 rounded-full text-xs font-medium hover:bg-transparent dark:hover:bg-transparent",(m||X.count(b.children)<=1)&&"size-7",c),size:l,type:"button",variant:a,...b})},Se=({className:a,variant:c="ghost",size:v="icon-xs",status:m,children:b,...l})=>{let I=o(ue,{className:"size-4"});if(m==="submitted")I=o(le,{className:"size-4 animate-spin"});else if(m==="streaming")I=o(fe,{className:"size-3 fill-current"});else if(m==="error")I=o(de,{className:"size-4"});return o(J,{"aria-label":"Submit",className:h("bg-foreground text-background hover:bg-foreground/70 size-7 rounded-full p-0 transition-opacity disabled:opacity-50",a),size:v,type:"submit",variant:c,...l,children:b??I})};export{Ge as MAX_TOTAL_IMAGE_MB,Re as PromptInput,Ue as PromptInputBody,Oe as PromptInputButton,ke as PromptInputFooter,We as PromptInputHeader,Se as PromptInputSubmit,De as PromptInputTools};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n,jsxs as _}from"react/jsx-runtime";import{XIcon as j}from"lucide-react";import{useCallback as p,useEffect as N,useMemo as X,useRef as y,useState as v}from"react";import{Dialog as E,DialogClose as A,DialogContent as F,DialogTitle as Y}from"./ui/dialog.js";import{getPointerCenteredScrollPosition as K}from"./lib/pointer-centered-zoom.js";import{cn as b}from"cn";function te({open:s,onOpenChange:C,url:h,filename:x,scale:g,onScaleChange:f,containerRef:W,containerClassName:H,dialogContentClassName:Z,imageClassName:k}){let d=p((e)=>Math.min(4,Math.max(0.25,e)),[]),[D,M]=v(1),r=d(g??D),I=y(null),c=W??I,O=y(null),[u,S]=v({width:0,height:0}),[z,P]=v({width:0,height:0}),w=p((e)=>{let i=d(e);if(typeof f==="function"){f(i);return}M(i)},[f,d]);N(()=>{if(!s)return;if(!h)return;if(typeof g==="number")return;M(1)},[s,h,g]),N(()=>{if(!s)return;let e=c.current;if(!e)return;let i=()=>{S({width:e.clientWidth,height:e.clientHeight})};i();let t=new ResizeObserver(i);return t.observe(e),()=>{t.disconnect()}},[c,s]);let R=p(()=>{w(1)},[w]),a=X(()=>{let{width:e,height:i}=z,{width:t,height:o}=u;if(e===0||i===0)return{width:0,height:0};if(t===0||o===0)return{width:0,height:0};let l=Math.min(t/e,o/i,1),m=e*l,T=i*l;return{width:m*r,height:T*r}},[r,z,u]);if(!h)return null;return n(E,{open:s,onOpenChange:C,children:_(F,{className:b("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",Z),showCloseButton:!1,children:[n(Y,{className:"sr-only",children:x||"Image preview"}),n(A,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:n(j,{className:"size-5"})}),n("div",{ref:c,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let i=e.deltaY>0?r-0.2:r+0.2,t=d(Number.parseFloat(i.toFixed(2)));if(t===r)return;let o=c.current,l=O.current,m=o&&l?K({container:o,target:l,clientX:e.clientX,clientY:e.clientY,currentScale:r,nextScale:t}):null;if(w(t),o&&m)requestAnimationFrame(()=>{o.scrollTo(m)})},className:b("h-full w-full
|
|
1
|
+
import{jsx as n,jsxs as _}from"react/jsx-runtime";import{XIcon as j}from"lucide-react";import{useCallback as p,useEffect as N,useMemo as X,useRef as y,useState as v}from"react";import{Dialog as E,DialogClose as A,DialogContent as F,DialogTitle as Y}from"./ui/dialog.js";import{getPointerCenteredScrollPosition as K}from"./lib/pointer-centered-zoom.js";import{cn as b}from"cn";function te({open:s,onOpenChange:C,url:h,filename:x,scale:g,onScaleChange:f,containerRef:W,containerClassName:H,dialogContentClassName:Z,imageClassName:k}){let d=p((e)=>Math.min(4,Math.max(0.25,e)),[]),[D,M]=v(1),r=d(g??D),I=y(null),c=W??I,O=y(null),[u,S]=v({width:0,height:0}),[z,P]=v({width:0,height:0}),w=p((e)=>{let i=d(e);if(typeof f==="function"){f(i);return}M(i)},[f,d]);N(()=>{if(!s)return;if(!h)return;if(typeof g==="number")return;M(1)},[s,h,g]),N(()=>{if(!s)return;let e=c.current;if(!e)return;let i=()=>{S({width:e.clientWidth,height:e.clientHeight})};i();let t=new ResizeObserver(i);return t.observe(e),()=>{t.disconnect()}},[c,s]);let R=p(()=>{w(1)},[w]),a=X(()=>{let{width:e,height:i}=z,{width:t,height:o}=u;if(e===0||i===0)return{width:0,height:0};if(t===0||o===0)return{width:0,height:0};let l=Math.min(t/e,o/i,1),m=e*l,T=i*l;return{width:m*r,height:T*r}},[r,z,u]);if(!h)return null;return n(E,{open:s,onOpenChange:C,children:_(F,{className:b("top-1/2 left-1/2 h-[90vh] max-h-[90vh] w-[90vw]! max-w-[90vw]! -translate-x-1/2 -translate-y-1/2 gap-0 rounded-none bg-transparent p-0 ring-0 sm:w-[90vw]! sm:max-w-[90vw]!",Z),showCloseButton:!1,children:[n(Y,{className:"sr-only",children:x||"Image preview"}),n(A,{"aria-label":"Close",className:"absolute top-3 right-3 z-10 flex size-10 items-center justify-center rounded-full bg-black/55 text-white backdrop-blur-sm transition-colors hover:bg-black/75",children:n(j,{className:"size-5"})}),n("div",{ref:c,onWheel:(e)=>{if(!e.ctrlKey&&!e.metaKey)return;e.preventDefault();let i=e.deltaY>0?r-0.2:r+0.2,t=d(Number.parseFloat(i.toFixed(2)));if(t===r)return;let o=c.current,l=O.current,m=o&&l?K({container:o,target:l,clientX:e.clientX,clientY:e.clientY,currentScale:r,nextScale:t}):null;if(w(t),o&&m)requestAnimationFrame(()=>{o.scrollTo(m)})},className:b("scrollbar-thin h-full w-full overflow-auto",H),children:n("div",{className:"grid min-h-full min-w-full place-items-center",style:{width:Math.max(u.width,a.width),height:Math.max(u.height,a.height)},children:n("div",{className:"shrink-0",children:n("img",{alt:x||"image preview",className:b("block object-contain select-none",k),decoding:"async",draggable:!1,ref:O,onDoubleClick:R,onLoad:(e)=>{let i=e.currentTarget;P({width:i.naturalWidth,height:i.naturalHeight});let t=c.current;if(t&&(t.clientWidth||t.clientHeight))S({width:t.clientWidth,height:t.clientHeight})},style:{imageRendering:"auto",width:a.width||void 0,height:a.height||void 0,maxWidth:a.width?"none":"90vw",maxHeight:a.height?"none":"90vh"},src:h})})})})]})})}export{te as ImagePreviewDialog};
|
package/dist/lib/limits.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var E=1e6,T=5000000;function e(_,t){return _+t
|
|
1
|
+
var E=1e6,T=5000000;function e(_,t){return _+t>5000000}function M(_){return(_/1e6).toFixed(1)}var o=5;export{E as BYTES_PER_MB,T as MAX_TOTAL_IMAGE_BYTES,o as MAX_TOTAL_IMAGE_MB,e as exceedsImageLimit,M as formatImageSizeMb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Marked as
|
|
1
|
+
import{Marked as d}from"marked";import m from"marked-linkify-it";var h=/<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>/,x=/^<(task-notification|system-reminder|antml:[\w-]+)\b[^>]*>[\s\S]*?(?:<\/\1\s*>|$)/,f=/^(?:\$\$([\s\S]+?)\$\$|\\\[([\s\S]+?)\\\])/,k={extensions:[{name:"math",level:"block",tokenizer(n){let e=f.exec(n);if(e===null)return;return{type:"math",raw:e[0],text:(e[1]??e[2]).trim(),display:!0}}},{name:"math",level:"inline",start(n){return n.search(/\$|\\[([]/)},tokenizer(n){let e=f.exec(n);if(e!==null)return{type:"math",raw:e[0],text:(e[1]??e[2]).trim(),display:!0};let r=/^\\\(([^\n]+?)\\\)/.exec(n);if(r!==null)return{type:"math",raw:r[0],text:r[1].trim(),display:!1};let a=/^\$(?!\$)((?:\\[^\n]|[^\\$\n])+?)\$(?![\d$])/.exec(n);if(a===null||/^\s|\s$/.test(a[1]))return;return{type:"math",raw:a[0],text:a[1],display:!1}}}]};function g(){let n=new d({gfm:!0}),e=m(),r=e.extensions[0],a=r.tokenizer;r.tokenizer=function(o,i){let t=a.call(this,o,i);if(t===void 0)return;if(t.raw.startsWith("<"))return t;let l=/^(?:[a-z][a-z\d+.-]*:\/\/|www\.)[^/?#]+[/?#]/i.exec(t.raw);if(l===null)return t;let c=l[0].length-1,u=t.raw.slice(c).search(/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}]/u);if(u===-1)return t;let s=t.raw.slice(0,c+u),p=t.href.slice(0,t.href.length-(t.raw.length-s.length));return{...t,raw:s,href:p,text:s,tokens:[{type:"text",raw:s,text:s}]}},n.use(k,e);for(let o of["block","inline"])n.use({extensions:[{name:"internalMessage",level:o,...o==="inline"?{start(i){return h.exec(i)?.index}}:{},tokenizer(i){let t=x.exec(i);if(t===null)return;return{type:"internalMessage",raw:t[0]}},renderer(){return""}}]});return n}function z(n){let e=n.replace(/[\p{Cc}\s]/gu,"");return!/^(?:data|javascript|vbscript):/i.test(e)}export{g as createChatMarkdown,z as isSafeMarkdownUrl};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createChatMarkdown as w}from"./markdown-rules.js";function g(e,s){let l=Object.keys(e);return l.length===Object.keys(s).length&&l.every((r)=>{let i=s[r];return i!==void 0&&e[r].href===i.href&&e[r].title===i.title})}function b(e,s){let l=2,r=0;for(let n=e.length-1;n>=0;n-=1){if(e[n].type==="space")continue;if(l-=1,l===0){r=n;break}}let i=0;for(let n=0;n<r;n+=1){let a=e[n];if(a.type==="def"||/^ {0,3}(?:\[
|
|
1
|
+
import{createChatMarkdown as w}from"./markdown-rules.js";function g(e,s){let l=Object.keys(e);return l.length===Object.keys(s).length&&l.every((r)=>{let i=s[r];return i!==void 0&&e[r].href===i.href&&e[r].title===i.title})}function b(e,s){let l=2,r=0;for(let n=e.length-1;n>=0;n-=1){if(e[n].type==="space")continue;if(l-=1,l===0){r=n;break}}let i=0;for(let n=0;n<r;n+=1){let a=e[n];if(a.type==="def"||/^ {0,3}(?:\[|<|\$\$|\\\[)/.test(a.raw))return i;let o=!1;if(s.walkTokens([e[n]],(c)=>{if(c.type==="html"&&(("inLink"in c)&&c.inLink||("inRawBlock"in c)&&c.inRawBlock))o=!0}),o)return i;if(/\n[\t ]*\n$/.test(e[n].raw))i=n+1}return i}function x(e=w()){let s="",l=[],r={},i={};return{parse(n){let a=n.replace(/\r\n|\r/g,`
|
|
2
2
|
`);if(!a.startsWith(s))s="",l=[],r={},i={};let o=new e.Lexer(e.defaults);o.tokens.links={...r};let c=o.lex(a.slice(s.length)),f=[...l,...c],u=c.links;if(l.length>0&&!g(i,u)){let t=e.lexer(a);f=Array.from(t),u=t.links}i=u;let k=0,h=[];for(let t of f){if(!a.startsWith(t.raw,k))break;h.push(t),k+=t.raw.length}return l=h.slice(0,b(h,e)),s=a.slice(0,l.reduce((t,d)=>t+d.raw.length,0)),r=Object.create(null),e.walkTokens(l,(t)=>{if(t.type==="def"&&!Object.hasOwn(r,t.tag))r[t.tag]={href:t.href,title:t.title}}),structuredClone(f)}}}export{x as createStreamingMarkdownLexer};
|
package/dist/locales.d.ts
CHANGED
|
@@ -4,10 +4,13 @@ export declare const chatLocales: {
|
|
|
4
4
|
readonly codex: {
|
|
5
5
|
readonly worked: "تمت المعالجة";
|
|
6
6
|
readonly workedFor: "تمت المعالجة لمدة {{duration}}";
|
|
7
|
+
readonly totalDuration: "المدة الإجمالية {{duration}}";
|
|
7
8
|
readonly editedFilesCount_one: "تم تعديل {{count}} ملف";
|
|
8
9
|
readonly editedFilesCount_other: "تم تعديل {{count}} ملفات";
|
|
9
10
|
readonly viewChanges: "عرض التغييرات";
|
|
10
11
|
readonly hideChanges: "إخفاء التغييرات";
|
|
12
|
+
readonly showMoreFiles: "عرض {{count}} ملفات أخرى";
|
|
13
|
+
readonly showFewerFiles: "عرض ملفات أقل";
|
|
11
14
|
readonly changedLines: "الأسطر المتغيرة";
|
|
12
15
|
readonly showMore: "عرض المزيد";
|
|
13
16
|
readonly showLess: "عرض أقل";
|
|
@@ -126,10 +129,13 @@ export declare const chatLocales: {
|
|
|
126
129
|
readonly codex: {
|
|
127
130
|
readonly worked: "Worked";
|
|
128
131
|
readonly workedFor: "Worked for {{duration}}";
|
|
132
|
+
readonly totalDuration: "Total time {{duration}}";
|
|
129
133
|
readonly editedFilesCount_one: "Edited {{count}} file";
|
|
130
134
|
readonly editedFilesCount_other: "Edited {{count}} files";
|
|
131
135
|
readonly viewChanges: "View changes";
|
|
132
136
|
readonly hideChanges: "Hide changes";
|
|
137
|
+
readonly showMoreFiles: "Show {{count}} more files";
|
|
138
|
+
readonly showFewerFiles: "Show fewer files";
|
|
133
139
|
readonly changedLines: "Changed lines";
|
|
134
140
|
readonly showMore: "Show more";
|
|
135
141
|
readonly showLess: "Show less";
|
|
@@ -384,10 +390,13 @@ export declare const chatLocales: {
|
|
|
384
390
|
readonly codex: {
|
|
385
391
|
readonly worked: "已处理";
|
|
386
392
|
readonly workedFor: "已处理 {{duration}}";
|
|
393
|
+
readonly totalDuration: "用时 {{duration}}";
|
|
387
394
|
readonly editedFilesCount_one: "已编辑 {{count}} 个文件";
|
|
388
395
|
readonly editedFilesCount_other: "已编辑 {{count}} 个文件";
|
|
389
396
|
readonly viewChanges: "查看更改";
|
|
390
397
|
readonly hideChanges: "收起更改";
|
|
398
|
+
readonly showMoreFiles: "显示其余 {{count}} 个文件";
|
|
399
|
+
readonly showFewerFiles: "收起文件";
|
|
391
400
|
readonly changedLines: "更改行数";
|
|
392
401
|
readonly showMore: "展开显示";
|
|
393
402
|
readonly showLess: "收起显示";
|
|
@@ -470,7 +479,7 @@ export declare const chatLocales: {
|
|
|
470
479
|
};
|
|
471
480
|
};
|
|
472
481
|
readonly message: {
|
|
473
|
-
readonly thinking: "
|
|
482
|
+
readonly thinking: "正在思考";
|
|
474
483
|
};
|
|
475
484
|
readonly actions: {
|
|
476
485
|
readonly copy: "复制";
|
package/dist/locales.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var d={ar:{stream:{codex:{worked:"تمت المعالجة",workedFor:"تمت المعالجة لمدة {{duration}}",editedFilesCount_one:"تم تعديل {{count}} ملف",editedFilesCount_other:"تم تعديل {{count}} ملفات",viewChanges:"عرض التغييرات",hideChanges:"إخفاء التغييرات",changedLines:"الأسطر المتغيرة",showMore:"عرض المزيد",showLess:"عرض أقل",thought:"تم التفكير",thoughtFor:"تم التفكير لمدة {{duration}}",running:"جارٍ التشغيل",ran:"تم التشغيل",runningCommand:"جارٍ تشغيل الأمر",ranCommandGeneric:"تم تشغيل الأمر",searching:"جارٍ البحث",searched:"تم البحث",forDetail:"عن {{detail}}",searchingFiles:"جارٍ البحث في الملفات",searchedFiles:"تم البحث في الملفات",searchingWeb:"جارٍ البحث في الويب",searchedWeb:"تم البحث في الويب",readLabel:"تمت قراءة",readFiles:"تمت قراءة الملفات",editingLabel:"جارٍ تعديل",editedLabel:"تم تعديل",editingFiles:"جارٍ تعديل الملفات",editedFiles:"تم تعديل الملفات",deletingLabel:"جارٍ حذف",deletedLabel:"تم حذف",deletingFiles:"جارٍ حذف الملفات",deletedFiles:"تم حذف الملفات",movingLabel:"جارٍ نقل",movedLabel:"تم نقل",movingFiles:"جارٍ نقل الملفات",movedFiles:"تم نقل الملفات",subagentWorking:"بدأ {{name}} العمل",subagentFinished:"أنهى {{name}} العمل",contextCompacted:"تم ضغط السياق",audioOutput:"مخرج صوتي",exitCode:"رمز الخروج {{code}}",summary:{read:{leading:"تمت قراءة الملفات",following:"وقراءة الملفات"},edit:{leading:"تم تعديل الملفات",following:"وتعديل الملفات"},delete:{leading:"تم حذف الملفات",following:"وحذف الملفات"},move:{leading:"تم نقل الملفات",following:"ونقل الملفات"},search:{leading:"تم البحث في الملفات",following:"والبحث في الملفات"},execute:{leading_one:"تم تشغيل أمر",leading_other:"تم تشغيل أوامر",following_one:"وتشغيل أمر",following_other:"وتشغيل أوامر"},fetch:{leading:"تم البحث في الويب",following:"والبحث في الويب"},mcp:{leading_one:"تم استدعاء أداة",leading_other:"تم استدعاء أدوات",following_one:"واستدعاء أداة",following_other:"واستدعاء أدوات"},other:{leading_one:"تم استدعاء أداة",leading_other:"تم استدعاء أدوات",following_one:"واستدعاء أداة",following_other:"واستدعاء أدوات"}}}},message:{thinking:"التفكير"},actions:{copy:"ينسخ"},model:{loadingModels:"جارٍ تحميل النماذج...",switchProvider:"مزود التبديل",moreModels:"المزيد من النماذج",selectModel:"حدد النموذج",switchModel:"نموذج التبديل",noModelsAvailable:"لا توجد نماذج متاحة"}},de:{stream:{},message:{thinking:"Denkt nach"},actions:{copy:"Kopieren"},model:{loadingModels:"Lädt Modelle...",switchProvider:"Provider wechseln",moreModels:"Mehr Modelle",selectModel:"Modell auswählen",switchModel:"Modell wechseln",noModelsAvailable:"Keine Modelle verfügbar"}},en:{stream:{codex:{worked:"Worked",workedFor:"Worked for {{duration}}",editedFilesCount_one:"Edited {{count}} file",editedFilesCount_other:"Edited {{count}} files",viewChanges:"View changes",hideChanges:"Hide changes",changedLines:"Changed lines",showMore:"Show more",showLess:"Show less",thought:"Thought",thoughtFor:"Thought for {{duration}}",running:"Running",ran:"Ran",runningCommand:"Running command",ranCommandGeneric:"Ran command",searching:"Searching",searched:"Searched",forDetail:"for {{detail}}",searchingFiles:"Searching for files",searchedFiles:"Searched for files",searchingWeb:"Searching the web",searchedWeb:"Searched the web",readLabel:"Read",readFiles:"Read files",editingLabel:"Editing",editedLabel:"Edited",editingFiles:"Editing files",editedFiles:"Edited files",deletingLabel:"Deleting",deletedLabel:"Deleted",deletingFiles:"Deleting files",deletedFiles:"Deleted files",movingLabel:"Moving",movedLabel:"Moved",movingFiles:"Moving files",movedFiles:"Moved files",subagentWorking:"{{name}} started working",subagentFinished:"{{name}} finished",contextCompacted:"Context compacted",audioOutput:"Audio output",exitCode:"Exit code {{code}}",summary:{read:{leading:"Read files",following:"read files"},edit:{leading:"Edited files",following:"edited files"},delete:{leading:"Deleted files",following:"deleted files"},move:{leading:"Moved files",following:"moved files"},search:{leading:"Searched files",following:"searched files"},execute:{leading_one:"Ran a command",leading_other:"Ran commands",following_one:"ran a command",following_other:"ran commands"},fetch:{leading:"Searched the web",following:"searched the web"},mcp:{leading_one:"Called a tool",leading_other:"Called tools",following_one:"called a tool",following_other:"called tools"},other:{leading_one:"Called a tool",leading_other:"Called tools",following_one:"called a tool",following_other:"called tools"}}}},message:{thinking:"Thinking"},actions:{copy:"Copy"},model:{loadingModels:"Loading models...",switchProvider:"Switch provider",moreModels:"More models",selectModel:"Select model",switchModel:"Switch model",noModelsAvailable:"No models available"}},es:{stream:{},message:{thinking:"Pensando"},actions:{copy:"Copiar"},model:{loadingModels:"Cargando modelos...",switchProvider:"Cambiar provider",moreModels:"Más modelos",selectModel:"Seleccionar modelo",switchModel:"Cambiar modelo",noModelsAvailable:"No hay modelos disponibles"}},fr:{stream:{},message:{thinking:"Réflexion"},actions:{copy:"Copier"},model:{loadingModels:"Chargement des modèles...",switchProvider:"Changer de provider",moreModels:"Plus de modèles",selectModel:"Sélectionner un modèle",switchModel:"Changer de modèle",noModelsAvailable:"Aucun modèle disponible"}},hi:{stream:{},message:{thinking:"सोच रहा है"},actions:{copy:"कॉपी करें"},model:{loadingModels:"मॉडल लोड हो रहे हैं...",switchProvider:"Provider बदलें",moreModels:"और मॉडल",selectModel:"मॉडल चुनें",switchModel:"मॉडल बदलें",noModelsAvailable:"कोई मॉडल उपलब्ध नहीं"}},id:{stream:{},message:{thinking:"Berpikir"},actions:{copy:"Salin"},model:{loadingModels:"Memuat model...",switchProvider:"Ganti provider",moreModels:"Model lainnya",selectModel:"Pilih model",switchModel:"Ganti model",noModelsAvailable:"Tidak ada model tersedia"}},it:{stream:{},message:{thinking:"Sto pensando"},actions:{copy:"Copia"},model:{loadingModels:"Caricamento modelli...",switchProvider:"Cambia provider",moreModels:"Altri modelli",selectModel:"Seleziona modello",switchModel:"Cambia modello",noModelsAvailable:"Nessun modello disponibile"}},ja:{stream:{},message:{thinking:"考え中"},actions:{copy:"コピー"},model:{loadingModels:"モデルを読み込み中...",switchProvider:"プロバイダーを切り替え",moreModels:"その他のモデル",selectModel:"モデルを選択",switchModel:"モデルを切り替え",noModelsAvailable:"利用可能なモデルがありません"}},ko:{stream:{},message:{thinking:"생각 중"},actions:{copy:"복사"},model:{loadingModels:"모델 로드 중...",switchProvider:"프로바이더 전환",moreModels:"더 많은 모델",selectModel:"모델 선택",switchModel:"모델 전환",noModelsAvailable:"사용 가능한 모델이 없습니다"}},"pt-BR":{stream:{},message:{thinking:"Pensando"},actions:{copy:"Copiar"},model:{loadingModels:"Carregando modelos...",switchProvider:"Mudar provider",moreModels:"Mais modelos",selectModel:"Selecionar modelo",switchModel:"Mudar modelo",noModelsAvailable:"Nenhum modelo disponível"}},ru:{stream:{},message:{thinking:"Думаю"},actions:{copy:"Копировать"},model:{loadingModels:"Загрузка моделей...",switchProvider:"Переключить provider",moreModels:"Больше моделей",selectModel:"Выбрать модель",switchModel:"Переключить модель",noModelsAvailable:"Нет доступных моделей"}},"zh-CN":{stream:{codex:{worked:"已处理",workedFor:"已处理 {{duration}}",editedFilesCount_one:"已编辑 {{count}} 个文件",editedFilesCount_other:"已编辑 {{count}} 个文件",viewChanges:"查看更改",hideChanges:"收起更改",changedLines:"更改行数",showMore:"展开显示",showLess:"收起显示",thought:"已思考",thoughtFor:"思考了 {{duration}}",running:"正在运行",ran:"已运行",runningCommand:"正在运行命令",ranCommandGeneric:"已运行命令",searching:"正在搜索",searched:"已搜索",forDetail:"{{detail}}",searchingFiles:"正在搜索文件",searchedFiles:"已搜索文件",searchingWeb:"正在搜索网页",searchedWeb:"已搜索网页",readLabel:"已读取",readFiles:"已读取文件",editingLabel:"正在编辑",editedLabel:"已编辑",editingFiles:"正在编辑文件",editedFiles:"已编辑文件",deletingLabel:"正在删除",deletedLabel:"已删除",deletingFiles:"正在删除文件",deletedFiles:"已删除文件",movingLabel:"正在移动",movedLabel:"已移动",movingFiles:"正在移动文件",movedFiles:"已移动文件",subagentWorking:"{{name}} 已开始工作",subagentFinished:"{{name}} 已完成",contextCompacted:"上下文已压缩",audioOutput:"音频输出",exitCode:"退出码 {{code}}",summary:{read:{leading:"已读取文件",following:"读取了文件"},edit:{leading:"已编辑文件",following:"编辑了文件"},delete:{leading:"已删除文件",following:"删除了文件"},move:{leading:"已移动文件",following:"移动了文件"},search:{leading:"已搜索文件",following:"搜索了文件"},execute:{leading_one:"已运行命令",leading_other:"已运行命令",following_one:"运行了命令",following_other:"运行了命令"},fetch:{leading:"已搜索网页",following:"搜索了网页"},mcp:{leading_one:"已调用工具",leading_other:"已调用工具",following_one:"调用了工具",following_other:"调用了工具"},other:{leading_one:"已调用工具",leading_other:"已调用工具",following_one:"调用了工具",following_other:"调用了工具"}}}},message:{thinking:"
|
|
1
|
+
var d={ar:{stream:{codex:{worked:"تمت المعالجة",workedFor:"تمت المعالجة لمدة {{duration}}",totalDuration:"المدة الإجمالية {{duration}}",editedFilesCount_one:"تم تعديل {{count}} ملف",editedFilesCount_other:"تم تعديل {{count}} ملفات",viewChanges:"عرض التغييرات",hideChanges:"إخفاء التغييرات",showMoreFiles:"عرض {{count}} ملفات أخرى",showFewerFiles:"عرض ملفات أقل",changedLines:"الأسطر المتغيرة",showMore:"عرض المزيد",showLess:"عرض أقل",thought:"تم التفكير",thoughtFor:"تم التفكير لمدة {{duration}}",running:"جارٍ التشغيل",ran:"تم التشغيل",runningCommand:"جارٍ تشغيل الأمر",ranCommandGeneric:"تم تشغيل الأمر",searching:"جارٍ البحث",searched:"تم البحث",forDetail:"عن {{detail}}",searchingFiles:"جارٍ البحث في الملفات",searchedFiles:"تم البحث في الملفات",searchingWeb:"جارٍ البحث في الويب",searchedWeb:"تم البحث في الويب",readLabel:"تمت قراءة",readFiles:"تمت قراءة الملفات",editingLabel:"جارٍ تعديل",editedLabel:"تم تعديل",editingFiles:"جارٍ تعديل الملفات",editedFiles:"تم تعديل الملفات",deletingLabel:"جارٍ حذف",deletedLabel:"تم حذف",deletingFiles:"جارٍ حذف الملفات",deletedFiles:"تم حذف الملفات",movingLabel:"جارٍ نقل",movedLabel:"تم نقل",movingFiles:"جارٍ نقل الملفات",movedFiles:"تم نقل الملفات",subagentWorking:"بدأ {{name}} العمل",subagentFinished:"أنهى {{name}} العمل",contextCompacted:"تم ضغط السياق",audioOutput:"مخرج صوتي",exitCode:"رمز الخروج {{code}}",summary:{read:{leading:"تمت قراءة الملفات",following:"وقراءة الملفات"},edit:{leading:"تم تعديل الملفات",following:"وتعديل الملفات"},delete:{leading:"تم حذف الملفات",following:"وحذف الملفات"},move:{leading:"تم نقل الملفات",following:"ونقل الملفات"},search:{leading:"تم البحث في الملفات",following:"والبحث في الملفات"},execute:{leading_one:"تم تشغيل أمر",leading_other:"تم تشغيل أوامر",following_one:"وتشغيل أمر",following_other:"وتشغيل أوامر"},fetch:{leading:"تم البحث في الويب",following:"والبحث في الويب"},mcp:{leading_one:"تم استدعاء أداة",leading_other:"تم استدعاء أدوات",following_one:"واستدعاء أداة",following_other:"واستدعاء أدوات"},other:{leading_one:"تم استدعاء أداة",leading_other:"تم استدعاء أدوات",following_one:"واستدعاء أداة",following_other:"واستدعاء أدوات"}}}},message:{thinking:"التفكير"},actions:{copy:"ينسخ"},model:{loadingModels:"جارٍ تحميل النماذج...",switchProvider:"مزود التبديل",moreModels:"المزيد من النماذج",selectModel:"حدد النموذج",switchModel:"نموذج التبديل",noModelsAvailable:"لا توجد نماذج متاحة"}},de:{stream:{},message:{thinking:"Denkt nach"},actions:{copy:"Kopieren"},model:{loadingModels:"Lädt Modelle...",switchProvider:"Provider wechseln",moreModels:"Mehr Modelle",selectModel:"Modell auswählen",switchModel:"Modell wechseln",noModelsAvailable:"Keine Modelle verfügbar"}},en:{stream:{codex:{worked:"Worked",workedFor:"Worked for {{duration}}",totalDuration:"Total time {{duration}}",editedFilesCount_one:"Edited {{count}} file",editedFilesCount_other:"Edited {{count}} files",viewChanges:"View changes",hideChanges:"Hide changes",showMoreFiles:"Show {{count}} more files",showFewerFiles:"Show fewer files",changedLines:"Changed lines",showMore:"Show more",showLess:"Show less",thought:"Thought",thoughtFor:"Thought for {{duration}}",running:"Running",ran:"Ran",runningCommand:"Running command",ranCommandGeneric:"Ran command",searching:"Searching",searched:"Searched",forDetail:"for {{detail}}",searchingFiles:"Searching for files",searchedFiles:"Searched for files",searchingWeb:"Searching the web",searchedWeb:"Searched the web",readLabel:"Read",readFiles:"Read files",editingLabel:"Editing",editedLabel:"Edited",editingFiles:"Editing files",editedFiles:"Edited files",deletingLabel:"Deleting",deletedLabel:"Deleted",deletingFiles:"Deleting files",deletedFiles:"Deleted files",movingLabel:"Moving",movedLabel:"Moved",movingFiles:"Moving files",movedFiles:"Moved files",subagentWorking:"{{name}} started working",subagentFinished:"{{name}} finished",contextCompacted:"Context compacted",audioOutput:"Audio output",exitCode:"Exit code {{code}}",summary:{read:{leading:"Read files",following:"read files"},edit:{leading:"Edited files",following:"edited files"},delete:{leading:"Deleted files",following:"deleted files"},move:{leading:"Moved files",following:"moved files"},search:{leading:"Searched files",following:"searched files"},execute:{leading_one:"Ran a command",leading_other:"Ran commands",following_one:"ran a command",following_other:"ran commands"},fetch:{leading:"Searched the web",following:"searched the web"},mcp:{leading_one:"Called a tool",leading_other:"Called tools",following_one:"called a tool",following_other:"called tools"},other:{leading_one:"Called a tool",leading_other:"Called tools",following_one:"called a tool",following_other:"called tools"}}}},message:{thinking:"Thinking"},actions:{copy:"Copy"},model:{loadingModels:"Loading models...",switchProvider:"Switch provider",moreModels:"More models",selectModel:"Select model",switchModel:"Switch model",noModelsAvailable:"No models available"}},es:{stream:{},message:{thinking:"Pensando"},actions:{copy:"Copiar"},model:{loadingModels:"Cargando modelos...",switchProvider:"Cambiar provider",moreModels:"Más modelos",selectModel:"Seleccionar modelo",switchModel:"Cambiar modelo",noModelsAvailable:"No hay modelos disponibles"}},fr:{stream:{},message:{thinking:"Réflexion"},actions:{copy:"Copier"},model:{loadingModels:"Chargement des modèles...",switchProvider:"Changer de provider",moreModels:"Plus de modèles",selectModel:"Sélectionner un modèle",switchModel:"Changer de modèle",noModelsAvailable:"Aucun modèle disponible"}},hi:{stream:{},message:{thinking:"सोच रहा है"},actions:{copy:"कॉपी करें"},model:{loadingModels:"मॉडल लोड हो रहे हैं...",switchProvider:"Provider बदलें",moreModels:"और मॉडल",selectModel:"मॉडल चुनें",switchModel:"मॉडल बदलें",noModelsAvailable:"कोई मॉडल उपलब्ध नहीं"}},id:{stream:{},message:{thinking:"Berpikir"},actions:{copy:"Salin"},model:{loadingModels:"Memuat model...",switchProvider:"Ganti provider",moreModels:"Model lainnya",selectModel:"Pilih model",switchModel:"Ganti model",noModelsAvailable:"Tidak ada model tersedia"}},it:{stream:{},message:{thinking:"Sto pensando"},actions:{copy:"Copia"},model:{loadingModels:"Caricamento modelli...",switchProvider:"Cambia provider",moreModels:"Altri modelli",selectModel:"Seleziona modello",switchModel:"Cambia modello",noModelsAvailable:"Nessun modello disponibile"}},ja:{stream:{},message:{thinking:"考え中"},actions:{copy:"コピー"},model:{loadingModels:"モデルを読み込み中...",switchProvider:"プロバイダーを切り替え",moreModels:"その他のモデル",selectModel:"モデルを選択",switchModel:"モデルを切り替え",noModelsAvailable:"利用可能なモデルがありません"}},ko:{stream:{},message:{thinking:"생각 중"},actions:{copy:"복사"},model:{loadingModels:"모델 로드 중...",switchProvider:"프로바이더 전환",moreModels:"더 많은 모델",selectModel:"모델 선택",switchModel:"모델 전환",noModelsAvailable:"사용 가능한 모델이 없습니다"}},"pt-BR":{stream:{},message:{thinking:"Pensando"},actions:{copy:"Copiar"},model:{loadingModels:"Carregando modelos...",switchProvider:"Mudar provider",moreModels:"Mais modelos",selectModel:"Selecionar modelo",switchModel:"Mudar modelo",noModelsAvailable:"Nenhum modelo disponível"}},ru:{stream:{},message:{thinking:"Думаю"},actions:{copy:"Копировать"},model:{loadingModels:"Загрузка моделей...",switchProvider:"Переключить provider",moreModels:"Больше моделей",selectModel:"Выбрать модель",switchModel:"Переключить модель",noModelsAvailable:"Нет доступных моделей"}},"zh-CN":{stream:{codex:{worked:"已处理",workedFor:"已处理 {{duration}}",totalDuration:"用时 {{duration}}",editedFilesCount_one:"已编辑 {{count}} 个文件",editedFilesCount_other:"已编辑 {{count}} 个文件",viewChanges:"查看更改",hideChanges:"收起更改",showMoreFiles:"显示其余 {{count}} 个文件",showFewerFiles:"收起文件",changedLines:"更改行数",showMore:"展开显示",showLess:"收起显示",thought:"已思考",thoughtFor:"思考了 {{duration}}",running:"正在运行",ran:"已运行",runningCommand:"正在运行命令",ranCommandGeneric:"已运行命令",searching:"正在搜索",searched:"已搜索",forDetail:"{{detail}}",searchingFiles:"正在搜索文件",searchedFiles:"已搜索文件",searchingWeb:"正在搜索网页",searchedWeb:"已搜索网页",readLabel:"已读取",readFiles:"已读取文件",editingLabel:"正在编辑",editedLabel:"已编辑",editingFiles:"正在编辑文件",editedFiles:"已编辑文件",deletingLabel:"正在删除",deletedLabel:"已删除",deletingFiles:"正在删除文件",deletedFiles:"已删除文件",movingLabel:"正在移动",movedLabel:"已移动",movingFiles:"正在移动文件",movedFiles:"已移动文件",subagentWorking:"{{name}} 已开始工作",subagentFinished:"{{name}} 已完成",contextCompacted:"上下文已压缩",audioOutput:"音频输出",exitCode:"退出码 {{code}}",summary:{read:{leading:"已读取文件",following:"读取了文件"},edit:{leading:"已编辑文件",following:"编辑了文件"},delete:{leading:"已删除文件",following:"删除了文件"},move:{leading:"已移动文件",following:"移动了文件"},search:{leading:"已搜索文件",following:"搜索了文件"},execute:{leading_one:"已运行命令",leading_other:"已运行命令",following_one:"运行了命令",following_other:"运行了命令"},fetch:{leading:"已搜索网页",following:"搜索了网页"},mcp:{leading_one:"已调用工具",leading_other:"已调用工具",following_one:"调用了工具",following_other:"调用了工具"},other:{leading_one:"已调用工具",leading_other:"已调用工具",following_one:"调用了工具",following_other:"调用了工具"}}}},message:{thinking:"正在思考"},actions:{copy:"复制"},model:{loadingModels:"加载模型中...",switchProvider:"切换服务商",moreModels:"更多模型",selectModel:"选择模型",switchModel:"切换模型",noModelsAvailable:"暂无可用模型"}}};function n(e){let o={...e};for(let[l,i]of Object.entries(d))o[l]={...e[l],alwithChat:i};return o}export{d as chatLocales,n as withChatResources};
|
|
@@ -16,4 +16,4 @@ export interface ChatSearchProps {
|
|
|
16
16
|
};
|
|
17
17
|
placement?: "header" | "body";
|
|
18
18
|
}
|
|
19
|
-
export declare function ChatSearch({ getViewport, findSourceMatches, revealTurn, subscribeOpen, labels, placement
|
|
19
|
+
export declare function ChatSearch({ getViewport, findSourceMatches, revealTurn, subscribeOpen, labels, placement }: ChatSearchProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as b,jsxs as G,Fragment as Y}from"react/jsx-runtime";import{SearchIcon as Z}from"lucide-react";import{useCallback as N,useEffect as f,useMemo as O,useRef as S,useState as E}from"react";import{Button as V}from"../ui/button.js";import{FindBar as tt}from"./find-bar.js";import{cn as et}from"cn";import{collectMatches as P}from"./dom-matches.js";import{collectMatches as mt}from"./dom-matches.js";var z="chat-search",K="chat-search-current",D=150;function at(e){let r=e===null?"":e;return[...document.querySelectorAll("[data-chat-scroll]")].find((c)=>c.dataset.chatScroll===r)??null}var rt=12;function Q(e,r="center"){let c=e.closest("[data-chat-scroll]");if(!c)return;let d=e.getBoundingClientRect(),g=c.getBoundingClientRect(),y=r==="start"?rt:(c.clientHeight-d.height)/2;c.scrollTo({top:c.scrollTop+(d.top-g.top)-y,behavior:"smooth"})}function B(e){let r=e.startContainer.parentElement;if(!r)return;Q(r)}var R=new Map;function U(){if(typeof CSS>"u"||!("highlights"in CSS)||typeof Highlight>"u")return;if(R.size===0){CSS.highlights.delete(z),CSS.highlights.delete(K);return}let e=[...R.values()];CSS.highlights.set(z,new Highlight(...e.flatMap((r)=>r.all))),CSS.highlights.set(K,new Highlight(...e.flatMap((r)=>r.current?[r.current]:[])))}function nt(){let e=Symbol();return{clearHighlights(){R.delete(e),U()},applyHighlights(r,c){R.set(e,{all:r,current:c}),U()}}}function ft({getViewport:e,findSourceMatches:r,revealTurn:c,subscribeOpen:d,labels:g,placement:y="header"}){let{clearHighlights:h,applyHighlights:T}=O(nt,[]),m=r!==void 0,[
|
|
1
|
+
import{jsx as b,jsxs as G,Fragment as Y}from"react/jsx-runtime";import{SearchIcon as Z}from"lucide-react";import{useCallback as N,useEffect as f,useMemo as O,useRef as S,useState as E}from"react";import{Button as V}from"../ui/button.js";import{FindBar as tt}from"./find-bar.js";import{cn as et}from"cn";import{collectMatches as P}from"./dom-matches.js";import{collectMatches as mt}from"./dom-matches.js";var z="chat-search",K="chat-search-current",D=150;function at(e){let r=e===null?"":e;return[...document.querySelectorAll("[data-chat-scroll]")].find((c)=>c.dataset.chatScroll===r)??null}var rt=12;function Q(e,r="center"){let c=e.closest("[data-chat-scroll]");if(!c)return;let d=e.getBoundingClientRect(),g=c.getBoundingClientRect(),y=r==="start"?rt:(c.clientHeight-d.height)/2;c.scrollTo({top:c.scrollTop+(d.top-g.top)-y,behavior:"smooth"})}function B(e){let r=e.startContainer.parentElement;if(!r)return;Q(r)}var R=new Map;function U(){if(typeof CSS>"u"||!("highlights"in CSS)||typeof Highlight>"u")return;if(R.size===0){CSS.highlights.delete(z),CSS.highlights.delete(K);return}let e=[...R.values()];CSS.highlights.set(z,new Highlight(...e.flatMap((r)=>r.all))),CSS.highlights.set(K,new Highlight(...e.flatMap((r)=>r.current?[r.current]:[])))}function nt(){let e=Symbol();return{clearHighlights(){R.delete(e),U()},applyHighlights(r,c){R.set(e,{all:r,current:c}),U()}}}function ft({getViewport:e,findSourceMatches:r,revealTurn:c,subscribeOpen:d,labels:g,placement:y="header"}){let{clearHighlights:h,applyHighlights:T}=O(nt,[]),m=r!==void 0,[i,I]=E(!1),[l,L]=E(""),u=O(()=>i&&l.trim()&&r?r(l.trim()):[],[r,i,l]),[F,M]=E(0),[J,x]=E(0),p=S([]),w=S(0),s=S(null),j=S(null),q=S(null);f(()=>{if(!d)return;return d(()=>{I(!0);let t=q.current;if(t!==null)t.focus(),t.select()})},[d]);let _=N(async(o,t)=>{let n=u[o];if(n===void 0)return;let a=e();if(a===null)throw Error("Chat scroll container is missing");if(c)await c(n.turnKey,t);if(t.aborted)return;let C=a.querySelector(`[data-turn-key="${CSS.escape(n.turnKey)}"]`);if(C===null)throw Error(`Codex turn is missing: ${n.turnKey}`);if(!c)Q(C,"start");if(await new Promise((X)=>requestAnimationFrame(()=>X())),t.aborted)return;let k=P(C,l.trim());p.current=k;let H=k[n.occurrenceInTurn];if(T(k,H===void 0?null:H),H!==void 0)B(H)},[u,e,l,c]),A=S(_);f(()=>{A.current=_},[_]);let v=N(()=>{I(!1),L(""),w.current=0,s.current?.abort(),s.current=null,h(),p.current=[]},[]);f(()=>{if(!i)return;let o=(t)=>{if(t.key==="Escape"&&j.current?.contains(document.activeElement))t.preventDefault(),v()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[i,v]),f(()=>{if(!i||!l.trim()){h(),p.current=[],M(0),x(0),w.current=0;return}let o=setTimeout(()=>{if(m)return;let t=e();if(!t)return;let n=P(t,l);if(p.current=n,M(n.length),x(0),T(n,n[0]??null),n[0])B(n[0])},D);return()=>{clearTimeout(o),h()}},[m,i,l,e]),f(()=>{if(!i||!m||!l.trim())return;let o=new AbortController;s.current?.abort(),s.current=o;let t=setTimeout(()=>{p.current=[],w.current=0,M(u.length),x(0),h(),A.current(0,o.signal)},D);return()=>{if(o.abort(),s.current===o)s.current=null;clearTimeout(t),h()}},[u.length,m,i,l]),f(()=>()=>{s.current?.abort(),h()},[]),f(()=>{if(!i)h()},[i]);let W=N((o)=>{if(m){if(u.length===0)return;let n=(w.current+(o?-1:1)+u.length)%u.length;w.current=n,x(n),s.current?.abort();let a=new AbortController;s.current=a,A.current(n,a.signal);return}let t=p.current;if(!t.length)return;x((n)=>{let a=(n+(o?-1:1)+t.length)%t.length,C=t[a];return T(t,C),B(C),a})},[u.length,m]);return G(Y,{children:[y==="header"&&b(V,{variant:"ghost",size:"icon-sm",title:g.search,onClick:()=>i?v():I(!0),children:b(Z,{})}),i&&G("div",{"data-chat-search":!0,ref:j,className:et("bg-background border-b",y==="body"?"relative shrink-0":"absolute inset-x-0 top-full z-30"),children:[b(tt,{ref:q,value:l,onChange:L,onFind:W,onClose:v,placeholder:g.placeholder,prevTitle:g.previous,nextTitle:g.next}),l.trim()&&b("div",{className:"text-muted-foreground border-border border-t px-3 py-1 text-[11px]",children:F===0?"0 / 0":`${J+1} / ${F}`})]})]})}export{ft as ChatSearch,mt as collectMatches,at as findChatScrollContainer,Q as scrollChatElementIntoView};
|
|
@@ -11,4 +11,4 @@ export interface FindBarProps {
|
|
|
11
11
|
nextTitle?: string;
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
export declare function FindBar({ ref, value, onChange, onFind, onClose, placeholder, autoFocusOpen, prevTitle, nextTitle, className
|
|
14
|
+
export declare function FindBar({ ref, value, onChange, onFind, onClose, placeholder, autoFocusOpen, prevTitle, nextTitle, className }: FindBarProps): import("react").JSX.Element;
|
package/dist/ui/card.d.ts
CHANGED
|
@@ -8,4 +8,4 @@ declare function CardDescription({ className, ...props }: React.ComponentProps<"
|
|
|
8
8
|
declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
9
9
|
declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
10
10
|
declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
11
|
-
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent
|
|
11
|
+
export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent };
|
package/dist/ui/card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{cn as d}from"cn";function c({className:a,size:r="default",...e}){return t("div",{"data-slot":"card","data-size":r,className:d("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{cn as d}from"cn";function c({className:a,size:r="default",...e}){return t("div",{"data-slot":"card","data-size":r,className:d("group/card bg-card text-card-foreground ring-foreground/10 flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl py-(--card-spacing) text-sm shadow-xs ring-1 [--card-spacing:--spacing(6)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...e})}function n({className:a,...r}){return t("div",{"data-slot":"card-header",className:d("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",a),...r})}function i({className:a,...r}){return t("div",{"data-slot":"card-title",className:d("font-heading text-base leading-normal font-medium group-data-[size=sm]/card:text-sm",a),...r})}function l({className:a,...r}){return t("div",{"data-slot":"card-description",className:d("text-muted-foreground text-sm",a),...r})}function u({className:a,...r}){return t("div",{"data-slot":"card-action",className:d("col-start-2 row-span-2 row-start-1 self-start justify-self-end",a),...r})}function g({className:a,...r}){return t("div",{"data-slot":"card-content",className:d("flex flex-col gap-3 px-(--card-spacing)",a),...r})}function p({className:a,...r}){return t("div",{"data-slot":"card-footer",className:d("flex items-center rounded-b-xl px-(--card-spacing) [.border-t]:pt-(--card-spacing)",a),...r})}export{c as Card,u as CardAction,g as CardContent,l as CardDescription,p as CardFooter,n as CardHeader,i as CardTitle};
|
package/dist/ui/checkbox.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e}from"react/jsx-runtime";import{Checkbox as r}from"@base-ui/react/checkbox";import{cn as t}from"cn";import{CheckIcon as d}from"lucide-react";function l({className:i,...a}){return e(r.Root,{"data-slot":"checkbox",className:t("peer
|
|
1
|
+
import{jsx as e}from"react/jsx-runtime";import{Checkbox as r}from"@base-ui/react/checkbox";import{cn as t}from"cn";import{CheckIcon as d}from"lucide-react";function l({className:i,...a}){return e(r.Root,{"data-slot":"checkbox",className:t("peer border-input group-has-[:focus-visible]/field-label:not-data-checked:border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border shadow-xs transition-shadow outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",i),...a,children:e(r.Indicator,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none [&>svg]:size-3.5",children:e(d,{})})})}export{l as Checkbox};
|
package/dist/ui/dialog.d.ts
CHANGED
|
@@ -14,4 +14,4 @@ declare function DialogFooter({ className, showCloseButton, children, ...props }
|
|
|
14
14
|
}): React.JSX.Element;
|
|
15
15
|
declare function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props): React.JSX.Element;
|
|
16
16
|
declare function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props): React.JSX.Element;
|
|
17
|
-
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger
|
|
17
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
package/dist/ui/dialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as a,jsxs as l}from"react/jsx-runtime";import{Dialog as e}from"@base-ui/react/dialog";import{cn as r}from"cn";import{Button as d}from"./button.js";import{XIcon as s}from"lucide-react";function D({...o}){return a(e.Root,{"data-slot":"dialog",...o})}function h({...o}){return a(e.Trigger,{"data-slot":"dialog-trigger",...o})}function c({...o}){return a(e.Portal,{"data-slot":"dialog-portal",...o})}function v({...o}){return a(e.Close,{"data-slot":"dialog-close",...o})}function u({className:o,...t}){return a(e.Backdrop,{"data-slot":"dialog-overlay",className:r("
|
|
1
|
+
import{jsx as a,jsxs as l}from"react/jsx-runtime";import{Dialog as e}from"@base-ui/react/dialog";import{cn as r}from"cn";import{Button as d}from"./button.js";import{XIcon as s}from"lucide-react";function D({...o}){return a(e.Root,{"data-slot":"dialog",...o})}function h({...o}){return a(e.Trigger,{"data-slot":"dialog-trigger",...o})}function c({...o}){return a(e.Portal,{"data-slot":"dialog-portal",...o})}function v({...o}){return a(e.Close,{"data-slot":"dialog-close",...o})}function u({className:o,...t}){return a(e.Backdrop,{"data-slot":"dialog-overlay",className:r("data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs",o),...t})}function N({className:o,children:t,showCloseButton:n=!0,...i}){return l(c,{children:[a(u,{}),l(e.Popup,{"data-slot":"dialog-content",className:r("bg-popover text-popover-foreground ring-foreground/10 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-6 rounded-xl p-6 text-sm ring-1 duration-100 outline-none sm:max-w-md",o),...i,children:[t,n&&l(e.Close,{"data-slot":"dialog-close",render:a(d,{variant:"ghost",className:"absolute top-4 right-4",size:"icon-sm"}),children:[a(s,{}),a("span",{className:"sr-only",children:"Close"})]})]})]})}function b({className:o,...t}){return a("div",{"data-slot":"dialog-header",className:r("flex flex-col gap-2",o),...t})}function C({className:o,showCloseButton:t=!1,children:n,...i}){return l("div",{"data-slot":"dialog-footer",className:r("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",o),...i,children:[n,t&&a(e.Close,{render:a(d,{variant:"outline"}),children:"Close"})]})}function j({className:o,...t}){return a(e.Title,{"data-slot":"dialog-title",className:r("font-heading leading-none font-medium",o),...t})}function y({className:o,...t}){return a(e.Description,{"data-slot":"dialog-description",className:r("text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3",o),...t})}export{D as Dialog,v as DialogClose,N as DialogContent,y as DialogDescription,C as DialogFooter,b as DialogHeader,u as DialogOverlay,c as DialogPortal,j as DialogTitle,h as DialogTrigger};
|
|
@@ -26,4 +26,4 @@ declare function DropdownMenuRadioItem({ className, children, inset, ...props }:
|
|
|
26
26
|
}): React.JSX.Element;
|
|
27
27
|
declare function DropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props): React.JSX.Element;
|
|
28
28
|
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
29
|
-
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent
|
|
29
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent };
|
package/dist/ui/dropdown-menu.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as u}from"react/jsx-runtime";import{Menu as n}from"@base-ui/react/menu";import{cn as r}from"cn";import{ChevronRightIcon as l,CheckIcon as c}from"lucide-react";function x({...e}){return t(n.Root,{"data-slot":"dropdown-menu",...e})}function h({...e}){return t(n.Portal,{"data-slot":"dropdown-menu-portal",...e})}function w({...e}){return t(n.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function p({align:e="start",alignOffset:o=0,side:a="bottom",sideOffset:d=4,className:i,...s}){return t(n.Portal,{children:t(n.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:o,side:a,sideOffset:d,children:t(n.Popup,{"data-slot":"dropdown-menu-content",className:r("
|
|
1
|
+
import{jsx as t,jsxs as u}from"react/jsx-runtime";import{Menu as n}from"@base-ui/react/menu";import{cn as r}from"cn";import{ChevronRightIcon as l,CheckIcon as c}from"lucide-react";function x({...e}){return t(n.Root,{"data-slot":"dropdown-menu",...e})}function h({...e}){return t(n.Portal,{"data-slot":"dropdown-menu-portal",...e})}function w({...e}){return t(n.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function p({align:e="start",alignOffset:o=0,side:a="bottom",sideOffset:d=4,className:i,...s}){return t(n.Portal,{children:t(n.Positioner,{className:"isolate z-50 outline-none",align:e,alignOffset:o,side:a,sideOffset:d,children:t(n.Popup,{"data-slot":"dropdown-menu-content",className:r("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md p-1 shadow-md ring-1 duration-100 outline-none data-closed:overflow-hidden",i),...s})})})}function b({...e}){return t(n.Group,{"data-slot":"dropdown-menu-group",...e})}function M({className:e,inset:o,...a}){return t(n.GroupLabel,{"data-slot":"dropdown-menu-label","data-inset":o,className:r("text-muted-foreground px-2 py-1.5 text-xs font-medium data-inset:pl-8",e),...a})}function D({className:e,inset:o,variant:a="default",...d}){return t(n.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":a,className:r("group/dropdown-menu-item focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:*:[svg]:text-destructive relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...d})}function z({...e}){return t(n.SubmenuRoot,{"data-slot":"dropdown-menu-sub",...e})}function _({className:e,inset:o,children:a,...d}){return u(n.SubmenuTrigger,{"data-slot":"dropdown-menu-sub-trigger","data-inset":o,className:r("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...d,children:[a,t(l,{className:"ml-auto"})]})}function k({align:e="start",alignOffset:o=-3,side:a="right",sideOffset:d=0,className:i,...s}){return t(p,{"data-slot":"dropdown-menu-sub-content",className:r("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 w-auto min-w-[96px] rounded-md p-1 shadow-lg ring-1 duration-100",i),align:e,alignOffset:o,side:a,sideOffset:d,...s})}function N({className:e,children:o,checked:a,inset:d,...i}){return u(n.CheckboxItem,{"data-slot":"dropdown-menu-checkbox-item","data-inset":d,className:r("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),checked:a,...i,children:[t("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-checkbox-item-indicator",children:t(n.CheckboxItemIndicator,{children:t(c,{})})}),o]})}function y({...e}){return t(n.RadioGroup,{"data-slot":"dropdown-menu-radio-group",...e})}function I({className:e,children:o,inset:a,...d}){return u(n.RadioItem,{"data-slot":"dropdown-menu-radio-item","data-inset":a,className:r("focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...d,children:[t("span",{className:"pointer-events-none absolute right-2 flex items-center justify-center","data-slot":"dropdown-menu-radio-item-indicator",children:t(n.RadioItemIndicator,{children:t(c,{})})}),o]})}function R({className:e,...o}){return t(n.Separator,{"data-slot":"dropdown-menu-separator",className:r("bg-border -mx-1 my-1 h-px",e),...o})}function S({className:e,...o}){return t("span",{"data-slot":"dropdown-menu-shortcut",className:r("text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest",e),...o})}export{x as DropdownMenu,N as DropdownMenuCheckboxItem,p as DropdownMenuContent,b as DropdownMenuGroup,D as DropdownMenuItem,M as DropdownMenuLabel,h as DropdownMenuPortal,y as DropdownMenuRadioGroup,I as DropdownMenuRadioItem,R as DropdownMenuSeparator,S as DropdownMenuShortcut,z as DropdownMenuSub,k as DropdownMenuSubContent,_ as DropdownMenuSubTrigger,w as DropdownMenuTrigger};
|
package/dist/ui/field.d.ts
CHANGED
|
@@ -21,4 +21,4 @@ declare function FieldError({ className, children, errors, ...props }: React.Com
|
|
|
21
21
|
message?: string;
|
|
22
22
|
} | undefined>;
|
|
23
23
|
}): import("react").JSX.Element | null;
|
|
24
|
-
export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle
|
|
24
|
+
export { Field, FieldLabel, FieldDescription, FieldError, FieldGroup, FieldLegend, FieldSeparator, FieldSet, FieldContent, FieldTitle };
|
package/dist/ui/field.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t,jsxs as f}from"react/jsx-runtime";import{useMemo as u}from"react";import{cva as c}from"class-variance-authority";import{cn as l}from"cn";import{Label as m}from"./label.js";import{Separator as p}from"./separator.js";function k({className:a,...e}){return t("fieldset",{"data-slot":"field-set",className:l("flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",a),...e})}function y({className:a,variant:e="legend",...o}){return t("legend",{"data-slot":"field-legend","data-variant":e,className:l("mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",a),...o})}function F({className:a,...e}){return t("div",{"data-slot":"field-group",className:l("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",a),...e})}var g=c("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function j({className:a,orientation:e="vertical",...o}){return t("div",{role:"group","data-slot":"field","data-orientation":e,className:l(g({orientation:e}),a),...o})}function L({className:a,...e}){return t("div",{"data-slot":"field-content",className:l("group/field-content flex flex-1 flex-col gap-1 leading-snug",a),...e})}function S({className:a,...e}){return t(m,{"data-slot":"field-label",className:l("group/field-label peer/field-label
|
|
1
|
+
import{jsx as t,jsxs as f}from"react/jsx-runtime";import{useMemo as u}from"react";import{cva as c}from"class-variance-authority";import{cn as l}from"cn";import{Label as m}from"./label.js";import{Separator as p}from"./separator.js";function k({className:a,...e}){return t("fieldset",{"data-slot":"field-set",className:l("flex flex-col gap-6 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3",a),...e})}function y({className:a,variant:e="legend",...o}){return t("legend",{"data-slot":"field-legend","data-variant":e,className:l("mb-3 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base",a),...o})}function F({className:a,...e}){return t("div",{"data-slot":"field-group",className:l("group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",a),...e})}var g=c("group/field flex w-full gap-3 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});function j({className:a,orientation:e="vertical",...o}){return t("div",{role:"group","data-slot":"field","data-orientation":e,className:l(g({orientation:e}),a),...o})}function L({className:a,...e}){return t("div",{"data-slot":"field-content",className:l("group/field-content flex flex-1 flex-col gap-1 leading-snug",a),...e})}function S({className:a,...e}){return t(m,{"data-slot":"field-label",className:l("group/field-label peer/field-label has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10 flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-[>[data-slot=field]]:rounded-md has-[>[data-slot=field]]:border has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 *:data-[slot=field]:p-3","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",a),...e})}function z({className:a,...e}){return t("div",{"data-slot":"field-label",className:l("flex w-fit items-center gap-2 text-sm font-medium group-data-[disabled=true]/field:opacity-50",a),...e})}function E({className:a,...e}){return t("p",{"data-slot":"field-description",className:l("text-muted-foreground text-left text-sm leading-normal font-normal group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5","last:mt-0 nth-last-2:-mt-1","[&>a:hover]:text-primary [&>a]:underline [&>a]:underline-offset-4",a),...e})}function M({children:a,className:e,...o}){return f("div",{"data-slot":"field-separator","data-content":!!a,className:l("relative -my-2 h-5 text-sm group-data-[variant=outline]/field-group:-mb-2",e),...o,children:[t(p,{className:"absolute inset-0 top-1/2"}),a&&t("span",{className:"bg-background text-muted-foreground relative mx-auto block w-fit px-2","data-slot":"field-separator-content",children:a})]})}function V({className:a,children:e,errors:o,...s}){let r=u(()=>{if(e)return e;if(!o?.length)return null;let i=[...new Map(o.map((d)=>[d?.message,d])).values()];if(i?.length==1)return i[0]?.message;return t("ul",{className:"ml-4 flex list-disc flex-col gap-1",children:i.map((d,n)=>d?.message&&t("li",{children:d.message},n))})},[e,o]);if(!r)return null;return t("div",{role:"alert","data-slot":"field-error",className:l("text-destructive text-sm font-normal",a),...s,children:r})}export{j as Field,L as FieldContent,E as FieldDescription,V as FieldError,F as FieldGroup,S as FieldLabel,y as FieldLegend,M as FieldSeparator,k as FieldSet,z as FieldTitle};
|
package/dist/ui/hover-card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{PreviewCard as e}from"@base-ui/react/preview-card";import{cn as s}from"cn";function g({...o}){return t(e.Root,{"data-slot":"hover-card",...o})}function c({...o}){return t(e.Trigger,{"data-slot":"hover-card-trigger",...o})}function p({className:o,side:r="bottom",sideOffset:i=4,align:a="center",alignOffset:d=4,...n}){return t(e.Portal,{"data-slot":"hover-card-portal",children:t(e.Positioner,{align:a,alignOffset:d,side:r,sideOffset:i,className:"isolate z-50",children:t(e.Popup,{"data-slot":"hover-card-content",className:s("
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{PreviewCard as e}from"@base-ui/react/preview-card";import{cn as s}from"cn";function g({...o}){return t(e.Root,{"data-slot":"hover-card",...o})}function c({...o}){return t(e.Trigger,{"data-slot":"hover-card-trigger",...o})}function p({className:o,side:r="bottom",sideOffset:i=4,align:a="center",alignOffset:d=4,...n}){return t(e.Portal,{"data-slot":"hover-card-portal",children:t(e.Positioner,{align:a,alignOffset:d,side:r,sideOffset:i,className:"isolate z-50",children:t(e.Popup,{"data-slot":"hover-card-content",className:s("bg-popover text-popover-foreground ring-foreground/10 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 z-50 w-64 origin-(--transform-origin) rounded-lg p-4 text-sm shadow-md ring-1 outline-hidden duration-100",o),...n})})})}export{g as HoverCard,p as HoverCardContent,c as HoverCardTrigger};
|
package/dist/ui/input-group.d.ts
CHANGED
|
@@ -14,4 +14,4 @@ declare function InputGroupButton({ className, type, variant, size, ...props }:
|
|
|
14
14
|
type?: "button" | "submit" | "reset";
|
|
15
15
|
}): React.JSX.Element;
|
|
16
16
|
declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
17
|
-
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupTextarea
|
|
17
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupTextarea };
|
package/dist/ui/input-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as n}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";import{cn as o}from"cn";import{Button as u}from"./button.js";import{InputGroupTextarea as h}from"./input-group-textarea.js";function f({className:a,...t}){return n("div",{"data-slot":"input-group",role:"group",className:o("group/input-group relative flex h-9 w-full min-w-0 items-center rounded-md border
|
|
1
|
+
import{jsx as n}from"react/jsx-runtime";import{cva as i}from"class-variance-authority";import{cn as o}from"cn";import{Button as u}from"./button.js";import{InputGroupTextarea as h}from"./input-group-textarea.js";function f({className:a,...t}){return n("div",{"data-slot":"input-group",role:"group",className:o("group/input-group border-input has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-destructive/20 dark:bg-input/30 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 relative flex h-9 w-full min-w-0 items-center rounded-md border shadow-xs transition-[color,box-shadow] outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-3 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5",a),...t})}var l=i("flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4",{variants:{align:{"inline-start":"order-first pl-2 has-[>button]:-ml-1 has-[>kbd]:ml-[-0.15rem]","inline-end":"order-last pr-2 has-[>button]:-mr-1 has-[>kbd]:mr-[-0.15rem]","block-start":"order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2","block-end":"order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"}},defaultVariants:{align:"inline-start"}});function x({className:a,align:t="inline-start",...s}){return n("div",{role:"group","data-slot":"input-group-addon","data-align":t,className:o(l({align:t}),a),onClick:(r)=>{if(r.target.closest("button"))return;r.currentTarget.parentElement?.querySelector("input")?.focus()},...s})}var p=i("flex items-center gap-2 text-sm shadow-none",{variants:{size:{xs:"h-6 gap-1 rounded-[calc(var(--radius)-5px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5",sm:"","icon-xs":"size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0","icon-sm":"size-8 p-0 has-[>svg]:p-0"}},defaultVariants:{size:"xs"}});function v({className:a,type:t="button",variant:s="ghost",size:r="xs",...e}){return n(u,{type:t,"data-size":r,variant:s,className:o(p({size:r}),a),...e})}function k({className:a,...t}){return n("span",{className:o("text-muted-foreground flex items-center gap-2 text-sm [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",a),...t})}export{f as InputGroup,x as InputGroupAddon,v as InputGroupButton,k as InputGroupText,h as InputGroupTextarea};
|
package/dist/ui/input.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as t}from"react/jsx-runtime";import{Input as n}from"@base-ui/react/input";import{cn as o}from"cn";function l({className:i,type:e,...r}){return t(n,{type:e,"data-slot":"input",className:o("h-9 w-full min-w-0 rounded-md border
|
|
1
|
+
import{jsx as t}from"react/jsx-runtime";import{Input as n}from"@base-ui/react/input";import{cn as o}from"cn";function l({className:i,type:e,...r}){return t(n,{type:e,"data-slot":"input",className:o("border-input file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 h-9 w-full min-w-0 rounded-md border bg-transparent px-2.5 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-3 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3 md:text-sm",i),...r})}export{l as Input};
|
package/dist/ui/radio-group.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as r}from"react/jsx-runtime";import{Radio as e}from"@base-ui/react/radio";import{RadioGroup as d}from"@base-ui/react/radio-group";import{cn as o}from"cn";function u({className:i,...a}){return r(d,{"data-slot":"radio-group",className:o("grid w-full gap-3",i),...a})}function c({className:i,...a}){return r(e.Root,{"data-slot":"radio-group-item",className:o("group/radio-group-item peer
|
|
1
|
+
import{jsx as r}from"react/jsx-runtime";import{Radio as e}from"@base-ui/react/radio";import{RadioGroup as d}from"@base-ui/react/radio-group";import{cn as o}from"cn";function u({className:i,...a}){return r(d,{"data-slot":"radio-group",className:o("grid w-full gap-3",i),...a})}function c({className:i,...a}){return r(e.Root,{"data-slot":"radio-group-item",className:o("group/radio-group-item peer border-input group-has-[:focus-visible]/field-label:not-data-checked:border-input focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary relative flex aspect-square size-4 shrink-0 rounded-full border outline-none group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:ring-3 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:ring-3",i),...a,children:r(e.Indicator,{"data-slot":"radio-group-indicator",className:"flex size-4 items-center justify-center",children:r("span",{className:"bg-primary-foreground absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full"})})})}export{u as RadioGroup,c as RadioGroupItem};
|
package/dist/ui/separator.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as o}from"react/jsx-runtime";import{Separator as e}from"@base-ui/react/separator";import{cn as i}from"cn";function p({className:a,orientation:r="horizontal",...t}){return o(e,{"data-slot":"separator",orientation:r,className:i("shrink-0
|
|
1
|
+
import{jsx as o}from"react/jsx-runtime";import{Separator as e}from"@base-ui/react/separator";import{cn as i}from"cn";function p({className:a,orientation:r="horizontal",...t}){return o(e,{"data-slot":"separator",orientation:r,className:i("bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",a),...t})}export{p as Separator};
|