react-grab 0.1.19 → 0.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.cjs CHANGED
@@ -1896,7 +1896,7 @@ var init_web = __esm({
1896
1896
  var styles_default;
1897
1897
  var init_styles = __esm({
1898
1898
  "dist/styles.css"() {
1899
- 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-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial;--tw-content:""}}}@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:44px;height:100%;min-height:44px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-top-0\\.5{top:calc(var(--spacing)*-.5)}.top-0{top:calc(var(--spacing)*0)}.top-0\\.5{top:calc(var(--spacing)*.5)}.top-1\\/2{top:50%}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.right-full{right:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-0\\.5{left:calc(var(--spacing)*.5)}.left-1\\.5{left:calc(var(--spacing)*1.5)}.left-1\\/2{left:50%}.left-2\\.5{left:calc(var(--spacing)*2.5)}.left-full{left:100%}.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)}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-2\\.5{margin-top:calc(var(--spacing)*2.5)}.mr-0\\.5{margin-right:calc(var(--spacing)*.5)}.mr-1\\.5{margin-right:calc(var(--spacing)*1.5)}.mr-2\\.5{margin-right:calc(var(--spacing)*2.5)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing)*2.5)}.-ml-\\[2px\\]{margin-left:-2px}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2\\.5{margin-left:calc(var(--spacing)*2.5)}.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}.inline-flex{display:inline-flex}.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-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.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-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.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}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.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)}.-translate-y-1\\/2{--tw-translate-y: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}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.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-\\[\\#404040\\]{background-color:#404040}.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-\\[\\#B91C1C\\]\\/50{color:oklab(50.542% .168942 .0880134/.5)}.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\\/80{color:#000c}@supports (color:color-mix(in lab, red, red)){.text-black\\/80{color:color-mix(in oklab,var(--color-black)80%,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-40{opacity:.4}.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)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.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-\\[grid-template-columns\\,opacity\\]{transition-property:grid-template-columns,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\,opacity\\]{transition-property:grid-template-rows,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;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)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.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}}.before\\:\\!min-h-full:before{content:var(--tw-content);min-height:100%!important}.before\\:\\!min-w-full:before{content:var(--tw-content);min-width:100%!important}.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)}}.hover\\:opacity-100:hover{opacity:1}}.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}@keyframes clock-flash{0%{transform:scale(1)}25%{transform:scale(1.2)}50%{transform:scale(.92)}75%{transform:scale(1.05)}to{transform:scale(1)}}.animate-clock-flash{will-change:transform;animation:.4s ease-out clock-flash}.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-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{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}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}';
1899
+ 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-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial;--tw-content:""}}}@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:44px;height:100%;min-height:44px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-top-0\\.5{top:calc(var(--spacing)*-.5)}.top-0{top:calc(var(--spacing)*0)}.top-0\\.5{top:calc(var(--spacing)*.5)}.top-1\\/2{top:50%}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.right-full{right:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-0\\.5{left:calc(var(--spacing)*.5)}.left-1\\.5{left:calc(var(--spacing)*1.5)}.left-1\\/2{left:50%}.left-2\\.5{left:calc(var(--spacing)*2.5)}.left-full{left:100%}.z-1{z-index:1}.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)}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-2\\.5{margin-top:calc(var(--spacing)*2.5)}.mr-0\\.5{margin-right:calc(var(--spacing)*.5)}.mr-1\\.5{margin-right:calc(var(--spacing)*1.5)}.mr-2\\.5{margin-right:calc(var(--spacing)*2.5)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing)*2.5)}.-ml-\\[2px\\]{margin-left:-2px}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2\\.5{margin-left:calc(var(--spacing)*2.5)}.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-block{display:inline-block}.inline-flex{display:inline-flex}.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-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.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-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.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}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.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)}.-translate-y-1\\/2{--tw-translate-y: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}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.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-\\[\\#404040\\]{background-color:#404040}.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-\\[\\#B91C1C\\]\\/50{color:oklab(50.542% .168942 .0880134/.5)}.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\\/80{color:#000c}@supports (color:color-mix(in lab, red, red)){.text-black\\/80{color:color-mix(in oklab,var(--color-black)80%,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-40{opacity:.4}.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)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.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-\\[grid-template-columns\\,opacity\\]{transition-property:grid-template-columns,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\,opacity\\]{transition-property:grid-template-rows,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[top\\,left\\,width\\,height\\,opacity\\]{transition-property:top,left,width,height,opacity;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-75{--tw-duration:75ms;transition-duration:75ms}.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)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.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}.\\[scrollbar-color\\:transparent_transparent\\]{scrollbar-color:transparent transparent}.\\[scrollbar-width\\:thin\\]{scrollbar-width:thin}.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}}.before\\:\\!min-h-full:before{content:var(--tw-content);min-height:100%!important}.before\\:\\!min-w-full:before{content:var(--tw-content);min-width:100%!important}@media (hover:hover){.hover\\:bg-\\[\\#F5F5F5\\]:hover{background-color:#f5f5f5}.hover\\:bg-\\[\\#FEE2E2\\]:hover{background-color:#fee2e2}.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)}}.hover\\:opacity-100:hover{opacity:1}.hover\\:\\[scrollbar-color\\:rgba\\(0\\,0\\,0\\,0\\.15\\)_transparent\\]:hover{scrollbar-color:#00000026 transparent}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}}: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}@keyframes clock-flash{0%{transform:scale(1)}25%{transform:scale(1.2)}50%{transform:scale(.92)}75%{transform:scale(1.05)}to{transform:scale(1)}}.animate-clock-flash{will-change:transform;animation:.4s ease-out clock-flash}.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-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{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}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}';
1900
1900
  }
1901
1901
  });
1902
1902
 
@@ -2148,11 +2148,11 @@ var init_store = __esm({
2148
2148
  });
2149
2149
 
2150
2150
  // src/constants.ts
