react-grab 0.0.55 → 0.0.57

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.
@@ -751,7 +751,8 @@ function cleanChildren(parent, current, marker, replacement) {
751
751
  }
752
752
 
753
753
  // dist/styles.css
754
- var 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-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--font-weight-medium:500;--ease-out:cubic-bezier(0,0,.2,1);--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-grab-pink:#b21c8e;--color-grab-purple:#d239c0;--color-label-tag-border:#730079;--color-label-tag-text:#1e001f;--color-label-gray-border:#b0b0b0;--color-label-success-bg:#d9ffe4;--color-label-success-border:#00bb69;--color-label-success-text:#006e3b;--color-label-divider:#dedede;--color-label-muted:#767676}}@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}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.top-0{top:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.z-2147483645{z-index:2147483645}.z-2147483646{z-index:2147483646}.z-2147483647{z-index:2147483647}.z-\\[2147483645\\]{z-index:2147483645}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.mt-\\[2\\.5px\\]{margin-top:2.5px}.-ml-\\[5px\\]{margin-left:-5px}.ml-1{margin-left:calc(var(--spacing)*1)}.box-border{box-sizing:border-box}.flex{display:flex}.hidden{display:none}.h-0{height:calc(var(--spacing)*0)}.h-5{height:calc(var(--spacing)*5)}.h-5\\.5{height:calc(var(--spacing)*5.5)}.h-\\[14px\\]{height:14px}.h-\\[18px\\]{height:18px}.h-fit{height:fit-content}.min-h-\\[14px\\]{min-height:14px}.w-0{width:calc(var(--spacing)*0)}.w-0\\.5{width:calc(var(--spacing)*.5)}.w-1{width:calc(var(--spacing)*1)}.w-\\[18px\\]{width:18px}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-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)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-crosshair{cursor:crosshair}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.flex-col{flex-direction:column}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-\\[3px\\]{gap:3px}.gap-\\[5px\\]{gap:5px}.rounded-\\[1\\.5px\\]{border-radius:1.5px}.rounded-\\[3px\\]{border-radius:3px}.rounded-full{border-radius:3.40282e38px}.rounded-br-\\[3px\\]{border-bottom-right-radius:3px}.rounded-bl-\\[3px\\]{border-bottom-left-radius:3px}.border{border-style:var(--tw-border-style);border-width:1px}.border-\\[0\\.5px\\]{border-style:var(--tw-border-style);border-width:.5px}.border-t-\\[0\\.5px\\]{border-top-style:var(--tw-border-style);border-top-width:.5px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-grab-purple{border-color:var(--color-grab-purple)}.border-grab-purple\\/40{border-color:#d239c066}@supports (color:color-mix(in lab, red, red)){.border-grab-purple\\/40{border-color:color-mix(in oklab,var(--color-grab-purple)40%,transparent)}}.border-grab-purple\\/50{border-color:#d239c080}@supports (color:color-mix(in lab, red, red)){.border-grab-purple\\/50{border-color:color-mix(in oklab,var(--color-grab-purple)50%,transparent)}}.border-label-gray-border{border-color:var(--color-label-gray-border)}.border-label-success-border{border-color:var(--color-label-success-border)}.border-label-tag-border{border-color:var(--color-label-tag-border)}.border-t-label-divider{border-top-color:var(--color-label-divider)}.bg-black{background-color:var(--color-black)}.bg-grab-pink{background-color:var(--color-grab-pink)}.bg-grab-purple\\/5{background-color:#d239c00d}@supports (color:color-mix(in lab, red, red)){.bg-grab-purple\\/5{background-color:color-mix(in oklab,var(--color-grab-purple)5%,transparent)}}.bg-grab-purple\\/8{background-color:#d239c014}@supports (color:color-mix(in lab, red, red)){.bg-grab-purple\\/8{background-color:color-mix(in oklab,var(--color-grab-purple)8%,transparent)}}.bg-label-success-bg{background-color:var(--color-label-success-bg)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.p-0{padding:calc(var(--spacing)*0)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-\\[5px\\]{padding-inline:5px}.py-\\[5px\\]{padding-block:5px}.py-px{padding-block:1px}.pt-1{padding-top:calc(var(--spacing)*1)}.align-middle{vertical-align:middle}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.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)}.tracking-\\[-0\\.04em\\]{--tw-tracking:-.04em;letter-spacing:-.04em}.text-black{color:var(--color-black)}.text-label-muted{color:var(--color-label-muted)}.text-label-success-text{color:var(--color-label-success-text)}.text-label-tag-border{color:var(--color-label-tag-border)}.text-label-tag-text{color:var(--color-label-tag-text)}.text-white{color:var(--color-white)}.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-50{opacity:.5}.opacity-100{opacity:1}.opacity-\\[0\\.65\\]{opacity:.65}.brightness-125{--tw-brightness:brightness(125%);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,)}.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-\\[width\\,height\\]{transition-property:width,height;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-opacity{transition-property:opacity;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-\\[transform\\,width\\,height\\]{will-change:transform,width,height}.outline-none{--tw-outline-style:none;outline-style:none}@media (hover:hover){.hover\\:opacity-80:hover{opacity:.8}.hover\\:opacity-100:hover{opacity:1}}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.react-grab-shimmer{position:relative;overflow:hidden}.react-grab-shimmer:after{content:"";border-radius:inherit;pointer-events:none;background:linear-gradient(90deg,#0000 0%,#fff6 50%,#0000 100%) 0 0/200% 100%;animation:1.5s ease-in-out infinite shimmer;position:absolute;inset:0}@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-tracking{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-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}';
754
+ var styles_default = `/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
755
+ @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-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial;--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}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--font-weight-medium:500;--radius-xs:.125rem;--ease-out:cubic-bezier(0,0,.2,1);--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-grab-pink:#b21c8e;--color-grab-purple:#d239c0;--color-label-tag-border:#730079;--color-label-gray-border:#b0b0b0;--color-label-success-bg:#d9ffe4;--color-label-success-border:#00bb69;--color-label-success-text:#006e3b;--color-label-muted:#767676}}@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}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.top-0{top:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.z-2147483645{z-index:2147483645}.z-2147483646{z-index:2147483646}.z-2147483647{z-index:2147483647}.z-\\[2147483645\\]{z-index:2147483645}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.-ml-\\[2px\\]{margin-left:-2px}.ml-1{margin-left:calc(var(--spacing)*1)}.box-border{box-sizing:border-box}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-0{height:calc(var(--spacing)*0)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-5\\.5{height:calc(var(--spacing)*5.5)}.h-\\[9px\\]{height:9px}.h-\\[18px\\]{height:18px}.h-fit{height:fit-content}.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-0\\.5{width:calc(var(--spacing)*.5)}.w-1{width:calc(var(--spacing)*1)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-\\[18px\\]{width:18px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-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)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-crosshair{cursor:crosshair}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-\\[2px\\]{gap:2px}.gap-\\[3px\\]{gap:3px}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.rounded-\\[1\\.5px\\]{border-radius:1.5px}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[3px\\]{border-radius:3px}.rounded-full{border-radius:3.40282e38px}.rounded-xs{border-radius:var(--radius-xs)}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-br-\\[3px\\]{border-bottom-right-radius:3px}.rounded-bl-\\[3px\\]{border-bottom-left-radius:3px}.border{border-style:var(--tw-border-style);border-width:1px}.border-\\[0\\.5px\\]{border-style:var(--tw-border-style);border-width:.5px}.\\[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-grab-purple{border-color:var(--color-grab-purple)}.border-grab-purple\\/40{border-color:#d239c066}@supports (color:color-mix(in lab, red, red)){.border-grab-purple\\/40{border-color:color-mix(in oklab,var(--color-grab-purple)40%,transparent)}}.border-grab-purple\\/50{border-color:#d239c080}@supports (color:color-mix(in lab, red, red)){.border-grab-purple\\/50{border-color:color-mix(in oklab,var(--color-grab-purple)50%,transparent)}}.border-label-gray-border{border-color:var(--color-label-gray-border)}.border-label-success-border{border-color:var(--color-label-success-border)}.border-label-tag-border{border-color:var(--color-label-tag-border)}.border-white{border-color:var(--color-white)}.border-t-\\[\\#B6B6B6\\]{border-top-color:#b6b6b6}.bg-\\[\\#F2F2F2\\]{background-color:#f2f2f2}.bg-black{background-color:var(--color-black)}.bg-grab-pink{background-color:var(--color-grab-pink)}.bg-grab-purple\\/5{background-color:#d239c00d}@supports (color:color-mix(in lab, red, red)){.bg-grab-purple\\/5{background-color:color-mix(in oklab,var(--color-grab-purple)5%,transparent)}}.bg-grab-purple\\/8{background-color:#d239c014}@supports (color:color-mix(in lab, red, red)){.bg-grab-purple\\/8{background-color:color-mix(in oklab,var(--color-grab-purple)8%,transparent)}}.bg-label-success-bg{background-color:var(--color-label-success-bg)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-cover{background-size:cover}.bg-center{background-position:50%}.p-0{padding:calc(var(--spacing)*0)}.p-0\\.5{padding:calc(var(--spacing)*.5)}.px-0{padding-inline:calc(var(--spacing)*0)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-\\[3px\\]{padding-inline:3px}.px-\\[5px\\]{padding-inline:5px}.py-0{padding-block:calc(var(--spacing)*0)}.py-\\[5px\\]{padding-block:5px}.py-px{padding-block:1px}.pt-1{padding-top:calc(var(--spacing)*1)}.pb-1\\.5{padding-bottom:calc(var(--spacing)*1.5)}.align-middle{vertical-align:middle}.font-\\[ui-monospace\\,\\'SFMono-Regular\\'\\,\\'SF_Mono\\'\\,\\'Menlo\\'\\,\\'Consolas\\'\\,\\'Liberation_Mono\\'\\,monospace\\]{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-\\[11\\.5px\\]{font-size:11.5px}.text-\\[12px\\]{font-size:12px}.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)}.tracking-\\[-0\\.04em\\]{--tw-tracking:-.04em;letter-spacing:-.04em}.tracking-\\[-0\\.08em\\]{--tw-tracking:-.08em;letter-spacing:-.08em}.text-\\[\\#47004A\\]{color:#47004a}.text-black{color:var(--color-black)}.text-label-muted{color:var(--color-label-muted)}.text-label-success-text{color:var(--color-label-success-text)}.text-label-tag-border{color:var(--color-label-tag-border)}.text-white{color:var(--color-white)}.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-50{opacity:.5}.opacity-100{opacity:1}.opacity-\\[0\\.99\\]{opacity:.99}.brightness-125{--tw-brightness:brightness(125%);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,)}.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-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[width\\,height\\]{transition-property:width,height;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-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-none{transition-property:none}.duration-30{--tw-duration:30ms;transition-duration:30ms}.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-\\[transform\\,width\\,height\\]{will-change:transform,width,height}.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}.\\[font-synthesis\\:none\\]{font-synthesis:none}@media (hover:hover){.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px 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)}}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.react-grab-shimmer{position:relative;overflow:hidden}.react-grab-shimmer:after{content:"";border-radius:inherit;pointer-events:none;background:linear-gradient(90deg,#0000 0%,#fff6 50%,#0000 100%) 0 0/200% 100%;animation:1.5s ease-in-out infinite shimmer;position:absolute;inset:0}@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-tracking{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-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@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}@keyframes pulse{50%{opacity:.5}}`;
755
756
 
