react-grab 0.1.20 → 0.1.22

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.22";
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, findNearestFiberElement, 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) => {
@@ -4073,6 +4118,15 @@ var init_context = __esm({
4073
4118
  };
4074
4119
  });
4075
4120
  };
4121
+ findNearestFiberElement = (element) => {
4122
+ if (!Ee()) return element;
4123
+ let current = element;
4124
+ while (current) {
4125
+ if (Pe(current)) return current;
4126
+ current = current.parentElement;
4127
+ }
4128
+ return element;
4129
+ };
4076
4130
  stackCache = /* @__PURE__ */ new WeakMap();
4077
4131
  fetchStackForElement = async (element) => {
4078
4132
  try {
@@ -4090,10 +4144,11 @@ var init_context = __esm({
4090
4144
  };
4091
4145
  getStack = (element) => {
4092
4146
  if (!Ee()) return Promise.resolve([]);
4093
- const cached = stackCache.get(element);
4147
+ const resolvedElement = findNearestFiberElement(element);
4148
+ const cached = stackCache.get(resolvedElement);
4094
4149
  if (cached) return cached;
4095
- const promise = fetchStackForElement(element);
4096
- stackCache.set(element, promise);
4150
+ const promise = fetchStackForElement(resolvedElement);
4151
+ stackCache.set(resolvedElement, promise);
4097
4152
  return promise;
4098
4153
  };
4099
4154
  getNearestComponentName = async (element) => {
@@ -4129,7 +4184,8 @@ var init_context = __esm({
4129
4184
  };
4130
4185
  getComponentDisplayName = (element) => {
4131
4186
  if (!Ee()) return null;
4132
- const fiber = Pe(element);
4187
+ const resolvedElement = findNearestFiberElement(element);
4188
+ const fiber = Pe(resolvedElement);
4133
4189
  if (!fiber) return null;
4134
4190
  let currentFiber = fiber.return;
4135
4191
  while (currentFiber) {
@@ -4216,12 +4272,13 @@ var init_context = __esm({
4216
4272
  return "";
4217
4273
  };
4218
4274
  getElementContext = async (element, options = {}) => {
4219
- const html = getHTMLPreview(element);
4220
- const stackContext = await getStackContext(element, options);
4275
+ const resolvedElement = findNearestFiberElement(element);
4276
+ const html = getHTMLPreview(resolvedElement);
4277
+ const stackContext = await getStackContext(resolvedElement, options);
4221
4278
  if (stackContext) {
4222
4279
  return `${html}${stackContext}`;
4223
4280
  }
4224
- return getFallbackContext(element);
4281
+ return getFallbackContext(resolvedElement);
4225
4282
  };
4226
4283
  getFallbackContext = (element) => {
4227
4284
  const tagName = getTagName(element);
@@ -8029,12 +8086,10 @@ var init_completion_view = __esm({
8029
8086
  return (() => {
8030
8087
  var _el$ = _tmpl$15();
8031
8088
  addEventListener(_el$, "click", (event) => {
8032
- event.stopPropagation();
8033
8089
  event.stopImmediatePropagation();
8034
8090
  props.onClick();
8035
8091
  });
8036
8092
  addEventListener(_el$, "pointerdown", (event) => {
8037
- event.stopPropagation();
8038
8093
  event.stopImmediatePropagation();
8039
8094
  });
8040
8095
  insert(_el$, createComponent(IconEllipsis, {
@@ -8086,7 +8141,6 @@ var init_completion_view = __esm({
8086
8141
  const isEnterWithoutShift = event.code === "Enter" && !event.shiftKey;
8087
8142
  const isEscape = event.code === "Escape";
8088
8143
  if (!isUndoRedo) {
8089
- event.stopPropagation();
8090
8144
  event.stopImmediatePropagation();
8091
8145
  }
8092
8146
  if (isEnterWithoutShift) {
@@ -8293,8 +8347,166 @@ var init_completion_view = __esm({
8293
8347
  }
8294
8348
  });
8295
8349
 
8350
+ // src/utils/create-menu-highlight.ts
8351
+ var DEFAULT_HIDDEN_OPACITY, DEFAULT_VISIBLE_OPACITY, createAnimatedBoundsFollower, createMenuHighlight;
8352
+ var init_create_menu_highlight = __esm({
8353
+ "src/utils/create-menu-highlight.ts"() {
8354
+ "use strict";
8355
+ DEFAULT_HIDDEN_OPACITY = "0";
8356
+ DEFAULT_VISIBLE_OPACITY = "1";
8357
+ createAnimatedBoundsFollower = ({
8358
+ hiddenOpacity = DEFAULT_HIDDEN_OPACITY,
8359
+ visibleOpacity = DEFAULT_VISIBLE_OPACITY
8360
+ } = {}) => {
8361
+ let containerElement;
8362
+ let followerElement;
8363
+ const hideFollower = () => {
8364
+ if (!followerElement) return;
8365
+ followerElement.style.opacity = hiddenOpacity;
8366
+ };
8367
+ const followElement = (targetElement) => {
8368
+ if (!followerElement || !containerElement) return;
8369
+ if (!targetElement) {
8370
+ hideFollower();
8371
+ return;
8372
+ }
8373
+ const containerRect = containerElement.getBoundingClientRect();
8374
+ const targetRect = targetElement.getBoundingClientRect();
8375
+ const targetTopWithinContainer = targetRect.top - containerRect.top + containerElement.scrollTop;
8376
+ const targetLeftWithinContainer = targetRect.left - containerRect.left + containerElement.scrollLeft;
8377
+ followerElement.style.opacity = visibleOpacity;
8378
+ followerElement.style.top = `${targetTopWithinContainer}px`;
8379
+ followerElement.style.left = `${targetLeftWithinContainer}px`;
8380
+ followerElement.style.width = `${targetRect.width}px`;
8381
+ followerElement.style.height = `${targetRect.height}px`;
8382
+ };
8383
+ const setContainerRef = (containerNode) => {
8384
+ containerElement = containerNode;
8385
+ };
8386
+ const setFollowerRef = (followerNode) => {
8387
+ followerElement = followerNode;
8388
+ };
8389
+ return {
8390
+ containerRef: setContainerRef,
8391
+ followerRef: setFollowerRef,
8392
+ followElement,
8393
+ hideFollower
8394
+ };
8395
+ };
8396
+ createMenuHighlight = () => {
8397
+ const {
8398
+ containerRef,
8399
+ followerRef: highlightRef,
8400
+ followElement: updateHighlight,
8401
+ hideFollower: clearHighlight
8402
+ } = createAnimatedBoundsFollower();
8403
+ return {
8404
+ containerRef,
8405
+ highlightRef,
8406
+ updateHighlight,
8407
+ clearHighlight
8408
+ };
8409
+ };
8410
+ }
8411
+ });
8412
+
8413
+ // src/components/selection-label/arrow-navigation-menu.tsx
8414
+ var _tmpl$16, _tmpl$26, _tmpl$34, ArrowNavigationMenu;
8415
+ var init_arrow_navigation_menu = __esm({
8416
+ "src/components/selection-label/arrow-navigation-menu.tsx"() {
8417
+ "use strict";
8418
+ init_web();
8419
+ init_web();
8420
+ init_web();
8421
+ init_web();
8422
+ init_web();
8423
+ init_web();
8424
+ init_web();
8425
+ init_web();
8426
+ init_solid();
8427
+ init_create_menu_highlight();
8428
+ init_bottom_section();
8429
+ _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">`);
8430
+ _tmpl$26 = /* @__PURE__ */ template(`<span class=text-black/40>.`);
8431
+ _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">`);
8432
+ ArrowNavigationMenu = (props) => {
8433
+ const {
8434
+ containerRef: highlightContainerRef,
8435
+ highlightRef,
8436
+ updateHighlight,
8437
+ clearHighlight
8438
+ } = createMenuHighlight();
8439
+ let itemRefs = [];
8440
+ createEffect(() => {
8441
+ const itemRef = itemRefs[props.activeIndex];
8442
+ if (itemRef) {
8443
+ updateHighlight(itemRef);
8444
+ }
8445
+ });
8446
+ return createComponent(BottomSection, {
8447
+ get children() {
8448
+ var _el$ = _tmpl$16(), _el$2 = _el$.firstChild;
8449
+ use(highlightContainerRef, _el$);
8450
+ use(highlightRef, _el$2);
8451
+ insert(_el$, createComponent(For, {
8452
+ get each() {
8453
+ return props.items;
8454
+ },
8455
+ children: (item, itemIndex) => (() => {
8456
+ var _el$3 = _tmpl$34(), _el$4 = _el$3.firstChild;
8457
+ _el$3.$$click = (event) => {
8458
+ event.stopPropagation();
8459
+ props.onSelect(itemIndex());
8460
+ };
8461
+ _el$3.addEventListener("pointerleave", () => {
8462
+ const activeRef = itemRefs[props.activeIndex];
8463
+ if (activeRef) {
8464
+ updateHighlight(activeRef);
8465
+ } else {
8466
+ clearHighlight();
8467
+ }
8468
+ });
8469
+ _el$3.addEventListener("pointerenter", (event) => {
8470
+ updateHighlight(event.currentTarget);
8471
+ props.onSelect(itemIndex());
8472
+ });
8473
+ _el$3.$$pointerdown = (event) => event.stopPropagation();
8474
+ use((element) => {
8475
+ itemRefs[itemIndex()] = element;
8476
+ }, _el$3);
8477
+ insert(_el$4, createComponent(Show, {
8478
+ get when() {
8479
+ return item.componentName;
8480
+ },
8481
+ get children() {
8482
+ return [memo(() => item.componentName), _tmpl$26()];
8483
+ }
8484
+ }), null);
8485
+ insert(_el$4, () => item.tagName, null);
8486
+ createRenderEffect((_p$) => {
8487
+ var _v$ = item.tagName, _v$2 = !!(itemIndex() === props.activeIndex), _v$3 = !!(itemIndex() !== props.activeIndex);
8488
+ _v$ !== _p$.e && setAttribute(_el$3, "data-react-grab-arrow-nav-item", _p$.e = _v$);
8489
+ _v$2 !== _p$.t && _el$4.classList.toggle("text-black", _p$.t = _v$2);
8490
+ _v$3 !== _p$.a && _el$4.classList.toggle("text-black/30", _p$.a = _v$3);
8491
+ return _p$;
8492
+ }, {
8493
+ e: void 0,
8494
+ t: void 0,
8495
+ a: void 0
8496
+ });
8497
+ return _el$3;
8498
+ })()
8499
+ }), null);
8500
+ return _el$;
8501
+ }
8502
+ });
8503
+ };
8504
+ delegateEvents(["pointerdown", "click"]);
8505
+ }
8506
+ });
8507
+
8296
8508
  // 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;
8509
+ 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
8510
  var init_selection_label = __esm({
8299
8511
  "src/components/selection-label/index.tsx"() {
8300
8512
  "use strict";
@@ -8308,6 +8520,7 @@ var init_selection_label = __esm({
8308
8520
  init_web();
8309
8521
  init_web();
8310
8522
  init_web();
8523
+ init_web();
8311
8524
  init_solid();
8312
8525
  init_constants();
8313
8526
  init_get_arrow_size();
@@ -8324,11 +8537,12 @@ var init_selection_label = __esm({
8324
8537
  init_discard_prompt();
8325
8538
  init_error_view();
8326
8539
  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">`);
8540
+ init_arrow_navigation_menu();
8541
+ _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]">`);
8542
+ _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>`);
8543
+ _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
8544
  _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">`);
8545
+ _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
8546
  _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
8547
  _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
8548
  _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 +8582,7 @@ var init_selection_label = __esm({
8368
8582
  if (props.status === "error" && (props.onAcknowledgeError || props.onRetry)) {
8369
8583
  return true;
8370
8584
  }
8585
+ if (props.arrowNavigationState?.isVisible) return true;
8371
8586
  return false;
8372
8587
  };
8373
8588
  let resizeObserver;
@@ -8383,12 +8598,10 @@ var init_selection_label = __esm({
8383
8598
  const isCtrlCToAbort = event.code === "KeyC" && event.ctrlKey && props.status === "copying" && props.onAbort;
8384
8599
  if (isEnterToExpand) {
8385
8600
  event.preventDefault();
8386
- event.stopPropagation();
8387
8601
  event.stopImmediatePropagation();
8388
8602
  props.onToggleExpand?.();
8389
8603
  } else if (isCtrlCToAbort) {
8390
8604
  event.preventDefault();
8391
- event.stopPropagation();
8392
8605
  event.stopImmediatePropagation();
8393
8606
  props.onAbort?.();
8394
8607
  }
@@ -8459,8 +8672,8 @@ var init_selection_label = __esm({
8459
8672
  computedArrowPosition: null
8460
8673
  };
8461
8674
  }
8462
- const viewportWidth = window.innerWidth;
8463
- const viewportHeight = window.innerHeight;
8675
+ const viewportWidth = window.visualViewport?.width ?? window.innerWidth;
8676
+ const viewportHeight = window.visualViewport?.height ?? window.innerHeight;
8464
8677
  const isSelectionVisibleInViewport = bounds.x + bounds.width > 0 && bounds.x < viewportWidth && bounds.y + bounds.height > 0 && bounds.y < viewportHeight;
8465
8678
  if (!isSelectionVisibleInViewport) {
8466
8679
  return {
@@ -8513,7 +8726,6 @@ var init_selection_label = __esm({
8513
8726
  computedArrowPosition
8514
8727
  };
8515
8728
  });
8516
- const computedPosition = () => positionComputation().position;
8517
8729
  createEffect(() => {
8518
8730
  const result = positionComputation();
8519
8731
  if (result.computedArrowPosition !== null) {
@@ -8526,7 +8738,6 @@ var init_selection_label = __esm({
8526
8738
  if (event.isComposing || event.keyCode === IME_COMPOSING_KEY_CODE) {
8527
8739
  return;
8528
8740
  }
8529
- event.stopPropagation();
8530
8741
  event.stopImmediatePropagation();
8531
8742
  const isEnterWithoutShift = event.code === "Enter" && !event.shiftKey;
8532
8743
  const isEscape = event.code === "Escape";
@@ -8555,8 +8766,8 @@ var init_selection_label = __esm({
8555
8766
  const actionCycleItems = () => props.actionCycleState?.items ?? [];
8556
8767
  const actionCycleActiveIndex = () => props.actionCycleState?.activeIndex ?? 0;
8557
8768
  const isActionCycleVisible = () => Boolean(props.actionCycleState?.isVisible);
8769
+ const isArrowNavigationVisible = () => Boolean(props.arrowNavigationState?.isVisible);
8558
8770
  const handleTagClick = (event) => {
8559
- event.stopPropagation();
8560
8771
  event.stopImmediatePropagation();
8561
8772
  if (props.filePath && props.onOpen) {
8562
8773
  props.onOpen();
@@ -8564,7 +8775,6 @@ var init_selection_label = __esm({
8564
8775
  };
8565
8776
  const isTagClickable = () => Boolean(props.filePath && props.onOpen);
8566
8777
  const handleContainerPointerDown = (event) => {
8567
- event.stopPropagation();
8568
8778
  event.stopImmediatePropagation();
8569
8779
  const isEditableInputVisible = canInteract() && props.isPromptMode && !props.isPendingDismiss && props.onSubmit;
8570
8780
  if (isEditableInputVisible && inputRef) {
@@ -8581,7 +8791,6 @@ var init_selection_label = __esm({
8581
8791
  _el$.addEventListener("mouseleave", () => props.onHoverChange?.(false));
8582
8792
  _el$.addEventListener("mouseenter", () => props.onHoverChange?.(true));
8583
8793
  _el$.$$click = (event) => {
8584
- event.stopPropagation();
8585
8794
  event.stopImmediatePropagation();
8586
8795
  };
8587
8796
  _el$.$$pointerdown = handleContainerPointerDown;
@@ -8597,10 +8806,10 @@ var init_selection_label = __esm({
8597
8806
  return arrowPosition();
8598
8807
  },
8599
8808
  get leftPercent() {
8600
- return computedPosition().arrowLeftPercent;
8809
+ return positionComputation().position.arrowLeftPercent;
8601
8810
  },
8602
8811
  get leftOffsetPx() {
8603
- return computedPosition().arrowLeftOffset;
8812
+ return positionComputation().position.arrowLeftOffset;
8604
8813
  },
8605
8814
  get labelWidth() {
8606
8815
  return panelWidth();
@@ -8652,7 +8861,7 @@ var init_selection_label = __esm({
8652
8861
  return memo(() => props.status === "copying")() && !props.isPendingAbort;
8653
8862
  },
8654
8863
  get children() {
8655
- var _el$3 = _tmpl$34(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
8864
+ var _el$3 = _tmpl$35(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
8656
8865
  insert(_el$4, createComponent(IconLoader, {
8657
8866
  size: 13,
8658
8867
  "class": "text-[#71717a] shrink-0"
@@ -8665,7 +8874,7 @@ var init_selection_label = __esm({
8665
8874
  get children() {
8666
8875
  return createComponent(BottomSection, {
8667
8876
  get children() {
8668
- var _el$6 = _tmpl$26(), _el$7 = _el$6.firstChild;
8877
+ var _el$6 = _tmpl$27(), _el$7 = _el$6.firstChild;
8669
8878
  var _ref$3 = inputRef;
8670
8879
  typeof _ref$3 === "function" ? use(_ref$3, _el$7) : inputRef = _el$7;
8671
8880
  insert(_el$6, createComponent(Show, {
@@ -8673,7 +8882,7 @@ var init_selection_label = __esm({
8673
8882
  return props.onAbort;
8674
8883
  },
8675
8884
  get children() {
8676
- var _el$8 = _tmpl$16();
8885
+ var _el$8 = _tmpl$17();
8677
8886
  _el$8.$$click = (event) => {
8678
8887
  event.stopPropagation();
8679
8888
  props.onAbort?.();
@@ -8727,12 +8936,28 @@ var init_selection_label = __esm({
8727
8936
  onHoverChange: handleTagHoverChange,
8728
8937
  shrink: true,
8729
8938
  get forceShowIcon() {
8730
- return Boolean(props.isContextMenuOpen);
8939
+ return memo(() => !!isArrowNavigationVisible())() ? isTagClickable() : Boolean(props.isContextMenuOpen);
8731
8940
  }
8732
8941
  }));
8733
8942
  insert(_el$9, createComponent(Show, {
8734
8943
  get when() {
8735
- return isActionCycleVisible();
8944
+ return props.arrowNavigationState?.isVisible;
8945
+ },
8946
+ get children() {
8947
+ return createComponent(ArrowNavigationMenu, {
8948
+ get items() {
8949
+ return props.arrowNavigationState.items;
8950
+ },
8951
+ get activeIndex() {
8952
+ return props.arrowNavigationState.activeIndex;
8953
+ },
8954
+ onSelect: (index) => props.onArrowNavigationSelect?.(index)
8955
+ });
8956
+ }
8957
+ }), null);
8958
+ insert(_el$9, createComponent(Show, {
8959
+ get when() {
8960
+ return memo(() => !!!isArrowNavigationVisible())() && isActionCycleVisible();
8736
8961
  },
8737
8962
  get children() {
8738
8963
  return createComponent(BottomSection, {
@@ -8756,10 +8981,10 @@ var init_selection_label = __esm({
8756
8981
  }
8757
8982
  }), null);
8758
8983
  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);
8984
+ var _v$11 = item.label.toLowerCase(), _v$12 = !!(itemIndex() === actionCycleActiveIndex()), _v$13 = !!(itemIndex() === actionCycleItems().length - 1);
8985
+ _v$11 !== _p$.e && setAttribute(_el$17, "data-react-grab-action-cycle-item", _p$.e = _v$11);
8986
+ _v$12 !== _p$.t && _el$17.classList.toggle("bg-black/5", _p$.t = _v$12);
8987
+ _v$13 !== _p$.a && _el$17.classList.toggle("rounded-b-[6px]", _p$.a = _v$13);
8763
8988
  return _p$;
8764
8989
  }, {
8765
8990
  e: void 0,
@@ -8774,6 +8999,18 @@ var init_selection_label = __esm({
8774
8999
  });
8775
9000
  }
8776
9001
  }), null);
9002
+ createRenderEffect((_p$) => {
9003
+ var _v$ = !!isArrowNavigationVisible(), _v$2 = {
9004
+ "py-1.5": !isArrowNavigationVisible(),
9005
+ "pt-1.5 pb-1": isArrowNavigationVisible()
9006
+ };
9007
+ _v$ !== _p$.e && _el$9.classList.toggle("min-w-[100px]", _p$.e = _v$);
9008
+ _p$.t = classList(_el$0, _v$2, _p$.t);
9009
+ return _p$;
9010
+ }, {
9011
+ e: void 0,
9012
+ t: void 0
9013
+ });
8777
9014
  return _el$9;
8778
9015
  }
8779
9016
  }), null);
@@ -8833,9 +9070,9 @@ var init_selection_label = __esm({
8833
9070
  }
8834
9071
  }), null);
8835
9072
  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);
9073
+ var _v$3 = props.replyToPrompt ? "14px" : "0", _v$4 = !props.onSubmit;
9074
+ _v$3 !== _p$.e && setStyleProperty(_el$14, "padding-left", _p$.e = _v$3);
9075
+ _v$4 !== _p$.t && (_el$15.readOnly = _p$.t = _v$4);
8839
9076
  return _p$;
8840
9077
  }, {
8841
9078
  e: void 0,
@@ -8883,15 +9120,15 @@ var init_selection_label = __esm({
8883
9120
  }
8884
9121
  }), null);
8885
9122
  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);
9123
+ 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;
9124
+ _v$5 !== _p$.e && className(_el$, _p$.e = _v$5);
9125
+ _v$6 !== _p$.t && setStyleProperty(_el$, "top", _p$.t = _v$6);
9126
+ _v$7 !== _p$.a && setStyleProperty(_el$, "left", _p$.a = _v$7);
9127
+ _v$8 !== _p$.o && setStyleProperty(_el$, "transform", _p$.o = _v$8);
9128
+ _v$9 !== _p$.i && setStyleProperty(_el$, "pointer-events", _p$.i = _v$9);
9129
+ _v$0 !== _p$.n && setStyleProperty(_el$, "opacity", _p$.n = _v$0);
9130
+ _v$1 !== _p$.s && className(_el$2, _p$.s = _v$1);
9131
+ _v$10 !== _p$.h && setStyleProperty(_el$2, "display", _p$.h = _v$10);
8895
9132
  return _p$;
8896
9133
  }, {
8897
9134
  e: void 0,
@@ -8952,18 +9189,18 @@ var init_state = __esm({
8952
9189
  });
8953
9190
 
8954
9191
  // src/components/icons/icon-select.tsx
8955
- var _tmpl$17, IconSelect;
9192
+ var _tmpl$18, IconSelect;
8956
9193
  var init_icon_select = __esm({
8957
9194
  "src/components/icons/icon-select.tsx"() {
8958
9195
  "use strict";
8959
9196
  init_web();
8960
9197
  init_web();
8961
9198
  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">`);
9199
+ _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
9200
  IconSelect = (props) => {
8964
9201
  const size = () => props.size ?? 14;
8965
9202
  return (() => {
8966
- var _el$ = _tmpl$17();
9203
+ var _el$ = _tmpl$18();
8967
9204
  createRenderEffect((_p$) => {
8968
9205
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
8969
9206
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -8982,18 +9219,18 @@ var init_icon_select = __esm({
8982
9219
  });
8983
9220
 
8984
9221
  // src/components/icons/icon-chevron.tsx
8985
- var _tmpl$18, IconChevron;
9222
+ var _tmpl$19, IconChevron;
8986
9223
  var init_icon_chevron = __esm({
8987
9224
  "src/components/icons/icon-chevron.tsx"() {
8988
9225
  "use strict";
8989
9226
  init_web();
8990
9227
  init_web();
8991
9228
  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">`);
9229
+ _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
9230
  IconChevron = (props) => {
8994
9231
  const size = () => props.size ?? 12;
8995
9232
  return (() => {
8996
- var _el$ = _tmpl$18();
9233
+ var _el$ = _tmpl$19();
8997
9234
  createRenderEffect((_p$) => {
8998
9235
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
8999
9236
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -9012,18 +9249,18 @@ var init_icon_chevron = __esm({
9012
9249
  });
9013
9250
 
9014
9251
  // src/components/icons/icon-clock.tsx
9015
- var _tmpl$19, IconClock;
9252
+ var _tmpl$20, IconClock;
9016
9253
  var init_icon_clock = __esm({
9017
9254
  "src/components/icons/icon-clock.tsx"() {
9018
9255
  "use strict";
9019
9256
  init_web();
9020
9257
  init_web();
9021
9258
  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">`);
9259
+ _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
9260
  IconClock = (props) => {
9024
9261
  const size = () => props.size ?? 14;
9025
9262
  return (() => {
9026
- var _el$ = _tmpl$19();
9263
+ var _el$ = _tmpl$20();
9027
9264
  createRenderEffect((_p$) => {
9028
9265
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
9029
9266
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -9042,18 +9279,18 @@ var init_icon_clock = __esm({
9042
9279
  });
9043
9280
 
9044
9281
  // src/components/icons/icon-copy.tsx
9045
- var _tmpl$20, IconCopy;
9282
+ var _tmpl$21, IconCopy;
9046
9283
  var init_icon_copy = __esm({
9047
9284
  "src/components/icons/icon-copy.tsx"() {
9048
9285
  "use strict";
9049
9286
  init_web();
9050
9287
  init_web();
9051
9288
  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">`);
9289
+ _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
9290
  IconCopy = (props) => {
9054
9291
  const size = () => props.size ?? 14;
9055
9292
  return (() => {
9056
- var _el$ = _tmpl$20();
9293
+ var _el$ = _tmpl$21();
9057
9294
  createRenderEffect((_p$) => {
9058
9295
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
9059
9296
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -9153,7 +9390,7 @@ var init_safe_polygon = __esm({
9153
9390
  });
9154
9391
 
9155
9392
  // src/utils/freeze-updates.ts
9156
- var isUpdatesPaused, getOrCache, patchedDispatchers, wrappedDispatchCache, wrappedStartTransitionCache, pendingStoreCallbacks, pendingTransitionCallbacks, pendingStateUpdates, pausedQueueStates, pausedContextStates, renderersWithPatchedDispatcher, typedFiberRoots, getFiberRoot, collectFiberRoots, mergePendingChains, pauseHookQueue, resumeHookQueue, pauseContextDependency, resumeContextDependency, forEachHookQueue, forEachContextDependency, traverseFibers, pauseFiber, resumeFiber, patchDispatcher, installDispatcherPatching, scheduleReactUpdate, invokeCallbacks, initializeFreezeSupport, freezeUpdates;
9393
+ var isUpdatesPaused, getOrCache, patchedDispatchers, wrappedDispatchCache, wrappedStartTransitionCache, pendingStoreCallbacks, pendingTransitionCallbacks, pendingStateUpdates, pausedQueueStates, pausedContextStates, renderersWithPatchedDispatcher, typedFiberRoots, getFiberRoot, collectFiberRoots, mergePendingChains, pauseHookQueue, extractActionsFromChain, resumeHookQueue, pauseContextDependency, resumeContextDependency, forEachHookQueue, forEachContextDependency, traverseFibers, pauseFiber, resumeFiber, patchDispatcher, installDispatcherPatching, scheduleReactUpdate, invokeCallbacks, initializeFreezeSupport, freezeUpdates;
9157
9394
  var init_freeze_updates = __esm({
9158
9395
  "src/utils/freeze-updates.ts"() {
9159
9396
  "use strict";
@@ -9245,26 +9482,42 @@ var init_freeze_updates = __esm({
9245
9482
  Object.defineProperty(queue, "pending", {
9246
9483
  configurable: true,
9247
9484
  enumerable: true,
9248
- get: () => isUpdatesPaused ? pauseState.bufferedPending : currentPendingValue,
9485
+ get: () => isUpdatesPaused ? null : currentPendingValue,
9249
9486
  set: (newValue) => {
9250
9487
  if (isUpdatesPaused) {
9251
- pauseState.bufferedPending = newValue;
9488
+ if (newValue !== null) {
9489
+ pauseState.bufferedPending = mergePendingChains(
9490
+ pauseState.bufferedPending ?? null,
9491
+ newValue
9492
+ );
9493
+ }
9494
+ return;
9252
9495
  }
9253
9496
  currentPendingValue = newValue;
9254
9497
  }
9255
9498
  });
9256
9499
  pausedQueueStates.set(queue, pauseState);
9257
9500
  };
9501
+ extractActionsFromChain = (pending) => {
9502
+ if (!pending) return [];
9503
+ const actions = [];
9504
+ const first = pending.next;
9505
+ if (!first) return [];
9506
+ let current = first;
9507
+ do {
9508
+ if (current) {
9509
+ actions.push(current.action);
9510
+ current = current.next;
9511
+ }
9512
+ } while (current && current !== first);
9513
+ return actions;
9514
+ };
9258
9515
  resumeHookQueue = (queue) => {
9259
9516
  const pauseState = pausedQueueStates.get(queue);
9260
9517
  if (!pauseState) return;
9261
9518
  if (pauseState.originalGetSnapshot) {
9262
9519
  queue.getSnapshot = pauseState.originalGetSnapshot;
9263
9520
  }
9264
- const mergedPending = mergePendingChains(
9265
- pauseState.pendingValueAtPause ?? null,
9266
- pauseState.bufferedPending ?? null
9267
- );
9268
9521
  if (pauseState.originalPendingDescriptor) {
9269
9522
  Object.defineProperty(
9270
9523
  queue,
@@ -9274,7 +9527,19 @@ var init_freeze_updates = __esm({
9274
9527
  } else {
9275
9528
  delete queue.pending;
9276
9529
  }
9277
- queue.pending = mergedPending;
9530
+ queue.pending = null;
9531
+ const dispatch = queue.dispatch;
9532
+ if (typeof dispatch === "function") {
9533
+ const pendingActions = extractActionsFromChain(
9534
+ pauseState.pendingValueAtPause ?? null
9535
+ );
9536
+ const bufferedActions = extractActionsFromChain(
9537
+ pauseState.bufferedPending ?? null
9538
+ );
9539
+ for (const action of [...pendingActions, ...bufferedActions]) {
9540
+ pendingStateUpdates.push(() => dispatch(action));
9541
+ }
9542
+ }
9278
9543
  pausedQueueStates.delete(queue);
9279
9544
  };
9280
9545
  pauseContextDependency = (contextDependency) => {
@@ -9647,7 +9912,7 @@ var init_freeze_gsap = __esm({
9647
9912
  });
9648
9913
 
9649
9914
  // src/utils/freeze-animations.ts
9650
- var FROZEN_STYLES, GLOBAL_FREEZE_STYLES, styleElement, frozenElements, lastInputElements, globalAnimationStyleElement, ensureStylesInjected, areElementsSame, freezeAllAnimations, unfreezeAllAnimations, freezeAnimations, freezeGlobalAnimations, unfreezeGlobalAnimations;
9915
+ 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
9916
  var init_freeze_animations = __esm({
9652
9917
  "src/utils/freeze-animations.ts"() {
9653
9918
  "use strict";
@@ -9667,10 +9932,15 @@ var init_freeze_animations = __esm({
9667
9932
  transition: none !important;
9668
9933
  }
9669
9934
  `;
9935
+ SVG_ROOT_SELECTOR = "svg";
9670
9936
  styleElement = null;
9671
9937
  frozenElements = [];
9938
+ frozenSvgElements = [];
9672
9939
  lastInputElements = [];
9673
9940
  globalAnimationStyleElement = null;
9941
+ globalFrozenSvgElements = [];
9942
+ svgFreezeDepthMap = /* @__PURE__ */ new Map();
9943
+ frozenWaapiAnimations = [];
9674
9944
  ensureStylesInjected = () => {
9675
9945
  if (styleElement) return;
9676
9946
  styleElement = createStyleElement(
@@ -9678,7 +9948,70 @@ var init_freeze_animations = __esm({
9678
9948
  FROZEN_STYLES
9679
9949
  );
9680
9950
  };
9681
- areElementsSame = (a3, b3) => a3.length === b3.length && a3.every((element, index) => element === b3[index]);
9951
+ areElementsSame = (firstElements, secondElements) => firstElements.length === secondElements.length && firstElements.every(
9952
+ (currentElement, index) => currentElement === secondElements[index]
9953
+ );
9954
+ collectFrozenSvgElements = (elements) => {
9955
+ const svgElements = /* @__PURE__ */ new Set();
9956
+ for (const element of elements) {
9957
+ if (element instanceof SVGSVGElement) {
9958
+ svgElements.add(element);
9959
+ } else if (element instanceof SVGElement && element.ownerSVGElement) {
9960
+ svgElements.add(element.ownerSVGElement);
9961
+ }
9962
+ for (const innerSvgElement of element.querySelectorAll(SVG_ROOT_SELECTOR)) {
9963
+ if (innerSvgElement instanceof SVGSVGElement) {
9964
+ svgElements.add(innerSvgElement);
9965
+ }
9966
+ }
9967
+ }
9968
+ return [...svgElements];
9969
+ };
9970
+ callSvgAnimationMethod = (svgElement, methodName) => {
9971
+ const animationMethod = Reflect.get(svgElement, methodName);
9972
+ if (typeof animationMethod !== "function") return;
9973
+ animationMethod.call(svgElement);
9974
+ };
9975
+ pauseSvgAnimations = (svgElements) => {
9976
+ for (const svgElement of svgElements) {
9977
+ const currentFreezeDepth = svgFreezeDepthMap.get(svgElement) ?? 0;
9978
+ if (currentFreezeDepth === 0) {
9979
+ callSvgAnimationMethod(svgElement, "pauseAnimations");
9980
+ }
9981
+ svgFreezeDepthMap.set(svgElement, currentFreezeDepth + 1);
9982
+ }
9983
+ };
9984
+ resumeSvgAnimations = (svgElements) => {
9985
+ for (const svgElement of svgElements) {
9986
+ const currentFreezeDepth = svgFreezeDepthMap.get(svgElement);
9987
+ if (!currentFreezeDepth) continue;
9988
+ if (currentFreezeDepth === 1) {
9989
+ svgFreezeDepthMap.delete(svgElement);
9990
+ callSvgAnimationMethod(svgElement, "unpauseAnimations");
9991
+ continue;
9992
+ }
9993
+ svgFreezeDepthMap.set(svgElement, currentFreezeDepth - 1);
9994
+ }
9995
+ };
9996
+ collectWaapiAnimations = (elements) => {
9997
+ const animations = [];
9998
+ for (const element of elements) {
9999
+ for (const animation of element.getAnimations({ subtree: true })) {
10000
+ if (animation.playState === "running") {
10001
+ animations.push(animation);
10002
+ }
10003
+ }
10004
+ }
10005
+ return animations;
10006
+ };
10007
+ finishAnimations = (animations) => {
10008
+ for (const animation of animations) {
10009
+ try {
10010
+ animation.finish();
10011
+ } catch {
10012
+ }
10013
+ }
10014
+ };
9682
10015
  freezeAllAnimations = (elements) => {
9683
10016
  if (elements.length === 0) return;
9684
10017
  if (areElementsSame(elements, lastInputElements)) return;
@@ -9686,16 +10019,27 @@ var init_freeze_animations = __esm({
9686
10019
  lastInputElements = [...elements];
9687
10020
  ensureStylesInjected();
9688
10021
  frozenElements = elements;
10022
+ frozenSvgElements = collectFrozenSvgElements(frozenElements);
10023
+ pauseSvgAnimations(frozenSvgElements);
9689
10024
  for (const element of frozenElements) {
9690
10025
  element.setAttribute(FROZEN_ELEMENT_ATTRIBUTE, "");
9691
10026
  }
10027
+ frozenWaapiAnimations = collectWaapiAnimations(frozenElements);
10028
+ for (const animation of frozenWaapiAnimations) {
10029
+ animation.pause();
10030
+ }
9692
10031
  };
9693
10032
  unfreezeAllAnimations = () => {
9694
- if (frozenElements.length === 0) return;
10033
+ if (frozenElements.length === 0 && frozenSvgElements.length === 0 && frozenWaapiAnimations.length === 0)
10034
+ return;
9695
10035
  for (const element of frozenElements) {
9696
10036
  element.removeAttribute(FROZEN_ELEMENT_ATTRIBUTE);
9697
10037
  }
10038
+ resumeSvgAnimations(frozenSvgElements);
10039
+ finishAnimations(frozenWaapiAnimations);
9698
10040
  frozenElements = [];
10041
+ frozenSvgElements = [];
10042
+ frozenWaapiAnimations = [];
9699
10043
  lastInputElements = [];
9700
10044
  };
9701
10045
  freezeAnimations = (elements) => {
@@ -9713,6 +10057,10 @@ var init_freeze_animations = __esm({
9713
10057
  "data-react-grab-global-freeze",
9714
10058
  GLOBAL_FREEZE_STYLES
9715
10059
  );
10060
+ globalFrozenSvgElements = collectFrozenSvgElements(
10061
+ Array.from(document.querySelectorAll(SVG_ROOT_SELECTOR))
10062
+ );
10063
+ pauseSvgAnimations(globalFrozenSvgElements);
9716
10064
  freezeGsap();
9717
10065
  };
9718
10066
  unfreezeGlobalAnimations = () => {
@@ -9722,6 +10070,7 @@ var init_freeze_animations = __esm({
9722
10070
  transition: none !important;
9723
10071
  }
9724
10072
  `;
10073
+ const animations = [];
9725
10074
  for (const animation of document.getAnimations()) {
9726
10075
  if (animation.effect instanceof KeyframeEffect) {
9727
10076
  const target = animation.effect.target;
@@ -9732,13 +10081,13 @@ var init_freeze_animations = __esm({
9732
10081
  }
9733
10082
  }
9734
10083
  }
9735
- try {
9736
- animation.finish();
9737
- } catch {
9738
- }
10084
+ animations.push(animation);
9739
10085
  }
10086
+ finishAnimations(animations);
9740
10087
  globalAnimationStyleElement.remove();
9741
10088
  globalAnimationStyleElement = null;
10089
+ resumeSvgAnimations(globalFrozenSvgElements);
10090
+ globalFrozenSvgElements = [];
9742
10091
  unfreezeGsap();
9743
10092
  };
9744
10093
  }
@@ -9852,7 +10201,6 @@ var init_get_element_at_position = __esm({
9852
10201
  init_is_valid_grabbable_element();
9853
10202
  init_constants();
9854
10203
  init_freeze_pseudo_states();
9855
- init_create_element_bounds();
9856
10204
  cache = null;
9857
10205
  resumeTimerId = null;
9858
10206
  scheduleResume = () => {
@@ -9911,9 +10259,6 @@ var init_get_element_at_position = __esm({
9911
10259
  }
9912
10260
  }
9913
10261
  }
9914
- if (result) {
9915
- createElementBounds(result);
9916
- }
9917
10262
  scheduleResume();
9918
10263
  cache = { clientX, clientY, element: result, timestamp: now };
9919
10264
  return result;
@@ -9927,13 +10272,13 @@ var init_get_element_at_position = __esm({
9927
10272
  });
9928
10273
 
9929
10274
  // 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;
10275
+ 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
10276
  var init_freeze_pseudo_states = __esm({
9932
10277
  "src/utils/freeze-pseudo-states.ts"() {
9933
10278
  "use strict";
9934
10279
  init_get_element_at_position();
9935
10280
  init_create_style_element();
9936
- POINTER_EVENTS_STYLES = "* { pointer-events: none !important; }";
10281
+ POINTER_EVENTS_STYLES = "html { pointer-events: none !important; }";
9937
10282
  MOUSE_EVENTS_TO_BLOCK = [
9938
10283
  "mouseenter",
9939
10284
  "mouseleave",
@@ -9972,80 +10317,62 @@ var init_freeze_pseudo_states = __esm({
9972
10317
  "ring-color",
9973
10318
  "ring-width"
9974
10319
  ];
9975
- ANIMATION_CONTROLLED_PROPERTIES = [
9976
- "opacity",
9977
- "transform",
9978
- "scale",
9979
- "translate",
9980
- "rotate"
9981
- ];
9982
10320
  frozenHoverElements = /* @__PURE__ */ new Map();
9983
10321
  frozenFocusElements = /* @__PURE__ */ new Map();
9984
10322
  pointerEventsStyle = null;
9985
10323
  stopEvent = (event) => {
9986
- event.stopPropagation();
9987
10324
  event.stopImmediatePropagation();
9988
10325
  };
9989
10326
  preventFocusChange = (event) => {
9990
10327
  event.preventDefault();
9991
- event.stopPropagation();
9992
10328
  event.stopImmediatePropagation();
9993
10329
  };
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
- }
10330
+ collectOriginalPropertyValues = (element, properties) => {
10331
+ const originalPropertyValues = /* @__PURE__ */ new Map();
10332
+ for (const prop of properties) {
10333
+ const inlineValue = element.style.getPropertyValue(prop);
10334
+ if (inlineValue) {
10335
+ originalPropertyValues.set(prop, inlineValue);
10012
10336
  }
10013
- elementsToFreeze.push({ element, originalCssText, frozenStyles });
10014
10337
  }
10015
- return elementsToFreeze;
10338
+ return originalPropertyValues;
10016
10339
  };
10017
- collectFocusStates = () => {
10340
+ collectPseudoStates = (selector, properties, alreadyFrozen) => {
10018
10341
  const elementsToFreeze = [];
10019
- for (const element of document.querySelectorAll(":focus, :focus-visible")) {
10342
+ for (const element of document.querySelectorAll(selector)) {
10020
10343
  if (!(element instanceof HTMLElement)) continue;
10021
- if (frozenFocusElements.has(element)) continue;
10022
- const originalCssText = element.style.cssText;
10344
+ if (alreadyFrozen?.has(element)) continue;
10023
10345
  const computed = getComputedStyle(element);
10024
- let frozenStyles = originalCssText;
10025
- for (const prop of FOCUS_STYLE_PROPERTIES) {
10346
+ let frozenStyles = element.style.cssText;
10347
+ const originalPropertyValues = collectOriginalPropertyValues(
10348
+ element,
10349
+ properties
10350
+ );
10351
+ for (const prop of properties) {
10026
10352
  const computedValue = computed.getPropertyValue(prop);
10027
10353
  if (computedValue) {
10028
10354
  frozenStyles += `${prop}: ${computedValue} !important; `;
10029
10355
  }
10030
10356
  }
10031
- elementsToFreeze.push({ element, originalCssText, frozenStyles });
10357
+ elementsToFreeze.push({ element, frozenStyles, originalPropertyValues });
10032
10358
  }
10033
10359
  return elementsToFreeze;
10034
10360
  };
10035
10361
  applyFrozenStates = (states, storageMap) => {
10036
- for (const { element, originalCssText, frozenStyles } of states) {
10037
- storageMap.set(element, originalCssText);
10362
+ for (const { element, frozenStyles, originalPropertyValues } of states) {
10363
+ storageMap.set(element, originalPropertyValues);
10038
10364
  element.style.cssText = frozenStyles;
10039
10365
  }
10040
10366
  };
10041
10367
  restoreFrozenStates = (storageMap, styleProperties) => {
10042
- for (const [element, originalCssText] of storageMap) {
10043
- if (hasAnimationControlledProperty(originalCssText)) {
10044
- for (const prop of styleProperties) {
10368
+ for (const [element, originalPropertyValues] of storageMap) {
10369
+ for (const prop of styleProperties) {
10370
+ const originalValue = originalPropertyValues.get(prop);
10371
+ if (originalValue) {
10372
+ element.style.setProperty(prop, originalValue);
10373
+ } else {
10045
10374
  element.style.removeProperty(prop);
10046
10375
  }
10047
- } else {
10048
- element.style.cssText = originalCssText;
10049
10376
  }
10050
10377
  }
10051
10378
  storageMap.clear();
@@ -10064,8 +10391,12 @@ var init_freeze_pseudo_states = __esm({
10064
10391
  for (const eventType of FOCUS_EVENTS_TO_BLOCK) {
10065
10392
  document.addEventListener(eventType, preventFocusChange, true);
10066
10393
  }
10067
- const hoverStates = collectHoverStates();
10068
- const focusStates = collectFocusStates();
10394
+ const hoverStates = collectPseudoStates(":hover", HOVER_STYLE_PROPERTIES);
10395
+ const focusStates = collectPseudoStates(
10396
+ ":focus, :focus-visible",
10397
+ FOCUS_STYLE_PROPERTIES,
10398
+ frozenFocusElements
10399
+ );
10069
10400
  applyFrozenStates(hoverStates, frozenHoverElements);
10070
10401
  applyFrozenStates(focusStates, frozenFocusElements);
10071
10402
  pointerEventsStyle = createStyleElement(
@@ -10090,7 +10421,7 @@ var init_freeze_pseudo_states = __esm({
10090
10421
  });
10091
10422
 
10092
10423
  // src/components/tooltip.tsx
10093
- var _tmpl$21, tooltipCloseTimestamp, wasTooltipRecentlyVisible, Tooltip;
10424
+ var _tmpl$28, tooltipCloseTimestamp, wasTooltipRecentlyVisible, Tooltip;
10094
10425
  var init_tooltip = __esm({
10095
10426
  "src/components/tooltip.tsx"() {
10096
10427
  "use strict";
@@ -10102,7 +10433,7 @@ var init_tooltip = __esm({
10102
10433
  init_solid();
10103
10434
  init_cn();
10104
10435
  init_constants();
10105
- _tmpl$21 = /* @__PURE__ */ template(`<div style=z-index:2147483647>`);
10436
+ _tmpl$28 = /* @__PURE__ */ template(`<div style=z-index:2147483647>`);
10106
10437
  tooltipCloseTimestamp = 0;
10107
10438
  wasTooltipRecentlyVisible = () => {
10108
10439
  return Date.now() - tooltipCloseTimestamp < TOOLTIP_GRACE_PERIOD_MS;
@@ -10146,7 +10477,7 @@ var init_tooltip = __esm({
10146
10477
  return delayedVisible();
10147
10478
  },
10148
10479
  get children() {
10149
- var _el$ = _tmpl$21();
10480
+ var _el$ = _tmpl$28();
10150
10481
  insert(_el$, () => props.children);
10151
10482
  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
10483
  return _el$;
@@ -10175,7 +10506,7 @@ var init_toolbar_layout = __esm({
10175
10506
  });
10176
10507
 
10177
10508
  // src/components/toolbar/index.tsx
10178
- var _tmpl$27, _tmpl$28, _tmpl$35, Toolbar;
10509
+ var _tmpl$29, _tmpl$210, _tmpl$36, Toolbar;
10179
10510
  var init_toolbar = __esm({
10180
10511
  "src/components/toolbar/index.tsx"() {
10181
10512
  "use strict";
@@ -10191,6 +10522,7 @@ var init_toolbar = __esm({
10191
10522
  init_web();
10192
10523
  init_web();
10193
10524
  init_web();
10525
+ init_web();
10194
10526
  init_solid();
10195
10527
  init_cn();
10196
10528
  init_format_shortcut();
@@ -10208,9 +10540,9 @@ var init_toolbar = __esm({
10208
10540
  init_tooltip();
10209
10541
  init_toolbar_layout();
10210
10542
  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">`);
10543
+ _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]">`);
10544
+ _tmpl$210 = /* @__PURE__ */ template(`<div style=z-index:2147483647>Enable to continue`);
10545
+ _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
10546
  Toolbar = (props) => {
10215
10547
  let containerRef;
10216
10548
  let expandableButtonsRef;
@@ -10316,7 +10648,6 @@ var init_toolbar = __esm({
10316
10648
  return `left-1/2 -translate-x-1/2 ${placementClass}`;
10317
10649
  };
10318
10650
  const stopEventPropagation = (event) => {
10319
- event.stopPropagation();
10320
10651
  event.stopImmediatePropagation();
10321
10652
  };
10322
10653
  const createFreezeHandlers = (setTooltipVisible, options) => ({
@@ -10585,7 +10916,6 @@ var init_toolbar = __esm({
10585
10916
  };
10586
10917
  let didDragOccur = false;
10587
10918
  const createDragAwareHandler = (callback) => (event) => {
10588
- event.stopPropagation();
10589
10919
  event.stopImmediatePropagation();
10590
10920
  if (didDragOccur) {
10591
10921
  didDragOccur = false;
@@ -11150,9 +11480,9 @@ var init_toolbar = __esm({
11150
11480
  }
11151
11481
  };
11152
11482
  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;
11483
+ 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
11484
  _el$.addEventListener("mouseleave", () => props.onSelectHoverChange?.(false));
11155
- _el$.addEventListener("mouseenter", () => props.onSelectHoverChange?.(true));
11485
+ _el$.addEventListener("mouseenter", () => !isCollapsed() && props.onSelectHoverChange?.(true));
11156
11486
  _el$.$$pointerdown = handlePointerDown;
11157
11487
  var _ref$ = containerRef;
11158
11488
  typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
@@ -11194,6 +11524,12 @@ var init_toolbar = __esm({
11194
11524
  handlePointerDown(event);
11195
11525
  });
11196
11526
  spread(_el$8, mergeProps({
11527
+ get ["aria-label"]() {
11528
+ return props.isActive ? "Stop selecting element" : "Select element";
11529
+ },
11530
+ get ["aria-pressed"]() {
11531
+ return Boolean(props.isActive);
11532
+ },
11197
11533
  get ["class"]() {
11198
11534
  return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
11199
11535
  }
@@ -11225,6 +11561,12 @@ var init_toolbar = __esm({
11225
11561
  handlePointerDown(event);
11226
11562
  });
11227
11563
  spread(_el$1, mergeProps({
11564
+ get ["aria-label"]() {
11565
+ return `Open history${(props.historyItemCount ?? 0) > 0 ? ` (${props.historyItemCount ?? 0} items)` : ""}`;
11566
+ },
11567
+ get ["aria-expanded"]() {
11568
+ return Boolean(props.isHistoryDropdownOpen);
11569
+ },
11228
11570
  get ["class"]() {
11229
11571
  return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
11230
11572
  }
@@ -11249,7 +11591,7 @@ var init_toolbar = __esm({
11249
11591
  return props.hasUnreadHistoryItems;
11250
11592
  },
11251
11593
  get children() {
11252
- return _tmpl$27();
11594
+ return _tmpl$29();
11253
11595
  }
11254
11596
  }), null);
11255
11597
  insert(_el$0, createComponent(Tooltip, {
@@ -11304,6 +11646,12 @@ var init_toolbar = __esm({
11304
11646
  handlePointerDown(event);
11305
11647
  });
11306
11648
  spread(_el$17, mergeProps({
11649
+ get ["aria-label"]() {
11650
+ return props.isMenuOpen ? "Close more actions menu" : "Open more actions menu";
11651
+ },
11652
+ get ["aria-expanded"]() {
11653
+ return Boolean(props.isMenuOpen);
11654
+ },
11307
11655
  get ["class"]() {
11308
11656
  return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
11309
11657
  }
@@ -11357,13 +11705,13 @@ var init_toolbar = __esm({
11357
11705
  return isShakeTooltipVisible();
11358
11706
  },
11359
11707
  get children() {
11360
- var _el$23 = _tmpl$28();
11708
+ var _el$23 = _tmpl$210();
11361
11709
  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
11710
  return _el$23;
11363
11711
  }
11364
11712
  }), null);
11365
11713
  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"));
11714
+ 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
11715
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
11368
11716
  _v$2 !== _p$.t && setStyleProperty(_el$, "transform", _p$.t = _v$2);
11369
11717
  _v$3 !== _p$.a && setStyleProperty(_el$, "transform-origin", _p$.a = _v$3);
@@ -11380,9 +11728,12 @@ var init_toolbar = __esm({
11380
11728
  _v$12 !== _p$.w && className(_el$13, _p$.w = _v$12);
11381
11729
  _v$13 !== _p$.m && className(_el$15, _p$.m = _v$13);
11382
11730
  _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);
11731
+ _v$15 !== _p$.y && setAttribute(_el$19, "aria-label", _p$.y = _v$15);
11732
+ _v$16 !== _p$.g && setAttribute(_el$19, "aria-pressed", _p$.g = _v$16);
11733
+ _v$17 !== _p$.p && className(_el$19, _p$.p = _v$17);
11734
+ _v$18 !== _p$.b && className(_el$20, _p$.b = _v$18);
11735
+ _v$19 !== _p$.T && className(_el$21, _p$.T = _v$19);
11736
+ _v$20 !== _p$.A && setAttribute(_el$22, "aria-label", _p$.A = _v$20);
11386
11737
  return _p$;
11387
11738
  }, {
11388
11739
  e: void 0,
@@ -11403,7 +11754,10 @@ var init_toolbar = __esm({
11403
11754
  f: void 0,
11404
11755
  y: void 0,
11405
11756
  g: void 0,
11406
- p: void 0
11757
+ p: void 0,
11758
+ b: void 0,
11759
+ T: void 0,
11760
+ A: void 0
11407
11761
  });
11408
11762
  return _el$;
11409
11763
  })();
@@ -11421,6 +11775,52 @@ var init_clamp_to_viewport = __esm({
11421
11775
  }
11422
11776
  });
11423
11777
 
11778
+ // src/utils/get-anchored-dropdown-position.ts
11779
+ var getAnchoredDropdownPosition;
11780
+ var init_get_anchored_dropdown_position = __esm({
11781
+ "src/utils/get-anchored-dropdown-position.ts"() {
11782
+ "use strict";
11783
+ init_clamp_to_viewport();
11784
+ getAnchoredDropdownPosition = ({
11785
+ anchor,
11786
+ measuredWidth,
11787
+ measuredHeight,
11788
+ viewportWidth,
11789
+ viewportHeight,
11790
+ anchorGapPx,
11791
+ viewportPaddingPx,
11792
+ offscreenPosition
11793
+ }) => {
11794
+ if (!anchor || measuredWidth === 0 || measuredHeight === 0) {
11795
+ return offscreenPosition;
11796
+ }
11797
+ let rawLeft;
11798
+ let rawTop;
11799
+ if (anchor.edge === "left" || anchor.edge === "right") {
11800
+ rawLeft = anchor.edge === "left" ? anchor.x + anchorGapPx : anchor.x - measuredWidth - anchorGapPx;
11801
+ rawTop = anchor.y - measuredHeight / 2;
11802
+ } else {
11803
+ rawLeft = anchor.x - measuredWidth / 2;
11804
+ rawTop = anchor.edge === "top" ? anchor.y + anchorGapPx : anchor.y - measuredHeight - anchorGapPx;
11805
+ }
11806
+ return {
11807
+ left: clampToViewport(
11808
+ rawLeft,
11809
+ measuredWidth,
11810
+ viewportWidth,
11811
+ viewportPaddingPx
11812
+ ),
11813
+ top: clampToViewport(
11814
+ rawTop,
11815
+ measuredHeight,
11816
+ viewportHeight,
11817
+ viewportPaddingPx
11818
+ )
11819
+ };
11820
+ };
11821
+ }
11822
+ });
11823
+
11424
11824
  // src/utils/is-event-from-overlay.ts
11425
11825
  var isEventFromOverlay;
11426
11826
  var init_is_event_from_overlay = __esm({
@@ -11459,7 +11859,7 @@ var init_resolve_action_enabled = __esm({
11459
11859
  });
11460
11860
 
11461
11861
  // src/components/toolbar/toolbar-menu.tsx
11462
- var _tmpl$29, _tmpl$210, _tmpl$36, _tmpl$44, ToolbarMenu;
11862
+ var _tmpl$30, _tmpl$211, _tmpl$37, _tmpl$44, ToolbarMenu;
11463
11863
  var init_toolbar_menu = __esm({
11464
11864
  "src/components/toolbar/toolbar-menu.tsx"() {
11465
11865
  "use strict";
@@ -11473,26 +11873,34 @@ var init_toolbar_menu = __esm({
11473
11873
  init_web();
11474
11874
  init_web();
11475
11875
  init_web();
11876
+ init_web();
11476
11877
  init_solid();
11477
11878
  init_constants();
11478
- init_clamp_to_viewport();
11879
+ init_get_anchored_dropdown_position();
11479
11880
  init_cn();
11480
11881
  init_format_shortcut();
11481
11882
  init_is_event_from_overlay();
11482
11883
  init_resolve_action_enabled();
11483
11884
  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">`);
11885
+ init_create_menu_highlight();
11886
+ _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">`);
11887
+ _tmpl$211 = /* @__PURE__ */ template(`<div><div>`);
11888
+ _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
11889
  _tmpl$44 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
11488
11890
  ToolbarMenu = (props) => {
11489
11891
  let containerRef;
11892
+ const {
11893
+ containerRef: highlightContainerRef,
11894
+ highlightRef,
11895
+ updateHighlight,
11896
+ clearHighlight
11897
+ } = createMenuHighlight();
11490
11898
  const [measuredWidth, setMeasuredWidth] = createSignal(0);
11491
11899
  const [measuredHeight, setMeasuredHeight] = createSignal(0);
11492
11900
  const [shouldMount, setShouldMount] = createSignal(false);
11493
11901
  const [isAnimatedIn, setIsAnimatedIn] = createSignal(false);
11494
11902
  const [lastAnchorEdge, setLastAnchorEdge] = createSignal("bottom");
11495
- const [toggleTrigger, setToggleTrigger] = createSignal(0);
11903
+ const [toggleRefreshCounter, setToggleRefreshCounter] = createSignal(0);
11496
11904
  let exitAnimationTimeout;
11497
11905
  let enterAnimationFrameId;
11498
11906
  const measureContainer = () => {
@@ -11521,32 +11929,17 @@ var init_toolbar_menu = __esm({
11521
11929
  }, DROPDOWN_ANIMATION_DURATION_MS);
11522
11930
  }
11523
11931
  });
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
11932
  const displayPosition = createMemo((previousPosition) => {
11549
- const position = computedPosition();
11933
+ const position = getAnchoredDropdownPosition({
11934
+ anchor: props.position,
11935
+ measuredWidth: measuredWidth(),
11936
+ measuredHeight: measuredHeight(),
11937
+ viewportWidth: window.innerWidth,
11938
+ viewportHeight: window.innerHeight,
11939
+ anchorGapPx: DROPDOWN_ANCHOR_GAP_PX,
11940
+ viewportPaddingPx: DROPDOWN_VIEWPORT_PADDING_PX,
11941
+ offscreenPosition: DROPDOWN_OFFSCREEN_POSITION
11942
+ });
11550
11943
  if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
11551
11944
  return position;
11552
11945
  }
@@ -11563,7 +11956,7 @@ var init_toolbar_menu = __esm({
11563
11956
  if (!resolveToolbarActionEnabled(action)) return;
11564
11957
  action.onAction();
11565
11958
  if (action.isActive !== void 0) {
11566
- setToggleTrigger((previous) => previous + 1);
11959
+ setToggleRefreshCounter((previous) => previous + 1);
11567
11960
  } else {
11568
11961
  props.onDismiss();
11569
11962
  }
@@ -11613,7 +12006,7 @@ var init_toolbar_menu = __esm({
11613
12006
  return shouldMount();
11614
12007
  },
11615
12008
  get children() {
11616
- var _el$ = _tmpl$29(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
12009
+ var _el$ = _tmpl$30(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
11617
12010
  _el$.$$contextmenu = handleMenuEvent;
11618
12011
  _el$.$$click = handleMenuEvent;
11619
12012
  _el$.$$mousedown = handleMenuEvent;
@@ -11621,6 +12014,8 @@ var init_toolbar_menu = __esm({
11621
12014
  var _ref$ = containerRef;
11622
12015
  typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
11623
12016
  setStyleProperty(_el$2, "min-width", `${TOOLBAR_MENU_MIN_WIDTH_PX}px`);
12017
+ use(highlightContainerRef, _el$3);
12018
+ use(highlightRef, _el$4);
11624
12019
  insert(_el$3, createComponent(For, {
11625
12020
  get each() {
11626
12021
  return props.actions;
@@ -11629,55 +12024,61 @@ var init_toolbar_menu = __esm({
11629
12024
  const isEnabled = () => resolveToolbarActionEnabled(action);
11630
12025
  const isToggle = () => action.isActive !== void 0;
11631
12026
  const toggleActive = () => {
11632
- void toggleTrigger();
12027
+ void toggleRefreshCounter();
11633
12028
  return Boolean(action.isActive?.());
11634
12029
  };
11635
12030
  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, {
12031
+ var _el$5 = _tmpl$37(), _el$6 = _el$5.firstChild;
12032
+ _el$5.$$click = (event) => handleActionClick(action, event);
12033
+ addEventListener(_el$5, "pointerleave", clearHighlight);
12034
+ _el$5.addEventListener("pointerenter", (event) => {
12035
+ if (isEnabled()) {
12036
+ updateHighlight(event.currentTarget);
12037
+ }
12038
+ });
12039
+ _el$5.$$pointerdown = (event) => event.stopPropagation();
12040
+ insert(_el$6, () => action.label);
12041
+ insert(_el$5, createComponent(Show, {
11641
12042
  get when() {
11642
12043
  return memo(() => !!!isToggle())() && action.shortcut;
11643
12044
  },
11644
12045
  children: (shortcutKey) => (() => {
11645
- var _el$8 = _tmpl$44();
11646
- insert(_el$8, () => formatShortcut(shortcutKey()));
11647
- return _el$8;
12046
+ var _el$9 = _tmpl$44();
12047
+ insert(_el$9, () => formatShortcut(shortcutKey()));
12048
+ return _el$9;
11648
12049
  })()
11649
12050
  }), null);
11650
- insert(_el$4, createComponent(Show, {
12051
+ insert(_el$5, createComponent(Show, {
11651
12052
  get when() {
11652
12053
  return isToggle();
11653
12054
  },
11654
12055
  get children() {
11655
- var _el$6 = _tmpl$210(), _el$7 = _el$6.firstChild;
12056
+ var _el$7 = _tmpl$211(), _el$8 = _el$7.firstChild;
11656
12057
  createRenderEffect((_p$) => {
11657
12058
  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);
12059
+ _v$8 !== _p$.e && className(_el$7, _p$.e = _v$8);
12060
+ _v$9 !== _p$.t && className(_el$8, _p$.t = _v$9);
11660
12061
  return _p$;
11661
12062
  }, {
11662
12063
  e: void 0,
11663
12064
  t: void 0
11664
12065
  });
11665
- return _el$6;
12066
+ return _el$7;
11666
12067
  }
11667
12068
  }), null);
11668
12069
  createRenderEffect((_p$) => {
11669
12070
  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);
12071
+ _v$0 !== _p$.e && setAttribute(_el$5, "data-react-grab-menu-item", _p$.e = _v$0);
12072
+ _v$1 !== _p$.t && (_el$5.disabled = _p$.t = _v$1);
11672
12073
  return _p$;
11673
12074
  }, {
11674
12075
  e: void 0,
11675
12076
  t: void 0
11676
12077
  });
11677
- return _el$4;
12078
+ return _el$5;
11678
12079
  })();
11679
12080
  }
11680
- }));
12081
+ }), null);
11681
12082
  createRenderEffect((_p$) => {
11682
12083
  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
12084
  _v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
@@ -11706,7 +12107,7 @@ var init_toolbar_menu = __esm({
11706
12107
  });
11707
12108
 
11708
12109
  // src/components/context-menu.tsx
11709
- var _tmpl$30, _tmpl$211, _tmpl$37, _tmpl$45, ContextMenu;
12110
+ var _tmpl$31, _tmpl$212, _tmpl$38, _tmpl$45, ContextMenu;
11710
12111
  var init_context_menu = __esm({
11711
12112
  "src/components/context-menu.tsx"() {
11712
12113
  "use strict";
@@ -11719,6 +12120,7 @@ var init_context_menu = __esm({
11719
12120
  init_web();
11720
12121
  init_web();
11721
12122
  init_web();
12123
+ init_web();
11722
12124
  init_solid();
11723
12125
  init_constants();
11724
12126
  init_cn();
@@ -11730,12 +12132,19 @@ var init_context_menu = __esm({
11730
12132
  init_resolve_action_enabled();
11731
12133
  init_is_event_from_overlay();
11732
12134
  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">`);
12135
+ init_create_menu_highlight();
12136
+ _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">`);
12137
+ _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">`);
12138
+ _tmpl$38 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
12139
+ _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
12140
  ContextMenu = (props) => {
11738
12141
  let containerRef;
12142
+ const {
12143
+ containerRef: highlightContainerRef,
12144
+ highlightRef,
12145
+ updateHighlight,
12146
+ clearHighlight
12147
+ } = createMenuHighlight();
11739
12148
  const [measuredWidth, setMeasuredWidth] = createSignal(0);
11740
12149
  const [measuredHeight, setMeasuredHeight] = createSignal(0);
11741
12150
  const isVisible = () => props.position !== null;
@@ -11890,7 +12299,7 @@ var init_context_menu = __esm({
11890
12299
  return isVisible();
11891
12300
  },
11892
12301
  get children() {
11893
- var _el$ = _tmpl$211(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
12302
+ var _el$ = _tmpl$212(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
11894
12303
  _el$.$$contextmenu = handleMenuEvent;
11895
12304
  _el$.$$click = handleMenuEvent;
11896
12305
  _el$.$$mousedown = handleMenuEvent;
@@ -11930,38 +12339,46 @@ var init_context_menu = __esm({
11930
12339
  }));
11931
12340
  insert(_el$2, createComponent(BottomSection, {
11932
12341
  get children() {
11933
- var _el$4 = _tmpl$30();
12342
+ var _el$4 = _tmpl$31(), _el$5 = _el$4.firstChild;
12343
+ use(highlightContainerRef, _el$4);
12344
+ use(highlightRef, _el$5);
11934
12345
  insert(_el$4, createComponent(For, {
11935
12346
  get each() {
11936
12347
  return menuItems();
11937
12348
  },
11938
12349
  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, {
12350
+ var _el$6 = _tmpl$45(), _el$7 = _el$6.firstChild;
12351
+ _el$6.$$click = (event) => handleAction(item, event);
12352
+ addEventListener(_el$6, "pointerleave", clearHighlight);
12353
+ _el$6.addEventListener("pointerenter", (event) => {
12354
+ if (item.enabled) {
12355
+ updateHighlight(event.currentTarget);
12356
+ }
12357
+ });
12358
+ _el$6.$$pointerdown = (event) => event.stopPropagation();
12359
+ insert(_el$7, () => item.label);
12360
+ insert(_el$6, createComponent(Show, {
11944
12361
  get when() {
11945
12362
  return item.shortcut;
11946
12363
  },
11947
12364
  get children() {
11948
- var _el$7 = _tmpl$37();
11949
- insert(_el$7, () => formatShortcut(item.shortcut));
11950
- return _el$7;
12365
+ var _el$8 = _tmpl$38();
12366
+ insert(_el$8, () => formatShortcut(item.shortcut));
12367
+ return _el$8;
11951
12368
  }
11952
12369
  }), null);
11953
12370
  createRenderEffect((_p$) => {
11954
12371
  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);
12372
+ _v$4 !== _p$.e && setAttribute(_el$6, "data-react-grab-menu-item", _p$.e = _v$4);
12373
+ _v$5 !== _p$.t && (_el$6.disabled = _p$.t = _v$5);
11957
12374
  return _p$;
11958
12375
  }, {
11959
12376
  e: void 0,
11960
12377
  t: void 0
11961
12378
  });
11962
- return _el$5;
12379
+ return _el$6;
11963
12380
  })()
11964
- }));
12381
+ }), null);
11965
12382
  return _el$4;
11966
12383
  }
11967
12384
  }), null);
@@ -11985,18 +12402,18 @@ var init_context_menu = __esm({
11985
12402
  });
11986
12403
 
11987
12404
  // src/components/icons/icon-trash.tsx
11988
- var _tmpl$31, IconTrash;
12405
+ var _tmpl$39, IconTrash;
11989
12406
  var init_icon_trash = __esm({
11990
12407
  "src/components/icons/icon-trash.tsx"() {
11991
12408
  "use strict";
11992
12409
  init_web();
11993
12410
  init_web();
11994
12411
  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">`);
12412
+ _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
12413
  IconTrash = (props) => {
11997
12414
  const size = () => props.size ?? 14;
11998
12415
  return (() => {
11999
- var _el$ = _tmpl$31();
12416
+ var _el$ = _tmpl$39();
12000
12417
  createRenderEffect((_p$) => {
12001
12418
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
12002
12419
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -12015,7 +12432,7 @@ var init_icon_trash = __esm({
12015
12432
  });
12016
12433
 
12017
12434
  // src/components/history-dropdown.tsx
12018
- var _tmpl$38, _tmpl$212, _tmpl$39, _tmpl$46, ITEM_ACTION_CLASS, formatRelativeTime, getHistoryItemDisplayName, HistoryDropdown;
12435
+ var _tmpl$40, _tmpl$213, _tmpl$310, _tmpl$46, ITEM_ACTION_CLASS, formatRelativeTime, getHistoryItemDisplayName, HistoryDropdown;
12019
12436
  var init_history_dropdown = __esm({
12020
12437
  "src/components/history-dropdown.tsx"() {
12021
12438
  "use strict";
@@ -12028,20 +12445,22 @@ var init_history_dropdown = __esm({
12028
12445
  init_web();
12029
12446
  init_web();
12030
12447
  init_web();
12448
+ init_web();
12031
12449
  init_solid();
12032
12450
  init_constants();
12033
12451
  init_safe_polygon();
12034
- init_clamp_to_viewport();
12452
+ init_get_anchored_dropdown_position();
12035
12453
  init_cn();
12036
12454
  init_icon_trash();
12037
12455
  init_icon_copy();
12038
12456
  init_icon_check();
12039
12457
  init_tooltip();
12040
12458
  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>`);
12459
+ init_create_menu_highlight();
12460
+ _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">`);
12461
+ _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">`);
12462
+ _tmpl$310 = /* @__PURE__ */ template(`<span class="text-[11px] leading-3 font-sans text-black/40 truncate mt-0.5">`);
12463
+ _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
12464
  ITEM_ACTION_CLASS = "flex items-center justify-center cursor-pointer text-black/25 transition-colors press-scale";
12046
12465
  formatRelativeTime = (timestamp) => {
12047
12466
  const elapsedSeconds = Math.floor((Date.now() - timestamp) / 1e3);
@@ -12060,6 +12479,12 @@ var init_history_dropdown = __esm({
12060
12479
  };
12061
12480
  HistoryDropdown = (props) => {
12062
12481
  let containerRef;
12482
+ const {
12483
+ containerRef: highlightContainerRef,
12484
+ highlightRef,
12485
+ updateHighlight,
12486
+ clearHighlight
12487
+ } = createMenuHighlight();
12063
12488
  const safePolygonTracker = createSafePolygonTracker();
12064
12489
  const getToolbarTargetRects = () => {
12065
12490
  if (!containerRef) return null;
@@ -12119,32 +12544,17 @@ var init_history_dropdown = __esm({
12119
12544
  }, {
12120
12545
  defer: true
12121
12546
  }));
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
12547
  const displayPosition = createMemo((previousPosition) => {
12147
- const position = computedPosition();
12548
+ const position = getAnchoredDropdownPosition({
12549
+ anchor: props.position,
12550
+ measuredWidth: measuredWidth(),
12551
+ measuredHeight: measuredHeight(),
12552
+ viewportWidth: window.innerWidth,
12553
+ viewportHeight: window.innerHeight,
12554
+ anchorGapPx: DROPDOWN_ANCHOR_GAP_PX,
12555
+ viewportPaddingPx: DROPDOWN_VIEWPORT_PADDING_PX,
12556
+ offscreenPosition: DROPDOWN_OFFSCREEN_POSITION
12557
+ });
12148
12558
  if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
12149
12559
  return position;
12150
12560
  }
@@ -12188,7 +12598,7 @@ var init_history_dropdown = __esm({
12188
12598
  return shouldMount();
12189
12599
  },
12190
12600
  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;
12601
+ 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
12602
  _el$.addEventListener("mouseleave", (event) => {
12193
12603
  const targetRects = getToolbarTargetRects();
12194
12604
  if (targetRects) {
@@ -12215,7 +12625,7 @@ var init_history_dropdown = __esm({
12215
12625
  return props.items.length > 0;
12216
12626
  },
12217
12627
  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;
12628
+ 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
12629
  _el$7.addEventListener("mouseleave", () => setActiveHeaderTooltip(null));
12220
12630
  _el$7.addEventListener("mouseenter", () => setActiveHeaderTooltip("clear"));
12221
12631
  _el$7.$$click = (event) => {
@@ -12279,26 +12689,34 @@ var init_history_dropdown = __esm({
12279
12689
  return _el$5;
12280
12690
  }
12281
12691
  }), null);
12692
+ use(highlightContainerRef, _el$1);
12693
+ use(highlightRef, _el$10);
12282
12694
  insert(_el$1, createComponent(For, {
12283
12695
  get each() {
12284
12696
  return props.items;
12285
12697
  },
12286
12698
  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", () => {
12699
+ 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;
12700
+ addEventListener(_el$11, "blur", clearHighlight);
12701
+ _el$11.addEventListener("focus", (event) => updateHighlight(event.currentTarget));
12702
+ _el$11.addEventListener("mouseleave", () => {
12703
+ props.onItemHover?.(null);
12704
+ clearHighlight();
12705
+ });
12706
+ _el$11.addEventListener("mouseenter", (event) => {
12290
12707
  if (!props.disconnectedItemIds?.has(item.id)) {
12291
12708
  props.onItemHover?.(item.id);
12292
12709
  }
12710
+ updateHighlight(event.currentTarget);
12293
12711
  });
12294
- _el$10.$$keydown = (event) => {
12712
+ _el$11.$$keydown = (event) => {
12295
12713
  if (event.code === "Space" && event.currentTarget === event.target) {
12296
12714
  event.preventDefault();
12297
12715
  event.stopPropagation();
12298
12716
  props.onSelectItem?.(item);
12299
12717
  }
12300
12718
  };
12301
- _el$10.$$click = (event) => {
12719
+ _el$11.$$click = (event) => {
12302
12720
  event.stopPropagation();
12303
12721
  props.onSelectItem?.(item);
12304
12722
  setConfirmedCopyItemId(item.id);
@@ -12307,27 +12725,27 @@ var init_history_dropdown = __esm({
12307
12725
  setConfirmedCopyItemId(null);
12308
12726
  }, FEEDBACK_DURATION_MS);
12309
12727
  };
12310
- _el$10.$$pointerdown = (event) => event.stopPropagation();
12311
- insert(_el$12, () => getHistoryItemDisplayName(item));
12312
- insert(_el$11, createComponent(Show, {
12728
+ _el$11.$$pointerdown = (event) => event.stopPropagation();
12729
+ insert(_el$13, () => getHistoryItemDisplayName(item));
12730
+ insert(_el$12, createComponent(Show, {
12313
12731
  get when() {
12314
12732
  return item.commentText;
12315
12733
  },
12316
12734
  get children() {
12317
- var _el$13 = _tmpl$39();
12318
- insert(_el$13, () => item.commentText);
12319
- return _el$13;
12735
+ var _el$14 = _tmpl$310();
12736
+ insert(_el$14, () => item.commentText);
12737
+ return _el$14;
12320
12738
  }
12321
12739
  }), null);
12322
- insert(_el$15, () => formatRelativeTime(item.timestamp));
12323
- _el$17.$$click = (event) => {
12740
+ insert(_el$16, () => formatRelativeTime(item.timestamp));
12741
+ _el$18.$$click = (event) => {
12324
12742
  event.stopPropagation();
12325
12743
  props.onRemoveItem?.(item);
12326
12744
  };
12327
- insert(_el$17, createComponent(IconTrash, {
12745
+ insert(_el$18, createComponent(IconTrash, {
12328
12746
  size: DROPDOWN_ICON_SIZE_PX
12329
12747
  }));
12330
- _el$18.$$click = (event) => {
12748
+ _el$19.$$click = (event) => {
12331
12749
  event.stopPropagation();
12332
12750
  props.onCopyItem?.(item);
12333
12751
  setConfirmedCopyItemId(item.id);
@@ -12336,7 +12754,7 @@ var init_history_dropdown = __esm({
12336
12754
  setConfirmedCopyItemId(null);
12337
12755
  }, FEEDBACK_DURATION_MS);
12338
12756
  };
12339
- insert(_el$18, createComponent(Show, {
12757
+ insert(_el$19, createComponent(Show, {
12340
12758
  get when() {
12341
12759
  return confirmedCopyItemId() === item.id;
12342
12760
  },
@@ -12356,18 +12774,18 @@ var init_history_dropdown = __esm({
12356
12774
  var _v$1 = {
12357
12775
  "opacity-40 hover:opacity-100": Boolean(props.disconnectedItemIds?.has(item.id))
12358
12776
  }, _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);
12777
+ _p$.e = classList(_el$11, _v$1, _p$.e);
12778
+ _v$10 !== _p$.t && className(_el$18, _p$.t = _v$10);
12779
+ _v$11 !== _p$.a && className(_el$19, _p$.a = _v$11);
12362
12780
  return _p$;
12363
12781
  }, {
12364
12782
  e: void 0,
12365
12783
  t: void 0,
12366
12784
  a: void 0
12367
12785
  });
12368
- return _el$10;
12786
+ return _el$11;
12369
12787
  })()
12370
- }));
12788
+ }), null);
12371
12789
  createRenderEffect((_p$) => {
12372
12790
  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
12791
  _v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
@@ -12402,7 +12820,7 @@ var init_history_dropdown = __esm({
12402
12820
  });
12403
12821
 
12404
12822
  // src/components/clear-history-prompt.tsx
12405
- var _tmpl$40, ClearHistoryPrompt;
12823
+ var _tmpl$41, ClearHistoryPrompt;
12406
12824
  var init_clear_history_prompt = __esm({
12407
12825
  "src/components/clear-history-prompt.tsx"() {
12408
12826
  "use strict";
@@ -12416,13 +12834,13 @@ var init_clear_history_prompt = __esm({
12416
12834
  init_web();
12417
12835
  init_solid();
12418
12836
  init_constants();
12419
- init_clamp_to_viewport();
12837
+ init_get_anchored_dropdown_position();
12420
12838
  init_cn();
12421
12839
  init_is_event_from_overlay();
12422
12840
  init_is_keyboard_event_triggered_by_input();
12423
12841
  init_discard_prompt();
12424
12842
  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>`);
12843
+ _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
12844
  ClearHistoryPrompt = (props) => {
12427
12845
  let containerRef;
12428
12846
  const [measuredWidth, setMeasuredWidth] = createSignal(0);
@@ -12458,32 +12876,17 @@ var init_clear_history_prompt = __esm({
12458
12876
  }, DROPDOWN_ANIMATION_DURATION_MS);
12459
12877
  }
12460
12878
  });
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
12879
  const displayPosition = createMemo((previousPosition) => {
12486
- const position = computedPosition();
12880
+ const position = getAnchoredDropdownPosition({
12881
+ anchor: props.position,
12882
+ measuredWidth: measuredWidth(),
12883
+ measuredHeight: measuredHeight(),
12884
+ viewportWidth: window.innerWidth,
12885
+ viewportHeight: window.innerHeight,
12886
+ anchorGapPx: DROPDOWN_ANCHOR_GAP_PX,
12887
+ viewportPaddingPx: DROPDOWN_VIEWPORT_PADDING_PX,
12888
+ offscreenPosition: DROPDOWN_OFFSCREEN_POSITION
12889
+ });
12487
12890
  if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
12488
12891
  return position;
12489
12892
  }
@@ -12504,7 +12907,6 @@ var init_clear_history_prompt = __esm({
12504
12907
  const isEscape = event.code === "Escape";
12505
12908
  if (isEnter || isEscape) {
12506
12909
  event.preventDefault();
12507
- event.stopPropagation();
12508
12910
  event.stopImmediatePropagation();
12509
12911
  if (isEscape) {
12510
12912
  props.onCancel();
@@ -12548,7 +12950,7 @@ var init_clear_history_prompt = __esm({
12548
12950
  return shouldMount();
12549
12951
  },
12550
12952
  get children() {
12551
- var _el$ = _tmpl$40(), _el$2 = _el$.firstChild;
12953
+ var _el$ = _tmpl$41(), _el$2 = _el$.firstChild;
12552
12954
  _el$.$$contextmenu = handlePromptEvent;
12553
12955
  _el$.$$click = handlePromptEvent;
12554
12956
  _el$.$$mousedown = handlePromptEvent;
@@ -12593,7 +12995,7 @@ var init_clear_history_prompt = __esm({
12593
12995
  });
12594
12996
 
12595
12997
  // src/components/renderer.tsx
12596
- var _tmpl$41, ReactGrabRenderer;
12998
+ var _tmpl$47, ReactGrabRenderer;
12597
12999
  var init_renderer = __esm({
12598
13000
  "src/components/renderer.tsx"() {
12599
13001
  "use strict";
@@ -12613,7 +13015,7 @@ var init_renderer = __esm({
12613
13015
  init_context_menu();
12614
13016
  init_history_dropdown();
12615
13017
  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)">`);
13018
+ _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
13019
  ReactGrabRenderer = (props) => {
12618
13020
  return [createComponent(OverlayCanvas, {
12619
13021
  get crosshairVisible() {
@@ -12656,7 +13058,7 @@ var init_renderer = __esm({
12656
13058
  return props.labelInstances;
12657
13059
  }
12658
13060
  }), (() => {
12659
- var _el$ = _tmpl$41();
13061
+ var _el$ = _tmpl$47();
12660
13062
  setStyleProperty(_el$, "z-index", Z_INDEX_OVERLAY_CANVAS);
12661
13063
  setStyleProperty(_el$, "box-shadow", `inset 0 0 ${FROZEN_GLOW_EDGE_PX}px ${FROZEN_GLOW_COLOR}`);
12662
13064
  createRenderEffect((_$p) => setStyleProperty(_el$, "opacity", props.isFrozen ? 1 : 0));
@@ -12778,6 +13180,12 @@ var init_renderer = __esm({
12778
13180
  get actionCycleState() {
12779
13181
  return props.selectionActionCycleState;
12780
13182
  },
13183
+ get arrowNavigationState() {
13184
+ return props.selectionArrowNavigationState;
13185
+ },
13186
+ get onArrowNavigationSelect() {
13187
+ return props.onArrowNavigationSelect;
13188
+ },
12781
13189
  get filePath() {
12782
13190
  return props.selectionFilePath;
12783
13191
  },
@@ -13673,18 +14081,6 @@ var init_create_bounds_from_drag_rect = __esm({
13673
14081
  }
13674
14082
  });
13675
14083
 
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
14084
  // src/utils/is-c-like-key.ts
13689
14085
  var C_LIKE_CHARACTERS, isCLikeKey;
13690
14086
  var init_is_c_like_key = __esm({
@@ -14272,6 +14668,7 @@ var init_manager = __esm({
14272
14668
  init_create_element_bounds();
14273
14669
  init_is_element_connected();
14274
14670
  init_generate_snippet();
14671
+ init_recalculate_session_position();
14275
14672
  init_context();
14276
14673
  init_constants();
14277
14674
  init_get_tag_name();
@@ -14761,19 +15158,11 @@ var init_manager = __esm({
14761
15158
  if (newBounds.length > 0) {
14762
15159
  const oldFirstBounds = session.selectionBounds[0];
14763
15160
  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
- }
15161
+ const updatedPosition = recalculateSessionPosition({
15162
+ currentPosition: session.position,
15163
+ previousBounds: oldFirstBounds,
15164
+ nextBounds: newFirstBounds
15165
+ });
14777
15166
  updatedSessions.set(sessionId, {
14778
15167
  ...session,
14779
15168
  selectionBounds: newBounds,
@@ -15069,7 +15458,7 @@ var init_log_intro = __esm({
15069
15458
  init_is_extension_context();
15070
15459
  logIntro = () => {
15071
15460
  try {
15072
- const version = "0.1.20";
15461
+ const version = "0.1.22";
15073
15462
  const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
15074
15463
  console.log(
15075
15464
  `%cReact Grab${version ? ` v${version}` : ""}%c
@@ -15875,6 +16264,8 @@ var init_core = __esm({
15875
16264
  const [resolvedComponentName, setResolvedComponentName] = createSignal(void 0);
15876
16265
  const [actionCycleItems, setActionCycleItems] = createSignal([]);
15877
16266
  const [actionCycleActiveIndex, setActionCycleActiveIndex] = createSignal(null);
16267
+ const [arrowNavigationElements, setArrowNavigationElements] = createSignal([]);
16268
+ const [arrowNavigationActiveIndex, setArrowNavigationActiveIndex] = createSignal(0);
15878
16269
  const arrowNavigator = createArrowNavigator(isValidGrabbableElement, createElementBounds);
15879
16270
  const autoScroller = createAutoScroller(() => store.pointer, () => isDragging());
15880
16271
  const isRendererActive = createMemo(() => isActivated() && !isCopying());
@@ -16194,6 +16585,7 @@ var init_core = __esm({
16194
16585
  });
16195
16586
  };
16196
16587
  const targetElement = createMemo(() => {
16588
+ void store.viewportVersion;
16197
16589
  if (!isRendererActive() || isDragging()) return null;
16198
16590
  const element = store.detectedElement;
16199
16591
  if (!isElementConnected(element)) return null;
@@ -16528,7 +16920,7 @@ var init_core = __esm({
16528
16920
  const wasDragging = isDragging();
16529
16921
  const previousFocused = store.previouslyFocusedElement;
16530
16922
  actions.deactivate();
16531
- arrowNavigator.clearHistory();
16923
+ clearArrowNavigation();
16532
16924
  keyboardSelectedElement = null;
16533
16925
  isPendingContextMenuSelect = false;
16534
16926
  if (wasDragging) {
@@ -16722,6 +17114,7 @@ var init_core = __esm({
16722
17114
  };
16723
17115
  const openContextMenu = (element, position) => {
16724
17116
  actions.showContextMenu(position, element);
17117
+ clearArrowNavigation();
16725
17118
  dismissAllPopups();
16726
17119
  pluginRegistry.hooks.onContextMenu(element, position);
16727
17120
  };
@@ -16927,7 +17320,6 @@ var init_core = __esm({
16927
17320
  if (shouldBlockEnter) {
16928
17321
  keyboardClaimer.claimedEvents.add(event);
16929
17322
  event.preventDefault();
16930
- event.stopPropagation();
16931
17323
  event.stopImmediatePropagation();
16932
17324
  return true;
16933
17325
  }
@@ -16961,30 +17353,67 @@ var init_core = __esm({
16961
17353
  }
16962
17354
  return false;
16963
17355
  };
17356
+ const clearArrowNavigation = () => {
17357
+ setArrowNavigationElements([]);
17358
+ setArrowNavigationActiveIndex(0);
17359
+ arrowNavigator.clearHistory();
17360
+ };
17361
+ const selectAndFocusElement = (element) => {
17362
+ actions.setFrozenElement(element);
17363
+ actions.freeze();
17364
+ keyboardSelectedElement = element;
17365
+ const bounds = createElementBounds(element);
17366
+ const center = getBoundsCenter(bounds);
17367
+ actions.setPointer(center);
17368
+ if (store.contextMenuPosition !== null) {
17369
+ actions.showContextMenu(center, element);
17370
+ }
17371
+ };
17372
+ const openArrowNavigationMenu = (anchorElement) => {
17373
+ const bounds = createElementBounds(anchorElement);
17374
+ const elementsAtPoint = getElementsAtPoint(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2).filter(isValidGrabbableElement).reverse();
17375
+ setArrowNavigationElements(elementsAtPoint);
17376
+ setArrowNavigationActiveIndex(Math.max(0, elementsAtPoint.indexOf(anchorElement)));
17377
+ };
17378
+ const handleArrowNavigationSelect = (index) => {
17379
+ const targetElement2 = arrowNavigationElements()[index];
17380
+ if (!targetElement2) return;
17381
+ setArrowNavigationActiveIndex(index);
17382
+ arrowNavigator.clearHistory();
17383
+ selectAndFocusElement(targetElement2);
17384
+ };
16964
17385
  const handleArrowNavigation = (event) => {
16965
17386
  if (!isActivated() || isPromptMode()) return false;
16966
17387
  if (!ARROW_KEYS.has(event.key)) return false;
16967
17388
  let currentElement = effectiveElement();
16968
17389
  const isInitialSelection = !currentElement;
16969
17390
  if (!currentElement) {
16970
- const viewportCenterX = window.innerWidth / 2;
16971
- const viewportCenterY = window.innerHeight / 2;
16972
- currentElement = getElementAtPosition(viewportCenterX, viewportCenterY);
17391
+ currentElement = getElementAtPosition(window.innerWidth / 2, window.innerHeight / 2);
16973
17392
  }
16974
17393
  if (!currentElement) return false;
17394
+ const isVertical = event.key === "ArrowUp" || event.key === "ArrowDown";
17395
+ if (!isVertical) {
17396
+ clearArrowNavigation();
17397
+ const nextElement2 = arrowNavigator.findNext(event.key, currentElement);
17398
+ if (!nextElement2 && !isInitialSelection) return false;
17399
+ event.preventDefault();
17400
+ event.stopPropagation();
17401
+ selectAndFocusElement(nextElement2 ?? currentElement);
17402
+ return true;
17403
+ }
17404
+ if (arrowNavigationElements().length === 0) {
17405
+ openArrowNavigationMenu(currentElement);
17406
+ }
16975
17407
  const nextElement = arrowNavigator.findNext(event.key, currentElement);
16976
- if (!nextElement && !isInitialSelection) return false;
16977
17408
  const elementToSelect = nextElement ?? currentElement;
16978
17409
  event.preventDefault();
16979
17410
  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);
17411
+ selectAndFocusElement(elementToSelect);
17412
+ const newIndex = arrowNavigationElements().indexOf(elementToSelect);
17413
+ if (newIndex !== -1) {
17414
+ setArrowNavigationActiveIndex(newIndex);
17415
+ } else {
17416
+ openArrowNavigationMenu(elementToSelect);
16988
17417
  }
16989
17418
  return true;
16990
17419
  };
@@ -16995,7 +17424,6 @@ var init_core = __esm({
16995
17424
  const canActivateFromCopied = !isHoldingKeys() && !isPromptMode() && !isActivated() && copiedElement && isElementConnected(copiedElement) && !store.labelInstances.some((instance) => instance.status === "copied" || instance.status === "fading");
16996
17425
  if (canActivateFromCopied) {
16997
17426
  event.preventDefault();
16998
- event.stopPropagation();
16999
17427
  event.stopImmediatePropagation();
17000
17428
  const center = getBoundsCenter(createElementBounds(copiedElement));
17001
17429
  actions.setPointer(center);
@@ -17011,7 +17439,6 @@ var init_core = __esm({
17011
17439
  const canActivateFromHolding = isHoldingKeys() && !isPromptMode();
17012
17440
  if (canActivateFromHolding) {
17013
17441
  event.preventDefault();
17014
- event.stopPropagation();
17015
17442
  event.stopImmediatePropagation();
17016
17443
  const element = store.frozenElement || targetElement();
17017
17444
  if (element) {
@@ -17070,6 +17497,15 @@ var init_core = __esm({
17070
17497
  activeIndex: actionCycleActiveIndex(),
17071
17498
  isVisible: actionCycleActiveIndex() !== null && actionCycleItems().length > 0
17072
17499
  }));
17500
+ const arrowNavigationItems = createMemo(() => arrowNavigationElements().map((element) => ({
17501
+ tagName: getTagName(element) || "element",
17502
+ componentName: getComponentDisplayName(element) ?? void 0
17503
+ })));
17504
+ const arrowNavigationState = createMemo(() => ({
17505
+ items: arrowNavigationItems(),
17506
+ activeIndex: arrowNavigationActiveIndex(),
17507
+ isVisible: arrowNavigationElements().length > 0
17508
+ }));
17073
17509
  createEffect(on(selectionElement, () => {
17074
17510
  resetActionCycle();
17075
17511
  }));
@@ -17182,7 +17618,6 @@ var init_core = __esm({
17182
17618
  if ((isActivated() || isHoldingKeys()) && !isPromptMode()) {
17183
17619
  event.preventDefault();
17184
17620
  if (isEnterCode(event.code)) {
17185
- event.stopPropagation();
17186
17621
  event.stopImmediatePropagation();
17187
17622
  }
17188
17623
  }
@@ -17386,7 +17821,7 @@ var init_core = __esm({
17386
17821
  const isActiveState = isTouchPointer ? isHoldingKeys() : isActivated();
17387
17822
  if (isActiveState && !isPromptMode() && isToggleFrozen()) {
17388
17823
  actions.unfreeze();
17389
- arrowNavigator.clearHistory();
17824
+ clearArrowNavigation();
17390
17825
  }
17391
17826
  handlePointerMove(event.clientX, event.clientY);
17392
17827
  }, {
@@ -17413,7 +17848,6 @@ var init_core = __esm({
17413
17848
  if (didHandle) {
17414
17849
  document.documentElement.setPointerCapture(event.pointerId);
17415
17850
  event.preventDefault();
17416
- event.stopPropagation();
17417
17851
  event.stopImmediatePropagation();
17418
17852
  }
17419
17853
  }, {
@@ -17424,14 +17858,24 @@ var init_core = __esm({
17424
17858
  if (!event.isPrimary) return;
17425
17859
  if (isEventFromOverlay(event, "data-react-grab-ignore-events")) return;
17426
17860
  if (store.contextMenuPosition !== null) return;
17861
+ const isActive = isRendererActive() || isCopying() || isDragging();
17427
17862
  const hasModifierKeyHeld = event.metaKey || event.ctrlKey;
17428
17863
  handlePointerUp(event.clientX, event.clientY, hasModifierKeyHeld);
17864
+ if (isActive) {
17865
+ event.preventDefault();
17866
+ event.stopImmediatePropagation();
17867
+ }
17429
17868
  }, {
17430
17869
  capture: true
17431
17870
  });
17432
17871
  eventListenerManager.addWindowListener("contextmenu", (event) => {
17433
17872
  if (!isRendererActive() || isCopying() || isPromptMode()) return;
17434
- if (isEventFromOverlay(event, "data-react-grab-ignore-events")) return;
17873
+ const isFromOverlay = isEventFromOverlay(event, "data-react-grab-ignore-events");
17874
+ if (isFromOverlay && arrowNavigationElements().length > 0) {
17875
+ clearArrowNavigation();
17876
+ } else if (isFromOverlay) {
17877
+ return;
17878
+ }
17435
17879
  if (store.contextMenuPosition !== null) {
17436
17880
  event.preventDefault();
17437
17881
  return;
@@ -17467,7 +17911,6 @@ var init_core = __esm({
17467
17911
  if (store.contextMenuPosition !== null) return;
17468
17912
  if (isRendererActive() || isCopying() || didJustDrag()) {
17469
17913
  event.preventDefault();
17470
- event.stopPropagation();
17471
17914
  event.stopImmediatePropagation();
17472
17915
  if (store.wasActivatedByToggle && !isCopying() && !isPromptMode()) {
17473
17916
  if (!isHoldingKeys()) {
@@ -17538,6 +17981,18 @@ var init_core = __esm({
17538
17981
  previousViewportHeight = currentViewportHeight;
17539
17982
  handleViewportChange();
17540
17983
  });
17984
+ const visualViewport = window.visualViewport;
17985
+ if (visualViewport) {
17986
+ const {
17987
+ signal
17988
+ } = eventListenerManager;
17989
+ visualViewport.addEventListener("resize", handleViewportChange, {
17990
+ signal
17991
+ });
17992
+ visualViewport.addEventListener("scroll", handleViewportChange, {
17993
+ signal
17994
+ });
17995
+ }
17541
17996
  let boundsRecalcIntervalId = null;
17542
17997
  let viewportChangeFrameId = null;
17543
17998
  const startBoundsRecalcIntervalIfNeeded = () => {
@@ -18319,6 +18774,10 @@ var init_core = __esm({
18319
18774
  get selectionActionCycleState() {
18320
18775
  return actionCycleState();
18321
18776
  },
18777
+ get selectionArrowNavigationState() {
18778
+ return arrowNavigationState();
18779
+ },
18780
+ onArrowNavigationSelect: handleArrowNavigationSelect,
18322
18781
  get labelInstances() {
18323
18782
  return computedLabelInstances();
18324
18783
  },