react-grab 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.js CHANGED
@@ -1884,7 +1884,7 @@ var init_web = __esm({
1884
1884
  var styles_default;
1885
1885
  var init_styles = __esm({
1886
1886
  "dist/styles.css"() {
1887
- styles_default = '/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial}}}@layer theme{:root,:host{--font-sans:"Geist",ui-sans-serif,system-ui,sans-serif;--font-mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--radius-sm:.25rem;--ease-out:cubic-bezier(0,0,.2,1);--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--transition-fast:.1s;--transition-normal:.15s;--transition-slow:.2s}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.touch-hitbox{position:relative}.touch-hitbox:before{content:"";width:100%;min-width:32px;height:100%;min-height:32px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.top-0{top:calc(var(--spacing)*0)}.top-0\\.5{top:calc(var(--spacing)*.5)}.top-full{top:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-0\\.5{left:calc(var(--spacing)*.5)}.left-1\\/2{left:50%}.left-2\\.5{left:calc(var(--spacing)*2.5)}.z-10{z-index:10}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.-mx-2{margin-inline:calc(var(--spacing)*-2)}.mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.-my-1\\.5{margin-block:calc(var(--spacing)*-1.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-2\\.5{margin-top:calc(var(--spacing)*2.5)}.mr-1\\.5{margin-right:calc(var(--spacing)*1.5)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2\\.5{margin-bottom:calc(var(--spacing)*2.5)}.-ml-\\[2px\\]{margin-left:-2px}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.size-1\\.5{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-\\[18px\\]{width:18px;height:18px}.h-0{height:calc(var(--spacing)*0)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-\\[17px\\]{height:17px}.h-fit{height:fit-content}.min-h-4{min-height:calc(var(--spacing)*4)}.w-0{width:calc(var(--spacing)*0)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.-rotate-90{rotate:-90deg}.rotate-0{rotate:none}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition-property:transform;transition-duration:var(--transition-normal);transition-timing-function:cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transform:scale(.97)}.press-scale{transition-property:transform;transition-duration:var(--transition-fast);transition-timing-function:ease-out}.press-scale:active{transform:scale(.97)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[10px\\]{border-radius:10px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-b-\\[6px\\]{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[\\#B3B3B3\\]{border-color:#b3b3b3}.border-t-\\[\\#D9D9D9\\]{border-top-color:#d9d9d9}.bg-\\[\\#FEF2F2\\]{background-color:#fef2f2}.bg-black{background-color:var(--color-black)}.bg-black\\/5{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/5{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.bg-black\\/25{background-color:#00000040}@supports (color:color-mix(in lab, red, red)){.bg-black\\/25{background-color:color-mix(in oklab,var(--color-black)25%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.p-0{padding:calc(var(--spacing)*0)}.px-0\\.25{padding-inline:calc(var(--spacing)*.25)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-\\[3px\\]{padding-inline:3px}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-0\\.25{padding-block:calc(var(--spacing)*.25)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-px{padding-block:1px}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.text-left{text-align:left}.font-sans{font-family:var(--font-sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.leading-3{--tw-leading:calc(var(--spacing)*3);line-height:calc(var(--spacing)*3)}.leading-3\\.5{--tw-leading:calc(var(--spacing)*3.5);line-height:calc(var(--spacing)*3.5)}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-\\[\\#71717a\\]{color:#71717a}.text-\\[\\#B3B3B3\\]{color:#b3b3b3}.text-\\[\\#B91C1C\\]{color:#b91c1c}.text-black{color:var(--color-black)}.text-black\\/30{color:#0000004d}@supports (color:color-mix(in lab, red, red)){.text-black\\/30{color:color-mix(in oklab,var(--color-black)30%,transparent)}}.text-black\\/40{color:#0006}@supports (color:color-mix(in lab, red, red)){.text-black\\/40{color:color-mix(in oklab,var(--color-black)40%,transparent)}}.text-black\\/50{color:#00000080}@supports (color:color-mix(in lab, red, red)){.text-black\\/50{color:color-mix(in oklab,var(--color-black)50%,transparent)}}.text-black\\/60{color:#0009}@supports (color:color-mix(in lab, red, red)){.text-black\\/60{color:color-mix(in oklab,var(--color-black)60%,transparent)}}.text-black\\/70{color:#000000b3}@supports (color:color-mix(in lab, red, red)){.text-black\\/70{color:color-mix(in oklab,var(--color-black)70%,transparent)}}.text-black\\/85{color:#000000d9}@supports (color:color-mix(in lab, red, red)){.text-black\\/85{color:color-mix(in oklab,var(--color-black)85%,transparent)}}.text-white{color:var(--color-white)}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter-\\[drop-shadow\\(0px_1px_2px_\\#51515140\\)\\]{filter:drop-shadow(0 1px 2px #51515140)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}@media (hover:hover){.hover\\:bg-\\[\\#F5F5F5\\]:hover{background-color:#f5f5f5}.hover\\:bg-\\[\\#FEE2E2\\]:hover{background-color:#fee2e2}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.hover\\:bg-black\\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/10:hover{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.hover\\:text-black:hover{color:var(--color-black)}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}@media (hover:hover){.disabled\\:hover\\:bg-transparent:disabled:hover{background-color:#0000}}}@keyframes shake{0%,to{transform:translate(0)}15%{transform:translate(-3px)}30%{transform:translate(3px)}45%{transform:translate(-3px)}60%{transform:translate(3px)}75%{transform:translate(-2px)}90%{transform:translate(2px)}}@keyframes pop-in{0%{opacity:0;transform:scale(.9)}70%{opacity:1;transform:scale(1.02)}to{opacity:1;transform:scale(1)}}@keyframes pop-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@keyframes slide-in-bottom{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in-top{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in-left{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}@keyframes slide-in-right{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:translate(0)}}@keyframes success-pop{0%{opacity:0;transform:scale(.9)}60%{opacity:1;transform:scale(1.1)}80%{transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}@keyframes icon-loader-spin{0%{opacity:1}50%{opacity:.5}to{opacity:.2}}.icon-loader-bar{animation:.5s linear infinite icon-loader-spin}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer-text{color:#0000;background:linear-gradient(90deg,#71717a 0%,#a1a1aa 25%,#71717a 50%,#a1a1aa 75%,#71717a 100%) 0 0/200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}.animate-shake{will-change:transform;animation:.3s ease-out shake}.animate-pop-in{animation:pop-in var(--transition-normal)ease-out;will-change:transform,opacity}.animate-pop-out{animation:pop-out var(--transition-normal)ease-out forwards;will-change:transform,opacity}.animate-slide-in-bottom{animation:slide-in-bottom var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-top{animation:slide-in-top var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-left{animation:slide-in-left var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-right{animation:slide-in-right var(--transition-slow)ease-out;will-change:transform,opacity}.animate-success-pop{will-change:transform,opacity;animation:.25s ease-out success-pop}.animate-tooltip-fade-in{animation:tooltip-fade-in var(--transition-fast)ease-out;will-change:transform,opacity}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';
1887
+ styles_default = '/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial}}}@layer theme{:root,:host{--font-sans:"Geist",ui-sans-serif,system-ui,sans-serif;--font-mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;--color-yellow-500:oklch(79.5% .184 86.047);--color-black:#000;--color-white:#fff;--spacing:4px;--text-sm:14px;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--radius-sm:4px;--ease-out:cubic-bezier(0,0,.2,1);--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--transition-fast:.1s;--transition-normal:.15s;--transition-slow:.2s}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.touch-hitbox{position:relative}.touch-hitbox:before{content:"";width:100%;min-width:32px;height:100%;min-height:32px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.top-0{top:calc(var(--spacing)*0)}.top-0\\.5{top:calc(var(--spacing)*.5)}.top-full{top:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-0\\.5{left:calc(var(--spacing)*.5)}.left-1\\/2{left:50%}.left-2\\.5{left:calc(var(--spacing)*2.5)}.z-10{z-index:10}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.m-0{margin:calc(var(--spacing)*0)}.-mx-2{margin-inline:calc(var(--spacing)*-2)}.mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.-my-1\\.5{margin-block:calc(var(--spacing)*-1.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-2\\.5{margin-top:calc(var(--spacing)*2.5)}.mr-1\\.5{margin-right:calc(var(--spacing)*1.5)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2\\.5{margin-bottom:calc(var(--spacing)*2.5)}.-ml-\\[2px\\]{margin-left:-2px}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.size-1\\.5{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-\\[18px\\]{width:18px;height:18px}.h-0{height:calc(var(--spacing)*0)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-\\[17px\\]{height:17px}.h-fit{height:fit-content}.max-h-\\[240px\\]{max-height:240px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-4{min-height:calc(var(--spacing)*4)}.w-0{width:calc(var(--spacing)*0)}.w-2{width:calc(var(--spacing)*2)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.-rotate-90{rotate:-90deg}.rotate-0{rotate:none}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition-property:transform;transition-duration:var(--transition-normal);transition-timing-function:cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transform:scale(.97)}.press-scale{transition-property:transform;transition-duration:var(--transition-fast);transition-timing-function:ease-out}.press-scale:active{transform:scale(.97)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[10px\\]{border-radius:10px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-b-\\[6px\\]{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[\\#B3B3B3\\]{border-color:#b3b3b3}.border-t-\\[\\#D9D9D9\\]{border-top-color:#d9d9d9}.bg-\\[\\#FEF2F2\\]{background-color:#fef2f2}.bg-black{background-color:var(--color-black)}.bg-black\\/5{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/5{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.bg-black\\/25{background-color:#00000040}@supports (color:color-mix(in lab, red, red)){.bg-black\\/25{background-color:color-mix(in oklab,var(--color-black)25%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-500{background-color:var(--color-yellow-500)}.p-0{padding:calc(var(--spacing)*0)}.px-0\\.25{padding-inline:calc(var(--spacing)*.25)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-\\[3px\\]{padding-inline:3px}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-0\\.25{padding-block:calc(var(--spacing)*.25)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-px{padding-block:1px}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.text-left{text-align:left}.font-sans{font-family:var(--font-sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-3{--tw-leading:calc(var(--spacing)*3);line-height:calc(var(--spacing)*3)}.leading-3\\.5{--tw-leading:calc(var(--spacing)*3.5);line-height:calc(var(--spacing)*3.5)}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-\\[\\#71717a\\]{color:#71717a}.text-\\[\\#B3B3B3\\]{color:#b3b3b3}.text-\\[\\#B91C1C\\]{color:#b91c1c}.text-black{color:var(--color-black)}.text-black\\/25{color:#00000040}@supports (color:color-mix(in lab, red, red)){.text-black\\/25{color:color-mix(in oklab,var(--color-black)25%,transparent)}}.text-black\\/30{color:#0000004d}@supports (color:color-mix(in lab, red, red)){.text-black\\/30{color:color-mix(in oklab,var(--color-black)30%,transparent)}}.text-black\\/40{color:#0006}@supports (color:color-mix(in lab, red, red)){.text-black\\/40{color:color-mix(in oklab,var(--color-black)40%,transparent)}}.text-black\\/50{color:#00000080}@supports (color:color-mix(in lab, red, red)){.text-black\\/50{color:color-mix(in oklab,var(--color-black)50%,transparent)}}.text-black\\/60{color:#0009}@supports (color:color-mix(in lab, red, red)){.text-black\\/60{color:color-mix(in oklab,var(--color-black)60%,transparent)}}.text-black\\/70{color:#000000b3}@supports (color:color-mix(in lab, red, red)){.text-black\\/70{color:color-mix(in oklab,var(--color-black)70%,transparent)}}.text-black\\/85{color:#000000d9}@supports (color:color-mix(in lab, red, red)){.text-black\\/85{color:color-mix(in oklab,var(--color-black)85%,transparent)}}.text-white{color:var(--color-white)}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter-\\[drop-shadow\\(0px_1px_2px_\\#51515140\\)\\]{filter:drop-shadow(0 1px 2px #51515140)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}.\\[grid-area\\:1\\/1\\]{grid-area:1/1}.group-focus-within\\:invisible:is(:where(.group):focus-within *){visibility:hidden}.group-focus-within\\:visible:is(:where(.group):focus-within *){visibility:visible}@media (hover:hover){.group-hover\\:invisible:is(:where(.group):hover *){visibility:hidden}.group-hover\\:visible:is(:where(.group):hover *){visibility:visible}}.focus-within\\:bg-black\\/5:focus-within{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.focus-within\\:bg-black\\/5:focus-within{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}@media (hover:hover){.hover\\:bg-\\[\\#F5F5F5\\]:hover{background-color:#f5f5f5}.hover\\:bg-\\[\\#FEE2E2\\]:hover{background-color:#fee2e2}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.hover\\:bg-black\\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/10:hover{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.hover\\:text-\\[\\#B91C1C\\]:hover{color:#b91c1c}.hover\\:text-black:hover{color:var(--color-black)}.hover\\:text-black\\/60:hover{color:#0009}@supports (color:color-mix(in lab, red, red)){.hover\\:text-black\\/60:hover{color:color-mix(in oklab,var(--color-black)60%,transparent)}}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}@media (hover:hover){.disabled\\:hover\\:bg-transparent:disabled:hover{background-color:#0000}}}:host{all:initial;direction:ltr}@keyframes shake{0%,to{transform:translate(0)}15%{transform:translate(-3px)}30%{transform:translate(3px)}45%{transform:translate(-3px)}60%{transform:translate(3px)}75%{transform:translate(-2px)}90%{transform:translate(2px)}}@keyframes pop-in{0%{opacity:0;transform:scale(.9)}70%{opacity:1;transform:scale(1.02)}to{opacity:1;transform:scale(1)}}@keyframes pop-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@keyframes slide-in-bottom{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in-top{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in-left{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}@keyframes slide-in-right{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:translate(0)}}@keyframes success-pop{0%{opacity:0;transform:scale(.9)}60%{opacity:1;transform:scale(1.1)}80%{transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}@keyframes icon-loader-spin{0%{opacity:1}50%{opacity:.5}to{opacity:.2}}.icon-loader-bar{animation:.5s linear infinite icon-loader-spin}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer-text{color:#0000;background:linear-gradient(90deg,#71717a 0%,#a1a1aa 25%,#71717a 50%,#a1a1aa 75%,#71717a 100%) 0 0/200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}.animate-shake{will-change:transform;animation:.3s ease-out shake}.animate-pop-in{animation:pop-in var(--transition-normal)ease-out;will-change:transform,opacity}.animate-pop-out{animation:pop-out var(--transition-normal)ease-out forwards;will-change:transform,opacity}.animate-slide-in-bottom{animation:slide-in-bottom var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-top{animation:slide-in-top var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-left{animation:slide-in-left var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-right{animation:slide-in-right var(--transition-slow)ease-out;will-change:transform,opacity}.animate-success-pop{will-change:transform,opacity;animation:.25s ease-out success-pop}.animate-tooltip-fade-in{animation:tooltip-fade-in var(--transition-fast)ease-out;will-change:transform,opacity}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}';
1888
1888
  }
1889
1889
  });
1890
1890
 
@@ -2136,11 +2136,11 @@ var init_store = __esm({
2136
2136
  });
2137
2137
 
2138
2138
  // src/constants.ts
2139
- var VERSION, VIEWPORT_MARGIN_PX, OFFSCREEN_POSITION, SELECTION_LERP_FACTOR, FEEDBACK_DURATION_MS, FADE_DURATION_MS, FADE_COMPLETE_BUFFER_MS, DISMISS_ANIMATION_BUFFER_MS, KEYDOWN_SPAM_TIMEOUT_MS, BLUR_DEACTIVATION_THRESHOLD_MS, INPUT_FOCUS_ACTIVATION_DELAY_MS, INPUT_TEXT_SELECTION_ACTIVATION_DELAY_MS, DEFAULT_KEY_HOLD_DURATION_MS, MIN_HOLD_FOR_ACTIVATION_AFTER_COPY_MS, RECENT_THRESHOLD_MS, ACTION_CYCLE_IDLE_TRIGGER_MS, ACTION_CYCLE_INPUT_THROTTLE_MS, ACTION_CYCLE_SCROLL_THRESHOLD_PX, ACTION_CYCLE_SCROLL_LINE_HEIGHT_PX, ACTION_CYCLE_ACTION_IDS, DRAG_THRESHOLD_PX, ELEMENT_DETECTION_THROTTLE_MS, COMPONENT_NAME_DEBOUNCE_MS, DRAG_PREVIEW_DEBOUNCE_MS, BOUNDS_CACHE_TTL_MS, BOUNDS_RECALC_INTERVAL_MS, AUTO_SCROLL_EDGE_THRESHOLD_PX, AUTO_SCROLL_SPEED_PX, Z_INDEX_LABEL, Z_INDEX_OVERLAY_CANVAS, DRAG_LERP_FACTOR, LERP_CONVERGENCE_THRESHOLD_PX, FADE_OUT_BUFFER_MS, MIN_DEVICE_PIXEL_RATIO, GRAB_PURPLE_RGB, OVERLAY_CROSSHAIR_COLOR, OVERLAY_BORDER_COLOR_DRAG, OVERLAY_FILL_COLOR_DRAG, OVERLAY_BORDER_COLOR_DEFAULT, OVERLAY_FILL_COLOR_DEFAULT, FROZEN_GLOW_COLOR, FROZEN_GLOW_EDGE_PX, ARROW_HEIGHT_PX, ARROW_CENTER_PERCENT, LABEL_GAP_PX, PREVIEW_ATTR_VALUE_MAX_LENGTH, PREVIEW_MAX_ATTRS, PREVIEW_PRIORITY_ATTRS, SCREENSHOT_CAPTURE_DELAY_MS, VIDEO_METADATA_TIMEOUT_MS, VIDEO_READY_POLL_INTERVAL_MS, VIDEO_READY_TIMEOUT_MS, MODIFIER_KEYS, ARROW_KEYS, FROZEN_ELEMENT_ATTRIBUTE, USER_IGNORE_ATTRIBUTE, VIEWPORT_COVERAGE_THRESHOLD, OVERLAY_Z_INDEX_THRESHOLD, DEV_TOOLS_OVERLAY_Z_INDEX_THRESHOLD, TOOLTIP_DELAY_MS, TOOLTIP_GRACE_PERIOD_MS, TOOLBAR_SNAP_MARGIN_PX, TOOLBAR_FADE_IN_DELAY_MS, TOOLBAR_SNAP_ANIMATION_DURATION_MS, TOOLBAR_DRAG_THRESHOLD_PX, TOOLBAR_VELOCITY_MULTIPLIER_MS, TOOLBAR_COLLAPSED_SHORT_PX, TOOLBAR_COLLAPSED_LONG_PX, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS, TOOLBAR_DEFAULT_WIDTH_PX, TOOLBAR_DEFAULT_HEIGHT_PX, TOOLBAR_SHAKE_TOOLTIP_DURATION_MS, DRAG_SELECTION_COVERAGE_THRESHOLD, DRAG_SELECTION_SAMPLE_SPACING_PX, DRAG_SELECTION_MIN_SAMPLES_PER_AXIS, DRAG_SELECTION_MAX_SAMPLES_PER_AXIS, DRAG_SELECTION_MAX_TOTAL_SAMPLE_POINTS, DRAG_SELECTION_EDGE_INSET_PX, MAX_TRANSFORM_ANCESTOR_DEPTH, TRANSFORM_EARLY_BAIL_DEPTH, ELEMENT_POSITION_CACHE_DISTANCE_THRESHOLD_PX, ELEMENT_POSITION_THROTTLE_MS, VISIBILITY_CACHE_TTL_MS, ZOOM_DETECTION_THRESHOLD, MOUNT_ROOT_RECHECK_DELAY_MS, PANEL_STYLES, LOGO_SVG;
2139
+ var VERSION, VIEWPORT_MARGIN_PX, OFFSCREEN_POSITION, SELECTION_LERP_FACTOR, FEEDBACK_DURATION_MS, FADE_DURATION_MS, FADE_COMPLETE_BUFFER_MS, DISMISS_ANIMATION_BUFFER_MS, KEYDOWN_SPAM_TIMEOUT_MS, BLUR_DEACTIVATION_THRESHOLD_MS, WINDOW_REFOCUS_GRACE_PERIOD_MS, INPUT_FOCUS_ACTIVATION_DELAY_MS, INPUT_TEXT_SELECTION_ACTIVATION_DELAY_MS, DEFAULT_KEY_HOLD_DURATION_MS, MIN_HOLD_FOR_ACTIVATION_AFTER_COPY_MS, RECENT_THRESHOLD_MS, ACTION_CYCLE_IDLE_TRIGGER_MS, DRAG_THRESHOLD_PX, ELEMENT_DETECTION_THROTTLE_MS, COMPONENT_NAME_DEBOUNCE_MS, DRAG_PREVIEW_DEBOUNCE_MS, BOUNDS_CACHE_TTL_MS, BOUNDS_RECALC_INTERVAL_MS, AUTO_SCROLL_EDGE_THRESHOLD_PX, AUTO_SCROLL_SPEED_PX, Z_INDEX_LABEL, Z_INDEX_OVERLAY_CANVAS, DRAG_LERP_FACTOR, LERP_CONVERGENCE_THRESHOLD_PX, FADE_OUT_BUFFER_MS, MIN_DEVICE_PIXEL_RATIO, GRAB_PURPLE_RGB, OVERLAY_CROSSHAIR_COLOR, OVERLAY_BORDER_COLOR_DRAG, OVERLAY_FILL_COLOR_DRAG, OVERLAY_BORDER_COLOR_DEFAULT, OVERLAY_FILL_COLOR_DEFAULT, FROZEN_GLOW_COLOR, FROZEN_GLOW_EDGE_PX, ARROW_HEIGHT_PX, ARROW_MIN_SIZE_PX, ARROW_MAX_LABEL_WIDTH_RATIO, ARROW_CENTER_PERCENT, ARROW_LABEL_MARGIN_PX, LABEL_GAP_PX, PREVIEW_ATTR_VALUE_MAX_LENGTH, PREVIEW_MAX_ATTRS, PREVIEW_PRIORITY_ATTRS, SCREENSHOT_CAPTURE_DELAY_MS, VIDEO_METADATA_TIMEOUT_MS, VIDEO_READY_POLL_INTERVAL_MS, VIDEO_READY_TIMEOUT_MS, MODIFIER_KEYS, ARROW_KEYS, FROZEN_ELEMENT_ATTRIBUTE, USER_IGNORE_ATTRIBUTE, VIEWPORT_COVERAGE_THRESHOLD, OVERLAY_Z_INDEX_THRESHOLD, DEV_TOOLS_OVERLAY_Z_INDEX_THRESHOLD, TOOLTIP_DELAY_MS, TOOLTIP_GRACE_PERIOD_MS, TOOLBAR_SNAP_MARGIN_PX, TOOLBAR_FADE_IN_DELAY_MS, TOOLBAR_SNAP_ANIMATION_DURATION_MS, TOOLBAR_DRAG_THRESHOLD_PX, TOOLBAR_VELOCITY_MULTIPLIER_MS, TOOLBAR_COLLAPSED_SHORT_PX, TOOLBAR_COLLAPSED_LONG_PX, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS, TOOLBAR_DEFAULT_WIDTH_PX, TOOLBAR_DEFAULT_HEIGHT_PX, TOOLBAR_SHAKE_TOOLTIP_DURATION_MS, DRAG_SELECTION_COVERAGE_THRESHOLD, DRAG_SELECTION_SAMPLE_SPACING_PX, DRAG_SELECTION_MIN_SAMPLES_PER_AXIS, DRAG_SELECTION_MAX_SAMPLES_PER_AXIS, DRAG_SELECTION_MAX_TOTAL_SAMPLE_POINTS, DRAG_SELECTION_EDGE_INSET_PX, MAX_TRANSFORM_ANCESTOR_DEPTH, TRANSFORM_EARLY_BAIL_DEPTH, ELEMENT_POSITION_CACHE_DISTANCE_THRESHOLD_PX, ELEMENT_POSITION_THROTTLE_MS, VISIBILITY_CACHE_TTL_MS, ZOOM_DETECTION_THRESHOLD, MOUNT_ROOT_RECHECK_DELAY_MS, MAX_RECENT_ITEMS, DROPDOWN_VIEWPORT_PADDING_PX, DROPDOWN_ANCHOR_GAP_PX, DROPDOWN_ICON_SIZE_PX, DROPDOWN_MIN_WIDTH_PX, DROPDOWN_MAX_WIDTH_PX, PANEL_STYLES, LOGO_SVG;
2140
2140
  var init_constants = __esm({
2141
2141
  "src/constants.ts"() {
2142
2142
  "use strict";
2143
- VERSION = "0.1.13";
2143
+ VERSION = "0.1.14";
2144
2144
  VIEWPORT_MARGIN_PX = 8;
2145
2145
  OFFSCREEN_POSITION = -1e3;
2146
2146
  SELECTION_LERP_FACTOR = 0.95;
@@ -2150,22 +2150,13 @@ var init_constants = __esm({
2150
2150
  DISMISS_ANIMATION_BUFFER_MS = 50;
2151
2151
  KEYDOWN_SPAM_TIMEOUT_MS = 200;
2152
2152
  BLUR_DEACTIVATION_THRESHOLD_MS = 500;
2153
- INPUT_FOCUS_ACTIVATION_DELAY_MS = 150;
2154
- INPUT_TEXT_SELECTION_ACTIVATION_DELAY_MS = 300;
2155
- DEFAULT_KEY_HOLD_DURATION_MS = 75;
2153
+ WINDOW_REFOCUS_GRACE_PERIOD_MS = 200;
2154
+ INPUT_FOCUS_ACTIVATION_DELAY_MS = 200;
2155
+ INPUT_TEXT_SELECTION_ACTIVATION_DELAY_MS = 400;
2156
+ DEFAULT_KEY_HOLD_DURATION_MS = 100;
2156
2157
  MIN_HOLD_FOR_ACTIVATION_AFTER_COPY_MS = 200;
2157
2158
  RECENT_THRESHOLD_MS = 1e4;
2158
2159
  ACTION_CYCLE_IDLE_TRIGGER_MS = 600;
2159
- ACTION_CYCLE_INPUT_THROTTLE_MS = 100;
2160
- ACTION_CYCLE_SCROLL_THRESHOLD_PX = 30;
2161
- ACTION_CYCLE_SCROLL_LINE_HEIGHT_PX = 16;
2162
- ACTION_CYCLE_ACTION_IDS = [
2163
- "copy",
2164
- "comment",
2165
- "screenshot",
2166
- "copy-html",
2167
- "open"
2168
- ];
2169
2160
  DRAG_THRESHOLD_PX = 2;
2170
2161
  ELEMENT_DETECTION_THROTTLE_MS = 32;
2171
2162
  COMPONENT_NAME_DEBOUNCE_MS = 100;
@@ -2189,7 +2180,10 @@ var init_constants = __esm({
2189
2180
  FROZEN_GLOW_COLOR = `rgba(${GRAB_PURPLE_RGB}, 0.15)`;
2190
2181
  FROZEN_GLOW_EDGE_PX = 50;
2191
2182
  ARROW_HEIGHT_PX = 8;
2183
+ ARROW_MIN_SIZE_PX = 4;
2184
+ ARROW_MAX_LABEL_WIDTH_RATIO = 0.2;
2192
2185
  ARROW_CENTER_PERCENT = 50;
2186
+ ARROW_LABEL_MARGIN_PX = 16;
2193
2187
  LABEL_GAP_PX = 4;
2194
2188
  PREVIEW_ATTR_VALUE_MAX_LENGTH = 15;
2195
2189
  PREVIEW_MAX_ATTRS = 3;
@@ -2249,6 +2243,12 @@ var init_constants = __esm({
2249
2243
  VISIBILITY_CACHE_TTL_MS = 50;
2250
2244
  ZOOM_DETECTION_THRESHOLD = 0.01;
2251
2245
  MOUNT_ROOT_RECHECK_DELAY_MS = 1e3;
2246
+ MAX_RECENT_ITEMS = 20;
2247
+ DROPDOWN_VIEWPORT_PADDING_PX = 8;
2248
+ DROPDOWN_ANCHOR_GAP_PX = 8;
2249
+ DROPDOWN_ICON_SIZE_PX = 11;
2250
+ DROPDOWN_MIN_WIDTH_PX = 180;
2251
+ DROPDOWN_MAX_WIDTH_PX = 280;
2252
2252
  PANEL_STYLES = "bg-white";
2253
2253
  LOGO_SVG = `<svg width="294" height="294" viewBox="0 0 294 294" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_0_3)"><mask id="mask0_0_3" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="294" height="294"><path d="M294 0H0V294H294V0Z" fill="white"/></mask><g mask="url(#mask0_0_3)"><path d="M144.599 47.4924C169.712 27.3959 194.548 20.0265 212.132 30.1797C227.847 39.2555 234.881 60.3243 231.926 89.516C231.677 92.0069 231.328 94.5423 230.94 97.1058L228.526 110.14C228.517 110.136 228.505 110.132 228.495 110.127C228.486 110.165 228.479 110.203 228.468 110.24L216.255 105.741C216.256 105.736 216.248 105.728 216.248 105.723C207.915 103.125 199.421 101.075 190.82 99.5888L190.696 99.5588L173.526 97.2648L173.511 97.2631C173.492 97.236 173.467 97.2176 173.447 97.1905C163.862 96.2064 154.233 95.7166 144.599 95.7223C134.943 95.7162 125.295 96.219 115.693 97.2286C110.075 105.033 104.859 113.118 100.063 121.453C95.2426 129.798 90.8624 138.391 86.939 147.193C90.8624 155.996 95.2426 164.588 100.063 172.933C104.866 181.302 110.099 189.417 115.741 197.245C115.749 197.245 115.758 197.246 115.766 197.247L115.752 197.27L115.745 197.283L115.754 197.296L126.501 211.013L126.574 211.089C132.136 217.767 138.126 224.075 144.507 229.974L144.609 230.082L154.572 238.287C154.539 238.319 154.506 238.35 154.472 238.38C154.485 238.392 154.499 238.402 154.513 238.412L143.846 247.482L143.827 247.497C126.56 261.128 109.472 268.745 94.8019 268.745C88.5916 268.837 82.4687 267.272 77.0657 264.208C61.3496 255.132 54.3164 234.062 57.2707 204.871C57.528 202.307 57.8806 199.694 58.2904 197.054C28.3363 185.327 9.52301 167.51 9.52301 147.193C9.52301 129.042 24.2476 112.396 50.9901 100.375C53.3443 99.3163 55.7938 98.3058 58.2904 97.3526C57.8806 94.7023 57.528 92.0803 57.2707 89.516C54.3164 60.3243 61.3496 39.2555 77.0657 30.1797C94.6494 20.0265 119.486 27.3959 144.599 47.4924ZM70.6423 201.315C70.423 202.955 70.2229 204.566 70.0704 206.168C67.6686 229.567 72.5478 246.628 83.3615 252.988L83.5176 253.062C95.0399 259.717 114.015 254.426 134.782 238.38C125.298 229.45 116.594 219.725 108.764 209.314C95.8516 207.742 83.0977 205.066 70.6423 201.315ZM80.3534 163.438C77.34 171.677 74.8666 180.104 72.9484 188.664C81.1787 191.224 89.5657 193.247 98.0572 194.724L98.4618 194.813C95.2115 189.865 92.0191 184.66 88.9311 179.378C85.8433 174.097 83.003 168.768 80.3534 163.438ZM60.759 110.203C59.234 110.839 57.7378 111.475 56.27 112.11C34.7788 121.806 22.3891 134.591 22.3891 147.193C22.3891 160.493 36.4657 174.297 60.7494 184.26C63.7439 171.581 67.8124 159.182 72.9104 147.193C67.822 135.23 63.7566 122.855 60.759 110.203ZM98.4137 99.6404C89.8078 101.145 81.3075 103.206 72.9676 105.809C74.854 114.203 77.2741 122.468 80.2132 130.554L80.3059 130.939C82.9938 125.6 85.8049 120.338 88.8834 115.008C91.9618 109.679 95.1544 104.569 98.4137 99.6404ZM94.9258 38.5215C90.9331 38.4284 86.9866 39.3955 83.4891 41.3243C72.6291 47.6015 67.6975 64.5954 70.0424 87.9446L70.0416 88.2194C70.194 89.8208 70.3941 91.4325 70.6134 93.0624C83.0737 89.3364 95.8263 86.6703 108.736 85.0924C116.57 74.6779 125.28 64.9532 134.773 56.0249C119.877 44.5087 105.895 38.5215 94.9258 38.5215ZM205.737 41.3148C202.268 39.398 198.355 38.4308 194.394 38.5099L194.29 38.512C183.321 38.512 169.34 44.4991 154.444 56.0153C163.93 64.9374 172.634 74.6557 180.462 85.064C193.375 86.6345 206.128 89.3102 218.584 93.0624C218.812 91.4325 219.003 89.8118 219.165 88.2098C221.548 64.7099 216.65 47.6164 205.737 41.3148ZM144.552 64.3097C138.104 70.2614 132.054 76.6306 126.443 83.3765C132.39 82.995 138.426 82.8046 144.552 82.8046C150.727 82.8046 156.778 83.0143 162.707 83.3765C157.08 76.6293 151.015 70.2596 144.552 64.3097Z" fill="white"/><path d="M144.598 47.4924C169.712 27.3959 194.547 20.0265 212.131 30.1797C227.847 39.2555 234.88 60.3243 231.926 89.516C231.677 92.0069 231.327 94.5423 230.941 97.1058L228.526 110.14L228.496 110.127C228.487 110.165 228.478 110.203 228.469 110.24L216.255 105.741L216.249 105.723C207.916 103.125 199.42 101.075 190.82 99.5888L190.696 99.5588L173.525 97.2648L173.511 97.263C173.492 97.236 173.468 97.2176 173.447 97.1905C163.863 96.2064 154.234 95.7166 144.598 95.7223C134.943 95.7162 125.295 96.219 115.693 97.2286C110.075 105.033 104.859 113.118 100.063 121.453C95.2426 129.798 90.8622 138.391 86.939 147.193C90.8622 155.996 95.2426 164.588 100.063 172.933C104.866 181.302 110.099 189.417 115.741 197.245L115.766 197.247L115.752 197.27L115.745 197.283L115.754 197.296L126.501 211.013L126.574 211.089C132.136 217.767 138.126 224.075 144.506 229.974L144.61 230.082L154.572 238.287C154.539 238.319 154.506 238.35 154.473 238.38L154.512 238.412L143.847 247.482L143.827 247.497C126.56 261.13 109.472 268.745 94.8018 268.745C88.5915 268.837 82.4687 267.272 77.0657 264.208C61.3496 255.132 54.3162 234.062 57.2707 204.871C57.528 202.307 57.8806 199.694 58.2904 197.054C28.3362 185.327 9.52298 167.51 9.52298 147.193C9.52298 129.042 24.2476 112.396 50.9901 100.375C53.3443 99.3163 55.7938 98.3058 58.2904 97.3526C57.8806 94.7023 57.528 92.0803 57.2707 89.516C54.3162 60.3243 61.3496 39.2555 77.0657 30.1797C94.6493 20.0265 119.486 27.3959 144.598 47.4924ZM70.6422 201.315C70.423 202.955 70.2229 204.566 70.0704 206.168C67.6686 229.567 72.5478 246.628 83.3615 252.988L83.5175 253.062C95.0399 259.717 114.015 254.426 134.782 238.38C125.298 229.45 116.594 219.725 108.764 209.314C95.8515 207.742 83.0977 205.066 70.6422 201.315ZM80.3534 163.438C77.34 171.677 74.8666 180.104 72.9484 188.664C81.1786 191.224 89.5657 193.247 98.0572 194.724L98.4618 194.813C95.2115 189.865 92.0191 184.66 88.931 179.378C85.8433 174.097 83.003 168.768 80.3534 163.438ZM60.7589 110.203C59.234 110.839 57.7378 111.475 56.2699 112.11C34.7788 121.806 22.3891 134.591 22.3891 147.193C22.3891 160.493 36.4657 174.297 60.7494 184.26C63.7439 171.581 67.8124 159.182 72.9103 147.193C67.822 135.23 63.7566 122.855 60.7589 110.203ZM98.4137 99.6404C89.8078 101.145 81.3075 103.206 72.9676 105.809C74.8539 114.203 77.2741 122.468 80.2132 130.554L80.3059 130.939C82.9938 125.6 85.8049 120.338 88.8834 115.008C91.9618 109.679 95.1544 104.569 98.4137 99.6404ZM94.9258 38.5215C90.9331 38.4284 86.9866 39.3955 83.4891 41.3243C72.629 47.6015 67.6975 64.5954 70.0424 87.9446L70.0415 88.2194C70.194 89.8208 70.3941 91.4325 70.6134 93.0624C83.0737 89.3364 95.8262 86.6703 108.736 85.0924C116.57 74.6779 125.28 64.9532 134.772 56.0249C119.877 44.5087 105.895 38.5215 94.9258 38.5215ZM205.737 41.3148C202.268 39.398 198.355 38.4308 194.394 38.5099L194.291 38.512C183.321 38.512 169.34 44.4991 154.443 56.0153C163.929 64.9374 172.634 74.6557 180.462 85.064C193.374 86.6345 206.129 89.3102 218.584 93.0624C218.813 91.4325 219.003 89.8118 219.166 88.2098C221.548 64.7099 216.65 47.6164 205.737 41.3148ZM144.551 64.3097C138.103 70.2614 132.055 76.6306 126.443 83.3765C132.389 82.995 138.427 82.8046 144.551 82.8046C150.727 82.8046 156.779 83.0143 162.707 83.3765C157.079 76.6293 151.015 70.2596 144.551 64.3097Z" fill="#FF40E0"/></g><mask id="mask1_0_3" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="102" y="84" width="161" height="162"><path d="M235.282 84.827L102.261 112.259L129.693 245.28L262.714 217.848L235.282 84.827Z" fill="white"/></mask><g mask="url(#mask1_0_3)"><path d="M136.863 129.916L213.258 141.224C220.669 142.322 222.495 152.179 215.967 155.856L187.592 171.843L184.135 204.227C183.339 211.678 173.564 213.901 169.624 207.526L129.021 141.831C125.503 136.14 130.245 128.936 136.863 129.916Z" fill="#FF40E0" stroke="#FF40E0" stroke-width="0.817337" stroke-linecap="round" stroke-linejoin="round"/></g></g><defs><clipPath id="clip0_0_3"><rect width="294" height="294" fill="white"/></clipPath></defs></svg>`;
2254
2254
  }
@@ -2515,6 +2515,7 @@ var init_store2 = __esm({
2515
2515
  setStore("contextMenuElement", null);
2516
2516
  setStore("contextMenuClickOffset", null);
2517
2517
  setStore("selectedAgent", null);
2518
+ setStore("lastCopiedElement", null);
2518
2519
  },
2519
2520
  toggle: () => {
2520
2521
  if (store.activationTimestamp !== null) {
@@ -3591,6 +3592,20 @@ var init_overlay_canvas = __esm({
3591
3592
  }
3592
3593
  });
3593
3594
 
3595
+ // src/utils/get-arrow-size.ts
3596
+ var getArrowSize;
3597
+ var init_get_arrow_size = __esm({
3598
+ "src/utils/get-arrow-size.ts"() {
3599
+ "use strict";
3600
+ init_constants();
3601
+ getArrowSize = (labelWidth) => {
3602
+ if (labelWidth <= 0) return ARROW_HEIGHT_PX;
3603
+ const scaledSize = labelWidth * ARROW_MAX_LABEL_WIDTH_RATIO;
3604
+ return Math.max(ARROW_MIN_SIZE_PX, Math.min(ARROW_HEIGHT_PX, scaledSize));
3605
+ };
3606
+ }
3607
+ });
3608
+
3594
3609
  // ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
3595
3610
  function r2(e2) {
3596
3611
  var t2, f3, n2 = "";
@@ -6240,21 +6255,24 @@ var init_arrow = __esm({
6240
6255
  init_web();
6241
6256
  init_web();
6242
6257
  init_web();
6243
- _tmpl$5 = /* @__PURE__ */ template(`<div class="absolute w-0 h-0 z-10"style="border-left:8px solid transparent;border-right:8px solid transparent">`);
6258
+ init_get_arrow_size();
6259
+ _tmpl$5 = /* @__PURE__ */ template(`<div data-react-grab-arrow class="absolute w-0 h-0 z-10">`);
6244
6260
  Arrow = (props) => {
6245
6261
  const arrowColor = () => props.color ?? "white";
6246
6262
  const isBottom = () => props.position === "bottom";
6263
+ const arrowSize = () => getArrowSize(props.labelWidth ?? 0);
6247
6264
  return (() => {
6248
6265
  var _el$ = _tmpl$5();
6249
6266
  createRenderEffect((_p$) => {
6250
- var _v$ = `calc(${props.leftPercent}% + ${props.leftOffsetPx}px)`, _v$2 = isBottom() ? "0" : void 0, _v$3 = isBottom() ? void 0 : "0", _v$4 = isBottom() ? "translateX(-50%) translateY(-100%)" : "translateX(-50%) translateY(100%)", _v$5 = isBottom() ? `8px solid ${arrowColor()}` : void 0, _v$6 = isBottom() ? void 0 : `8px solid ${arrowColor()}`, _v$7 = isBottom() ? "drop-shadow(-1px -1px 0 rgba(0,0,0,0.06)) drop-shadow(1px -1px 0 rgba(0,0,0,0.06))" : "drop-shadow(-1px 1px 0 rgba(0,0,0,0.06)) drop-shadow(1px 1px 0 rgba(0,0,0,0.06))";
6267
+ var _v$ = `calc(${props.leftPercent}% + ${props.leftOffsetPx}px)`, _v$2 = isBottom() ? "0" : void 0, _v$3 = isBottom() ? void 0 : "0", _v$4 = isBottom() ? "translateX(-50%) translateY(-100%)" : "translateX(-50%) translateY(100%)", _v$5 = `${arrowSize()}px solid transparent`, _v$6 = `${arrowSize()}px solid transparent`, _v$7 = isBottom() ? `${arrowSize()}px solid ${arrowColor()}` : void 0, _v$8 = isBottom() ? void 0 : `${arrowSize()}px solid ${arrowColor()}`;
6251
6268
  _v$ !== _p$.e && setStyleProperty(_el$, "left", _p$.e = _v$);
6252
6269
  _v$2 !== _p$.t && setStyleProperty(_el$, "top", _p$.t = _v$2);
6253
6270
  _v$3 !== _p$.a && setStyleProperty(_el$, "bottom", _p$.a = _v$3);
6254
6271
  _v$4 !== _p$.o && setStyleProperty(_el$, "transform", _p$.o = _v$4);
6255
- _v$5 !== _p$.i && setStyleProperty(_el$, "border-bottom", _p$.i = _v$5);
6256
- _v$6 !== _p$.n && setStyleProperty(_el$, "border-top", _p$.n = _v$6);
6257
- _v$7 !== _p$.s && setStyleProperty(_el$, "filter", _p$.s = _v$7);
6272
+ _v$5 !== _p$.i && setStyleProperty(_el$, "border-left", _p$.i = _v$5);
6273
+ _v$6 !== _p$.n && setStyleProperty(_el$, "border-right", _p$.n = _v$6);
6274
+ _v$7 !== _p$.s && setStyleProperty(_el$, "border-bottom", _p$.s = _v$7);
6275
+ _v$8 !== _p$.h && setStyleProperty(_el$, "border-top", _p$.h = _v$8);
6258
6276
  return _p$;
6259
6277
  }, {
6260
6278
  e: void 0,
@@ -6263,7 +6281,8 @@ var init_arrow = __esm({
6263
6281
  o: void 0,
6264
6282
  i: void 0,
6265
6283
  n: void 0,
6266
- s: void 0
6284
+ s: void 0,
6285
+ h: void 0
6267
6286
  });
6268
6287
  return _el$;
6269
6288
  })();
@@ -6991,7 +7010,7 @@ var init_completion_view = __esm({
6991
7010
  });
6992
7011
 
6993
7012
  // src/components/selection-label/index.tsx
6994
- var _tmpl$16, _tmpl$26, _tmpl$34, _tmpl$43, _tmpl$53, _tmpl$63, _tmpl$73, _tmpl$83, _tmpl$92, _tmpl$0, _tmpl$1, DEFAULT_OFFSCREEN_POSITION, SelectionLabel;
7013
+ var _tmpl$16, _tmpl$26, _tmpl$34, _tmpl$43, _tmpl$53, _tmpl$63, _tmpl$73, _tmpl$83, _tmpl$92, _tmpl$0, _tmpl$1, _tmpl$102, DEFAULT_OFFSCREEN_POSITION, SelectionLabel;
6995
7014
  var init_selection_label = __esm({
6996
7015
  "src/components/selection-label/index.tsx"() {
6997
7016
  "use strict";
@@ -7007,6 +7026,7 @@ var init_selection_label = __esm({
7007
7026
  init_web();
7008
7027
  init_solid();
7009
7028
  init_constants();
7029
+ init_get_arrow_size();
7010
7030
  init_is_keyboard_event_triggered_by_input();
7011
7031
  init_cn();
7012
7032
  init_get_tag_display();
@@ -7026,11 +7046,12 @@ var init_selection_label = __esm({
7026
7046
  _tmpl$43 = /* @__PURE__ */ template(`<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5">`);
7027
7047
  _tmpl$53 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col items-start w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 py-1.5 w-fit h-fit px-2">`);
7028
7048
  _tmpl$63 = /* @__PURE__ */ template(`<div class="flex items-center gap-1 w-full mb-1 overflow-hidden"><span class="text-black/40 text-[11px] leading-3 font-medium truncate italic">`);
7029
- _tmpl$73 = /* @__PURE__ */ template(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-input class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"placeholder="Add context"rows=1 style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none></textarea><button data-react-grab-submit class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-black cursor-pointer ml-1 interactive-scale">`);
7030
- _tmpl$83 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit min-w-[150px] max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2 max-w-full">`);
7031
- _tmpl$92 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-selection-label style=z-index:2147483647><div>`);
7032
- _tmpl$0 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
7033
- _tmpl$1 = /* @__PURE__ */ template(`<div class="contain-layout flex items-center justify-between w-full px-2 py-1 transition-colors"><span class="text-[13px] leading-4 font-sans font-medium text-black">`);
7049
+ _tmpl$73 = /* @__PURE__ */ template(`<button data-react-grab-submit class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-black cursor-pointer ml-1 interactive-scale">`);
7050
+ _tmpl$83 = /* @__PURE__ */ template(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-input class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"placeholder="Add context"rows=1 style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none>`);
7051
+ _tmpl$92 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit min-w-[150px] max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2 max-w-full">`);
7052
+ _tmpl$0 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-selection-label style=z-index:2147483647><div>`);
7053
+ _tmpl$1 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
7054
+ _tmpl$102 = /* @__PURE__ */ template(`<div class="contain-layout flex items-center justify-between w-full px-2 py-1 transition-colors"><span class="text-[13px] leading-4 font-sans font-medium text-black">`);
7034
7055
  DEFAULT_OFFSCREEN_POSITION = {
7035
7056
  left: -9999,
7036
7057
  top: -9999,
@@ -7040,12 +7061,14 @@ var init_selection_label = __esm({
7040
7061
  };
7041
7062
  SelectionLabel = (props) => {
7042
7063
  let containerRef;
7064
+ let panelRef;
7043
7065
  let inputRef;
7044
7066
  let isTagCurrentlyHovered = false;
7045
7067
  let lastValidPosition = null;
7046
7068
  let lastElementIdentity = null;
7047
7069
  const [measuredWidth, setMeasuredWidth] = createSignal(0);
7048
7070
  const [measuredHeight, setMeasuredHeight] = createSignal(0);
7071
+ const [panelWidth, setPanelWidth] = createSignal(0);
7049
7072
  const [arrowPosition, setArrowPosition] = createSignal("bottom");
7050
7073
  const [viewportVersion, setViewportVersion] = createSignal(0);
7051
7074
  const [hadValidBounds, setHadValidBounds] = createSignal(false);
@@ -7069,6 +7092,9 @@ var init_selection_label = __esm({
7069
7092
  setMeasuredWidth(rect.width);
7070
7093
  setMeasuredHeight(rect.height);
7071
7094
  }
7095
+ if (panelRef) {
7096
+ setPanelWidth(panelRef.getBoundingClientRect().width);
7097
+ }
7072
7098
  };
7073
7099
  const handleTagHoverChange = (hovered) => {
7074
7100
  isTagCurrentlyHovered = hovered;
@@ -7133,7 +7159,7 @@ var init_selection_label = __esm({
7133
7159
  queueMicrotask(measureContainer);
7134
7160
  });
7135
7161
  createEffect(() => {
7136
- if (props.isPromptMode && inputRef) {
7162
+ if (props.isPromptMode && inputRef && props.onSubmit) {
7137
7163
  setTimeout(() => {
7138
7164
  inputRef?.focus();
7139
7165
  }, 0);
@@ -7159,9 +7185,10 @@ var init_selection_label = __esm({
7159
7185
  const cursorX = props.mouseX ?? selectionCenterX;
7160
7186
  const selectionBottom = bounds.y + bounds.height;
7161
7187
  const selectionTop = bounds.y;
7188
+ const actualArrowHeight = props.hideArrow ? 0 : getArrowSize(panelWidth());
7162
7189
  const anchorX = cursorX;
7163
7190
  let edgeOffsetX = 0;
7164
- let positionTop = selectionBottom + ARROW_HEIGHT_PX + LABEL_GAP_PX;
7191
+ let positionTop = selectionBottom + actualArrowHeight + LABEL_GAP_PX;
7165
7192
  if (labelWidth > 0) {
7166
7193
  const labelLeft = anchorX - labelWidth / 2;
7167
7194
  const labelRight = anchorX + labelWidth / 2;
@@ -7172,7 +7199,7 @@ var init_selection_label = __esm({
7172
7199
  edgeOffsetX = VIEWPORT_MARGIN_PX - labelLeft;
7173
7200
  }
7174
7201
  }
7175
- const totalHeightNeeded = labelHeight + ARROW_HEIGHT_PX + LABEL_GAP_PX;
7202
+ const totalHeightNeeded = labelHeight + actualArrowHeight + LABEL_GAP_PX;
7176
7203
  const fitsBelow = positionTop + labelHeight <= viewportHeight - VIEWPORT_MARGIN_PX;
7177
7204
  if (!fitsBelow) {
7178
7205
  positionTop = selectionTop - totalHeightNeeded;
@@ -7184,7 +7211,12 @@ var init_selection_label = __esm({
7184
7211
  positionTop = VIEWPORT_MARGIN_PX;
7185
7212
  }
7186
7213
  const arrowLeftPercent = ARROW_CENTER_PERCENT;
7187
- const arrowLeftOffset = -edgeOffsetX;
7214
+ const labelHalfWidth = labelWidth / 2;
7215
+ const arrowCenterPx = labelHalfWidth - edgeOffsetX;
7216
+ const arrowMinPx = Math.min(ARROW_LABEL_MARGIN_PX, labelHalfWidth);
7217
+ const arrowMaxPx = Math.max(labelWidth - ARROW_LABEL_MARGIN_PX, labelHalfWidth);
7218
+ const clampedArrowCenterPx = Math.max(arrowMinPx, Math.min(arrowMaxPx, arrowCenterPx));
7219
+ const arrowLeftOffset = clampedArrowCenterPx - labelHalfWidth;
7188
7220
  const position = {
7189
7221
  left: anchorX,
7190
7222
  top: positionTop,
@@ -7237,7 +7269,7 @@ var init_selection_label = __esm({
7237
7269
  const handleContainerPointerDown = (event) => {
7238
7270
  event.stopPropagation();
7239
7271
  event.stopImmediatePropagation();
7240
- const isEditableInputVisible = canInteract() && props.isPromptMode && !props.isPendingDismiss;
7272
+ const isEditableInputVisible = canInteract() && props.isPromptMode && !props.isPendingDismiss && props.onSubmit;
7241
7273
  if (isEditableInputVisible && inputRef) {
7242
7274
  inputRef.focus();
7243
7275
  }
@@ -7248,7 +7280,7 @@ var init_selection_label = __esm({
7248
7280
  return memo(() => props.visible !== false)() && (props.selectionBounds || shouldPersistDuringFade());
7249
7281
  },
7250
7282
  get children() {
7251
- var _el$ = _tmpl$92(), _el$2 = _el$.firstChild;
7283
+ var _el$ = _tmpl$0(), _el$2 = _el$.firstChild;
7252
7284
  _el$.addEventListener("mouseleave", () => props.onHoverChange?.(false));
7253
7285
  _el$.addEventListener("mouseenter", () => props.onHoverChange?.(true));
7254
7286
  _el$.$$click = (event) => {
@@ -7258,15 +7290,25 @@ var init_selection_label = __esm({
7258
7290
  _el$.$$pointerdown = handleContainerPointerDown;
7259
7291
  var _ref$ = containerRef;
7260
7292
  typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
7261
- insert(_el$, createComponent(Arrow, {
7262
- get position() {
7263
- return arrowPosition();
7264
- },
7265
- get leftPercent() {
7266
- return computedPosition().arrowLeftPercent;
7293
+ insert(_el$, createComponent(Show, {
7294
+ get when() {
7295
+ return !props.hideArrow;
7267
7296
  },
7268
- get leftOffsetPx() {
7269
- return computedPosition().arrowLeftOffset;
7297
+ get children() {
7298
+ return createComponent(Arrow, {
7299
+ get position() {
7300
+ return arrowPosition();
7301
+ },
7302
+ get leftPercent() {
7303
+ return computedPosition().arrowLeftPercent;
7304
+ },
7305
+ get leftOffsetPx() {
7306
+ return computedPosition().arrowLeftOffset;
7307
+ },
7308
+ get labelWidth() {
7309
+ return panelWidth();
7310
+ }
7311
+ });
7270
7312
  }
7271
7313
  }), _el$2);
7272
7314
  insert(_el$, createComponent(Show, {
@@ -7309,6 +7351,8 @@ var init_selection_label = __esm({
7309
7351
  });
7310
7352
  }
7311
7353
  }), _el$2);
7354
+ var _ref$2 = panelRef;
7355
+ typeof _ref$2 === "function" ? use(_ref$2, _el$2) : panelRef = _el$2;
7312
7356
  insert(_el$2, createComponent(Show, {
7313
7357
  get when() {
7314
7358
  return memo(() => props.status === "copying")() && !props.isPendingAbort;
@@ -7328,8 +7372,8 @@ var init_selection_label = __esm({
7328
7372
  return createComponent(BottomSection, {
7329
7373
  get children() {
7330
7374
  var _el$6 = _tmpl$26(), _el$7 = _el$6.firstChild;
7331
- var _ref$2 = inputRef;
7332
- typeof _ref$2 === "function" ? use(_ref$2, _el$7) : inputRef = _el$7;
7375
+ var _ref$3 = inputRef;
7376
+ typeof _ref$3 === "function" ? use(_ref$3, _el$7) : inputRef = _el$7;
7333
7377
  insert(_el$6, createComponent(Show, {
7334
7378
  get when() {
7335
7379
  return props.onAbort;
@@ -7405,23 +7449,23 @@ var init_selection_label = __esm({
7405
7449
  return actionCycleItems();
7406
7450
  },
7407
7451
  children: (item, itemIndex) => (() => {
7408
- var _el$17 = _tmpl$1(), _el$18 = _el$17.firstChild;
7452
+ var _el$17 = _tmpl$102(), _el$18 = _el$17.firstChild;
7409
7453
  insert(_el$18, () => item.label);
7410
7454
  insert(_el$17, createComponent(Show, {
7411
7455
  get when() {
7412
7456
  return item.shortcut;
7413
7457
  },
7414
7458
  get children() {
7415
- var _el$19 = _tmpl$0();
7459
+ var _el$19 = _tmpl$1();
7416
7460
  insert(_el$19, () => formatShortcut(item.shortcut));
7417
7461
  return _el$19;
7418
7462
  }
7419
7463
  }), null);
7420
7464
  createRenderEffect((_p$) => {
7421
- var _v$9 = item.label.toLowerCase(), _v$0 = !!(itemIndex() === actionCycleActiveIndex()), _v$1 = !!(itemIndex() === actionCycleItems().length - 1);
7422
- _v$9 !== _p$.e && setAttribute(_el$17, "data-react-grab-action-cycle-item", _p$.e = _v$9);
7423
- _v$0 !== _p$.t && _el$17.classList.toggle("bg-black/5", _p$.t = _v$0);
7424
- _v$1 !== _p$.a && _el$17.classList.toggle("rounded-b-[6px]", _p$.a = _v$1);
7465
+ var _v$1 = item.label.toLowerCase(), _v$10 = !!(itemIndex() === actionCycleActiveIndex()), _v$11 = !!(itemIndex() === actionCycleItems().length - 1);
7466
+ _v$1 !== _p$.e && setAttribute(_el$17, "data-react-grab-action-cycle-item", _p$.e = _v$1);
7467
+ _v$10 !== _p$.t && _el$17.classList.toggle("bg-black/5", _p$.t = _v$10);
7468
+ _v$11 !== _p$.a && _el$17.classList.toggle("rounded-b-[6px]", _p$.a = _v$11);
7425
7469
  return _p$;
7426
7470
  }, {
7427
7471
  e: void 0,
@@ -7444,7 +7488,7 @@ var init_selection_label = __esm({
7444
7488
  return memo(() => !!(canInteract() && props.isPromptMode))() && !props.isPendingDismiss;
7445
7489
  },
7446
7490
  get children() {
7447
- var _el$10 = _tmpl$83(), _el$11 = _el$10.firstChild;
7491
+ var _el$10 = _tmpl$92(), _el$11 = _el$10.firstChild;
7448
7492
  insert(_el$11, createComponent(TagBadge, {
7449
7493
  get tagName() {
7450
7494
  return tagDisplay();
@@ -7475,17 +7519,34 @@ var init_selection_label = __esm({
7475
7519
  return _el$12;
7476
7520
  }
7477
7521
  }), (() => {
7478
- var _el$14 = _tmpl$73(), _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling;
7522
+ var _el$14 = _tmpl$83(), _el$15 = _el$14.firstChild;
7479
7523
  _el$15.$$keydown = handleKeyDown;
7480
7524
  _el$15.$$input = handleInput;
7481
- var _ref$3 = inputRef;
7482
- typeof _ref$3 === "function" ? use(_ref$3, _el$15) : inputRef = _el$15;
7483
- _el$16.$$click = () => props.onSubmit?.();
7484
- insert(_el$16, createComponent(IconSubmit, {
7485
- size: 10,
7486
- "class": "text-white"
7487
- }));
7488
- createRenderEffect((_$p) => setStyleProperty(_el$14, "padding-left", props.replyToPrompt ? "14px" : "0"));
7525
+ var _ref$4 = inputRef;
7526
+ typeof _ref$4 === "function" ? use(_ref$4, _el$15) : inputRef = _el$15;
7527
+ insert(_el$14, createComponent(Show, {
7528
+ get when() {
7529
+ return props.onSubmit;
7530
+ },
7531
+ get children() {
7532
+ var _el$16 = _tmpl$73();
7533
+ _el$16.$$click = () => props.onSubmit?.();
7534
+ insert(_el$16, createComponent(IconSubmit, {
7535
+ size: 10,
7536
+ "class": "text-white"
7537
+ }));
7538
+ return _el$16;
7539
+ }
7540
+ }), null);
7541
+ createRenderEffect((_p$) => {
7542
+ var _v$ = props.replyToPrompt ? "14px" : "0", _v$2 = !props.onSubmit;
7543
+ _v$ !== _p$.e && setStyleProperty(_el$14, "padding-left", _p$.e = _v$);
7544
+ _v$2 !== _p$.t && (_el$15.readOnly = _p$.t = _v$2);
7545
+ return _p$;
7546
+ }, {
7547
+ e: void 0,
7548
+ t: void 0
7549
+ });
7489
7550
  createRenderEffect(() => _el$15.value = props.inputValue ?? "");
7490
7551
  return _el$14;
7491
7552
  })()];
@@ -7528,15 +7589,15 @@ var init_selection_label = __esm({
7528
7589
  }
7529
7590
  }), null);
7530
7591
  createRenderEffect((_p$) => {
7531
- var _v$ = cn("fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-opacity duration-100 ease-out"), _v$2 = `${computedPosition().top}px`, _v$3 = `${computedPosition().left}px`, _v$4 = `translateX(calc(-50% + ${computedPosition().edgeOffsetX}px))`, _v$5 = shouldEnablePointerEvents() ? "auto" : "none", _v$6 = props.status === "fading" || isInternalFading() ? 0 : 1, _v$7 = cn("contain-layout flex items-center gap-[5px] rounded-[10px] antialiased w-fit h-fit p-0 [font-synthesis:none] [corner-shape:superellipse(1.25)]", PANEL_STYLES), _v$8 = isCompletedStatus() && !props.error ? "none" : void 0;
7532
- _v$ !== _p$.e && className(_el$, _p$.e = _v$);
7533
- _v$2 !== _p$.t && setStyleProperty(_el$, "top", _p$.t = _v$2);
7534
- _v$3 !== _p$.a && setStyleProperty(_el$, "left", _p$.a = _v$3);
7535
- _v$4 !== _p$.o && setStyleProperty(_el$, "transform", _p$.o = _v$4);
7536
- _v$5 !== _p$.i && setStyleProperty(_el$, "pointer-events", _p$.i = _v$5);
7537
- _v$6 !== _p$.n && setStyleProperty(_el$, "opacity", _p$.n = _v$6);
7538
- _v$7 !== _p$.s && className(_el$2, _p$.s = _v$7);
7539
- _v$8 !== _p$.h && setStyleProperty(_el$2, "display", _p$.h = _v$8);
7592
+ var _v$3 = cn("fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-opacity duration-100 ease-out"), _v$4 = `${computedPosition().top}px`, _v$5 = `${computedPosition().left}px`, _v$6 = `translateX(calc(-50% + ${computedPosition().edgeOffsetX}px))`, _v$7 = shouldEnablePointerEvents() ? "auto" : "none", _v$8 = props.status === "fading" || isInternalFading() ? 0 : 1, _v$9 = cn("contain-layout flex items-center gap-[5px] rounded-[10px] antialiased w-fit h-fit p-0 [font-synthesis:none] [corner-shape:superellipse(1.25)]", PANEL_STYLES), _v$0 = isCompletedStatus() && !props.error ? "none" : void 0;
7593
+ _v$3 !== _p$.e && className(_el$, _p$.e = _v$3);
7594
+ _v$4 !== _p$.t && setStyleProperty(_el$, "top", _p$.t = _v$4);
7595
+ _v$5 !== _p$.a && setStyleProperty(_el$, "left", _p$.a = _v$5);
7596
+ _v$6 !== _p$.o && setStyleProperty(_el$, "transform", _p$.o = _v$6);
7597
+ _v$7 !== _p$.i && setStyleProperty(_el$, "pointer-events", _p$.i = _v$7);
7598
+ _v$8 !== _p$.n && setStyleProperty(_el$, "opacity", _p$.n = _v$8);
7599
+ _v$9 !== _p$.s && className(_el$2, _p$.s = _v$9);
7600
+ _v$0 !== _p$.h && setStyleProperty(_el$2, "display", _p$.h = _v$0);
7540
7601
  return _p$;
7541
7602
  }, {
7542
7603
  e: void 0,
@@ -7686,6 +7747,55 @@ var init_icon_comment = __esm({
7686
7747
  }
7687
7748
  });
7688
7749
 
7750
+ // src/components/icons/icon-inbox.tsx
7751
+ var _tmpl$20, _tmpl$27, IconInbox, IconInboxUnread;
7752
+ var init_icon_inbox = __esm({
7753
+ "src/components/icons/icon-inbox.tsx"() {
7754
+ "use strict";
7755
+ init_web();
7756
+ init_web();
7757
+ init_web();
7758
+ _tmpl$20 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path d="M12.8277 1.75C15.0033 1.74998 15.7381 1.74997 17.0981 1.93282C18.5025 2.12164 19.6563 2.52175 20.5687 3.43414C21.4811 4.34653 21.8812 5.50033 22.07 6.90471C22.234 8.12428 22.2509 10.047 22.2526 12L22.2494 12.75H20.2528C20.2528 10.4826 20.2507 8.38258 20.0878 7.17121C19.9288 5.9886 19.6333 5.3272 19.1545 4.84835C18.6756 4.3695 18.0142 4.07399 16.8316 3.91499C15.6202 3.75212 15.0203 3.75 12.7528 3.75C10.4854 3.75 8.3854 3.75212 7.17403 3.91499C5.99143 4.07399 5.33003 4.3695 4.85118 4.84835C4.37232 5.3272 4.07681 5.9886 3.91782 7.17121C3.75495 8.38258 3.75283 10.4826 3.75283 12.75L1.75195 12.7518L1.75302 11.9999C1.75475 10.0469 1.77169 8.12426 1.93565 6.90471C2.12447 5.50033 2.52457 4.34653 3.43696 3.43414C4.34935 2.52175 5.50316 2.12164 6.90754 1.93282C8.26767 1.74996 10.0024 1.74998 12.1783 1.75H12.1784H12.8277H12.8277Z"></path><path d="M22.2453 13.5037C22.2368 15.2454 22.1975 16.6539 21.9924 17.7892C21.7834 18.9461 21.3919 19.8839 20.6368 20.6391C19.7786 21.4973 18.6863 21.8843 17.3097 22.0694C15.9662 22.25 14.2455 22.25 12.0548 22.25H11.9405C9.74978 22.25 8.02911 22.25 6.6857 22.0694C5.30904 21.8843 4.21679 21.4973 3.35859 20.6391C2.60342 19.8839 2.21192 18.9461 2.00296 17.7892C1.79789 16.6539 1.75858 15.2454 1.75 13.5037L1.75107 12.7518L3.75194 12.75L7.42333 12.75C8.70352 12.75 9.55879 13.7898 9.96929 14.6123C10.2595 15.1938 10.8231 15.75 11.9977 15.75C13.1723 15.75 13.7358 15.1938 14.0261 14.6123C14.4366 13.7898 15.2918 12.75 16.572 12.75L20.2519 12.75H22.2486L22.2453 13.5037Z">`);
7759
+ _tmpl$27 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill=#404040 d="M14.25 5.5C14.25 3.15279 16.1528 1.25 18.5 1.25C20.8472 1.25 22.75 3.15279 22.75 5.5C22.75 7.84721 20.8472 9.75 18.5 9.75C16.1528 9.75 14.25 7.84721 14.25 5.5Z"></path><path d="M20.2156 10.9897C19.9813 11.0629 19.8641 11.0994 19.8057 11.1792C19.7474 11.259 19.748 11.373 19.7491 11.6009C19.7513 12.0381 19.7518 12.4898 19.7519 12.9499C19.752 13.1155 19.6176 13.25 19.4519 13.25L16.072 13.25C14.7918 13.25 13.9366 14.2898 13.5261 15.1123C13.2358 15.6938 12.6723 16.25 11.4977 16.25C10.3231 16.25 9.7595 15.6938 9.46929 15.1123C9.05879 14.2898 8.20352 13.25 6.92333 13.25L3.55194 13.25C3.38626 13.25 3.25193 13.1155 3.25197 12.9499C3.25245 10.7983 3.26128 8.82894 3.41693 7.67121C3.57593 6.4886 3.87144 5.8272 4.35029 5.34835C4.82915 4.8695 5.49055 4.57399 6.67315 4.41499C7.88452 4.25212 9.9845 4.25 12.2519 4.25C12.3035 4.25 12.3542 4.25 12.4041 4.25001C12.6299 4.25002 12.7427 4.25003 12.822 4.19171C12.9014 4.13339 12.9377 4.0171 13.0103 3.78451C13.0682 3.59881 13.1354 3.41715 13.2111 3.24007C13.4166 2.75982 13.5193 2.51969 13.4304 2.38492C13.3415 2.25015 13.1029 2.25011 12.6257 2.25002C12.5291 2.25 12.4296 2.25 12.3268 2.25H11.6775C9.50152 2.24998 7.76678 2.24996 6.40666 2.43283C5.00228 2.62164 3.84847 3.02175 2.93608 3.93414C2.02369 4.84653 1.62358 6.00033 1.43477 7.40471C1.2708 8.62426 1.25387 10.5469 1.25214 12.4999L1.25 14.0037C1.25858 15.7454 1.29789 17.1539 1.50296 18.2892C1.71192 19.4461 2.10342 20.3839 2.85859 21.1391C3.71679 21.9973 4.80904 22.3843 6.1857 22.5694C7.52911 22.75 9.24978 22.75 11.4405 22.75H11.5548C13.7455 22.75 15.4662 22.75 16.8097 22.5694C18.1863 22.3843 19.2786 21.9973 20.1368 21.1391C20.8919 20.3839 21.2834 19.4461 21.4924 18.2892C21.6975 17.1539 21.7368 15.7454 21.7453 14.0037L21.7517 12.5C21.7514 12.1187 21.7505 11.7385 21.748 11.3645C21.7449 10.8942 21.7433 10.6591 21.6087 10.5709C21.4741 10.4828 21.2371 10.5844 20.763 10.7876C20.585 10.8638 20.4023 10.9314 20.2156 10.9897Z">`);
7760
+ IconInbox = (props) => {
7761
+ const size = () => props.size ?? 14;
7762
+ return (() => {
7763
+ var _el$ = _tmpl$20();
7764
+ createRenderEffect((_p$) => {
7765
+ var _v$ = size(), _v$2 = size(), _v$3 = props.class;
7766
+ _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
7767
+ _v$2 !== _p$.t && setAttribute(_el$, "height", _p$.t = _v$2);
7768
+ _v$3 !== _p$.a && setAttribute(_el$, "class", _p$.a = _v$3);
7769
+ return _p$;
7770
+ }, {
7771
+ e: void 0,
7772
+ t: void 0,
7773
+ a: void 0
7774
+ });
7775
+ return _el$;
7776
+ })();
7777
+ };
7778
+ IconInboxUnread = (props) => {
7779
+ const size = () => props.size ?? 14;
7780
+ return (() => {
7781
+ var _el$2 = _tmpl$27();
7782
+ createRenderEffect((_p$) => {
7783
+ var _v$4 = size(), _v$5 = size(), _v$6 = props.class;
7784
+ _v$4 !== _p$.e && setAttribute(_el$2, "width", _p$.e = _v$4);
7785
+ _v$5 !== _p$.t && setAttribute(_el$2, "height", _p$.t = _v$5);
7786
+ _v$6 !== _p$.a && setAttribute(_el$2, "class", _p$.a = _v$6);
7787
+ return _p$;
7788
+ }, {
7789
+ e: void 0,
7790
+ t: void 0,
7791
+ a: void 0
7792
+ });
7793
+ return _el$2;
7794
+ })();
7795
+ };
7796
+ }
7797
+ });
7798
+
7689
7799
  // src/utils/freeze-updates.ts
7690
7800
  var isUpdatesPaused, getOrCache, patchedDispatchers, wrappedDispatchCache, wrappedStartTransitionCache, pendingStoreCallbacks, pendingTransitionCallbacks, pendingStateUpdates, pausedQueueStates, pausedContextStates, renderersWithPatchedDispatcher, typedFiberRoots, getFiberRoot, collectFiberRoots, mergePendingChains, pauseHookQueue, resumeHookQueue, pauseContextDependency, resumeContextDependency, forEachHookQueue, forEachContextDependency, traverseFibers, pauseFiber, resumeFiber, patchDispatcher, installDispatcherPatching, scheduleReactUpdate, invokeCallbacks, initializeFreezeSupport, freezeUpdates;
7691
7801
  var init_freeze_updates = __esm({
@@ -8158,7 +8268,28 @@ var init_freeze_animations = __esm({
8158
8268
  );
8159
8269
  };
8160
8270
  unfreezeGlobalAnimations = () => {
8161
- globalAnimationStyleElement?.remove();
8271
+ if (!globalAnimationStyleElement) return;
8272
+ globalAnimationStyleElement.textContent = `
8273
+ *, *::before, *::after {
8274
+ transition: none !important;
8275
+ }
8276
+ `;
8277
+ for (const animation of document.getAnimations()) {
8278
+ if (animation.effect instanceof KeyframeEffect) {
8279
+ const target = animation.effect.target;
8280
+ if (target instanceof Element) {
8281
+ const rootNode = target.getRootNode();
8282
+ if (rootNode instanceof ShadowRoot) {
8283
+ continue;
8284
+ }
8285
+ }
8286
+ }
8287
+ try {
8288
+ animation.finish();
8289
+ } catch {
8290
+ }
8291
+ }
8292
+ globalAnimationStyleElement.remove();
8162
8293
  globalAnimationStyleElement = null;
8163
8294
  };
8164
8295
  }
@@ -8467,7 +8598,7 @@ var init_freeze_pseudo_states = __esm({
8467
8598
  });
8468
8599
 
8469
8600
  // src/components/tooltip.tsx
8470
- var _tmpl$20, tooltipCloseTimestamp, wasTooltipRecentlyVisible, Tooltip;
8601
+ var _tmpl$21, tooltipCloseTimestamp, wasTooltipRecentlyVisible, Tooltip;
8471
8602
  var init_tooltip = __esm({
8472
8603
  "src/components/tooltip.tsx"() {
8473
8604
  "use strict";
@@ -8479,7 +8610,7 @@ var init_tooltip = __esm({
8479
8610
  init_solid();
8480
8611
  init_cn();
8481
8612
  init_constants();
8482
- _tmpl$20 = /* @__PURE__ */ template(`<div style=z-index:2147483647>`);
8613
+ _tmpl$21 = /* @__PURE__ */ template(`<div style=z-index:2147483647>`);
8483
8614
  tooltipCloseTimestamp = 0;
8484
8615
  wasTooltipRecentlyVisible = () => {
8485
8616
  return Date.now() - tooltipCloseTimestamp < TOOLTIP_GRACE_PERIOD_MS;
@@ -8523,7 +8654,7 @@ var init_tooltip = __esm({
8523
8654
  return delayedVisible();
8524
8655
  },
8525
8656
  get children() {
8526
- var _el$ = _tmpl$20();
8657
+ var _el$ = _tmpl$21();
8527
8658
  insert(_el$, () => props.children);
8528
8659
  createRenderEffect(() => className(_el$, cn("absolute left-1/2 -translate-x-1/2 whitespace-nowrap px-1.5 py-0.5 rounded-[10px] text-[10px] text-black/60 pointer-events-none [corner-shape:superellipse(1.25)]", PANEL_STYLES, props.position === "top" ? "bottom-full mb-2.5" : "top-full mt-2.5", shouldAnimate() && "animate-tooltip-fade-in")));
8529
8660
  return _el$;
@@ -8547,7 +8678,7 @@ var init_get_toolbar_icon_color = __esm({
8547
8678
  });
8548
8679
 
8549
8680
  // src/components/toolbar/index.tsx
8550
- var _tmpl$21, _tmpl$27, Toolbar;
8681
+ var _tmpl$28, _tmpl$29, Toolbar;
8551
8682
  var init_toolbar = __esm({
8552
8683
  "src/components/toolbar/index.tsx"() {
8553
8684
  "use strict";
@@ -8569,17 +8700,20 @@ var init_toolbar = __esm({
8569
8700
  init_icon_select();
8570
8701
  init_icon_chevron();
8571
8702
  init_icon_comment();
8703
+ init_icon_inbox();
8572
8704
  init_constants();
8573
8705
  init_freeze_updates();
8574
8706
  init_freeze_animations();
8575
8707
  init_freeze_pseudo_states();
8576
8708
  init_tooltip();
8577
8709
  init_get_toolbar_icon_color();
8578
- _tmpl$21 = /* @__PURE__ */ template(`<div style=z-index:2147483647>Enable to continue`);
8579
- _tmpl$27 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-toolbar style=z-index:2147483647><div><div><div class="flex items-center min-w-0"><div><div class="relative overflow-visible min-w-0"><button data-react-grab-ignore-events data-react-grab-toolbar-toggle class="contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox mr-1.5"></button></div></div><div><div class="relative overflow-visible min-w-0"><button data-react-grab-ignore-events data-react-grab-toolbar-comment class="contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox mr-1.5"></button></div></div><div class="relative shrink-0 overflow-visible"><button data-react-grab-ignore-events data-react-grab-toolbar-enabled class="contain-layout flex items-center justify-center cursor-pointer interactive-scale outline-none mx-0.5"><div><div></div></div></button></div></div></div><button data-react-grab-ignore-events data-react-grab-toolbar-collapse class="contain-layout shrink-0 flex items-center justify-center cursor-pointer interactive-scale">`);
8710
+ _tmpl$28 = /* @__PURE__ */ template(`<div style=z-index:2147483647>Enable to continue`);
8711
+ _tmpl$29 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-toolbar style=z-index:2147483647><div><div><div class="flex items-center min-w-0"><div class="flex items-center"><div><div class="relative overflow-visible min-w-0"><button data-react-grab-ignore-events data-react-grab-toolbar-toggle class="contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox mr-1.5"></button></div></div><div><div class="relative overflow-visible min-w-0"><button data-react-grab-ignore-events data-react-grab-toolbar-comment class="contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox mr-1.5"></button></div></div><div><div class="relative overflow-visible min-w-0"><button data-react-grab-ignore-events data-react-grab-toolbar-recent class="contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox mr-1.5"></button></div></div></div><div class="relative shrink-0 overflow-visible"><button data-react-grab-ignore-events data-react-grab-toolbar-enabled class="contain-layout flex items-center justify-center cursor-pointer interactive-scale outline-none mx-0.5"><div><div></div></div></button></div></div></div><button data-react-grab-ignore-events data-react-grab-toolbar-collapse class="contain-layout shrink-0 flex items-center justify-center cursor-pointer interactive-scale">`);
8580
8712
  Toolbar = (props) => {
8581
8713
  let containerRef;
8714
+ let expandableButtonsRef;
8582
8715
  let unfreezeUpdatesCallback = null;
8716
+ let lastKnownExpandableWidth = 0;
8583
8717
  const [isVisible, setIsVisible] = createSignal(false);
8584
8718
  const [isCollapsed, setIsCollapsed] = createSignal(false);
8585
8719
  const [isDragging, setIsDragging] = createSignal(false);
@@ -8606,12 +8740,18 @@ var init_toolbar = __esm({
8606
8740
  const [isCommentTooltipVisible, setIsCommentTooltipVisible] = createSignal(false);
8607
8741
  const [isToggleTooltipVisible, setIsToggleTooltipVisible] = createSignal(false);
8608
8742
  const [isShakeTooltipVisible, setIsShakeTooltipVisible] = createSignal(false);
8743
+ const [isToggleAnimating, setIsToggleAnimating] = createSignal(false);
8744
+ const [isRecentTooltipVisible, setIsRecentTooltipVisible] = createSignal(false);
8745
+ const recentTooltipLabel = () => {
8746
+ const count = props.recentItemCount ?? 0;
8747
+ return count > 0 ? `Recent (${count})` : "Recent";
8748
+ };
8609
8749
  const tooltipPosition = () => snapEdge() === "top" ? "bottom" : "top";
8610
8750
  const stopEventPropagation = (event) => {
8611
8751
  event.stopPropagation();
8612
8752
  event.stopImmediatePropagation();
8613
8753
  };
8614
- const createFreezeHandlers = (setTooltipVisible) => ({
8754
+ const createFreezeHandlers = (setTooltipVisible, onHoverChange) => ({
8615
8755
  onMouseEnter: () => {
8616
8756
  setTooltipVisible(true);
8617
8757
  props.onSelectHoverChange?.(true);
@@ -8620,6 +8760,7 @@ var init_toolbar = __esm({
8620
8760
  freezeGlobalAnimations();
8621
8761
  freezePseudoStates();
8622
8762
  }
8763
+ onHoverChange?.(true);
8623
8764
  },
8624
8765
  onMouseLeave: () => {
8625
8766
  setTooltipVisible(false);
@@ -8630,6 +8771,7 @@ var init_toolbar = __esm({
8630
8771
  unfreezeGlobalAnimations();
8631
8772
  unfreezePseudoStates();
8632
8773
  }
8774
+ onHoverChange?.(false);
8633
8775
  }
8634
8776
  });
8635
8777
  const collapsedEdgeClasses = () => {
@@ -8671,6 +8813,64 @@ var init_toolbar = __esm({
8671
8813
  unfreezeUpdatesCallback = null;
8672
8814
  }
8673
8815
  }));
8816
+ const reclampToolbarToViewport = () => {
8817
+ if (!containerRef) return;
8818
+ const rect = containerRef.getBoundingClientRect();
8819
+ expandedDimensions = {
8820
+ width: rect.width,
8821
+ height: rect.height
8822
+ };
8823
+ const currentPos = position();
8824
+ const viewport = getVisualViewport();
8825
+ const edge = snapEdge();
8826
+ let clampedX = currentPos.x;
8827
+ let clampedY = currentPos.y;
8828
+ if (edge === "top" || edge === "bottom") {
8829
+ const minX = viewport.offsetLeft + TOOLBAR_SNAP_MARGIN_PX;
8830
+ const maxX = Math.max(minX, viewport.offsetLeft + viewport.width - rect.width - TOOLBAR_SNAP_MARGIN_PX);
8831
+ clampedX = clampToViewport2(currentPos.x, minX, maxX);
8832
+ clampedY = edge === "top" ? viewport.offsetTop + TOOLBAR_SNAP_MARGIN_PX : viewport.offsetTop + viewport.height - rect.height - TOOLBAR_SNAP_MARGIN_PX;
8833
+ } else {
8834
+ const minY = viewport.offsetTop + TOOLBAR_SNAP_MARGIN_PX;
8835
+ const maxY = Math.max(minY, viewport.offsetTop + viewport.height - rect.height - TOOLBAR_SNAP_MARGIN_PX);
8836
+ clampedY = clampToViewport2(currentPos.y, minY, maxY);
8837
+ clampedX = edge === "left" ? viewport.offsetLeft + TOOLBAR_SNAP_MARGIN_PX : viewport.offsetLeft + viewport.width - rect.width - TOOLBAR_SNAP_MARGIN_PX;
8838
+ }
8839
+ const newRatio = getRatioFromPosition(edge, clampedX, clampedY, rect.width, rect.height);
8840
+ setPositionRatio(newRatio);
8841
+ const didPositionChange = clampedX !== currentPos.x || clampedY !== currentPos.y;
8842
+ if (didPositionChange) {
8843
+ setIsCollapseAnimating(true);
8844
+ requestAnimationFrame(() => {
8845
+ requestAnimationFrame(() => {
8846
+ setPosition({
8847
+ x: clampedX,
8848
+ y: clampedY
8849
+ });
8850
+ if (collapseAnimationTimeout) {
8851
+ clearTimeout(collapseAnimationTimeout);
8852
+ }
8853
+ collapseAnimationTimeout = setTimeout(() => {
8854
+ setIsCollapseAnimating(false);
8855
+ }, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS);
8856
+ });
8857
+ });
8858
+ }
8859
+ };
8860
+ createEffect(on(() => props.recentItemCount ?? 0, () => {
8861
+ if (isCollapsed()) return;
8862
+ if (recentItemCountTimeout) {
8863
+ clearTimeout(recentItemCountTimeout);
8864
+ }
8865
+ recentItemCountTimeout = setTimeout(reclampToolbarToViewport, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS);
8866
+ onCleanup(() => {
8867
+ if (recentItemCountTimeout) {
8868
+ clearTimeout(recentItemCountTimeout);
8869
+ }
8870
+ });
8871
+ }, {
8872
+ defer: true
8873
+ }));
8674
8874
  let lastPointerPosition = {
8675
8875
  x: 0,
8676
8876
  y: 0,
@@ -8688,7 +8888,7 @@ var init_toolbar = __esm({
8688
8888
  width: TOOLBAR_COLLAPSED_SHORT_PX,
8689
8889
  height: TOOLBAR_COLLAPSED_SHORT_PX
8690
8890
  });
8691
- const clampToViewport = (value, min, max) => Math.max(min, Math.min(value, max));
8891
+ const clampToViewport2 = (value, min, max) => Math.max(min, Math.min(value, max));
8692
8892
  const getVisualViewport = () => {
8693
8893
  const visualViewport = window.visualViewport;
8694
8894
  if (visualViewport) {
@@ -8721,7 +8921,7 @@ var init_toolbar = __esm({
8721
8921
  if (edge === "top" || edge === "bottom") {
8722
8922
  const xOffset = (expandedWidth - actualCollapsedWidth) / 2;
8723
8923
  const newExpandedX = collapsedPosition.x - xOffset;
8724
- const clampedX = clampToViewport(newExpandedX, viewport.offsetLeft + TOOLBAR_SNAP_MARGIN_PX, viewport.offsetLeft + viewportWidth - expandedWidth - TOOLBAR_SNAP_MARGIN_PX);
8924
+ const clampedX = clampToViewport2(newExpandedX, viewport.offsetLeft + TOOLBAR_SNAP_MARGIN_PX, viewport.offsetLeft + viewportWidth - expandedWidth - TOOLBAR_SNAP_MARGIN_PX);
8725
8925
  const newExpandedY = edge === "top" ? viewport.offsetTop + TOOLBAR_SNAP_MARGIN_PX : viewport.offsetTop + viewportHeight - expandedHeight - TOOLBAR_SNAP_MARGIN_PX;
8726
8926
  newPosition = {
8727
8927
  x: clampedX,
@@ -8730,7 +8930,7 @@ var init_toolbar = __esm({
8730
8930
  } else {
8731
8931
  const yOffset = (expandedHeight - actualCollapsedHeight) / 2;
8732
8932
  const newExpandedY = collapsedPosition.y - yOffset;
8733
- const clampedY = clampToViewport(newExpandedY, viewport.offsetTop + TOOLBAR_SNAP_MARGIN_PX, viewport.offsetTop + viewportHeight - expandedHeight - TOOLBAR_SNAP_MARGIN_PX);
8933
+ const clampedY = clampToViewport2(newExpandedY, viewport.offsetTop + TOOLBAR_SNAP_MARGIN_PX, viewport.offsetTop + viewportHeight - expandedHeight - TOOLBAR_SNAP_MARGIN_PX);
8734
8934
  const newExpandedX = edge === "left" ? viewport.offsetLeft + TOOLBAR_SNAP_MARGIN_PX : viewport.offsetLeft + viewportWidth - expandedWidth - TOOLBAR_SNAP_MARGIN_PX;
8735
8935
  newPosition = {
8736
8936
  x: newExpandedX,
@@ -8797,6 +8997,7 @@ var init_toolbar = __esm({
8797
8997
  };
8798
8998
  const handleToggle = createDragAwareHandler(() => props.onToggle?.());
8799
8999
  const handleComment = createDragAwareHandler(() => props.onComment?.());
9000
+ const handleRecent = createDragAwareHandler(() => props.onToggleRecent?.());
8800
9001
  const handleToggleCollapse = createDragAwareHandler(() => {
8801
9002
  const rect = containerRef?.getBoundingClientRect();
8802
9003
  const wasCollapsed = isCollapsed();
@@ -8839,7 +9040,61 @@ var init_toolbar = __esm({
8839
9040
  }
8840
9041
  }, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS);
8841
9042
  });
8842
- const handleToggleEnabled = createDragAwareHandler(() => props.onToggleEnabled?.());
9043
+ const handleToggleEnabled = createDragAwareHandler(() => {
9044
+ const isCurrentlyEnabled = Boolean(props.enabled);
9045
+ const edge = snapEdge();
9046
+ const preTogglePosition = position();
9047
+ const expandableWidth = lastKnownExpandableWidth;
9048
+ const shouldCompensatePosition = expandableWidth > 0 && edge !== "left";
9049
+ if (shouldCompensatePosition) {
9050
+ setIsToggleAnimating(true);
9051
+ }
9052
+ props.onToggleEnabled?.();
9053
+ if (expandableWidth > 0) {
9054
+ const widthChange = isCurrentlyEnabled ? -expandableWidth : expandableWidth;
9055
+ expandedDimensions = {
9056
+ width: expandedDimensions.width + widthChange,
9057
+ height: expandedDimensions.height
9058
+ };
9059
+ }
9060
+ if (shouldCompensatePosition) {
9061
+ const viewport = getVisualViewport();
9062
+ const positionOffset = isCurrentlyEnabled ? expandableWidth : -expandableWidth;
9063
+ const clampMin = viewport.offsetLeft + TOOLBAR_SNAP_MARGIN_PX;
9064
+ const clampMax = viewport.offsetLeft + viewport.width - expandedDimensions.width - TOOLBAR_SNAP_MARGIN_PX;
9065
+ const compensatedX = clampToViewport2(preTogglePosition.x + positionOffset, clampMin, clampMax);
9066
+ setPosition({
9067
+ x: compensatedX,
9068
+ y: preTogglePosition.y
9069
+ });
9070
+ clearTimeout(toggleAnimationTimeout);
9071
+ toggleAnimationTimeout = setTimeout(() => {
9072
+ setIsToggleAnimating(false);
9073
+ const newRatio = getRatioFromPosition(edge, position().x, position().y, expandedDimensions.width, expandedDimensions.height);
9074
+ setPositionRatio(newRatio);
9075
+ saveAndNotify({
9076
+ edge,
9077
+ ratio: newRatio,
9078
+ collapsed: isCollapsed(),
9079
+ enabled: !isCurrentlyEnabled
9080
+ });
9081
+ }, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS);
9082
+ } else if (!isCurrentlyEnabled && lastKnownExpandableWidth === 0) {
9083
+ clearTimeout(toggleAnimationTimeout);
9084
+ toggleAnimationTimeout = setTimeout(() => {
9085
+ if (expandableButtonsRef) {
9086
+ lastKnownExpandableWidth = expandableButtonsRef.offsetWidth;
9087
+ }
9088
+ const rect = containerRef?.getBoundingClientRect();
9089
+ if (rect) {
9090
+ expandedDimensions = {
9091
+ width: rect.width,
9092
+ height: rect.height
9093
+ };
9094
+ }
9095
+ }, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS);
9096
+ }
9097
+ });
8843
9098
  const getSnapPosition = (currentX, currentY, elementWidth, elementHeight, velocityX, velocityY) => {
8844
9099
  const viewport = getVisualViewport();
8845
9100
  const viewportWidth = viewport.width;
@@ -8986,7 +9241,7 @@ var init_toolbar = __esm({
8986
9241
  case "bottom": {
8987
9242
  const xOffset = (expandedWidth - collapsedWidth) / 2;
8988
9243
  const centeredX = pos.x + xOffset;
8989
- const clampedX = clampToViewport(centeredX, viewport.offsetLeft, viewport.offsetLeft + viewport.width - collapsedWidth);
9244
+ const clampedX = clampToViewport2(centeredX, viewport.offsetLeft, viewport.offsetLeft + viewport.width - collapsedWidth);
8990
9245
  return {
8991
9246
  x: clampedX,
8992
9247
  y: edge === "top" ? viewport.offsetTop : viewport.offsetTop + viewport.height - collapsedHeight
@@ -8996,7 +9251,7 @@ var init_toolbar = __esm({
8996
9251
  case "right": {
8997
9252
  const yOffset = (expandedHeight - collapsedHeight) / 2;
8998
9253
  const centeredY = pos.y + yOffset;
8999
- const clampedY = clampToViewport(centeredY, viewport.offsetTop, viewport.offsetTop + viewport.height - collapsedHeight);
9254
+ const clampedY = clampToViewport2(centeredY, viewport.offsetTop, viewport.offsetTop + viewport.height - collapsedHeight);
9000
9255
  return {
9001
9256
  x: edge === "left" ? viewport.offsetLeft : viewport.offsetLeft + viewport.width - collapsedWidth,
9002
9257
  y: clampedY
@@ -9025,6 +9280,8 @@ var init_toolbar = __esm({
9025
9280
  let resizeTimeout;
9026
9281
  let collapseAnimationTimeout;
9027
9282
  let snapAnimationTimeout;
9283
+ let toggleAnimationTimeout;
9284
+ let recentItemCountTimeout;
9028
9285
  const handleResize = () => {
9029
9286
  if (isDragging()) return;
9030
9287
  setIsResizing(true);
@@ -9049,6 +9306,9 @@ var init_toolbar = __esm({
9049
9306
  props.onStateChange?.(state);
9050
9307
  };
9051
9308
  onMount(() => {
9309
+ if (containerRef) {
9310
+ props.onContainerRef?.(containerRef);
9311
+ }
9052
9312
  const savedState = loadToolbarState();
9053
9313
  const rect = containerRef?.getBoundingClientRect();
9054
9314
  const viewport = getVisualViewport();
@@ -9085,9 +9345,12 @@ var init_toolbar = __esm({
9085
9345
  const defaultPosition = getPositionFromEdgeAndRatio("bottom", 0.5, expandedDimensions.width, expandedDimensions.height);
9086
9346
  setPosition(defaultPosition);
9087
9347
  }
9348
+ if (props.enabled && expandableButtonsRef) {
9349
+ lastKnownExpandableWidth = expandableButtonsRef.offsetWidth;
9350
+ }
9088
9351
  if (props.onSubscribeToStateChanges) {
9089
9352
  const unsubscribe = props.onSubscribeToStateChanges((state) => {
9090
- if (isCollapseAnimating()) return;
9353
+ if (isCollapseAnimating() || isToggleAnimating()) return;
9091
9354
  const rect2 = containerRef?.getBoundingClientRect();
9092
9355
  if (!rect2) return;
9093
9356
  const didCollapsedChange = isCollapsed() !== state.collapsed;
@@ -9102,18 +9365,14 @@ var init_toolbar = __esm({
9102
9365
  } = calculateExpandedPositionFromCollapsed(collapsedPos, state.edge);
9103
9366
  setPosition(newPos);
9104
9367
  setPositionRatio(newRatio);
9105
- if (collapseAnimationTimeout) {
9106
- clearTimeout(collapseAnimationTimeout);
9107
- }
9368
+ clearTimeout(collapseAnimationTimeout);
9108
9369
  collapseAnimationTimeout = setTimeout(() => {
9109
9370
  setIsCollapseAnimating(false);
9110
9371
  }, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS);
9111
9372
  } else {
9112
9373
  if (didCollapsedChange) {
9113
9374
  setIsCollapseAnimating(true);
9114
- if (collapseAnimationTimeout) {
9115
- clearTimeout(collapseAnimationTimeout);
9116
- }
9375
+ clearTimeout(collapseAnimationTimeout);
9117
9376
  collapseAnimationTimeout = setTimeout(() => {
9118
9377
  setIsCollapseAnimating(false);
9119
9378
  }, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS);
@@ -9142,18 +9401,12 @@ var init_toolbar = __esm({
9142
9401
  window.visualViewport?.removeEventListener("scroll", handleResize);
9143
9402
  window.removeEventListener("pointermove", handleWindowPointerMove);
9144
9403
  window.removeEventListener("pointerup", handleWindowPointerUp);
9145
- if (resizeTimeout) {
9146
- clearTimeout(resizeTimeout);
9147
- }
9148
- if (collapseAnimationTimeout) {
9149
- clearTimeout(collapseAnimationTimeout);
9150
- }
9151
- if (shakeTooltipTimeout) {
9152
- clearTimeout(shakeTooltipTimeout);
9153
- }
9154
- if (snapAnimationTimeout) {
9155
- clearTimeout(snapAnimationTimeout);
9156
- }
9404
+ clearTimeout(resizeTimeout);
9405
+ clearTimeout(collapseAnimationTimeout);
9406
+ clearTimeout(shakeTooltipTimeout);
9407
+ clearTimeout(snapAnimationTimeout);
9408
+ clearTimeout(toggleAnimationTimeout);
9409
+ clearTimeout(recentItemCountTimeout);
9157
9410
  unfreezeUpdatesCallback?.();
9158
9411
  });
9159
9412
  const currentPosition = () => {
@@ -9176,7 +9429,7 @@ var init_toolbar = __esm({
9176
9429
  if (isSnapping()) {
9177
9430
  return "transition-[transform,opacity] duration-300 ease-out";
9178
9431
  }
9179
- if (isCollapseAnimating()) {
9432
+ if (isCollapseAnimating() || isToggleAnimating()) {
9180
9433
  return "transition-[transform,opacity] duration-150 ease-out";
9181
9434
  }
9182
9435
  return "transition-opacity duration-300 ease-out";
@@ -9197,7 +9450,7 @@ var init_toolbar = __esm({
9197
9450
  }
9198
9451
  };
9199
9452
  return (() => {
9200
- var _el$ = _tmpl$27(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$5.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild, _el$1 = _el$8.nextSibling, _el$10 = _el$1.firstChild, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$3.nextSibling;
9453
+ var _el$ = _tmpl$29(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$5.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.firstChild, _el$16 = _el$15.firstChild, _el$17 = _el$3.nextSibling;
9201
9454
  _el$.$$pointerdown = handlePointerDown;
9202
9455
  var _ref$ = containerRef;
9203
9456
  typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
@@ -9227,23 +9480,25 @@ var init_toolbar = __esm({
9227
9480
  }
9228
9481
  };
9229
9482
  _el$2.addEventListener("animationend", () => setIsShaking(false));
9230
- _el$7.$$click = (event) => {
9483
+ var _ref$2 = expandableButtonsRef;
9484
+ typeof _ref$2 === "function" ? use(_ref$2, _el$5) : expandableButtonsRef = _el$5;
9485
+ _el$8.$$click = (event) => {
9231
9486
  setIsSelectTooltipVisible(false);
9232
9487
  handleToggle(event);
9233
9488
  };
9234
- addEventListener(_el$7, "mousedown", stopEventPropagation);
9235
- addEventListener(_el$7, "pointerdown", (event) => {
9489
+ addEventListener(_el$8, "mousedown", stopEventPropagation);
9490
+ addEventListener(_el$8, "pointerdown", (event) => {
9236
9491
  stopEventPropagation(event);
9237
9492
  handlePointerDown(event);
9238
9493
  });
9239
- spread(_el$7, mergeProps(() => createFreezeHandlers(setIsSelectTooltipVisible)), false, true);
9240
- insert(_el$7, createComponent(IconSelect, {
9494
+ spread(_el$8, mergeProps(() => createFreezeHandlers(setIsSelectTooltipVisible)), false, true);
9495
+ insert(_el$8, createComponent(IconSelect, {
9241
9496
  size: 14,
9242
9497
  get ["class"]() {
9243
9498
  return cn("transition-colors", getToolbarIconColor(Boolean(props.isActive) && !props.isCommentMode, Boolean(props.isCommentMode)));
9244
9499
  }
9245
9500
  }));
9246
- insert(_el$6, createComponent(Tooltip, {
9501
+ insert(_el$7, createComponent(Tooltip, {
9247
9502
  get visible() {
9248
9503
  return memo(() => !!isSelectTooltipVisible())() && !isCollapsed();
9249
9504
  },
@@ -9252,23 +9507,23 @@ var init_toolbar = __esm({
9252
9507
  },
9253
9508
  children: "Select"
9254
9509
  }), null);
9255
- _el$0.$$click = (event) => {
9510
+ _el$1.$$click = (event) => {
9256
9511
  setIsCommentTooltipVisible(false);
9257
9512
  handleComment(event);
9258
9513
  };
9259
- addEventListener(_el$0, "mousedown", stopEventPropagation);
9260
- addEventListener(_el$0, "pointerdown", (event) => {
9514
+ addEventListener(_el$1, "mousedown", stopEventPropagation);
9515
+ addEventListener(_el$1, "pointerdown", (event) => {
9261
9516
  stopEventPropagation(event);
9262
9517
  handlePointerDown(event);
9263
9518
  });
9264
- spread(_el$0, mergeProps(() => createFreezeHandlers(setIsCommentTooltipVisible)), false, true);
9265
- insert(_el$0, createComponent(IconComment, {
9519
+ spread(_el$1, mergeProps(() => createFreezeHandlers(setIsCommentTooltipVisible)), false, true);
9520
+ insert(_el$1, createComponent(IconComment, {
9266
9521
  size: 14,
9267
9522
  get ["class"]() {
9268
9523
  return cn("transition-colors", getToolbarIconColor(Boolean(props.isCommentMode), Boolean(props.isActive) && !props.isCommentMode));
9269
9524
  }
9270
9525
  }));
9271
- insert(_el$9, createComponent(Tooltip, {
9526
+ insert(_el$0, createComponent(Tooltip, {
9272
9527
  get visible() {
9273
9528
  return memo(() => !!isCommentTooltipVisible())() && !isCollapsed();
9274
9529
  },
@@ -9277,13 +9532,51 @@ var init_toolbar = __esm({
9277
9532
  },
9278
9533
  children: "Comment"
9279
9534
  }), null);
9280
- _el$10.addEventListener("mouseleave", () => setIsToggleTooltipVisible(false));
9281
- _el$10.addEventListener("mouseenter", () => setIsToggleTooltipVisible(true));
9282
- _el$10.$$click = (event) => {
9535
+ _el$12.$$click = (event) => {
9536
+ setIsRecentTooltipVisible(false);
9537
+ handleRecent(event);
9538
+ };
9539
+ addEventListener(_el$12, "mousedown", stopEventPropagation);
9540
+ addEventListener(_el$12, "pointerdown", (event) => {
9541
+ stopEventPropagation(event);
9542
+ handlePointerDown(event);
9543
+ });
9544
+ spread(_el$12, mergeProps(() => createFreezeHandlers(setIsRecentTooltipVisible, props.onRecentButtonHover)), false, true);
9545
+ insert(_el$12, createComponent(Show, {
9546
+ get when() {
9547
+ return props.hasUnreadRecentItems;
9548
+ },
9549
+ get fallback() {
9550
+ return createComponent(IconInbox, {
9551
+ size: 14,
9552
+ "class": "text-[#B3B3B3] transition-colors"
9553
+ });
9554
+ },
9555
+ get children() {
9556
+ return createComponent(IconInboxUnread, {
9557
+ size: 14,
9558
+ "class": "text-[#B3B3B3] transition-colors"
9559
+ });
9560
+ }
9561
+ }));
9562
+ insert(_el$11, createComponent(Tooltip, {
9563
+ get visible() {
9564
+ return memo(() => !!isRecentTooltipVisible())() && !isCollapsed();
9565
+ },
9566
+ get position() {
9567
+ return tooltipPosition();
9568
+ },
9569
+ get children() {
9570
+ return recentTooltipLabel();
9571
+ }
9572
+ }), null);
9573
+ _el$14.addEventListener("mouseleave", () => setIsToggleTooltipVisible(false));
9574
+ _el$14.addEventListener("mouseenter", () => setIsToggleTooltipVisible(true));
9575
+ _el$14.$$click = (event) => {
9283
9576
  setIsToggleTooltipVisible(false);
9284
9577
  handleToggleEnabled(event);
9285
9578
  };
9286
- insert(_el$1, createComponent(Tooltip, {
9579
+ insert(_el$13, createComponent(Tooltip, {
9287
9580
  get visible() {
9288
9581
  return memo(() => !!isToggleTooltipVisible())() && !isCollapsed();
9289
9582
  },
@@ -9294,8 +9587,9 @@ var init_toolbar = __esm({
9294
9587
  return props.enabled ? "Disable" : "Enable";
9295
9588
  }
9296
9589
  }), null);
9297
- addEventListener(_el$13, "click", handleToggleCollapse, true);
9298
- insert(_el$13, createComponent(IconChevron, {
9590
+ addEventListener(_el$17, "click", handleToggleCollapse, true);
9591
+ insert(_el$17, createComponent(IconChevron, {
9592
+ size: 14,
9299
9593
  get ["class"]() {
9300
9594
  return cn("text-[#B3B3B3] transition-transform duration-150", chevronRotation());
9301
9595
  }
@@ -9305,23 +9599,24 @@ var init_toolbar = __esm({
9305
9599
  return isShakeTooltipVisible();
9306
9600
  },
9307
9601
  get children() {
9308
- var _el$14 = _tmpl$21();
9309
- createRenderEffect(() => className(_el$14, cn("absolute left-1/2 -translate-x-1/2 whitespace-nowrap px-1.5 py-0.5 rounded-[10px] text-[10px] text-black/60 pointer-events-none animate-tooltip-fade-in [corner-shape:superellipse(1.25)]", PANEL_STYLES, tooltipPosition() === "top" ? "bottom-full mb-0.5" : "top-full mt-0.5")));
9310
- return _el$14;
9602
+ var _el$18 = _tmpl$28();
9603
+ createRenderEffect(() => className(_el$18, cn("absolute left-1/2 -translate-x-1/2 whitespace-nowrap px-1.5 py-0.5 rounded-[10px] text-[10px] text-black/60 pointer-events-none animate-tooltip-fade-in [corner-shape:superellipse(1.25)]", PANEL_STYLES, tooltipPosition() === "top" ? "bottom-full mb-0.5" : "top-full mt-0.5")));
9604
+ return _el$18;
9311
9605
  }
9312
9606
  }), null);
9313
9607
  createRenderEffect((_p$) => {
9314
- var _v$ = cn("fixed left-0 top-0 font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none", getCursorClass(), getTransitionClass(), isVisible() ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"), _v$2 = `translate(${currentPosition().x}px, ${currentPosition().y}px)`, _v$3 = getTransformOrigin(), _v$4 = cn("flex items-center justify-center rounded-[10px] antialiased transition-all duration-150 ease-out relative overflow-visible [font-synthesis:none] [corner-shape:superellipse(1.25)]", PANEL_STYLES, !isCollapsed() && "py-1.5 gap-1.5 px-2", collapsedEdgeClasses(), isShaking() && "animate-shake"), _v$5 = getTransformOrigin(), _v$6 = cn("grid transition-all duration-150 ease-out", isCollapsed() ? "grid-cols-[0fr] opacity-0 pointer-events-none" : "grid-cols-[1fr] opacity-100"), _v$7 = cn("grid transition-all duration-150 ease-out", props.enabled ? "grid-cols-[1fr] opacity-100" : "grid-cols-[0fr] opacity-0"), _v$8 = cn("grid transition-all duration-150 ease-out", props.enabled ? "grid-cols-[1fr] opacity-100" : "grid-cols-[0fr] opacity-0"), _v$9 = cn("relative w-5 h-3 rounded-full transition-colors", props.enabled ? "bg-black" : "bg-black/25"), _v$0 = cn("absolute top-0.5 w-2 h-2 rounded-full bg-white transition-transform", props.enabled ? "left-2.5" : "left-0.5");
9608
+ var _v$ = cn("fixed left-0 top-0 font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none", getCursorClass(), getTransitionClass(), isVisible() ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"), _v$2 = `translate(${currentPosition().x}px, ${currentPosition().y}px)`, _v$3 = getTransformOrigin(), _v$4 = cn("flex items-center justify-center rounded-[10px] antialiased transition-all duration-150 ease-out relative overflow-visible [font-synthesis:none] [corner-shape:superellipse(1.25)]", PANEL_STYLES, !isCollapsed() && "py-1.5 gap-1.5 px-2", collapsedEdgeClasses(), isShaking() && "animate-shake"), _v$5 = getTransformOrigin(), _v$6 = cn("grid transition-all duration-150 ease-out", isCollapsed() ? "grid-cols-[0fr] opacity-0 pointer-events-none" : "grid-cols-[1fr] opacity-100"), _v$7 = cn("grid transition-all duration-150 ease-out", props.enabled ? "grid-cols-[1fr] opacity-100" : "grid-cols-[0fr] opacity-0"), _v$8 = cn("grid transition-all duration-150 ease-out", props.enabled ? "grid-cols-[1fr] opacity-100" : "grid-cols-[0fr] opacity-0"), _v$9 = cn("grid transition-all duration-150 ease-out", props.enabled && (props.recentItemCount ?? 0) > 0 ? "grid-cols-[1fr] opacity-100" : "grid-cols-[0fr] opacity-0 pointer-events-none"), _v$0 = cn("relative w-5 h-3 rounded-full transition-colors", props.enabled ? "bg-black" : "bg-black/25"), _v$1 = cn("absolute top-0.5 w-2 h-2 rounded-full bg-white transition-transform", props.enabled ? "left-2.5" : "left-0.5");
9315
9609
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
9316
9610
  _v$2 !== _p$.t && setStyleProperty(_el$, "transform", _p$.t = _v$2);
9317
9611
  _v$3 !== _p$.a && setStyleProperty(_el$, "transform-origin", _p$.a = _v$3);
9318
9612
  _v$4 !== _p$.o && className(_el$2, _p$.o = _v$4);
9319
9613
  _v$5 !== _p$.i && setStyleProperty(_el$2, "transform-origin", _p$.i = _v$5);
9320
9614
  _v$6 !== _p$.n && className(_el$3, _p$.n = _v$6);
9321
- _v$7 !== _p$.s && className(_el$5, _p$.s = _v$7);
9322
- _v$8 !== _p$.h && className(_el$8, _p$.h = _v$8);
9323
- _v$9 !== _p$.r && className(_el$11, _p$.r = _v$9);
9324
- _v$0 !== _p$.d && className(_el$12, _p$.d = _v$0);
9615
+ _v$7 !== _p$.s && className(_el$6, _p$.s = _v$7);
9616
+ _v$8 !== _p$.h && className(_el$9, _p$.h = _v$8);
9617
+ _v$9 !== _p$.r && className(_el$10, _p$.r = _v$9);
9618
+ _v$0 !== _p$.d && className(_el$15, _p$.d = _v$0);
9619
+ _v$1 !== _p$.l && className(_el$16, _p$.l = _v$1);
9325
9620
  return _p$;
9326
9621
  }, {
9327
9622
  e: void 0,
@@ -9333,7 +9628,8 @@ var init_toolbar = __esm({
9333
9628
  s: void 0,
9334
9629
  h: void 0,
9335
9630
  r: void 0,
9336
- d: void 0
9631
+ d: void 0,
9632
+ l: void 0
9337
9633
  });
9338
9634
  return _el$;
9339
9635
  })();
@@ -9374,7 +9670,7 @@ var init_is_event_from_overlay = __esm({
9374
9670
  });
9375
9671
 
9376
9672
  // src/components/context-menu.tsx
9377
- var _tmpl$28, _tmpl$29, _tmpl$35, _tmpl$44, ContextMenu;
9673
+ var _tmpl$30, _tmpl$210, _tmpl$35, _tmpl$44, ContextMenu;
9378
9674
  var init_context_menu = __esm({
9379
9675
  "src/components/context-menu.tsx"() {
9380
9676
  "use strict";
@@ -9397,8 +9693,8 @@ var init_context_menu = __esm({
9397
9693
  init_get_tag_display();
9398
9694
  init_resolve_action_enabled();
9399
9695
  init_is_event_from_overlay();
9400
- _tmpl$28 = /* @__PURE__ */ template(`<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5">`);
9401
- _tmpl$29 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-context-menu class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-opacity duration-150 ease-out"style=z-index:2147483647;pointer-events:auto><div><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2">`);
9696
+ _tmpl$30 = /* @__PURE__ */ template(`<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5">`);
9697
+ _tmpl$210 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-context-menu class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-opacity duration-150 ease-out"style=z-index:2147483647;pointer-events:auto><div><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2">`);
9402
9698
  _tmpl$35 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
9403
9699
  _tmpl$44 = /* @__PURE__ */ template(`<button data-react-grab-ignore-events class="contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer transition-colors hover:bg-black/5 text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default disabled:hover:bg-transparent"><span class="text-[13px] leading-4 font-sans font-medium text-black">`);
9404
9700
  ContextMenu = (props) => {
@@ -9552,7 +9848,7 @@ var init_context_menu = __esm({
9552
9848
  return isVisible();
9553
9849
  },
9554
9850
  get children() {
9555
- var _el$ = _tmpl$29(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
9851
+ var _el$ = _tmpl$210(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
9556
9852
  _el$.$$contextmenu = handleMenuEvent;
9557
9853
  _el$.$$click = handleMenuEvent;
9558
9854
  _el$.$$mousedown = handleMenuEvent;
@@ -9592,7 +9888,7 @@ var init_context_menu = __esm({
9592
9888
  }));
9593
9889
  insert(_el$2, createComponent(BottomSection, {
9594
9890
  get children() {
9595
- var _el$4 = _tmpl$28();
9891
+ var _el$4 = _tmpl$30();
9596
9892
  insert(_el$4, createComponent(For, {
9597
9893
  get each() {
9598
9894
  return menuItems();
@@ -9646,67 +9942,415 @@ var init_context_menu = __esm({
9646
9942
  }
9647
9943
  });
9648
9944
 
9649
- // src/components/renderer.tsx
9650
- var _tmpl$30, ReactGrabRenderer;
9651
- var init_renderer = __esm({
9652
- "src/components/renderer.tsx"() {
9945
+ // src/utils/clamp-to-viewport.ts
9946
+ var clampToViewport;
9947
+ var init_clamp_to_viewport = __esm({
9948
+ "src/utils/clamp-to-viewport.ts"() {
9949
+ "use strict";
9950
+ clampToViewport = (value, elementSize, viewportSize, padding) => Math.max(padding, Math.min(value, viewportSize - elementSize - padding));
9951
+ }
9952
+ });
9953
+
9954
+ // src/components/icons/icon-trash.tsx
9955
+ var _tmpl$31, IconTrash;
9956
+ var init_icon_trash = __esm({
9957
+ "src/components/icons/icon-trash.tsx"() {
9958
+ "use strict";
9959
+ init_web();
9960
+ init_web();
9961
+ init_web();
9962
+ _tmpl$31 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M4.63751 20.1665L3.82444 6.75092L3.73431 5.06621C3.72513 4.89447 3.8619 4.75018 4.03388 4.75018H19.9945C20.1685 4.75018 20.306 4.89769 20.2938 5.07124L20.1756 6.75092L19.3625 20.1665C19.2745 21.618 18.0717 22.7502 16.6176 22.7502H7.38247C5.9283 22.7502 4.72548 21.618 4.63751 20.1665ZM8.74963 16.5002C8.74963 16.9144 9.08542 17.2502 9.49963 17.2502C9.91385 17.2502 10.2496 16.9144 10.2496 16.5002V10.5002C10.2496 10.086 9.91385 9.75018 9.49963 9.75018C9.08542 9.75018 8.74963 10.086 8.74963 10.5002V16.5002ZM14.4996 9.75018C14.9138 9.75018 15.2496 10.086 15.2496 10.5002V16.5002C15.2496 16.9144 14.9138 17.2502 14.4996 17.2502C14.0854 17.2502 13.7496 16.9144 13.7496 16.5002V10.5002C13.7496 10.086 14.0854 9.75018 14.4996 9.75018Z"></path><path fill-rule=evenodd clip-rule=evenodd d="M8.31879 2.46286C8.63394 1.7275 9.35702 1.2507 10.1571 1.2507H13.8383C14.6383 1.2507 15.3614 1.7275 15.6766 2.46286L16.6569 4.75034H19.2239C19.2903 4.75034 19.3523 4.75034 19.4102 4.7507H19.4637C19.4857 4.74973 19.5079 4.74972 19.5303 4.7507H20.9977C21.55 4.7507 21.9977 5.19842 21.9977 5.7507C21.9977 6.30299 21.55 6.7507 20.9977 6.7507H2.99768C2.4454 6.7507 1.99768 6.30299 1.99768 5.7507C1.99768 5.19842 2.4454 4.7507 2.99768 4.7507H4.46507C4.48746 4.74972 4.50968 4.74973 4.53167 4.7507H4.58469C4.6426 4.75034 4.70457 4.75034 4.77093 4.75034H7.33844L8.31879 2.46286ZM13.8903 3.37192L14.481 4.75034H9.5144L10.1052 3.37192C10.1367 3.29838 10.209 3.2507 10.289 3.2507L13.7064 3.2507C13.7864 3.2507 13.8587 3.29838 13.8903 3.37192Z">`);
9963
+ IconTrash = (props) => {
9964
+ const size = () => props.size ?? 14;
9965
+ return (() => {
9966
+ var _el$ = _tmpl$31();
9967
+ createRenderEffect((_p$) => {
9968
+ var _v$ = size(), _v$2 = size(), _v$3 = props.class;
9969
+ _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
9970
+ _v$2 !== _p$.t && setAttribute(_el$, "height", _p$.t = _v$2);
9971
+ _v$3 !== _p$.a && setAttribute(_el$, "class", _p$.a = _v$3);
9972
+ return _p$;
9973
+ }, {
9974
+ e: void 0,
9975
+ t: void 0,
9976
+ a: void 0
9977
+ });
9978
+ return _el$;
9979
+ })();
9980
+ };
9981
+ }
9982
+ });
9983
+
9984
+ // src/components/icons/icon-copy.tsx
9985
+ var _tmpl$36, IconCopy;
9986
+ var init_icon_copy = __esm({
9987
+ "src/components/icons/icon-copy.tsx"() {
9988
+ "use strict";
9989
+ init_web();
9990
+ init_web();
9991
+ init_web();
9992
+ _tmpl$36 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path d="M16.0549 8.25C17.4225 8.24998 18.5248 8.24996 19.3918 8.36652C20.2919 8.48754 21.0497 8.74643 21.6517 9.34835C22.2536 9.95027 22.5125 10.7081 22.6335 11.6083C22.75 12.4752 22.75 13.5775 22.75 14.9451V14.9451V16.0549V16.0549C22.75 17.4225 22.75 18.5248 22.6335 19.3918C22.5125 20.2919 22.2536 21.0497 21.6517 21.6517C21.0497 22.2536 20.2919 22.5125 19.3918 22.6335C18.5248 22.75 17.4225 22.75 16.0549 22.75H16.0549H14.9451H14.9451C13.5775 22.75 12.4752 22.75 11.6082 22.6335C10.7081 22.5125 9.95027 22.2536 9.34835 21.6516C8.74643 21.0497 8.48754 20.2919 8.36652 19.3918C8.24996 18.5248 8.24998 17.4225 8.25 16.0549V16.0549V14.9451V14.9451C8.24998 13.5775 8.24996 12.4752 8.36652 11.6082C8.48754 10.7081 8.74643 9.95027 9.34835 9.34835C9.95027 8.74643 10.7081 8.48754 11.6083 8.36652C12.4752 8.24996 13.5775 8.24998 14.9451 8.25H14.9451H16.0549H16.0549Z"></path><path d="M6.75 14.8569C6.74991 13.5627 6.74983 12.3758 6.8799 11.4084C7.0232 10.3425 7.36034 9.21504 8.28769 8.28769C9.21504 7.36034 10.3425 7.0232 11.4084 6.8799C12.3758 6.74983 13.5627 6.74991 14.8569 6.75L17.0931 6.75C17.3891 6.75 17.5371 6.75 17.6261 6.65419C17.7151 6.55838 17.7045 6.4142 17.6833 6.12584C17.6648 5.87546 17.6412 5.63892 17.6111 5.41544C17.4818 4.45589 17.2232 3.6585 16.6718 2.98663C16.4744 2.74612 16.2539 2.52558 16.0134 2.3282C15.3044 1.74638 14.4557 1.49055 13.4248 1.36868C12.4205 1.24998 11.1512 1.24999 9.54893 1.25H9.45109C7.84883 1.24999 6.57947 1.24998 5.57525 1.36868C4.54428 1.49054 3.69558 1.74638 2.98663 2.3282C2.74612 2.52558 2.52558 2.74612 2.3282 2.98663C1.74638 3.69558 1.49055 4.54428 1.36868 5.57525C1.24998 6.57947 1.24999 7.84882 1.25 9.45108V9.54891C1.24999 11.1512 1.24998 12.4205 1.36868 13.4247C1.49054 14.4557 1.74638 15.3044 2.3282 16.0134C2.52558 16.2539 2.74612 16.4744 2.98663 16.6718C3.6585 17.2232 4.45589 17.4818 5.41544 17.6111C5.63892 17.6412 5.87546 17.6648 6.12584 17.6833C6.4142 17.7045 6.55838 17.7151 6.65419 17.6261C6.75 17.5371 6.75 17.3891 6.75 17.0931V14.8569Z">`);
9993
+ IconCopy = (props) => {
9994
+ const size = () => props.size ?? 14;
9995
+ return (() => {
9996
+ var _el$ = _tmpl$36();
9997
+ createRenderEffect((_p$) => {
9998
+ var _v$ = size(), _v$2 = size(), _v$3 = props.class;
9999
+ _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
10000
+ _v$2 !== _p$.t && setAttribute(_el$, "height", _p$.t = _v$2);
10001
+ _v$3 !== _p$.a && setAttribute(_el$, "class", _p$.a = _v$3);
10002
+ return _p$;
10003
+ }, {
10004
+ e: void 0,
10005
+ t: void 0,
10006
+ a: void 0
10007
+ });
10008
+ return _el$;
10009
+ })();
10010
+ };
10011
+ }
10012
+ });
10013
+
10014
+ // src/components/recent-dropdown.tsx
10015
+ var _tmpl$37, _tmpl$211, _tmpl$38, _tmpl$45, DEFAULT_OFFSCREEN_POSITION2, ITEM_ACTION_CLASS, formatRelativeTime, RecentDropdown;
10016
+ var init_recent_dropdown = __esm({
10017
+ "src/components/recent-dropdown.tsx"() {
9653
10018
  "use strict";
9654
10019
  init_web();
9655
10020
  init_web();
9656
10021
  init_web();
9657
10022
  init_web();
9658
10023
  init_web();
10024
+ init_web();
10025
+ init_web();
10026
+ init_web();
9659
10027
  init_solid();
9660
10028
  init_constants();
9661
- init_build_open_file_url();
9662
- init_overlay_canvas();
9663
- init_selection_label();
9664
- init_toolbar();
9665
- init_context_menu();
9666
- _tmpl$30 = /* @__PURE__ */ template(`<div style="position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;transition:opacity 100ms ease-out;will-change:opacity;contain:strict;transform:translateZ(0)">`);
9667
- ReactGrabRenderer = (props) => {
9668
- return [createComponent(OverlayCanvas, {
9669
- get crosshairVisible() {
9670
- return props.crosshairVisible;
9671
- },
9672
- get mouseX() {
9673
- return props.mouseX;
9674
- },
9675
- get mouseY() {
9676
- return props.mouseY;
9677
- },
9678
- get selectionVisible() {
9679
- return props.selectionVisible;
9680
- },
9681
- get selectionBounds() {
9682
- return props.selectionBounds;
9683
- },
9684
- get selectionBoundsMultiple() {
9685
- return props.selectionBoundsMultiple;
9686
- },
9687
- get selectionShouldSnap() {
9688
- return props.selectionShouldSnap;
9689
- },
9690
- get selectionIsFading() {
9691
- return props.selectionLabelStatus === "fading";
9692
- },
9693
- get dragVisible() {
9694
- return props.dragVisible;
9695
- },
9696
- get dragBounds() {
9697
- return props.dragBounds;
9698
- },
9699
- get grabbedBoxes() {
9700
- return props.grabbedBoxes;
9701
- },
9702
- get agentSessions() {
9703
- return props.agentSessions;
9704
- },
9705
- get labelInstances() {
10029
+ init_clamp_to_viewport();
10030
+ init_cn();
10031
+ init_is_event_from_overlay();
10032
+ init_icon_trash();
10033
+ init_icon_copy();
10034
+ init_tooltip();
10035
+ _tmpl$37 = /* @__PURE__ */ template(`<div class="flex items-center gap-[5px]"><div class=relative><button data-react-grab-ignore-events data-react-grab-recent-clear class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-sm bg-[#FEF2F2] cursor-pointer transition-all hover:bg-[#FEE2E2] press-scale h-[17px] text-[#B91C1C]"></button></div><div class=relative><button data-react-grab-ignore-events data-react-grab-recent-copy-all class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] press-scale h-[17px] text-black/60"><span class="text-[11px] font-sans text-black/50">\u21B5`);
10036
+ _tmpl$211 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-recent-dropdown class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-opacity duration-150 ease-out"style=z-index:2147483647;pointer-events:auto><div><div class="contain-layout shrink-0 flex items-center justify-between px-2 pt-1.5 pb-1"><span class="text-[11px] font-medium text-black/40">Recent</span></div><div class="min-h-0 [border-top-width:0.5px] border-t-solid border-t-[#D9D9D9] px-2 py-1.5"><div class="flex flex-col max-h-[240px] overflow-y-auto -mx-2 -my-1.5"style="scrollbar-color:rgba(0,0,0,0.15) transparent">`);
10037
+ _tmpl$38 = /* @__PURE__ */ template(`<span class="text-[11px] leading-3 font-sans text-black/40 truncate mt-0.5">`);
10038
+ _tmpl$45 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-recent-item class="group contain-layout flex items-start justify-between w-full px-2 py-1 cursor-pointer transition-colors hover:bg-black/5 focus-within:bg-black/5 text-left gap-2"tabindex=0><span class="flex flex-col min-w-0 flex-1"><span class="text-[12px] leading-4 font-sans font-medium text-black truncate"></span></span><span class="shrink-0 grid"><span class="text-[10px] font-sans text-black/25 group-hover:invisible group-focus-within:invisible [grid-area:1/1] flex items-center justify-end"></span><span class="invisible group-hover:visible group-focus-within:visible [grid-area:1/1] flex items-center justify-end gap-1.5"><button data-react-grab-ignore-events data-react-grab-recent-item-remove></button><button data-react-grab-ignore-events data-react-grab-recent-item-copy>`);
10039
+ DEFAULT_OFFSCREEN_POSITION2 = {
10040
+ left: -9999,
10041
+ top: -9999
10042
+ };
10043
+ ITEM_ACTION_CLASS = "flex items-center justify-center cursor-pointer text-black/25 transition-colors press-scale";
10044
+ formatRelativeTime = (timestamp) => {
10045
+ const elapsedSeconds = Math.floor((Date.now() - timestamp) / 1e3);
10046
+ if (elapsedSeconds < 60) return "now";
10047
+ const elapsedMinutes = Math.floor(elapsedSeconds / 60);
10048
+ if (elapsedMinutes < 60) return `${elapsedMinutes}m`;
10049
+ const elapsedHours = Math.floor(elapsedMinutes / 60);
10050
+ if (elapsedHours < 24) return `${elapsedHours}h`;
10051
+ return `${Math.floor(elapsedHours / 24)}d`;
10052
+ };
10053
+ RecentDropdown = (props) => {
10054
+ let containerRef;
10055
+ const [measuredWidth, setMeasuredWidth] = createSignal(0);
10056
+ const [measuredHeight, setMeasuredHeight] = createSignal(0);
10057
+ const [activeHeaderTooltip, setActiveHeaderTooltip] = createSignal(null);
10058
+ const isVisible = () => props.position !== null;
10059
+ const measureContainer = () => {
10060
+ if (containerRef) {
10061
+ const rect = containerRef.getBoundingClientRect();
10062
+ setMeasuredWidth(rect.width);
10063
+ setMeasuredHeight(rect.height);
10064
+ }
10065
+ };
10066
+ createEffect(() => {
10067
+ if (isVisible()) {
10068
+ requestAnimationFrame(measureContainer);
10069
+ }
10070
+ });
10071
+ const computedPosition = () => {
10072
+ const anchor = props.position;
10073
+ const width = measuredWidth();
10074
+ const height = measuredHeight();
10075
+ if (!anchor || width === 0 || height === 0) {
10076
+ return DEFAULT_OFFSCREEN_POSITION2;
10077
+ }
10078
+ const {
10079
+ edge
10080
+ } = anchor;
10081
+ let rawLeft;
10082
+ let rawTop;
10083
+ if (edge === "left" || edge === "right") {
10084
+ rawLeft = edge === "left" ? anchor.x + DROPDOWN_ANCHOR_GAP_PX : anchor.x - width - DROPDOWN_ANCHOR_GAP_PX;
10085
+ rawTop = anchor.y - height / 2;
10086
+ } else {
10087
+ rawLeft = anchor.x - anchor.toolbarWidth / 2;
10088
+ rawTop = edge === "top" ? anchor.y + DROPDOWN_ANCHOR_GAP_PX : anchor.y - height - DROPDOWN_ANCHOR_GAP_PX;
10089
+ }
10090
+ return {
10091
+ left: clampToViewport(rawLeft, width, window.innerWidth, DROPDOWN_VIEWPORT_PADDING_PX),
10092
+ top: clampToViewport(rawTop, height, window.innerHeight, DROPDOWN_VIEWPORT_PADDING_PX)
10093
+ };
10094
+ };
10095
+ const clampedMaxWidth = () => Math.min(DROPDOWN_MAX_WIDTH_PX, window.innerWidth - computedPosition().left - DROPDOWN_VIEWPORT_PADDING_PX);
10096
+ const clampedMaxHeight = () => window.innerHeight - computedPosition().top - DROPDOWN_VIEWPORT_PADDING_PX;
10097
+ const panelMinWidth = () => Math.max(DROPDOWN_MIN_WIDTH_PX, props.position?.toolbarWidth ?? 0);
10098
+ const handleMenuEvent = (event) => {
10099
+ if (event.type === "contextmenu") {
10100
+ event.preventDefault();
10101
+ }
10102
+ event.stopImmediatePropagation();
10103
+ };
10104
+ onMount(() => {
10105
+ measureContainer();
10106
+ const handleClickOutside = (event) => {
10107
+ if (!isVisible() || isEventFromOverlay(event, "data-react-grab-ignore-events")) return;
10108
+ if (event instanceof MouseEvent && event.button === 2) return;
10109
+ props.onDismiss?.();
10110
+ };
10111
+ const handleKeyDown = (event) => {
10112
+ if (!isVisible()) return;
10113
+ if (event.code === "Escape") {
10114
+ event.preventDefault();
10115
+ event.stopPropagation();
10116
+ props.onDismiss?.();
10117
+ }
10118
+ if (event.code === "Enter" && props.items.length > 0) {
10119
+ event.preventDefault();
10120
+ event.stopPropagation();
10121
+ props.onCopyAll?.();
10122
+ }
10123
+ };
10124
+ const frameId = requestAnimationFrame(() => {
10125
+ window.addEventListener("mousedown", handleClickOutside, {
10126
+ capture: true
10127
+ });
10128
+ window.addEventListener("touchstart", handleClickOutside, {
10129
+ capture: true
10130
+ });
10131
+ });
10132
+ window.addEventListener("keydown", handleKeyDown, {
10133
+ capture: true
10134
+ });
10135
+ onCleanup(() => {
10136
+ cancelAnimationFrame(frameId);
10137
+ window.removeEventListener("mousedown", handleClickOutside, {
10138
+ capture: true
10139
+ });
10140
+ window.removeEventListener("touchstart", handleClickOutside, {
10141
+ capture: true
10142
+ });
10143
+ window.removeEventListener("keydown", handleKeyDown, {
10144
+ capture: true
10145
+ });
10146
+ });
10147
+ });
10148
+ return createComponent(Show, {
10149
+ get when() {
10150
+ return isVisible();
10151
+ },
10152
+ get children() {
10153
+ var _el$ = _tmpl$211(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$1 = _el$3.nextSibling, _el$10 = _el$1.firstChild;
10154
+ _el$.$$contextmenu = handleMenuEvent;
10155
+ _el$.$$click = handleMenuEvent;
10156
+ _el$.$$mousedown = handleMenuEvent;
10157
+ _el$.$$pointerdown = handleMenuEvent;
10158
+ var _ref$ = containerRef;
10159
+ typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
10160
+ insert(_el$3, createComponent(Show, {
10161
+ get when() {
10162
+ return props.items.length > 0;
10163
+ },
10164
+ get children() {
10165
+ var _el$5 = _tmpl$37(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$6.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild;
10166
+ _el$7.addEventListener("mouseleave", () => setActiveHeaderTooltip(null));
10167
+ _el$7.addEventListener("mouseenter", () => setActiveHeaderTooltip("clear"));
10168
+ _el$7.$$click = (event) => {
10169
+ event.stopPropagation();
10170
+ setActiveHeaderTooltip(null);
10171
+ props.onClearAll?.();
10172
+ };
10173
+ insert(_el$7, createComponent(IconTrash, {
10174
+ size: DROPDOWN_ICON_SIZE_PX
10175
+ }));
10176
+ insert(_el$6, createComponent(Tooltip, {
10177
+ get visible() {
10178
+ return activeHeaderTooltip() === "clear";
10179
+ },
10180
+ position: "top",
10181
+ children: "Clear all"
10182
+ }), null);
10183
+ _el$9.addEventListener("mouseleave", () => {
10184
+ setActiveHeaderTooltip(null);
10185
+ props.onCopyAllHover?.(false);
10186
+ });
10187
+ _el$9.addEventListener("mouseenter", () => {
10188
+ setActiveHeaderTooltip("copy");
10189
+ props.onCopyAllHover?.(true);
10190
+ });
10191
+ _el$9.$$click = (event) => {
10192
+ event.stopPropagation();
10193
+ setActiveHeaderTooltip(null);
10194
+ props.onCopyAll?.();
10195
+ };
10196
+ insert(_el$9, createComponent(IconCopy, {
10197
+ size: DROPDOWN_ICON_SIZE_PX
10198
+ }), _el$0);
10199
+ insert(_el$8, createComponent(Tooltip, {
10200
+ get visible() {
10201
+ return activeHeaderTooltip() === "copy";
10202
+ },
10203
+ position: "top",
10204
+ children: "Copy all"
10205
+ }), null);
10206
+ return _el$5;
10207
+ }
10208
+ }), null);
10209
+ insert(_el$10, createComponent(For, {
10210
+ get each() {
10211
+ return props.items;
10212
+ },
10213
+ children: (item) => (() => {
10214
+ var _el$11 = _tmpl$45(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$15 = _el$12.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling;
10215
+ _el$11.addEventListener("mouseleave", () => props.onItemHover?.(null));
10216
+ _el$11.addEventListener("mouseenter", () => props.onItemHover?.(item.id));
10217
+ _el$11.$$keydown = (event) => {
10218
+ if (event.code === "Space" && event.currentTarget === event.target) {
10219
+ event.preventDefault();
10220
+ event.stopPropagation();
10221
+ props.onSelectItem?.(item);
10222
+ }
10223
+ };
10224
+ _el$11.$$click = (event) => {
10225
+ event.stopPropagation();
10226
+ props.onSelectItem?.(item);
10227
+ };
10228
+ _el$11.$$pointerdown = (event) => event.stopPropagation();
10229
+ insert(_el$13, () => item.componentName ?? item.tagName);
10230
+ insert(_el$12, createComponent(Show, {
10231
+ get when() {
10232
+ return item.commentText;
10233
+ },
10234
+ get children() {
10235
+ var _el$14 = _tmpl$38();
10236
+ insert(_el$14, () => item.commentText);
10237
+ return _el$14;
10238
+ }
10239
+ }), null);
10240
+ insert(_el$16, () => formatRelativeTime(item.timestamp));
10241
+ _el$18.$$click = (event) => {
10242
+ event.stopPropagation();
10243
+ props.onRemoveItem?.(item);
10244
+ };
10245
+ insert(_el$18, createComponent(IconTrash, {
10246
+ size: DROPDOWN_ICON_SIZE_PX
10247
+ }));
10248
+ _el$19.$$click = (event) => {
10249
+ event.stopPropagation();
10250
+ props.onCopyItem?.(item);
10251
+ };
10252
+ insert(_el$19, createComponent(IconCopy, {
10253
+ size: DROPDOWN_ICON_SIZE_PX
10254
+ }));
10255
+ createRenderEffect((_p$) => {
10256
+ var _v$7 = cn(ITEM_ACTION_CLASS, "hover:text-[#B91C1C]"), _v$8 = cn(ITEM_ACTION_CLASS, "hover:text-black/60");
10257
+ _v$7 !== _p$.e && className(_el$18, _p$.e = _v$7);
10258
+ _v$8 !== _p$.t && className(_el$19, _p$.t = _v$8);
10259
+ return _p$;
10260
+ }, {
10261
+ e: void 0,
10262
+ t: void 0
10263
+ });
10264
+ return _el$11;
10265
+ })()
10266
+ }));
10267
+ createRenderEffect((_p$) => {
10268
+ var _v$ = `${computedPosition().top}px`, _v$2 = `${computedPosition().left}px`, _v$3 = cn("contain-layout flex flex-col rounded-[10px] antialiased w-fit h-fit overflow-hidden [font-synthesis:none] [corner-shape:superellipse(1.25)]", PANEL_STYLES), _v$4 = `${panelMinWidth()}px`, _v$5 = `${clampedMaxWidth()}px`, _v$6 = `${clampedMaxHeight()}px`;
10269
+ _v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
10270
+ _v$2 !== _p$.t && setStyleProperty(_el$, "left", _p$.t = _v$2);
10271
+ _v$3 !== _p$.a && className(_el$2, _p$.a = _v$3);
10272
+ _v$4 !== _p$.o && setStyleProperty(_el$2, "min-width", _p$.o = _v$4);
10273
+ _v$5 !== _p$.i && setStyleProperty(_el$2, "max-width", _p$.i = _v$5);
10274
+ _v$6 !== _p$.n && setStyleProperty(_el$2, "max-height", _p$.n = _v$6);
10275
+ return _p$;
10276
+ }, {
10277
+ e: void 0,
10278
+ t: void 0,
10279
+ a: void 0,
10280
+ o: void 0,
10281
+ i: void 0,
10282
+ n: void 0
10283
+ });
10284
+ return _el$;
10285
+ }
10286
+ });
10287
+ };
10288
+ delegateEvents(["pointerdown", "mousedown", "click", "contextmenu", "keydown"]);
10289
+ }
10290
+ });
10291
+
10292
+ // src/components/renderer.tsx
10293
+ var _tmpl$39, ReactGrabRenderer;
10294
+ var init_renderer = __esm({
10295
+ "src/components/renderer.tsx"() {
10296
+ "use strict";
10297
+ init_web();
10298
+ init_web();
10299
+ init_web();
10300
+ init_web();
10301
+ init_web();
10302
+ init_solid();
10303
+ init_constants();
10304
+ init_build_open_file_url();
10305
+ init_overlay_canvas();
10306
+ init_selection_label();
10307
+ init_toolbar();
10308
+ init_context_menu();
10309
+ init_recent_dropdown();
10310
+ _tmpl$39 = /* @__PURE__ */ template(`<div style="position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;transition:opacity 100ms ease-out;will-change:opacity;contain:strict;transform:translateZ(0)">`);
10311
+ ReactGrabRenderer = (props) => {
10312
+ return [createComponent(OverlayCanvas, {
10313
+ get crosshairVisible() {
10314
+ return props.crosshairVisible;
10315
+ },
10316
+ get mouseX() {
10317
+ return props.mouseX;
10318
+ },
10319
+ get mouseY() {
10320
+ return props.mouseY;
10321
+ },
10322
+ get selectionVisible() {
10323
+ return props.selectionVisible;
10324
+ },
10325
+ get selectionBounds() {
10326
+ return props.selectionBounds;
10327
+ },
10328
+ get selectionBoundsMultiple() {
10329
+ return props.selectionBoundsMultiple;
10330
+ },
10331
+ get selectionShouldSnap() {
10332
+ return props.selectionShouldSnap;
10333
+ },
10334
+ get selectionIsFading() {
10335
+ return props.selectionLabelStatus === "fading";
10336
+ },
10337
+ get dragVisible() {
10338
+ return props.dragVisible;
10339
+ },
10340
+ get dragBounds() {
10341
+ return props.dragBounds;
10342
+ },
10343
+ get grabbedBoxes() {
10344
+ return props.grabbedBoxes;
10345
+ },
10346
+ get agentSessions() {
10347
+ return props.agentSessions;
10348
+ },
10349
+ get labelInstances() {
9706
10350
  return props.labelInstances;
9707
10351
  }
9708
10352
  }), (() => {
9709
- var _el$ = _tmpl$30();
10353
+ var _el$ = _tmpl$39();
9710
10354
  setStyleProperty(_el$, "z-index", Z_INDEX_OVERLAY_CANVAS);
9711
10355
  setStyleProperty(_el$, "box-shadow", `inset 0 0 ${FROZEN_GLOW_EDGE_PX}px ${FROZEN_GLOW_COLOR}`);
9712
10356
  createRenderEffect((_$p) => setStyleProperty(_el$, "opacity", props.isFrozen ? 1 : 0));
@@ -9887,9 +10531,24 @@ var init_renderer = __esm({
9887
10531
  get status() {
9888
10532
  return instance().status;
9889
10533
  },
10534
+ get statusText() {
10535
+ return instance().statusText;
10536
+ },
10537
+ get hasAgent() {
10538
+ return Boolean(instance().statusText);
10539
+ },
10540
+ get isPromptMode() {
10541
+ return instance().isPromptMode;
10542
+ },
10543
+ get inputValue() {
10544
+ return instance().inputValue;
10545
+ },
9890
10546
  get error() {
9891
10547
  return instance().errorMessage;
9892
10548
  },
10549
+ get hideArrow() {
10550
+ return instance().hideArrow;
10551
+ },
9893
10552
  get onShowContextMenu() {
9894
10553
  return (instance().status === "copied" || instance().status === "fading") && instance().element && (document.body ?? document.documentElement).contains(instance().element) ? () => props.onShowContextMenuInstance?.(instance().id) : void 0;
9895
10554
  },
@@ -9933,6 +10592,21 @@ var init_renderer = __esm({
9933
10592
  },
9934
10593
  get onSelectHoverChange() {
9935
10594
  return props.onToolbarSelectHoverChange;
10595
+ },
10596
+ get onContainerRef() {
10597
+ return props.onToolbarRef;
10598
+ },
10599
+ get recentItemCount() {
10600
+ return props.recentItemCount;
10601
+ },
10602
+ get hasUnreadRecentItems() {
10603
+ return props.hasUnreadRecentItems;
10604
+ },
10605
+ get onToggleRecent() {
10606
+ return props.onToggleRecent;
10607
+ },
10608
+ get onRecentButtonHover() {
10609
+ return props.onRecentButtonHover;
9936
10610
  }
9937
10611
  });
9938
10612
  }
@@ -9966,6 +10640,37 @@ var init_renderer = __esm({
9966
10640
  return props.onContextMenuHide ?? (() => {
9967
10641
  });
9968
10642
  }
10643
+ }), createComponent(RecentDropdown, {
10644
+ get position() {
10645
+ return props.recentDropdownPosition ?? null;
10646
+ },
10647
+ get items() {
10648
+ return props.recentItems ?? [];
10649
+ },
10650
+ get onSelectItem() {
10651
+ return props.onRecentItemSelect;
10652
+ },
10653
+ get onRemoveItem() {
10654
+ return props.onRecentItemRemove;
10655
+ },
10656
+ get onCopyItem() {
10657
+ return props.onRecentItemCopy;
10658
+ },
10659
+ get onItemHover() {
10660
+ return props.onRecentItemHover;
10661
+ },
10662
+ get onCopyAll() {
10663
+ return props.onRecentCopyAll;
10664
+ },
10665
+ get onCopyAllHover() {
10666
+ return props.onRecentCopyAllHover;
10667
+ },
10668
+ get onClearAll() {
10669
+ return props.onRecentClear;
10670
+ },
10671
+ get onDismiss() {
10672
+ return props.onRecentDismiss;
10673
+ }
9969
10674
  })];
9970
10675
  };
9971
10676
  }
@@ -11022,20 +11727,18 @@ var init_events = __esm({
11022
11727
  });
11023
11728
 
11024
11729
  // src/utils/copy-content.ts
11025
- var LEXICAL_EDITOR_MIME_TYPE, REACT_GRAB_MIME_TYPE, generateUuid, createMentionNode, createTextNode, createLexicalClipboardData, copyContent;
11730
+ var LEXICAL_EDITOR_MIME_TYPE, REACT_GRAB_MIME_TYPE, generateUuid, createMentionNode, createTextNode, escapeHtml, createClipboardData, copyContent;
11026
11731
  var init_copy_content = __esm({
11027
11732
  "src/utils/copy-content.ts"() {
11028
11733
  "use strict";
11029
11734
  init_constants();
11030
11735
  LEXICAL_EDITOR_MIME_TYPE = "application/x-lexical-editor";
11031
11736
  REACT_GRAB_MIME_TYPE = "application/x-react-grab";
11032
- generateUuid = () => {
11033
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (char) => {
11034
- const random = Math.random() * 16 | 0;
11035
- const value = char === "x" ? random : random & 3 | 8;
11036
- return value.toString(16);
11037
- });
11038
- };
11737
+ generateUuid = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (character) => {
11738
+ const randomNibble = Math.random() * 16 | 0;
11739
+ const hexValue = character === "x" ? randomNibble : randomNibble & 3 | 8;
11740
+ return hexValue.toString(16);
11741
+ });
11039
11742
  createMentionNode = (displayName, mentionKey, typeaheadType, metadata) => ({
11040
11743
  detail: 1,
11041
11744
  format: 0,
@@ -11059,7 +11762,8 @@ var init_copy_content = __esm({
11059
11762
  type: "text",
11060
11763
  version: 1
11061
11764
  });
11062
- createLexicalClipboardData = (content, elementName) => {
11765
+ escapeHtml = (text) => text.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
11766
+ createClipboardData = (content, elementName) => {
11063
11767
  const mentionKey = String(Math.floor(Math.random() * 1e4));
11064
11768
  const namespaceUuid = generateUuid();
11065
11769
  const displayName = `<${elementName}>`;
@@ -11082,16 +11786,12 @@ var init_copy_content = __esm({
11082
11786
  selection: { type: 0 },
11083
11787
  selectedOption
11084
11788
  };
11085
- const escapedMentionMetadata = JSON.stringify(mentionMetadata).replace(
11086
- /"/g,
11087
- "&quot;"
11088
- );
11089
11789
  return {
11090
11790
  plainText: `@${displayName}
11091
11791
 
11092
11792
  ${content}
11093
11793
  `,
11094
- htmlContent: `<meta charset='utf-8'><span data-mention-key="${mentionKey}" data-lexical-mention="true" data-mention-name="${displayName}" data-typeahead-type="[object Object]" data-mention-metadata="${escapedMentionMetadata}">@${displayName}</span><pre><code>${content}</code></pre>`,
11794
+ htmlContent: `<meta charset='utf-8'><pre><code>${escapeHtml(content)}</code></pre>`,
11095
11795
  lexicalData: JSON.stringify({
11096
11796
  namespace: `chat-input${namespaceUuid}-pane`,
11097
11797
  nodes: [
@@ -11110,7 +11810,7 @@ ${content}`)
11110
11810
  };
11111
11811
  copyContent = (content, options) => {
11112
11812
  const elementName = options?.name ?? "div";
11113
- const { plainText, htmlContent, lexicalData } = createLexicalClipboardData(
11813
+ const { plainText, htmlContent, lexicalData } = createClipboardData(
11114
11814
  content,
11115
11815
  elementName
11116
11816
  );
@@ -11169,6 +11869,19 @@ var init_generate_snippet = __esm({
11169
11869
  }
11170
11870
  });
11171
11871
 
11872
+ // src/utils/join-snippets.ts
11873
+ var joinSnippets;
11874
+ var init_join_snippets = __esm({
11875
+ "src/utils/join-snippets.ts"() {
11876
+ "use strict";
11877
+ joinSnippets = (snippets) => {
11878
+ if (snippets.length <= 1) return snippets[0] ?? "";
11879
+ return snippets.map((snippet, index) => `[${index + 1}]
11880
+ ${snippet}`).join("\n\n");
11881
+ };
11882
+ }
11883
+ });
11884
+
11172
11885
  // src/core/copy.ts
11173
11886
  var tryCopyWithFallback;
11174
11887
  var init_copy = __esm({
@@ -11176,6 +11889,7 @@ var init_copy = __esm({
11176
11889
  "use strict";
11177
11890
  init_copy_content();
11178
11891
  init_generate_snippet();
11892
+ init_join_snippets();
11179
11893
  tryCopyWithFallback = async (options, hooks, elements, extraPrompt) => {
11180
11894
  let didCopy = false;
11181
11895
  let copiedContent = "";
@@ -11193,7 +11907,8 @@ var init_copy = __esm({
11193
11907
  (snippet, index) => snippet.trim() ? hooks.transformSnippet(snippet, elements[index]) : Promise.resolve("")
11194
11908
  )
11195
11909
  );
11196
- generatedContent = transformedSnippets.filter((s3) => s3.trim()).join("\n\n");
11910
+ const nonEmptySnippets = transformedSnippets.filter((s3) => s3.trim());
11911
+ generatedContent = joinSnippets(nonEmptySnippets);
11197
11912
  }
11198
11913
  if (generatedContent.trim()) {
11199
11914
  const transformedContent = await hooks.transformCopyContent(
@@ -11803,44 +12518,6 @@ var init_delay = __esm({
11803
12518
  }
11804
12519
  });
11805
12520
 
11806
- // src/utils/create-scroll-cycler.ts
11807
- var createScrollCycler;
11808
- var init_create_scroll_cycler = __esm({
11809
- "src/utils/create-scroll-cycler.ts"() {
11810
- "use strict";
11811
- createScrollCycler = (options) => {
11812
- const { thresholdPx, throttleMs, lineHeightPx, onStep } = options;
11813
- let accumulatedDelta = 0;
11814
- let currentDirection = null;
11815
- let lastStepTimestamp = 0;
11816
- const handleWheel = (event) => {
11817
- const primaryAxisDelta = Math.abs(event.deltaY) >= Math.abs(event.deltaX) ? event.deltaY : event.deltaX;
11818
- if (primaryAxisDelta === 0) return;
11819
- let normalizedDelta = primaryAxisDelta;
11820
- if (event.deltaMode === 1) {
11821
- normalizedDelta *= lineHeightPx;
11822
- } else if (event.deltaMode === 2) {
11823
- normalizedDelta *= window.innerHeight;
11824
- }
11825
- const direction = normalizedDelta > 0 ? 1 : -1;
11826
- if (currentDirection !== direction) {
11827
- currentDirection = direction;
11828
- accumulatedDelta = 0;
11829
- }
11830
- accumulatedDelta += Math.abs(normalizedDelta);
11831
- const now = Date.now();
11832
- if (now - lastStepTimestamp < throttleMs || accumulatedDelta < thresholdPx) {
11833
- return;
11834
- }
11835
- accumulatedDelta -= thresholdPx;
11836
- lastStepTimestamp = now;
11837
- onStep(direction < 0 ? "backward" : "forward");
11838
- };
11839
- return { handleWheel };
11840
- };
11841
- }
11842
- });
11843
-
11844
12521
  // src/core/theme.ts
11845
12522
  var DEFAULT_THEME, mergeThemeWithBase, deepMergeTheme;
11846
12523
  var init_theme = __esm({
@@ -12929,7 +13606,7 @@ var init_log_intro = __esm({
12929
13606
  init_is_extension_context();
12930
13607
  logIntro = () => {
12931
13608
  try {
12932
- const version = "0.1.13";
13609
+ const version = "0.1.14";
12933
13610
  const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
12934
13611
  console.log(
12935
13612
  `%cReact Grab${version ? ` v${version}` : ""}%c
@@ -13171,6 +13848,53 @@ var init_comment = __esm({
13171
13848
  }
13172
13849
  });
13173
13850
 
13851
+ // src/utils/recent-storage.ts
13852
+ var SESSION_STORAGE_KEY, loadFromSessionStorage, saveToSessionStorage, recentItems, generateRecentItemId, loadRecent, addRecentItem, removeRecentItem, clearRecent;
13853
+ var init_recent_storage = __esm({
13854
+ "src/utils/recent-storage.ts"() {
13855
+ "use strict";
13856
+ init_constants();
13857
+ SESSION_STORAGE_KEY = "react-grab-recent-items";
13858
+ loadFromSessionStorage = () => {
13859
+ try {
13860
+ const serializedRecentItems = sessionStorage.getItem(SESSION_STORAGE_KEY);
13861
+ if (!serializedRecentItems) return [];
13862
+ return JSON.parse(serializedRecentItems);
13863
+ } catch {
13864
+ return [];
13865
+ }
13866
+ };
13867
+ saveToSessionStorage = (items) => {
13868
+ try {
13869
+ sessionStorage.setItem(SESSION_STORAGE_KEY, JSON.stringify(items));
13870
+ } catch {
13871
+ }
13872
+ };
13873
+ recentItems = loadFromSessionStorage();
13874
+ generateRecentItemId = () => `recent-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
13875
+ loadRecent = () => recentItems;
13876
+ addRecentItem = (item) => {
13877
+ const newItem = {
13878
+ ...item,
13879
+ id: generateRecentItemId()
13880
+ };
13881
+ recentItems = [newItem, ...recentItems].slice(0, MAX_RECENT_ITEMS);
13882
+ saveToSessionStorage(recentItems);
13883
+ return recentItems;
13884
+ };
13885
+ removeRecentItem = (itemId) => {
13886
+ recentItems = recentItems.filter((item) => item.id !== itemId);
13887
+ saveToSessionStorage(recentItems);
13888
+ return recentItems;
13889
+ };
13890
+ clearRecent = () => {
13891
+ recentItems = [];
13892
+ saveToSessionStorage(recentItems);
13893
+ return recentItems;
13894
+ };
13895
+ }
13896
+ });
13897
+
13174
13898
  // src/core/index.tsx
13175
13899
  var core_exports = {};
13176
13900
  __export(core_exports, {
@@ -13220,7 +13944,6 @@ var init_core = __esm({
13220
13944
  init_is_screenshot_supported();
13221
13945
  init_delay();
13222
13946
  init_resolve_action_enabled();
13223
- init_create_scroll_cycler();
13224
13947
  init_theme();
13225
13948
  init_plugin_registry();
13226
13949
  init_agent();
@@ -13241,6 +13964,9 @@ var init_core = __esm({
13241
13964
  init_freeze_animations();
13242
13965
  init_freeze_pseudo_states();
13243
13966
  init_freeze_updates();
13967
+ init_recent_storage();
13968
+ init_copy_content();
13969
+ init_join_snippets();
13244
13970
  init_context();
13245
13971
  init_dist();
13246
13972
  init_theme();
@@ -13316,6 +14042,13 @@ var init_core = __esm({
13316
14042
  const [toolbarShakeCount, setToolbarShakeCount] = createSignal(0);
13317
14043
  const [currentToolbarState, setCurrentToolbarState] = createSignal(savedToolbarState);
13318
14044
  const [isToolbarSelectHovered, setIsToolbarSelectHovered] = createSignal(false);
14045
+ const [recentItems2, setRecentItems] = createSignal(loadRecent());
14046
+ const [recentDropdownPosition, setRecentDropdownPosition] = createSignal(null);
14047
+ let toolbarElement;
14048
+ let recentPositionFrameId = null;
14049
+ const recentElementMap = /* @__PURE__ */ new Map();
14050
+ const [hasUnreadRecentItems, setHasUnreadRecentItems] = createSignal(false);
14051
+ let recentHoverPreviews = [];
13319
14052
  const pendingAbortSessionId = createMemo(() => store.pendingAbortSessionId);
13320
14053
  const hasAgentProvider = createMemo(() => store.hasAgentProvider);
13321
14054
  const clearHoldTimer = () => {
@@ -13371,14 +14104,9 @@ var init_core = __esm({
13371
14104
  }
13372
14105
  previouslyHoldingKeys = currentlyHolding;
13373
14106
  });
13374
- const elementInputCache = /* @__PURE__ */ new WeakMap();
13375
- const loadCachedInput = (element) => {
13376
- const cachedInput = elementInputCache.get(element);
13377
- actions.setInputText(cachedInput ?? "");
13378
- };
13379
14107
  const preparePromptMode = (element, positionX, positionY) => {
13380
14108
  setCopyStartPosition(element, positionX, positionY);
13381
- loadCachedInput(element);
14109
+ actions.clearInputText();
13382
14110
  };
13383
14111
  const activatePromptMode = () => {
13384
14112
  const element = store.frozenElement || targetElement();
@@ -13418,6 +14146,7 @@ var init_core = __esm({
13418
14146
  let copyWaitingForConfirmation = false;
13419
14147
  let holdTimerFiredWaitingForConfirmation = false;
13420
14148
  let isScreenshotInProgress = false;
14149
+ let lastWindowFocusTimestamp = 0;
13421
14150
  let inToggleFeedbackPeriod = false;
13422
14151
  let toggleFeedbackTimerId = null;
13423
14152
  let actionCycleIdleTimeoutId = null;
@@ -13494,25 +14223,27 @@ var init_core = __esm({
13494
14223
  }
13495
14224
  }));
13496
14225
  };
13497
- const createLabelInstance = (bounds, tagName, componentName, status, element, mouseX, elements, boundsMultiple) => {
14226
+ const createLabelInstance = (bounds, tagName, componentName, status, options) => {
13498
14227
  actions.clearLabelInstances();
13499
14228
  const instanceId = `label-${Date.now()}-${Math.random().toString(36).slice(2)}`;
13500
14229
  const boundsCenterX = bounds.x + bounds.width / 2;
13501
14230
  const boundsHalfWidth = bounds.width / 2;
14231
+ const mouseX = options?.mouseX;
13502
14232
  const mouseXOffset = mouseX !== void 0 ? mouseX - boundsCenterX : void 0;
13503
14233
  const instance = {
13504
14234
  id: instanceId,
13505
14235
  bounds,
13506
- boundsMultiple,
14236
+ boundsMultiple: options?.boundsMultiple,
13507
14237
  tagName,
13508
14238
  componentName,
13509
14239
  status,
13510
14240
  createdAt: Date.now(),
13511
- element,
13512
- elements,
14241
+ element: options?.element,
14242
+ elements: options?.elements,
13513
14243
  mouseX,
13514
14244
  mouseXOffsetFromCenter: mouseXOffset,
13515
- mouseXOffsetRatio: mouseXOffset !== void 0 && boundsHalfWidth > 0 ? mouseXOffset / boundsHalfWidth : void 0
14245
+ mouseXOffsetRatio: mouseXOffset !== void 0 && boundsHalfWidth > 0 ? mouseXOffset / boundsHalfWidth : void 0,
14246
+ hideArrow: options?.hideArrow
13516
14247
  };
13517
14248
  actions.addLabelInstance(instance);
13518
14249
  return instanceId;
@@ -13556,7 +14287,11 @@ var init_core = __esm({
13556
14287
  const executeCopyOperation = async (positionX, positionY, operation, bounds, tagName, componentName, element, shouldDeactivateAfter, elements) => {
13557
14288
  inToggleFeedbackPeriod = false;
13558
14289
  actions.startCopy();
13559
- const instanceId = bounds && tagName ? createLabelInstance(bounds, tagName, componentName, "copying", element, positionX, elements) : null;
14290
+ const instanceId = bounds && tagName ? createLabelInstance(bounds, tagName, componentName, "copying", {
14291
+ element,
14292
+ mouseX: positionX,
14293
+ elements
14294
+ }) : null;
13560
14295
  await operation().finally(() => {
13561
14296
  actions.completeCopy(element);
13562
14297
  if (instanceId) {
@@ -13578,9 +14313,9 @@ var init_core = __esm({
13578
14313
  }
13579
14314
  });
13580
14315
  };
13581
- const copyWithFallback = (elements, extraPrompt) => {
14316
+ const copyWithFallback = (elements, extraPrompt, resolvedComponentName2) => {
13582
14317
  const firstElement = elements[0];
13583
- const componentName = firstElement ? getComponentDisplayName(firstElement) : null;
14318
+ const componentName = resolvedComponentName2 ?? (firstElement ? getComponentDisplayName(firstElement) : null);
13584
14319
  const tagName = firstElement ? getTagName(firstElement) : null;
13585
14320
  const elementName = componentName ?? tagName ?? void 0;
13586
14321
  return tryCopyWithFallback({
@@ -13592,11 +14327,50 @@ var init_core = __esm({
13592
14327
  transformSnippet: pluginRegistry.hooks.transformSnippet,
13593
14328
  transformCopyContent: pluginRegistry.hooks.transformCopyContent,
13594
14329
  onAfterCopy: pluginRegistry.hooks.onAfterCopy,
13595
- onCopySuccess: pluginRegistry.hooks.onCopySuccess,
14330
+ onCopySuccess: (copiedElements, content) => {
14331
+ pluginRegistry.hooks.onCopySuccess(copiedElements, content);
14332
+ const primaryElement = copiedElements[0];
14333
+ const isComment = Boolean(extraPrompt);
14334
+ if (primaryElement) {
14335
+ const currentItems = recentItems2();
14336
+ for (const [existingItemId, mappedElement] of recentElementMap.entries()) {
14337
+ if (mappedElement !== primaryElement) continue;
14338
+ const existingItem = currentItems.find((item) => item.id === existingItemId);
14339
+ if (!existingItem) continue;
14340
+ const shouldDedup = isComment ? existingItem.isComment && existingItem.commentText === extraPrompt : !existingItem.isComment;
14341
+ if (shouldDedup) {
14342
+ removeRecentItem(existingItemId);
14343
+ recentElementMap.delete(existingItemId);
14344
+ break;
14345
+ }
14346
+ }
14347
+ }
14348
+ const updatedRecentItems = addRecentItem({
14349
+ content,
14350
+ elementName: elementName ?? "element",
14351
+ tagName: tagName ?? "div",
14352
+ componentName: componentName ?? void 0,
14353
+ isComment,
14354
+ commentText: extraPrompt ?? void 0,
14355
+ timestamp: Date.now()
14356
+ });
14357
+ setRecentItems(updatedRecentItems);
14358
+ setHasUnreadRecentItems(true);
14359
+ const newestRecentItem = updatedRecentItems[0];
14360
+ if (newestRecentItem && primaryElement) {
14361
+ recentElementMap.set(newestRecentItem.id, primaryElement);
14362
+ }
14363
+ const currentItemIds = new Set(updatedRecentItems.map((item) => item.id));
14364
+ for (const mapItemId of recentElementMap.keys()) {
14365
+ if (!currentItemIds.has(mapItemId)) {
14366
+ recentElementMap.delete(mapItemId);
14367
+ }
14368
+ }
14369
+ },
13596
14370
  onCopyError: pluginRegistry.hooks.onCopyError
13597
14371
  }, elements, extraPrompt);
13598
14372
  };
13599
- const copyElementsToClipboard = async (targetElements, extraPrompt) => {
14373
+ const copyElementsToClipboard = async (targetElements, extraPrompt, resolvedComponentName2) => {
13600
14374
  if (targetElements.length === 0) return;
13601
14375
  for (const element of targetElements) {
13602
14376
  pluginRegistry.hooks.onElementSelect(element);
@@ -13605,7 +14379,7 @@ var init_core = __esm({
13605
14379
  }
13606
14380
  }
13607
14381
  await new Promise((resolve) => requestAnimationFrame(resolve));
13608
- await copyWithFallback(targetElements, extraPrompt);
14382
+ await copyWithFallback(targetElements, extraPrompt, resolvedComponentName2);
13609
14383
  void notifyElementsSelected(targetElements);
13610
14384
  };
13611
14385
  const performCopyWithLabel = ({
@@ -13629,7 +14403,7 @@ var init_core = __esm({
13629
14403
  const labelPositionX = allElements.length > 1 ? overlayBounds.x + overlayBounds.width / 2 : positionX;
13630
14404
  const tagName = getTagName(element);
13631
14405
  void getNearestComponentName(element).then((componentName) => {
13632
- void executeCopyOperation(labelPositionX, positionY, () => copyElementsToClipboard(allElements, extraPrompt), overlayBounds, tagName, componentName ?? void 0, element, shouldDeactivateAfter, elements).then(() => {
14406
+ void executeCopyOperation(labelPositionX, positionY, () => copyElementsToClipboard(allElements, extraPrompt, componentName ?? void 0), overlayBounds, tagName, componentName ?? void 0, element, shouldDeactivateAfter, elements).then(() => {
13633
14407
  onComplete?.();
13634
14408
  });
13635
14409
  });
@@ -14012,7 +14786,6 @@ var init_core = __esm({
14012
14786
  const currentY = firstBounds.y + firstBounds.height / 2;
14013
14787
  const labelPositionX = currentX + store.copyOffsetFromCenterX;
14014
14788
  if ((store.selectedAgent || hasAgentProvider()) && prompt) {
14015
- elementInputCache.delete(element);
14016
14789
  const currentReplySessionId = store.replySessionId;
14017
14790
  const selectedAgent = store.selectedAgent;
14018
14791
  deactivateRenderer();
@@ -14038,11 +14811,6 @@ var init_core = __esm({
14038
14811
  actions.exitPromptMode();
14039
14812
  actions.clearInputText();
14040
14813
  actions.clearReplySessionId();
14041
- if (prompt) {
14042
- elementInputCache.set(element, prompt);
14043
- } else {
14044
- elementInputCache.delete(element);
14045
- }
14046
14814
  performCopyWithLabel({
14047
14815
  element,
14048
14816
  positionX: labelPositionX,
@@ -14060,10 +14828,6 @@ var init_core = __esm({
14060
14828
  actions.setPendingDismiss(true);
14061
14829
  return;
14062
14830
  }
14063
- const element = store.frozenElement || targetElement();
14064
- if (element && currentInput) {
14065
- elementInputCache.set(element, currentInput);
14066
- }
14067
14831
  actions.clearInputText();
14068
14832
  actions.clearReplySessionId();
14069
14833
  deactivateRenderer();
@@ -14125,7 +14889,7 @@ var init_core = __esm({
14125
14889
  };
14126
14890
  const enterCommentModeForElement = (element, positionX, positionY) => {
14127
14891
  actions.setPendingCommentMode(false);
14128
- loadCachedInput(element);
14892
+ actions.clearInputText();
14129
14893
  actions.enterPromptMode({
14130
14894
  x: positionX,
14131
14895
  y: positionY
@@ -14163,6 +14927,7 @@ var init_core = __esm({
14163
14927
  if (isActivated()) {
14164
14928
  deactivateRenderer();
14165
14929
  }
14930
+ dismissRecentDropdown();
14166
14931
  if (toggleFeedbackTimerId !== null) {
14167
14932
  window.clearTimeout(toggleFeedbackTimerId);
14168
14933
  toggleFeedbackTimerId = null;
@@ -14372,6 +15137,7 @@ var init_core = __esm({
14372
15137
  };
14373
15138
  const handleEnterKeyActivation = (event) => {
14374
15139
  if (!isEnterCode(event.code)) return false;
15140
+ if (isKeyboardEventTriggeredByInput(event)) return false;
14375
15141
  const copiedElement = store.lastCopiedElement;
14376
15142
  const canActivateFromCopied = !isHoldingKeys() && !isPromptMode() && !isActivated() && copiedElement && isElementConnected(copiedElement) && !store.labelInstances.some((instance) => instance.status === "copied" || instance.status === "fading");
14377
15143
  if (canActivateFromCopied) {
@@ -14449,7 +15215,11 @@ var init_core = __esm({
14449
15215
  const shouldDeactivate = store.wasActivatedByToggle;
14450
15216
  const overlayBounds = createFlatOverlayBounds(bounds);
14451
15217
  const selectionBoundsArray = allBounds.length > 1 ? allBounds : singleBounds ? [singleBounds] : [];
14452
- const instanceId = createLabelInstance(overlayBounds, tagName, void 0, "copying", element ?? void 0, bounds.x + bounds.width / 2, void 0, selectionBoundsArray);
15218
+ const instanceId = createLabelInstance(overlayBounds, tagName, void 0, "copying", {
15219
+ element: element ?? void 0,
15220
+ mouseX: bounds.x + bounds.width / 2,
15221
+ boundsMultiple: selectionBoundsArray
15222
+ });
14453
15223
  isScreenshotInProgress = true;
14454
15224
  rendererRoot.style.visibility = "hidden";
14455
15225
  const elementsForScreenshot = store.frozenElements.length > 0 ? [...store.frozenElements] : element ? [element] : [];
@@ -14528,13 +15298,9 @@ var init_core = __esm({
14528
15298
  });
14529
15299
  };
14530
15300
  const availableActionCycleItems = createMemo(() => {
14531
- const element = selectionElement();
14532
- if (!element) return [];
14533
- const actionsById = new Map(pluginRegistry.store.actions.map((action) => [action.id, action]));
15301
+ if (!selectionElement()) return [];
14534
15302
  const cycleItems = [];
14535
- for (const actionId of ACTION_CYCLE_ACTION_IDS) {
14536
- const action = actionsById.get(actionId);
14537
- if (!action) continue;
15303
+ for (const action of pluginRegistry.store.actions) {
14538
15304
  const isStaticallyDisabled = typeof action.enabled === "boolean" && !action.enabled;
14539
15305
  if (isStaticallyDisabled) continue;
14540
15306
  cycleItems.push({
@@ -14570,33 +15336,23 @@ var init_core = __esm({
14570
15336
  }
14571
15337
  }, ACTION_CYCLE_IDLE_TRIGGER_MS);
14572
15338
  };
14573
- const applyActionCycleItems = (cycleItems, direction) => {
15339
+ const advanceActionCycle = () => {
15340
+ if (!canCycleActions()) return false;
15341
+ const cycleItems = availableActionCycleItems();
14574
15342
  if (cycleItems.length === 0) return false;
14575
15343
  setActionCycleItems(cycleItems);
14576
15344
  const currentIndex = actionCycleActiveIndex();
14577
15345
  const isCurrentIndexValid = currentIndex !== null && currentIndex < cycleItems.length;
14578
- const stepOffset = direction === "forward" ? 1 : -1;
14579
- let nextIndex;
14580
- if (!isCurrentIndexValid) {
14581
- nextIndex = direction === "forward" ? 0 : cycleItems.length - 1;
14582
- } else {
14583
- nextIndex = (currentIndex + stepOffset + cycleItems.length) % cycleItems.length;
14584
- }
15346
+ const nextIndex = isCurrentIndexValid ? (currentIndex + 1) % cycleItems.length : 0;
14585
15347
  setActionCycleActiveIndex(nextIndex);
14586
15348
  scheduleActionCycleActivation();
14587
15349
  return true;
14588
15350
  };
14589
- const handleActionCycleInput = (direction) => {
14590
- if (!canCycleActions()) return false;
14591
- const cycleItems = availableActionCycleItems();
14592
- if (cycleItems.length === 0) return false;
14593
- return applyActionCycleItems(cycleItems, direction);
14594
- };
14595
15351
  const handleActionCycleKey = (event) => {
14596
15352
  if (event.code !== "KeyC") return false;
14597
15353
  if (event.altKey || event.repeat) return false;
14598
15354
  if (isKeyboardEventTriggeredByInput(event)) return false;
14599
- if (!handleActionCycleInput("forward")) return false;
15355
+ if (!advanceActionCycle()) return false;
14600
15356
  event.preventDefault();
14601
15357
  event.stopPropagation();
14602
15358
  if (event.metaKey || event.ctrlKey) {
@@ -14604,23 +15360,6 @@ var init_core = __esm({
14604
15360
  }
14605
15361
  return true;
14606
15362
  };
14607
- const actionCycleScrollCycler = createScrollCycler({
14608
- thresholdPx: ACTION_CYCLE_SCROLL_THRESHOLD_PX,
14609
- throttleMs: ACTION_CYCLE_INPUT_THROTTLE_MS,
14610
- lineHeightPx: ACTION_CYCLE_SCROLL_LINE_HEIGHT_PX,
14611
- onStep: handleActionCycleInput
14612
- });
14613
- const handleActionCycleWheel = (event) => {
14614
- if (!canCycleActions()) return;
14615
- const isActionCycleActive = actionCycleActiveIndex() !== null;
14616
- if (!isActionCycleActive) {
14617
- const cycleItems = availableActionCycleItems();
14618
- if (cycleItems.length === 0) return;
14619
- }
14620
- event.preventDefault();
14621
- event.stopPropagation();
14622
- actionCycleScrollCycler.handleWheel(event);
14623
- };
14624
15363
  const handleActivationKeys = (event) => {
14625
15364
  if (!pluginRegistry.store.options.allowActivationInsideInput && isKeyboardEventTriggeredByInput(event)) {
14626
15365
  return;
@@ -14728,18 +15467,18 @@ var init_core = __esm({
14728
15467
  return;
14729
15468
  }
14730
15469
  }
14731
- if (handleActionCycleKey(event)) return;
15470
+ const didWindowJustRegainFocus = Date.now() - lastWindowFocusTimestamp < WINDOW_REFOCUS_GRACE_PERIOD_MS;
15471
+ if (!didWindowJustRegainFocus && handleActionCycleKey(event)) return;
14732
15472
  if (handleArrowNavigation(event)) return;
14733
15473
  if (handleEnterKeyActivation(event)) return;
14734
15474
  if (handleOpenFileShortcut(event)) return;
14735
15475
  if (handleScreenshotShortcut(event)) return;
14736
- handleActivationKeys(event);
15476
+ if (!didWindowJustRegainFocus) {
15477
+ handleActivationKeys(event);
15478
+ }
14737
15479
  }, {
14738
15480
  capture: true
14739
15481
  });
14740
- eventListenerManager.addWindowListener("wheel", handleActionCycleWheel, {
14741
- passive: false
14742
- });
14743
15482
  eventListenerManager.addWindowListener("keyup", (event) => {
14744
15483
  if (blockEnterIfNeeded(event)) return;
14745
15484
  const requiredModifiers = getRequiredModifiers(pluginRegistry.store.options);
@@ -14810,6 +15549,7 @@ var init_core = __esm({
14810
15549
  actions.setTouchMode(isTouchPointer);
14811
15550
  if (isEventFromOverlay(event, "data-react-grab-ignore-events")) return;
14812
15551
  if (store.contextMenuPosition !== null) return;
15552
+ if (isTouchPointer && !isHoldingKeys() && !isActivated()) return;
14813
15553
  const isActiveState = isTouchPointer ? isHoldingKeys() : isActivated();
14814
15554
  if (isActiveState && !isPromptMode() && isToggleFrozen()) {
14815
15555
  actions.unfreeze();
@@ -14880,6 +15620,7 @@ var init_core = __esm({
14880
15620
  actions.setPointer(position);
14881
15621
  actions.freeze();
14882
15622
  actions.showContextMenu(position, element);
15623
+ dismissRecentDropdown();
14883
15624
  pluginRegistry.hooks.onContextMenu(element, position);
14884
15625
  }, {
14885
15626
  capture: true
@@ -14919,7 +15660,11 @@ var init_core = __esm({
14919
15660
  }
14920
15661
  }
14921
15662
  });
15663
+ eventListenerManager.addWindowListener("focus", () => {
15664
+ lastWindowFocusTimestamp = Date.now();
15665
+ });
14922
15666
  const redetectElementUnderPointer = () => {
15667
+ if (store.isTouchMode && !isHoldingKeys() && !isActivated()) return;
14923
15668
  if (isEnabled() && !isPromptMode() && !isToggleFrozen() && !isDragging() && store.contextMenuPosition === null && store.frozenElements.length === 0) {
14924
15669
  const candidate = getElementAtPosition(store.pointer.x, store.pointer.y);
14925
15670
  actions.setDetectedElement(candidate);
@@ -15176,7 +15921,12 @@ var init_core = __esm({
15176
15921
  actions.hideContextMenu();
15177
15922
  if (labelBounds) {
15178
15923
  const labelPositionX = hasMultipleElements ? labelBounds.x + labelBounds.width / 2 : position.x;
15179
- const labelInstanceId = createLabelInstance(labelBounds, tagName || "element", componentName, "copying", element, labelPositionX, hasMultipleElements ? elements : void 0, selectionBoundsForLabel);
15924
+ const labelInstanceId = createLabelInstance(labelBounds, tagName || "element", componentName, "copying", {
15925
+ element,
15926
+ mouseX: labelPositionX,
15927
+ elements: hasMultipleElements ? elements : void 0,
15928
+ boundsMultiple: selectionBoundsForLabel
15929
+ });
15180
15930
  let didSucceed = false;
15181
15931
  let errorMessage;
15182
15932
  try {
@@ -15306,7 +16056,7 @@ var init_core = __esm({
15306
16056
  if (agent) {
15307
16057
  actions.setSelectedAgent(agent);
15308
16058
  }
15309
- loadCachedInput(element);
16059
+ actions.clearInputText();
15310
16060
  actions.enterPromptMode(position, element);
15311
16061
  deferHideContextMenu();
15312
16062
  }
@@ -15318,6 +16068,220 @@ var init_core = __esm({
15318
16068
  deactivateRenderer();
15319
16069
  }, 0);
15320
16070
  };
16071
+ const clearRecentHoverPreviews = () => {
16072
+ for (const {
16073
+ boxId,
16074
+ labelId
16075
+ } of recentHoverPreviews) {
16076
+ actions.removeGrabbedBox(boxId);
16077
+ if (labelId) {
16078
+ actions.removeLabelInstance(labelId);
16079
+ }
16080
+ }
16081
+ recentHoverPreviews = [];
16082
+ };
16083
+ const addRecentItemPreview = (item, element, idPrefix) => {
16084
+ const bounds = createElementBounds(element);
16085
+ const boxId = `${idPrefix}-${item.id}`;
16086
+ actions.addGrabbedBox({
16087
+ id: boxId,
16088
+ bounds,
16089
+ createdAt: 0,
16090
+ element
16091
+ });
16092
+ let labelId = null;
16093
+ if (item.isComment && item.commentText) {
16094
+ labelId = `${idPrefix}-label-${item.id}`;
16095
+ actions.addLabelInstance({
16096
+ id: labelId,
16097
+ bounds,
16098
+ tagName: item.tagName,
16099
+ componentName: item.componentName,
16100
+ status: "idle",
16101
+ isPromptMode: true,
16102
+ inputValue: item.commentText,
16103
+ createdAt: 0,
16104
+ element,
16105
+ mouseX: bounds.x + bounds.width / 2
16106
+ });
16107
+ }
16108
+ recentHoverPreviews.push({
16109
+ boxId,
16110
+ labelId
16111
+ });
16112
+ };
16113
+ const stopTrackingToolbarPosition = () => {
16114
+ if (recentPositionFrameId !== null) {
16115
+ cancelAnimationFrame(recentPositionFrameId);
16116
+ recentPositionFrameId = null;
16117
+ }
16118
+ };
16119
+ const getNearestEdge = (rect) => {
16120
+ const centerX = rect.left + rect.width / 2;
16121
+ const centerY = rect.top + rect.height / 2;
16122
+ const distanceToTop = centerY;
16123
+ const distanceToBottom = window.innerHeight - centerY;
16124
+ const distanceToLeft = centerX;
16125
+ const distanceToRight = window.innerWidth - centerX;
16126
+ const minimumDistance = Math.min(distanceToTop, distanceToBottom, distanceToLeft, distanceToRight);
16127
+ if (minimumDistance === distanceToTop) return "top";
16128
+ if (minimumDistance === distanceToLeft) return "left";
16129
+ if (minimumDistance === distanceToRight) return "right";
16130
+ return "bottom";
16131
+ };
16132
+ const startTrackingToolbarPosition = () => {
16133
+ stopTrackingToolbarPosition();
16134
+ const updatePosition = () => {
16135
+ if (!toolbarElement) return;
16136
+ const toolbarRect = toolbarElement.getBoundingClientRect();
16137
+ const edge = getNearestEdge(toolbarRect);
16138
+ let anchorX;
16139
+ let anchorY;
16140
+ if (edge === "left" || edge === "right") {
16141
+ anchorX = edge === "left" ? toolbarRect.right : toolbarRect.left;
16142
+ anchorY = toolbarRect.top + toolbarRect.height / 2;
16143
+ } else {
16144
+ anchorX = toolbarRect.left + toolbarRect.width / 2;
16145
+ anchorY = edge === "top" ? toolbarRect.bottom : toolbarRect.top;
16146
+ }
16147
+ setRecentDropdownPosition({
16148
+ x: anchorX,
16149
+ y: anchorY,
16150
+ edge,
16151
+ toolbarWidth: toolbarRect.width
16152
+ });
16153
+ recentPositionFrameId = requestAnimationFrame(updatePosition);
16154
+ };
16155
+ recentPositionFrameId = requestAnimationFrame(updatePosition);
16156
+ };
16157
+ const dismissRecentDropdown = () => {
16158
+ stopTrackingToolbarPosition();
16159
+ clearRecentHoverPreviews();
16160
+ setRecentDropdownPosition(null);
16161
+ };
16162
+ const handleToggleRecent = () => {
16163
+ const isCurrentlyOpen = recentDropdownPosition() !== null;
16164
+ if (isCurrentlyOpen) {
16165
+ dismissRecentDropdown();
16166
+ } else {
16167
+ clearRecentHoverPreviews();
16168
+ actions.hideContextMenu();
16169
+ setRecentItems(loadRecent());
16170
+ setHasUnreadRecentItems(false);
16171
+ startTrackingToolbarPosition();
16172
+ }
16173
+ };
16174
+ const copyRecentItemContent = (item) => {
16175
+ copyContent(item.content, {
16176
+ name: item.elementName
16177
+ });
16178
+ const element = recentElementMap.get(item.id);
16179
+ if (element && isElementConnected(element)) {
16180
+ const bounds = createElementBounds(element);
16181
+ const instanceId = createLabelInstance(bounds, item.tagName, item.componentName, "copied", {
16182
+ element,
16183
+ mouseX: bounds.x + bounds.width / 2
16184
+ });
16185
+ scheduleLabelFade(instanceId);
16186
+ }
16187
+ };
16188
+ const handleRecentItemSelect = (item) => {
16189
+ dismissRecentDropdown();
16190
+ const element = recentElementMap.get(item.id);
16191
+ if (item.isComment && item.commentText) {
16192
+ if (element && isElementConnected(element)) {
16193
+ const bounds = createElementBounds(element);
16194
+ const centerX = bounds.x + bounds.width / 2;
16195
+ const centerY = bounds.y + bounds.height / 2;
16196
+ actions.enterPromptMode({
16197
+ x: centerX,
16198
+ y: centerY
16199
+ }, element);
16200
+ actions.setInputText(item.commentText);
16201
+ } else {
16202
+ copyContent(item.content, {
16203
+ name: item.elementName
16204
+ });
16205
+ }
16206
+ } else {
16207
+ copyRecentItemContent(item);
16208
+ }
16209
+ };
16210
+ const handleRecentItemRemove = (item) => {
16211
+ clearRecentHoverPreviews();
16212
+ recentElementMap.delete(item.id);
16213
+ const updatedRecentItems = removeRecentItem(item.id);
16214
+ setRecentItems(updatedRecentItems);
16215
+ if (updatedRecentItems.length === 0) {
16216
+ setHasUnreadRecentItems(false);
16217
+ dismissRecentDropdown();
16218
+ }
16219
+ };
16220
+ const handleRecentCopyAll = () => {
16221
+ const currentRecentItems = recentItems2();
16222
+ if (currentRecentItems.length === 0) return;
16223
+ const combinedContent = joinSnippets(currentRecentItems.map((recentItem) => recentItem.content));
16224
+ const firstItem = currentRecentItems[0];
16225
+ copyContent(combinedContent, {
16226
+ name: firstItem.componentName ?? firstItem.tagName
16227
+ });
16228
+ dismissRecentDropdown();
16229
+ actions.clearLabelInstances();
16230
+ for (const recentItem of currentRecentItems) {
16231
+ const element = recentElementMap.get(recentItem.id);
16232
+ if (!element || !isElementConnected(element)) continue;
16233
+ const bounds = createElementBounds(element);
16234
+ const labelId = `label-${Date.now()}-${Math.random().toString(36).slice(2)}`;
16235
+ actions.addLabelInstance({
16236
+ id: labelId,
16237
+ bounds,
16238
+ tagName: recentItem.tagName,
16239
+ componentName: recentItem.componentName,
16240
+ status: "copied",
16241
+ createdAt: Date.now(),
16242
+ element,
16243
+ mouseX: bounds.x + bounds.width / 2
16244
+ });
16245
+ scheduleLabelFade(labelId);
16246
+ }
16247
+ };
16248
+ const handleRecentItemHover = (recentItemId) => {
16249
+ clearRecentHoverPreviews();
16250
+ if (recentItemId) {
16251
+ const item = recentItems2().find((innerItem) => innerItem.id === recentItemId);
16252
+ const element = recentElementMap.get(recentItemId);
16253
+ if (item && element && isElementConnected(element)) {
16254
+ addRecentItemPreview(item, element, "recent-hover");
16255
+ }
16256
+ }
16257
+ };
16258
+ const handleRecentButtonHover = (isHovered) => {
16259
+ clearRecentHoverPreviews();
16260
+ if (isHovered && recentDropdownPosition() === null) {
16261
+ showAllRecentItemPreviews();
16262
+ }
16263
+ };
16264
+ const handleRecentCopyAllHover = (isHovered) => {
16265
+ clearRecentHoverPreviews();
16266
+ if (isHovered) {
16267
+ showAllRecentItemPreviews();
16268
+ }
16269
+ };
16270
+ const showAllRecentItemPreviews = () => {
16271
+ for (const item of recentItems2()) {
16272
+ const element = recentElementMap.get(item.id);
16273
+ if (element && isElementConnected(element)) {
16274
+ addRecentItemPreview(item, element, "recent-all-hover");
16275
+ }
16276
+ }
16277
+ };
16278
+ const handleRecentClear = () => {
16279
+ recentElementMap.clear();
16280
+ const updatedRecentItems = clearRecent();
16281
+ setRecentItems(updatedRecentItems);
16282
+ setHasUnreadRecentItems(false);
16283
+ dismissRecentDropdown();
16284
+ };
15321
16285
  const handleShowContextMenuSession = (sessionId) => {
15322
16286
  const session = agentManager.sessions().get(sessionId);
15323
16287
  if (!session) return;
@@ -15514,6 +16478,9 @@ var init_core = __esm({
15514
16478
  };
15515
16479
  },
15516
16480
  onToolbarSelectHoverChange: setIsToolbarSelectHovered,
16481
+ onToolbarRef: (element) => {
16482
+ toolbarElement = element;
16483
+ },
15517
16484
  get contextMenuPosition() {
15518
16485
  return contextMenuPosition();
15519
16486
  },
@@ -15536,7 +16503,29 @@ var init_core = __esm({
15536
16503
  return contextMenuActionContext();
15537
16504
  },
15538
16505
  onContextMenuDismiss: handleContextMenuDismiss,
15539
- onContextMenuHide: deferHideContextMenu
16506
+ onContextMenuHide: deferHideContextMenu,
16507
+ get recentItems() {
16508
+ return recentItems2();
16509
+ },
16510
+ get recentItemCount() {
16511
+ return recentItems2().length;
16512
+ },
16513
+ get hasUnreadRecentItems() {
16514
+ return hasUnreadRecentItems();
16515
+ },
16516
+ get recentDropdownPosition() {
16517
+ return recentDropdownPosition();
16518
+ },
16519
+ onToggleRecent: handleToggleRecent,
16520
+ onRecentButtonHover: handleRecentButtonHover,
16521
+ onRecentItemSelect: handleRecentItemSelect,
16522
+ onRecentItemRemove: handleRecentItemRemove,
16523
+ onRecentItemCopy: copyRecentItemContent,
16524
+ onRecentItemHover: handleRecentItemHover,
16525
+ onRecentCopyAll: handleRecentCopyAll,
16526
+ onRecentCopyAllHover: handleRecentCopyAllHover,
16527
+ onRecentClear: handleRecentClear,
16528
+ onRecentDismiss: dismissRecentDropdown
15540
16529
  });
15541
16530
  }, rendererRoot);
15542
16531
  }
@@ -15649,6 +16638,7 @@ var init_core = __esm({
15649
16638
  },
15650
16639
  dispose: () => {
15651
16640
  hasInited = false;
16641
+ stopTrackingToolbarPosition();
15652
16642
  toolbarStateChangeCallbacks.clear();
15653
16643
  dispose2();
15654
16644
  },