react-grab 0.1.20 → 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
 
@@ -2152,7 +2152,7 @@ var VERSION, VIEWPORT_MARGIN_PX, OFFSCREEN_POSITION, SELECTION_LERP_FACTOR, FEED
2152
2152
  var init_constants = __esm({
2153
2153
  "src/constants.ts"() {
2154
2154
  "use strict";
2155
- VERSION = "0.1.20";
2155
+ VERSION = "0.1.21";
2156
2156
  VIEWPORT_MARGIN_PX = 8;
2157
2157
  OFFSCREEN_POSITION = -1e3;
2158
2158
  SELECTION_LERP_FACTOR = 0.95;
@@ -2542,6 +2542,46 @@ var init_is_element_connected = __esm({
2542
2542
  }
2543
2543
  });
2544
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
+
2545
2585
  // src/core/store.ts
2546
2586
  var createInitialStore, createGrabStore;
2547
2587
  var init_store2 = __esm({
@@ -2551,6 +2591,7 @@ var init_store2 = __esm({
2551
2591
  init_constants();
2552
2592
  init_create_element_bounds();
2553
2593
  init_is_element_connected();
2594
+ init_recalculate_session_position();
2554
2595
  createInitialStore = (input) => ({
2555
2596
  current: { state: "idle" },
2556
2597
  wasActivatedByToggle: false,
@@ -2950,19 +2991,11 @@ var init_store2 = __esm({
2950
2991
  if (isElementConnected(element)) {
2951
2992
  const newBounds = createElementBounds(element);
2952
2993
  const oldFirstBounds = session.selectionBounds[0];
2953
- let updatedPosition = session.position;
2954
- if (oldFirstBounds) {
2955
- const oldCenterX = oldFirstBounds.x + oldFirstBounds.width / 2;
2956
- const oldHalfWidth = oldFirstBounds.width / 2;
2957
- const offsetX = session.position.x - oldCenterX;
2958
- const offsetRatio = oldHalfWidth > 0 ? offsetX / oldHalfWidth : 0;
2959
- const newCenterX = newBounds.x + newBounds.width / 2;
2960
- const newHalfWidth = newBounds.width / 2;
2961
- updatedPosition = {
2962
- ...session.position,
2963
- x: newCenterX + offsetRatio * newHalfWidth
2964
- };
2965
- }
2994
+ const updatedPosition = recalculateSessionPosition({
2995
+ currentPosition: session.position,
2996
+ previousBounds: oldFirstBounds,
2997
+ nextBounds: newBounds
2998
+ });
2966
2999
  updatedSessions.set(sessionId, {
2967
3000
  ...session,
2968
3001
  selectionBounds: [newBounds],
@@ -3894,7 +3927,7 @@ var init_truncate_string = __esm({
3894
3927
  });
3895
3928
 
3896
3929
  // src/core/context.ts
3897
- 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;
3898
3931
  var init_context = __esm({
3899
3932
  "src/core/context.ts"() {
3900
3933
  "use strict";
@@ -3904,6 +3937,16 @@ var init_context = __esm({
3904
3937
  init_constants();
3905
3938
  init_get_tag_name();
3906
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
+ ]);
3907
3950
  NEXT_INTERNAL_COMPONENT_NAMES = /* @__PURE__ */ new Set([
3908
3951
  "InnerLayoutRouter",
3909
3952
  "RedirectErrorBoundary",
@@ -3948,9 +3991,11 @@ var init_context = __esm({
3948
3991
  return cachedIsNextProject;
3949
3992
  };
3950
3993
  checkIsInternalComponentName = (name) => {
3951
- if (name.startsWith("_")) return true;
3952
3994
  if (NEXT_INTERNAL_COMPONENT_NAMES.has(name)) return true;
3953
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
+ }
3954
3999
  return false;
3955
4000
  };
3956
4001
  checkIsSourceComponentName = (name) => {
@@ -8029,12 +8074,10 @@ var init_completion_view = __esm({
8029
8074
  return (() => {
8030
8075
  var _el$ = _tmpl$15();
8031
8076
  addEventListener(_el$, "click", (event) => {
8032
- event.stopPropagation();
8033
8077
  event.stopImmediatePropagation();
8034
8078
  props.onClick();
8035
8079
  });
8036
8080
  addEventListener(_el$, "pointerdown", (event) => {
8037
- event.stopPropagation();
8038
8081
  event.stopImmediatePropagation();
8039
8082
  });
8040
8083
  insert(_el$, createComponent(IconEllipsis, {
@@ -8086,7 +8129,6 @@ var init_completion_view = __esm({
8086
8129
  const isEnterWithoutShift = event.code === "Enter" && !event.shiftKey;
8087
8130
  const isEscape = event.code === "Escape";
8088
8131
  if (!isUndoRedo) {
8089
- event.stopPropagation();
8090
8132
  event.stopImmediatePropagation();
8091
8133
  }
8092
8134
  if (isEnterWithoutShift) {
@@ -8293,8 +8335,166 @@ var init_completion_view = __esm({
8293
8335
  }
8294
8336
  });
8295
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
+
8296
8496
  // src/components/selection-label/index.tsx
8297
- 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;
8298
8498
  var init_selection_label = __esm({
8299
8499
  "src/components/selection-label/index.tsx"() {
8300
8500
  "use strict";
@@ -8308,6 +8508,7 @@ var init_selection_label = __esm({
8308
8508
  init_web();
8309
8509
  init_web();
8310
8510
  init_web();
8511
+ init_web();
8311
8512
  init_solid();
8312
8513
  init_constants();
8313
8514
  init_get_arrow_size();
@@ -8324,11 +8525,12 @@ var init_selection_label = __esm({
8324
8525
  init_discard_prompt();
8325
8526
  init_error_view();
8326
8527
  init_completion_view();
8327
- _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]">`);
8328
- _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>`);
8329
- _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">`);
8330
8532
  _tmpl$43 = /* @__PURE__ */ template(`<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5">`);
8331
- _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">`);
8332
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">`);
8333
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">`);
8334
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>`);
@@ -8368,6 +8570,7 @@ var init_selection_label = __esm({
8368
8570
  if (props.status === "error" && (props.onAcknowledgeError || props.onRetry)) {
8369
8571
  return true;
8370
8572
  }
8573
+ if (props.arrowNavigationState?.isVisible) return true;
8371
8574
  return false;
8372
8575
  };
8373
8576
  let resizeObserver;
@@ -8383,12 +8586,10 @@ var init_selection_label = __esm({
8383
8586
  const isCtrlCToAbort = event.code === "KeyC" && event.ctrlKey && props.status === "copying" && props.onAbort;
8384
8587
  if (isEnterToExpand) {
8385
8588
  event.preventDefault();
8386
- event.stopPropagation();
8387
8589
  event.stopImmediatePropagation();
8388
8590
  props.onToggleExpand?.();
8389
8591
  } else if (isCtrlCToAbort) {
8390
8592
  event.preventDefault();
8391
- event.stopPropagation();
8392
8593
  event.stopImmediatePropagation();
8393
8594
  props.onAbort?.();
8394
8595
  }
@@ -8513,7 +8714,6 @@ var init_selection_label = __esm({
8513
8714
  computedArrowPosition
8514
8715
  };
8515
8716
  });
8516
- const computedPosition = () => positionComputation().position;
8517
8717
  createEffect(() => {
8518
8718
  const result = positionComputation();
8519
8719
  if (result.computedArrowPosition !== null) {
@@ -8526,7 +8726,6 @@ var init_selection_label = __esm({
8526
8726
  if (event.isComposing || event.keyCode === IME_COMPOSING_KEY_CODE) {
8527
8727
  return;
8528
8728
  }
8529
- event.stopPropagation();
8530
8729
  event.stopImmediatePropagation();
8531
8730
  const isEnterWithoutShift = event.code === "Enter" && !event.shiftKey;
8532
8731
  const isEscape = event.code === "Escape";
@@ -8555,8 +8754,8 @@ var init_selection_label = __esm({
8555
8754
  const actionCycleItems = () => props.actionCycleState?.items ?? [];
8556
8755
  const actionCycleActiveIndex = () => props.actionCycleState?.activeIndex ?? 0;
8557
8756
  const isActionCycleVisible = () => Boolean(props.actionCycleState?.isVisible);
8757
+ const isArrowNavigationVisible = () => Boolean(props.arrowNavigationState?.isVisible);
8558
8758
  const handleTagClick = (event) => {
8559
- event.stopPropagation();
8560
8759
  event.stopImmediatePropagation();
8561
8760
  if (props.filePath && props.onOpen) {
8562
8761
  props.onOpen();
@@ -8564,7 +8763,6 @@ var init_selection_label = __esm({
8564
8763
  };
8565
8764
  const isTagClickable = () => Boolean(props.filePath && props.onOpen);
8566
8765
  const handleContainerPointerDown = (event) => {
8567
- event.stopPropagation();
8568
8766
  event.stopImmediatePropagation();
8569
8767
  const isEditableInputVisible = canInteract() && props.isPromptMode && !props.isPendingDismiss && props.onSubmit;
8570
8768
  if (isEditableInputVisible && inputRef) {
@@ -8581,7 +8779,6 @@ var init_selection_label = __esm({
8581
8779
  _el$.addEventListener("mouseleave", () => props.onHoverChange?.(false));
8582
8780
  _el$.addEventListener("mouseenter", () => props.onHoverChange?.(true));
8583
8781
  _el$.$$click = (event) => {
8584
- event.stopPropagation();
8585
8782
  event.stopImmediatePropagation();
8586
8783
  };
8587
8784
  _el$.$$pointerdown = handleContainerPointerDown;
@@ -8597,10 +8794,10 @@ var init_selection_label = __esm({
8597
8794
  return arrowPosition();
8598
8795
  },
8599
8796
  get leftPercent() {
8600
- return computedPosition().arrowLeftPercent;
8797
+ return positionComputation().position.arrowLeftPercent;
8601
8798
  },
8602
8799
  get leftOffsetPx() {
8603
- return computedPosition().arrowLeftOffset;
8800
+ return positionComputation().position.arrowLeftOffset;
8604
8801
  },
8605
8802
  get labelWidth() {
8606
8803
  return panelWidth();
@@ -8652,7 +8849,7 @@ var init_selection_label = __esm({
8652
8849
  return memo(() => props.status === "copying")() && !props.isPendingAbort;
8653
8850
  },
8654
8851
  get children() {
8655
- 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;
8656
8853
  insert(_el$4, createComponent(IconLoader, {
8657
8854
  size: 13,
8658
8855
  "class": "text-[#71717a] shrink-0"
@@ -8665,7 +8862,7 @@ var init_selection_label = __esm({
8665
8862
  get children() {
8666
8863
  return createComponent(BottomSection, {
8667
8864
  get children() {
8668
- var _el$6 = _tmpl$26(), _el$7 = _el$6.firstChild;
8865
+ var _el$6 = _tmpl$27(), _el$7 = _el$6.firstChild;
8669
8866
  var _ref$3 = inputRef;
8670
8867
  typeof _ref$3 === "function" ? use(_ref$3, _el$7) : inputRef = _el$7;
8671
8868
  insert(_el$6, createComponent(Show, {
@@ -8673,7 +8870,7 @@ var init_selection_label = __esm({
8673
8870
  return props.onAbort;
8674
8871
  },
8675
8872
  get children() {
8676
- var _el$8 = _tmpl$16();
8873
+ var _el$8 = _tmpl$17();
8677
8874
  _el$8.$$click = (event) => {
8678
8875
  event.stopPropagation();
8679
8876
  props.onAbort?.();
@@ -8727,12 +8924,28 @@ var init_selection_label = __esm({
8727
8924
  onHoverChange: handleTagHoverChange,
8728
8925
  shrink: true,
8729
8926
  get forceShowIcon() {
8730
- return Boolean(props.isContextMenuOpen);
8927
+ return memo(() => !!isArrowNavigationVisible())() ? isTagClickable() : Boolean(props.isContextMenuOpen);
8731
8928
  }
8732
8929
  }));
8733
8930
  insert(_el$9, createComponent(Show, {
8734
8931
  get when() {
8735
- 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();
8736
8949
  },
8737
8950
  get children() {
8738
8951
  return createComponent(BottomSection, {
@@ -8756,10 +8969,10 @@ var init_selection_label = __esm({
8756
8969
  }
8757
8970
  }), null);
8758
8971
  createRenderEffect((_p$) => {
8759
- var _v$1 = item.label.toLowerCase(), _v$10 = !!(itemIndex() === actionCycleActiveIndex()), _v$11 = !!(itemIndex() === actionCycleItems().length - 1);
8760
- _v$1 !== _p$.e && setAttribute(_el$17, "data-react-grab-action-cycle-item", _p$.e = _v$1);
8761
- _v$10 !== _p$.t && _el$17.classList.toggle("bg-black/5", _p$.t = _v$10);
8762
- _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);
8763
8976
  return _p$;
8764
8977
  }, {
8765
8978
  e: void 0,
@@ -8774,6 +8987,18 @@ var init_selection_label = __esm({
8774
8987
  });
8775
8988
  }
8776
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
+ });
8777
9002
  return _el$9;
8778
9003
  }
8779
9004
  }), null);
@@ -8833,9 +9058,9 @@ var init_selection_label = __esm({
8833
9058
  }
8834
9059
  }), null);
8835
9060
  createRenderEffect((_p$) => {
8836
- var _v$ = props.replyToPrompt ? "14px" : "0", _v$2 = !props.onSubmit;
8837
- _v$ !== _p$.e && setStyleProperty(_el$14, "padding-left", _p$.e = _v$);
8838
- _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);
8839
9064
  return _p$;
8840
9065
  }, {
8841
9066
  e: void 0,
@@ -8883,15 +9108,15 @@ var init_selection_label = __esm({
8883
9108
  }
8884
9109
  }), null);
8885
9110
  createRenderEffect((_p$) => {
8886
- 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;
8887
- _v$3 !== _p$.e && className(_el$, _p$.e = _v$3);
8888
- _v$4 !== _p$.t && setStyleProperty(_el$, "top", _p$.t = _v$4);
8889
- _v$5 !== _p$.a && setStyleProperty(_el$, "left", _p$.a = _v$5);
8890
- _v$6 !== _p$.o && setStyleProperty(_el$, "transform", _p$.o = _v$6);
8891
- _v$7 !== _p$.i && setStyleProperty(_el$, "pointer-events", _p$.i = _v$7);
8892
- _v$8 !== _p$.n && setStyleProperty(_el$, "opacity", _p$.n = _v$8);
8893
- _v$9 !== _p$.s && className(_el$2, _p$.s = _v$9);
8894
- _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);
8895
9120
  return _p$;
8896
9121
  }, {
8897
9122
  e: void 0,
@@ -8952,18 +9177,18 @@ var init_state = __esm({
8952
9177
  });
8953
9178
 
8954
9179
  // src/components/icons/icon-select.tsx
8955
- var _tmpl$17, IconSelect;
9180
+ var _tmpl$18, IconSelect;
8956
9181
  var init_icon_select = __esm({
8957
9182
  "src/components/icons/icon-select.tsx"() {
8958
9183
  "use strict";
8959
9184
  init_web();
8960
9185
  init_web();
8961
9186
  init_web();
8962
- _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">`);
8963
9188
  IconSelect = (props) => {
8964
9189
  const size = () => props.size ?? 14;
8965
9190
  return (() => {
8966
- var _el$ = _tmpl$17();
9191
+ var _el$ = _tmpl$18();
8967
9192
  createRenderEffect((_p$) => {
8968
9193
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
8969
9194
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -8982,18 +9207,18 @@ var init_icon_select = __esm({
8982
9207
  });
8983
9208
 
8984
9209
  // src/components/icons/icon-chevron.tsx
8985
- var _tmpl$18, IconChevron;
9210
+ var _tmpl$19, IconChevron;
8986
9211
  var init_icon_chevron = __esm({
8987
9212
  "src/components/icons/icon-chevron.tsx"() {
8988
9213
  "use strict";
8989
9214
  init_web();
8990
9215
  init_web();
8991
9216
  init_web();
8992
- _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">`);
8993
9218
  IconChevron = (props) => {
8994
9219
  const size = () => props.size ?? 12;
8995
9220
  return (() => {
8996
- var _el$ = _tmpl$18();
9221
+ var _el$ = _tmpl$19();
8997
9222
  createRenderEffect((_p$) => {
8998
9223
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
8999
9224
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -9012,18 +9237,18 @@ var init_icon_chevron = __esm({
9012
9237
  });
9013
9238
 
9014
9239
  // src/components/icons/icon-clock.tsx
9015
- var _tmpl$19, IconClock;
9240
+ var _tmpl$20, IconClock;
9016
9241
  var init_icon_clock = __esm({
9017
9242
  "src/components/icons/icon-clock.tsx"() {
9018
9243
  "use strict";
9019
9244
  init_web();
9020
9245
  init_web();
9021
9246
  init_web();
9022
- _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">`);
9023
9248
  IconClock = (props) => {
9024
9249
  const size = () => props.size ?? 14;
9025
9250
  return (() => {
9026
- var _el$ = _tmpl$19();
9251
+ var _el$ = _tmpl$20();
9027
9252
  createRenderEffect((_p$) => {
9028
9253
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
9029
9254
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -9042,18 +9267,18 @@ var init_icon_clock = __esm({
9042
9267
  });
9043
9268
 
9044
9269
  // src/components/icons/icon-copy.tsx
9045
- var _tmpl$20, IconCopy;
9270
+ var _tmpl$21, IconCopy;
9046
9271
  var init_icon_copy = __esm({
9047
9272
  "src/components/icons/icon-copy.tsx"() {
9048
9273
  "use strict";
9049
9274
  init_web();
9050
9275
  init_web();
9051
9276
  init_web();
9052
- _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">`);
9053
9278
  IconCopy = (props) => {
9054
9279
  const size = () => props.size ?? 14;
9055
9280
  return (() => {
9056
- var _el$ = _tmpl$20();
9281
+ var _el$ = _tmpl$21();
9057
9282
  createRenderEffect((_p$) => {
9058
9283
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
9059
9284
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -9647,7 +9872,7 @@ var init_freeze_gsap = __esm({
9647
9872
  });
9648
9873
 
9649
9874
  // src/utils/freeze-animations.ts
9650
- 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;
9651
9876
  var init_freeze_animations = __esm({
9652
9877
  "src/utils/freeze-animations.ts"() {
9653
9878
  "use strict";
@@ -9667,10 +9892,15 @@ var init_freeze_animations = __esm({
9667
9892
  transition: none !important;
9668
9893
  }
9669
9894
  `;
9895
+ SVG_ROOT_SELECTOR = "svg";
9670
9896
  styleElement = null;
9671
9897
  frozenElements = [];
9898
+ frozenSvgElements = [];
9672
9899
  lastInputElements = [];
9673
9900
  globalAnimationStyleElement = null;
9901
+ globalFrozenSvgElements = [];
9902
+ svgFreezeDepthMap = /* @__PURE__ */ new Map();
9903
+ frozenWaapiAnimations = [];
9674
9904
  ensureStylesInjected = () => {
9675
9905
  if (styleElement) return;
9676
9906
  styleElement = createStyleElement(
@@ -9678,7 +9908,70 @@ var init_freeze_animations = __esm({
9678
9908
  FROZEN_STYLES
9679
9909
  );
9680
9910
  };
9681
- 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
+ };
9682
9975
  freezeAllAnimations = (elements) => {
9683
9976
  if (elements.length === 0) return;
9684
9977
  if (areElementsSame(elements, lastInputElements)) return;
@@ -9686,16 +9979,27 @@ var init_freeze_animations = __esm({
9686
9979
  lastInputElements = [...elements];
9687
9980
  ensureStylesInjected();
9688
9981
  frozenElements = elements;
9982
+ frozenSvgElements = collectFrozenSvgElements(frozenElements);
9983
+ pauseSvgAnimations(frozenSvgElements);
9689
9984
  for (const element of frozenElements) {
9690
9985
  element.setAttribute(FROZEN_ELEMENT_ATTRIBUTE, "");
9691
9986
  }
9987
+ frozenWaapiAnimations = collectWaapiAnimations(frozenElements);
9988
+ for (const animation of frozenWaapiAnimations) {
9989
+ animation.pause();
9990
+ }
9692
9991
  };
9693
9992
  unfreezeAllAnimations = () => {
9694
- if (frozenElements.length === 0) return;
9993
+ if (frozenElements.length === 0 && frozenSvgElements.length === 0 && frozenWaapiAnimations.length === 0)
9994
+ return;
9695
9995
  for (const element of frozenElements) {
9696
9996
  element.removeAttribute(FROZEN_ELEMENT_ATTRIBUTE);
9697
9997
  }
9998
+ resumeSvgAnimations(frozenSvgElements);
9999
+ finishAnimations(frozenWaapiAnimations);
9698
10000
  frozenElements = [];
10001
+ frozenSvgElements = [];
10002
+ frozenWaapiAnimations = [];
9699
10003
  lastInputElements = [];
9700
10004
  };
9701
10005
  freezeAnimations = (elements) => {
@@ -9713,6 +10017,10 @@ var init_freeze_animations = __esm({
9713
10017
  "data-react-grab-global-freeze",
9714
10018
  GLOBAL_FREEZE_STYLES
9715
10019
  );
10020
+ globalFrozenSvgElements = collectFrozenSvgElements(
10021
+ Array.from(document.querySelectorAll(SVG_ROOT_SELECTOR))
10022
+ );
10023
+ pauseSvgAnimations(globalFrozenSvgElements);
9716
10024
  freezeGsap();
9717
10025
  };
9718
10026
  unfreezeGlobalAnimations = () => {
@@ -9722,6 +10030,7 @@ var init_freeze_animations = __esm({
9722
10030
  transition: none !important;
9723
10031
  }
9724
10032
  `;
10033
+ const animations = [];
9725
10034
  for (const animation of document.getAnimations()) {
9726
10035
  if (animation.effect instanceof KeyframeEffect) {
9727
10036
  const target = animation.effect.target;
@@ -9732,13 +10041,13 @@ var init_freeze_animations = __esm({
9732
10041
  }
9733
10042
  }
9734
10043
  }
9735
- try {
9736
- animation.finish();
9737
- } catch {
9738
- }
10044
+ animations.push(animation);
9739
10045
  }
10046
+ finishAnimations(animations);
9740
10047
  globalAnimationStyleElement.remove();
9741
10048
  globalAnimationStyleElement = null;
10049
+ resumeSvgAnimations(globalFrozenSvgElements);
10050
+ globalFrozenSvgElements = [];
9742
10051
  unfreezeGsap();
9743
10052
  };
9744
10053
  }
@@ -9852,7 +10161,6 @@ var init_get_element_at_position = __esm({
9852
10161
  init_is_valid_grabbable_element();
9853
10162
  init_constants();
9854
10163
  init_freeze_pseudo_states();
9855
- init_create_element_bounds();
9856
10164
  cache = null;
9857
10165
  resumeTimerId = null;
9858
10166
  scheduleResume = () => {
@@ -9911,9 +10219,6 @@ var init_get_element_at_position = __esm({
9911
10219
  }
9912
10220
  }
9913
10221
  }
9914
- if (result) {
9915
- createElementBounds(result);
9916
- }
9917
10222
  scheduleResume();
9918
10223
  cache = { clientX, clientY, element: result, timestamp: now };
9919
10224
  return result;
@@ -9927,13 +10232,13 @@ var init_get_element_at_position = __esm({
9927
10232
  });
9928
10233
 
9929
10234
  // src/utils/freeze-pseudo-states.ts
9930
- 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;
9931
10236
  var init_freeze_pseudo_states = __esm({
9932
10237
  "src/utils/freeze-pseudo-states.ts"() {
9933
10238
  "use strict";
9934
10239
  init_get_element_at_position();
9935
10240
  init_create_style_element();
9936
- POINTER_EVENTS_STYLES = "* { pointer-events: none !important; }";
10241
+ POINTER_EVENTS_STYLES = "html { pointer-events: none !important; }";
9937
10242
  MOUSE_EVENTS_TO_BLOCK = [
9938
10243
  "mouseenter",
9939
10244
  "mouseleave",
@@ -9972,80 +10277,62 @@ var init_freeze_pseudo_states = __esm({
9972
10277
  "ring-color",
9973
10278
  "ring-width"
9974
10279
  ];
9975
- ANIMATION_CONTROLLED_PROPERTIES = [
9976
- "opacity",
9977
- "transform",
9978
- "scale",
9979
- "translate",
9980
- "rotate"
9981
- ];
9982
10280
  frozenHoverElements = /* @__PURE__ */ new Map();
9983
10281
  frozenFocusElements = /* @__PURE__ */ new Map();
9984
10282
  pointerEventsStyle = null;
9985
10283
  stopEvent = (event) => {
9986
- event.stopPropagation();
9987
10284
  event.stopImmediatePropagation();
9988
10285
  };
9989
10286
  preventFocusChange = (event) => {
9990
10287
  event.preventDefault();
9991
- event.stopPropagation();
9992
10288
  event.stopImmediatePropagation();
9993
10289
  };
9994
- hasAnimationControlledProperty = (cssText) => {
9995
- const lowerCssText = cssText.toLowerCase();
9996
- return ANIMATION_CONTROLLED_PROPERTIES.some(
9997
- (prop) => lowerCssText.includes(prop)
9998
- );
9999
- };
10000
- collectHoverStates = () => {
10001
- const elementsToFreeze = [];
10002
- for (const element of document.querySelectorAll(":hover")) {
10003
- if (!(element instanceof HTMLElement)) continue;
10004
- const originalCssText = element.style.cssText;
10005
- const computed = getComputedStyle(element);
10006
- let frozenStyles = originalCssText;
10007
- for (const prop of HOVER_STYLE_PROPERTIES) {
10008
- const computedValue = computed.getPropertyValue(prop);
10009
- if (computedValue) {
10010
- frozenStyles += `${prop}: ${computedValue} !important; `;
10011
- }
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);
10012
10296
  }
10013
- elementsToFreeze.push({ element, originalCssText, frozenStyles });
10014
10297
  }
10015
- return elementsToFreeze;
10298
+ return originalPropertyValues;
10016
10299
  };
10017
- collectFocusStates = () => {
10300
+ collectPseudoStates = (selector, properties, alreadyFrozen) => {
10018
10301
  const elementsToFreeze = [];
10019
- for (const element of document.querySelectorAll(":focus, :focus-visible")) {
10302
+ for (const element of document.querySelectorAll(selector)) {
10020
10303
  if (!(element instanceof HTMLElement)) continue;
10021
- if (frozenFocusElements.has(element)) continue;
10022
- const originalCssText = element.style.cssText;
10304
+ if (alreadyFrozen?.has(element)) continue;
10023
10305
  const computed = getComputedStyle(element);
10024
- let frozenStyles = originalCssText;
10025
- 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) {
10026
10312
  const computedValue = computed.getPropertyValue(prop);
10027
10313
  if (computedValue) {
10028
10314
  frozenStyles += `${prop}: ${computedValue} !important; `;
10029
10315
  }
10030
10316
  }
10031
- elementsToFreeze.push({ element, originalCssText, frozenStyles });
10317
+ elementsToFreeze.push({ element, frozenStyles, originalPropertyValues });
10032
10318
  }
10033
10319
  return elementsToFreeze;
10034
10320
  };
10035
10321
  applyFrozenStates = (states, storageMap) => {
10036
- for (const { element, originalCssText, frozenStyles } of states) {
10037
- storageMap.set(element, originalCssText);
10322
+ for (const { element, frozenStyles, originalPropertyValues } of states) {
10323
+ storageMap.set(element, originalPropertyValues);
10038
10324
  element.style.cssText = frozenStyles;
10039
10325
  }
10040
10326
  };
10041
10327
  restoreFrozenStates = (storageMap, styleProperties) => {
10042
- for (const [element, originalCssText] of storageMap) {
10043
- if (hasAnimationControlledProperty(originalCssText)) {
10044
- 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 {
10045
10334
  element.style.removeProperty(prop);
10046
10335
  }
10047
- } else {
10048
- element.style.cssText = originalCssText;
10049
10336
  }
10050
10337
  }
10051
10338
  storageMap.clear();
@@ -10064,8 +10351,12 @@ var init_freeze_pseudo_states = __esm({
10064
10351
  for (const eventType of FOCUS_EVENTS_TO_BLOCK) {
10065
10352
  document.addEventListener(eventType, preventFocusChange, true);
10066
10353
  }
10067
- const hoverStates = collectHoverStates();
10068
- 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
+ );
10069
10360
  applyFrozenStates(hoverStates, frozenHoverElements);
10070
10361
  applyFrozenStates(focusStates, frozenFocusElements);
10071
10362
  pointerEventsStyle = createStyleElement(
@@ -10090,7 +10381,7 @@ var init_freeze_pseudo_states = __esm({
10090
10381
  });
10091
10382
 
10092
10383
  // src/components/tooltip.tsx
10093
- var _tmpl$21, tooltipCloseTimestamp, wasTooltipRecentlyVisible, Tooltip;
10384
+ var _tmpl$28, tooltipCloseTimestamp, wasTooltipRecentlyVisible, Tooltip;
10094
10385
  var init_tooltip = __esm({
10095
10386
  "src/components/tooltip.tsx"() {
10096
10387
  "use strict";
@@ -10102,7 +10393,7 @@ var init_tooltip = __esm({
10102
10393
  init_solid();
10103
10394
  init_cn();
10104
10395
  init_constants();
10105
- _tmpl$21 = /* @__PURE__ */ template(`<div style=z-index:2147483647>`);
10396
+ _tmpl$28 = /* @__PURE__ */ template(`<div style=z-index:2147483647>`);
10106
10397
  tooltipCloseTimestamp = 0;
10107
10398
  wasTooltipRecentlyVisible = () => {
10108
10399
  return Date.now() - tooltipCloseTimestamp < TOOLTIP_GRACE_PERIOD_MS;
@@ -10146,7 +10437,7 @@ var init_tooltip = __esm({
10146
10437
  return delayedVisible();
10147
10438
  },
10148
10439
  get children() {
10149
- var _el$ = _tmpl$21();
10440
+ var _el$ = _tmpl$28();
10150
10441
  insert(_el$, () => props.children);
10151
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")));
10152
10443
  return _el$;
@@ -10175,7 +10466,7 @@ var init_toolbar_layout = __esm({
10175
10466
  });
10176
10467
 
10177
10468
  // src/components/toolbar/index.tsx
10178
- var _tmpl$27, _tmpl$28, _tmpl$35, Toolbar;
10469
+ var _tmpl$29, _tmpl$210, _tmpl$36, Toolbar;
10179
10470
  var init_toolbar = __esm({
10180
10471
  "src/components/toolbar/index.tsx"() {
10181
10472
  "use strict";
@@ -10191,6 +10482,7 @@ var init_toolbar = __esm({
10191
10482
  init_web();
10192
10483
  init_web();
10193
10484
  init_web();
10485
+ init_web();
10194
10486
  init_solid();
10195
10487
  init_cn();
10196
10488
  init_format_shortcut();
@@ -10208,9 +10500,9 @@ var init_toolbar = __esm({
10208
10500
  init_tooltip();
10209
10501
  init_toolbar_layout();
10210
10502
  init_native_raf();
10211
- _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]">`);
10212
- _tmpl$28 = /* @__PURE__ */ template(`<div style=z-index:2147483647>Enable to continue`);
10213
- _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">`);
10214
10506
  Toolbar = (props) => {
10215
10507
  let containerRef;
10216
10508
  let expandableButtonsRef;
@@ -10316,7 +10608,6 @@ var init_toolbar = __esm({
10316
10608
  return `left-1/2 -translate-x-1/2 ${placementClass}`;
10317
10609
  };
10318
10610
  const stopEventPropagation = (event) => {
10319
- event.stopPropagation();
10320
10611
  event.stopImmediatePropagation();
10321
10612
  };
10322
10613
  const createFreezeHandlers = (setTooltipVisible, options) => ({
@@ -10585,7 +10876,6 @@ var init_toolbar = __esm({
10585
10876
  };
10586
10877
  let didDragOccur = false;
10587
10878
  const createDragAwareHandler = (callback) => (event) => {
10588
- event.stopPropagation();
10589
10879
  event.stopImmediatePropagation();
10590
10880
  if (didDragOccur) {
10591
10881
  didDragOccur = false;
@@ -11150,9 +11440,9 @@ var init_toolbar = __esm({
11150
11440
  }
11151
11441
  };
11152
11442
  return (() => {
11153
- 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;
11154
11444
  _el$.addEventListener("mouseleave", () => props.onSelectHoverChange?.(false));
11155
- _el$.addEventListener("mouseenter", () => props.onSelectHoverChange?.(true));
11445
+ _el$.addEventListener("mouseenter", () => !isCollapsed() && props.onSelectHoverChange?.(true));
11156
11446
  _el$.$$pointerdown = handlePointerDown;
11157
11447
  var _ref$ = containerRef;
11158
11448
  typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
@@ -11194,6 +11484,12 @@ var init_toolbar = __esm({
11194
11484
  handlePointerDown(event);
11195
11485
  });
11196
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
+ },
11197
11493
  get ["class"]() {
11198
11494
  return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
11199
11495
  }
@@ -11225,6 +11521,12 @@ var init_toolbar = __esm({
11225
11521
  handlePointerDown(event);
11226
11522
  });
11227
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
+ },
11228
11530
  get ["class"]() {
11229
11531
  return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
11230
11532
  }
@@ -11249,7 +11551,7 @@ var init_toolbar = __esm({
11249
11551
  return props.hasUnreadHistoryItems;
11250
11552
  },
11251
11553
  get children() {
11252
- return _tmpl$27();
11554
+ return _tmpl$29();
11253
11555
  }
11254
11556
  }), null);
11255
11557
  insert(_el$0, createComponent(Tooltip, {
@@ -11304,6 +11606,12 @@ var init_toolbar = __esm({
11304
11606
  handlePointerDown(event);
11305
11607
  });
11306
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
+ },
11307
11615
  get ["class"]() {
11308
11616
  return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
11309
11617
  }
@@ -11357,13 +11665,13 @@ var init_toolbar = __esm({
11357
11665
  return isShakeTooltipVisible();
11358
11666
  },
11359
11667
  get children() {
11360
- var _el$23 = _tmpl$28();
11668
+ var _el$23 = _tmpl$210();
11361
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())));
11362
11670
  return _el$23;
11363
11671
  }
11364
11672
  }), null);
11365
11673
  createRenderEffect((_p$) => {
11366
- 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";
11367
11675
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
11368
11676
  _v$2 !== _p$.t && setStyleProperty(_el$, "transform", _p$.t = _v$2);
11369
11677
  _v$3 !== _p$.a && setStyleProperty(_el$, "transform-origin", _p$.a = _v$3);
@@ -11380,9 +11688,12 @@ var init_toolbar = __esm({
11380
11688
  _v$12 !== _p$.w && className(_el$13, _p$.w = _v$12);
11381
11689
  _v$13 !== _p$.m && className(_el$15, _p$.m = _v$13);
11382
11690
  _v$14 !== _p$.f && className(_el$16, _p$.f = _v$14);
11383
- _v$15 !== _p$.y && className(_el$19, _p$.y = _v$15);
11384
- _v$16 !== _p$.g && className(_el$20, _p$.g = _v$16);
11385
- _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);
11386
11697
  return _p$;
11387
11698
  }, {
11388
11699
  e: void 0,
@@ -11403,7 +11714,10 @@ var init_toolbar = __esm({
11403
11714
  f: void 0,
11404
11715
  y: void 0,
11405
11716
  g: void 0,
11406
- p: void 0
11717
+ p: void 0,
11718
+ b: void 0,
11719
+ T: void 0,
11720
+ A: void 0
11407
11721
  });
11408
11722
  return _el$;
11409
11723
  })();
@@ -11421,6 +11735,52 @@ var init_clamp_to_viewport = __esm({
11421
11735
  }
11422
11736
  });
11423
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
+
11424
11784
  // src/utils/is-event-from-overlay.ts
11425
11785
  var isEventFromOverlay;
11426
11786
  var init_is_event_from_overlay = __esm({
@@ -11459,7 +11819,7 @@ var init_resolve_action_enabled = __esm({
11459
11819
  });
11460
11820
 
11461
11821
  // src/components/toolbar/toolbar-menu.tsx
11462
- var _tmpl$29, _tmpl$210, _tmpl$36, _tmpl$44, ToolbarMenu;
11822
+ var _tmpl$30, _tmpl$211, _tmpl$37, _tmpl$44, ToolbarMenu;
11463
11823
  var init_toolbar_menu = __esm({
11464
11824
  "src/components/toolbar/toolbar-menu.tsx"() {
11465
11825
  "use strict";
@@ -11473,26 +11833,34 @@ var init_toolbar_menu = __esm({
11473
11833
  init_web();
11474
11834
  init_web();
11475
11835
  init_web();
11836
+ init_web();
11476
11837
  init_solid();
11477
11838
  init_constants();
11478
- init_clamp_to_viewport();
11839
+ init_get_anchored_dropdown_position();
11479
11840
  init_cn();
11480
11841
  init_format_shortcut();
11481
11842
  init_is_event_from_overlay();
11482
11843
  init_resolve_action_enabled();
11483
11844
  init_native_raf();
11484
- _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">`);
11485
- _tmpl$210 = /* @__PURE__ */ template(`<div><div>`);
11486
- _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">`);
11487
11849
  _tmpl$44 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
11488
11850
  ToolbarMenu = (props) => {
11489
11851
  let containerRef;
11852
+ const {
11853
+ containerRef: highlightContainerRef,
11854
+ highlightRef,
11855
+ updateHighlight,
11856
+ clearHighlight
11857
+ } = createMenuHighlight();
11490
11858
  const [measuredWidth, setMeasuredWidth] = createSignal(0);
11491
11859
  const [measuredHeight, setMeasuredHeight] = createSignal(0);
11492
11860
  const [shouldMount, setShouldMount] = createSignal(false);
11493
11861
  const [isAnimatedIn, setIsAnimatedIn] = createSignal(false);
11494
11862
  const [lastAnchorEdge, setLastAnchorEdge] = createSignal("bottom");
11495
- const [toggleTrigger, setToggleTrigger] = createSignal(0);
11863
+ const [toggleRefreshCounter, setToggleRefreshCounter] = createSignal(0);
11496
11864
  let exitAnimationTimeout;
11497
11865
  let enterAnimationFrameId;
11498
11866
  const measureContainer = () => {
@@ -11521,32 +11889,17 @@ var init_toolbar_menu = __esm({
11521
11889
  }, DROPDOWN_ANIMATION_DURATION_MS);
11522
11890
  }
11523
11891
  });
11524
- const computedPosition = () => {
11525
- const anchor = props.position;
11526
- const width = measuredWidth();
11527
- const height = measuredHeight();
11528
- if (!anchor || width === 0 || height === 0) {
11529
- return DROPDOWN_OFFSCREEN_POSITION;
11530
- }
11531
- const {
11532
- edge
11533
- } = anchor;
11534
- let rawLeft;
11535
- let rawTop;
11536
- if (edge === "left" || edge === "right") {
11537
- rawLeft = edge === "left" ? anchor.x + DROPDOWN_ANCHOR_GAP_PX : anchor.x - width - DROPDOWN_ANCHOR_GAP_PX;
11538
- rawTop = anchor.y - height / 2;
11539
- } else {
11540
- rawLeft = anchor.x - width / 2;
11541
- rawTop = edge === "top" ? anchor.y + DROPDOWN_ANCHOR_GAP_PX : anchor.y - height - DROPDOWN_ANCHOR_GAP_PX;
11542
- }
11543
- return {
11544
- left: clampToViewport(rawLeft, width, window.innerWidth, DROPDOWN_VIEWPORT_PADDING_PX),
11545
- top: clampToViewport(rawTop, height, window.innerHeight, DROPDOWN_VIEWPORT_PADDING_PX)
11546
- };
11547
- };
11548
11892
  const displayPosition = createMemo((previousPosition) => {
11549
- 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
+ });
11550
11903
  if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
11551
11904
  return position;
11552
11905
  }
@@ -11563,7 +11916,7 @@ var init_toolbar_menu = __esm({
11563
11916
  if (!resolveToolbarActionEnabled(action)) return;
11564
11917
  action.onAction();
11565
11918
  if (action.isActive !== void 0) {
11566
- setToggleTrigger((previous) => previous + 1);
11919
+ setToggleRefreshCounter((previous) => previous + 1);
11567
11920
  } else {
11568
11921
  props.onDismiss();
11569
11922
  }
@@ -11613,7 +11966,7 @@ var init_toolbar_menu = __esm({
11613
11966
  return shouldMount();
11614
11967
  },
11615
11968
  get children() {
11616
- 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;
11617
11970
  _el$.$$contextmenu = handleMenuEvent;
11618
11971
  _el$.$$click = handleMenuEvent;
11619
11972
  _el$.$$mousedown = handleMenuEvent;
@@ -11621,6 +11974,8 @@ var init_toolbar_menu = __esm({
11621
11974
  var _ref$ = containerRef;
11622
11975
  typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
11623
11976
  setStyleProperty(_el$2, "min-width", `${TOOLBAR_MENU_MIN_WIDTH_PX}px`);
11977
+ use(highlightContainerRef, _el$3);
11978
+ use(highlightRef, _el$4);
11624
11979
  insert(_el$3, createComponent(For, {
11625
11980
  get each() {
11626
11981
  return props.actions;
@@ -11629,55 +11984,61 @@ var init_toolbar_menu = __esm({
11629
11984
  const isEnabled = () => resolveToolbarActionEnabled(action);
11630
11985
  const isToggle = () => action.isActive !== void 0;
11631
11986
  const toggleActive = () => {
11632
- void toggleTrigger();
11987
+ void toggleRefreshCounter();
11633
11988
  return Boolean(action.isActive?.());
11634
11989
  };
11635
11990
  return (() => {
11636
- var _el$4 = _tmpl$36(), _el$5 = _el$4.firstChild;
11637
- _el$4.$$click = (event) => handleActionClick(action, event);
11638
- _el$4.$$pointerdown = (event) => event.stopPropagation();
11639
- insert(_el$5, () => action.label);
11640
- 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, {
11641
12002
  get when() {
11642
12003
  return memo(() => !!!isToggle())() && action.shortcut;
11643
12004
  },
11644
12005
  children: (shortcutKey) => (() => {
11645
- var _el$8 = _tmpl$44();
11646
- insert(_el$8, () => formatShortcut(shortcutKey()));
11647
- return _el$8;
12006
+ var _el$9 = _tmpl$44();
12007
+ insert(_el$9, () => formatShortcut(shortcutKey()));
12008
+ return _el$9;
11648
12009
  })()
11649
12010
  }), null);
11650
- insert(_el$4, createComponent(Show, {
12011
+ insert(_el$5, createComponent(Show, {
11651
12012
  get when() {
11652
12013
  return isToggle();
11653
12014
  },
11654
12015
  get children() {
11655
- var _el$6 = _tmpl$210(), _el$7 = _el$6.firstChild;
12016
+ var _el$7 = _tmpl$211(), _el$8 = _el$7.firstChild;
11656
12017
  createRenderEffect((_p$) => {
11657
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");
11658
- _v$8 !== _p$.e && className(_el$6, _p$.e = _v$8);
11659
- _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);
11660
12021
  return _p$;
11661
12022
  }, {
11662
12023
  e: void 0,
11663
12024
  t: void 0
11664
12025
  });
11665
- return _el$6;
12026
+ return _el$7;
11666
12027
  }
11667
12028
  }), null);
11668
12029
  createRenderEffect((_p$) => {
11669
12030
  var _v$0 = action.id, _v$1 = !isEnabled();
11670
- _v$0 !== _p$.e && setAttribute(_el$4, "data-react-grab-menu-item", _p$.e = _v$0);
11671
- _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);
11672
12033
  return _p$;
11673
12034
  }, {
11674
12035
  e: void 0,
11675
12036
  t: void 0
11676
12037
  });
11677
- return _el$4;
12038
+ return _el$5;
11678
12039
  })();
11679
12040
  }
11680
- }));
12041
+ }), null);
11681
12042
  createRenderEffect((_p$) => {
11682
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);
11683
12044
  _v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
@@ -11706,7 +12067,7 @@ var init_toolbar_menu = __esm({
11706
12067
  });
11707
12068
 
11708
12069
  // src/components/context-menu.tsx
11709
- var _tmpl$30, _tmpl$211, _tmpl$37, _tmpl$45, ContextMenu;
12070
+ var _tmpl$31, _tmpl$212, _tmpl$38, _tmpl$45, ContextMenu;
11710
12071
  var init_context_menu = __esm({
11711
12072
  "src/components/context-menu.tsx"() {
11712
12073
  "use strict";
@@ -11719,6 +12080,7 @@ var init_context_menu = __esm({
11719
12080
  init_web();
11720
12081
  init_web();
11721
12082
  init_web();
12083
+ init_web();
11722
12084
  init_solid();
11723
12085
  init_constants();
11724
12086
  init_cn();
@@ -11730,12 +12092,19 @@ var init_context_menu = __esm({
11730
12092
  init_resolve_action_enabled();
11731
12093
  init_is_event_from_overlay();
11732
12094
  init_native_raf();
11733
- _tmpl$30 = /* @__PURE__ */ template(`<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5">`);
11734
- _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">`);
11735
- _tmpl$37 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
11736
- _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">`);
11737
12100
  ContextMenu = (props) => {
11738
12101
  let containerRef;
12102
+ const {
12103
+ containerRef: highlightContainerRef,
12104
+ highlightRef,
12105
+ updateHighlight,
12106
+ clearHighlight
12107
+ } = createMenuHighlight();
11739
12108
  const [measuredWidth, setMeasuredWidth] = createSignal(0);
11740
12109
  const [measuredHeight, setMeasuredHeight] = createSignal(0);
11741
12110
  const isVisible = () => props.position !== null;
@@ -11890,7 +12259,7 @@ var init_context_menu = __esm({
11890
12259
  return isVisible();
11891
12260
  },
11892
12261
  get children() {
11893
- 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;
11894
12263
  _el$.$$contextmenu = handleMenuEvent;
11895
12264
  _el$.$$click = handleMenuEvent;
11896
12265
  _el$.$$mousedown = handleMenuEvent;
@@ -11930,38 +12299,46 @@ var init_context_menu = __esm({
11930
12299
  }));
11931
12300
  insert(_el$2, createComponent(BottomSection, {
11932
12301
  get children() {
11933
- 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);
11934
12305
  insert(_el$4, createComponent(For, {
11935
12306
  get each() {
11936
12307
  return menuItems();
11937
12308
  },
11938
12309
  children: (item) => (() => {
11939
- var _el$5 = _tmpl$45(), _el$6 = _el$5.firstChild;
11940
- _el$5.$$click = (event) => handleAction(item, event);
11941
- _el$5.$$pointerdown = (event) => event.stopPropagation();
11942
- insert(_el$6, () => item.label);
11943
- 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, {
11944
12321
  get when() {
11945
12322
  return item.shortcut;
11946
12323
  },
11947
12324
  get children() {
11948
- var _el$7 = _tmpl$37();
11949
- insert(_el$7, () => formatShortcut(item.shortcut));
11950
- return _el$7;
12325
+ var _el$8 = _tmpl$38();
12326
+ insert(_el$8, () => formatShortcut(item.shortcut));
12327
+ return _el$8;
11951
12328
  }
11952
12329
  }), null);
11953
12330
  createRenderEffect((_p$) => {
11954
12331
  var _v$4 = item.label.toLowerCase(), _v$5 = !item.enabled;
11955
- _v$4 !== _p$.e && setAttribute(_el$5, "data-react-grab-menu-item", _p$.e = _v$4);
11956
- _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);
11957
12334
  return _p$;
11958
12335
  }, {
11959
12336
  e: void 0,
11960
12337
  t: void 0
11961
12338
  });
11962
- return _el$5;
12339
+ return _el$6;
11963
12340
  })()
11964
- }));
12341
+ }), null);
11965
12342
  return _el$4;
11966
12343
  }
11967
12344
  }), null);
@@ -11985,18 +12362,18 @@ var init_context_menu = __esm({
11985
12362
  });
11986
12363
 
11987
12364
  // src/components/icons/icon-trash.tsx
11988
- var _tmpl$31, IconTrash;
12365
+ var _tmpl$39, IconTrash;
11989
12366
  var init_icon_trash = __esm({
11990
12367
  "src/components/icons/icon-trash.tsx"() {
11991
12368
  "use strict";
11992
12369
  init_web();
11993
12370
  init_web();
11994
12371
  init_web();
11995
- _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">`);
11996
12373
  IconTrash = (props) => {
11997
12374
  const size = () => props.size ?? 14;
11998
12375
  return (() => {
11999
- var _el$ = _tmpl$31();
12376
+ var _el$ = _tmpl$39();
12000
12377
  createRenderEffect((_p$) => {
12001
12378
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
12002
12379
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -12015,7 +12392,7 @@ var init_icon_trash = __esm({
12015
12392
  });
12016
12393
 
12017
12394
  // src/components/history-dropdown.tsx
12018
- 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;
12019
12396
  var init_history_dropdown = __esm({
12020
12397
  "src/components/history-dropdown.tsx"() {
12021
12398
  "use strict";
@@ -12028,20 +12405,22 @@ var init_history_dropdown = __esm({
12028
12405
  init_web();
12029
12406
  init_web();
12030
12407
  init_web();
12408
+ init_web();
12031
12409
  init_solid();
12032
12410
  init_constants();
12033
12411
  init_safe_polygon();
12034
- init_clamp_to_viewport();
12412
+ init_get_anchored_dropdown_position();
12035
12413
  init_cn();
12036
12414
  init_icon_trash();
12037
12415
  init_icon_copy();
12038
12416
  init_icon_check();
12039
12417
  init_tooltip();
12040
12418
  init_native_raf();
12041
- _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">`);
12042
- _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">`);
12043
- _tmpl$39 = /* @__PURE__ */ template(`<span class="text-[11px] leading-3 font-sans text-black/40 truncate mt-0.5">`);
12044
- _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>`);
12045
12424
  ITEM_ACTION_CLASS = "flex items-center justify-center cursor-pointer text-black/25 transition-colors press-scale";
12046
12425
  formatRelativeTime = (timestamp) => {
12047
12426
  const elapsedSeconds = Math.floor((Date.now() - timestamp) / 1e3);
@@ -12060,6 +12439,12 @@ var init_history_dropdown = __esm({
12060
12439
  };
12061
12440
  HistoryDropdown = (props) => {
12062
12441
  let containerRef;
12442
+ const {
12443
+ containerRef: highlightContainerRef,
12444
+ highlightRef,
12445
+ updateHighlight,
12446
+ clearHighlight
12447
+ } = createMenuHighlight();
12063
12448
  const safePolygonTracker = createSafePolygonTracker();
12064
12449
  const getToolbarTargetRects = () => {
12065
12450
  if (!containerRef) return null;
@@ -12119,32 +12504,17 @@ var init_history_dropdown = __esm({
12119
12504
  }, {
12120
12505
  defer: true
12121
12506
  }));
12122
- const computedPosition = () => {
12123
- const anchor = props.position;
12124
- const width = measuredWidth();
12125
- const height = measuredHeight();
12126
- if (!anchor || width === 0 || height === 0) {
12127
- return DROPDOWN_OFFSCREEN_POSITION;
12128
- }
12129
- const {
12130
- edge
12131
- } = anchor;
12132
- let rawLeft;
12133
- let rawTop;
12134
- if (edge === "left" || edge === "right") {
12135
- rawLeft = edge === "left" ? anchor.x + DROPDOWN_ANCHOR_GAP_PX : anchor.x - width - DROPDOWN_ANCHOR_GAP_PX;
12136
- rawTop = anchor.y - height / 2;
12137
- } else {
12138
- rawLeft = anchor.x - width / 2;
12139
- rawTop = edge === "top" ? anchor.y + DROPDOWN_ANCHOR_GAP_PX : anchor.y - height - DROPDOWN_ANCHOR_GAP_PX;
12140
- }
12141
- return {
12142
- left: clampToViewport(rawLeft, width, window.innerWidth, DROPDOWN_VIEWPORT_PADDING_PX),
12143
- top: clampToViewport(rawTop, height, window.innerHeight, DROPDOWN_VIEWPORT_PADDING_PX)
12144
- };
12145
- };
12146
12507
  const displayPosition = createMemo((previousPosition) => {
12147
- 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
+ });
12148
12518
  if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
12149
12519
  return position;
12150
12520
  }
@@ -12188,7 +12558,7 @@ var init_history_dropdown = __esm({
12188
12558
  return shouldMount();
12189
12559
  },
12190
12560
  get children() {
12191
- 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;
12192
12562
  _el$.addEventListener("mouseleave", (event) => {
12193
12563
  const targetRects = getToolbarTargetRects();
12194
12564
  if (targetRects) {
@@ -12215,7 +12585,7 @@ var init_history_dropdown = __esm({
12215
12585
  return props.items.length > 0;
12216
12586
  },
12217
12587
  get children() {
12218
- 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;
12219
12589
  _el$7.addEventListener("mouseleave", () => setActiveHeaderTooltip(null));
12220
12590
  _el$7.addEventListener("mouseenter", () => setActiveHeaderTooltip("clear"));
12221
12591
  _el$7.$$click = (event) => {
@@ -12279,26 +12649,34 @@ var init_history_dropdown = __esm({
12279
12649
  return _el$5;
12280
12650
  }
12281
12651
  }), null);
12652
+ use(highlightContainerRef, _el$1);
12653
+ use(highlightRef, _el$10);
12282
12654
  insert(_el$1, createComponent(For, {
12283
12655
  get each() {
12284
12656
  return props.items;
12285
12657
  },
12286
12658
  children: (item) => (() => {
12287
- 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;
12288
- _el$10.addEventListener("mouseleave", () => props.onItemHover?.(null));
12289
- _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) => {
12290
12667
  if (!props.disconnectedItemIds?.has(item.id)) {
12291
12668
  props.onItemHover?.(item.id);
12292
12669
  }
12670
+ updateHighlight(event.currentTarget);
12293
12671
  });
12294
- _el$10.$$keydown = (event) => {
12672
+ _el$11.$$keydown = (event) => {
12295
12673
  if (event.code === "Space" && event.currentTarget === event.target) {
12296
12674
  event.preventDefault();
12297
12675
  event.stopPropagation();
12298
12676
  props.onSelectItem?.(item);
12299
12677
  }
12300
12678
  };
12301
- _el$10.$$click = (event) => {
12679
+ _el$11.$$click = (event) => {
12302
12680
  event.stopPropagation();
12303
12681
  props.onSelectItem?.(item);
12304
12682
  setConfirmedCopyItemId(item.id);
@@ -12307,27 +12685,27 @@ var init_history_dropdown = __esm({
12307
12685
  setConfirmedCopyItemId(null);
12308
12686
  }, FEEDBACK_DURATION_MS);
12309
12687
  };
12310
- _el$10.$$pointerdown = (event) => event.stopPropagation();
12311
- insert(_el$12, () => getHistoryItemDisplayName(item));
12312
- insert(_el$11, createComponent(Show, {
12688
+ _el$11.$$pointerdown = (event) => event.stopPropagation();
12689
+ insert(_el$13, () => getHistoryItemDisplayName(item));
12690
+ insert(_el$12, createComponent(Show, {
12313
12691
  get when() {
12314
12692
  return item.commentText;
12315
12693
  },
12316
12694
  get children() {
12317
- var _el$13 = _tmpl$39();
12318
- insert(_el$13, () => item.commentText);
12319
- return _el$13;
12695
+ var _el$14 = _tmpl$310();
12696
+ insert(_el$14, () => item.commentText);
12697
+ return _el$14;
12320
12698
  }
12321
12699
  }), null);
12322
- insert(_el$15, () => formatRelativeTime(item.timestamp));
12323
- _el$17.$$click = (event) => {
12700
+ insert(_el$16, () => formatRelativeTime(item.timestamp));
12701
+ _el$18.$$click = (event) => {
12324
12702
  event.stopPropagation();
12325
12703
  props.onRemoveItem?.(item);
12326
12704
  };
12327
- insert(_el$17, createComponent(IconTrash, {
12705
+ insert(_el$18, createComponent(IconTrash, {
12328
12706
  size: DROPDOWN_ICON_SIZE_PX
12329
12707
  }));
12330
- _el$18.$$click = (event) => {
12708
+ _el$19.$$click = (event) => {
12331
12709
  event.stopPropagation();
12332
12710
  props.onCopyItem?.(item);
12333
12711
  setConfirmedCopyItemId(item.id);
@@ -12336,7 +12714,7 @@ var init_history_dropdown = __esm({
12336
12714
  setConfirmedCopyItemId(null);
12337
12715
  }, FEEDBACK_DURATION_MS);
12338
12716
  };
12339
- insert(_el$18, createComponent(Show, {
12717
+ insert(_el$19, createComponent(Show, {
12340
12718
  get when() {
12341
12719
  return confirmedCopyItemId() === item.id;
12342
12720
  },
@@ -12356,18 +12734,18 @@ var init_history_dropdown = __esm({
12356
12734
  var _v$1 = {
12357
12735
  "opacity-40 hover:opacity-100": Boolean(props.disconnectedItemIds?.has(item.id))
12358
12736
  }, _v$10 = cn(ITEM_ACTION_CLASS, "hover:text-[#B91C1C]"), _v$11 = cn(ITEM_ACTION_CLASS, "hover:text-black/60");
12359
- _p$.e = classList(_el$10, _v$1, _p$.e);
12360
- _v$10 !== _p$.t && className(_el$17, _p$.t = _v$10);
12361
- _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);
12362
12740
  return _p$;
12363
12741
  }, {
12364
12742
  e: void 0,
12365
12743
  t: void 0,
12366
12744
  a: void 0
12367
12745
  });
12368
- return _el$10;
12746
+ return _el$11;
12369
12747
  })()
12370
- }));
12748
+ }), null);
12371
12749
  createRenderEffect((_p$) => {
12372
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`;
12373
12751
  _v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
@@ -12402,7 +12780,7 @@ var init_history_dropdown = __esm({
12402
12780
  });
12403
12781
 
12404
12782
  // src/components/clear-history-prompt.tsx
12405
- var _tmpl$40, ClearHistoryPrompt;
12783
+ var _tmpl$41, ClearHistoryPrompt;
12406
12784
  var init_clear_history_prompt = __esm({
12407
12785
  "src/components/clear-history-prompt.tsx"() {
12408
12786
  "use strict";
@@ -12416,13 +12794,13 @@ var init_clear_history_prompt = __esm({
12416
12794
  init_web();
12417
12795
  init_solid();
12418
12796
  init_constants();
12419
- init_clamp_to_viewport();
12797
+ init_get_anchored_dropdown_position();
12420
12798
  init_cn();
12421
12799
  init_is_event_from_overlay();
12422
12800
  init_is_keyboard_event_triggered_by_input();
12423
12801
  init_discard_prompt();
12424
12802
  init_native_raf();
12425
- _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>`);
12426
12804
  ClearHistoryPrompt = (props) => {
12427
12805
  let containerRef;
12428
12806
  const [measuredWidth, setMeasuredWidth] = createSignal(0);
@@ -12458,32 +12836,17 @@ var init_clear_history_prompt = __esm({
12458
12836
  }, DROPDOWN_ANIMATION_DURATION_MS);
12459
12837
  }
12460
12838
  });
12461
- const computedPosition = () => {
12462
- const anchor = props.position;
12463
- const width = measuredWidth();
12464
- const height = measuredHeight();
12465
- if (!anchor || width === 0 || height === 0) {
12466
- return DROPDOWN_OFFSCREEN_POSITION;
12467
- }
12468
- const {
12469
- edge
12470
- } = anchor;
12471
- let rawLeft;
12472
- let rawTop;
12473
- if (edge === "left" || edge === "right") {
12474
- rawLeft = edge === "left" ? anchor.x + DROPDOWN_ANCHOR_GAP_PX : anchor.x - width - DROPDOWN_ANCHOR_GAP_PX;
12475
- rawTop = anchor.y - height / 2;
12476
- } else {
12477
- rawLeft = anchor.x - width / 2;
12478
- rawTop = edge === "top" ? anchor.y + DROPDOWN_ANCHOR_GAP_PX : anchor.y - height - DROPDOWN_ANCHOR_GAP_PX;
12479
- }
12480
- return {
12481
- left: clampToViewport(rawLeft, width, window.innerWidth, DROPDOWN_VIEWPORT_PADDING_PX),
12482
- top: clampToViewport(rawTop, height, window.innerHeight, DROPDOWN_VIEWPORT_PADDING_PX)
12483
- };
12484
- };
12485
12839
  const displayPosition = createMemo((previousPosition) => {
12486
- 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
+ });
12487
12850
  if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
12488
12851
  return position;
12489
12852
  }
@@ -12504,7 +12867,6 @@ var init_clear_history_prompt = __esm({
12504
12867
  const isEscape = event.code === "Escape";
12505
12868
  if (isEnter || isEscape) {
12506
12869
  event.preventDefault();
12507
- event.stopPropagation();
12508
12870
  event.stopImmediatePropagation();
12509
12871
  if (isEscape) {
12510
12872
  props.onCancel();
@@ -12548,7 +12910,7 @@ var init_clear_history_prompt = __esm({
12548
12910
  return shouldMount();
12549
12911
  },
12550
12912
  get children() {
12551
- var _el$ = _tmpl$40(), _el$2 = _el$.firstChild;
12913
+ var _el$ = _tmpl$41(), _el$2 = _el$.firstChild;
12552
12914
  _el$.$$contextmenu = handlePromptEvent;
12553
12915
  _el$.$$click = handlePromptEvent;
12554
12916
  _el$.$$mousedown = handlePromptEvent;
@@ -12593,7 +12955,7 @@ var init_clear_history_prompt = __esm({
12593
12955
  });
12594
12956
 
12595
12957
  // src/components/renderer.tsx
12596
- var _tmpl$41, ReactGrabRenderer;
12958
+ var _tmpl$47, ReactGrabRenderer;
12597
12959
  var init_renderer = __esm({
12598
12960
  "src/components/renderer.tsx"() {
12599
12961
  "use strict";
@@ -12613,7 +12975,7 @@ var init_renderer = __esm({
12613
12975
  init_context_menu();
12614
12976
  init_history_dropdown();
12615
12977
  init_clear_history_prompt();
12616
- _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)">`);
12617
12979
  ReactGrabRenderer = (props) => {
12618
12980
  return [createComponent(OverlayCanvas, {
12619
12981
  get crosshairVisible() {
@@ -12656,7 +13018,7 @@ var init_renderer = __esm({
12656
13018
  return props.labelInstances;
12657
13019
  }
12658
13020
  }), (() => {
12659
- var _el$ = _tmpl$41();
13021
+ var _el$ = _tmpl$47();
12660
13022
  setStyleProperty(_el$, "z-index", Z_INDEX_OVERLAY_CANVAS);
12661
13023
  setStyleProperty(_el$, "box-shadow", `inset 0 0 ${FROZEN_GLOW_EDGE_PX}px ${FROZEN_GLOW_COLOR}`);
12662
13024
  createRenderEffect((_$p) => setStyleProperty(_el$, "opacity", props.isFrozen ? 1 : 0));
@@ -12778,6 +13140,12 @@ var init_renderer = __esm({
12778
13140
  get actionCycleState() {
12779
13141
  return props.selectionActionCycleState;
12780
13142
  },
13143
+ get arrowNavigationState() {
13144
+ return props.selectionArrowNavigationState;
13145
+ },
13146
+ get onArrowNavigationSelect() {
13147
+ return props.onArrowNavigationSelect;
13148
+ },
12781
13149
  get filePath() {
12782
13150
  return props.selectionFilePath;
12783
13151
  },
@@ -13673,18 +14041,6 @@ var init_create_bounds_from_drag_rect = __esm({
13673
14041
  }
13674
14042
  });
13675
14043
 
13676
- // src/utils/get-bounds-center.ts
13677
- var getBoundsCenter;
13678
- var init_get_bounds_center = __esm({
13679
- "src/utils/get-bounds-center.ts"() {
13680
- "use strict";
13681
- getBoundsCenter = (bounds) => ({
13682
- x: bounds.x + bounds.width / 2,
13683
- y: bounds.y + bounds.height / 2
13684
- });
13685
- }
13686
- });
13687
-
13688
14044
  // src/utils/is-c-like-key.ts
13689
14045
  var C_LIKE_CHARACTERS, isCLikeKey;
13690
14046
  var init_is_c_like_key = __esm({
@@ -14272,6 +14628,7 @@ var init_manager = __esm({
14272
14628
  init_create_element_bounds();
14273
14629
  init_is_element_connected();
14274
14630
  init_generate_snippet();
14631
+ init_recalculate_session_position();
14275
14632
  init_context();
14276
14633
  init_constants();
14277
14634
  init_get_tag_name();
@@ -14761,19 +15118,11 @@ var init_manager = __esm({
14761
15118
  if (newBounds.length > 0) {
14762
15119
  const oldFirstBounds = session.selectionBounds[0];
14763
15120
  const newFirstBounds = newBounds[0];
14764
- let updatedPosition = session.position;
14765
- if (oldFirstBounds && newFirstBounds) {
14766
- const oldCenterX = oldFirstBounds.x + oldFirstBounds.width / 2;
14767
- const oldHalfWidth = oldFirstBounds.width / 2;
14768
- const offsetX = session.position.x - oldCenterX;
14769
- const offsetRatio = oldHalfWidth > 0 ? offsetX / oldHalfWidth : 0;
14770
- const newCenterX = newFirstBounds.x + newFirstBounds.width / 2;
14771
- const newHalfWidth = newFirstBounds.width / 2;
14772
- updatedPosition = {
14773
- ...session.position,
14774
- x: newCenterX + offsetRatio * newHalfWidth
14775
- };
14776
- }
15121
+ const updatedPosition = recalculateSessionPosition({
15122
+ currentPosition: session.position,
15123
+ previousBounds: oldFirstBounds,
15124
+ nextBounds: newFirstBounds
15125
+ });
14777
15126
  updatedSessions.set(sessionId, {
14778
15127
  ...session,
14779
15128
  selectionBounds: newBounds,
@@ -15069,7 +15418,7 @@ var init_log_intro = __esm({
15069
15418
  init_is_extension_context();
15070
15419
  logIntro = () => {
15071
15420
  try {
15072
- const version = "0.1.20";
15421
+ const version = "0.1.21";
15073
15422
  const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
15074
15423
  console.log(
15075
15424
  `%cReact Grab${version ? ` v${version}` : ""}%c
@@ -15875,6 +16224,8 @@ var init_core = __esm({
15875
16224
  const [resolvedComponentName, setResolvedComponentName] = createSignal(void 0);
15876
16225
  const [actionCycleItems, setActionCycleItems] = createSignal([]);
15877
16226
  const [actionCycleActiveIndex, setActionCycleActiveIndex] = createSignal(null);
16227
+ const [arrowNavigationElements, setArrowNavigationElements] = createSignal([]);
16228
+ const [arrowNavigationActiveIndex, setArrowNavigationActiveIndex] = createSignal(0);
15878
16229
  const arrowNavigator = createArrowNavigator(isValidGrabbableElement, createElementBounds);
15879
16230
  const autoScroller = createAutoScroller(() => store.pointer, () => isDragging());
15880
16231
  const isRendererActive = createMemo(() => isActivated() && !isCopying());
@@ -16194,6 +16545,7 @@ var init_core = __esm({
16194
16545
  });
16195
16546
  };
16196
16547
  const targetElement = createMemo(() => {
16548
+ void store.viewportVersion;
16197
16549
  if (!isRendererActive() || isDragging()) return null;
16198
16550
  const element = store.detectedElement;
16199
16551
  if (!isElementConnected(element)) return null;
@@ -16528,7 +16880,7 @@ var init_core = __esm({
16528
16880
  const wasDragging = isDragging();
16529
16881
  const previousFocused = store.previouslyFocusedElement;
16530
16882
  actions.deactivate();
16531
- arrowNavigator.clearHistory();
16883
+ clearArrowNavigation();
16532
16884
  keyboardSelectedElement = null;
16533
16885
  isPendingContextMenuSelect = false;
16534
16886
  if (wasDragging) {
@@ -16722,6 +17074,7 @@ var init_core = __esm({
16722
17074
  };
16723
17075
  const openContextMenu = (element, position) => {
16724
17076
  actions.showContextMenu(position, element);
17077
+ clearArrowNavigation();
16725
17078
  dismissAllPopups();
16726
17079
  pluginRegistry.hooks.onContextMenu(element, position);
16727
17080
  };
@@ -16927,7 +17280,6 @@ var init_core = __esm({
16927
17280
  if (shouldBlockEnter) {
16928
17281
  keyboardClaimer.claimedEvents.add(event);
16929
17282
  event.preventDefault();
16930
- event.stopPropagation();
16931
17283
  event.stopImmediatePropagation();
16932
17284
  return true;
16933
17285
  }
@@ -16961,30 +17313,67 @@ var init_core = __esm({
16961
17313
  }
16962
17314
  return false;
16963
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
+ };
16964
17345
  const handleArrowNavigation = (event) => {
16965
17346
  if (!isActivated() || isPromptMode()) return false;
16966
17347
  if (!ARROW_KEYS.has(event.key)) return false;
16967
17348
  let currentElement = effectiveElement();
16968
17349
  const isInitialSelection = !currentElement;
16969
17350
  if (!currentElement) {
16970
- const viewportCenterX = window.innerWidth / 2;
16971
- const viewportCenterY = window.innerHeight / 2;
16972
- currentElement = getElementAtPosition(viewportCenterX, viewportCenterY);
17351
+ currentElement = getElementAtPosition(window.innerWidth / 2, window.innerHeight / 2);
16973
17352
  }
16974
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
+ }
16975
17367
  const nextElement = arrowNavigator.findNext(event.key, currentElement);
16976
- if (!nextElement && !isInitialSelection) return false;
16977
17368
  const elementToSelect = nextElement ?? currentElement;
16978
17369
  event.preventDefault();
16979
17370
  event.stopPropagation();
16980
- actions.setFrozenElement(elementToSelect);
16981
- actions.freeze();
16982
- keyboardSelectedElement = elementToSelect;
16983
- const selectionBounds2 = createElementBounds(elementToSelect);
16984
- const selectionCenter = getBoundsCenter(selectionBounds2);
16985
- actions.setPointer(selectionCenter);
16986
- if (store.contextMenuPosition !== null) {
16987
- 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);
16988
17377
  }
16989
17378
  return true;
16990
17379
  };
@@ -16995,7 +17384,6 @@ var init_core = __esm({
16995
17384
  const canActivateFromCopied = !isHoldingKeys() && !isPromptMode() && !isActivated() && copiedElement && isElementConnected(copiedElement) && !store.labelInstances.some((instance) => instance.status === "copied" || instance.status === "fading");
16996
17385
  if (canActivateFromCopied) {
16997
17386
  event.preventDefault();
16998
- event.stopPropagation();
16999
17387
  event.stopImmediatePropagation();
17000
17388
  const center = getBoundsCenter(createElementBounds(copiedElement));
17001
17389
  actions.setPointer(center);
@@ -17011,7 +17399,6 @@ var init_core = __esm({
17011
17399
  const canActivateFromHolding = isHoldingKeys() && !isPromptMode();
17012
17400
  if (canActivateFromHolding) {
17013
17401
  event.preventDefault();
17014
- event.stopPropagation();
17015
17402
  event.stopImmediatePropagation();
17016
17403
  const element = store.frozenElement || targetElement();
17017
17404
  if (element) {
@@ -17070,6 +17457,15 @@ var init_core = __esm({
17070
17457
  activeIndex: actionCycleActiveIndex(),
17071
17458
  isVisible: actionCycleActiveIndex() !== null && actionCycleItems().length > 0
17072
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
+ }));
17073
17469
  createEffect(on(selectionElement, () => {
17074
17470
  resetActionCycle();
17075
17471
  }));
@@ -17182,7 +17578,6 @@ var init_core = __esm({
17182
17578
  if ((isActivated() || isHoldingKeys()) && !isPromptMode()) {
17183
17579
  event.preventDefault();
17184
17580
  if (isEnterCode(event.code)) {
17185
- event.stopPropagation();
17186
17581
  event.stopImmediatePropagation();
17187
17582
  }
17188
17583
  }
@@ -17386,7 +17781,7 @@ var init_core = __esm({
17386
17781
  const isActiveState = isTouchPointer ? isHoldingKeys() : isActivated();
17387
17782
  if (isActiveState && !isPromptMode() && isToggleFrozen()) {
17388
17783
  actions.unfreeze();
17389
- arrowNavigator.clearHistory();
17784
+ clearArrowNavigation();
17390
17785
  }
17391
17786
  handlePointerMove(event.clientX, event.clientY);
17392
17787
  }, {
@@ -17413,7 +17808,6 @@ var init_core = __esm({
17413
17808
  if (didHandle) {
17414
17809
  document.documentElement.setPointerCapture(event.pointerId);
17415
17810
  event.preventDefault();
17416
- event.stopPropagation();
17417
17811
  event.stopImmediatePropagation();
17418
17812
  }
17419
17813
  }, {
@@ -17431,7 +17825,12 @@ var init_core = __esm({
17431
17825
  });
17432
17826
  eventListenerManager.addWindowListener("contextmenu", (event) => {
17433
17827
  if (!isRendererActive() || isCopying() || isPromptMode()) return;
17434
- 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
+ }
17435
17834
  if (store.contextMenuPosition !== null) {
17436
17835
  event.preventDefault();
17437
17836
  return;
@@ -17467,7 +17866,6 @@ var init_core = __esm({
17467
17866
  if (store.contextMenuPosition !== null) return;
17468
17867
  if (isRendererActive() || isCopying() || didJustDrag()) {
17469
17868
  event.preventDefault();
17470
- event.stopPropagation();
17471
17869
  event.stopImmediatePropagation();
17472
17870
  if (store.wasActivatedByToggle && !isCopying() && !isPromptMode()) {
17473
17871
  if (!isHoldingKeys()) {
@@ -18319,6 +18717,10 @@ var init_core = __esm({
18319
18717
  get selectionActionCycleState() {
18320
18718
  return actionCycleState();
18321
18719
  },
18720
+ get selectionArrowNavigationState() {
18721
+ return arrowNavigationState();
18722
+ },
18723
+ onArrowNavigationSelect: handleArrowNavigationSelect,
18322
18724
  get labelInstances() {
18323
18725
  return computedLabelInstances();
18324
18726
  },