react-grab 0.0.55 → 0.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-EAIY6I5Y.cjs → chunk-FXFNCH4T.cjs} +128 -279
- package/dist/{chunk-GQ7Z2X35.js → chunk-YLB7TBSB.js} +128 -279
- package/dist/{core-DeAAaVyA.d.cts → core-B9k7XYK9.d.cts} +0 -1
- package/dist/{core-DeAAaVyA.d.ts → core-B9k7XYK9.d.ts} +0 -1
- package/dist/core.cjs +9 -9
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.global.js +26 -26
- package/dist/index.js +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -751,7 +751,7 @@ 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 */\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-\\[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}}';
|
|
755
755
|
|
|
756
756
|
// src/utils/is-keyboard-event-triggered-by-input.ts
|
|
757
757
|
var FORM_TAGS_AND_ROLES = [
|
|
@@ -3370,9 +3370,7 @@ var getDefaultConfig = () => {
|
|
|
3370
3370
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
3371
3371
|
|
|
3372
3372
|
// src/utils/cn.ts
|
|
3373
|
-
var cn = (...inputs) =>
|
|
3374
|
-
return twMerge(clsx(inputs));
|
|
3375
|
-
};
|
|
3373
|
+
var cn = (...inputs) => twMerge(clsx(inputs));
|
|
3376
3374
|
|
|
3377
3375
|
// src/components/selection-box.tsx
|
|
3378
3376
|
var _tmpl$ = /* @__PURE__ */ template(`<div style=overflow:visible>`);
|
|
@@ -3709,13 +3707,12 @@ var _tmpl$72 = /* @__PURE__ */ template(`<div class="shrink-0 flex flex-col item
|
|
|
3709
3707
|
var _tmpl$82 = /* @__PURE__ */ template(`<div class="flex items-center gap-[3px]">`);
|
|
3710
3708
|
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
3709
|
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-[
|
|
3710
|
+
var _tmpl$1 = /* @__PURE__ */ template(`<div class="shrink-0 flex items-center gap-1 w-full h-[14px]"><span class="text-label-muted text-[12px] leading-3.5 shrink-0 tracking-[-0.04em] font-medium w-fit h-fit">to change`);
|
|
3713
3711
|
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-[
|
|
3712
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div class="shrink-0 flex justify-between items-start w-full min-h-[14px]"><textarea class="text-black text-[12px] 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
3713
|
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">`);
|
|
3716
3714
|
var ARROW_HEIGHT = 8;
|
|
3717
3715
|
var LABEL_GAP = 4;
|
|
3718
|
-
var IDLE_TIMEOUT_MS = 150;
|
|
3719
3716
|
var TagBadge = (props) => {
|
|
3720
3717
|
const [isHovered, setIsHovered] = createSignal(false);
|
|
3721
3718
|
const handleMouseEnter = () => {
|
|
@@ -3842,7 +3839,6 @@ var SelectionLabel = (props) => {
|
|
|
3842
3839
|
const [measuredHeight, setMeasuredHeight] = createSignal(0);
|
|
3843
3840
|
const [arrowPosition, setArrowPosition] = createSignal("bottom");
|
|
3844
3841
|
const [viewportVersion, setViewportVersion] = createSignal(0);
|
|
3845
|
-
const [isIdle, setIsIdle] = createSignal(false);
|
|
3846
3842
|
const isNotProcessing = () => props.status !== "copying" && props.status !== "copied" && props.status !== "fading";
|
|
3847
3843
|
const measureContainer = () => {
|
|
3848
3844
|
if (containerRef && !isTagCurrentlyHovered) {
|
|
@@ -3857,43 +3853,14 @@ var SelectionLabel = (props) => {
|
|
|
3857
3853
|
const handleViewportChange = () => {
|
|
3858
3854
|
setViewportVersion((version) => version + 1);
|
|
3859
3855
|
};
|
|
3860
|
-
let idleTimeout;
|
|
3861
|
-
const resetIdleTimer = () => {
|
|
3862
|
-
setIsIdle(false);
|
|
3863
|
-
if (idleTimeout) {
|
|
3864
|
-
clearTimeout(idleTimeout);
|
|
3865
|
-
}
|
|
3866
|
-
idleTimeout = setTimeout(() => {
|
|
3867
|
-
setIsIdle(true);
|
|
3868
|
-
}, IDLE_TIMEOUT_MS);
|
|
3869
|
-
};
|
|
3870
|
-
const handleGlobalKeyDown = (event) => {
|
|
3871
|
-
if (event.code === "Enter" && isIdle() && !props.isInputExpanded && isNotProcessing()) {
|
|
3872
|
-
event.preventDefault();
|
|
3873
|
-
event.stopPropagation();
|
|
3874
|
-
props.onToggleExpand?.();
|
|
3875
|
-
}
|
|
3876
|
-
};
|
|
3877
3856
|
onMount(() => {
|
|
3878
3857
|
measureContainer();
|
|
3879
3858
|
window.addEventListener("scroll", handleViewportChange, true);
|
|
3880
3859
|
window.addEventListener("resize", handleViewportChange);
|
|
3881
|
-
window.addEventListener("mousemove", resetIdleTimer);
|
|
3882
|
-
window.addEventListener("keydown", handleGlobalKeyDown, {
|
|
3883
|
-
capture: true
|
|
3884
|
-
});
|
|
3885
|
-
resetIdleTimer();
|
|
3886
3860
|
});
|
|
3887
3861
|
onCleanup(() => {
|
|
3888
3862
|
window.removeEventListener("scroll", handleViewportChange, true);
|
|
3889
3863
|
window.removeEventListener("resize", handleViewportChange);
|
|
3890
|
-
window.removeEventListener("mousemove", resetIdleTimer);
|
|
3891
|
-
window.removeEventListener("keydown", handleGlobalKeyDown, {
|
|
3892
|
-
capture: true
|
|
3893
|
-
});
|
|
3894
|
-
if (idleTimeout) {
|
|
3895
|
-
clearTimeout(idleTimeout);
|
|
3896
|
-
}
|
|
3897
3864
|
});
|
|
3898
3865
|
createEffect(() => {
|
|
3899
3866
|
if (props.visible) {
|
|
@@ -3901,7 +3868,7 @@ var SelectionLabel = (props) => {
|
|
|
3901
3868
|
}
|
|
3902
3869
|
});
|
|
3903
3870
|
createEffect(() => {
|
|
3904
|
-
void [props.status, props.isInputExpanded, props.inputValue
|
|
3871
|
+
void [props.status, props.isInputExpanded, props.inputValue];
|
|
3905
3872
|
requestAnimationFrame(measureContainer);
|
|
3906
3873
|
});
|
|
3907
3874
|
createEffect(() => {
|
|
@@ -4081,35 +4048,11 @@ var SelectionLabel = (props) => {
|
|
|
4081
4048
|
}), null);
|
|
4082
4049
|
insert(_el$1, createComponent(Show, {
|
|
4083
4050
|
get when() {
|
|
4084
|
-
return memo(() => !!
|
|
4085
|
-
},
|
|
4086
|
-
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, {
|
|
4100
|
-
onClick: handleSubmit,
|
|
4101
|
-
asButton: true
|
|
4102
|
-
}), null);
|
|
4103
|
-
return _el$13;
|
|
4104
|
-
}
|
|
4105
|
-
}), null);
|
|
4106
|
-
insert(_el$1, createComponent(Show, {
|
|
4107
|
-
get when() {
|
|
4108
|
-
return memo(() => !!(isNotProcessing() && isIdle()))() && !props.isInputExpanded;
|
|
4051
|
+
return memo(() => !!isNotProcessing())() && !props.isInputExpanded;
|
|
4109
4052
|
},
|
|
4110
4053
|
get children() {
|
|
4111
|
-
var _el$
|
|
4112
|
-
insert(_el$
|
|
4054
|
+
var _el$13 = _tmpl$10(), _el$14 = _el$13.firstChild;
|
|
4055
|
+
insert(_el$14, createComponent(TagBadge, {
|
|
4113
4056
|
get tagName() {
|
|
4114
4057
|
return tagDisplay();
|
|
4115
4058
|
},
|
|
@@ -4121,21 +4064,21 @@ var SelectionLabel = (props) => {
|
|
|
4121
4064
|
showMono: true,
|
|
4122
4065
|
shrink: true
|
|
4123
4066
|
}), null);
|
|
4124
|
-
insert(_el$
|
|
4067
|
+
insert(_el$14, createComponent(ClickToCopyPill, {
|
|
4125
4068
|
onClick: handleSubmit,
|
|
4126
4069
|
shrink: true
|
|
4127
4070
|
}), null);
|
|
4128
|
-
insert(_el$
|
|
4071
|
+
insert(_el$13, createComponent(BottomSection, {
|
|
4129
4072
|
get children() {
|
|
4130
|
-
var _el$
|
|
4131
|
-
insert(_el$
|
|
4132
|
-
size:
|
|
4073
|
+
var _el$15 = _tmpl$1(), _el$16 = _el$15.firstChild;
|
|
4074
|
+
insert(_el$15, createComponent(IconReturnKey, {
|
|
4075
|
+
size: 12,
|
|
4133
4076
|
"class": "shrink-0 text-black opacity-[0.65]"
|
|
4134
|
-
}), _el$
|
|
4135
|
-
return _el$
|
|
4077
|
+
}), _el$16);
|
|
4078
|
+
return _el$15;
|
|
4136
4079
|
}
|
|
4137
4080
|
}), null);
|
|
4138
|
-
return _el$
|
|
4081
|
+
return _el$13;
|
|
4139
4082
|
}
|
|
4140
4083
|
}), null);
|
|
4141
4084
|
insert(_el$1, createComponent(Show, {
|
|
@@ -4143,8 +4086,8 @@ var SelectionLabel = (props) => {
|
|
|
4143
4086
|
return memo(() => !!isNotProcessing())() && props.isInputExpanded;
|
|
4144
4087
|
},
|
|
4145
4088
|
get children() {
|
|
4146
|
-
var _el$
|
|
4147
|
-
insert(_el$
|
|
4089
|
+
var _el$17 = _tmpl$10(), _el$18 = _el$17.firstChild;
|
|
4090
|
+
insert(_el$18, createComponent(TagBadge, {
|
|
4148
4091
|
get tagName() {
|
|
4149
4092
|
return tagDisplay();
|
|
4150
4093
|
},
|
|
@@ -4156,32 +4099,32 @@ var SelectionLabel = (props) => {
|
|
|
4156
4099
|
showMono: true,
|
|
4157
4100
|
shrink: true
|
|
4158
4101
|
}), null);
|
|
4159
|
-
insert(_el$
|
|
4102
|
+
insert(_el$18, createComponent(ClickToCopyPill, {
|
|
4160
4103
|
onClick: handleSubmit,
|
|
4161
4104
|
dimmed: true,
|
|
4162
4105
|
shrink: true
|
|
4163
4106
|
}), null);
|
|
4164
|
-
insert(_el$
|
|
4107
|
+
insert(_el$17, createComponent(BottomSection, {
|
|
4165
4108
|
get children() {
|
|
4166
|
-
var _el$
|
|
4167
|
-
_el$
|
|
4168
|
-
_el$
|
|
4109
|
+
var _el$19 = _tmpl$11(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
|
|
4110
|
+
_el$20.$$keydown = handleKeyDown;
|
|
4111
|
+
_el$20.$$input = handleInput;
|
|
4169
4112
|
var _ref$2 = inputRef;
|
|
4170
|
-
typeof _ref$2 === "function" ? use(_ref$2, _el$
|
|
4171
|
-
_el$
|
|
4172
|
-
insert(_el$
|
|
4173
|
-
size:
|
|
4113
|
+
typeof _ref$2 === "function" ? use(_ref$2, _el$20) : inputRef = _el$20;
|
|
4114
|
+
_el$21.$$click = handleSubmit;
|
|
4115
|
+
insert(_el$21, createComponent(IconReturnKey, {
|
|
4116
|
+
size: 12,
|
|
4174
4117
|
"class": "shrink-0 text-black"
|
|
4175
4118
|
}));
|
|
4176
|
-
createRenderEffect(() => _el$
|
|
4177
|
-
return _el$
|
|
4119
|
+
createRenderEffect(() => _el$20.value = props.inputValue ?? "");
|
|
4120
|
+
return _el$19;
|
|
4178
4121
|
}
|
|
4179
4122
|
}), null);
|
|
4180
|
-
return _el$
|
|
4123
|
+
return _el$17;
|
|
4181
4124
|
}
|
|
4182
4125
|
}), null);
|
|
4183
4126
|
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" :
|
|
4127
|
+
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" : "0";
|
|
4185
4128
|
_v$3 !== _p$.e && setStyleProperty(_el$0, "top", _p$.e = _v$3);
|
|
4186
4129
|
_v$4 !== _p$.t && setStyleProperty(_el$0, "left", _p$.t = _v$4);
|
|
4187
4130
|
_v$5 !== _p$.a && setStyleProperty(_el$0, "pointer-events", _p$.a = _v$5);
|
|
@@ -5324,7 +5267,7 @@ var je2 = (e2) => {
|
|
|
5324
5267
|
var isCapitalized = (value) => value.length > 0 && /^[A-Z]/.test(value);
|
|
5325
5268
|
|
|
5326
5269
|
// src/instrumentation.ts
|
|
5327
|
-
var NEXT_INTERNAL_COMPONENT_NAMES = [
|
|
5270
|
+
var NEXT_INTERNAL_COMPONENT_NAMES = /* @__PURE__ */ new Set([
|
|
5328
5271
|
"InnerLayoutRouter",
|
|
5329
5272
|
"RedirectErrorBoundary",
|
|
5330
5273
|
"RedirectBoundary",
|
|
@@ -5338,28 +5281,23 @@ var NEXT_INTERNAL_COMPONENT_NAMES = [
|
|
|
5338
5281
|
"OuterLayoutRouter",
|
|
5339
5282
|
"body",
|
|
5340
5283
|
"html",
|
|
5341
|
-
"RedirectErrorBoundary",
|
|
5342
|
-
"RedirectBoundary",
|
|
5343
|
-
"HTTPAccessFallbackErrorBoundary",
|
|
5344
|
-
"HTTPAccessFallbackBoundary",
|
|
5345
5284
|
"DevRootHTTPAccessFallbackBoundary",
|
|
5346
5285
|
"AppDevOverlayErrorBoundary",
|
|
5347
5286
|
"AppDevOverlay",
|
|
5348
5287
|
"HotReload",
|
|
5349
5288
|
"Router",
|
|
5350
5289
|
"ErrorBoundaryHandler",
|
|
5351
|
-
"ErrorBoundary",
|
|
5352
5290
|
"AppRouter",
|
|
5353
5291
|
"ServerRoot",
|
|
5354
5292
|
"SegmentStateProvider",
|
|
5355
5293
|
"RootErrorBoundary"
|
|
5356
|
-
];
|
|
5294
|
+
]);
|
|
5357
5295
|
var checkIsNextProject = () => {
|
|
5358
5296
|
return Boolean(document.getElementById("__NEXT_DATA__"));
|
|
5359
5297
|
};
|
|
5360
5298
|
var checkIsInternalComponentName = (name) => {
|
|
5361
5299
|
if (name.startsWith("_")) return true;
|
|
5362
|
-
if (NEXT_INTERNAL_COMPONENT_NAMES.
|
|
5300
|
+
if (NEXT_INTERNAL_COMPONENT_NAMES.has(name)) return true;
|
|
5363
5301
|
return false;
|
|
5364
5302
|
};
|
|
5365
5303
|
var checkIsSourceComponentName = (name) => {
|
|
@@ -5903,81 +5841,43 @@ var DEFAULT_THEME = {
|
|
|
5903
5841
|
enabled: true
|
|
5904
5842
|
}
|
|
5905
5843
|
};
|
|
5906
|
-
var
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
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
|
-
};
|
|
5844
|
+
var mergeThemeWithBase = (baseTheme, partialTheme) => ({
|
|
5845
|
+
enabled: partialTheme.enabled ?? baseTheme.enabled,
|
|
5846
|
+
hue: partialTheme.hue ?? baseTheme.hue,
|
|
5847
|
+
selectionBox: {
|
|
5848
|
+
enabled: partialTheme.selectionBox?.enabled ?? baseTheme.selectionBox.enabled,
|
|
5849
|
+
color: partialTheme.selectionBox?.color ?? baseTheme.selectionBox.color,
|
|
5850
|
+
borderRadius: partialTheme.selectionBox?.borderRadius ?? baseTheme.selectionBox.borderRadius
|
|
5851
|
+
},
|
|
5852
|
+
dragBox: {
|
|
5853
|
+
enabled: partialTheme.dragBox?.enabled ?? baseTheme.dragBox.enabled,
|
|
5854
|
+
color: partialTheme.dragBox?.color ?? baseTheme.dragBox.color
|
|
5855
|
+
},
|
|
5856
|
+
grabbedBoxes: {
|
|
5857
|
+
enabled: partialTheme.grabbedBoxes?.enabled ?? baseTheme.grabbedBoxes.enabled,
|
|
5858
|
+
color: partialTheme.grabbedBoxes?.color ?? baseTheme.grabbedBoxes.color
|
|
5859
|
+
},
|
|
5860
|
+
elementLabel: {
|
|
5861
|
+
enabled: partialTheme.elementLabel?.enabled ?? baseTheme.elementLabel.enabled,
|
|
5862
|
+
backgroundColor: partialTheme.elementLabel?.backgroundColor ?? baseTheme.elementLabel.backgroundColor,
|
|
5863
|
+
textColor: partialTheme.elementLabel?.textColor ?? baseTheme.elementLabel.textColor,
|
|
5864
|
+
borderColor: partialTheme.elementLabel?.borderColor ?? baseTheme.elementLabel.borderColor,
|
|
5865
|
+
padding: partialTheme.elementLabel?.padding ?? baseTheme.elementLabel.padding,
|
|
5866
|
+
cursorOffset: partialTheme.elementLabel?.cursorOffset ?? baseTheme.elementLabel.cursorOffset
|
|
5867
|
+
},
|
|
5868
|
+
successLabels: {
|
|
5869
|
+
enabled: partialTheme.successLabels?.enabled ?? baseTheme.successLabels.enabled
|
|
5870
|
+
},
|
|
5871
|
+
crosshair: {
|
|
5872
|
+
enabled: partialTheme.crosshair?.enabled ?? baseTheme.crosshair.enabled,
|
|
5873
|
+
color: partialTheme.crosshair?.color ?? baseTheme.crosshair.color
|
|
5874
|
+
},
|
|
5875
|
+
inputOverlay: {
|
|
5876
|
+
enabled: partialTheme.inputOverlay?.enabled ?? baseTheme.inputOverlay.enabled
|
|
5877
|
+
}
|
|
5878
|
+
});
|
|
5879
|
+
var mergeTheme = (userTheme) => userTheme ? mergeThemeWithBase(DEFAULT_THEME, userTheme) : DEFAULT_THEME;
|
|
5880
|
+
var deepMergeTheme = mergeThemeWithBase;
|
|
5981
5881
|
|
|
5982
5882
|
// src/utils/agent-session.ts
|
|
5983
5883
|
var STORAGE_KEY = "react-grab:agent-sessions";
|
|
@@ -6311,7 +6211,7 @@ var init = (rawOptions) => {
|
|
|
6311
6211
|
hasInited = true;
|
|
6312
6212
|
const logIntro = () => {
|
|
6313
6213
|
try {
|
|
6314
|
-
const version = "0.0.
|
|
6214
|
+
const version = "0.0.56";
|
|
6315
6215
|
const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
|
|
6316
6216
|
console.log(`%cReact Grab${version ? ` v${version}` : ""}%c
|
|
6317
6217
|
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;`, "");
|
|
@@ -6364,8 +6264,48 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6364
6264
|
const [nativeSelectionCursorY, setNativeSelectionCursorY] = createSignal(OFFSCREEN_POSITION);
|
|
6365
6265
|
const [hasNativeSelection, setHasNativeSelection] = createSignal(false);
|
|
6366
6266
|
const [nativeSelectionElements, setNativeSelectionElements] = createSignal([]);
|
|
6367
|
-
const
|
|
6368
|
-
const
|
|
6267
|
+
const extractElementTagName = (element) => (element.tagName || "").toLowerCase();
|
|
6268
|
+
const nativeSelectionTagName = createMemo(() => {
|
|
6269
|
+
const elements = nativeSelectionElements();
|
|
6270
|
+
if (elements.length === 0 || !elements[0]) return void 0;
|
|
6271
|
+
return extractElementTagName(elements[0]) || void 0;
|
|
6272
|
+
});
|
|
6273
|
+
const nativeSelectionComponentName = createMemo(() => {
|
|
6274
|
+
const elements = nativeSelectionElements();
|
|
6275
|
+
if (elements.length === 0 || !elements[0]) return void 0;
|
|
6276
|
+
return getNearestComponentName(elements[0]) || void 0;
|
|
6277
|
+
});
|
|
6278
|
+
const clearNativeSelectionState = () => {
|
|
6279
|
+
setNativeSelectionCursorX(OFFSCREEN_POSITION);
|
|
6280
|
+
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
6281
|
+
setNativeSelectionElements([]);
|
|
6282
|
+
};
|
|
6283
|
+
const recalculateNativeSelectionCursor = () => {
|
|
6284
|
+
const currentSelection = window.getSelection();
|
|
6285
|
+
if (!currentSelection || currentSelection.isCollapsed || currentSelection.rangeCount === 0) {
|
|
6286
|
+
return;
|
|
6287
|
+
}
|
|
6288
|
+
const range = currentSelection.getRangeAt(0);
|
|
6289
|
+
const clientRects = range.getClientRects();
|
|
6290
|
+
if (clientRects.length === 0) return;
|
|
6291
|
+
const isBackward = (() => {
|
|
6292
|
+
if (!currentSelection.anchorNode || !currentSelection.focusNode) return false;
|
|
6293
|
+
const position = currentSelection.anchorNode.compareDocumentPosition(currentSelection.focusNode);
|
|
6294
|
+
if (position & Node.DOCUMENT_POSITION_FOLLOWING) return false;
|
|
6295
|
+
if (position & Node.DOCUMENT_POSITION_PRECEDING) return true;
|
|
6296
|
+
return currentSelection.anchorOffset > currentSelection.focusOffset;
|
|
6297
|
+
})();
|
|
6298
|
+
const cursorRect = isBackward ? clientRects[0] : clientRects[clientRects.length - 1];
|
|
6299
|
+
const cursorX = isBackward ? cursorRect.left : cursorRect.right;
|
|
6300
|
+
const cursorY = cursorRect.top + cursorRect.height / 2;
|
|
6301
|
+
setNativeSelectionCursorX(cursorX);
|
|
6302
|
+
setNativeSelectionCursorY(cursorY);
|
|
6303
|
+
};
|
|
6304
|
+
createEffect(on(() => viewportVersion(), () => {
|
|
6305
|
+
if (hasNativeSelection()) {
|
|
6306
|
+
recalculateNativeSelectionCursor();
|
|
6307
|
+
}
|
|
6308
|
+
}));
|
|
6369
6309
|
const nativeSelectionBounds = createMemo(() => {
|
|
6370
6310
|
viewportVersion();
|
|
6371
6311
|
const elements = nativeSelectionElements();
|
|
@@ -6417,7 +6357,6 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6417
6357
|
setSuccessLabels((previousLabels) => previousLabels.filter((label) => label.id !== labelId));
|
|
6418
6358
|
}, SUCCESS_LABEL_DURATION_MS);
|
|
6419
6359
|
};
|
|
6420
|
-
const extractElementTagName = (element) => (element.tagName || "").toLowerCase();
|
|
6421
6360
|
const extractElementTagNameForSuccess = (element) => {
|
|
6422
6361
|
const tagName = extractElementTagName(element);
|
|
6423
6362
|
return tagName ? `<${tagName}>` : "1 element";
|
|
@@ -6489,28 +6428,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6489
6428
|
const tryCopyWithFallback = async (elements, extraPrompt) => {
|
|
6490
6429
|
let didCopy = false;
|
|
6491
6430
|
let copiedContent = "";
|
|
6492
|
-
const isReactProject = Ee();
|
|
6493
6431
|
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
6432
|
try {
|
|
6515
6433
|
const elementSnippetResults = await Promise.allSettled(elements.map((element) => formatElementInfo(element)));
|
|
6516
6434
|
const elementSnippets = [];
|
|
@@ -6598,16 +6516,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6598
6516
|
viewportVersion();
|
|
6599
6517
|
const element = targetElement();
|
|
6600
6518
|
if (!element) return void 0;
|
|
6601
|
-
|
|
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
|
-
};
|
|
6519
|
+
return createElementBounds(element);
|
|
6611
6520
|
});
|
|
6612
6521
|
const calculateDragDistance = (endX, endY) => {
|
|
6613
6522
|
const endPageX = endX + window.scrollX;
|
|
@@ -6684,16 +6593,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6684
6593
|
return _el$10;
|
|
6685
6594
|
})();
|
|
6686
6595
|
});
|
|
6687
|
-
const
|
|
6688
|
-
return isCopying() ? {
|
|
6689
|
-
x: copyStartX(),
|
|
6690
|
-
y: copyStartY()
|
|
6691
|
-
} : {
|
|
6692
|
-
x: mouseX(),
|
|
6693
|
-
y: mouseY()
|
|
6694
|
-
};
|
|
6695
|
-
});
|
|
6696
|
-
const progressPosition = createMemo(() => isCopying() ? {
|
|
6596
|
+
const cursorPosition = createMemo(() => isCopying() ? {
|
|
6697
6597
|
x: copyStartX(),
|
|
6698
6598
|
y: copyStartY()
|
|
6699
6599
|
} : {
|
|
@@ -6772,7 +6672,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6772
6672
|
y: y2
|
|
6773
6673
|
});
|
|
6774
6674
|
}));
|
|
6775
|
-
createEffect(on(() => [labelVisible(), labelVariant(), labelContent(),
|
|
6675
|
+
createEffect(on(() => [labelVisible(), labelVariant(), labelContent(), cursorPosition()], ([visible, variant, content, position]) => {
|
|
6776
6676
|
const contentString = typeof content === "string" ? content : "";
|
|
6777
6677
|
options.onElementLabel?.(Boolean(visible), variant, {
|
|
6778
6678
|
x: position.x,
|
|
@@ -6924,32 +6824,19 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6924
6824
|
deactivateRenderer();
|
|
6925
6825
|
return;
|
|
6926
6826
|
}
|
|
6927
|
-
const
|
|
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
|
-
};
|
|
6827
|
+
const bounds = createElementBounds(element);
|
|
6937
6828
|
const currentX = bounds.x + bounds.width / 2;
|
|
6938
6829
|
const currentY = bounds.y + bounds.height / 2;
|
|
6939
6830
|
setMouseX(currentX);
|
|
6940
6831
|
setMouseY(currentY);
|
|
6941
6832
|
if (options.agent?.provider && prompt) {
|
|
6942
|
-
const positionX = mouseX();
|
|
6943
|
-
const positionY = mouseY();
|
|
6944
|
-
setInputText("");
|
|
6945
|
-
setIsInputMode(false);
|
|
6946
6833
|
deactivateRenderer();
|
|
6947
6834
|
void agentManager.startSession({
|
|
6948
6835
|
element,
|
|
6949
6836
|
prompt,
|
|
6950
6837
|
position: {
|
|
6951
|
-
x:
|
|
6952
|
-
y:
|
|
6838
|
+
x: currentX,
|
|
6839
|
+
y: currentY
|
|
6953
6840
|
},
|
|
6954
6841
|
selectionBounds: bounds
|
|
6955
6842
|
});
|
|
@@ -6980,11 +6867,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6980
6867
|
const bounds = nativeSelectionBounds();
|
|
6981
6868
|
const tagName = nativeSelectionTagName();
|
|
6982
6869
|
setHasNativeSelection(false);
|
|
6983
|
-
|
|
6984
|
-
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
6985
|
-
setNativeSelectionElements([]);
|
|
6986
|
-
setNativeSelectionTagName(void 0);
|
|
6987
|
-
setNativeSelectionComponentName(void 0);
|
|
6870
|
+
clearNativeSelectionState();
|
|
6988
6871
|
window.getSelection()?.removeAllRanges();
|
|
6989
6872
|
if (elements.length === 1) {
|
|
6990
6873
|
await executeCopyOperation(currentX, currentY, () => copySingleElementToClipboard(elements[0]), bounds, tagName);
|
|
@@ -6999,11 +6882,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6999
6882
|
const currentX = bounds ? bounds.x + bounds.width / 2 : nativeSelectionCursorX();
|
|
7000
6883
|
const currentY = bounds ? bounds.y + bounds.height / 2 : nativeSelectionCursorY();
|
|
7001
6884
|
setHasNativeSelection(false);
|
|
7002
|
-
|
|
7003
|
-
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
7004
|
-
setNativeSelectionElements([]);
|
|
7005
|
-
setNativeSelectionTagName(void 0);
|
|
7006
|
-
setNativeSelectionComponentName(void 0);
|
|
6885
|
+
clearNativeSelectionState();
|
|
7007
6886
|
window.getSelection()?.removeAllRanges();
|
|
7008
6887
|
setMouseX(currentX);
|
|
7009
6888
|
setMouseY(currentY);
|
|
@@ -7081,16 +6960,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7081
6960
|
const element = getElementAtPosition(clientX, clientY);
|
|
7082
6961
|
if (!element) return;
|
|
7083
6962
|
setLastGrabbedElement(element);
|
|
7084
|
-
const
|
|
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
|
-
};
|
|
6963
|
+
const bounds = createElementBounds(element);
|
|
7094
6964
|
const tagName = extractElementTagName(element);
|
|
7095
6965
|
void executeCopyOperation(clientX, clientY, () => copySingleElementToClipboard(element), bounds, tagName, element);
|
|
7096
6966
|
}
|
|
@@ -7363,11 +7233,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7363
7233
|
setHasNativeSelection(false);
|
|
7364
7234
|
const selection = window.getSelection();
|
|
7365
7235
|
if (!selection || selection.isCollapsed || selection.rangeCount === 0) {
|
|
7366
|
-
|
|
7367
|
-
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
7368
|
-
setNativeSelectionElements([]);
|
|
7369
|
-
setNativeSelectionTagName(void 0);
|
|
7370
|
-
setNativeSelectionComponentName(void 0);
|
|
7236
|
+
clearNativeSelectionState();
|
|
7371
7237
|
return;
|
|
7372
7238
|
}
|
|
7373
7239
|
selectionDebounceTimerId = window.setTimeout(() => {
|
|
@@ -7396,11 +7262,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7396
7262
|
const cursorX = isBackward ? cursorRect.left : cursorRect.right;
|
|
7397
7263
|
const cursorY = cursorRect.top + cursorRect.height / 2;
|
|
7398
7264
|
if (isSelectionInsideEditableElement(cursorX, cursorY)) {
|
|
7399
|
-
|
|
7400
|
-
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
7401
|
-
setNativeSelectionElements([]);
|
|
7402
|
-
setNativeSelectionTagName(void 0);
|
|
7403
|
-
setNativeSelectionComponentName(void 0);
|
|
7265
|
+
clearNativeSelectionState();
|
|
7404
7266
|
return;
|
|
7405
7267
|
}
|
|
7406
7268
|
setNativeSelectionCursorX(cursorX);
|
|
@@ -7409,13 +7271,9 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7409
7271
|
const element = container.nodeType === Node.ELEMENT_NODE ? container : container.parentElement;
|
|
7410
7272
|
if (element && isValidGrabbableElement(element)) {
|
|
7411
7273
|
setNativeSelectionElements([element]);
|
|
7412
|
-
setNativeSelectionTagName(extractElementTagName(element) || void 0);
|
|
7413
|
-
setNativeSelectionComponentName(getNearestComponentName(element) || void 0);
|
|
7414
7274
|
setHasNativeSelection(true);
|
|
7415
7275
|
} else {
|
|
7416
7276
|
setNativeSelectionElements([]);
|
|
7417
|
-
setNativeSelectionTagName(void 0);
|
|
7418
|
-
setNativeSelectionComponentName(void 0);
|
|
7419
7277
|
}
|
|
7420
7278
|
}, 150);
|
|
7421
7279
|
}, {
|
|
@@ -7451,18 +7309,9 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7451
7309
|
if (!instance.element || !document.body.contains(instance.element)) {
|
|
7452
7310
|
return instance;
|
|
7453
7311
|
}
|
|
7454
|
-
const elementRect = instance.element.getBoundingClientRect();
|
|
7455
|
-
const computedStyle = window.getComputedStyle(instance.element);
|
|
7456
7312
|
return {
|
|
7457
7313
|
...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
|
-
}
|
|
7314
|
+
bounds: createElementBounds(instance.element)
|
|
7466
7315
|
};
|
|
7467
7316
|
});
|
|
7468
7317
|
});
|
|
@@ -7521,10 +7370,10 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7521
7370
|
},
|
|
7522
7371
|
labelZIndex: Z_INDEX_LABEL,
|
|
7523
7372
|
get mouseX() {
|
|
7524
|
-
return
|
|
7373
|
+
return cursorPosition().x;
|
|
7525
7374
|
},
|
|
7526
7375
|
get mouseY() {
|
|
7527
|
-
return
|
|
7376
|
+
return cursorPosition().y;
|
|
7528
7377
|
},
|
|
7529
7378
|
get crosshairVisible() {
|
|
7530
7379
|
return crosshairVisible();
|