2151
- 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, DEFERRED_EXECUTION_DELAY_MS, DEFAULT_KEY_HOLD_DURATION_MS, MIN_HOLD_FOR_ACTIVATION_AFTER_COPY_MS, RECENT_THRESHOLD_MS, FINDER_TIMEOUT_MS, SELECTOR_ATTR_VALUE_MAX_LENGTH_CHARS, 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_HOST, 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_TEXT_MAX_LENGTH, PREVIEW_ATTR_VALUE_MAX_LENGTH, PREVIEW_MAX_ATTRS, PREVIEW_PRIORITY_ATTRS, SYMBOLICATION_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, TOGGLE_ANIMATION_BUFFER_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_ARROW_NAVIGATION_HISTORY, MAX_MEMORY_SESSIONS, 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_HISTORY_ITEMS, MAX_SESSION_STORAGE_SIZE_BYTES, DROPDOWN_ANIMATION_DURATION_MS, DROPDOWN_HOVER_OPEN_DELAY_MS, DROPDOWN_VIEWPORT_PADDING_PX, DROPDOWN_ANCHOR_GAP_PX, SAFE_POLYGON_BUFFER_PX, DROPDOWN_ICON_SIZE_PX, DROPDOWN_MIN_WIDTH_PX, DROPDOWN_MAX_WIDTH_PX, TOOLBAR_MENU_MIN_WIDTH_PX, PANEL_STYLES, DROPDOWN_OFFSCREEN_POSITION, DROPDOWN_EDGE_TRANSFORM_ORIGIN, LOGO_SVG, NEXTJS_REVALIDATION_DELAY_MS, IME_COMPOSING_KEY_CODE, SELECTION_LABEL_OFFSCREEN_PX, RELEVANT_CSS_PROPERTIES;
2151
+ 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, DEFERRED_EXECUTION_DELAY_MS, DEFAULT_KEY_HOLD_DURATION_MS, MIN_HOLD_FOR_ACTIVATION_AFTER_COPY_MS, RECENT_THRESHOLD_MS, FINDER_TIMEOUT_MS, SELECTOR_ATTR_VALUE_MAX_LENGTH_CHARS, ACTION_CYCLE_IDLE_TRIGGER_MS, DRAG_THRESHOLD_PX, ELEMENT_DETECTION_THROTTLE_MS, PENDING_DETECTION_STALENESS_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_HOST, 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_TEXT_MAX_LENGTH, PREVIEW_ATTR_VALUE_MAX_LENGTH, PREVIEW_MAX_ATTRS, PREVIEW_PRIORITY_ATTRS, SYMBOLICATION_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, TOGGLE_ANIMATION_BUFFER_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_ARROW_NAVIGATION_HISTORY, MAX_MEMORY_SESSIONS, MAX_TRANSFORM_ANCESTOR_DEPTH, TRANSFORM_EARLY_BAIL_DEPTH, ELEMENT_POSITION_CACHE_DISTANCE_THRESHOLD_PX, ELEMENT_POSITION_THROTTLE_MS, POINTER_EVENTS_RESUME_DEBOUNCE_MS, VISIBILITY_CACHE_TTL_MS, ZOOM_DETECTION_THRESHOLD, MOUNT_ROOT_RECHECK_DELAY_MS, MAX_HISTORY_ITEMS, MAX_SESSION_STORAGE_SIZE_BYTES, DROPDOWN_ANIMATION_DURATION_MS, DROPDOWN_HOVER_OPEN_DELAY_MS, DROPDOWN_VIEWPORT_PADDING_PX, DROPDOWN_ANCHOR_GAP_PX, SAFE_POLYGON_BUFFER_PX, DROPDOWN_ICON_SIZE_PX, DROPDOWN_MIN_WIDTH_PX, DROPDOWN_MAX_WIDTH_PX, TOOLBAR_MENU_MIN_WIDTH_PX, PANEL_STYLES, DROPDOWN_OFFSCREEN_POSITION, DROPDOWN_EDGE_TRANSFORM_ORIGIN, LOGO_SVG, NEXTJS_REVALIDATION_DELAY_MS, IME_COMPOSING_KEY_CODE, SELECTION_LABEL_OFFSCREEN_PX, RELEVANT_CSS_PROPERTIES;
2152
2152
  var init_constants = __esm({
2153
2153
  "src/constants.ts"() {
2154
2154
  "use strict";
2155
- VERSION = "0.1.19";
2155
+ VERSION = "0.1.21";
2156
2156
  VIEWPORT_MARGIN_PX = 8;
2157
2157
  OFFSCREEN_POSITION = -1e3;
2158
2158
  SELECTION_LERP_FACTOR = 0.95;
@@ -2174,6 +2174,7 @@ var init_constants = __esm({
2174
2174
  ACTION_CYCLE_IDLE_TRIGGER_MS = 600;
2175
2175
  DRAG_THRESHOLD_PX = 2;
2176
2176
  ELEMENT_DETECTION_THROTTLE_MS = 32;
2177
+ PENDING_DETECTION_STALENESS_MS = 200;
2177
2178
  COMPONENT_NAME_DEBOUNCE_MS = 100;
2178
2179
  DRAG_PREVIEW_DEBOUNCE_MS = 32;
2179
2180
  BOUNDS_CACHE_TTL_MS = 16;
@@ -2257,6 +2258,7 @@ var init_constants = __esm({
2257
2258
  TRANSFORM_EARLY_BAIL_DEPTH = 3;
2258
2259
  ELEMENT_POSITION_CACHE_DISTANCE_THRESHOLD_PX = 2;
2259
2260
  ELEMENT_POSITION_THROTTLE_MS = 16;
2261
+ POINTER_EVENTS_RESUME_DEBOUNCE_MS = 100;
2260
2262
  VISIBILITY_CACHE_TTL_MS = 50;
2261
2263
  ZOOM_DETECTION_THRESHOLD = 0.01;
2262
2264
  MOUNT_ROOT_RECHECK_DELAY_MS = 1e3;
@@ -2540,6 +2542,46 @@ var init_is_element_connected = __esm({
2540
2542
  }
2541
2543
  });
2542
2544
 
2545
+ // src/utils/get-bounds-center.ts
2546
+ var getBoundsCenter;
2547
+ var init_get_bounds_center = __esm({
2548
+ "src/utils/get-bounds-center.ts"() {
2549
+ "use strict";
2550
+ getBoundsCenter = (bounds) => ({
2551
+ x: bounds.x + bounds.width / 2,
2552
+ y: bounds.y + bounds.height / 2
2553
+ });
2554
+ }
2555
+ });
2556
+
2557
+ // src/utils/recalculate-session-position.ts
2558
+ var recalculateSessionPosition;
2559
+ var init_recalculate_session_position = __esm({
2560
+ "src/utils/recalculate-session-position.ts"() {
2561
+ "use strict";
2562
+ init_get_bounds_center();
2563
+ recalculateSessionPosition = ({
2564
+ currentPosition,
2565
+ previousBounds,
2566
+ nextBounds
2567
+ }) => {
2568
+ if (!previousBounds || !nextBounds) {
2569
+ return currentPosition;
2570
+ }
2571
+ const previousBoundsCenter = getBoundsCenter(previousBounds);
2572
+ const nextBoundsCenter = getBoundsCenter(nextBounds);
2573
+ const previousBoundsHalfWidth = previousBounds.width / 2;
2574
+ const positionOffsetFromCenterX = currentPosition.x - previousBoundsCenter.x;
2575
+ const positionOffsetRatio = previousBoundsHalfWidth > 0 ? positionOffsetFromCenterX / previousBoundsHalfWidth : 0;
2576
+ const nextBoundsHalfWidth = nextBounds.width / 2;
2577
+ return {
2578
+ ...currentPosition,
2579
+ x: nextBoundsCenter.x + positionOffsetRatio * nextBoundsHalfWidth
2580
+ };
2581
+ };
2582
+ }
2583
+ });
2584
+
2543
2585
  // src/core/store.ts
2544
2586
  var createInitialStore, createGrabStore;
2545
2587
  var init_store2 = __esm({
@@ -2549,6 +2591,7 @@ var init_store2 = __esm({
2549
2591
  init_constants();
2550
2592
  init_create_element_bounds();
2551
2593
  init_is_element_connected();
2594
+ init_recalculate_session_position();
2552
2595
  createInitialStore = (input) => ({
2553
2596
  current: { state: "idle" },
2554
2597
  wasActivatedByToggle: false,
@@ -2948,19 +2991,11 @@ var init_store2 = __esm({
2948
2991
  if (isElementConnected(element)) {
2949
2992
  const newBounds = createElementBounds(element);
2950
2993
  const oldFirstBounds = session.selectionBounds[0];
2951
- let updatedPosition = session.position;
2952
- if (oldFirstBounds) {
2953
- const oldCenterX = oldFirstBounds.x + oldFirstBounds.width / 2;
2954
- const oldHalfWidth = oldFirstBounds.width / 2;
2955
- const offsetX = session.position.x - oldCenterX;
2956
- const offsetRatio = oldHalfWidth > 0 ? offsetX / oldHalfWidth : 0;
2957
- const newCenterX = newBounds.x + newBounds.width / 2;
2958
- const newHalfWidth = newBounds.width / 2;
2959
- updatedPosition = {
2960
- ...session.position,
2961
- x: newCenterX + offsetRatio * newHalfWidth
2962
- };
2963
- }
2994
+ const updatedPosition = recalculateSessionPosition({
2995
+ currentPosition: session.position,
2996
+ previousBounds: oldFirstBounds,
2997
+ nextBounds: newBounds
2998
+ });
2964
2999
  updatedSessions.set(sessionId, {
2965
3000
  ...session,
2966
3001
  selectionBounds: [newBounds],
@@ -3892,7 +3927,7 @@ var init_truncate_string = __esm({
3892
3927
  });
3893
3928
 
3894
3929
  // src/core/context.ts
3895
- var NEXT_INTERNAL_COMPONENT_NAMES, REACT_INTERNAL_COMPONENT_NAMES, cachedIsNextProject, checkIsNextProject, checkIsInternalComponentName, checkIsSourceComponentName, SERVER_COMPONENT_URL_PREFIXES, isServerComponentUrl, devirtualizeServerUrl, symbolicateServerFrames, extractServerFramesFromDebugStack, enrichServerFrameLocations, stackCache, fetchStackForElement, getStack, getNearestComponentName, resolveSourceFromStack, isUsefulComponentName, getComponentDisplayName, hasSourceFiles, getComponentNamesFromFiber, formatStackContext, getStackContext, getElementContext, getFallbackContext, truncateAttrValue, formatPriorityAttrs, getHTMLPreview;
3930
+ var NON_COMPONENT_PREFIXES, NEXT_INTERNAL_COMPONENT_NAMES, REACT_INTERNAL_COMPONENT_NAMES, cachedIsNextProject, checkIsNextProject, checkIsInternalComponentName, checkIsSourceComponentName, SERVER_COMPONENT_URL_PREFIXES, isServerComponentUrl, devirtualizeServerUrl, symbolicateServerFrames, extractServerFramesFromDebugStack, enrichServerFrameLocations, stackCache, fetchStackForElement, getStack, getNearestComponentName, resolveSourceFromStack, isUsefulComponentName, getComponentDisplayName, hasSourceFiles, getComponentNamesFromFiber, formatStackContext, getStackContext, getElementContext, getFallbackContext, truncateAttrValue, formatPriorityAttrs, getHTMLPreview;
3896
3931
  var init_context = __esm({
3897
3932
  "src/core/context.ts"() {
3898
3933
  "use strict";
@@ -3902,6 +3937,16 @@ var init_context = __esm({
3902
3937
  init_constants();
3903
3938
  init_get_tag_name();
3904
3939
  init_truncate_string();
3940
+ NON_COMPONENT_PREFIXES = /* @__PURE__ */ new Set([
3941
+ "_",
3942
+ "$",
3943
+ "motion.",
3944
+ "styled.",
3945
+ "chakra.",
3946
+ "ark.",
3947
+ "Primitive.",
3948
+ "Slot."
3949
+ ]);
3905
3950
  NEXT_INTERNAL_COMPONENT_NAMES = /* @__PURE__ */ new Set([
3906
3951
  "InnerLayoutRouter",
3907
3952
  "RedirectErrorBoundary",
@@ -3946,9 +3991,11 @@ var init_context = __esm({
3946
3991
  return cachedIsNextProject;
3947
3992
  };
3948
3993
  checkIsInternalComponentName = (name) => {
3949
- if (name.startsWith("_")) return true;
3950
3994
  if (NEXT_INTERNAL_COMPONENT_NAMES.has(name)) return true;
3951
3995
  if (REACT_INTERNAL_COMPONENT_NAMES.has(name)) return true;
3996
+ for (const prefix of NON_COMPONENT_PREFIXES) {
3997
+ if (name.startsWith(prefix)) return true;
3998
+ }
3952
3999
  return false;
3953
4000
  };
3954
4001
  checkIsSourceComponentName = (name) => {
@@ -8027,12 +8074,10 @@ var init_completion_view = __esm({
8027
8074
  return (() => {
8028
8075
  var _el$ = _tmpl$15();
8029
8076
  addEventListener(_el$, "click", (event) => {
8030
- event.stopPropagation();
8031
8077
  event.stopImmediatePropagation();
8032
8078
  props.onClick();
8033
8079
  });
8034
8080
  addEventListener(_el$, "pointerdown", (event) => {
8035
- event.stopPropagation();
8036
8081
  event.stopImmediatePropagation();
8037
8082
  });
8038
8083
  insert(_el$, createComponent(IconEllipsis, {
@@ -8084,7 +8129,6 @@ var init_completion_view = __esm({
8084
8129
  const isEnterWithoutShift = event.code === "Enter" && !event.shiftKey;
8085
8130
  const isEscape = event.code === "Escape";
8086
8131
  if (!isUndoRedo) {
8087
- event.stopPropagation();
8088
8132
  event.stopImmediatePropagation();
8089
8133
  }
8090
8134
  if (isEnterWithoutShift) {
@@ -8291,8 +8335,166 @@ var init_completion_view = __esm({
8291
8335
  }
8292
8336
  });
8293
8337
 
8338
+ // src/utils/create-menu-highlight.ts
8339
+ var DEFAULT_HIDDEN_OPACITY, DEFAULT_VISIBLE_OPACITY, createAnimatedBoundsFollower, createMenuHighlight;
8340
+ var init_create_menu_highlight = __esm({
8341
+ "src/utils/create-menu-highlight.ts"() {
8342
+ "use strict";
8343
+ DEFAULT_HIDDEN_OPACITY = "0";
8344
+ DEFAULT_VISIBLE_OPACITY = "1";
8345
+ createAnimatedBoundsFollower = ({
8346
+ hiddenOpacity = DEFAULT_HIDDEN_OPACITY,
8347
+ visibleOpacity = DEFAULT_VISIBLE_OPACITY
8348
+ } = {}) => {
8349
+ let containerElement;
8350
+ let followerElement;
8351
+ const hideFollower = () => {
8352
+ if (!followerElement) return;
8353
+ followerElement.style.opacity = hiddenOpacity;
8354
+ };
8355
+ const followElement = (targetElement) => {
8356
+ if (!followerElement || !containerElement) return;
8357
+ if (!targetElement) {
8358
+ hideFollower();
8359
+ return;
8360
+ }
8361
+ const containerRect = containerElement.getBoundingClientRect();
8362
+ const targetRect = targetElement.getBoundingClientRect();
8363
+ const targetTopWithinContainer = targetRect.top - containerRect.top + containerElement.scrollTop;
8364
+ const targetLeftWithinContainer = targetRect.left - containerRect.left + containerElement.scrollLeft;
8365
+ followerElement.style.opacity = visibleOpacity;
8366
+ followerElement.style.top = `${targetTopWithinContainer}px`;
8367
+ followerElement.style.left = `${targetLeftWithinContainer}px`;
8368
+ followerElement.style.width = `${targetRect.width}px`;
8369
+ followerElement.style.height = `${targetRect.height}px`;
8370
+ };
8371
+ const setContainerRef = (containerNode) => {
8372
+ containerElement = containerNode;
8373
+ };
8374
+ const setFollowerRef = (followerNode) => {
8375
+ followerElement = followerNode;
8376
+ };
8377
+ return {
8378
+ containerRef: setContainerRef,
8379
+ followerRef: setFollowerRef,
8380
+ followElement,
8381
+ hideFollower
8382
+ };
8383
+ };
8384
+ createMenuHighlight = () => {
8385
+ const {
8386
+ containerRef,
8387
+ followerRef: highlightRef,
8388
+ followElement: updateHighlight,
8389
+ hideFollower: clearHighlight
8390
+ } = createAnimatedBoundsFollower();
8391
+ return {
8392
+ containerRef,
8393
+ highlightRef,
8394
+ updateHighlight,
8395
+ clearHighlight
8396
+ };
8397
+ };
8398
+ }
8399
+ });
8400
+
8401
+ // src/components/selection-label/arrow-navigation-menu.tsx
8402
+ var _tmpl$16, _tmpl$26, _tmpl$34, ArrowNavigationMenu;
8403
+ var init_arrow_navigation_menu = __esm({
8404
+ "src/components/selection-label/arrow-navigation-menu.tsx"() {
8405
+ "use strict";
8406
+ init_web();
8407
+ init_web();
8408
+ init_web();
8409
+ init_web();
8410
+ init_web();
8411
+ init_web();
8412
+ init_web();
8413
+ init_web();
8414
+ init_solid();
8415
+ init_create_menu_highlight();
8416
+ init_bottom_section();
8417
+ _tmpl$16 = /* @__PURE__ */ template(`<div class="relative flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">`);
8418
+ _tmpl$26 = /* @__PURE__ */ template(`<span class=text-black/40>.`);
8419
+ _tmpl$34 = /* @__PURE__ */ template(`<button data-react-grab-ignore-events class="relative z-1 contain-layout flex items-center w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent"><span class="text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0 transition-colors">`);
8420
+ ArrowNavigationMenu = (props) => {
8421
+ const {
8422
+ containerRef: highlightContainerRef,
8423
+ highlightRef,
8424
+ updateHighlight,
8425
+ clearHighlight
8426
+ } = createMenuHighlight();
8427
+ let itemRefs = [];
8428
+ createEffect(() => {
8429
+ const itemRef = itemRefs[props.activeIndex];
8430
+ if (itemRef) {
8431
+ updateHighlight(itemRef);
8432
+ }
8433
+ });
8434
+ return createComponent(BottomSection, {
8435
+ get children() {
8436
+ var _el$ = _tmpl$16(), _el$2 = _el$.firstChild;
8437
+ use(highlightContainerRef, _el$);
8438
+ use(highlightRef, _el$2);
8439
+ insert(_el$, createComponent(For, {
8440
+ get each() {
8441
+ return props.items;
8442
+ },
8443
+ children: (item, itemIndex) => (() => {
8444
+ var _el$3 = _tmpl$34(), _el$4 = _el$3.firstChild;
8445
+ _el$3.$$click = (event) => {
8446
+ event.stopPropagation();
8447
+ props.onSelect(itemIndex());
8448
+ };
8449
+ _el$3.addEventListener("pointerleave", () => {
8450
+ const activeRef = itemRefs[props.activeIndex];
8451
+ if (activeRef) {
8452
+ updateHighlight(activeRef);
8453
+ } else {
8454
+ clearHighlight();
8455
+ }
8456
+ });
8457
+ _el$3.addEventListener("pointerenter", (event) => {
8458
+ updateHighlight(event.currentTarget);
8459
+ props.onSelect(itemIndex());
8460
+ });
8461
+ _el$3.$$pointerdown = (event) => event.stopPropagation();
8462
+ use((element) => {
8463
+ itemRefs[itemIndex()] = element;
8464
+ }, _el$3);
8465
+ insert(_el$4, createComponent(Show, {
8466
+ get when() {
8467
+ return item.componentName;
8468
+ },
8469
+ get children() {
8470
+ return [memo(() => item.componentName), _tmpl$26()];
8471
+ }
8472
+ }), null);
8473
+ insert(_el$4, () => item.tagName, null);
8474
+ createRenderEffect((_p$) => {
8475
+ var _v$ = item.tagName, _v$2 = !!(itemIndex() === props.activeIndex), _v$3 = !!(itemIndex() !== props.activeIndex);
8476
+ _v$ !== _p$.e && setAttribute(_el$3, "data-react-grab-arrow-nav-item", _p$.e = _v$);
8477
+ _v$2 !== _p$.t && _el$4.classList.toggle("text-black", _p$.t = _v$2);
8478
+ _v$3 !== _p$.a && _el$4.classList.toggle("text-black/30", _p$.a = _v$3);
8479
+ return _p$;
8480
+ }, {
8481
+ e: void 0,
8482
+ t: void 0,
8483
+ a: void 0
8484
+ });
8485
+ return _el$3;
8486
+ })()
8487
+ }), null);
8488
+ return _el$;
8489
+ }
8490
+ });
8491
+ };
8492
+ delegateEvents(["pointerdown", "click"]);
8493
+ }
8494
+ });
8495
+
8294
8496
  // src/components/selection-label/index.tsx
8295
- 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;
8497
+ var _tmpl$17, _tmpl$27, _tmpl$35, _tmpl$43, _tmpl$53, _tmpl$63, _tmpl$73, _tmpl$83, _tmpl$92, _tmpl$0, _tmpl$1, _tmpl$102, DEFAULT_OFFSCREEN_POSITION, SelectionLabel;
8296
8498
  var init_selection_label = __esm({
8297
8499
  "src/components/selection-label/index.tsx"() {
8298
8500
  "use strict";
@@ -8306,6 +8508,7 @@ var init_selection_label = __esm({
8306
8508
  init_web();
8307
8509
  init_web();
8308
8510
  init_web();
8511
+ init_web();
8309
8512
  init_solid();
8310
8513
  init_constants();
8311
8514
  init_get_arrow_size();
@@ -8322,11 +8525,12 @@ var init_selection_label = __esm({
8322
8525
  init_discard_prompt();
8323
8526
  init_error_view();
8324
8527
  init_completion_view();
8325
- _tmpl$16 = /* @__PURE__ */ template(`<button data-react-grab-ignore-events data-react-grab-abort class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-black cursor-pointer ml-1 interactive-scale"><div class="size-1.5 bg-white rounded-[1px]">`);
8326
- _tmpl$26 = /* @__PURE__ */ template(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 opacity-50 wrap-break-word overflow-y-auto"placeholder="Add context"rows=1 disabled style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none>`);
8327
- _tmpl$34 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 py-1.5 px-2 w-full h-fit"><span class="shimmer-text text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap">`);
8528
+ init_arrow_navigation_menu();
8529
+ _tmpl$17 = /* @__PURE__ */ template(`<button data-react-grab-ignore-events data-react-grab-abort class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-black cursor-pointer ml-1 interactive-scale"><div class="size-1.5 bg-white rounded-[1px]">`);
8530
+ _tmpl$27 = /* @__PURE__ */ template(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 opacity-50 wrap-break-word overflow-y-auto"placeholder="Add context"rows=1 disabled style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none>`);
8531
+ _tmpl$35 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 py-1.5 px-2 w-full h-fit"><span class="shimmer-text text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap">`);
8328
8532
  _tmpl$43 = /* @__PURE__ */ template(`<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5">`);
8329
- _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">`);
8533
+ _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 w-fit h-fit px-2">`);
8330
8534
  _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">`);
8331
8535
  _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">`);
8332
8536
  _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>`);
@@ -8366,18 +8570,10 @@ var init_selection_label = __esm({
8366
8570
  if (props.status === "error" && (props.onAcknowledgeError || props.onRetry)) {
8367
8571
  return true;
8368
8572
  }
8573
+ if (props.arrowNavigationState?.isVisible) return true;
8369
8574
  return false;
8370
8575
  };
8371
- const measureContainer = () => {
8372
- if (containerRef && !isTagCurrentlyHovered) {
8373
- const rect = containerRef.getBoundingClientRect();
8374
- setMeasuredWidth(rect.width);
8375
- setMeasuredHeight(rect.height);
8376
- }
8377
- if (panelRef) {
8378
- setPanelWidth(panelRef.getBoundingClientRect().width);
8379
- }
8380
- };
8576
+ let resizeObserver;
8381
8577
  const handleTagHoverChange = (hovered) => {
8382
8578
  isTagCurrentlyHovered = hovered;
8383
8579
  };
@@ -8390,18 +8586,36 @@ var init_selection_label = __esm({
8390
8586
  const isCtrlCToAbort = event.code === "KeyC" && event.ctrlKey && props.status === "copying" && props.onAbort;
8391
8587
  if (isEnterToExpand) {
8392
8588
  event.preventDefault();
8393
- event.stopPropagation();
8394
8589
  event.stopImmediatePropagation();
8395
8590
  props.onToggleExpand?.();
8396
8591
  } else if (isCtrlCToAbort) {
8397
8592
  event.preventDefault();
8398
- event.stopPropagation();
8399
8593
  event.stopImmediatePropagation();
8400
8594
  props.onAbort?.();
8401
8595
  }
8402
8596
  };
8403
8597
  onMount(() => {
8404
- measureContainer();
8598
+ resizeObserver = new ResizeObserver((entries) => {
8599
+ for (const entry of entries) {
8600
+ const rect = entry.target.getBoundingClientRect();
8601
+ if (entry.target === containerRef && !isTagCurrentlyHovered) {
8602
+ setMeasuredWidth(rect.width);
8603
+ setMeasuredHeight(rect.height);
8604
+ } else if (entry.target === panelRef) {
8605
+ setPanelWidth(rect.width);
8606
+ }
8607
+ }
8608
+ });
8609
+ if (containerRef) {
8610
+ const rect = containerRef.getBoundingClientRect();
8611
+ setMeasuredWidth(rect.width);
8612
+ setMeasuredHeight(rect.height);
8613
+ resizeObserver.observe(containerRef);
8614
+ }
8615
+ if (panelRef) {
8616
+ setPanelWidth(panelRef.getBoundingClientRect().width);
8617
+ resizeObserver.observe(panelRef);
8618
+ }
8405
8619
  window.addEventListener("scroll", handleViewportChange, true);
8406
8620
  window.addEventListener("resize", handleViewportChange);
8407
8621
  window.addEventListener("keydown", handleGlobalKeyDown, {
@@ -8409,6 +8623,7 @@ var init_selection_label = __esm({
8409
8623
  });
8410
8624
  });
8411
8625
  onCleanup(() => {
8626
+ resizeObserver?.disconnect();
8412
8627
  window.removeEventListener("scroll", handleViewportChange, true);
8413
8628
  window.removeEventListener("resize", handleViewportChange);
8414
8629
  window.removeEventListener("keydown", handleGlobalKeyDown, {
@@ -8422,11 +8637,6 @@ var init_selection_label = __esm({
8422
8637
  lastValidPosition = null;
8423
8638
  }
8424
8639
  });
8425
- const sizeAffectingSignature = createMemo(() => [props.tagName, props.componentName, props.elementsCount, props.statusText, props.inputValue, props.hasAgent, props.isPromptMode, props.isPendingDismiss, props.error, props.isPendingAbort, props.visible, props.status, props.actionCycleState?.items, props.actionCycleState?.activeIndex, props.actionCycleState?.isVisible]);
8426
- createEffect(() => {
8427
- void sizeAffectingSignature();
8428
- queueMicrotask(measureContainer);
8429
- });
8430
8640
  createEffect(() => {
8431
8641
  if (props.isPromptMode && inputRef && props.onSubmit) {
8432
8642
  const focusTimeout = setTimeout(() => {
@@ -8504,7 +8714,6 @@ var init_selection_label = __esm({
8504
8714
  computedArrowPosition
8505
8715
  };
8506
8716
  });
8507
- const computedPosition = () => positionComputation().position;
8508
8717
  createEffect(() => {
8509
8718
  const result = positionComputation();
8510
8719
  if (result.computedArrowPosition !== null) {
@@ -8517,7 +8726,6 @@ var init_selection_label = __esm({
8517
8726
  if (event.isComposing || event.keyCode === IME_COMPOSING_KEY_CODE) {
8518
8727
  return;
8519
8728
  }
8520
- event.stopPropagation();
8521
8729
  event.stopImmediatePropagation();
8522
8730
  const isEnterWithoutShift = event.code === "Enter" && !event.shiftKey;
8523
8731
  const isEscape = event.code === "Escape";
@@ -8546,8 +8754,8 @@ var init_selection_label = __esm({
8546
8754
  const actionCycleItems = () => props.actionCycleState?.items ?? [];
8547
8755
  const actionCycleActiveIndex = () => props.actionCycleState?.activeIndex ?? 0;
8548
8756
  const isActionCycleVisible = () => Boolean(props.actionCycleState?.isVisible);
8757
+ const isArrowNavigationVisible = () => Boolean(props.arrowNavigationState?.isVisible);
8549
8758
  const handleTagClick = (event) => {
8550
- event.stopPropagation();
8551
8759
  event.stopImmediatePropagation();
8552
8760
  if (props.filePath && props.onOpen) {
8553
8761
  props.onOpen();
@@ -8555,7 +8763,6 @@ var init_selection_label = __esm({
8555
8763
  };
8556
8764
  const isTagClickable = () => Boolean(props.filePath && props.onOpen);
8557
8765
  const handleContainerPointerDown = (event) => {
8558
- event.stopPropagation();
8559
8766
  event.stopImmediatePropagation();
8560
8767
  const isEditableInputVisible = canInteract() && props.isPromptMode && !props.isPendingDismiss && props.onSubmit;
8561
8768
  if (isEditableInputVisible && inputRef) {
@@ -8572,7 +8779,6 @@ var init_selection_label = __esm({
8572
8779
  _el$.addEventListener("mouseleave", () => props.onHoverChange?.(false));
8573
8780
  _el$.addEventListener("mouseenter", () => props.onHoverChange?.(true));
8574
8781
  _el$.$$click = (event) => {
8575
- event.stopPropagation();
8576
8782
  event.stopImmediatePropagation();
8577
8783
  };
8578
8784
  _el$.$$pointerdown = handleContainerPointerDown;
@@ -8588,10 +8794,10 @@ var init_selection_label = __esm({
8588
8794
  return arrowPosition();
8589
8795
  },
8590
8796
  get leftPercent() {
8591
- return computedPosition().arrowLeftPercent;
8797
+ return positionComputation().position.arrowLeftPercent;
8592
8798
  },
8593
8799
  get leftOffsetPx() {
8594
- return computedPosition().arrowLeftOffset;
8800
+ return positionComputation().position.arrowLeftOffset;
8595
8801
  },
8596
8802
  get labelWidth() {
8597
8803
  return panelWidth();
@@ -8629,9 +8835,6 @@ var init_selection_label = __esm({
8629
8835
  get onFollowUpSubmit() {
8630
8836
  return props.onFollowUpSubmit;
8631
8837
  },
8632
- onCopyStateChange: () => {
8633
- queueMicrotask(measureContainer);
8634
- },
8635
8838
  onFadingChange: setIsInternalFading,
8636
8839
  get onShowContextMenu() {
8637
8840
  return props.onShowContextMenu;
@@ -8646,7 +8849,7 @@ var init_selection_label = __esm({
8646
8849
  return memo(() => props.status === "copying")() && !props.isPendingAbort;
8647
8850
  },
8648
8851
  get children() {
8649
- var _el$3 = _tmpl$34(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
8852
+ var _el$3 = _tmpl$35(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
8650
8853
  insert(_el$4, createComponent(IconLoader, {
8651
8854
  size: 13,
8652
8855
  "class": "text-[#71717a] shrink-0"
@@ -8659,7 +8862,7 @@ var init_selection_label = __esm({
8659
8862
  get children() {
8660
8863
  return createComponent(BottomSection, {
8661
8864
  get children() {
8662
- var _el$6 = _tmpl$26(), _el$7 = _el$6.firstChild;
8865
+ var _el$6 = _tmpl$27(), _el$7 = _el$6.firstChild;
8663
8866
  var _ref$3 = inputRef;
8664
8867
  typeof _ref$3 === "function" ? use(_ref$3, _el$7) : inputRef = _el$7;
8665
8868
  insert(_el$6, createComponent(Show, {
@@ -8667,7 +8870,7 @@ var init_selection_label = __esm({
8667
8870
  return props.onAbort;
8668
8871
  },
8669
8872
  get children() {
8670
- var _el$8 = _tmpl$16();
8873
+ var _el$8 = _tmpl$17();
8671
8874
  _el$8.$$click = (event) => {
8672
8875
  event.stopPropagation();
8673
8876
  props.onAbort?.();
@@ -8721,12 +8924,28 @@ var init_selection_label = __esm({
8721
8924
  onHoverChange: handleTagHoverChange,
8722
8925
  shrink: true,
8723
8926
  get forceShowIcon() {
8724
- return Boolean(props.isContextMenuOpen);
8927
+ return memo(() => !!isArrowNavigationVisible())() ? isTagClickable() : Boolean(props.isContextMenuOpen);
8725
8928
  }
8726
8929
  }));
8727
8930
  insert(_el$9, createComponent(Show, {
8728
8931
  get when() {
8729
- return isActionCycleVisible();
8932
+ return props.arrowNavigationState?.isVisible;
8933
+ },
8934
+ get children() {
8935
+ return createComponent(ArrowNavigationMenu, {
8936
+ get items() {
8937
+ return props.arrowNavigationState.items;
8938
+ },
8939
+ get activeIndex() {
8940
+ return props.arrowNavigationState.activeIndex;
8941
+ },
8942
+ onSelect: (index) => props.onArrowNavigationSelect?.(index)
8943
+ });
8944
+ }
8945
+ }), null);
8946
+ insert(_el$9, createComponent(Show, {
8947
+ get when() {
8948
+ return memo(() => !!!isArrowNavigationVisible())() && isActionCycleVisible();
8730
8949
  },
8731
8950
  get children() {
8732
8951
  return createComponent(BottomSection, {
@@ -8750,10 +8969,10 @@ var init_selection_label = __esm({
8750
8969
  }
8751
8970
  }), null);
8752
8971
  createRenderEffect((_p$) => {
8753
- var _v$1 = item.label.toLowerCase(), _v$10 = !!(itemIndex() === actionCycleActiveIndex()), _v$11 = !!(itemIndex() === actionCycleItems().length - 1);
8754
- _v$1 !== _p$.e && setAttribute(_el$17, "data-react-grab-action-cycle-item", _p$.e = _v$1);
8755
- _v$10 !== _p$.t && _el$17.classList.toggle("bg-black/5", _p$.t = _v$10);
8756
- _v$11 !== _p$.a && _el$17.classList.toggle("rounded-b-[6px]", _p$.a = _v$11);
8972
+ var _v$11 = item.label.toLowerCase(), _v$12 = !!(itemIndex() === actionCycleActiveIndex()), _v$13 = !!(itemIndex() === actionCycleItems().length - 1);
8973
+ _v$11 !== _p$.e && setAttribute(_el$17, "data-react-grab-action-cycle-item", _p$.e = _v$11);
8974
+ _v$12 !== _p$.t && _el$17.classList.toggle("bg-black/5", _p$.t = _v$12);
8975
+ _v$13 !== _p$.a && _el$17.classList.toggle("rounded-b-[6px]", _p$.a = _v$13);
8757
8976
  return _p$;
8758
8977
  }, {
8759
8978
  e: void 0,
@@ -8768,6 +8987,18 @@ var init_selection_label = __esm({
8768
8987
  });
8769
8988
  }
8770
8989
  }), null);
8990
+ createRenderEffect((_p$) => {
8991
+ var _v$ = !!isArrowNavigationVisible(), _v$2 = {
8992
+ "py-1.5": !isArrowNavigationVisible(),
8993
+ "pt-1.5 pb-1": isArrowNavigationVisible()
8994
+ };
8995
+ _v$ !== _p$.e && _el$9.classList.toggle("min-w-[100px]", _p$.e = _v$);
8996
+ _p$.t = classList(_el$0, _v$2, _p$.t);
8997
+ return _p$;
8998
+ }, {
8999
+ e: void 0,
9000
+ t: void 0
9001
+ });
8771
9002
  return _el$9;
8772
9003
  }
8773
9004
  }), null);
@@ -8827,9 +9058,9 @@ var init_selection_label = __esm({
8827
9058
  }
8828
9059
  }), null);
8829
9060
  createRenderEffect((_p$) => {
8830
- var _v$ = props.replyToPrompt ? "14px" : "0", _v$2 = !props.onSubmit;
8831
- _v$ !== _p$.e && setStyleProperty(_el$14, "padding-left", _p$.e = _v$);
8832
- _v$2 !== _p$.t && (_el$15.readOnly = _p$.t = _v$2);
9061
+ var _v$3 = props.replyToPrompt ? "14px" : "0", _v$4 = !props.onSubmit;
9062
+ _v$3 !== _p$.e && setStyleProperty(_el$14, "padding-left", _p$.e = _v$3);
9063
+ _v$4 !== _p$.t && (_el$15.readOnly = _p$.t = _v$4);
8833
9064
  return _p$;
8834
9065
  }, {
8835
9066
  e: void 0,
@@ -8877,15 +9108,15 @@ var init_selection_label = __esm({
8877
9108
  }
8878
9109
  }), null);
8879
9110
  createRenderEffect((_p$) => {
8880
- 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;
8881
- _v$3 !== _p$.e && className(_el$, _p$.e = _v$3);
8882
- _v$4 !== _p$.t && setStyleProperty(_el$, "top", _p$.t = _v$4);
8883
- _v$5 !== _p$.a && setStyleProperty(_el$, "left", _p$.a = _v$5);
8884
- _v$6 !== _p$.o && setStyleProperty(_el$, "transform", _p$.o = _v$6);
8885
- _v$7 !== _p$.i && setStyleProperty(_el$, "pointer-events", _p$.i = _v$7);
8886
- _v$8 !== _p$.n && setStyleProperty(_el$, "opacity", _p$.n = _v$8);
8887
- _v$9 !== _p$.s && className(_el$2, _p$.s = _v$9);
8888
- _v$0 !== _p$.h && setStyleProperty(_el$2, "display", _p$.h = _v$0);
9111
+ var _v$5 = cn("fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-opacity duration-100 ease-out"), _v$6 = `${positionComputation().position.top}px`, _v$7 = `${positionComputation().position.left}px`, _v$8 = `translateX(calc(-50% + ${positionComputation().position.edgeOffsetX}px))`, _v$9 = shouldEnablePointerEvents() ? "auto" : "none", _v$0 = props.status === "fading" || isInternalFading() ? 0 : 1, _v$1 = 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$10 = isCompletedStatus() && !props.error ? "none" : void 0;
9112
+ _v$5 !== _p$.e && className(_el$, _p$.e = _v$5);
9113
+ _v$6 !== _p$.t && setStyleProperty(_el$, "top", _p$.t = _v$6);
9114
+ _v$7 !== _p$.a && setStyleProperty(_el$, "left", _p$.a = _v$7);
9115
+ _v$8 !== _p$.o && setStyleProperty(_el$, "transform", _p$.o = _v$8);
9116
+ _v$9 !== _p$.i && setStyleProperty(_el$, "pointer-events", _p$.i = _v$9);
9117
+ _v$0 !== _p$.n && setStyleProperty(_el$, "opacity", _p$.n = _v$0);
9118
+ _v$1 !== _p$.s && className(_el$2, _p$.s = _v$1);
9119
+ _v$10 !== _p$.h && setStyleProperty(_el$2, "display", _p$.h = _v$10);
8889
9120
  return _p$;
8890
9121
  }, {
8891
9122
  e: void 0,
@@ -8946,18 +9177,18 @@ var init_state = __esm({
8946
9177
  });
8947
9178
 
8948
9179
  // src/components/icons/icon-select.tsx
8949
- var _tmpl$17, IconSelect;
9180
+ var _tmpl$18, IconSelect;
8950
9181
  var init_icon_select = __esm({
8951
9182
  "src/components/icons/icon-select.tsx"() {
8952
9183
  "use strict";
8953
9184
  init_web();
8954
9185
  init_web();
8955
9186
  init_web();
8956
- _tmpl$17 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 18 18"fill=currentColor><path opacity=0.4 d="M7.65631 10.9565C7.31061 10.0014 7.54012 8.96635 8.25592 8.25195C8.74522 7.76615 9.38771 7.49951 10.0694 7.49951C10.3682 7.49951 10.6641 7.55171 10.9483 7.65381L16.0001 9.49902V4.75C16.0001 3.2334 14.7667 2 13.2501 2H4.75012C3.23352 2 2.00012 3.2334 2.00012 4.75V13.25C2.00012 14.7666 3.23352 16 4.75012 16H9.49962L7.65631 10.9565Z"></path><path d="M17.296 11.5694L10.4415 9.06545C10.0431 8.92235 9.61441 9.01658 9.31551 9.31338C9.01671 9.61168 8.92101 10.0429 9.06551 10.4413L11.5704 17.2948C11.7247 17.7191 12.128 18.0004 12.5772 18.0004C12.585 18.0004 12.5918 17.9999 12.5987 17.9999C13.0577 17.9906 13.4591 17.6913 13.5987 17.2543L14.4854 14.4857L17.2559 13.5985C17.6914 13.4589 17.9903 13.057 18 12.599C18.0097 12.141 17.7267 11.7276 17.296 11.5694Z">`);
9187
+ _tmpl$18 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 18 18"fill=currentColor><path opacity=0.4 d="M7.65631 10.9565C7.31061 10.0014 7.54012 8.96635 8.25592 8.25195C8.74522 7.76615 9.38771 7.49951 10.0694 7.49951C10.3682 7.49951 10.6641 7.55171 10.9483 7.65381L16.0001 9.49902V4.75C16.0001 3.2334 14.7667 2 13.2501 2H4.75012C3.23352 2 2.00012 3.2334 2.00012 4.75V13.25C2.00012 14.7666 3.23352 16 4.75012 16H9.49962L7.65631 10.9565Z"></path><path d="M17.296 11.5694L10.4415 9.06545C10.0431 8.92235 9.61441 9.01658 9.31551 9.31338C9.01671 9.61168 8.92101 10.0429 9.06551 10.4413L11.5704 17.2948C11.7247 17.7191 12.128 18.0004 12.5772 18.0004C12.585 18.0004 12.5918 17.9999 12.5987 17.9999C13.0577 17.9906 13.4591 17.6913 13.5987 17.2543L14.4854 14.4857L17.2559 13.5985C17.6914 13.4589 17.9903 13.057 18 12.599C18.0097 12.141 17.7267 11.7276 17.296 11.5694Z">`);
8957
9188
  IconSelect = (props) => {
8958
9189
  const size = () => props.size ?? 14;
8959
9190
  return (() => {
8960
- var _el$ = _tmpl$17();
9191
+ var _el$ = _tmpl$18();
8961
9192
  createRenderEffect((_p$) => {
8962
9193
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
8963
9194
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -8976,18 +9207,18 @@ var init_icon_select = __esm({
8976
9207
  });
8977
9208
 
8978
9209
  // src/components/icons/icon-chevron.tsx
8979
- var _tmpl$18, IconChevron;
9210
+ var _tmpl$19, IconChevron;
8980
9211
  var init_icon_chevron = __esm({
8981
9212
  "src/components/icons/icon-chevron.tsx"() {
8982
9213
  "use strict";
8983
9214
  init_web();
8984
9215
  init_web();
8985
9216
  init_web();
8986
- _tmpl$18 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2.5 stroke-linecap=round stroke-linejoin=round><path d="m18 15-6-6-6 6">`);
9217
+ _tmpl$19 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2.5 stroke-linecap=round stroke-linejoin=round><path d="m18 15-6-6-6 6">`);
8987
9218
  IconChevron = (props) => {
8988
9219
  const size = () => props.size ?? 12;
8989
9220
  return (() => {
8990
- var _el$ = _tmpl$18();
9221
+ var _el$ = _tmpl$19();
8991
9222
  createRenderEffect((_p$) => {
8992
9223
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
8993
9224
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -9006,18 +9237,18 @@ var init_icon_chevron = __esm({
9006
9237
  });
9007
9238
 
9008
9239
  // src/components/icons/icon-clock.tsx
9009
- var _tmpl$19, IconClock;
9240
+ var _tmpl$20, IconClock;
9010
9241
  var init_icon_clock = __esm({
9011
9242
  "src/components/icons/icon-clock.tsx"() {
9012
9243
  "use strict";
9013
9244
  init_web();
9014
9245
  init_web();
9015
9246
  init_web();
9016
- _tmpl$19 = /* @__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="M12 1.25C6.06294 1.25 1.25 6.06294 1.25 12C1.25 17.9371 6.06294 22.75 12 22.75C17.9371 22.75 22.75 17.9371 22.75 12C22.75 6.06294 17.9371 1.25 12 1.25ZM13 8C13 7.44772 12.5523 7 12 7C11.4477 7 11 7.44772 11 8V12C11 12.2652 11.1054 12.5196 11.2929 12.7071L13.2929 14.7071C13.6834 15.0976 14.3166 15.0976 14.7071 14.7071C15.0976 14.3166 15.0976 13.6834 14.7071 13.2929L13 11.5858V8Z">`);
9247
+ _tmpl$20 = /* @__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="M12 1.25C6.06294 1.25 1.25 6.06294 1.25 12C1.25 17.9371 6.06294 22.75 12 22.75C17.9371 22.75 22.75 17.9371 22.75 12C22.75 6.06294 17.9371 1.25 12 1.25ZM13 8C13 7.44772 12.5523 7 12 7C11.4477 7 11 7.44772 11 8V12C11 12.2652 11.1054 12.5196 11.2929 12.7071L13.2929 14.7071C13.6834 15.0976 14.3166 15.0976 14.7071 14.7071C15.0976 14.3166 15.0976 13.6834 14.7071 13.2929L13 11.5858V8Z">`);
9017
9248
  IconClock = (props) => {
9018
9249
  const size = () => props.size ?? 14;
9019
9250
  return (() => {
9020
- var _el$ = _tmpl$19();
9251
+ var _el$ = _tmpl$20();
9021
9252
  createRenderEffect((_p$) => {
9022
9253
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
9023
9254
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -9036,18 +9267,18 @@ var init_icon_clock = __esm({
9036
9267
  });
9037
9268
 
9038
9269
  // src/components/icons/icon-copy.tsx
9039
- var _tmpl$20, IconCopy;
9270
+ var _tmpl$21, IconCopy;
9040
9271
  var init_icon_copy = __esm({
9041
9272
  "src/components/icons/icon-copy.tsx"() {
9042
9273
  "use strict";
9043
9274
  init_web();
9044
9275
  init_web();
9045
9276
  init_web();
9046
- _tmpl$20 = /* @__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">`);
9277
+ _tmpl$21 = /* @__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">`);
9047
9278
  IconCopy = (props) => {
9048
9279
  const size = () => props.size ?? 14;
9049
9280
  return (() => {
9050
- var _el$ = _tmpl$20();
9281
+ var _el$ = _tmpl$21();
9051
9282
  createRenderEffect((_p$) => {
9052
9283
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
9053
9284
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -9641,7 +9872,7 @@ var init_freeze_gsap = __esm({
9641
9872
  });
9642
9873
 
9643
9874
  // src/utils/freeze-animations.ts
9644
- var FROZEN_STYLES, GLOBAL_FREEZE_STYLES, styleElement, frozenElements, lastInputElements, globalAnimationStyleElement, ensureStylesInjected, areElementsSame, freezeAllAnimations, unfreezeAllAnimations, freezeAnimations, freezeGlobalAnimations, unfreezeGlobalAnimations;
9875
+ var FROZEN_STYLES, GLOBAL_FREEZE_STYLES, SVG_ROOT_SELECTOR, styleElement, frozenElements, frozenSvgElements, lastInputElements, globalAnimationStyleElement, globalFrozenSvgElements, svgFreezeDepthMap, frozenWaapiAnimations, ensureStylesInjected, areElementsSame, collectFrozenSvgElements, callSvgAnimationMethod, pauseSvgAnimations, resumeSvgAnimations, collectWaapiAnimations, finishAnimations, freezeAllAnimations, unfreezeAllAnimations, freezeAnimations, freezeGlobalAnimations, unfreezeGlobalAnimations;
9645
9876
  var init_freeze_animations = __esm({
9646
9877
  "src/utils/freeze-animations.ts"() {
9647
9878
  "use strict";
@@ -9661,10 +9892,15 @@ var init_freeze_animations = __esm({
9661
9892
  transition: none !important;
9662
9893
  }
9663
9894
  `;
9895
+ SVG_ROOT_SELECTOR = "svg";
9664
9896
  styleElement = null;
9665
9897
  frozenElements = [];
9898
+ frozenSvgElements = [];
9666
9899
  lastInputElements = [];
9667
9900
  globalAnimationStyleElement = null;
9901
+ globalFrozenSvgElements = [];
9902
+ svgFreezeDepthMap = /* @__PURE__ */ new Map();
9903
+ frozenWaapiAnimations = [];
9668
9904
  ensureStylesInjected = () => {
9669
9905
  if (styleElement) return;
9670
9906
  styleElement = createStyleElement(
@@ -9672,7 +9908,70 @@ var init_freeze_animations = __esm({
9672
9908
  FROZEN_STYLES
9673
9909
  );
9674
9910
  };
9675
- areElementsSame = (a3, b3) => a3.length === b3.length && a3.every((element, index) => element === b3[index]);
9911
+ areElementsSame = (firstElements, secondElements) => firstElements.length === secondElements.length && firstElements.every(
9912
+ (currentElement, index) => currentElement === secondElements[index]
9913
+ );
9914
+ collectFrozenSvgElements = (elements) => {
9915
+ const svgElements = /* @__PURE__ */ new Set();
9916
+ for (const element of elements) {
9917
+ if (element instanceof SVGSVGElement) {
9918
+ svgElements.add(element);
9919
+ } else if (element instanceof SVGElement && element.ownerSVGElement) {
9920
+ svgElements.add(element.ownerSVGElement);
9921
+ }
9922
+ for (const innerSvgElement of element.querySelectorAll(SVG_ROOT_SELECTOR)) {
9923
+ if (innerSvgElement instanceof SVGSVGElement) {
9924
+ svgElements.add(innerSvgElement);
9925
+ }
9926
+ }
9927
+ }
9928
+ return [...svgElements];
9929
+ };
9930
+ callSvgAnimationMethod = (svgElement, methodName) => {
9931
+ const animationMethod = Reflect.get(svgElement, methodName);
9932
+ if (typeof animationMethod !== "function") return;
9933
+ animationMethod.call(svgElement);
9934
+ };
9935
+ pauseSvgAnimations = (svgElements) => {
9936
+ for (const svgElement of svgElements) {
9937
+ const currentFreezeDepth = svgFreezeDepthMap.get(svgElement) ?? 0;
9938
+ if (currentFreezeDepth === 0) {
9939
+ callSvgAnimationMethod(svgElement, "pauseAnimations");
9940
+ }
9941
+ svgFreezeDepthMap.set(svgElement, currentFreezeDepth + 1);
9942
+ }
9943
+ };
9944
+ resumeSvgAnimations = (svgElements) => {
9945
+ for (const svgElement of svgElements) {
9946
+ const currentFreezeDepth = svgFreezeDepthMap.get(svgElement);
9947
+ if (!currentFreezeDepth) continue;
9948
+ if (currentFreezeDepth === 1) {
9949
+ svgFreezeDepthMap.delete(svgElement);
9950
+ callSvgAnimationMethod(svgElement, "unpauseAnimations");
9951
+ continue;
9952
+ }
9953
+ svgFreezeDepthMap.set(svgElement, currentFreezeDepth - 1);
9954
+ }
9955
+ };
9956
+ collectWaapiAnimations = (elements) => {
9957
+ const animations = [];
9958
+ for (const element of elements) {
9959
+ for (const animation of element.getAnimations({ subtree: true })) {
9960
+ if (animation.playState === "running") {
9961
+ animations.push(animation);
9962
+ }
9963
+ }
9964
+ }
9965
+ return animations;
9966
+ };
9967
+ finishAnimations = (animations) => {
9968
+ for (const animation of animations) {
9969
+ try {
9970
+ animation.finish();
9971
+ } catch {
9972
+ }
9973
+ }
9974
+ };
9676
9975
  freezeAllAnimations = (elements) => {
9677
9976
  if (elements.length === 0) return;
9678
9977
  if (areElementsSame(elements, lastInputElements)) return;
@@ -9680,16 +9979,27 @@ var init_freeze_animations = __esm({
9680
9979
  lastInputElements = [...elements];
9681
9980
  ensureStylesInjected();
9682
9981
  frozenElements = elements;
9982
+ frozenSvgElements = collectFrozenSvgElements(frozenElements);
9983
+ pauseSvgAnimations(frozenSvgElements);
9683
9984
  for (const element of frozenElements) {
9684
9985
  element.setAttribute(FROZEN_ELEMENT_ATTRIBUTE, "");
9685
9986
  }
9987
+ frozenWaapiAnimations = collectWaapiAnimations(frozenElements);
9988
+ for (const animation of frozenWaapiAnimations) {
9989
+ animation.pause();
9990
+ }
9686
9991
  };
9687
9992
  unfreezeAllAnimations = () => {
9688
- if (frozenElements.length === 0) return;
9993
+ if (frozenElements.length === 0 && frozenSvgElements.length === 0 && frozenWaapiAnimations.length === 0)
9994
+ return;
9689
9995
  for (const element of frozenElements) {
9690
9996
  element.removeAttribute(FROZEN_ELEMENT_ATTRIBUTE);
9691
9997
  }
9998
+ resumeSvgAnimations(frozenSvgElements);
9999
+ finishAnimations(frozenWaapiAnimations);
9692
10000
  frozenElements = [];
10001
+ frozenSvgElements = [];
10002
+ frozenWaapiAnimations = [];
9693
10003
  lastInputElements = [];
9694
10004
  };
9695
10005
  freezeAnimations = (elements) => {
@@ -9707,6 +10017,10 @@ var init_freeze_animations = __esm({
9707
10017
  "data-react-grab-global-freeze",
9708
10018
  GLOBAL_FREEZE_STYLES
9709
10019
  );
10020
+ globalFrozenSvgElements = collectFrozenSvgElements(
10021
+ Array.from(document.querySelectorAll(SVG_ROOT_SELECTOR))
10022
+ );
10023
+ pauseSvgAnimations(globalFrozenSvgElements);
9710
10024
  freezeGsap();
9711
10025
  };
9712
10026
  unfreezeGlobalAnimations = () => {
@@ -9716,6 +10030,7 @@ var init_freeze_animations = __esm({
9716
10030
  transition: none !important;
9717
10031
  }
9718
10032
  `;
10033
+ const animations = [];
9719
10034
  for (const animation of document.getAnimations()) {
9720
10035
  if (animation.effect instanceof KeyframeEffect) {
9721
10036
  const target = animation.effect.target;
@@ -9726,13 +10041,13 @@ var init_freeze_animations = __esm({
9726
10041
  }
9727
10042
  }
9728
10043
  }
9729
- try {
9730
- animation.finish();
9731
- } catch {
9732
- }
10044
+ animations.push(animation);
9733
10045
  }
10046
+ finishAnimations(animations);
9734
10047
  globalAnimationStyleElement.remove();
9735
10048
  globalAnimationStyleElement = null;
10049
+ resumeSvgAnimations(globalFrozenSvgElements);
10050
+ globalFrozenSvgElements = [];
9736
10051
  unfreezeGsap();
9737
10052
  };
9738
10053
  }
@@ -9818,21 +10133,28 @@ var init_is_valid_grabbable_element = __esm({
9818
10133
  return cached.isVisible;
9819
10134
  }
9820
10135
  const computedStyle = window.getComputedStyle(element);
9821
- if (isDevToolsOverlay(computedStyle)) {
10136
+ const isVisible = isElementVisible(element, computedStyle);
10137
+ if (!isVisible) {
10138
+ visibilityCache.set(element, { isVisible: false, timestamp: now });
9822
10139
  return false;
9823
10140
  }
9824
- if (isFullViewportOverlay(element, computedStyle)) {
9825
- return false;
10141
+ const couldBeOverlay = element.clientWidth / window.innerWidth >= VIEWPORT_COVERAGE_THRESHOLD && element.clientHeight / window.innerHeight >= VIEWPORT_COVERAGE_THRESHOLD;
10142
+ if (couldBeOverlay) {
10143
+ if (isDevToolsOverlay(computedStyle)) {
10144
+ return false;
10145
+ }
10146
+ if (isFullViewportOverlay(element, computedStyle)) {
10147
+ return false;
10148
+ }
9826
10149
  }
9827
- const isVisible = isElementVisible(element, computedStyle);
9828
- visibilityCache.set(element, { isVisible, timestamp: now });
9829
- return isVisible;
10150
+ visibilityCache.set(element, { isVisible: true, timestamp: now });
10151
+ return true;
9830
10152
  };
9831
10153
  }
9832
10154
  });
9833
10155
 
9834
10156
  // src/utils/get-element-at-position.ts
9835
- var cache, isWithinThreshold, getElementsAtPoint, getElementAtPosition, clearElementPositionCache;
10157
+ var cache, resumeTimerId, scheduleResume, cancelScheduledResume, isWithinThreshold, getElementsAtPoint, getElementAtPosition, clearElementPositionCache;
9836
10158
  var init_get_element_at_position = __esm({
9837
10159
  "src/utils/get-element-at-position.ts"() {
9838
10160
  "use strict";
@@ -9840,15 +10162,32 @@ var init_get_element_at_position = __esm({
9840
10162
  init_constants();
9841
10163
  init_freeze_pseudo_states();
9842
10164
  cache = null;
10165
+ resumeTimerId = null;
10166
+ scheduleResume = () => {
10167
+ if (resumeTimerId !== null) {
10168
+ clearTimeout(resumeTimerId);
10169
+ }
10170
+ resumeTimerId = setTimeout(() => {
10171
+ resumeTimerId = null;
10172
+ resumePointerEventsFreeze();
10173
+ }, POINTER_EVENTS_RESUME_DEBOUNCE_MS);
10174
+ };
10175
+ cancelScheduledResume = () => {
10176
+ if (resumeTimerId !== null) {
10177
+ clearTimeout(resumeTimerId);
10178
+ resumeTimerId = null;
10179
+ }
10180
+ };
9843
10181
  isWithinThreshold = (x1, y1, x22, y22) => {
9844
10182
  const deltaX = Math.abs(x1 - x22);
9845
10183
  const deltaY = Math.abs(y1 - y22);
9846
10184
  return deltaX <= ELEMENT_POSITION_CACHE_DISTANCE_THRESHOLD_PX && deltaY <= ELEMENT_POSITION_CACHE_DISTANCE_THRESHOLD_PX;
9847
10185
  };
9848
10186
  getElementsAtPoint = (clientX, clientY) => {
10187
+ cancelScheduledResume();
9849
10188
  suspendPointerEventsFreeze();
9850
10189
  const elements = document.elementsFromPoint(clientX, clientY);
9851
- resumePointerEventsFreeze();
10190
+ scheduleResume();
9852
10191
  return elements;
9853
10192
  };
9854
10193
  getElementAtPosition = (clientX, clientY) => {
@@ -9865,31 +10204,41 @@ var init_get_element_at_position = __esm({
9865
10204
  return cache.element;
9866
10205
  }
9867
10206
  }
9868
- const elementsAtPoint = getElementsAtPoint(clientX, clientY);
10207
+ cancelScheduledResume();
10208
+ suspendPointerEventsFreeze();
9869
10209
  let result = null;
9870
- for (const candidateElement of elementsAtPoint) {
9871
- if (isValidGrabbableElement(candidateElement)) {
9872
- result = candidateElement;
9873
- break;
10210
+ const topElement = document.elementFromPoint(clientX, clientY);
10211
+ if (topElement && isValidGrabbableElement(topElement)) {
10212
+ result = topElement;
10213
+ } else {
10214
+ const elementsAtPoint = document.elementsFromPoint(clientX, clientY);
10215
+ for (const candidateElement of elementsAtPoint) {
10216
+ if (candidateElement !== topElement && isValidGrabbableElement(candidateElement)) {
10217
+ result = candidateElement;
10218
+ break;
10219
+ }
9874
10220
  }
9875
10221
  }
10222
+ scheduleResume();
9876
10223
  cache = { clientX, clientY, element: result, timestamp: now };
9877
10224
  return result;
9878
10225
  };
9879
10226
  clearElementPositionCache = () => {
10227
+ cancelScheduledResume();
10228
+ resumePointerEventsFreeze();
9880
10229
  cache = null;
9881
10230
  };
9882
10231
  }
9883
10232
  });
9884
10233
 
9885
10234
  // src/utils/freeze-pseudo-states.ts
9886
- var POINTER_EVENTS_STYLES, MOUSE_EVENTS_TO_BLOCK, FOCUS_EVENTS_TO_BLOCK, HOVER_STYLE_PROPERTIES, FOCUS_STYLE_PROPERTIES, ANIMATION_CONTROLLED_PROPERTIES, frozenHoverElements, frozenFocusElements, pointerEventsStyle, stopEvent, preventFocusChange, hasAnimationControlledProperty, collectHoverStates, collectFocusStates, applyFrozenStates, restoreFrozenStates, suspendPointerEventsFreeze, resumePointerEventsFreeze, freezePseudoStates, unfreezePseudoStates;
10235
+ var POINTER_EVENTS_STYLES, MOUSE_EVENTS_TO_BLOCK, FOCUS_EVENTS_TO_BLOCK, HOVER_STYLE_PROPERTIES, FOCUS_STYLE_PROPERTIES, frozenHoverElements, frozenFocusElements, pointerEventsStyle, stopEvent, preventFocusChange, collectOriginalPropertyValues, collectPseudoStates, applyFrozenStates, restoreFrozenStates, suspendPointerEventsFreeze, resumePointerEventsFreeze, freezePseudoStates, unfreezePseudoStates;
9887
10236
  var init_freeze_pseudo_states = __esm({
9888
10237
  "src/utils/freeze-pseudo-states.ts"() {
9889
10238
  "use strict";
9890
10239
  init_get_element_at_position();
9891
10240
  init_create_style_element();
9892
- POINTER_EVENTS_STYLES = "* { pointer-events: none !important; }";
10241
+ POINTER_EVENTS_STYLES = "html { pointer-events: none !important; }";
9893
10242
  MOUSE_EVENTS_TO_BLOCK = [
9894
10243
  "mouseenter",
9895
10244
  "mouseleave",
@@ -9928,80 +10277,62 @@ var init_freeze_pseudo_states = __esm({
9928
10277
  "ring-color",
9929
10278
  "ring-width"
9930
10279
  ];
9931
- ANIMATION_CONTROLLED_PROPERTIES = [
9932
- "opacity",
9933
- "transform",
9934
- "scale",
9935
- "translate",
9936
- "rotate"
9937
- ];
9938
10280
  frozenHoverElements = /* @__PURE__ */ new Map();
9939
10281
  frozenFocusElements = /* @__PURE__ */ new Map();
9940
10282
  pointerEventsStyle = null;
9941
10283
  stopEvent = (event) => {
9942
- event.stopPropagation();
9943
10284
  event.stopImmediatePropagation();
9944
10285
  };
9945
10286
  preventFocusChange = (event) => {
9946
10287
  event.preventDefault();
9947
- event.stopPropagation();
9948
10288
  event.stopImmediatePropagation();
9949
10289
  };
9950
- hasAnimationControlledProperty = (cssText) => {
9951
- const lowerCssText = cssText.toLowerCase();
9952
- return ANIMATION_CONTROLLED_PROPERTIES.some(
9953
- (prop) => lowerCssText.includes(prop)
9954
- );
9955
- };
9956
- collectHoverStates = () => {
9957
- const elementsToFreeze = [];
9958
- for (const element of document.querySelectorAll(":hover")) {
9959
- if (!(element instanceof HTMLElement)) continue;
9960
- const originalCssText = element.style.cssText;
9961
- const computed = getComputedStyle(element);
9962
- let frozenStyles = originalCssText;
9963
- for (const prop of HOVER_STYLE_PROPERTIES) {
9964
- const computedValue = computed.getPropertyValue(prop);
9965
- if (computedValue) {
9966
- frozenStyles += `${prop}: ${computedValue} !important; `;
9967
- }
10290
+ collectOriginalPropertyValues = (element, properties) => {
10291
+ const originalPropertyValues = /* @__PURE__ */ new Map();
10292
+ for (const prop of properties) {
10293
+ const inlineValue = element.style.getPropertyValue(prop);
10294
+ if (inlineValue) {
10295
+ originalPropertyValues.set(prop, inlineValue);
9968
10296
  }
9969
- elementsToFreeze.push({ element, originalCssText, frozenStyles });
9970
10297
  }
9971
- return elementsToFreeze;
10298
+ return originalPropertyValues;
9972
10299
  };
9973
- collectFocusStates = () => {
10300
+ collectPseudoStates = (selector, properties, alreadyFrozen) => {
9974
10301
  const elementsToFreeze = [];
9975
- for (const element of document.querySelectorAll(":focus, :focus-visible")) {
10302
+ for (const element of document.querySelectorAll(selector)) {
9976
10303
  if (!(element instanceof HTMLElement)) continue;
9977
- if (frozenFocusElements.has(element)) continue;
9978
- const originalCssText = element.style.cssText;
10304
+ if (alreadyFrozen?.has(element)) continue;
9979
10305
  const computed = getComputedStyle(element);
9980
- let frozenStyles = originalCssText;
9981
- for (const prop of FOCUS_STYLE_PROPERTIES) {
10306
+ let frozenStyles = element.style.cssText;
10307
+ const originalPropertyValues = collectOriginalPropertyValues(
10308
+ element,
10309
+ properties
10310
+ );
10311
+ for (const prop of properties) {
9982
10312
  const computedValue = computed.getPropertyValue(prop);
9983
10313
  if (computedValue) {
9984
10314
  frozenStyles += `${prop}: ${computedValue} !important; `;
9985
10315
  }
9986
10316
  }
9987
- elementsToFreeze.push({ element, originalCssText, frozenStyles });
10317
+ elementsToFreeze.push({ element, frozenStyles, originalPropertyValues });
9988
10318
  }
9989
10319
  return elementsToFreeze;
9990
10320
  };
9991
10321
  applyFrozenStates = (states, storageMap) => {
9992
- for (const { element, originalCssText, frozenStyles } of states) {
9993
- storageMap.set(element, originalCssText);
10322
+ for (const { element, frozenStyles, originalPropertyValues } of states) {
10323
+ storageMap.set(element, originalPropertyValues);
9994
10324
  element.style.cssText = frozenStyles;
9995
10325
  }
9996
10326
  };
9997
10327
  restoreFrozenStates = (storageMap, styleProperties) => {
9998
- for (const [element, originalCssText] of storageMap) {
9999
- if (hasAnimationControlledProperty(originalCssText)) {
10000
- for (const prop of styleProperties) {
10328
+ for (const [element, originalPropertyValues] of storageMap) {
10329
+ for (const prop of styleProperties) {
10330
+ const originalValue = originalPropertyValues.get(prop);
10331
+ if (originalValue) {
10332
+ element.style.setProperty(prop, originalValue);
10333
+ } else {
10001
10334
  element.style.removeProperty(prop);
10002
10335
  }
10003
- } else {
10004
- element.style.cssText = originalCssText;
10005
10336
  }
10006
10337
  }
10007
10338
  storageMap.clear();
@@ -10020,8 +10351,12 @@ var init_freeze_pseudo_states = __esm({
10020
10351
  for (const eventType of FOCUS_EVENTS_TO_BLOCK) {
10021
10352
  document.addEventListener(eventType, preventFocusChange, true);
10022
10353
  }
10023
- const hoverStates = collectHoverStates();
10024
- const focusStates = collectFocusStates();
10354
+ const hoverStates = collectPseudoStates(":hover", HOVER_STYLE_PROPERTIES);
10355
+ const focusStates = collectPseudoStates(
10356
+ ":focus, :focus-visible",
10357
+ FOCUS_STYLE_PROPERTIES,
10358
+ frozenFocusElements
10359
+ );
10025
10360
  applyFrozenStates(hoverStates, frozenHoverElements);
10026
10361
  applyFrozenStates(focusStates, frozenFocusElements);
10027
10362
  pointerEventsStyle = createStyleElement(
@@ -10046,7 +10381,7 @@ var init_freeze_pseudo_states = __esm({
10046
10381
  });
10047
10382
 
10048
10383
  // src/components/tooltip.tsx
10049
- var _tmpl$21, tooltipCloseTimestamp, wasTooltipRecentlyVisible, Tooltip;
10384
+ var _tmpl$28, tooltipCloseTimestamp, wasTooltipRecentlyVisible, Tooltip;
10050
10385
  var init_tooltip = __esm({
10051
10386
  "src/components/tooltip.tsx"() {
10052
10387
  "use strict";
@@ -10058,7 +10393,7 @@ var init_tooltip = __esm({
10058
10393
  init_solid();
10059
10394
  init_cn();
10060
10395
  init_constants();
10061
- _tmpl$21 = /* @__PURE__ */ template(`<div style=z-index:2147483647>`);
10396
+ _tmpl$28 = /* @__PURE__ */ template(`<div style=z-index:2147483647>`);
10062
10397
  tooltipCloseTimestamp = 0;
10063
10398
  wasTooltipRecentlyVisible = () => {
10064
10399
  return Date.now() - tooltipCloseTimestamp < TOOLTIP_GRACE_PERIOD_MS;
@@ -10102,7 +10437,7 @@ var init_tooltip = __esm({
10102
10437
  return delayedVisible();
10103
10438
  },
10104
10439
  get children() {
10105
- var _el$ = _tmpl$21();
10440
+ var _el$ = _tmpl$28();
10106
10441
  insert(_el$, () => props.children);
10107
10442
  createRenderEffect(() => className(_el$, cn("absolute 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 === "left" || props.position === "right" ? "top-1/2 -translate-y-1/2" : "left-1/2 -translate-x-1/2", props.position === "top" && "bottom-full mb-2.5", props.position === "bottom" && "top-full mt-2.5", props.position === "left" && "right-full mr-2.5", props.position === "right" && "left-full ml-2.5", shouldAnimate() && "animate-tooltip-fade-in")));
10108
10443
  return _el$;
@@ -10131,7 +10466,7 @@ var init_toolbar_layout = __esm({
10131
10466
  });
10132
10467
 
10133
10468
  // src/components/toolbar/index.tsx
10134
- var _tmpl$27, _tmpl$28, _tmpl$35, Toolbar;
10469
+ var _tmpl$29, _tmpl$210, _tmpl$36, Toolbar;
10135
10470
  var init_toolbar = __esm({
10136
10471
  "src/components/toolbar/index.tsx"() {
10137
10472
  "use strict";
@@ -10147,6 +10482,7 @@ var init_toolbar = __esm({
10147
10482
  init_web();
10148
10483
  init_web();
10149
10484
  init_web();
10485
+ init_web();
10150
10486
  init_solid();
10151
10487
  init_cn();
10152
10488
  init_format_shortcut();
@@ -10164,9 +10500,9 @@ var init_toolbar = __esm({
10164
10500
  init_tooltip();
10165
10501
  init_toolbar_layout();
10166
10502
  init_native_raf();
10167
- _tmpl$27 = /* @__PURE__ */ template(`<span data-react-grab-unread-indicator class="absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full bg-[#404040]">`);
10168
- _tmpl$28 = /* @__PURE__ */ template(`<div style=z-index:2147483647>Enable to continue`);
10169
- _tmpl$35 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-toolbar style=z-index:2147483647><div><div><div><div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-toggle></button></div></div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-history><span class="inline-flex relative"></span></button></div></div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-copy-all></button></div></div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-menu></button></div></div></div><div class="relative shrink-0 overflow-visible"><button data-react-grab-ignore-events data-react-grab-toolbar-enabled><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">`);
10503
+ _tmpl$29 = /* @__PURE__ */ template(`<span data-react-grab-unread-indicator class="absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full bg-[#404040]">`);
10504
+ _tmpl$210 = /* @__PURE__ */ template(`<div style=z-index:2147483647>Enable to continue`);
10505
+ _tmpl$36 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-toolbar style=z-index:2147483647><div><div><div><div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-toggle></button></div></div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-history aria-haspopup=menu><span class="inline-flex relative"></span></button></div></div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-copy-all aria-label="Copy all history items"></button></div></div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-menu aria-haspopup=menu></button></div></div></div><div class="relative shrink-0 overflow-visible"><button data-react-grab-ignore-events data-react-grab-toolbar-enabled><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">`);
10170
10506
  Toolbar = (props) => {
10171
10507
  let containerRef;
10172
10508
  let expandableButtonsRef;
@@ -10272,7 +10608,6 @@ var init_toolbar = __esm({
10272
10608
  return `left-1/2 -translate-x-1/2 ${placementClass}`;
10273
10609
  };
10274
10610
  const stopEventPropagation = (event) => {
10275
- event.stopPropagation();
10276
10611
  event.stopImmediatePropagation();
10277
10612
  };
10278
10613
  const createFreezeHandlers = (setTooltipVisible, options) => ({
@@ -10541,7 +10876,6 @@ var init_toolbar = __esm({
10541
10876
  };
10542
10877
  let didDragOccur = false;
10543
10878
  const createDragAwareHandler = (callback) => (event) => {
10544
- event.stopPropagation();
10545
10879
  event.stopImmediatePropagation();
10546
10880
  if (didDragOccur) {
10547
10881
  didDragOccur = false;
@@ -11106,9 +11440,9 @@ var init_toolbar = __esm({
11106
11440
  }
11107
11441
  };
11108
11442
  return (() => {
11109
- var _el$ = _tmpl$35(), _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$1.firstChild, _el$12 = _el$9.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$12.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$5.nextSibling, _el$19 = _el$18.firstChild, _el$20 = _el$19.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$3.nextSibling;
11443
+ var _el$ = _tmpl$36(), _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$1.firstChild, _el$12 = _el$9.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$12.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$5.nextSibling, _el$19 = _el$18.firstChild, _el$20 = _el$19.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$3.nextSibling;
11110
11444
  _el$.addEventListener("mouseleave", () => props.onSelectHoverChange?.(false));
11111
- _el$.addEventListener("mouseenter", () => props.onSelectHoverChange?.(true));
11445
+ _el$.addEventListener("mouseenter", () => !isCollapsed() && props.onSelectHoverChange?.(true));
11112
11446
  _el$.$$pointerdown = handlePointerDown;
11113
11447
  var _ref$ = containerRef;
11114
11448
  typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
@@ -11150,6 +11484,12 @@ var init_toolbar = __esm({
11150
11484
  handlePointerDown(event);
11151
11485
  });
11152
11486
  spread(_el$8, mergeProps({
11487
+ get ["aria-label"]() {
11488
+ return props.isActive ? "Stop selecting element" : "Select element";
11489
+ },
11490
+ get ["aria-pressed"]() {
11491
+ return Boolean(props.isActive);
11492
+ },
11153
11493
  get ["class"]() {
11154
11494
  return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
11155
11495
  }
@@ -11181,6 +11521,12 @@ var init_toolbar = __esm({
11181
11521
  handlePointerDown(event);
11182
11522
  });
11183
11523
  spread(_el$1, mergeProps({
11524
+ get ["aria-label"]() {
11525
+ return `Open history${(props.historyItemCount ?? 0) > 0 ? ` (${props.historyItemCount ?? 0} items)` : ""}`;
11526
+ },
11527
+ get ["aria-expanded"]() {
11528
+ return Boolean(props.isHistoryDropdownOpen);
11529
+ },
11184
11530
  get ["class"]() {
11185
11531
  return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
11186
11532
  }
@@ -11205,7 +11551,7 @@ var init_toolbar = __esm({
11205
11551
  return props.hasUnreadHistoryItems;
11206
11552
  },
11207
11553
  get children() {
11208
- return _tmpl$27();
11554
+ return _tmpl$29();
11209
11555
  }
11210
11556
  }), null);
11211
11557
  insert(_el$0, createComponent(Tooltip, {
@@ -11260,6 +11606,12 @@ var init_toolbar = __esm({
11260
11606
  handlePointerDown(event);
11261
11607
  });
11262
11608
  spread(_el$17, mergeProps({
11609
+ get ["aria-label"]() {
11610
+ return props.isMenuOpen ? "Close more actions menu" : "Open more actions menu";
11611
+ },
11612
+ get ["aria-expanded"]() {
11613
+ return Boolean(props.isMenuOpen);
11614
+ },
11263
11615
  get ["class"]() {
11264
11616
  return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
11265
11617
  }
@@ -11313,13 +11665,13 @@ var init_toolbar = __esm({
11313
11665
  return isShakeTooltipVisible();
11314
11666
  },
11315
11667
  get children() {
11316
- var _el$23 = _tmpl$28();
11668
+ var _el$23 = _tmpl$210();
11317
11669
  createRenderEffect(() => className(_el$23, cn("absolute 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, shakeTooltipPositionClass())));
11318
11670
  return _el$23;
11319
11671
  }
11320
11672
  }), null);
11321
11673
  createRenderEffect((_p$) => {
11322
- 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 relative overflow-visible [font-synthesis:none] [corner-shape:superellipse(1.25)]", isVertical() && "flex-col", PANEL_STYLES, !isCollapsed() && (isVertical() ? "px-1.5 gap-1.5 py-2" : "py-1.5 gap-1.5 px-2"), collapsedEdgeClasses(), isShaking() && "animate-shake"), _v$5 = getTransformOrigin(), _v$6 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(!isCollapsed(), "pointer-events-none")), _v$7 = cn("flex", isVertical() ? "flex-col items-center min-h-0" : "items-center min-w-0"), _v$8 = cn("flex items-center", isVertical() && "flex-col"), _v$9 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.enabled))), _v$0 = cn("relative overflow-visible", minDimensionClass()), _v$1 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.enabled) && (props.historyItemCount ?? 0) > 0, "pointer-events-none")), _v$10 = cn("relative overflow-visible", minDimensionClass()), _v$11 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.isHistoryDropdownOpen), "pointer-events-none")), _v$12 = cn("relative overflow-visible", minDimensionClass()), _v$13 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.enabled) && hasToolbarActions(), "pointer-events-none")), _v$14 = cn("relative overflow-visible", minDimensionClass()), _v$15 = cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale outline-none", isVertical() ? "my-0.5" : "mx-0.5"), _v$16 = cn("relative rounded-full transition-colors", isVertical() ? "w-3.5 h-2.5" : "w-5 h-3", props.enabled ? "bg-black" : "bg-black/25"), _v$17 = cn("absolute top-0.5 rounded-full bg-white transition-transform", isVertical() ? "w-1.5 h-1.5" : "w-2 h-2", !props.enabled && "left-0.5", props.enabled && (isVertical() ? "left-1.5" : "left-2.5"));
11674
+ 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 relative overflow-visible [font-synthesis:none] [corner-shape:superellipse(1.25)]", isVertical() && "flex-col", PANEL_STYLES, !isCollapsed() && (isVertical() ? "px-1.5 gap-1.5 py-2" : "py-1.5 gap-1.5 px-2"), collapsedEdgeClasses(), isShaking() && "animate-shake"), _v$5 = getTransformOrigin(), _v$6 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(!isCollapsed(), "pointer-events-none")), _v$7 = cn("flex", isVertical() ? "flex-col items-center min-h-0" : "items-center min-w-0"), _v$8 = cn("flex items-center", isVertical() && "flex-col"), _v$9 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.enabled))), _v$0 = cn("relative overflow-visible", minDimensionClass()), _v$1 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.enabled) && (props.historyItemCount ?? 0) > 0, "pointer-events-none")), _v$10 = cn("relative overflow-visible", minDimensionClass()), _v$11 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.isHistoryDropdownOpen), "pointer-events-none")), _v$12 = cn("relative overflow-visible", minDimensionClass()), _v$13 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.enabled) && hasToolbarActions(), "pointer-events-none")), _v$14 = cn("relative overflow-visible", minDimensionClass()), _v$15 = props.enabled ? "Disable React Grab" : "Enable React Grab", _v$16 = Boolean(props.enabled), _v$17 = cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale outline-none", isVertical() ? "my-0.5" : "mx-0.5"), _v$18 = cn("relative rounded-full transition-colors", isVertical() ? "w-3.5 h-2.5" : "w-5 h-3", props.enabled ? "bg-black" : "bg-black/25"), _v$19 = cn("absolute top-0.5 rounded-full bg-white transition-transform", isVertical() ? "w-1.5 h-1.5" : "w-2 h-2", !props.enabled && "left-0.5", props.enabled && (isVertical() ? "left-1.5" : "left-2.5")), _v$20 = isCollapsed() ? "Expand toolbar" : "Collapse toolbar";
11323
11675
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
11324
11676
  _v$2 !== _p$.t && setStyleProperty(_el$, "transform", _p$.t = _v$2);
11325
11677
  _v$3 !== _p$.a && setStyleProperty(_el$, "transform-origin", _p$.a = _v$3);
@@ -11336,9 +11688,12 @@ var init_toolbar = __esm({
11336
11688
  _v$12 !== _p$.w && className(_el$13, _p$.w = _v$12);
11337
11689
  _v$13 !== _p$.m && className(_el$15, _p$.m = _v$13);
11338
11690
  _v$14 !== _p$.f && className(_el$16, _p$.f = _v$14);
11339
- _v$15 !== _p$.y && className(_el$19, _p$.y = _v$15);
11340
- _v$16 !== _p$.g && className(_el$20, _p$.g = _v$16);
11341
- _v$17 !== _p$.p && className(_el$21, _p$.p = _v$17);
11691
+ _v$15 !== _p$.y && setAttribute(_el$19, "aria-label", _p$.y = _v$15);
11692
+ _v$16 !== _p$.g && setAttribute(_el$19, "aria-pressed", _p$.g = _v$16);
11693
+ _v$17 !== _p$.p && className(_el$19, _p$.p = _v$17);
11694
+ _v$18 !== _p$.b && className(_el$20, _p$.b = _v$18);
11695
+ _v$19 !== _p$.T && className(_el$21, _p$.T = _v$19);
11696
+ _v$20 !== _p$.A && setAttribute(_el$22, "aria-label", _p$.A = _v$20);
11342
11697
  return _p$;
11343
11698
  }, {
11344
11699
  e: void 0,
@@ -11359,7 +11714,10 @@ var init_toolbar = __esm({
11359
11714
  f: void 0,
11360
11715
  y: void 0,
11361
11716
  g: void 0,
11362
- p: void 0
11717
+ p: void 0,
11718
+ b: void 0,
11719
+ T: void 0,
11720
+ A: void 0
11363
11721
  });
11364
11722
  return _el$;
11365
11723
  })();
@@ -11377,6 +11735,52 @@ var init_clamp_to_viewport = __esm({
11377
11735
  }
11378
11736
  });
11379
11737
 
11738
+ // src/utils/get-anchored-dropdown-position.ts
11739
+ var getAnchoredDropdownPosition;
11740
+ var init_get_anchored_dropdown_position = __esm({
11741
+ "src/utils/get-anchored-dropdown-position.ts"() {
11742
+ "use strict";
11743
+ init_clamp_to_viewport();
11744
+ getAnchoredDropdownPosition = ({
11745
+ anchor,
11746
+ measuredWidth,
11747
+ measuredHeight,
11748
+ viewportWidth,
11749
+ viewportHeight,
11750
+ anchorGapPx,
11751
+ viewportPaddingPx,
11752
+ offscreenPosition
11753
+ }) => {
11754
+ if (!anchor || measuredWidth === 0 || measuredHeight === 0) {
11755
+ return offscreenPosition;
11756
+ }
11757
+ let rawLeft;
11758
+ let rawTop;
11759
+ if (anchor.edge === "left" || anchor.edge === "right") {
11760
+ rawLeft = anchor.edge === "left" ? anchor.x + anchorGapPx : anchor.x - measuredWidth - anchorGapPx;
11761
+ rawTop = anchor.y - measuredHeight / 2;
11762
+ } else {
11763
+ rawLeft = anchor.x - measuredWidth / 2;
11764
+ rawTop = anchor.edge === "top" ? anchor.y + anchorGapPx : anchor.y - measuredHeight - anchorGapPx;
11765
+ }
11766
+ return {
11767
+ left: clampToViewport(
11768
+ rawLeft,
11769
+ measuredWidth,
11770
+ viewportWidth,
11771
+ viewportPaddingPx
11772
+ ),
11773
+ top: clampToViewport(
11774
+ rawTop,
11775
+ measuredHeight,
11776
+ viewportHeight,
11777
+ viewportPaddingPx
11778
+ )
11779
+ };
11780
+ };
11781
+ }
11782
+ });
11783
+
11380
11784
  // src/utils/is-event-from-overlay.ts
11381
11785
  var isEventFromOverlay;
11382
11786
  var init_is_event_from_overlay = __esm({
@@ -11415,7 +11819,7 @@ var init_resolve_action_enabled = __esm({
11415
11819
  });
11416
11820
 
11417
11821
  // src/components/toolbar/toolbar-menu.tsx
11418
- var _tmpl$29, _tmpl$210, _tmpl$36, _tmpl$44, ToolbarMenu;
11822
+ var _tmpl$30, _tmpl$211, _tmpl$37, _tmpl$44, ToolbarMenu;
11419
11823
  var init_toolbar_menu = __esm({
11420
11824
  "src/components/toolbar/toolbar-menu.tsx"() {
11421
11825
  "use strict";
@@ -11429,26 +11833,34 @@ var init_toolbar_menu = __esm({
11429
11833
  init_web();
11430
11834
  init_web();
11431
11835
  init_web();
11836
+ init_web();
11432
11837
  init_solid();
11433
11838
  init_constants();
11434
- init_clamp_to_viewport();
11839
+ init_get_anchored_dropdown_position();
11435
11840
  init_cn();
11436
11841
  init_format_shortcut();
11437
11842
  init_is_event_from_overlay();
11438
11843
  init_resolve_action_enabled();
11439
11844
  init_native_raf();
11440
- _tmpl$29 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-toolbar-menu class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"style=z-index:2147483647><div><div class="flex flex-col py-1">`);
11441
- _tmpl$210 = /* @__PURE__ */ template(`<div><div>`);
11442
- _tmpl$36 = /* @__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">`);
11845
+ init_create_menu_highlight();
11846
+ _tmpl$30 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-toolbar-menu class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"style=z-index:2147483647><div><div class="relative flex flex-col py-1"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">`);
11847
+ _tmpl$211 = /* @__PURE__ */ template(`<div><div>`);
11848
+ _tmpl$37 = /* @__PURE__ */ template(`<button data-react-grab-ignore-events class="relative z-1 contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default"><span class="text-[13px] leading-4 font-sans font-medium text-black">`);
11443
11849
  _tmpl$44 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
11444
11850
  ToolbarMenu = (props) => {
11445
11851
  let containerRef;
11852
+ const {
11853
+ containerRef: highlightContainerRef,
11854
+ highlightRef,
11855
+ updateHighlight,
11856
+ clearHighlight
11857
+ } = createMenuHighlight();
11446
11858
  const [measuredWidth, setMeasuredWidth] = createSignal(0);
11447
11859
  const [measuredHeight, setMeasuredHeight] = createSignal(0);
11448
11860
  const [shouldMount, setShouldMount] = createSignal(false);
11449
11861
  const [isAnimatedIn, setIsAnimatedIn] = createSignal(false);
11450
11862
  const [lastAnchorEdge, setLastAnchorEdge] = createSignal("bottom");
11451
- const [toggleTrigger, setToggleTrigger] = createSignal(0);
11863
+ const [toggleRefreshCounter, setToggleRefreshCounter] = createSignal(0);
11452
11864
  let exitAnimationTimeout;
11453
11865
  let enterAnimationFrameId;
11454
11866
  const measureContainer = () => {
@@ -11477,32 +11889,17 @@ var init_toolbar_menu = __esm({
11477
11889
  }, DROPDOWN_ANIMATION_DURATION_MS);
11478
11890
  }
11479
11891
  });
11480
- const computedPosition = () => {
11481
- const anchor = props.position;
11482
- const width = measuredWidth();
11483
- const height = measuredHeight();
11484
- if (!anchor || width === 0 || height === 0) {
11485
- return DROPDOWN_OFFSCREEN_POSITION;
11486
- }
11487
- const {
11488
- edge
11489
- } = anchor;
11490
- let rawLeft;
11491
- let rawTop;
11492
- if (edge === "left" || edge === "right") {
11493
- rawLeft = edge === "left" ? anchor.x + DROPDOWN_ANCHOR_GAP_PX : anchor.x - width - DROPDOWN_ANCHOR_GAP_PX;
11494
- rawTop = anchor.y - height / 2;
11495
- } else {
11496
- rawLeft = anchor.x - width / 2;
11497
- rawTop = edge === "top" ? anchor.y + DROPDOWN_ANCHOR_GAP_PX : anchor.y - height - DROPDOWN_ANCHOR_GAP_PX;
11498
- }
11499
- return {
11500
- left: clampToViewport(rawLeft, width, window.innerWidth, DROPDOWN_VIEWPORT_PADDING_PX),
11501
- top: clampToViewport(rawTop, height, window.innerHeight, DROPDOWN_VIEWPORT_PADDING_PX)
11502
- };
11503
- };
11504
11892
  const displayPosition = createMemo((previousPosition) => {
11505
- const position = computedPosition();
11893
+ const position = getAnchoredDropdownPosition({
11894
+ anchor: props.position,
11895
+ measuredWidth: measuredWidth(),
11896
+ measuredHeight: measuredHeight(),
11897
+ viewportWidth: window.innerWidth,
11898
+ viewportHeight: window.innerHeight,
11899
+ anchorGapPx: DROPDOWN_ANCHOR_GAP_PX,
11900
+ viewportPaddingPx: DROPDOWN_VIEWPORT_PADDING_PX,
11901
+ offscreenPosition: DROPDOWN_OFFSCREEN_POSITION
11902
+ });
11506
11903
  if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
11507
11904
  return position;
11508
11905
  }
@@ -11519,7 +11916,7 @@ var init_toolbar_menu = __esm({
11519
11916
  if (!resolveToolbarActionEnabled(action)) return;
11520
11917
  action.onAction();
11521
11918
  if (action.isActive !== void 0) {
11522
- setToggleTrigger((previous) => previous + 1);
11919
+ setToggleRefreshCounter((previous) => previous + 1);
11523
11920
  } else {
11524
11921
  props.onDismiss();
11525
11922
  }
@@ -11569,7 +11966,7 @@ var init_toolbar_menu = __esm({
11569
11966
  return shouldMount();
11570
11967
  },
11571
11968
  get children() {
11572
- var _el$ = _tmpl$29(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
11969
+ var _el$ = _tmpl$30(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
11573
11970
  _el$.$$contextmenu = handleMenuEvent;
11574
11971
  _el$.$$click = handleMenuEvent;
11575
11972
  _el$.$$mousedown = handleMenuEvent;
@@ -11577,6 +11974,8 @@ var init_toolbar_menu = __esm({
11577
11974
  var _ref$ = containerRef;
11578
11975
  typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
11579
11976
  setStyleProperty(_el$2, "min-width", `${TOOLBAR_MENU_MIN_WIDTH_PX}px`);
11977
+ use(highlightContainerRef, _el$3);
11978
+ use(highlightRef, _el$4);
11580
11979
  insert(_el$3, createComponent(For, {
11581
11980
  get each() {
11582
11981
  return props.actions;
@@ -11585,55 +11984,61 @@ var init_toolbar_menu = __esm({
11585
11984
  const isEnabled = () => resolveToolbarActionEnabled(action);
11586
11985
  const isToggle = () => action.isActive !== void 0;
11587
11986
  const toggleActive = () => {
11588
- void toggleTrigger();
11987
+ void toggleRefreshCounter();
11589
11988
  return Boolean(action.isActive?.());
11590
11989
  };
11591
11990
  return (() => {
11592
- var _el$4 = _tmpl$36(), _el$5 = _el$4.firstChild;
11593
- _el$4.$$click = (event) => handleActionClick(action, event);
11594
- _el$4.$$pointerdown = (event) => event.stopPropagation();
11595
- insert(_el$5, () => action.label);
11596
- insert(_el$4, createComponent(Show, {
11991
+ var _el$5 = _tmpl$37(), _el$6 = _el$5.firstChild;
11992
+ _el$5.$$click = (event) => handleActionClick(action, event);
11993
+ addEventListener(_el$5, "pointerleave", clearHighlight);
11994
+ _el$5.addEventListener("pointerenter", (event) => {
11995
+ if (isEnabled()) {
11996
+ updateHighlight(event.currentTarget);
11997
+ }
11998
+ });
11999
+ _el$5.$$pointerdown = (event) => event.stopPropagation();
12000
+ insert(_el$6, () => action.label);
12001
+ insert(_el$5, createComponent(Show, {
11597
12002
  get when() {
11598
12003
  return memo(() => !!!isToggle())() && action.shortcut;
11599
12004
  },
11600
12005
  children: (shortcutKey) => (() => {
11601
- var _el$8 = _tmpl$44();
11602
- insert(_el$8, () => formatShortcut(shortcutKey()));
11603
- return _el$8;
12006
+ var _el$9 = _tmpl$44();
12007
+ insert(_el$9, () => formatShortcut(shortcutKey()));
12008
+ return _el$9;
11604
12009
  })()
11605
12010
  }), null);
11606
- insert(_el$4, createComponent(Show, {
12011
+ insert(_el$5, createComponent(Show, {
11607
12012
  get when() {
11608
12013
  return isToggle();
11609
12014
  },
11610
12015
  get children() {
11611
- var _el$6 = _tmpl$210(), _el$7 = _el$6.firstChild;
12016
+ var _el$7 = _tmpl$211(), _el$8 = _el$7.firstChild;
11612
12017
  createRenderEffect((_p$) => {
11613
12018
  var _v$8 = cn("relative rounded-full transition-colors ml-4 shrink-0 w-5 h-3", toggleActive() ? "bg-black" : "bg-black/25"), _v$9 = cn("absolute top-0.5 rounded-full bg-white transition-transform w-2 h-2", toggleActive() ? "left-2.5" : "left-0.5");
11614
- _v$8 !== _p$.e && className(_el$6, _p$.e = _v$8);
11615
- _v$9 !== _p$.t && className(_el$7, _p$.t = _v$9);
12019
+ _v$8 !== _p$.e && className(_el$7, _p$.e = _v$8);
12020
+ _v$9 !== _p$.t && className(_el$8, _p$.t = _v$9);
11616
12021
  return _p$;
11617
12022
  }, {
11618
12023
  e: void 0,
11619
12024
  t: void 0
11620
12025
  });
11621
- return _el$6;
12026
+ return _el$7;
11622
12027
  }
11623
12028
  }), null);
11624
12029
  createRenderEffect((_p$) => {
11625
12030
  var _v$0 = action.id, _v$1 = !isEnabled();
11626
- _v$0 !== _p$.e && setAttribute(_el$4, "data-react-grab-menu-item", _p$.e = _v$0);
11627
- _v$1 !== _p$.t && (_el$4.disabled = _p$.t = _v$1);
12031
+ _v$0 !== _p$.e && setAttribute(_el$5, "data-react-grab-menu-item", _p$.e = _v$0);
12032
+ _v$1 !== _p$.t && (_el$5.disabled = _p$.t = _v$1);
11628
12033
  return _p$;
11629
12034
  }, {
11630
12035
  e: void 0,
11631
12036
  t: void 0
11632
12037
  });
11633
- return _el$4;
12038
+ return _el$5;
11634
12039
  })();
11635
12040
  }
11636
- }));
12041
+ }), null);
11637
12042
  createRenderEffect((_p$) => {
11638
12043
  var _v$ = `${displayPosition().top}px`, _v$2 = `${displayPosition().left}px`, _v$3 = isAnimatedIn() ? "auto" : "none", _v$4 = DROPDOWN_EDGE_TRANSFORM_ORIGIN[lastAnchorEdge()], _v$5 = isAnimatedIn() ? "1" : "0", _v$6 = isAnimatedIn() ? "scale(1)" : "scale(0.95)", _v$7 = 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);
11639
12044
  _v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
@@ -11662,7 +12067,7 @@ var init_toolbar_menu = __esm({
11662
12067
  });
11663
12068
 
11664
12069
  // src/components/context-menu.tsx
11665
- var _tmpl$30, _tmpl$211, _tmpl$37, _tmpl$45, ContextMenu;
12070
+ var _tmpl$31, _tmpl$212, _tmpl$38, _tmpl$45, ContextMenu;
11666
12071
  var init_context_menu = __esm({
11667
12072
  "src/components/context-menu.tsx"() {
11668
12073
  "use strict";
@@ -11675,6 +12080,7 @@ var init_context_menu = __esm({
11675
12080
  init_web();
11676
12081
  init_web();
11677
12082
  init_web();
12083
+ init_web();
11678
12084
  init_solid();
11679
12085
  init_constants();
11680
12086
  init_cn();
@@ -11686,12 +12092,19 @@ var init_context_menu = __esm({
11686
12092
  init_resolve_action_enabled();
11687
12093
  init_is_event_from_overlay();
11688
12094
  init_native_raf();
11689
- _tmpl$30 = /* @__PURE__ */ template(`<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5">`);
11690
- _tmpl$211 = /* @__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"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">`);
11691
- _tmpl$37 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
11692
- _tmpl$45 = /* @__PURE__ */ template(`<button data-react-grab-ignore-events class="contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer 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">`);
12095
+ init_create_menu_highlight();
12096
+ _tmpl$31 = /* @__PURE__ */ template(`<div class="relative flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">`);
12097
+ _tmpl$212 = /* @__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"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">`);
12098
+ _tmpl$38 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
12099
+ _tmpl$45 = /* @__PURE__ */ template(`<button data-react-grab-ignore-events class="relative z-1 contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default"><span class="text-[13px] leading-4 font-sans font-medium text-black">`);
11693
12100
  ContextMenu = (props) => {
11694
12101
  let containerRef;
12102
+ const {
12103
+ containerRef: highlightContainerRef,
12104
+ highlightRef,
12105
+ updateHighlight,
12106
+ clearHighlight
12107
+ } = createMenuHighlight();
11695
12108
  const [measuredWidth, setMeasuredWidth] = createSignal(0);
11696
12109
  const [measuredHeight, setMeasuredHeight] = createSignal(0);
11697
12110
  const isVisible = () => props.position !== null;
@@ -11846,7 +12259,7 @@ var init_context_menu = __esm({
11846
12259
  return isVisible();
11847
12260
  },
11848
12261
  get children() {
11849
- var _el$ = _tmpl$211(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
12262
+ var _el$ = _tmpl$212(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
11850
12263
  _el$.$$contextmenu = handleMenuEvent;
11851
12264
  _el$.$$click = handleMenuEvent;
11852
12265
  _el$.$$mousedown = handleMenuEvent;
@@ -11886,38 +12299,46 @@ var init_context_menu = __esm({
11886
12299
  }));
11887
12300
  insert(_el$2, createComponent(BottomSection, {
11888
12301
  get children() {
11889
- var _el$4 = _tmpl$30();
12302
+ var _el$4 = _tmpl$31(), _el$5 = _el$4.firstChild;
12303
+ use(highlightContainerRef, _el$4);
12304
+ use(highlightRef, _el$5);
11890
12305
  insert(_el$4, createComponent(For, {
11891
12306
  get each() {
11892
12307
  return menuItems();
11893
12308
  },
11894
12309
  children: (item) => (() => {
11895
- var _el$5 = _tmpl$45(), _el$6 = _el$5.firstChild;
11896
- _el$5.$$click = (event) => handleAction(item, event);
11897
- _el$5.$$pointerdown = (event) => event.stopPropagation();
11898
- insert(_el$6, () => item.label);
11899
- insert(_el$5, createComponent(Show, {
12310
+ var _el$6 = _tmpl$45(), _el$7 = _el$6.firstChild;
12311
+ _el$6.$$click = (event) => handleAction(item, event);
12312
+ addEventListener(_el$6, "pointerleave", clearHighlight);
12313
+ _el$6.addEventListener("pointerenter", (event) => {
12314
+ if (item.enabled) {
12315
+ updateHighlight(event.currentTarget);
12316
+ }
12317
+ });
12318
+ _el$6.$$pointerdown = (event) => event.stopPropagation();
12319
+ insert(_el$7, () => item.label);
12320
+ insert(_el$6, createComponent(Show, {
11900
12321
  get when() {
11901
12322
  return item.shortcut;
11902
12323
  },
11903
12324
  get children() {
11904
- var _el$7 = _tmpl$37();
11905
- insert(_el$7, () => formatShortcut(item.shortcut));
11906
- return _el$7;
12325
+ var _el$8 = _tmpl$38();
12326
+ insert(_el$8, () => formatShortcut(item.shortcut));
12327
+ return _el$8;
11907
12328
  }
11908
12329
  }), null);
11909
12330
  createRenderEffect((_p$) => {
11910
12331
  var _v$4 = item.label.toLowerCase(), _v$5 = !item.enabled;
11911
- _v$4 !== _p$.e && setAttribute(_el$5, "data-react-grab-menu-item", _p$.e = _v$4);
11912
- _v$5 !== _p$.t && (_el$5.disabled = _p$.t = _v$5);
12332
+ _v$4 !== _p$.e && setAttribute(_el$6, "data-react-grab-menu-item", _p$.e = _v$4);
12333
+ _v$5 !== _p$.t && (_el$6.disabled = _p$.t = _v$5);
11913
12334
  return _p$;
11914
12335
  }, {
11915
12336
  e: void 0,
11916
12337
  t: void 0
11917
12338
  });
11918
- return _el$5;
12339
+ return _el$6;
11919
12340
  })()
11920
- }));
12341
+ }), null);
11921
12342
  return _el$4;
11922
12343
  }
11923
12344
  }), null);
@@ -11941,18 +12362,18 @@ var init_context_menu = __esm({
11941
12362
  });
11942
12363
 
11943
12364
  // src/components/icons/icon-trash.tsx
11944
- var _tmpl$31, IconTrash;
12365
+ var _tmpl$39, IconTrash;
11945
12366
  var init_icon_trash = __esm({
11946
12367
  "src/components/icons/icon-trash.tsx"() {
11947
12368
  "use strict";
11948
12369
  init_web();
11949
12370
  init_web();
11950
12371
  init_web();
11951
- _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">`);
12372
+ _tmpl$39 = /* @__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">`);
11952
12373
  IconTrash = (props) => {
11953
12374
  const size = () => props.size ?? 14;
11954
12375
  return (() => {
11955
- var _el$ = _tmpl$31();
12376
+ var _el$ = _tmpl$39();
11956
12377
  createRenderEffect((_p$) => {
11957
12378
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
11958
12379
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -11971,7 +12392,7 @@ var init_icon_trash = __esm({
11971
12392
  });
11972
12393
 
11973
12394
  // src/components/history-dropdown.tsx
11974
- var _tmpl$38, _tmpl$212, _tmpl$39, _tmpl$46, ITEM_ACTION_CLASS, formatRelativeTime, getHistoryItemDisplayName, HistoryDropdown;
12395
+ var _tmpl$40, _tmpl$213, _tmpl$310, _tmpl$46, ITEM_ACTION_CLASS, formatRelativeTime, getHistoryItemDisplayName, HistoryDropdown;
11975
12396
  var init_history_dropdown = __esm({
11976
12397
  "src/components/history-dropdown.tsx"() {
11977
12398
  "use strict";
@@ -11984,20 +12405,22 @@ var init_history_dropdown = __esm({
11984
12405
  init_web();
11985
12406
  init_web();
11986
12407
  init_web();
12408
+ init_web();
11987
12409
  init_solid();
11988
12410
  init_constants();
11989
12411
  init_safe_polygon();
11990
- init_clamp_to_viewport();
12412
+ init_get_anchored_dropdown_position();
11991
12413
  init_cn();
11992
12414
  init_icon_trash();
11993
12415
  init_icon_copy();
11994
12416
  init_icon_check();
11995
12417
  init_tooltip();
11996
12418
  init_native_raf();
11997
- _tmpl$38 = /* @__PURE__ */ template(`<div class="flex items-center gap-[5px]"><div class=relative><button data-react-grab-ignore-events data-react-grab-history-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-history-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">`);
11998
- _tmpl$212 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-history-dropdown class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"style=z-index:2147483647><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">History</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">`);
11999
- _tmpl$39 = /* @__PURE__ */ template(`<span class="text-[11px] leading-3 font-sans text-black/40 truncate mt-0.5">`);
12000
- _tmpl$46 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-history-item class="group contain-layout flex items-start justify-between w-full px-2 py-1 cursor-pointer 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-history-item-remove></button><button data-react-grab-ignore-events data-react-grab-history-item-copy>`);
12419
+ init_create_menu_highlight();
12420
+ _tmpl$40 = /* @__PURE__ */ template(`<div class="flex items-center gap-[5px]"><div class=relative><button data-react-grab-ignore-events data-react-grab-history-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-history-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">`);
12421
+ _tmpl$213 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-history-dropdown class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"style=z-index:2147483647><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">History</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="relative flex flex-col max-h-[240px] overflow-y-auto -mx-2 -my-1.5 [scrollbar-width:thin] [scrollbar-color:transparent_transparent] hover:[scrollbar-color:rgba(0,0,0,0.15)_transparent]"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">`);
12422
+ _tmpl$310 = /* @__PURE__ */ template(`<span class="text-[11px] leading-3 font-sans text-black/40 truncate mt-0.5">`);
12423
+ _tmpl$46 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-history-item class="group relative z-1 contain-layout flex items-start justify-between w-full px-2 py-1 cursor-pointer 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-history-item-remove></button><button data-react-grab-ignore-events data-react-grab-history-item-copy>`);
12001
12424
  ITEM_ACTION_CLASS = "flex items-center justify-center cursor-pointer text-black/25 transition-colors press-scale";
12002
12425
  formatRelativeTime = (timestamp) => {
12003
12426
  const elapsedSeconds = Math.floor((Date.now() - timestamp) / 1e3);
@@ -12016,6 +12439,12 @@ var init_history_dropdown = __esm({
12016
12439
  };
12017
12440
  HistoryDropdown = (props) => {
12018
12441
  let containerRef;
12442
+ const {
12443
+ containerRef: highlightContainerRef,
12444
+ highlightRef,
12445
+ updateHighlight,
12446
+ clearHighlight
12447
+ } = createMenuHighlight();
12019
12448
  const safePolygonTracker = createSafePolygonTracker();
12020
12449
  const getToolbarTargetRects = () => {
12021
12450
  if (!containerRef) return null;
@@ -12075,32 +12504,17 @@ var init_history_dropdown = __esm({
12075
12504
  }, {
12076
12505
  defer: true
12077
12506
  }));
12078
- const computedPosition = () => {
12079
- const anchor = props.position;
12080
- const width = measuredWidth();
12081
- const height = measuredHeight();
12082
- if (!anchor || width === 0 || height === 0) {
12083
- return DROPDOWN_OFFSCREEN_POSITION;
12084
- }
12085
- const {
12086
- edge
12087
- } = anchor;
12088
- let rawLeft;
12089
- let rawTop;
12090
- if (edge === "left" || edge === "right") {
12091
- rawLeft = edge === "left" ? anchor.x + DROPDOWN_ANCHOR_GAP_PX : anchor.x - width - DROPDOWN_ANCHOR_GAP_PX;
12092
- rawTop = anchor.y - height / 2;
12093
- } else {
12094
- rawLeft = anchor.x - width / 2;
12095
- rawTop = edge === "top" ? anchor.y + DROPDOWN_ANCHOR_GAP_PX : anchor.y - height - DROPDOWN_ANCHOR_GAP_PX;
12096
- }
12097
- return {
12098
- left: clampToViewport(rawLeft, width, window.innerWidth, DROPDOWN_VIEWPORT_PADDING_PX),
12099
- top: clampToViewport(rawTop, height, window.innerHeight, DROPDOWN_VIEWPORT_PADDING_PX)
12100
- };
12101
- };
12102
12507
  const displayPosition = createMemo((previousPosition) => {
12103
- const position = computedPosition();
12508
+ const position = getAnchoredDropdownPosition({
12509
+ anchor: props.position,
12510
+ measuredWidth: measuredWidth(),
12511
+ measuredHeight: measuredHeight(),
12512
+ viewportWidth: window.innerWidth,
12513
+ viewportHeight: window.innerHeight,
12514
+ anchorGapPx: DROPDOWN_ANCHOR_GAP_PX,
12515
+ viewportPaddingPx: DROPDOWN_VIEWPORT_PADDING_PX,
12516
+ offscreenPosition: DROPDOWN_OFFSCREEN_POSITION
12517
+ });
12104
12518
  if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
12105
12519
  return position;
12106
12520
  }
@@ -12144,7 +12558,7 @@ var init_history_dropdown = __esm({
12144
12558
  return shouldMount();
12145
12559
  },
12146
12560
  get children() {
12147
- var _el$ = _tmpl$212(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$0 = _el$3.nextSibling, _el$1 = _el$0.firstChild;
12561
+ var _el$ = _tmpl$213(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$0 = _el$3.nextSibling, _el$1 = _el$0.firstChild, _el$10 = _el$1.firstChild;
12148
12562
  _el$.addEventListener("mouseleave", (event) => {
12149
12563
  const targetRects = getToolbarTargetRects();
12150
12564
  if (targetRects) {
@@ -12171,7 +12585,7 @@ var init_history_dropdown = __esm({
12171
12585
  return props.items.length > 0;
12172
12586
  },
12173
12587
  get children() {
12174
- var _el$5 = _tmpl$38(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$6.nextSibling, _el$9 = _el$8.firstChild;
12588
+ var _el$5 = _tmpl$40(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$6.nextSibling, _el$9 = _el$8.firstChild;
12175
12589
  _el$7.addEventListener("mouseleave", () => setActiveHeaderTooltip(null));
12176
12590
  _el$7.addEventListener("mouseenter", () => setActiveHeaderTooltip("clear"));
12177
12591
  _el$7.$$click = (event) => {
@@ -12235,26 +12649,34 @@ var init_history_dropdown = __esm({
12235
12649
  return _el$5;
12236
12650
  }
12237
12651
  }), null);
12652
+ use(highlightContainerRef, _el$1);
12653
+ use(highlightRef, _el$10);
12238
12654
  insert(_el$1, createComponent(For, {
12239
12655
  get each() {
12240
12656
  return props.items;
12241
12657
  },
12242
12658
  children: (item) => (() => {
12243
- var _el$10 = _tmpl$46(), _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$14 = _el$11.nextSibling, _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$16.firstChild, _el$18 = _el$17.nextSibling;
12244
- _el$10.addEventListener("mouseleave", () => props.onItemHover?.(null));
12245
- _el$10.addEventListener("mouseenter", () => {
12659
+ var _el$11 = _tmpl$46(), _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;
12660
+ addEventListener(_el$11, "blur", clearHighlight);
12661
+ _el$11.addEventListener("focus", (event) => updateHighlight(event.currentTarget));
12662
+ _el$11.addEventListener("mouseleave", () => {
12663
+ props.onItemHover?.(null);
12664
+ clearHighlight();
12665
+ });
12666
+ _el$11.addEventListener("mouseenter", (event) => {
12246
12667
  if (!props.disconnectedItemIds?.has(item.id)) {
12247
12668
  props.onItemHover?.(item.id);
12248
12669
  }
12670
+ updateHighlight(event.currentTarget);
12249
12671
  });
12250
- _el$10.$$keydown = (event) => {
12672
+ _el$11.$$keydown = (event) => {
12251
12673
  if (event.code === "Space" && event.currentTarget === event.target) {
12252
12674
  event.preventDefault();
12253
12675
  event.stopPropagation();
12254
12676
  props.onSelectItem?.(item);
12255
12677
  }
12256
12678
  };
12257
- _el$10.$$click = (event) => {
12679
+ _el$11.$$click = (event) => {
12258
12680
  event.stopPropagation();
12259
12681
  props.onSelectItem?.(item);
12260
12682
  setConfirmedCopyItemId(item.id);
@@ -12263,27 +12685,27 @@ var init_history_dropdown = __esm({
12263
12685
  setConfirmedCopyItemId(null);
12264
12686
  }, FEEDBACK_DURATION_MS);
12265
12687
  };
12266
- _el$10.$$pointerdown = (event) => event.stopPropagation();
12267
- insert(_el$12, () => getHistoryItemDisplayName(item));
12268
- insert(_el$11, createComponent(Show, {
12688
+ _el$11.$$pointerdown = (event) => event.stopPropagation();
12689
+ insert(_el$13, () => getHistoryItemDisplayName(item));
12690
+ insert(_el$12, createComponent(Show, {
12269
12691
  get when() {
12270
12692
  return item.commentText;
12271
12693
  },
12272
12694
  get children() {
12273
- var _el$13 = _tmpl$39();
12274
- insert(_el$13, () => item.commentText);
12275
- return _el$13;
12695
+ var _el$14 = _tmpl$310();
12696
+ insert(_el$14, () => item.commentText);
12697
+ return _el$14;
12276
12698
  }
12277
12699
  }), null);
12278
- insert(_el$15, () => formatRelativeTime(item.timestamp));
12279
- _el$17.$$click = (event) => {
12700
+ insert(_el$16, () => formatRelativeTime(item.timestamp));
12701
+ _el$18.$$click = (event) => {
12280
12702
  event.stopPropagation();
12281
12703
  props.onRemoveItem?.(item);
12282
12704
  };
12283
- insert(_el$17, createComponent(IconTrash, {
12705
+ insert(_el$18, createComponent(IconTrash, {
12284
12706
  size: DROPDOWN_ICON_SIZE_PX
12285
12707
  }));
12286
- _el$18.$$click = (event) => {
12708
+ _el$19.$$click = (event) => {
12287
12709
  event.stopPropagation();
12288
12710
  props.onCopyItem?.(item);
12289
12711
  setConfirmedCopyItemId(item.id);
@@ -12292,7 +12714,7 @@ var init_history_dropdown = __esm({
12292
12714
  setConfirmedCopyItemId(null);
12293
12715
  }, FEEDBACK_DURATION_MS);
12294
12716
  };
12295
- insert(_el$18, createComponent(Show, {
12717
+ insert(_el$19, createComponent(Show, {
12296
12718
  get when() {
12297
12719
  return confirmedCopyItemId() === item.id;
12298
12720
  },
@@ -12312,18 +12734,18 @@ var init_history_dropdown = __esm({
12312
12734
  var _v$1 = {
12313
12735
  "opacity-40 hover:opacity-100": Boolean(props.disconnectedItemIds?.has(item.id))
12314
12736
  }, _v$10 = cn(ITEM_ACTION_CLASS, "hover:text-[#B91C1C]"), _v$11 = cn(ITEM_ACTION_CLASS, "hover:text-black/60");
12315
- _p$.e = classList(_el$10, _v$1, _p$.e);
12316
- _v$10 !== _p$.t && className(_el$17, _p$.t = _v$10);
12317
- _v$11 !== _p$.a && className(_el$18, _p$.a = _v$11);
12737
+ _p$.e = classList(_el$11, _v$1, _p$.e);
12738
+ _v$10 !== _p$.t && className(_el$18, _p$.t = _v$10);
12739
+ _v$11 !== _p$.a && className(_el$19, _p$.a = _v$11);
12318
12740
  return _p$;
12319
12741
  }, {
12320
12742
  e: void 0,
12321
12743
  t: void 0,
12322
12744
  a: void 0
12323
12745
  });
12324
- return _el$10;
12746
+ return _el$11;
12325
12747
  })()
12326
- }));
12748
+ }), null);
12327
12749
  createRenderEffect((_p$) => {
12328
12750
  var _v$ = `${displayPosition().top}px`, _v$2 = `${displayPosition().left}px`, _v$3 = isAnimatedIn() ? "auto" : "none", _v$4 = DROPDOWN_EDGE_TRANSFORM_ORIGIN[lastAnchorEdge()], _v$5 = isAnimatedIn() ? "1" : "0", _v$6 = isAnimatedIn() ? "scale(1)" : "scale(0.95)", _v$7 = 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$8 = `${panelMinWidth()}px`, _v$9 = `${clampedMaxWidth()}px`, _v$0 = `${clampedMaxHeight()}px`;
12329
12751
  _v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
@@ -12358,7 +12780,7 @@ var init_history_dropdown = __esm({
12358
12780
  });
12359
12781
 
12360
12782
  // src/components/clear-history-prompt.tsx
12361
- var _tmpl$40, ClearHistoryPrompt;
12783
+ var _tmpl$41, ClearHistoryPrompt;
12362
12784
  var init_clear_history_prompt = __esm({
12363
12785
  "src/components/clear-history-prompt.tsx"() {
12364
12786
  "use strict";
@@ -12372,13 +12794,13 @@ var init_clear_history_prompt = __esm({
12372
12794
  init_web();
12373
12795
  init_solid();
12374
12796
  init_constants();
12375
- init_clamp_to_viewport();
12797
+ init_get_anchored_dropdown_position();
12376
12798
  init_cn();
12377
12799
  init_is_event_from_overlay();
12378
12800
  init_is_keyboard_event_triggered_by_input();
12379
12801
  init_discard_prompt();
12380
12802
  init_native_raf();
12381
- _tmpl$40 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-clear-history-prompt class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"style=z-index:2147483647><div>`);
12803
+ _tmpl$41 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-clear-history-prompt class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"style=z-index:2147483647><div>`);
12382
12804
  ClearHistoryPrompt = (props) => {
12383
12805
  let containerRef;
12384
12806
  const [measuredWidth, setMeasuredWidth] = createSignal(0);
@@ -12414,32 +12836,17 @@ var init_clear_history_prompt = __esm({
12414
12836
  }, DROPDOWN_ANIMATION_DURATION_MS);
12415
12837
  }
12416
12838
  });
12417
- const computedPosition = () => {
12418
- const anchor = props.position;
12419
- const width = measuredWidth();
12420
- const height = measuredHeight();
12421
- if (!anchor || width === 0 || height === 0) {
12422
- return DROPDOWN_OFFSCREEN_POSITION;
12423
- }
12424
- const {
12425
- edge
12426
- } = anchor;
12427
- let rawLeft;
12428
- let rawTop;
12429
- if (edge === "left" || edge === "right") {
12430
- rawLeft = edge === "left" ? anchor.x + DROPDOWN_ANCHOR_GAP_PX : anchor.x - width - DROPDOWN_ANCHOR_GAP_PX;
12431
- rawTop = anchor.y - height / 2;
12432
- } else {
12433
- rawLeft = anchor.x - width / 2;
12434
- rawTop = edge === "top" ? anchor.y + DROPDOWN_ANCHOR_GAP_PX : anchor.y - height - DROPDOWN_ANCHOR_GAP_PX;
12435
- }
12436
- return {
12437
- left: clampToViewport(rawLeft, width, window.innerWidth, DROPDOWN_VIEWPORT_PADDING_PX),
12438
- top: clampToViewport(rawTop, height, window.innerHeight, DROPDOWN_VIEWPORT_PADDING_PX)
12439
- };
12440
- };
12441
12839
  const displayPosition = createMemo((previousPosition) => {
12442
- const position = computedPosition();
12840
+ const position = getAnchoredDropdownPosition({
12841
+ anchor: props.position,
12842
+ measuredWidth: measuredWidth(),
12843
+ measuredHeight: measuredHeight(),
12844
+ viewportWidth: window.innerWidth,
12845
+ viewportHeight: window.innerHeight,
12846
+ anchorGapPx: DROPDOWN_ANCHOR_GAP_PX,
12847
+ viewportPaddingPx: DROPDOWN_VIEWPORT_PADDING_PX,
12848
+ offscreenPosition: DROPDOWN_OFFSCREEN_POSITION
12849
+ });
12443
12850
  if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
12444
12851
  return position;
12445
12852
  }
@@ -12460,7 +12867,6 @@ var init_clear_history_prompt = __esm({
12460
12867
  const isEscape = event.code === "Escape";
12461
12868
  if (isEnter || isEscape) {
12462
12869
  event.preventDefault();
12463
- event.stopPropagation();
12464
12870
  event.stopImmediatePropagation();
12465
12871
  if (isEscape) {
12466
12872
  props.onCancel();
@@ -12504,7 +12910,7 @@ var init_clear_history_prompt = __esm({
12504
12910
  return shouldMount();
12505
12911
  },
12506
12912
  get children() {
12507
- var _el$ = _tmpl$40(), _el$2 = _el$.firstChild;
12913
+ var _el$ = _tmpl$41(), _el$2 = _el$.firstChild;
12508
12914
  _el$.$$contextmenu = handlePromptEvent;
12509
12915
  _el$.$$click = handlePromptEvent;
12510
12916
  _el$.$$mousedown = handlePromptEvent;
@@ -12549,7 +12955,7 @@ var init_clear_history_prompt = __esm({
12549
12955
  });
12550
12956
 
12551
12957
  // src/components/renderer.tsx
12552
- var _tmpl$41, ReactGrabRenderer;
12958
+ var _tmpl$47, ReactGrabRenderer;
12553
12959
  var init_renderer = __esm({
12554
12960
  "src/components/renderer.tsx"() {
12555
12961
  "use strict";
@@ -12569,7 +12975,7 @@ var init_renderer = __esm({
12569
12975
  init_context_menu();
12570
12976
  init_history_dropdown();
12571
12977
  init_clear_history_prompt();
12572
- _tmpl$41 = /* @__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)">`);
12978
+ _tmpl$47 = /* @__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)">`);
12573
12979
  ReactGrabRenderer = (props) => {
12574
12980
  return [createComponent(OverlayCanvas, {
12575
12981
  get crosshairVisible() {
@@ -12612,7 +13018,7 @@ var init_renderer = __esm({
12612
13018
  return props.labelInstances;
12613
13019
  }
12614
13020
  }), (() => {
12615
- var _el$ = _tmpl$41();
13021
+ var _el$ = _tmpl$47();
12616
13022
  setStyleProperty(_el$, "z-index", Z_INDEX_OVERLAY_CANVAS);
12617
13023
  setStyleProperty(_el$, "box-shadow", `inset 0 0 ${FROZEN_GLOW_EDGE_PX}px ${FROZEN_GLOW_COLOR}`);
12618
13024
  createRenderEffect((_$p) => setStyleProperty(_el$, "opacity", props.isFrozen ? 1 : 0));
@@ -12734,6 +13140,12 @@ var init_renderer = __esm({
12734
13140
  get actionCycleState() {
12735
13141
  return props.selectionActionCycleState;
12736
13142
  },
13143
+ get arrowNavigationState() {
13144
+ return props.selectionArrowNavigationState;
13145
+ },
13146
+ get onArrowNavigationSelect() {
13147
+ return props.onArrowNavigationSelect;
13148
+ },
12737
13149
  get filePath() {
12738
13150
  return props.selectionFilePath;
12739
13151
  },
@@ -13629,18 +14041,6 @@ var init_create_bounds_from_drag_rect = __esm({
13629
14041
  }
13630
14042
  });
13631
14043
 
13632
- // src/utils/get-bounds-center.ts
13633
- var getBoundsCenter;
13634
- var init_get_bounds_center = __esm({
13635
- "src/utils/get-bounds-center.ts"() {
13636
- "use strict";
13637
- getBoundsCenter = (bounds) => ({
13638
- x: bounds.x + bounds.width / 2,
13639
- y: bounds.y + bounds.height / 2
13640
- });
13641
- }
13642
- });
13643
-
13644
14044
  // src/utils/is-c-like-key.ts
13645
14045
  var C_LIKE_CHARACTERS, isCLikeKey;
13646
14046
  var init_is_c_like_key = __esm({
@@ -14228,6 +14628,7 @@ var init_manager = __esm({
14228
14628
  init_create_element_bounds();
14229
14629
  init_is_element_connected();
14230
14630
  init_generate_snippet();
14631
+ init_recalculate_session_position();
14231
14632
  init_context();
14232
14633
  init_constants();
14233
14634
  init_get_tag_name();
@@ -14717,19 +15118,11 @@ var init_manager = __esm({
14717
15118
  if (newBounds.length > 0) {
14718
15119
  const oldFirstBounds = session.selectionBounds[0];
14719
15120
  const newFirstBounds = newBounds[0];
14720
- let updatedPosition = session.position;
14721
- if (oldFirstBounds && newFirstBounds) {
14722
- const oldCenterX = oldFirstBounds.x + oldFirstBounds.width / 2;
14723
- const oldHalfWidth = oldFirstBounds.width / 2;
14724
- const offsetX = session.position.x - oldCenterX;
14725
- const offsetRatio = oldHalfWidth > 0 ? offsetX / oldHalfWidth : 0;
14726
- const newCenterX = newFirstBounds.x + newFirstBounds.width / 2;
14727
- const newHalfWidth = newFirstBounds.width / 2;
14728
- updatedPosition = {
14729
- ...session.position,
14730
- x: newCenterX + offsetRatio * newHalfWidth
14731
- };
14732
- }
15121
+ const updatedPosition = recalculateSessionPosition({
15122
+ currentPosition: session.position,
15123
+ previousBounds: oldFirstBounds,
15124
+ nextBounds: newFirstBounds
15125
+ });
14733
15126
  updatedSessions.set(sessionId, {
14734
15127
  ...session,
14735
15128
  selectionBounds: newBounds,
@@ -15025,7 +15418,7 @@ var init_log_intro = __esm({
15025
15418
  init_is_extension_context();
15026
15419
  logIntro = () => {
15027
15420
  try {
15028
- const version = "0.1.19";
15421
+ const version = "0.1.21";
15029
15422
  const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
15030
15423
  console.log(
15031
15424
  `%cReact Grab${version ? ` v${version}` : ""}%c
@@ -15795,6 +16188,9 @@ var init_core = __esm({
15795
16188
  return createElementBounds(element);
15796
16189
  };
15797
16190
  let lastElementDetectionTime = 0;
16191
+ let pendingDetectionScheduledAt = 0;
16192
+ let latestDetectionX = 0;
16193
+ let latestDetectionY = 0;
15798
16194
  let dragPreviewDebounceTimerId = null;
15799
16195
  const [debouncedDragPointer, setDebouncedDragPointer] = createSignal(null);
15800
16196
  const scheduleDragPreviewUpdate = (clientX, clientY) => {
@@ -15828,6 +16224,8 @@ var init_core = __esm({
15828
16224
  const [resolvedComponentName, setResolvedComponentName] = createSignal(void 0);
15829
16225
  const [actionCycleItems, setActionCycleItems] = createSignal([]);
15830
16226
  const [actionCycleActiveIndex, setActionCycleActiveIndex] = createSignal(null);
16227
+ const [arrowNavigationElements, setArrowNavigationElements] = createSignal([]);
16228
+ const [arrowNavigationActiveIndex, setArrowNavigationActiveIndex] = createSignal(0);
15831
16229
  const arrowNavigator = createArrowNavigator(isValidGrabbableElement, createElementBounds);
15832
16230
  const autoScroller = createAutoScroller(() => store.pointer, () => isDragging());
15833
16231
  const isRendererActive = createMemo(() => isActivated() && !isCopying());
@@ -16147,6 +16545,7 @@ var init_core = __esm({
16147
16545
  });
16148
16546
  };
16149
16547
  const targetElement = createMemo(() => {
16548
+ void store.viewportVersion;
16150
16549
  if (!isRendererActive() || isDragging()) return null;
16151
16550
  const element = store.detectedElement;
16152
16551
  if (!isElementConnected(element)) return null;
@@ -16481,7 +16880,7 @@ var init_core = __esm({
16481
16880
  const wasDragging = isDragging();
16482
16881
  const previousFocused = store.previouslyFocusedElement;
16483
16882
  actions.deactivate();
16484
- arrowNavigator.clearHistory();
16883
+ clearArrowNavigation();
16485
16884
  keyboardSelectedElement = null;
16486
16885
  isPendingContextMenuSelect = false;
16487
16886
  if (wasDragging) {
@@ -16675,6 +17074,7 @@ var init_core = __esm({
16675
17074
  };
16676
17075
  const openContextMenu = (element, position) => {
16677
17076
  actions.showContextMenu(position, element);
17077
+ clearArrowNavigation();
16678
17078
  dismissAllPopups();
16679
17079
  pluginRegistry.hooks.onContextMenu(element, position);
16680
17080
  };
@@ -16714,12 +17114,19 @@ var init_core = __esm({
16714
17114
  x: clientX,
16715
17115
  y: clientY
16716
17116
  });
17117
+ latestDetectionX = clientX;
17118
+ latestDetectionY = clientY;
16717
17119
  const now = performance.now();
16718
- if (now - lastElementDetectionTime >= ELEMENT_DETECTION_THROTTLE_MS) {
17120
+ const isDetectionPending = pendingDetectionScheduledAt > 0 && now - pendingDetectionScheduledAt < PENDING_DETECTION_STALENESS_MS;
17121
+ if (now - lastElementDetectionTime >= ELEMENT_DETECTION_THROTTLE_MS && !isDetectionPending) {
16719
17122
  lastElementDetectionTime = now;
17123
+ pendingDetectionScheduledAt = now;
16720
17124
  onIdle(() => {
16721
- const candidate = getElementAtPosition(clientX, clientY);
16722
- actions.setDetectedElement(candidate);
17125
+ const candidate = getElementAtPosition(latestDetectionX, latestDetectionY);
17126
+ if (candidate !== store.detectedElement) {
17127
+ actions.setDetectedElement(candidate);
17128
+ }
17129
+ pendingDetectionScheduledAt = 0;
16723
17130
  });
16724
17131
  }
16725
17132
  if (isDragging()) {
@@ -16873,7 +17280,6 @@ var init_core = __esm({
16873
17280
  if (shouldBlockEnter) {
16874
17281
  keyboardClaimer.claimedEvents.add(event);
16875
17282
  event.preventDefault();
16876
- event.stopPropagation();
16877
17283
  event.stopImmediatePropagation();
16878
17284
  return true;
16879
17285
  }
@@ -16907,30 +17313,67 @@ var init_core = __esm({
16907
17313
  }
16908
17314
  return false;
16909
17315
  };
17316
+ const clearArrowNavigation = () => {
17317
+ setArrowNavigationElements([]);
17318
+ setArrowNavigationActiveIndex(0);
17319
+ arrowNavigator.clearHistory();
17320
+ };
17321
+ const selectAndFocusElement = (element) => {
17322
+ actions.setFrozenElement(element);
17323
+ actions.freeze();
17324
+ keyboardSelectedElement = element;
17325
+ const bounds = createElementBounds(element);
17326
+ const center = getBoundsCenter(bounds);
17327
+ actions.setPointer(center);
17328
+ if (store.contextMenuPosition !== null) {
17329
+ actions.showContextMenu(center, element);
17330
+ }
17331
+ };
17332
+ const openArrowNavigationMenu = (anchorElement) => {
17333
+ const bounds = createElementBounds(anchorElement);
17334
+ const elementsAtPoint = getElementsAtPoint(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2).filter(isValidGrabbableElement).reverse();
17335
+ setArrowNavigationElements(elementsAtPoint);
17336
+ setArrowNavigationActiveIndex(Math.max(0, elementsAtPoint.indexOf(anchorElement)));
17337
+ };
17338
+ const handleArrowNavigationSelect = (index) => {
17339
+ const targetElement2 = arrowNavigationElements()[index];
17340
+ if (!targetElement2) return;
17341
+ setArrowNavigationActiveIndex(index);
17342
+ arrowNavigator.clearHistory();
17343
+ selectAndFocusElement(targetElement2);
17344
+ };
16910
17345
  const handleArrowNavigation = (event) => {
16911
17346
  if (!isActivated() || isPromptMode()) return false;
16912
17347
  if (!ARROW_KEYS.has(event.key)) return false;
16913
17348
  let currentElement = effectiveElement();
16914
17349
  const isInitialSelection = !currentElement;
16915
17350
  if (!currentElement) {
16916
- const viewportCenterX = window.innerWidth / 2;
16917
- const viewportCenterY = window.innerHeight / 2;
16918
- currentElement = getElementAtPosition(viewportCenterX, viewportCenterY);
17351
+ currentElement = getElementAtPosition(window.innerWidth / 2, window.innerHeight / 2);
16919
17352
  }
16920
17353
  if (!currentElement) return false;
17354
+ const isVertical = event.key === "ArrowUp" || event.key === "ArrowDown";
17355
+ if (!isVertical) {
17356
+ clearArrowNavigation();
17357
+ const nextElement2 = arrowNavigator.findNext(event.key, currentElement);
17358
+ if (!nextElement2 && !isInitialSelection) return false;
17359
+ event.preventDefault();
17360
+ event.stopPropagation();
17361
+ selectAndFocusElement(nextElement2 ?? currentElement);
17362
+ return true;
17363
+ }
17364
+ if (arrowNavigationElements().length === 0) {
17365
+ openArrowNavigationMenu(currentElement);
17366
+ }
16921
17367
  const nextElement = arrowNavigator.findNext(event.key, currentElement);
16922
- if (!nextElement && !isInitialSelection) return false;
16923
17368
  const elementToSelect = nextElement ?? currentElement;
16924
17369
  event.preventDefault();
16925
17370
  event.stopPropagation();
16926
- actions.setFrozenElement(elementToSelect);
16927
- actions.freeze();
16928
- keyboardSelectedElement = elementToSelect;
16929
- const selectionBounds2 = createElementBounds(elementToSelect);
16930
- const selectionCenter = getBoundsCenter(selectionBounds2);
16931
- actions.setPointer(selectionCenter);
16932
- if (store.contextMenuPosition !== null) {
16933
- actions.showContextMenu(selectionCenter, elementToSelect);
17371
+ selectAndFocusElement(elementToSelect);
17372
+ const newIndex = arrowNavigationElements().indexOf(elementToSelect);
17373
+ if (newIndex !== -1) {
17374
+ setArrowNavigationActiveIndex(newIndex);
17375
+ } else {
17376
+ openArrowNavigationMenu(elementToSelect);
16934
17377
  }
16935
17378
  return true;
16936
17379
  };
@@ -16941,7 +17384,6 @@ var init_core = __esm({
16941
17384
  const canActivateFromCopied = !isHoldingKeys() && !isPromptMode() && !isActivated() && copiedElement && isElementConnected(copiedElement) && !store.labelInstances.some((instance) => instance.status === "copied" || instance.status === "fading");
16942
17385
  if (canActivateFromCopied) {
16943
17386
  event.preventDefault();
16944
- event.stopPropagation();
16945
17387
  event.stopImmediatePropagation();
16946
17388
  const center = getBoundsCenter(createElementBounds(copiedElement));
16947
17389
  actions.setPointer(center);
@@ -16957,7 +17399,6 @@ var init_core = __esm({
16957
17399
  const canActivateFromHolding = isHoldingKeys() && !isPromptMode();
16958
17400
  if (canActivateFromHolding) {
16959
17401
  event.preventDefault();
16960
- event.stopPropagation();
16961
17402
  event.stopImmediatePropagation();
16962
17403
  const element = store.frozenElement || targetElement();
16963
17404
  if (element) {
@@ -17016,6 +17457,15 @@ var init_core = __esm({
17016
17457
  activeIndex: actionCycleActiveIndex(),
17017
17458
  isVisible: actionCycleActiveIndex() !== null && actionCycleItems().length > 0
17018
17459
  }));
17460
+ const arrowNavigationItems = createMemo(() => arrowNavigationElements().map((element) => ({
17461
+ tagName: getTagName(element) || "element",
17462
+ componentName: getComponentDisplayName(element) ?? void 0
17463
+ })));
17464
+ const arrowNavigationState = createMemo(() => ({
17465
+ items: arrowNavigationItems(),
17466
+ activeIndex: arrowNavigationActiveIndex(),
17467
+ isVisible: arrowNavigationElements().length > 0
17468
+ }));
17019
17469
  createEffect(on(selectionElement, () => {
17020
17470
  resetActionCycle();
17021
17471
  }));
@@ -17128,7 +17578,6 @@ var init_core = __esm({
17128
17578
  if ((isActivated() || isHoldingKeys()) && !isPromptMode()) {
17129
17579
  event.preventDefault();
17130
17580
  if (isEnterCode(event.code)) {
17131
- event.stopPropagation();
17132
17581
  event.stopImmediatePropagation();
17133
17582
  }
17134
17583
  }
@@ -17332,7 +17781,7 @@ var init_core = __esm({
17332
17781
  const isActiveState = isTouchPointer ? isHoldingKeys() : isActivated();
17333
17782
  if (isActiveState && !isPromptMode() && isToggleFrozen()) {
17334
17783
  actions.unfreeze();
17335
- arrowNavigator.clearHistory();
17784
+ clearArrowNavigation();
17336
17785
  }
17337
17786
  handlePointerMove(event.clientX, event.clientY);
17338
17787
  }, {
@@ -17359,7 +17808,6 @@ var init_core = __esm({
17359
17808
  if (didHandle) {
17360
17809
  document.documentElement.setPointerCapture(event.pointerId);
17361
17810
  event.preventDefault();
17362
- event.stopPropagation();
17363
17811
  event.stopImmediatePropagation();
17364
17812
  }
17365
17813
  }, {
@@ -17377,7 +17825,12 @@ var init_core = __esm({
17377
17825
  });
17378
17826
  eventListenerManager.addWindowListener("contextmenu", (event) => {
17379
17827
  if (!isRendererActive() || isCopying() || isPromptMode()) return;
17380
- if (isEventFromOverlay(event, "data-react-grab-ignore-events")) return;
17828
+ const isFromOverlay = isEventFromOverlay(event, "data-react-grab-ignore-events");
17829
+ if (isFromOverlay && arrowNavigationElements().length > 0) {
17830
+ clearArrowNavigation();
17831
+ } else if (isFromOverlay) {
17832
+ return;
17833
+ }
17381
17834
  if (store.contextMenuPosition !== null) {
17382
17835
  event.preventDefault();
17383
17836
  return;
@@ -17413,7 +17866,6 @@ var init_core = __esm({
17413
17866
  if (store.contextMenuPosition !== null) return;
17414
17867
  if (isRendererActive() || isCopying() || didJustDrag()) {
17415
17868
  event.preventDefault();
17416
- event.stopPropagation();
17417
17869
  event.stopImmediatePropagation();
17418
17870
  if (store.wasActivatedByToggle && !isCopying() && !isPromptMode()) {
17419
17871
  if (!isHoldingKeys()) {
@@ -18265,6 +18717,10 @@ var init_core = __esm({
18265
18717
  get selectionActionCycleState() {
18266
18718
  return actionCycleState();
18267
18719
  },
18720
+ get selectionArrowNavigationState() {
18721
+ return arrowNavigationState();
18722
+ },
18723
+ onArrowNavigationSelect: handleArrowNavigationSelect,
18268
18724
  get labelInstances() {
18269
18725
  return computedLabelInstances();
18270
18726
  },