756
757
  // src/utils/is-keyboard-event-triggered-by-input.ts
757
758
  var FORM_TAGS_AND_ROLES = [
@@ -864,6 +865,11 @@ var mountRoot = (cssText) => {
864
865
  shadowRoot.appendChild(root);
865
866
  const doc = document.body ?? document.documentElement;
866
867
  doc.appendChild(host);
868
+ setTimeout(() => {
869
+ if (!doc.contains(host)) {
870
+ doc.appendChild(host);
871
+ }
872
+ }, 1e3);
867
873
  return root;
868
874
  };
869
875
 
@@ -3370,9 +3376,7 @@ var getDefaultConfig = () => {
3370
3376
  var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
3371
3377
 
3372
3378
  // src/utils/cn.ts
3373
- var cn = (...inputs) => {
3374
- return twMerge(clsx(inputs));
3375
- };
3379
+ var cn = (...inputs) => twMerge(clsx(inputs));
3376
3380
 
3377
3381
  // src/components/selection-box.tsx
3378
3382
  var _tmpl$ = /* @__PURE__ */ template(`<div style=overflow:visible>`);
@@ -3656,33 +3660,12 @@ var IconOpen = (props) => {
3656
3660
  })();
3657
3661
  };
3658
3662
 
3659
- // src/components/icon-return-key.tsx
3660
- var _tmpl$6 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 12 12"><g fill=none stroke-linecap=round stroke-linejoin=round stroke-width=1 stroke=currentColor><path d=m1.25,6.75h8.5c.5523,0,1-.4477,1-1v-2.5c0-.5523-.4477-1-1-1h-1.75></path><polyline points="3.75 4 1 6.75 3.75 9.5">`);
3661
- var IconReturnKey = (props) => {
3662
- const size = () => props.size ?? 14;
3663
- return (() => {
3664
- var _el$ = _tmpl$6();
3665
- createRenderEffect((_p$) => {
3666
- var _v$ = size(), _v$2 = size(), _v$3 = props.class;
3667
- _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
3668
- _v$2 !== _p$.t && setAttribute(_el$, "height", _p$.t = _v$2);
3669
- _v$3 !== _p$.a && setAttribute(_el$, "class", _p$.a = _v$3);
3670
- return _p$;
3671
- }, {
3672
- e: void 0,
3673
- t: void 0,
3674
- a: void 0
3675
- });
3676
- return _el$;
3677
- })();
3678
- };
3679
-
3680
3663
  // src/components/icon-stop.tsx
