react-grab 0.0.70 → 0.0.71

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.
@@ -890,7 +890,7 @@ function cleanChildren(parent, current, marker, replacement) {
890
890
 
891
891
  // dist/styles.css
892
892
  var styles_default = `/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
893
- @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}}}@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-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}.size-fit{width:fit-content;height:fit-content}.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-\\[7px\\]{height:7px}.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-\\[7px\\]{width:7px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.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-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-\\[3px\\]{gap:3px}.gap-\\[5px\\]{gap:5px}.gap-px{gap:1px}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.rounded-\\[1\\.5px\\]{border-radius:1.5px}.rounded-\\[1px\\]{border-radius:1px}.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-b-xs{border-bottom-right-radius:var(--radius-xs);border-bottom-left-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[\\#B3B3B3\\]{border-color:#b3b3b3}.border-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-tag-border{border-color:var(--color-label-tag-border)}.border-white{border-color:var(--color-white)}.border-t-\\[\\#D9D9D9\\]{border-top-color:#d9d9d9}.bg-\\[\\#F7F7F7\\]{background-color:#f7f7f7}.bg-black{background-color:var(--color-black)}.bg-grab-pink{background-color:var(--color-grab-pink)}.bg-grab-purple{background-color:var(--color-grab-purple)}.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-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-1{padding:calc(var(--spacing)*1)}.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}.py-0{padding-block:calc(var(--spacing)*0)}.py-1{padding-block:calc(var(--spacing)*1)}.py-\\[3px\\]{padding-block:3px}.py-\\[5px\\]{padding-block:5px}.py-px{padding-block:1px}.pt-1{padding-top:calc(var(--spacing)*1)}.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}.break-all{word-break:break-all}.whitespace-normal{white-space:normal}.text-\\[\\#0C0C0C\\]{color:#0c0c0c}.text-\\[\\#47004A\\]{color:#47004a}.text-black{color:var(--color-black)}.text-black\\/50{color:#00000080}@supports (color:color-mix(in lab, red, red)){.text-black\\/50{color:color-mix(in oklab,var(--color-black)50%,transparent)}}.text-label-muted{color:var(--color-label-muted)}.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,)}.filter-\\[drop-shadow\\(0px_0px_4px_\\#51515180\\)\\]{filter:drop-shadow(0 0 4px #51515180)}.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\\:text-black:hover{color:var(--color-black)}.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}}@keyframes flash{0%{opacity:1;background-color:#d239c040;border-color:#d239c0}50%{opacity:1;background-color:#d239c073;border-color:#e650d2}to{opacity:1;background-color:#d239c014;border-color:#d239c080}}.react-grab-flash{animation:.4s ease-out forwards flash}.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}@keyframes pulse{50%{opacity:.5}}`;
893
+ @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}}}@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-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}.size-fit{width:fit-content;height:fit-content}.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-\\[7px\\]{height:7px}.h-\\[9px\\]{height:9px}.h-\\[17px\\]{height:17px}.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-\\[7px\\]{width:7px}.w-\\[17px\\]{width:17px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.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}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-\\[3px\\]{gap:3px}.gap-\\[5px\\]{gap:5px}.gap-px{gap:1px}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-\\[1\\.5px\\]{border-radius:1.5px}.rounded-\\[1px\\]{border-radius:1px}.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-b-xs{border-bottom-right-radius:var(--radius-xs);border-bottom-left-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[\\#B3B3B3\\]{border-color:#b3b3b3}.border-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-tag-border{border-color:var(--color-label-tag-border)}.border-white{border-color:var(--color-white)}.border-t-\\[\\#D9D9D9\\]{border-top-color:#d9d9d9}.bg-\\[\\#F7F7F7\\]{background-color:#f7f7f7}.bg-black{background-color:var(--color-black)}.bg-grab-pink{background-color:var(--color-grab-pink)}.bg-grab-purple{background-color:var(--color-grab-purple)}.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-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-1{padding:calc(var(--spacing)*1)}.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-\\[2px\\]{padding-inline:2px}.px-\\[3px\\]{padding-inline:3px}.py-0{padding-block:calc(var(--spacing)*0)}.py-1{padding-block:calc(var(--spacing)*1)}.py-\\[2px\\]{padding-block:2px}.py-\\[3px\\]{padding-block:3px}.py-\\[5px\\]{padding-block:5px}.py-px{padding-block:1px}.pt-1{padding-top:calc(var(--spacing)*1)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-1\\.5{padding-right:calc(var(--spacing)*1.5)}.pl-1\\.5{padding-left: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}.wrap-break-word{overflow-wrap:break-word}.whitespace-normal{white-space:normal}.text-\\[\\#0C0C0C\\]{color:#0c0c0c}.text-\\[\\#47004A\\]{color:#47004a}.text-black{color:var(--color-black)}.text-label-muted{color:var(--color-label-muted)}.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,)}.filter-\\[drop-shadow\\(0px_0px_4px_\\#51515180\\)\\]{filter:drop-shadow(0 0 4px #51515180)}.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}.select-none{-webkit-user-select:none;user-select: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-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}}@keyframes flash{0%{opacity:1;background-color:#d239c040;border-color:#d239c0}50%{opacity:1;background-color:#d239c073;border-color:#e650d2}to{opacity:1;background-color:#d239c014;border-color:#d239c080}}.react-grab-flash{animation:.4s ease-out forwards flash}.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}@keyframes pulse{50%{opacity:.5}}`;
894
894
 
895
895
  // src/utils/is-keyboard-event-triggered-by-input.ts
896
896
  var FORM_TAGS_AND_ROLES = [
@@ -1019,7 +1019,7 @@ var buildOpenFileUrl = (filePath, lineNumber) => {
1019
1019
  };
1020
1020
 
1021
1021
  // src/constants.ts
1022
- var VERSION = "0.0.70";
1022
+ var VERSION = "0.0.71";
1023
1023
  var VIEWPORT_MARGIN_PX = 8;
1024
1024
  var OFFSCREEN_POSITION = -1e3;
1025
1025
  var SELECTION_LERP_FACTOR = 0.95;
@@ -1029,6 +1029,7 @@ var SELECTION_CURSOR_SETTLE_DELAY_MS = 500;
1029
1029
  var BLUR_DEACTIVATION_THRESHOLD_MS = 500;
1030
1030
  var DRAG_THRESHOLD_PX = 2;
1031
1031
  var ELEMENT_DETECTION_THROTTLE_MS = 32;
1032
+ var BOUNDS_RECALC_INTERVAL_MS = 100;
1032
1033
  var AUTO_SCROLL_EDGE_THRESHOLD_PX = 25;
1033
1034
  var AUTO_SCROLL_SPEED_PX = 10;
1034
1035
  var Z_INDEX_LABEL = 2147483647;
@@ -3867,16 +3868,17 @@ var _tmpl$42 = /* @__PURE__ */ template(`<div class="absolute w-0 h-0"style="bor
3867
3868
  var _tmpl$52 = /* @__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">`);
3868
3869
  var _tmpl$6 = /* @__PURE__ */ template(`<div class="[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start px-2 py-[5px] w-auto h-fit self-stretch [border-top-width:0.5px] border-t-solid border-t-[#D9D9D9] antialiased rounded-t-none rounded-b-xs"style="background-image:linear-gradient(in oklab 180deg, oklab(100% 0 0) 0%, oklab(96.1% 0 0) 5.92%)">`);
3869
3870
  var _tmpl$7 = /* @__PURE__ */ template(`<div class="[font-synthesis:none] contain-layout shrink-0 flex items-center gap-1 rounded-xs bg-white antialiased w-fit h-fit py-1 px-1.5"><div class="contain-layout shrink-0 flex items-center px-0 py-px w-fit h-[18px] rounded-[1.5px] gap-[3px]"><div class="text-black text-[12px] leading-4 shrink-0 tracking-[-0.04em] font-sans font-medium w-fit h-fit">`);
3870
- var _tmpl$8 = /* @__PURE__ */ template(`<button class="contain-layout shrink-0 flex flex-col items-start rounded-xs bg-white [border-width:0.5px] border-solid border-[#B3B3B3] p-1 size-fit cursor-pointer ml-1 transition-none hover:scale-105"><div class="shrink-0 w-[7px] h-[7px] rounded-[1px] bg-black">`);
3871
- var _tmpl$9 = /* @__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 opacity-50 break-all"placeholder="type to edit"rows=1 disabled style=field-sizing:content;min-height:16px>`);
3871
+ var _tmpl$8 = /* @__PURE__ */ template(`<button data-react-grab-ignore-events class="contain-layout shrink-0 flex flex-col items-start rounded-xs bg-white [border-width:0.5px] border-solid border-[#B3B3B3] p-1 size-fit cursor-pointer ml-1 transition-none hover:scale-105"><div data-react-grab-ignore-events class="shrink-0 w-[7px] h-[7px] rounded-[1px] bg-black pointer-events-none">`);
3872
+ var _tmpl$9 = /* @__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 opacity-50 wrap-break-word overflow-y-auto"placeholder="type to edit"rows=1 disabled style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none>`);
3872
3873
  var _tmpl$0 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 px-1.5 w-auto h-fit"><div class="contain-layout flex items-center px-0 py-px w-auto h-fit rounded-[1.5px] gap-[3px]"><div class="text-black text-[12px] leading-4 tracking-[-0.04em] font-sans font-medium w-auto h-fit whitespace-normal react-grab-shimmer">`);
3873
3874
  var _tmpl$1 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex items-center gap-px w-fit h-fit">`);
3874
3875
  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 px-[3px] py-[3px] rounded-xs bg-white [border-width:0.5px] border-solid border-[#B3B3B3] size-fit"><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`);
3875
- 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 pt-1 w-fit h-fit px-1.5"></div><div class="grid w-full transition-[grid-template-rows] duration-30 ease-out"><div class="overflow-hidden min-h-0">`);
3876
+ 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></div><div class="grid transition-[grid-template-rows] duration-30 ease-out"><div>`);
3876
3877
  var _tmpl$12 = /* @__PURE__ */ template(`<button>`);
3877
- var _tmpl$13 = /* @__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 break-all"rows=1 style=field-sizing:content;min-height:16px></textarea><div class="flex items-center gap-0.5 ml-1"><button class="contain-layout shrink-0 flex flex-col items-start px-[3px] py-[3px] rounded-xs bg-white [border-width:0.5px] border-solid border-[#B3B3B3] size-fit cursor-pointer transition-none hover:scale-105"><div style=background-image:url(https://workers.paper.design/file-assets/01K8D51Q7E2ESJTN18XN2MT96X/01KBEJ7N5GQ0ZZ7K456R42AP4V.svg)>`);
3878
- var _tmpl$14 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 px-1.5 w-fit h-fit">`);
3879
- var _tmpl$15 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events class="fixed font-sans antialiased transition-opacity duration-300 ease-out filter-[drop-shadow(0px_0px_4px_#51515180)]"style=z-index:2147483647><div class="[font-synthesis:none] contain-layout flex items-center gap-[5px] rounded-xs bg-white antialiased w-fit h-fit p-0">`);
3878
+ var _tmpl$13 = /* @__PURE__ */ template(`<button class="contain-layout shrink-0 flex flex-col items-start px-[3px] py-[3px] rounded-xs bg-white [border-width:0.5px] border-solid border-[#B3B3B3] size-fit cursor-pointer transition-all hover:scale-105"><div class="w-2.5 h-[9px] shrink-0 bg-cover bg-center opacity-[0.99]"style=background-image:url(https://workers.paper.design/file-assets/01K8D51Q7E2ESJTN18XN2MT96X/01KBEJ7N5GQ0ZZ7K456R42AP4V.svg)>`);
3879
+ var _tmpl$14 = /* @__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 wrap-break-word overflow-y-auto"rows=1 style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none></textarea><div class="flex items-center gap-0.5 ml-1 w-[17px] h-[17px] justify-end">`);
3880
+ var _tmpl$15 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit max-w-[280px]"><div>`);
3881
+ var _tmpl$16 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events class="fixed font-sans antialiased transition-opacity duration-300 ease-out filter-[drop-shadow(0px_0px_4px_#51515180)] select-none"style=z-index:2147483647><div class="[font-synthesis:none] contain-layout flex items-center gap-[5px] rounded-xs bg-white antialiased w-fit h-fit p-0">`);
3880
3882
  var ARROW_HEIGHT = 8;
3881
3883
  var LABEL_GAP = 4;
3882
3884
  var IDLE_TIMEOUT_MS = 400;
@@ -4103,6 +4105,7 @@ var SelectionLabel = (props) => {
4103
4105
  event.stopImmediatePropagation();
4104
4106
  if (event.code === "Enter" && !event.shiftKey) {
4105
4107
  event.preventDefault();
4108
+ if (!props.inputValue?.trim()) return;
4106
4109
  speechRecognition.stop();
4107
4110
  props.onSubmit?.();
4108
4111
  } else if (event.code === "Escape") {
@@ -4129,6 +4132,7 @@ var SelectionLabel = (props) => {
4129
4132
  event.stopImmediatePropagation();
4130
4133
  };
4131
4134
  const handleSubmit = () => {
4135
+ if (props.isInputExpanded && !props.inputValue?.trim()) return;
4132
4136
  speechRecognition.stop();
4133
4137
  props.onSubmit?.();
4134
4138
  };
@@ -4137,7 +4141,7 @@ var SelectionLabel = (props) => {
4137
4141
  return memo(() => props.visible !== false)() && props.selectionBounds;
4138
4142
  },
4139
4143
  get children() {
4140
- var _el$0 = _tmpl$15(), _el$12 = _el$0.firstChild;
4144
+ var _el$0 = _tmpl$16(), _el$12 = _el$0.firstChild;
4141
4145
  _el$0.$$click = stopPropagation;
4142
4146
  _el$0.$$mousedown = stopPropagation;
4143
4147
  _el$0.$$pointerdown = stopPropagation;
@@ -4179,7 +4183,16 @@ var SelectionLabel = (props) => {
4179
4183
  },
4180
4184
  get children() {
4181
4185
  var _el$19 = _tmpl$8();
4182
- addEventListener(_el$19, "click", props.onAbort);
4186
+ _el$19.$$click = (event) => {
4187
+ event.stopPropagation();
4188
+ props.onAbort?.();
4189
+ };
4190
+ _el$19.$$pointerup = (event) => {
4191
+ event.stopPropagation();
4192
+ props.onAbort?.();
4193
+ };
4194
+ _el$19.$$mousedown = (event) => event.stopPropagation();
4195
+ _el$19.$$pointerdown = (event) => event.stopPropagation();
4183
4196
  return _el$19;
4184
4197
  }
4185
4198
  }), null);
@@ -4258,7 +4271,17 @@ var SelectionLabel = (props) => {
4258
4271
  return _el$25;
4259
4272
  }
4260
4273
  }));
4261
- createRenderEffect((_$p) => setStyleProperty(_el$23, "grid-template-rows", isIdle() ? "1fr" : "0fr"));
4274
+ createRenderEffect((_p$) => {
4275
+ var _v$3 = cn("contain-layout shrink-0 flex items-center gap-1 pt-1 w-fit h-fit pl-1.5", props.componentName ? "pr-1.5" : "pr-1"), _v$4 = isIdle() ? "1fr" : "0fr", _v$5 = cn("overflow-hidden min-h-0", !isIdle() && "w-0");
4276
+ _v$3 !== _p$.e && className(_el$21, _p$.e = _v$3);
4277
+ _v$4 !== _p$.t && setStyleProperty(_el$23, "grid-template-rows", _p$.t = _v$4);
4278
+ _v$5 !== _p$.a && className(_el$24, _p$.a = _v$5);
4279
+ return _p$;
4280
+ }, {
4281
+ e: void 0,
4282
+ t: void 0,
4283
+ a: void 0
4284
+ });
4262
4285
  return _el$20;
4263
4286
  }
4264
4287
  }), null);
@@ -4267,7 +4290,7 @@ var SelectionLabel = (props) => {
4267
4290
  return memo(() => !!isNotProcessing())() && props.isInputExpanded;
4268
4291
  },
4269
4292
  get children() {
4270
- var _el$29 = _tmpl$14(), _el$30 = _el$29.firstChild;
4293
+ var _el$29 = _tmpl$15(), _el$30 = _el$29.firstChild;
4271
4294
  insert(_el$30, createComponent(ClickToCopyPill, {
4272
4295
  onClick: handleSubmit,
4273
4296
  dimmed: true,
@@ -4329,14 +4352,14 @@ var SelectionLabel = (props) => {
4329
4352
  }), null);
4330
4353
  insert(_el$29, createComponent(BottomSection, {
4331
4354
  get children() {
4332
- var _el$32 = _tmpl$13(), _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling, _el$36 = _el$34.firstChild, _el$37 = _el$36.firstChild;
4355
+ var _el$32 = _tmpl$14(), _el$33 = _el$32.firstChild, _el$34 = _el$33.nextSibling;
4333
4356
  _el$33.$$keydown = handleKeyDown;
4334
4357
  _el$33.$$input = handleInput;
4335
4358
  var _ref$3 = inputRef;
4336
4359
  typeof _ref$3 === "function" ? use(_ref$3, _el$33) : inputRef = _el$33;
4337
4360
  insert(_el$34, createComponent(Show, {
4338
4361
  get when() {
4339
- return memo(() => !!props.hasAgent)() && speechRecognition.isSupported();
4362
+ return memo(() => !!(props.hasAgent && speechRecognition.isSupported()))() && !props.inputValue;
4340
4363
  },
4341
4364
  get children() {
4342
4365
  var _el$35 = _tmpl$12();
@@ -4348,9 +4371,9 @@ var SelectionLabel = (props) => {
4348
4371
  }
4349
4372
  }));
4350
4373
  createRenderEffect((_p$) => {
4351
- var _v$3 = cn("contain-layout shrink-0 flex items-center justify-center px-[3px] py-[3px] rounded-xs [border-width:0.5px] border-solid size-fit cursor-pointer transition-all hover:scale-105", speechRecognition.isListening() ? "bg-grab-purple border-grab-purple text-white" : "bg-white border-[#B3B3B3] text-black/50 hover:text-black"), _v$4 = speechRecognition.isListening() ? "Stop listening" : "Start voice input";
4352
- _v$3 !== _p$.e && className(_el$35, _p$.e = _v$3);
4353
- _v$4 !== _p$.t && setAttribute(_el$35, "title", _p$.t = _v$4);
4374
+ var _v$6 = cn("contain-layout shrink-0 flex items-center justify-center px-[2px] py-[2px] rounded-xs [border-width:0.5px] border-solid size-fit cursor-pointer transition-all hover:scale-105", speechRecognition.isListening() ? "bg-grab-purple border-grab-purple text-white" : "bg-white border-[#B3B3B3] text-black"), _v$7 = speechRecognition.isListening() ? "Stop listening" : "Start voice input";
4375
+ _v$6 !== _p$.e && className(_el$35, _p$.e = _v$6);
4376
+ _v$7 !== _p$.t && setAttribute(_el$35, "title", _p$.t = _v$7);
4354
4377
  return _p$;
4355
4378
  }, {
4356
4379
  e: void 0,
@@ -4358,31 +4381,33 @@ var SelectionLabel = (props) => {
4358
4381
  });
4359
4382
  return _el$35;
4360
4383
  }
4361
- }), _el$36);
4362
- _el$36.$$click = handleSubmit;
4363
- createRenderEffect((_p$) => {
4364
- var _v$5 = speechRecognition.isListening() ? "listening..." : props.hasAgent ? "type or speak to edit" : "type to edit", _v$6 = cn("w-2.5 h-[9px] shrink-0 bg-cover bg-center transition-opacity duration-100", props.inputValue ? "opacity-[0.99]" : "opacity-50");
4365
- _v$5 !== _p$.e && setAttribute(_el$33, "placeholder", _p$.e = _v$5);
4366
- _v$6 !== _p$.t && className(_el$37, _p$.t = _v$6);
4367
- return _p$;
4368
- }, {
4369
- e: void 0,
4370
- t: void 0
4371
- });
4384
+ }), null);
4385
+ insert(_el$34, createComponent(Show, {
4386
+ get when() {
4387
+ return props.inputValue;
4388
+ },
4389
+ get children() {
4390
+ var _el$36 = _tmpl$13(); _el$36.firstChild;
4391
+ _el$36.$$click = handleSubmit;
4392
+ return _el$36;
4393
+ }
4394
+ }), null);
4395
+ createRenderEffect(() => setAttribute(_el$33, "placeholder", speechRecognition.isListening() ? "listening..." : props.hasAgent ? "type to edit" : "type prompt"));
4372
4396
  createRenderEffect(() => _el$33.value = props.inputValue ?? "");
4373
4397
  return _el$32;
4374
4398
  }
4375
4399
  }), null);
4400
+ createRenderEffect(() => className(_el$30, cn("contain-layout shrink-0 flex items-center gap-1 pt-1 w-fit h-fit pl-1.5", props.componentName ? "pr-1.5" : "pr-1")));
4376
4401
  return _el$29;
4377
4402
  }
4378
4403
  }), null);
4379
4404
  createRenderEffect((_p$) => {
4380
- var _v$7 = `${computedPosition().top}px`, _v$8 = `${computedPosition().left}px`, _v$9 = props.visible ? "auto" : "none", _v$0 = props.status === "fading" ? 0 : 1, _v$1 = props.status === "copied" || props.status === "fading" ? "none" : void 0;
4381
- _v$7 !== _p$.e && setStyleProperty(_el$0, "top", _p$.e = _v$7);
4382
- _v$8 !== _p$.t && setStyleProperty(_el$0, "left", _p$.t = _v$8);
4383
- _v$9 !== _p$.a && setStyleProperty(_el$0, "pointer-events", _p$.a = _v$9);
4384
- _v$0 !== _p$.o && setStyleProperty(_el$0, "opacity", _p$.o = _v$0);
4385
- _v$1 !== _p$.i && setStyleProperty(_el$12, "display", _p$.i = _v$1);
4405
+ var _v$8 = `${computedPosition().top}px`, _v$9 = `${computedPosition().left}px`, _v$0 = props.isInputExpanded ? "auto" : "none", _v$1 = props.status === "fading" ? 0 : 1, _v$10 = props.status === "copied" || props.status === "fading" ? "none" : void 0;
4406
+ _v$8 !== _p$.e && setStyleProperty(_el$0, "top", _p$.e = _v$8);
4407
+ _v$9 !== _p$.t && setStyleProperty(_el$0, "left", _p$.t = _v$9);
4408
+ _v$0 !== _p$.a && setStyleProperty(_el$0, "pointer-events", _p$.a = _v$0);
4409
+ _v$1 !== _p$.o && setStyleProperty(_el$0, "opacity", _p$.o = _v$1);
4410
+ _v$10 !== _p$.i && setStyleProperty(_el$12, "display", _p$.i = _v$10);
4386
4411
  return _p$;
4387
4412
  }, {
4388
4413
  e: void 0,
@@ -4395,10 +4420,10 @@ var SelectionLabel = (props) => {
4395
4420
  }
4396
4421
  });
4397
4422
  };
4398
- delegateEvents(["click", "pointerdown", "mousedown", "input", "keydown"]);
4423
+ delegateEvents(["click", "pointerdown", "mousedown", "pointerup", "input", "keydown"]);
4399
4424
 
4400
4425
  // src/components/selection-cursor.tsx
4401
- var _tmpl$16 = /* @__PURE__ */ template(`<div class="fixed z-2147483647"><button data-react-grab-selection-cursor>`);
4426
+ var _tmpl$17 = /* @__PURE__ */ template(`<div class="fixed z-2147483647"><button data-react-grab-selection-cursor>`);
4402
4427
  var SelectionCursor = (props) => {
4403
4428
  const [isHovered, setIsHovered] = createSignal(false);
4404
4429
  const [debouncedVisible, setDebouncedVisible] = createSignal(false);
@@ -4435,7 +4460,7 @@ var SelectionCursor = (props) => {
4435
4460
  });
4436
4461
  }
4437
4462
  }), (() => {
4438
- var _el$ = _tmpl$16(), _el$2 = _el$.firstChild;
4463
+ var _el$ = _tmpl$17(), _el$2 = _el$.firstChild;
4439
4464
  _el$.addEventListener("mouseleave", () => setIsHovered(false));
4440
4465
  _el$.addEventListener("mouseenter", () => setIsHovered(true));
4441
4466
  _el$2.$$click = handleClick;
@@ -4580,7 +4605,7 @@ var ReactGrabRenderer = (props) => {
4580
4605
  return session.isStreaming ? "copying" : "copied";
4581
4606
  },
4582
4607
  get statusText() {
4583
- return session.lastStatus || "Please wait\u2026";
4608
+ return session.lastStatus || "Thinking\u2026";
4584
4609
  },
4585
4610
  get inputValue() {
4586
4611
  return session.context.prompt;
@@ -6000,7 +6025,7 @@ var isTargetKeyCombination = (event, options) => {
6000
6025
  ].filter(Boolean).length;
6001
6026
  return allRequiredModifiersPressed && pressedModifierCount >= requiredModifierCount;
6002
6027
  }
6003
- const keyMatches = event.key.toLowerCase() === key.toLowerCase() || keyMatchesCode(key, event.code);
6028
+ const keyMatches = event.key?.toLowerCase() === key.toLowerCase() || keyMatchesCode(key, event.code);
6004
6029
  const hasModifier = metaKey || ctrlKey || shiftKey || altKey;
6005
6030
  const modifiersMatch = hasModifier ? (metaKey ? event.metaKey : true) && (ctrlKey ? event.ctrlKey : true) && (shiftKey ? event.shiftKey : true) && (altKey ? event.altKey : true) : event.metaKey || event.ctrlKey;
6006
6031
  return keyMatches && modifiersMatch;
@@ -6029,9 +6054,6 @@ var DEFAULT_THEME = {
6029
6054
  elementLabel: {
6030
6055
  enabled: true
6031
6056
  },
6032
- successLabels: {
6033
- enabled: true
6034
- },
6035
6057
  crosshair: {
6036
6058
  enabled: true
6037
6059
  }
@@ -6051,9 +6073,6 @@ var mergeThemeWithBase = (baseTheme, partialTheme) => ({
6051
6073
  elementLabel: {
6052
6074
  enabled: partialTheme.elementLabel?.enabled ?? baseTheme.elementLabel.enabled
6053
6075
  },
6054
- successLabels: {
6055
- enabled: partialTheme.successLabels?.enabled ?? baseTheme.successLabels.enabled
6056
- },
6057
6076
  crosshair: {
6058
6077
  enabled: partialTheme.crosshair?.enabled ?? baseTheme.crosshair.enabled
6059
6078
  }
@@ -6340,7 +6359,7 @@ var createAgentManager = (initialAgentOptions) => {
6340
6359
  tagName,
6341
6360
  componentName
6342
6361
  );
6343
- session.lastStatus = "Please wait\u2026";
6362
+ session.lastStatus = "Thinking\u2026";
6344
6363
  sessionElements.set(session.id, element);
6345
6364
  setSessions((prev) => new Map(prev).set(session.id, session));
6346
6365
  saveSessionById(session, storage);
@@ -6421,7 +6440,7 @@ var createAgentManager = (initialAgentOptions) => {
6421
6440
  };
6422
6441
 
6423
6442
  // src/core.tsx
6424
- var _tmpl$17 = /* @__PURE__ */ template(`<span class="tabular-nums align-middle">`);
6443
+ var _tmpl$18 = /* @__PURE__ */ template(`<span class="tabular-nums align-middle">`);
6425
6444
  var _tmpl$23 = /* @__PURE__ */ template(`<span class="font-mono tabular-nums align-middle">&lt;<!>>`);
6426
6445
  var _tmpl$33 = /* @__PURE__ */ template(`<span class="tabular-nums ml-1 align-middle"> in `);
6427
6446
  var onIdle = (callback) => {
@@ -6515,7 +6534,7 @@ var init = (rawOptions) => {
6515
6534
  hasInited = true;
6516
6535
  const logIntro = () => {
6517
6536
  try {
6518
- const version = "0.0.70";
6537
+ const version = "0.0.71";
6519
6538
  const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
6520
6539
  console.log(`%cReact Grab${version ? ` v${version}` : ""}%c
6521
6540
  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;`, "");
@@ -6551,10 +6570,10 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
6551
6570
  const [lastGrabbedElement, setLastGrabbedElement] = createSignal(null);
6552
6571
  const [progressStartTime, setProgressStartTime] = createSignal(null);
6553
6572
  const [grabbedBoxes, setGrabbedBoxes] = createSignal([]);
6554
- const [successLabels, setSuccessLabels] = createSignal([]);
6555
6573
  const [isActivated, setIsActivated] = createSignal(false);
6556
6574
  const [isToggleMode, setIsToggleMode] = createSignal(false);
6557
6575
  const [didJustDrag, setDidJustDrag] = createSignal(false);
6576
+ const [didJustCopy, setDidJustCopy] = createSignal(false);
6558
6577
  const [copyStartX, setCopyStartX] = createSignal(OFFSCREEN_POSITION);
6559
6578
  const [copyStartY, setCopyStartY] = createSignal(OFFSCREEN_POSITION);
6560
6579
  const [copyOffsetFromCenterX, setCopyOffsetFromCenterX] = createSignal(0);
@@ -6568,6 +6587,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
6568
6587
  const [isInputExpanded, setIsInputExpanded] = createSignal(false);
6569
6588
  const [frozenElement, setFrozenElement] = createSignal(null);
6570
6589
  const [hasAgentProvider, setHasAgentProvider] = createSignal(Boolean(options.agent?.provider));
6590
+ const elementInputCache = /* @__PURE__ */ new WeakMap();
6571
6591
  const [nativeSelectionCursorX, setNativeSelectionCursorX] = createSignal(OFFSCREEN_POSITION);
6572
6592
  const [nativeSelectionCursorY, setNativeSelectionCursorY] = createSignal(OFFSCREEN_POSITION);
6573
6593
  const [hasNativeSelection, setHasNativeSelection] = createSignal(false);
@@ -6654,24 +6674,6 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
6654
6674
  setGrabbedBoxes((previousBoxes) => previousBoxes.filter((box) => box.id !== boxId));
6655
6675
  }, SUCCESS_LABEL_DURATION_MS);
6656
6676
  };
6657
- const showTemporarySuccessLabel = (text, type) => {
6658
- const labelId = `success-${Date.now()}-${Math.random()}`;
6659
- setSuccessLabels((previousLabels) => [...previousLabels, {
6660
- id: labelId,
6661
- text
6662
- }]);
6663
- options.onSuccessLabel?.(text, type, {
6664
- x: mouseX(),
6665
- y: mouseY()
6666
- });
6667
- setTimeout(() => {
6668
- setSuccessLabels((previousLabels) => previousLabels.filter((label) => label.id !== labelId));
6669
- }, SUCCESS_LABEL_DURATION_MS);
6670
- };
6671
- const extractElementTagNameForSuccess = (element) => {
6672
- const tagName = extractElementTagName(element);
6673
- return tagName ? `<${tagName}>` : "1 element";
6674
- };
6675
6677
  const notifyElementsSelected = (elements) => {
6676
6678
  const elementsPayload = elements.map((element) => ({
6677
6679
  tagName: extractElementTagName(element)
@@ -6705,7 +6707,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
6705
6707
  const removeLabelInstance = (instanceId) => {
6706
6708
  setLabelInstances((prev) => prev.filter((instance) => instance.id !== instanceId));
6707
6709
  };
6708
- const executeCopyOperation = async (positionX, positionY, operation, bounds, tagName, componentName, element) => {
6710
+ const executeCopyOperation = async (positionX, positionY, operation, bounds, tagName, componentName, element, shouldDeactivateAfter) => {
6709
6711
  setCopyStartX(positionX);
6710
6712
  setCopyStartY(positionY);
6711
6713
  if (bounds) {
@@ -6719,6 +6721,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
6719
6721
  const instanceId = bounds && tagName ? createLabelInstance(bounds, tagName, componentName, "copying", element, positionX) : null;
6720
6722
  await operation().finally(() => {
6721
6723
  setIsCopying(false);
6724
+ setDidJustCopy(true);
6722
6725
  stopProgressAnimation();
6723
6726
  if (instanceId) {
6724
6727
  updateLabelInstance(instanceId, "copied");
@@ -6729,7 +6732,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
6729
6732
  }, 350);
6730
6733
  }, COPIED_LABEL_DURATION_MS);
6731
6734
  }
6732
- if (isToggleMode()) {
6735
+ if (isToggleMode() || shouldDeactivateAfter) {
6733
6736
  deactivateRenderer();
6734
6737
  }
6735
6738
  });
@@ -6792,16 +6795,12 @@ ${plainTextContentOnly}` : plainTextContentOnly;
6792
6795
  return didCopy;
6793
6796
  };
6794
6797
  const copySingleElementToClipboard = async (targetElement2, extraPrompt) => {
6795
- const successLabelType = extraPrompt ? "input-submit" : "copy";
6796
6798
  options.onElementSelect?.(targetElement2);
6797
6799
  if (theme().grabbedBoxes.enabled) {
6798
6800
  showTemporaryGrabbedBox(createElementBounds(targetElement2), targetElement2);
6799
6801
  }
6800
6802
  await new Promise((resolve) => requestAnimationFrame(resolve));
6801
- const didCopy = await tryCopyWithFallback([targetElement2], extraPrompt);
6802
- if (didCopy && theme().successLabels.enabled) {
6803
- showTemporarySuccessLabel(extractElementTagNameForSuccess(targetElement2), successLabelType);
6804
- }
6803
+ await tryCopyWithFallback([targetElement2], extraPrompt);
6805
6804
  notifyElementsSelected([targetElement2]);
6806
6805
  };
6807
6806
  const copyMultipleElementsToClipboard = async (targetElements) => {
@@ -6815,10 +6814,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
6815
6814
  }
6816
6815
  }
6817
6816
  await new Promise((resolve) => requestAnimationFrame(resolve));
6818
- const didCopy = await tryCopyWithFallback(targetElements);
6819
- if (didCopy && theme().successLabels.enabled) {
6820
- showTemporarySuccessLabel(`${targetElements.length} elements`, "copy");
6821
- }
6817
+ await tryCopyWithFallback(targetElements);
6822
6818
  notifyElementsSelected(targetElements);
6823
6819
  };
6824
6820
  const targetElement = createMemo(() => {
@@ -6897,8 +6893,8 @@ ${plainTextContentOnly}` : plainTextContentOnly;
6897
6893
  const copying = isCopying();
6898
6894
  if (!element) {
6899
6895
  return (() => {
6900
- var _el$ = _tmpl$17();
6901
- insert(_el$, copying ? "Please wait\u2026" : "1 element");
6896
+ var _el$ = _tmpl$18();
6897
+ insert(_el$, copying ? "Processing\u2026" : "1 element");
6902
6898
  return _el$;
6903
6899
  })();
6904
6900
  }
@@ -6923,8 +6919,8 @@ ${plainTextContentOnly}` : plainTextContentOnly;
6923
6919
  })();
6924
6920
  }
6925
6921
  return (() => {
6926
- var _el$10 = _tmpl$17();
6927
- insert(_el$10, copying ? "Please wait\u2026" : "1 element");
6922
+ var _el$10 = _tmpl$18();
6923
+ insert(_el$10, copying ? "Processing\u2026" : "1 element");
6928
6924
  return _el$10;
6929
6925
  })();
6930
6926
  });
@@ -6979,15 +6975,6 @@ ${plainTextContentOnly}` : plainTextContentOnly;
6979
6975
  clearSource();
6980
6976
  }).catch(clearSource);
6981
6977
  }));
6982
- createEffect(on(() => viewportVersion(), () => {
6983
- const currentBoxes = grabbedBoxes();
6984
- if (currentBoxes.length === 0) return;
6985
- const updatedBoxes = currentBoxes.map((box) => ({
6986
- ...box,
6987
- bounds: createElementBounds(box.element)
6988
- }));
6989
- setGrabbedBoxes(updatedBoxes);
6990
- }));
6991
6978
  createEffect(on(() => viewportVersion(), () => agentManager.updateSessionBoundsOnViewportChange()));
6992
6979
  createEffect(on(() => [isActivated(), isDragging(), isCopying(), isInputMode(), targetElement(), dragBounds()], ([active, dragging, copying, inputMode, target, drag]) => {
6993
6980
  options.onStateChange?.({
@@ -7127,6 +7114,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7127
7114
  setIsInputExpanded(false);
7128
7115
  setFrozenElement(null);
7129
7116
  setSelectionLabelStatus("idle");
7117
+ setDidJustCopy(false);
7130
7118
  if (isDragging()) {
7131
7119
  setIsDragging(false);
7132
7120
  document.body.style.userSelect = "";
@@ -7181,6 +7169,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7181
7169
  setMouseX(currentX);
7182
7170
  setMouseY(currentY);
7183
7171
  if (hasAgentProvider() && prompt) {
7172
+ elementInputCache.delete(element);
7184
7173
  deactivateRenderer();
7185
7174
  void agentManager.startSession({
7186
7175
  element,
@@ -7195,6 +7184,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7195
7184
  }
7196
7185
  setIsInputMode(false);
7197
7186
  setInputText("");
7187
+ elementInputCache.delete(element);
7198
7188
  const tagName = extractElementTagName(element);
7199
7189
  void getNearestComponentName(element).then((componentName) => {
7200
7190
  void executeCopyOperation(currentX, currentY, () => copySingleElementToClipboard(element, prompt || void 0), bounds, tagName, componentName ?? void 0, element).then(() => {
@@ -7204,6 +7194,11 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7204
7194
  };
7205
7195
  const handleInputCancel = () => {
7206
7196
  if (!isInputMode()) return;
7197
+ const element = frozenElement() || targetElement();
7198
+ const currentInput = inputText().trim();
7199
+ if (element && currentInput) {
7200
+ elementInputCache.set(element, currentInput);
7201
+ }
7207
7202
  deactivateRenderer();
7208
7203
  };
7209
7204
  const handleToggleExpand = () => {
@@ -7214,6 +7209,10 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7214
7209
  setCopyStartX(mouseX());
7215
7210
  setCopyStartY(mouseY());
7216
7211
  setCopyOffsetFromCenterX(mouseX() - selectionCenterX);
7212
+ const cachedInput = elementInputCache.get(element);
7213
+ if (cachedInput) {
7214
+ setInputText(cachedInput);
7215
+ }
7217
7216
  }
7218
7217
  setIsToggleMode(true);
7219
7218
  setIsToggleFrozen(true);
@@ -7256,6 +7255,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7256
7255
  };
7257
7256
  const handlePointerMove = (clientX, clientY) => {
7258
7257
  if (isInputMode() || isToggleFrozen()) return;
7258
+ setDidJustCopy(false);
7259
7259
  setMouseX(clientX);
7260
7260
  setMouseY(clientY);
7261
7261
  const now = performance.now();
@@ -7324,7 +7324,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7324
7324
  setIsInputMode(true);
7325
7325
  } else {
7326
7326
  void getNearestComponentName(firstElement).then((componentName) => {
7327
- void executeCopyOperation(clientX, clientY, () => copyMultipleElementsToClipboard(selectedElements), bounds, tagName, componentName ?? void 0, firstElement);
7327
+ void executeCopyOperation(clientX, clientY, () => copyMultipleElementsToClipboard(selectedElements), bounds, tagName, componentName ?? void 0, firstElement, true);
7328
7328
  });
7329
7329
  }
7330
7330
  }
@@ -7341,8 +7341,64 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7341
7341
  };
7342
7342
  const abortController = new AbortController();
7343
7343
  const eventListenerSignal = abortController.signal;
7344
+ const claimedEvents = /* @__PURE__ */ new WeakSet();
7345
+ const isEnterCode = (code) => code === "Enter" || code === "NumpadEnter";
7346
+ const originalKeyDescriptor = Object.getOwnPropertyDescriptor(KeyboardEvent.prototype, "key");
7347
+ let didPatchKeyboardEvent = false;
7348
+ if (originalKeyDescriptor?.get && !originalKeyDescriptor.get.__reactGrabPatched) {
7349
+ didPatchKeyboardEvent = true;
7350
+ const originalGetter = originalKeyDescriptor.get;
7351
+ const patchedGetter = function() {
7352
+ if (claimedEvents.has(this)) {
7353
+ return "";
7354
+ }
7355
+ return originalGetter.call(this);
7356
+ };
7357
+ patchedGetter.__reactGrabPatched = true;
7358
+ Object.defineProperty(KeyboardEvent.prototype, "key", {
7359
+ get: patchedGetter,
7360
+ configurable: true
7361
+ });
7362
+ }
7363
+ const blockEnterIfNeeded = (event) => {
7364
+ const originalKey = originalKeyDescriptor?.get ? originalKeyDescriptor.get.call(event) : event.key;
7365
+ const isEnterKey = originalKey === "Enter" || isEnterCode(event.code);
7366
+ const isOverlayActive = isActivated() || isHoldingKeys();
7367
+ const shouldBlockEnter = isEnterKey && isOverlayActive && !isInputMode();
7368
+ if (shouldBlockEnter) {
7369
+ claimedEvents.add(event);
7370
+ event.preventDefault();
7371
+ event.stopPropagation();
7372
+ event.stopImmediatePropagation();
7373
+ return true;
7374
+ }
7375
+ return false;
7376
+ };
7377
+ document.addEventListener("keydown", blockEnterIfNeeded, {
7378
+ signal: eventListenerSignal,
7379
+ capture: true
7380
+ });
7381
+ document.addEventListener("keyup", blockEnterIfNeeded, {
7382
+ signal: eventListenerSignal,
7383
+ capture: true
7384
+ });
7385
+ document.addEventListener("keypress", blockEnterIfNeeded, {
7386
+ signal: eventListenerSignal,
7387
+ capture: true
7388
+ });
7344
7389
  window.addEventListener("keydown", (event) => {
7345
- if (isInputMode() || isEventFromOverlay(event, "data-react-grab-ignore-events")) {
7390
+ blockEnterIfNeeded(event);
7391
+ const isEnterToActivateInput = isEnterCode(event.code) && isHoldingKeys() && !isInputMode();
7392
+ if (isInputMode() && isTargetKeyCombination(event, options)) {
7393
+ event.preventDefault();
7394
+ event.stopPropagation();
7395
+ setIsInputMode(false);
7396
+ setInputText("");
7397
+ setIsToggleFrozen(false);
7398
+ setIsInputExpanded(false);
7399
+ return;
7400
+ }
7401
+ if (isInputMode() || isEventFromOverlay(event, "data-react-grab-ignore-events") && !isEnterToActivateInput) {
7346
7402
  if (event.key === "Escape" && agentManager.isProcessing()) {
7347
7403
  agentManager.abortAllSessions();
7348
7404
  }
@@ -7358,9 +7414,10 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7358
7414
  return;
7359
7415
  }
7360
7416
  }
7361
- if (event.key === "Enter" && isHoldingKeys() && !isInputMode()) {
7417
+ if (isEnterCode(event.code) && isHoldingKeys() && !isInputMode()) {
7362
7418
  event.preventDefault();
7363
7419
  event.stopPropagation();
7420
+ event.stopImmediatePropagation();
7364
7421
  const element = frozenElement() || targetElement();
7365
7422
  if (element) {
7366
7423
  const bounds = createElementBounds(element);
@@ -7368,6 +7425,10 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7368
7425
  setCopyStartX(mouseX());
7369
7426
  setCopyStartY(mouseY());
7370
7427
  setCopyOffsetFromCenterX(mouseX() - selectionCenterX);
7428
+ const cachedInput = elementInputCache.get(element);
7429
+ if (cachedInput) {
7430
+ setInputText(cachedInput);
7431
+ }
7371
7432
  }
7372
7433
  setIsToggleMode(true);
7373
7434
  setIsToggleFrozen(true);
@@ -7405,16 +7466,20 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7405
7466
  }
7406
7467
  if (!isTargetKeyCombination(event, options)) {
7407
7468
  if (isActivated() && !isToggleMode() && (event.metaKey || event.ctrlKey)) {
7408
- if (!MODIFIER_KEYS.includes(event.key) && event.key !== "Enter") {
7469
+ if (!MODIFIER_KEYS.includes(event.key) && !isEnterCode(event.code)) {
7409
7470
  deactivateRenderer();
7410
7471
  }
7411
7472
  }
7412
- if (event.key !== "Enter") {
7473
+ if (!isEnterCode(event.code) || !isHoldingKeys()) {
7413
7474
  return;
7414
7475
  }
7415
7476
  }
7416
7477
  if ((isActivated() || isHoldingKeys()) && !isInputMode()) {
7417
7478
  event.preventDefault();
7479
+ if (isEnterCode(event.code)) {
7480
+ event.stopPropagation();
7481
+ event.stopImmediatePropagation();
7482
+ }
7418
7483
  }
7419
7484
  if (isActivated()) {
7420
7485
  if (isToggleMode()) return;
@@ -7442,6 +7507,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7442
7507
  capture: true
7443
7508
  });
7444
7509
  window.addEventListener("keyup", (event) => {
7510
+ if (blockEnterIfNeeded(event)) return;
7445
7511
  if (!isHoldingKeys() && !isActivated()) return;
7446
7512
  if (isInputMode()) return;
7447
7513
  const hasCustomShortcut = Boolean(options.activationShortcut || options.activationKey);
@@ -7488,6 +7554,10 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7488
7554
  signal: eventListenerSignal,
7489
7555
  capture: true
7490
7556
  });
7557
+ window.addEventListener("keypress", blockEnterIfNeeded, {
7558
+ signal: eventListenerSignal,
7559
+ capture: true
7560
+ });
7491
7561
  window.addEventListener("mousemove", (event) => {
7492
7562
  setIsTouchMode(false);
7493
7563
  if (isEventFromOverlay(event, "data-react-grab-ignore-events")) return;
@@ -7496,6 +7566,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7496
7566
  signal: eventListenerSignal
7497
7567
  });
7498
7568
  window.addEventListener("mousedown", (event) => {
7569
+ if (event.button !== 0) return;
7499
7570
  if (isEventFromOverlay(event, "data-react-grab-ignore-events")) return;
7500
7571
  if (isInputMode()) {
7501
7572
  handleInputCancel();
@@ -7511,14 +7582,16 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7511
7582
  capture: true
7512
7583
  });
7513
7584
  window.addEventListener("pointerdown", (event) => {
7514
- if (!isRendererActive() || isCopying() || isInputMode()) return;
7585
+ if (event.button !== 0) return;
7515
7586
  if (isEventFromOverlay(event, "data-react-grab-ignore-events")) return;
7587
+ if (!isRendererActive() || isCopying() || isInputMode()) return;
7516
7588
  event.stopPropagation();
7517
7589
  }, {
7518
7590
  signal: eventListenerSignal,
7519
7591
  capture: true
7520
7592
  });
7521
7593
  window.addEventListener("mouseup", (event) => {
7594
+ if (event.button !== 0) return;
7522
7595
  handlePointerUp(event.clientX, event.clientY);
7523
7596
  }, {
7524
7597
  signal: eventListenerSignal
@@ -7596,6 +7669,10 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7596
7669
  }, {
7597
7670
  signal: eventListenerSignal
7598
7671
  });
7672
+ const boundsRecalcIntervalId = setInterval(() => {
7673
+ setViewportVersion((version) => version + 1);
7674
+ }, BOUNDS_RECALC_INTERVAL_MS);
7675
+ onCleanup(() => clearInterval(boundsRecalcIntervalId));
7599
7676
  document.addEventListener("copy", (event) => {
7600
7677
  if (isInputMode() || isEventFromOverlay(event, "data-react-grab-ignore-events")) {
7601
7678
  return;
@@ -7628,6 +7705,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7628
7705
  const range = currentSelection.getRangeAt(0);
7629
7706
  const rangeRect = range.getBoundingClientRect();
7630
7707
  if (rangeRect.width === 0 && rangeRect.height === 0) {
7708
+ clearNativeSelectionState();
7631
7709
  return;
7632
7710
  }
7633
7711
  const isBackward = (() => {
@@ -7639,6 +7717,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7639
7717
  })();
7640
7718
  const clientRects = range.getClientRects();
7641
7719
  if (clientRects.length === 0) {
7720
+ clearNativeSelectionState();
7642
7721
  return;
7643
7722
  }
7644
7723
  const cursorRect = isBackward ? clientRects[0] : clientRects[clientRects.length - 1];
@@ -7648,15 +7727,15 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7648
7727
  clearNativeSelectionState();
7649
7728
  return;
7650
7729
  }
7651
- setNativeSelectionCursorX(cursorX);
7652
- setNativeSelectionCursorY(cursorY);
7653
7730
  const container = range.commonAncestorContainer;
7654
7731
  const element = container.nodeType === Node.ELEMENT_NODE ? container : container.parentElement;
7655
7732
  if (element && isValidGrabbableElement(element)) {
7733
+ setNativeSelectionCursorX(cursorX);
7734
+ setNativeSelectionCursorY(cursorY);
7656
7735
  setNativeSelectionElements([element]);
7657
7736
  setHasNativeSelection(true);
7658
7737
  } else {
7659
- setNativeSelectionElements([]);
7738
+ clearNativeSelectionState();
7660
7739
  }
7661
7740
  }, 150);
7662
7741
  }, {
@@ -7670,10 +7749,14 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7670
7749
  stopProgressAnimation();
7671
7750
  document.body.style.userSelect = "";
7672
7751
  setCursorOverride(null);
7752
+ if (didPatchKeyboardEvent && originalKeyDescriptor) {
7753
+ Object.defineProperty(KeyboardEvent.prototype, "key", originalKeyDescriptor);
7754
+ }
7673
7755
  });
7674
7756
  const rendererRoot = mountRoot(styles_default);
7675
7757
  const selectionVisible = createMemo(() => {
7676
7758
  if (!theme().selectionBox.enabled) return false;
7759
+ if (didJustCopy()) return false;
7677
7760
  return isRendererActive() && !isDragging() && Boolean(targetElement());
7678
7761
  });
7679
7762
  const selectionTagName = createMemo(() => {
@@ -7688,7 +7771,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7688
7771
  });
7689
7772
  const selectionLabelVisible = createMemo(() => {
7690
7773
  if (!theme().elementLabel.enabled) return false;
7691
- if (successLabels().length > 0) return false;
7774
+ if (didJustCopy()) return false;
7692
7775
  return isRendererActive() && !isDragging() && Boolean(targetElement());
7693
7776
  });
7694
7777
  const computedLabelInstances = createMemo(() => {
@@ -7709,7 +7792,6 @@ ${plainTextContentOnly}` : plainTextContentOnly;
7709
7792
  if (!theme().elementLabel.enabled) return false;
7710
7793
  if (isInputMode()) return false;
7711
7794
  if (isCopying()) return true;
7712
- if (successLabels().length > 0) return false;
7713
7795
  return isRendererActive() && !isDragging() && Boolean(targetElement());
7714
7796
  });
7715
7797
  const crosshairVisible = createMemo(() => theme().crosshair.enabled && isRendererActive() && !isDragging() && !isTouchMode() && !isToggleFrozen());