3681
- var _tmpl$7 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 9 9"fill=none><rect x=1 y=1 width=7 height=7 rx=1 fill=currentColor>`);
3664
+ var _tmpl$6 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 9 9"fill=none><rect x=1 y=1 width=7 height=7 rx=1 fill=currentColor>`);
3682
3665
  var IconStop = (props) => {
3683
3666
  const size = () => props.size ?? 9;
3684
3667
  return (() => {
3685
- var _el$ = _tmpl$7();
3668
+ var _el$ = _tmpl$6();
3686
3669
  createRenderEffect((_p$) => {
3687
3670
  var _v$ = size(), _v$2 = size(), _v$3 = props.class;
3688
3671
  _v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
@@ -3699,23 +3682,25 @@ var IconStop = (props) => {
3699
3682
  };
3700
3683
 
3701
3684
  // src/components/selection-label.tsx
3702
- var _tmpl$8 = /* @__PURE__ */ template(`<div style="background-image:linear-gradient(in oklab 180deg, oklab(88.7% 0.086 -0.058) 0%, oklab(83.2% 0.132 -0.089) 100%)"><span>`);
3685
+ var _tmpl$7 = /* @__PURE__ */ template(`<div style="background-image:linear-gradient(in oklab 180deg, oklab(88.7% 0.086 -0.058) 0%, oklab(83.2% 0.132 -0.089) 100%)"><span>`);
3703
3686
  var _tmpl$22 = /* @__PURE__ */ template(`<span>`);
3704
3687
  var _tmpl$32 = /* @__PURE__ */ template(`<button>`);
3705
3688
  var _tmpl$42 = /* @__PURE__ */ template(`<div>`);
3706
3689
  var _tmpl$52 = /* @__PURE__ */ template(`<div class="flex items-center h-[18px] rounded-[1.5px] gap-[3px] px-[5px] py-px bg-label-success-bg border-[0.5px] border-solid border-label-success-border"><span class="text-label-success-text text-[12px] leading-4 font-medium tracking-[-0.04em]">`);
3707
- var _tmpl$62 = /* @__PURE__ */ template(`<div class="absolute w-0 h-0"style="border-left:8px solid transparent;border-right:8px solid transparent;z-index:1">`);
3708
- var _tmpl$72 = /* @__PURE__ */ template(`<div class="shrink-0 flex flex-col items-start px-2 py-[5px] w-full h-fit rounded-bl-[3px] rounded-br-[3px] border-t-[0.5px] border-t-solid border-t-label-divider">`);
3709
- var _tmpl$82 = /* @__PURE__ */ template(`<div class="flex items-center gap-[3px]">`);
3710
- var _tmpl$9 = /* @__PURE__ */ template(`<button class="flex items-center justify-center w-[18px] h-[18px] rounded-full cursor-pointer bg-black border-none transition-opacity hover:opacity-80"title=Stop>`);
3711
- var _tmpl$0 = /* @__PURE__ */ template(`<div class="flex items-center gap-[3px] react-grab-shimmer rounded-[3px]">`);
3712
- var _tmpl$1 = /* @__PURE__ */ template(`<div class="shrink-0 flex items-center gap-1 w-full h-[14px]"><span class="text-label-muted text-[11px] leading-3.5 shrink-0 tracking-[-0.04em] font-medium w-fit h-fit">to change`);
3713
- var _tmpl$10 = /* @__PURE__ */ template(`<div class="shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit"><div class="shrink-0 flex items-center gap-[3px] pt-1 w-fit h-fit px-1">`);
3714
- var _tmpl$11 = /* @__PURE__ */ template(`<div class="shrink-0 flex justify-between items-start w-full min-h-[14px]"><textarea class="text-black text-[11px] leading-3.5 tracking-[-0.04em] font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0"placeholder="type to modify..."rows=1 style=field-sizing:content;min-height:14px></textarea><button class="shrink-0 flex items-center gap-1 w-fit h-fit cursor-pointer bg-transparent border-none p-0 ml-1 mt-[2.5px]">`);
3715
- var _tmpl$12 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events class="fixed font-sans antialiased transition-opacity duration-300 ease-out"style=z-index:2147483647><div class="relative flex items-center gap-[5px] bg-white rounded-[3px]"style="box-shadow:#00000033 0px 2px 3px">`);
3690
+ var _tmpl$62 = /* @__PURE__ */ template(`<div class="absolute w-0 h-0"style="border-left:8px solid transparent;border-right:8px solid transparent">`);
3691
+ var _tmpl$72 = /* @__PURE__ */ template(`<div role=button><div class="text-black text-[12px] leading-4 shrink-0 tracking-[-0.04em] font-sans font-medium w-fit h-fit">Click to copy`);
3692
+ var _tmpl$8 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col items-start px-2 py-[5px] w-auto h-fit rounded-bl-[3px] rounded-br-[3px] self-stretch bg-[#F2F2F2] [border-top-width:0.5px] border-t-solid border-t-[#B6B6B6] rounded-t-none">`);
3693
+ var _tmpl$9 = /* @__PURE__ */ template(`<div class="flex items-center gap-[3px] pt-1 pb-1.5 px-1.5">`);
3694
+ var _tmpl$0 = /* @__PURE__ */ template(`<button class="flex items-center justify-center w-[18px] h-[18px] rounded-full cursor-pointer bg-black border-none transition-opacity hover:opacity-80"title=Stop>`);
3695
+ var _tmpl$1 = /* @__PURE__ */ template(`<div class="flex items-center gap-[3px] react-grab-shimmer rounded-[3px] pt-1 pb-1.5 px-1.5">`);
3696
+ var _tmpl$10 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex items-center gap-1 w-fit h-fit"><span class="text-label-muted text-[12px] leading-4 shrink-0 tracking-[-0.04em] font-sans font-medium w-fit h-fit">Press</span><div class="contain-layout shrink-0 flex flex-col items-start p-0.5 rounded-[1px] bg-white [border-width:0.5px] border-solid border-white w-fit h-fit"style="box-shadow:#0000008C 0px 0px 2px"><div class="w-2.5 h-[9px] shrink-0 opacity-[0.99] bg-cover bg-center"style=background-image:url(https://workers.paper.design/file-assets/01K8D51Q7E2ESJTN18XN2MT96X/01KBEJ7N5GQ0ZZ7K456R42AP4V.svg)></div></div><span class="text-label-muted text-[12px] leading-4 shrink-0 tracking-[-0.04em] font-sans font-medium w-fit h-fit">to edit`);
3697
+ var _tmpl$11 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 w-fit h-fit pt-1 px-1.5"></div><div class="grid w-full transition-[grid-template-rows] duration-30 ease-out"><div class="overflow-hidden min-h-0">`);
3698
+ var _tmpl$12 = /* @__PURE__ */ template(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea class="text-black text-[12px] leading-4 tracking-[-0.04em] font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0"placeholder="type to edit"rows=1 style=field-sizing:content;min-height:16px></textarea><button class="contain-layout shrink-0 flex flex-col items-start p-0.5 rounded-xs bg-white [border-width:0.5px] border-solid border-white w-fit h-fit cursor-pointer ml-1 transition-none hover:scale-105 hover:shadow-md"style="box-shadow:#0000008C 0px 0px 2px"><div style=background-image:url(https://workers.paper.design/file-assets/01K8D51Q7E2ESJTN18XN2MT96X/01KBEJ7N5GQ0ZZ7K456R42AP4V.svg)>`);
3699
+ var _tmpl$13 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 px-1.5 w-fit h-fit">`);
3700
+ var _tmpl$14 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events class="fixed font-sans antialiased transition-opacity duration-300 ease-out"style="z-index:2147483647;filter:drop-shadow(0 1px 2px rgba(0,0,0,0.2)) drop-shadow(0 2px 4px rgba(0,0,0,0.25))"><div class="[font-synthesis:none] contain-layout flex items-center gap-[5px] rounded-[2px] bg-white antialiased w-fit h-fit p-0">`);
3716
3701
  var ARROW_HEIGHT = 8;
3717
3702
  var LABEL_GAP = 4;
3718
- var IDLE_TIMEOUT_MS = 150;
3703
+ var IDLE_TIMEOUT_MS = 400;
3719
3704
  var TagBadge = (props) => {
3720
3705
  const [isHovered, setIsHovered] = createSignal(false);
3721
3706
  const handleMouseEnter = () => {
@@ -3727,26 +3712,26 @@ var TagBadge = (props) => {
3727
3712
  props.onHoverChange?.(false);
3728
3713
  };
3729
3714
  return (() => {
3730
- var _el$ = _tmpl$8(), _el$2 = _el$.firstChild;
3715
+ var _el$ = _tmpl$7(), _el$2 = _el$.firstChild;
3731
3716
  addEventListener(_el$, "click", props.onClick);
3732
3717
  _el$.addEventListener("mouseleave", handleMouseLeave);
3733
3718
  _el$.addEventListener("mouseenter", handleMouseEnter);
3734
3719
  insert(_el$2, () => props.tagName);
3735
3720
  insert(_el$, createComponent(Show, {
3736
3721
  get when() {
3737
- return props.isClickable;
3722
+ return props.isClickable || props.forceShowIcon;
3738
3723
  },
3739
3724
  get children() {
3740
3725
  return createComponent(IconOpen, {
3741
3726
  size: 10,
3742
3727
  get ["class"]() {
3743
- return cn("text-label-tag-border transition-all duration-100", isHovered() ? "opacity-100 scale-100" : "opacity-0 scale-75 -ml-[5px] w-0");
3728
+ return cn("text-label-tag-border transition-all duration-100", isHovered() || props.forceShowIcon ? "opacity-100 scale-100" : "opacity-0 scale-75 -ml-[2px] w-0");
3744
3729
  }
3745
3730
  });
3746
3731
  }
3747
3732
  }), null);
3748
3733
  createRenderEffect((_p$) => {
3749
- var _v$ = cn("flex items-center px-1 py-px h-[18px] rounded-[1.5px] gap-[5px] border-[0.5px] border-solid border-label-tag-border", props.shrink && "shrink-0 w-fit", props.isClickable && "cursor-pointer"), _v$2 = cn("text-label-tag-text text-[12px] leading-4 font-medium tracking-[-0.04em]", props.showMono && "font-mono", props.shrink && "shrink-0 w-fit h-fit");
3734
+ var _v$ = cn("contain-layout flex items-center px-[3px] py-0 h-4 rounded-[1px] gap-[2px] [border-width:0.5px] border-solid border-label-tag-border", props.shrink && "shrink-0 w-fit", props.isClickable && "cursor-pointer"), _v$2 = cn("text-[#47004A] text-[11.5px] leading-3.5 shrink-0 w-fit h-fit", props.showMono ? "tracking-[-0.08em] font-[ui-monospace,'SFMono-Regular','SF_Mono','Menlo','Consolas','Liberation_Mono',monospace]" : "tracking-[-0.04em] font-medium");
3750
3735
  _v$ !== _p$.e && className(_el$, _p$.e = _v$);
3751
3736
  _v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
3752
3737
  return _p$;
@@ -3808,32 +3793,17 @@ var Arrow = (props) => (() => {
3808
3793
  }, _$p));
3809
3794
  return _el$8;
3810
3795
  })();
3811
- var ClickToCopyPill = (props) => createComponent(ActionPill, {
3812
- get icon() {
3813
- return createComponent(IconCursorSimple, {
3814
- size: 9,
3815
- "class": "text-black shrink-0"
3816
- });
3817
- },
3818
- label: "Click to copy",
3819
- get onClick() {
3820
- return props.onClick;
3821
- },
3822
- get asButton() {
3823
- return props.asButton;
3824
- },
3825
- get dimmed() {
3826
- return props.dimmed;
3827
- },
3828
- get shrink() {
3829
- return props.shrink;
3830
- }
3831
- });
3832
- var BottomSection = (props) => (() => {
3796
+ var ClickToCopyPill = (props) => (() => {
3833
3797
  var _el$9 = _tmpl$72();
3834
- insert(_el$9, () => props.children);
3798
+ addEventListener(_el$9, "click", props.onClick);
3799
+ createRenderEffect(() => className(_el$9, cn("contain-layout shrink-0 flex items-center px-0 py-px w-fit h-[18px] rounded-[1.5px] gap-[3px]", props.asButton && "cursor-pointer", props.dimmed && "opacity-50 hover:opacity-100 transition-opacity")));
3835
3800
  return _el$9;
3836
3801
  })();
3802
+ var BottomSection = (props) => (() => {
3803
+ var _el$0 = _tmpl$8();
3804
+ insert(_el$0, () => props.children);
3805
+ return _el$0;
3806
+ })();
3837
3807
  var SelectionLabel = (props) => {
3838
3808
  let containerRef;
3839
3809
  let inputRef;
@@ -3878,7 +3848,6 @@ var SelectionLabel = (props) => {
3878
3848
  measureContainer();
3879
3849
  window.addEventListener("scroll", handleViewportChange, true);
3880
3850
  window.addEventListener("resize", handleViewportChange);
3881
- window.addEventListener("mousemove", resetIdleTimer);
3882
3851
  window.addEventListener("keydown", handleGlobalKeyDown, {
3883
3852
  capture: true
3884
3853
  });
@@ -3887,7 +3856,6 @@ var SelectionLabel = (props) => {
3887
3856
  onCleanup(() => {
3888
3857
  window.removeEventListener("scroll", handleViewportChange, true);
3889
3858
  window.removeEventListener("resize", handleViewportChange);
3890
- window.removeEventListener("mousemove", resetIdleTimer);
3891
3859
  window.removeEventListener("keydown", handleGlobalKeyDown, {
3892
3860
  capture: true
3893
3861
  });
@@ -3895,13 +3863,17 @@ var SelectionLabel = (props) => {
3895
3863
  clearTimeout(idleTimeout);
3896
3864
  }
3897
3865
  });
3866
+ createEffect(() => {
3867
+ void props.selectionBounds;
3868
+ resetIdleTimer();
3869
+ });
3898
3870
  createEffect(() => {
3899
3871
  if (props.visible) {
3900
3872
  requestAnimationFrame(measureContainer);
3901
3873
  }
3902
3874
  });
3903
3875
  createEffect(() => {
3904
- void [props.status, props.isInputExpanded, props.inputValue, isIdle()];
3876
+ void props.status;
3905
3877
  requestAnimationFrame(measureContainer);
3906
3878
  });
3907
3879
  createEffect(() => {
@@ -3987,26 +3959,26 @@ var SelectionLabel = (props) => {
3987
3959
  return memo(() => props.visible !== false)() && props.selectionBounds;
3988
3960
  },
3989
3961
  get children() {
3990
- var _el$0 = _tmpl$12(), _el$1 = _el$0.firstChild;
3991
- _el$0.$$click = stopPropagation;
3992
- _el$0.$$mousedown = stopPropagation;
3962
+ var _el$1 = _tmpl$14(), _el$10 = _el$1.firstChild;
3963
+ _el$1.$$click = stopPropagation;
3964
+ _el$1.$$mousedown = stopPropagation;
3993
3965
  var _ref$ = containerRef;
3994
- typeof _ref$ === "function" ? use(_ref$, _el$0) : containerRef = _el$0;
3995
- insert(_el$0, createComponent(Arrow, {
3966
+ typeof _ref$ === "function" ? use(_ref$, _el$1) : containerRef = _el$1;
3967
+ insert(_el$1, createComponent(Arrow, {
3996
3968
  get position() {
3997
3969
  return arrowPosition();
3998
3970
  },
3999
3971
  get leftPx() {
4000
3972
  return computedPosition().arrowLeft;
4001
3973
  }
4002
- }), _el$1);
4003
- insert(_el$1, createComponent(Show, {
3974
+ }), _el$10);
3975
+ insert(_el$10, createComponent(Show, {
4004
3976
  get when() {
4005
3977
  return props.status === "copied" || props.status === "fading";
4006
3978
  },
4007
3979
  get children() {
4008
- var _el$10 = _tmpl$82();
4009
- insert(_el$10, createComponent(TagBadge, {
3980
+ var _el$11 = _tmpl$9();
3981
+ insert(_el$11, createComponent(TagBadge, {
4010
3982
  get tagName() {
4011
3983
  return tagDisplay();
4012
3984
  },
@@ -4014,23 +3986,25 @@ var SelectionLabel = (props) => {
4014
3986
  return isTagClickable();
4015
3987
  },
4016
3988
  onClick: handleTagClick,
4017
- onHoverChange: handleTagHoverChange
3989
+ onHoverChange: handleTagHoverChange,
3990
+ showMono: true,
3991
+ shrink: true
4018
3992
  }), null);
4019
- insert(_el$10, createComponent(SuccessPill, {
3993
+ insert(_el$11, createComponent(SuccessPill, {
4020
3994
  get hasAgent() {
4021
3995
  return props.hasAgent;
4022
3996
  }
4023
3997
  }), null);
4024
- return _el$10;
3998
+ return _el$11;
4025
3999
  }
4026
4000
  }), null);
4027
- insert(_el$1, createComponent(Show, {
4001
+ insert(_el$10, createComponent(Show, {
4028
4002
  get when() {
4029
4003
  return props.status === "copying";
4030
4004
  },
4031
4005
  get children() {
4032
- var _el$11 = _tmpl$0();
4033
- insert(_el$11, createComponent(TagBadge, {
4006
+ var _el$12 = _tmpl$1();
4007
+ insert(_el$12, createComponent(TagBadge, {
4034
4008
  get tagName() {
4035
4009
  return tagDisplay();
4036
4010
  },
@@ -4039,9 +4013,10 @@ var SelectionLabel = (props) => {
4039
4013
  },
4040
4014
  onClick: handleTagClick,
4041
4015
  onHoverChange: handleTagHoverChange,
4042
- showMono: true
4016
+ showMono: true,
4017
+ shrink: true
4043
4018
  }), null);
4044
- insert(_el$11, createComponent(ActionPill, {
4019
+ insert(_el$12, createComponent(ActionPill, {
4045
4020
  get icon() {
4046
4021
  return createComponent(IconCursorSimple, {
4047
4022
  size: 9,
@@ -4052,63 +4027,43 @@ var SelectionLabel = (props) => {
4052
4027
  return props.statusText ?? "Grabbing\u2026";
4053
4028
  }
4054
4029
  }), null);
4055
- insert(_el$11, createComponent(Show, {
4030
+ insert(_el$12, createComponent(Show, {
4056
4031
  get when() {
4057
4032
  return memo(() => !!props.hasAgent)() && props.onAbort;
4058
4033
  },
4059
4034
  get children() {
4060
- var _el$12 = _tmpl$9();
4061
- _el$12.$$click = (event) => {
4035
+ var _el$13 = _tmpl$0();
4036
+ _el$13.$$click = (event) => {
4062
4037
  event.preventDefault();
4063
4038
  event.stopPropagation();
4064
4039
  event.stopImmediatePropagation();
4065
4040
  props.onAbort?.();
4066
4041
  };
4067
- _el$12.$$mousedown = (event) => {
4042
+ _el$13.$$mousedown = (event) => {
4068
4043
  event.preventDefault();
4069
4044
  event.stopPropagation();
4070
4045
  event.stopImmediatePropagation();
4071
4046
  };
4072
- insert(_el$12, createComponent(IconStop, {
4047
+ insert(_el$13, createComponent(IconStop, {
4073
4048
  size: 8,
4074
4049
  "class": "text-white"
4075
4050
  }));
4076
- return _el$12;
4051
+ return _el$13;
4077
4052
  }
4078
4053
  }), null);
4079
- return _el$11;
4054
+ return _el$12;
4080
4055
  }
4081
4056
  }), null);
4082
- insert(_el$1, createComponent(Show, {
4057
+ insert(_el$10, createComponent(Show, {
4083
4058
  get when() {
4084
- return memo(() => !!(isNotProcessing() && !isIdle()))() && !props.isInputExpanded;
4059
+ return memo(() => !!isNotProcessing())() && !props.isInputExpanded;
4085
4060
  },
4086
4061
  get children() {
4087
- var _el$13 = _tmpl$82();
4088
- insert(_el$13, createComponent(TagBadge, {
4089
- get tagName() {
4090
- return tagDisplay();
4091
- },
4092
- get isClickable() {
4093
- return isTagClickable();
4094
- },
4095
- onClick: handleTagClick,
4096
- onHoverChange: handleTagHoverChange,
4097
- showMono: true
4098
- }), null);
4099
- insert(_el$13, createComponent(ClickToCopyPill, {
4062
+ var _el$14 = _tmpl$11(), _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$16.firstChild;
4063
+ insert(_el$15, createComponent(ClickToCopyPill, {
4100
4064
  onClick: handleSubmit,
4101
- asButton: true
4065
+ shrink: true
4102
4066
  }), null);
4103
- return _el$13;
4104
- }
4105
- }), null);
4106
- insert(_el$1, createComponent(Show, {
4107
- get when() {
4108
- return memo(() => !!(isNotProcessing() && isIdle()))() && !props.isInputExpanded;
4109
- },
4110
- get children() {
4111
- var _el$14 = _tmpl$10(), _el$15 = _el$14.firstChild;
4112
4067
  insert(_el$15, createComponent(TagBadge, {
4113
4068
  get tagName() {
4114
4069
  return tagDisplay();
@@ -4121,30 +4076,28 @@ var SelectionLabel = (props) => {
4121
4076
  showMono: true,
4122
4077
  shrink: true
4123
4078
  }), null);
4124
- insert(_el$15, createComponent(ClickToCopyPill, {
4125
- onClick: handleSubmit,
4126
- shrink: true
4127
- }), null);
4128
- insert(_el$14, createComponent(BottomSection, {
4079
+ insert(_el$17, createComponent(BottomSection, {
4129
4080
  get children() {
4130
- var _el$16 = _tmpl$1(), _el$17 = _el$16.firstChild;
4131
- insert(_el$16, createComponent(IconReturnKey, {
4132
- size: 10,
4133
- "class": "shrink-0 text-black opacity-[0.65]"
4134
- }), _el$17);
4135
- return _el$16;
4081
+ var _el$18 = _tmpl$10(), _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling; _el$20.firstChild;
4082
+ return _el$18;
4136
4083
  }
4137
- }), null);
4084
+ }));
4085
+ createRenderEffect((_$p) => setStyleProperty(_el$16, "grid-template-rows", isIdle() ? "1fr" : "0fr"));
4138
4086
  return _el$14;
4139
4087
  }
4140
4088
  }), null);
4141
- insert(_el$1, createComponent(Show, {
4089
+ insert(_el$10, createComponent(Show, {
4142
4090
  get when() {
4143
4091
  return memo(() => !!isNotProcessing())() && props.isInputExpanded;
4144
4092
  },
4145
4093
  get children() {
4146
- var _el$18 = _tmpl$10(), _el$19 = _el$18.firstChild;
4147
- insert(_el$19, createComponent(TagBadge, {
4094
+ var _el$22 = _tmpl$13(), _el$23 = _el$22.firstChild;
4095
+ insert(_el$23, createComponent(ClickToCopyPill, {
4096
+ onClick: handleSubmit,
4097
+ dimmed: true,
4098
+ shrink: true
4099
+ }), null);
4100
+ insert(_el$23, createComponent(TagBadge, {
4148
4101
  get tagName() {
4149
4102
  return tagDisplay();
4150
4103
  },
@@ -4154,55 +4107,46 @@ var SelectionLabel = (props) => {
4154
4107
  onClick: handleTagClick,
4155
4108
  onHoverChange: handleTagHoverChange,
4156
4109
  showMono: true,
4157
- shrink: true
4158
- }), null);
4159
- insert(_el$19, createComponent(ClickToCopyPill, {
4160
- onClick: handleSubmit,
4161
- dimmed: true,
4162
- shrink: true
4110
+ shrink: true,
4111
+ forceShowIcon: true
4163
4112
  }), null);
4164
- insert(_el$18, createComponent(BottomSection, {
4113
+ insert(_el$22, createComponent(BottomSection, {
4165
4114
  get children() {
4166
- var _el$20 = _tmpl$11(), _el$21 = _el$20.firstChild, _el$22 = _el$21.nextSibling;
4167
- _el$21.$$keydown = handleKeyDown;
4168
- _el$21.$$input = handleInput;
4115
+ var _el$24 = _tmpl$12(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.firstChild;
4116
+ _el$25.$$keydown = handleKeyDown;
4117
+ _el$25.$$input = handleInput;
4169
4118
  var _ref$2 = inputRef;
4170
- typeof _ref$2 === "function" ? use(_ref$2, _el$21) : inputRef = _el$21;
4171
- _el$22.$$click = handleSubmit;
4172
- insert(_el$22, createComponent(IconReturnKey, {
4173
- size: 10,
4174
- "class": "shrink-0 text-black"
4175
- }));
4176
- createRenderEffect(() => _el$21.value = props.inputValue ?? "");
4177
- return _el$20;
4119
+ typeof _ref$2 === "function" ? use(_ref$2, _el$25) : inputRef = _el$25;
4120
+ _el$26.$$click = handleSubmit;
4121
+ createRenderEffect(() => className(_el$27, cn("w-2.5 h-[9px] shrink-0 bg-cover bg-center transition-opacity duration-100", props.inputValue ? "opacity-[0.99]" : "opacity-50")));
4122
+ createRenderEffect(() => _el$25.value = props.inputValue ?? "");
4123
+ return _el$24;
4178
4124
  }
4179
4125
  }), null);
4180
- return _el$18;
4126
+ return _el$22;
4181
4127
  }
4182
4128
  }), null);
4183
4129
  createRenderEffect((_p$) => {
4184
- var _v$3 = `${computedPosition().top}px`, _v$4 = `${computedPosition().left}px`, _v$5 = props.visible ? "auto" : "none", _v$6 = props.status === "fading" ? 0 : 1, _v$7 = !isNotProcessing() ? "4px" : isIdle() || props.isInputExpanded ? "0" : "4px";
4185
- _v$3 !== _p$.e && setStyleProperty(_el$0, "top", _p$.e = _v$3);
4186
- _v$4 !== _p$.t && setStyleProperty(_el$0, "left", _p$.t = _v$4);
4187
- _v$5 !== _p$.a && setStyleProperty(_el$0, "pointer-events", _p$.a = _v$5);
4188
- _v$6 !== _p$.o && setStyleProperty(_el$0, "opacity", _p$.o = _v$6);
4189
- _v$7 !== _p$.i && setStyleProperty(_el$1, "padding", _p$.i = _v$7);
4130
+ var _v$3 = `${computedPosition().top}px`, _v$4 = `${computedPosition().left}px`, _v$5 = props.visible ? "auto" : "none", _v$6 = props.status === "fading" ? 0 : 1;
4131
+ _v$3 !== _p$.e && setStyleProperty(_el$1, "top", _p$.e = _v$3);
4132
+ _v$4 !== _p$.t && setStyleProperty(_el$1, "left", _p$.t = _v$4);
4133
+ _v$5 !== _p$.a && setStyleProperty(_el$1, "pointer-events", _p$.a = _v$5);
4134
+ _v$6 !== _p$.o && setStyleProperty(_el$1, "opacity", _p$.o = _v$6);
4190
4135
  return _p$;
4191
4136
  }, {
4192
4137
  e: void 0,
4193
4138
  t: void 0,
4194
4139
  a: void 0,
4195
- o: void 0,
4196
- i: void 0
4140
+ o: void 0
4197
4141
  });
4198
- return _el$0;
4142
+ return _el$1;
4199
4143
  }
4200
4144
  });
4201
4145
  };
4202
4146
  delegateEvents(["click", "mousedown", "input", "keydown"]);
4203
4147
 
4204
4148
  // src/components/selection-cursor.tsx
4205
- var _tmpl$13 = /* @__PURE__ */ template(`<div class="fixed z-2147483647"><button data-react-grab-selection-cursor>`);
4149
+ var _tmpl$15 = /* @__PURE__ */ template(`<div class="fixed z-2147483647"><button data-react-grab-selection-cursor>`);
4206
4150
  var SelectionCursor = (props) => {
4207
4151
  const [isHovered, setIsHovered] = createSignal(false);
4208
4152
  const [debouncedVisible, setDebouncedVisible] = createSignal(false);
@@ -4239,7 +4183,7 @@ var SelectionCursor = (props) => {
4239
4183
  });
4240
4184
  }
4241
4185
  }), (() => {
4242
- var _el$ = _tmpl$13(), _el$2 = _el$.firstChild;
4186
+ var _el$ = _tmpl$15(), _el$2 = _el$.firstChild;
4243
4187
  _el$.addEventListener("mouseleave", () => setIsHovered(false));
4244
4188
  _el$.addEventListener("mouseenter", () => setIsHovered(true));
4245
4189
  _el$2.$$click = handleClick;
@@ -4484,8 +4428,8 @@ var ReactGrabRenderer = (props) => {
4484
4428
  })];
4485
4429
  };
4486
4430
 
4487
- // ../../node_modules/.pnpm/bippy@0.5.16_@types+react@19.2.2_react@19.2.0/node_modules/bippy/dist/rdt-hook-CrcWl4lP.js
4488
- var e = `0.5.16`;
4431
+ // ../../node_modules/.pnpm/bippy@0.5.17_@types+react@19.2.2_react@19.2.0/node_modules/bippy/dist/rdt-hook-Ds2lt3Ph.js
4432
+ var e = `0.5.17`;
4489
4433
  var t = `bippy-${e}`;
4490
4434
  var n = Object.defineProperty;
4491
4435
  var r2 = Object.prototype.hasOwnProperty;
@@ -4572,10 +4516,10 @@ var _ = () => {
4572
4516
  }
4573
4517
  };
4574
4518
 
4575
- // ../../node_modules/.pnpm/bippy@0.5.16_@types+react@19.2.2_react@19.2.0/node_modules/bippy/dist/install-hook-only-DtUPvEBg.js
4519
+ // ../../node_modules/.pnpm/bippy@0.5.17_@types+react@19.2.2_react@19.2.0/node_modules/bippy/dist/install-hook-only-BE254Zqc.js
4576
4520
  _();
4577
4521
 
4578
- // ../../node_modules/.pnpm/bippy@0.5.16_@types+react@19.2.2_react@19.2.0/node_modules/bippy/dist/core-D7_ABaNC.js
4522
+ // ../../node_modules/.pnpm/bippy@0.5.17_@types+react@19.2.2_react@19.2.0/node_modules/bippy/dist/core-BKZAzaFk.js
4579
4523
  var a2 = 0;
4580
4524
  var o2 = 1;
4581
4525
  var c2 = 5;
@@ -4611,7 +4555,7 @@ var pe = (e2) => {
4611
4555
  return false;
4612
4556
  }
4613
4557
  };
4614
- var me = (e2) => !e2 || typeof e2 != `object` ? true : `pendingProps` in e2 && !(`containerInfo` in e2);
4558
+ var me = (e2) => !e2 || typeof e2 != `object` ? false : `pendingProps` in e2 && !(`containerInfo` in e2);
4615
4559
  function N(e2, t2, n2 = false) {
4616
4560
  if (!e2) return null;
4617
4561
  let r3 = t2(e2);
@@ -4700,7 +4644,7 @@ var Pe = (e2) => {
4700
4644
  };
4701
4645
  var $ = /* @__PURE__ */ new Set();
4702
4646
 
4703
- // ../../node_modules/.pnpm/bippy@0.5.16_@types+react@19.2.2_react@19.2.0/node_modules/bippy/dist/source.js
4647
+ // ../../node_modules/.pnpm/bippy@0.5.17_@types+react@19.2.2_react@19.2.0/node_modules/bippy/dist/source.js
4704
4648
  var b2 = Object.create;
4705
4649
  var x2 = Object.defineProperty;
4706
4650
  var S2 = Object.getOwnPropertyDescriptor;
@@ -5257,7 +5201,7 @@ var Y = async (e2, t2 = true, n2) => {
5257
5201
  return t2 && W2.delete(e2), t2 && (i2 === null ? U2.set(e2, null) : U2.set(e2, H2 ? new WeakRef(i2) : i2)), i2;
5258
5202
  };
5259
5203
  var be2 = /^[a-zA-Z][a-zA-Z\d+\-.]*:/;
5260
- var xe2 = [`rsc://`, `file:///`, `webpack://`, `node:`, `turbopack://`, `metro://`];
5204
+ var xe2 = [`rsc://`, `file:///`, `webpack://`, `node:`, `turbopack://`, `metro://`, `///app-pages-browser/`];
5261
5205
  var Se2 = `about://React/`;
5262
5206
  var Ce2 = [`<anonymous>`, `eval`, ``];
5263
5207
  var we2 = /\.(jsx|tsx|ts|js)$/;
@@ -5324,7 +5268,7 @@ var je2 = (e2) => {
5324
5268
  var isCapitalized = (value) => value.length > 0 && /^[A-Z]/.test(value);
5325
5269
 
5326
5270
  // src/instrumentation.ts
5327
- var NEXT_INTERNAL_COMPONENT_NAMES = [
5271
+ var NEXT_INTERNAL_COMPONENT_NAMES = /* @__PURE__ */ new Set([
5328
5272
  "InnerLayoutRouter",
5329
5273
  "RedirectErrorBoundary",
5330
5274
  "RedirectBoundary",
@@ -5338,28 +5282,24 @@ var NEXT_INTERNAL_COMPONENT_NAMES = [
5338
5282
  "OuterLayoutRouter",
5339
5283
  "body",
5340
5284
  "html",
5341
- "RedirectErrorBoundary",
5342
- "RedirectBoundary",
5343
- "HTTPAccessFallbackErrorBoundary",
5344
- "HTTPAccessFallbackBoundary",
5345
5285
  "DevRootHTTPAccessFallbackBoundary",
5346
5286
  "AppDevOverlayErrorBoundary",
5347
5287
  "AppDevOverlay",
5348
5288
  "HotReload",
5349
5289
  "Router",
5350
5290
  "ErrorBoundaryHandler",
5351
- "ErrorBoundary",
5352
5291
  "AppRouter",
5353
5292
  "ServerRoot",
5354
5293
  "SegmentStateProvider",
5355
5294
  "RootErrorBoundary"
5356
- ];
5295
+ ]);
5357
5296
  var checkIsNextProject = () => {
5297
+ if (typeof document === "undefined") return false;
5358
5298
  return Boolean(document.getElementById("__NEXT_DATA__"));
5359
5299
  };
5360
5300
  var checkIsInternalComponentName = (name) => {
5361
5301
  if (name.startsWith("_")) return true;
5362
- if (NEXT_INTERNAL_COMPONENT_NAMES.includes(name)) return true;
5302
+ if (NEXT_INTERNAL_COMPONENT_NAMES.has(name)) return true;
5363
5303
  return false;
5364
5304
  };
5365
5305
  var checkIsSourceComponentName = (name) => {
@@ -5429,15 +5369,17 @@ var formatElementInfo = async (element) => {
5429
5369
  const html = getHTMLPreview(element);
5430
5370
  const stack = await getStack(element);
5431
5371
  const isNextProject = checkIsNextProject();
5432
- let serverBoundary = null;
5433
- let componentName = null;
5372
+ let serverComponentName = null;
5373
+ let clientComponentName = null;
5434
5374
  let fileName = null;
5435
5375
  let lineNumber = null;
5436
5376
  let columnNumber = null;
5437
5377
  for (const frame of stack) {
5438
5378
  if (!frame.source) continue;
5439
5379
  if (frame.source.fileName.startsWith("about://React/Server")) {
5440
- if (!serverBoundary) serverBoundary = frame.name;
5380
+ if (!serverComponentName && checkIsSourceComponentName(frame.name)) {
5381
+ serverComponentName = frame.name;
5382
+ }
5441
5383
  continue;
5442
5384
  }
5443
5385
  if (je2(frame.source.fileName)) {
@@ -5446,25 +5388,27 @@ var formatElementInfo = async (element) => {
5446
5388
  lineNumber = frame.source.lineNumber ?? null;
5447
5389
  columnNumber = frame.source.columnNumber ?? null;
5448
5390
  }
5449
- if (!componentName && checkIsSourceComponentName(frame.name)) {
5450
- componentName = frame.name;
5391
+ if (!clientComponentName && checkIsSourceComponentName(frame.name)) {
5392
+ clientComponentName = frame.name;
5451
5393
  }
5452
- if (fileName && componentName) {
5394
+ if (fileName && clientComponentName) {
5453
5395
  break;
5454
5396
  }
5455
5397
  }
5456
5398
  }
5399
+ const componentName = serverComponentName ?? clientComponentName;
5457
5400
  if (!componentName || !fileName) {
5458
5401
  return html;
5459
5402
  }
5460
5403
  let result = `${html}
5461
- in ${componentName} at ${fileName}`;
5404
+ in ${componentName}`;
5405
+ if (serverComponentName && clientComponentName) {
5406
+ result += ` (Server \u2192 Client: ${clientComponentName})`;
5407
+ }
5408
+ result += ` at ${fileName}`;
5462
5409
  if (isNextProject && lineNumber && columnNumber) {
5463
5410
  result += `:${lineNumber}:${columnNumber}`;
5464
5411
  }
5465
- if (serverBoundary) {
5466
- result += ` (via Server: ${serverBoundary})`;
5467
- }
5468
5412
  return result;
5469
5413
  };
5470
5414
  var getFileName = (stack) => {
@@ -5903,81 +5847,43 @@ var DEFAULT_THEME = {
5903
5847
  enabled: true
5904
5848
  }
5905
5849
  };
5906
- var mergeTheme = (userTheme) => {
5907
- if (!userTheme) return DEFAULT_THEME;
5908
- return {
5909
- enabled: userTheme.enabled ?? DEFAULT_THEME.enabled,
5910
- hue: userTheme.hue ?? DEFAULT_THEME.hue,
5911
- selectionBox: {
5912
- enabled: userTheme.selectionBox?.enabled ?? DEFAULT_THEME.selectionBox.enabled,
5913
- color: userTheme.selectionBox?.color ?? DEFAULT_THEME.selectionBox.color,
5914
- borderRadius: userTheme.selectionBox?.borderRadius ?? DEFAULT_THEME.selectionBox.borderRadius
5915
- },
5916
- dragBox: {
5917
- enabled: userTheme.dragBox?.enabled ?? DEFAULT_THEME.dragBox.enabled,
5918
- color: userTheme.dragBox?.color ?? DEFAULT_THEME.dragBox.color
5919
- },
5920
- grabbedBoxes: {
5921
- enabled: userTheme.grabbedBoxes?.enabled ?? DEFAULT_THEME.grabbedBoxes.enabled,
5922
- color: userTheme.grabbedBoxes?.color ?? DEFAULT_THEME.grabbedBoxes.color
5923
- },
5924
- elementLabel: {
5925
- enabled: userTheme.elementLabel?.enabled ?? DEFAULT_THEME.elementLabel.enabled,
5926
- backgroundColor: userTheme.elementLabel?.backgroundColor ?? DEFAULT_THEME.elementLabel.backgroundColor,
5927
- textColor: userTheme.elementLabel?.textColor ?? DEFAULT_THEME.elementLabel.textColor,
5928
- borderColor: userTheme.elementLabel?.borderColor ?? DEFAULT_THEME.elementLabel.borderColor,
5929
- padding: userTheme.elementLabel?.padding ?? DEFAULT_THEME.elementLabel.padding,
5930
- cursorOffset: userTheme.elementLabel?.cursorOffset ?? DEFAULT_THEME.elementLabel.cursorOffset
5931
- },
5932
- successLabels: {
5933
- enabled: userTheme.successLabels?.enabled ?? DEFAULT_THEME.successLabels.enabled
5934
- },
5935
- crosshair: {
5936
- enabled: userTheme.crosshair?.enabled ?? DEFAULT_THEME.crosshair.enabled,
5937
- color: userTheme.crosshair?.color ?? DEFAULT_THEME.crosshair.color
5938
- },
5939
- inputOverlay: {
5940
- enabled: userTheme.inputOverlay?.enabled ?? DEFAULT_THEME.inputOverlay.enabled
5941
- }
5942
- };
5943
- };
5944
- var deepMergeTheme = (baseTheme, partialTheme) => {
5945
- return {
5946
- enabled: partialTheme.enabled ?? baseTheme.enabled,
5947
- hue: partialTheme.hue ?? baseTheme.hue,
5948
- selectionBox: {
5949
- enabled: partialTheme.selectionBox?.enabled ?? baseTheme.selectionBox.enabled,
5950
- color: partialTheme.selectionBox?.color ?? baseTheme.selectionBox.color,
5951
- borderRadius: partialTheme.selectionBox?.borderRadius ?? baseTheme.selectionBox.borderRadius
5952
- },
5953
- dragBox: {
5954
- enabled: partialTheme.dragBox?.enabled ?? baseTheme.dragBox.enabled,
5955
- color: partialTheme.dragBox?.color ?? baseTheme.dragBox.color
5956
- },
5957
- grabbedBoxes: {
5958
- enabled: partialTheme.grabbedBoxes?.enabled ?? baseTheme.grabbedBoxes.enabled,
5959
- color: partialTheme.grabbedBoxes?.color ?? baseTheme.grabbedBoxes.color
5960
- },
5961
- elementLabel: {
5962
- enabled: partialTheme.elementLabel?.enabled ?? baseTheme.elementLabel.enabled,
5963
- backgroundColor: partialTheme.elementLabel?.backgroundColor ?? baseTheme.elementLabel.backgroundColor,
5964
- textColor: partialTheme.elementLabel?.textColor ?? baseTheme.elementLabel.textColor,
5965
- borderColor: partialTheme.elementLabel?.borderColor ?? baseTheme.elementLabel.borderColor,
5966
- padding: partialTheme.elementLabel?.padding ?? baseTheme.elementLabel.padding,
5967
- cursorOffset: partialTheme.elementLabel?.cursorOffset ?? baseTheme.elementLabel.cursorOffset
5968
- },
5969
- successLabels: {
5970
- enabled: partialTheme.successLabels?.enabled ?? baseTheme.successLabels.enabled
5971
- },
5972
- crosshair: {
5973
- enabled: partialTheme.crosshair?.enabled ?? baseTheme.crosshair.enabled,
5974
- color: partialTheme.crosshair?.color ?? baseTheme.crosshair.color
5975
- },
5976
- inputOverlay: {
5977
- enabled: partialTheme.inputOverlay?.enabled ?? baseTheme.inputOverlay.enabled
5978
- }
5979
- };
5980
- };
5850
+ var mergeThemeWithBase = (baseTheme, partialTheme) => ({
5851
+ enabled: partialTheme.enabled ?? baseTheme.enabled,
5852
+ hue: partialTheme.hue ?? baseTheme.hue,
5853
+ selectionBox: {
5854
+ enabled: partialTheme.selectionBox?.enabled ?? baseTheme.selectionBox.enabled,
5855
+ color: partialTheme.selectionBox?.color ?? baseTheme.selectionBox.color,
5856
+ borderRadius: partialTheme.selectionBox?.borderRadius ?? baseTheme.selectionBox.borderRadius
5857
+ },
5858
+ dragBox: {
5859
+ enabled: partialTheme.dragBox?.enabled ?? baseTheme.dragBox.enabled,
5860
+ color: partialTheme.dragBox?.color ?? baseTheme.dragBox.color
5861
+ },
5862
+ grabbedBoxes: {
5863
+ enabled: partialTheme.grabbedBoxes?.enabled ?? baseTheme.grabbedBoxes.enabled,
5864
+ color: partialTheme.grabbedBoxes?.color ?? baseTheme.grabbedBoxes.color
5865
+ },
5866
+ elementLabel: {
5867
+ enabled: partialTheme.elementLabel?.enabled ?? baseTheme.elementLabel.enabled,
5868
+ backgroundColor: partialTheme.elementLabel?.backgroundColor ?? baseTheme.elementLabel.backgroundColor,
5869
+ textColor: partialTheme.elementLabel?.textColor ?? baseTheme.elementLabel.textColor,
5870
+ borderColor: partialTheme.elementLabel?.borderColor ?? baseTheme.elementLabel.borderColor,
5871
+ padding: partialTheme.elementLabel?.padding ?? baseTheme.elementLabel.padding,
5872
+ cursorOffset: partialTheme.elementLabel?.cursorOffset ?? baseTheme.elementLabel.cursorOffset
5873
+ },
5874
+ successLabels: {
5875
+ enabled: partialTheme.successLabels?.enabled ?? baseTheme.successLabels.enabled
5876
+ },
5877
+ crosshair: {
5878
+ enabled: partialTheme.crosshair?.enabled ?? baseTheme.crosshair.enabled,
5879
+ color: partialTheme.crosshair?.color ?? baseTheme.crosshair.color
5880
+ },
5881
+ inputOverlay: {
5882
+ enabled: partialTheme.inputOverlay?.enabled ?? baseTheme.inputOverlay.enabled
5883
+ }
5884
+ });
5885
+ var mergeTheme = (userTheme) => userTheme ? mergeThemeWithBase(DEFAULT_THEME, userTheme) : DEFAULT_THEME;
5886
+ var deepMergeTheme = mergeThemeWithBase;
5981
5887
 
5982
5888
  // src/utils/agent-session.ts
5983
5889
  var STORAGE_KEY = "react-grab:agent-sessions";
@@ -6067,10 +5973,17 @@ var generateSnippet = async (elements) => {
6067
5973
  };
6068
5974
 
6069
5975
  // src/agent.ts
6070
- var createAgentManager = (agentOptions) => {
5976
+ var createAgentManager = (initialAgentOptions) => {
6071
5977
  const [sessions, setSessions] = createSignal(/* @__PURE__ */ new Map());
6072
5978
  const abortControllers = /* @__PURE__ */ new Map();
6073
5979
  const sessionElements = /* @__PURE__ */ new Map();
5980
+ let agentOptions = initialAgentOptions;
5981
+ const setOptions = (options) => {
5982
+ agentOptions = options;
5983
+ };
5984
+ const getOptions = () => {
5985
+ return agentOptions;
5986
+ };
6074
5987
  const isProcessing = () => sessions().size > 0;
6075
5988
  const executeSessionStream = async (session, streamIterator) => {
6076
5989
  const storage = agentOptions?.storage;
@@ -6254,12 +6167,14 @@ var createAgentManager = (agentOptions) => {
6254
6167
  abortSession,
6255
6168
  abortAllSessions,
6256
6169
  updateSessionBoundsOnViewportChange,
6257
- getSessionElement
6170
+ getSessionElement,
6171
+ setOptions,
6172
+ getOptions
6258
6173
  };
6259
6174
  };
6260
6175
 
6261
6176
  // src/core.tsx
6262
- var _tmpl$14 = /* @__PURE__ */ template(`<span class="tabular-nums align-middle">`);
6177
+ var _tmpl$16 = /* @__PURE__ */ template(`<span class="tabular-nums align-middle">`);
6263
6178
  var _tmpl$23 = /* @__PURE__ */ template(`<span class="font-mono tabular-nums align-middle">&lt;<!>>`);
6264
6179
  var _tmpl$33 = /* @__PURE__ */ template(`<span class="tabular-nums ml-1 align-middle"> in `);
6265
6180
  var hasInited = false;
@@ -6274,6 +6189,34 @@ var getScriptOptions = () => {
6274
6189
  }
6275
6190
  };
6276
6191
  var init = (rawOptions) => {
6192
+ const initialTheme = mergeTheme(rawOptions?.theme);
6193
+ if (typeof window === "undefined") {
6194
+ return {
6195
+ activate: () => {
6196
+ },
6197
+ deactivate: () => {
6198
+ },
6199
+ toggle: () => {
6200
+ },
6201
+ isActive: () => false,
6202
+ dispose: () => {
6203
+ },
6204
+ copyElement: () => Promise.resolve(false),
6205
+ getState: () => ({
6206
+ isActive: false,
6207
+ isDragging: false,
6208
+ isCopying: false,
6209
+ isInputMode: false,
6210
+ targetElement: null,
6211
+ dragBounds: null
6212
+ }),
6213
+ updateTheme: () => {
6214
+ },
6215
+ getTheme: () => initialTheme,
6216
+ setAgent: () => {
6217
+ }
6218
+ };
6219
+ }
6277
6220
  const scriptOptions = getScriptOptions();
6278
6221
  const options = {
6279
6222
  enabled: true,
@@ -6282,7 +6225,7 @@ var init = (rawOptions) => {
6282
6225
  ...scriptOptions,
6283
6226
  ...rawOptions
6284
6227
  };
6285
- const initialTheme = mergeTheme(options.theme);
6228
+ const mergedTheme = mergeTheme(options.theme);
6286
6229
  if (options.enabled === false || hasInited) {
6287
6230
  return {
6288
6231
  activate: () => {
@@ -6305,13 +6248,15 @@ var init = (rawOptions) => {
6305
6248
  }),
6306
6249
  updateTheme: () => {
6307
6250
  },
6308
- getTheme: () => initialTheme
6251
+ getTheme: () => mergedTheme,
6252
+ setAgent: () => {
6253
+ }
6309
6254
  };
6310
6255
  }
6311
6256
  hasInited = true;
6312
6257
  const logIntro = () => {
6313
6258
  try {
6314
- const version = "0.0.55";
6259
+ const version = "0.0.57";
6315
6260
  const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
6316
6261
  console.log(`%cReact Grab${version ? ` v${version}` : ""}%c
6317
6262
  https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid #d75fcb; padding: 4px 4px 4px 24px; border-radius: 4px; background-image: url("${logoDataUri}"); background-size: 16px 16px; background-repeat: no-repeat; background-position: 4px center; display: inline-block; margin-bottom: 4px;`, "");
@@ -6332,7 +6277,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
6332
6277
  };
6333
6278
  logIntro();
6334
6279
  return createRoot((dispose2) => {
6335
- const [theme, setTheme] = createSignal(initialTheme);
6280
+ const [theme, setTheme] = createSignal(mergedTheme);
6336
6281
  const [isHoldingKeys, setIsHoldingKeys] = createSignal(false);
6337
6282
  const [mouseX, setMouseX] = createSignal(OFFSCREEN_POSITION);
6338
6283
  const [mouseY, setMouseY] = createSignal(OFFSCREEN_POSITION);
@@ -6360,12 +6305,53 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
6360
6305
  const [isToggleFrozen, setIsToggleFrozen] = createSignal(false);
6361
6306
  const [isInputExpanded, setIsInputExpanded] = createSignal(false);
6362
6307
  const [frozenElement, setFrozenElement] = createSignal(null);
6308
+ const [hasAgentProvider, setHasAgentProvider] = createSignal(Boolean(options.agent?.provider));
6363
6309
  const [nativeSelectionCursorX, setNativeSelectionCursorX] = createSignal(OFFSCREEN_POSITION);
6364
6310
  const [nativeSelectionCursorY, setNativeSelectionCursorY] = createSignal(OFFSCREEN_POSITION);
6365
6311
  const [hasNativeSelection, setHasNativeSelection] = createSignal(false);
6366
6312
  const [nativeSelectionElements, setNativeSelectionElements] = createSignal([]);
6367
- const [nativeSelectionTagName, setNativeSelectionTagName] = createSignal(void 0);
6368
- const [nativeSelectionComponentName, setNativeSelectionComponentName] = createSignal(void 0);
6313
+ const extractElementTagName = (element) => (element.tagName || "").toLowerCase();
6314
+ const nativeSelectionTagName = createMemo(() => {
6315
+ const elements = nativeSelectionElements();
6316
+ if (elements.length === 0 || !elements[0]) return void 0;
6317
+ return extractElementTagName(elements[0]) || void 0;
6318
+ });
6319
+ const nativeSelectionComponentName = createMemo(() => {
6320
+ const elements = nativeSelectionElements();
6321
+ if (elements.length === 0 || !elements[0]) return void 0;
6322
+ return getNearestComponentName(elements[0]) || void 0;
6323
+ });
6324
+ const clearNativeSelectionState = () => {
6325
+ setNativeSelectionCursorX(OFFSCREEN_POSITION);
6326
+ setNativeSelectionCursorY(OFFSCREEN_POSITION);
6327
+ setNativeSelectionElements([]);
6328
+ };
6329
+ const recalculateNativeSelectionCursor = () => {
6330
+ const currentSelection = window.getSelection();
6331
+ if (!currentSelection || currentSelection.isCollapsed || currentSelection.rangeCount === 0) {
6332
+ return;
6333
+ }
6334
+ const range = currentSelection.getRangeAt(0);
6335
+ const clientRects = range.getClientRects();
6336
+ if (clientRects.length === 0) return;
6337
+ const isBackward = (() => {
6338
+ if (!currentSelection.anchorNode || !currentSelection.focusNode) return false;
6339
+ const position = currentSelection.anchorNode.compareDocumentPosition(currentSelection.focusNode);
6340
+ if (position & Node.DOCUMENT_POSITION_FOLLOWING) return false;
6341
+ if (position & Node.DOCUMENT_POSITION_PRECEDING) return true;
6342
+ return currentSelection.anchorOffset > currentSelection.focusOffset;
6343
+ })();
6344
+ const cursorRect = isBackward ? clientRects[0] : clientRects[clientRects.length - 1];
6345
+ const cursorX = isBackward ? cursorRect.left : cursorRect.right;
6346
+ const cursorY = cursorRect.top + cursorRect.height / 2;
6347
+ setNativeSelectionCursorX(cursorX);
6348
+ setNativeSelectionCursorY(cursorY);
6349
+ };
6350
+ createEffect(on(() => viewportVersion(), () => {
6351
+ if (hasNativeSelection()) {
6352
+ recalculateNativeSelectionCursor();
6353
+ }
6354
+ }));
6369
6355
  const nativeSelectionBounds = createMemo(() => {
6370
6356
  viewportVersion();
6371
6357
  const elements = nativeSelectionElements();
@@ -6417,7 +6403,6 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
6417
6403
  setSuccessLabels((previousLabels) => previousLabels.filter((label) => label.id !== labelId));
6418
6404
  }, SUCCESS_LABEL_DURATION_MS);
6419
6405
  };
6420
- const extractElementTagName = (element) => (element.tagName || "").toLowerCase();
6421
6406
  const extractElementTagNameForSuccess = (element) => {
6422
6407
  const tagName = extractElementTagName(element);
6423
6408
  return tagName ? `<${tagName}>` : "1 element";
@@ -6472,9 +6457,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
6472
6457
  }, COPIED_LABEL_DURATION_MS);
6473
6458
  }
6474
6459
  if (isToggleMode()) {
6475
- setTimeout(() => {
6476
- deactivateRenderer();
6477
- }, COPIED_LABEL_DURATION_MS + 350);
6460
+ deactivateRenderer();
6478
6461
  }
6479
6462
  });
6480
6463
  };
@@ -6489,28 +6472,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
6489
6472
  const tryCopyWithFallback = async (elements, extraPrompt) => {
6490
6473
  let didCopy = false;
6491
6474
  let copiedContent = "";
6492
- const isReactProject = Ee();
6493
6475
  await options.onBeforeCopy?.(elements);
6494
- if (options.copyFileOnly && isReactProject) {
6495
- try {
6496
- const firstElement = elements[0];
6497
- if (firstElement) {
6498
- const stack = await getStack(firstElement);
6499
- const fileName = getFileName(stack);
6500
- if (fileName) {
6501
- copiedContent = `@${fileName}`;
6502
- didCopy = await copyContent(copiedContent);
6503
- if (didCopy) {
6504
- options.onCopySuccess?.(elements, copiedContent);
6505
- }
6506
- }
6507
- }
6508
- } catch (error) {
6509
- options.onCopyError?.(error);
6510
- }
6511
- options.onAfterCopy?.(elements, didCopy);
6512
- return didCopy;
6513
- }
6514
6476
  try {
6515
6477
  const elementSnippetResults = await Promise.allSettled(elements.map((element) => formatElementInfo(element)));
6516
6478
  const elementSnippets = [];
@@ -6598,16 +6560,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
6598
6560
  viewportVersion();
6599
6561
  const element = targetElement();
6600
6562
  if (!element) return void 0;
6601
- const elementBounds = element.getBoundingClientRect();
6602
- const computedStyle = window.getComputedStyle(element);
6603
- return {
6604
- borderRadius: computedStyle.borderRadius || "0px",
6605
- height: elementBounds.height,
6606
- transform: stripTranslateFromTransform(element),
6607
- width: elementBounds.width,
6608
- x: elementBounds.left,
6609
- y: elementBounds.top
6610
- };
6563
+ return createElementBounds(element);
6611
6564
  });
6612
6565
  const calculateDragDistance = (endX, endY) => {
6613
6566
  const endPageX = endX + window.scrollX;
@@ -6653,7 +6606,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
6653
6606
  const copying = isCopying();
6654
6607
  if (!element) {
6655
6608
  return (() => {
6656
- var _el$ = _tmpl$14();
6609
+ var _el$ = _tmpl$16();
6657
6610
  insert(_el$, copying ? "Please wait\u2026" : "1 element");
6658
6611
  return _el$;
6659
6612
  })();
@@ -6679,21 +6632,12 @@ ${plainTextContentOnly}` : plainTextContentOnly;
6679
6632
  })();
6680
6633
  }
6681
6634
  return (() => {
6682
- var _el$10 = _tmpl$14();
6635
+ var _el$10 = _tmpl$16();
6683
6636
  insert(_el$10, copying ? "Please wait\u2026" : "1 element");
6684
6637
  return _el$10;
6685
6638
  })();
6686
6639
  });
6687
- const labelPosition = createMemo(() => {
6688
- return isCopying() ? {
6689
- x: copyStartX(),
6690
- y: copyStartY()
6691
- } : {
6692
- x: mouseX(),
6693
- y: mouseY()
6694
- };
6695
- });
6696
- const progressPosition = createMemo(() => isCopying() ? {
6640
+ const cursorPosition = createMemo(() => isCopying() ? {
6697
6641
  x: copyStartX(),
6698
6642
  y: copyStartY()
6699
6643
  } : {
@@ -6772,7 +6716,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
6772
6716
  y: y2
6773
6717
  });
6774
6718
  }));
6775
- createEffect(on(() => [labelVisible(), labelVariant(), labelContent(), labelPosition()], ([visible, variant, content, position]) => {
6719
+ createEffect(on(() => [labelVisible(), labelVariant(), labelContent(), cursorPosition()], ([visible, variant, content, position]) => {
6776
6720
  const contentString = typeof content === "string" ? content : "";
6777
6721
  options.onElementLabel?.(Boolean(visible), variant, {
6778
6722
  x: position.x,
@@ -6924,32 +6868,19 @@ ${plainTextContentOnly}` : plainTextContentOnly;
6924
6868
  deactivateRenderer();
6925
6869
  return;
6926
6870
  }
6927
- const elementRect = element.getBoundingClientRect();
6928
- const computedStyle = window.getComputedStyle(element);
6929
- const bounds = {
6930
- x: elementRect.left,
6931
- y: elementRect.top,
6932
- width: elementRect.width,
6933
- height: elementRect.height,
6934
- borderRadius: computedStyle.borderRadius || "0px",
6935
- transform: stripTranslateFromTransform(element)
6936
- };
6871
+ const bounds = createElementBounds(element);
6937
6872
  const currentX = bounds.x + bounds.width / 2;
6938
6873
  const currentY = bounds.y + bounds.height / 2;
6939
6874
  setMouseX(currentX);
6940
6875
  setMouseY(currentY);
6941
- if (options.agent?.provider && prompt) {
6942
- const positionX = mouseX();
6943
- const positionY = mouseY();
6944
- setInputText("");
6945
- setIsInputMode(false);
6876
+ if (hasAgentProvider() && prompt) {
6946
6877
  deactivateRenderer();
6947
6878
  void agentManager.startSession({
6948
6879
  element,
6949
6880
  prompt,
6950
6881
  position: {
6951
- x: positionX,
6952
- y: positionY
6882
+ x: currentX,
6883
+ y: currentY
6953
6884
  },
6954
6885
  selectionBounds: bounds
6955
6886
  });
@@ -6980,11 +6911,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
6980
6911
  const bounds = nativeSelectionBounds();
6981
6912
  const tagName = nativeSelectionTagName();
6982
6913
  setHasNativeSelection(false);
6983
- setNativeSelectionCursorX(OFFSCREEN_POSITION);
6984
- setNativeSelectionCursorY(OFFSCREEN_POSITION);
6985
- setNativeSelectionElements([]);
6986
- setNativeSelectionTagName(void 0);
6987
- setNativeSelectionComponentName(void 0);
6914
+ clearNativeSelectionState();
6988
6915
  window.getSelection()?.removeAllRanges();
6989
6916
  if (elements.length === 1) {
6990
6917
  await executeCopyOperation(currentX, currentY, () => copySingleElementToClipboard(elements[0]), bounds, tagName);
@@ -6999,11 +6926,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
6999
6926
  const currentX = bounds ? bounds.x + bounds.width / 2 : nativeSelectionCursorX();
7000
6927
  const currentY = bounds ? bounds.y + bounds.height / 2 : nativeSelectionCursorY();
7001
6928
  setHasNativeSelection(false);
7002
- setNativeSelectionCursorX(OFFSCREEN_POSITION);
7003
- setNativeSelectionCursorY(OFFSCREEN_POSITION);
7004
- setNativeSelectionElements([]);
7005
- setNativeSelectionTagName(void 0);
7006
- setNativeSelectionComponentName(void 0);
6929
+ clearNativeSelectionState();
7007
6930
  window.getSelection()?.removeAllRanges();
7008
6931
  setMouseX(currentX);
7009
6932
  setMouseY(currentY);
@@ -7063,7 +6986,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7063
6986
  transform: stripTranslateFromTransform(firstElement)
7064
6987
  };
7065
6988
  const tagName = extractElementTagName(firstElement);
7066
- if (options.agent?.provider) {
6989
+ if (hasAgentProvider()) {
7067
6990
  const centerX = bounds.x + bounds.width / 2;
7068
6991
  const centerY = bounds.y + bounds.height / 2;
7069
6992
  setMouseX(centerX);
@@ -7081,16 +7004,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7081
7004
  const element = getElementAtPosition(clientX, clientY);
7082
7005
  if (!element) return;
7083
7006
  setLastGrabbedElement(element);
7084
- const elementRect = element.getBoundingClientRect();
7085
- const computedStyle = window.getComputedStyle(element);
7086
- const bounds = {
7087
- x: elementRect.left,
7088
- y: elementRect.top,
7089
- width: elementRect.width,
7090
- height: elementRect.height,
7091
- borderRadius: computedStyle.borderRadius || "0px",
7092
- transform: stripTranslateFromTransform(element)
7093
- };
7007
+ const bounds = createElementBounds(element);
7094
7008
  const tagName = extractElementTagName(element);
7095
7009
  void executeCopyOperation(clientX, clientY, () => copySingleElementToClipboard(element), bounds, tagName, element);
7096
7010
  }
@@ -7363,11 +7277,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7363
7277
  setHasNativeSelection(false);
7364
7278
  const selection = window.getSelection();
7365
7279
  if (!selection || selection.isCollapsed || selection.rangeCount === 0) {
7366
- setNativeSelectionCursorX(OFFSCREEN_POSITION);
7367
- setNativeSelectionCursorY(OFFSCREEN_POSITION);
7368
- setNativeSelectionElements([]);
7369
- setNativeSelectionTagName(void 0);
7370
- setNativeSelectionComponentName(void 0);
7280
+ clearNativeSelectionState();
7371
7281
  return;
7372
7282
  }
7373
7283
  selectionDebounceTimerId = window.setTimeout(() => {
@@ -7396,11 +7306,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7396
7306
  const cursorX = isBackward ? cursorRect.left : cursorRect.right;
7397
7307
  const cursorY = cursorRect.top + cursorRect.height / 2;
7398
7308
  if (isSelectionInsideEditableElement(cursorX, cursorY)) {
7399
- setNativeSelectionCursorX(OFFSCREEN_POSITION);
7400
- setNativeSelectionCursorY(OFFSCREEN_POSITION);
7401
- setNativeSelectionElements([]);
7402
- setNativeSelectionTagName(void 0);
7403
- setNativeSelectionComponentName(void 0);
7309
+ clearNativeSelectionState();
7404
7310
  return;
7405
7311
  }
7406
7312
  setNativeSelectionCursorX(cursorX);
@@ -7409,13 +7315,9 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7409
7315
  const element = container.nodeType === Node.ELEMENT_NODE ? container : container.parentElement;
7410
7316
  if (element && isValidGrabbableElement(element)) {
7411
7317
  setNativeSelectionElements([element]);
7412
- setNativeSelectionTagName(extractElementTagName(element) || void 0);
7413
- setNativeSelectionComponentName(getNearestComponentName(element) || void 0);
7414
7318
  setHasNativeSelection(true);
7415
7319
  } else {
7416
7320
  setNativeSelectionElements([]);
7417
- setNativeSelectionTagName(void 0);
7418
- setNativeSelectionComponentName(void 0);
7419
7321
  }
7420
7322
  }, 150);
7421
7323
  }, {
@@ -7451,18 +7353,9 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7451
7353
  if (!instance.element || !document.body.contains(instance.element)) {
7452
7354
  return instance;
7453
7355
  }
7454
- const elementRect = instance.element.getBoundingClientRect();
7455
- const computedStyle = window.getComputedStyle(instance.element);
7456
7356
  return {
7457
7357
  ...instance,
7458
- bounds: {
7459
- x: elementRect.left,
7460
- y: elementRect.top,
7461
- width: elementRect.width,
7462
- height: elementRect.height,
7463
- borderRadius: computedStyle.borderRadius || "0px",
7464
- transform: stripTranslateFromTransform(instance.element)
7465
- }
7358
+ bounds: createElementBounds(instance.element)
7466
7359
  };
7467
7360
  });
7468
7361
  });
@@ -7521,10 +7414,10 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7521
7414
  },
7522
7415
  labelZIndex: Z_INDEX_LABEL,
7523
7416
  get mouseX() {
7524
- return progressPosition().x;
7417
+ return cursorPosition().x;
7525
7418
  },
7526
7419
  get mouseY() {
7527
- return progressPosition().y;
7420
+ return cursorPosition().y;
7528
7421
  },
7529
7422
  get crosshairVisible() {
7530
7423
  return crosshairVisible();
@@ -7536,7 +7429,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7536
7429
  return isInputExpanded();
7537
7430
  },
7538
7431
  get hasAgent() {
7539
- return Boolean(options.agent?.provider);
7432
+ return hasAgentProvider();
7540
7433
  },
7541
7434
  get agentSessions() {
7542
7435
  return agentManager.sessions();
@@ -7571,7 +7464,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7571
7464
  }
7572
7465
  }), rendererRoot);
7573
7466
  }
7574
- if (options.agent?.provider) {
7467
+ if (hasAgentProvider()) {
7575
7468
  agentManager.tryResumeSessions();
7576
7469
  }
7577
7470
  const copyElementAPI = async (elements) => {
@@ -7624,16 +7517,45 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7624
7517
  getState: getStateAPI,
7625
7518
  updateTheme: (partialTheme) => {
7626
7519
  const currentTheme = theme();
7627
- const mergedTheme = deepMergeTheme(currentTheme, partialTheme);
7628
- setTheme(mergedTheme);
7520
+ const mergedTheme2 = deepMergeTheme(currentTheme, partialTheme);
7521
+ setTheme(mergedTheme2);
7629
7522
  },
7630
- getTheme: () => theme()
7523
+ getTheme: () => theme(),
7524
+ setAgent: (newAgentOptions) => {
7525
+ const existingOptions = agentManager.getOptions();
7526
+ const mergedOptions = {
7527
+ ...existingOptions,
7528
+ ...newAgentOptions,
7529
+ provider: newAgentOptions.provider ?? existingOptions?.provider,
7530
+ onAbort: (session, element) => {
7531
+ newAgentOptions?.onAbort?.(session, element);
7532
+ if (element && document.contains(element)) {
7533
+ const rect = element.getBoundingClientRect();
7534
+ const centerX = rect.left + rect.width / 2;
7535
+ const centerY = rect.top + rect.height / 2;
7536
+ setMouseX(centerX);
7537
+ setMouseY(centerY);
7538
+ setFrozenElement(element);
7539
+ setInputText(session.context.prompt);
7540
+ setIsInputExpanded(true);
7541
+ setIsInputMode(true);
7542
+ setIsToggleMode(true);
7543
+ setIsToggleFrozen(true);
7544
+ if (!isActivated()) {
7545
+ activateRenderer();
7546
+ }
7547
+ }
7548
+ }
7549
+ };
7550
+ agentManager.setOptions(mergedOptions);
7551
+ setHasAgentProvider(Boolean(mergedOptions.provider));
7552
+ }
7631
7553
  };
7632
7554
  });
7633
7555
  };
7634
7556
  /*! Bundled license information:
7635
7557
 
7636
- bippy/dist/rdt-hook-CrcWl4lP.js:
7558
+ bippy/dist/rdt-hook-Ds2lt3Ph.js:
7637
7559
  (**
7638
7560
  * @license bippy
7639
7561
  *
@@ -7643,7 +7565,7 @@ bippy/dist/rdt-hook-CrcWl4lP.js:
7643
7565
  * LICENSE file in the root directory of this source tree.
7644
7566
  *)
7645
7567
 
7646
- bippy/dist/install-hook-only-DtUPvEBg.js:
7568
+ bippy/dist/install-hook-only-BE254Zqc.js:
7647
7569
  (**
7648
7570
  * @license bippy
7649
7571
  *
@@ -7653,7 +7575,7 @@ bippy/dist/install-hook-only-DtUPvEBg.js:
7653
7575
  * LICENSE file in the root directory of this source tree.
7654
7576
  *)
7655
7577
 
7656
- bippy/dist/core-D7_ABaNC.js:
7578
+ bippy/dist/core-BKZAzaFk.js:
7657
7579
  (**
7658
7580
  * @license bippy
7659
7581
  *