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
|
@@ -749,7 +749,7 @@ function cleanChildren(parent, current, marker, replacement) {
|
|
|
749
749
|
}
|
|
750
750
|
|
|
751
751
|
// dist/styles.css
|
|
752
|
-
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}}';
|
|
752
|
+
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}}';
|
|
753
753
|
|
|
754
754
|
// src/utils/is-keyboard-event-triggered-by-input.ts
|
|
755
755
|
var FORM_TAGS_AND_ROLES = [
|
|
@@ -3368,9 +3368,7 @@ var getDefaultConfig = () => {
|
|
|
3368
3368
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
3369
3369
|
|
|
3370
3370
|
// src/utils/cn.ts
|
|
3371
|
-
var cn = (...inputs) =>
|
|
3372
|
-
return twMerge(clsx(inputs));
|
|
3373
|
-
};
|
|
3371
|
+
var cn = (...inputs) => twMerge(clsx(inputs));
|
|
3374
3372
|
|
|
3375
3373
|
// src/components/selection-box.tsx
|
|
3376
3374
|
var _tmpl$ = /* @__PURE__ */ template(`<div style=overflow:visible>`);
|
|
@@ -3707,13 +3705,12 @@ var _tmpl$72 = /* @__PURE__ */ template(`<div class="shrink-0 flex flex-col item
|
|
|
3707
3705
|
var _tmpl$82 = /* @__PURE__ */ template(`<div class="flex items-center gap-[3px]">`);
|
|
3708
3706
|
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>`);
|
|
3709
3707
|
var _tmpl$0 = /* @__PURE__ */ template(`<div class="flex items-center gap-[3px] react-grab-shimmer rounded-[3px]">`);
|
|
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-[
|
|
3708
|
+
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`);
|
|
3711
3709
|
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">`);
|
|
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-[
|
|
3710
|
+
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]">`);
|
|
3713
3711
|
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">`);
|
|
3714
3712
|
var ARROW_HEIGHT = 8;
|
|
3715
3713
|
var LABEL_GAP = 4;
|
|
3716
|
-
var IDLE_TIMEOUT_MS = 150;
|
|
3717
3714
|
var TagBadge = (props) => {
|
|
3718
3715
|
const [isHovered, setIsHovered] = createSignal(false);
|
|
3719
3716
|
const handleMouseEnter = () => {
|
|
@@ -3840,7 +3837,6 @@ var SelectionLabel = (props) => {
|
|
|
3840
3837
|
const [measuredHeight, setMeasuredHeight] = createSignal(0);
|
|
3841
3838
|
const [arrowPosition, setArrowPosition] = createSignal("bottom");
|
|
3842
3839
|
const [viewportVersion, setViewportVersion] = createSignal(0);
|
|
3843
|
-
const [isIdle, setIsIdle] = createSignal(false);
|
|
3844
3840
|
const isNotProcessing = () => props.status !== "copying" && props.status !== "copied" && props.status !== "fading";
|
|
3845
3841
|
const measureContainer = () => {
|
|
3846
3842
|
if (containerRef && !isTagCurrentlyHovered) {
|
|
@@ -3855,43 +3851,14 @@ var SelectionLabel = (props) => {
|
|
|
3855
3851
|
const handleViewportChange = () => {
|
|
3856
3852
|
setViewportVersion((version) => version + 1);
|
|
3857
3853
|
};
|
|
3858
|
-
let idleTimeout;
|
|
3859
|
-
const resetIdleTimer = () => {
|
|
3860
|
-
setIsIdle(false);
|
|
3861
|
-
if (idleTimeout) {
|
|
3862
|
-
clearTimeout(idleTimeout);
|
|
3863
|
-
}
|
|
3864
|
-
idleTimeout = setTimeout(() => {
|
|
3865
|
-
setIsIdle(true);
|
|
3866
|
-
}, IDLE_TIMEOUT_MS);
|
|
3867
|
-
};
|
|
3868
|
-
const handleGlobalKeyDown = (event) => {
|
|
3869
|
-
if (event.code === "Enter" && isIdle() && !props.isInputExpanded && isNotProcessing()) {
|
|
3870
|
-
event.preventDefault();
|
|
3871
|
-
event.stopPropagation();
|
|
3872
|
-
props.onToggleExpand?.();
|
|
3873
|
-
}
|
|
3874
|
-
};
|
|
3875
3854
|
onMount(() => {
|
|
3876
3855
|
measureContainer();
|
|
3877
3856
|
window.addEventListener("scroll", handleViewportChange, true);
|
|
3878
3857
|
window.addEventListener("resize", handleViewportChange);
|
|
3879
|
-
window.addEventListener("mousemove", resetIdleTimer);
|
|
3880
|
-
window.addEventListener("keydown", handleGlobalKeyDown, {
|
|
3881
|
-
capture: true
|
|
3882
|
-
});
|
|
3883
|
-
resetIdleTimer();
|
|
3884
3858
|
});
|
|
3885
3859
|
onCleanup(() => {
|
|
3886
3860
|
window.removeEventListener("scroll", handleViewportChange, true);
|
|
3887
3861
|
window.removeEventListener("resize", handleViewportChange);
|
|
3888
|
-
window.removeEventListener("mousemove", resetIdleTimer);
|
|
3889
|
-
window.removeEventListener("keydown", handleGlobalKeyDown, {
|
|
3890
|
-
capture: true
|
|
3891
|
-
});
|
|
3892
|
-
if (idleTimeout) {
|
|
3893
|
-
clearTimeout(idleTimeout);
|
|
3894
|
-
}
|
|
3895
3862
|
});
|
|
3896
3863
|
createEffect(() => {
|
|
3897
3864
|
if (props.visible) {
|
|
@@ -3899,7 +3866,7 @@ var SelectionLabel = (props) => {
|
|
|
3899
3866
|
}
|
|
3900
3867
|
});
|
|
3901
3868
|
createEffect(() => {
|
|
3902
|
-
void [props.status, props.isInputExpanded, props.inputValue
|
|
3869
|
+
void [props.status, props.isInputExpanded, props.inputValue];
|
|
3903
3870
|
requestAnimationFrame(measureContainer);
|
|
3904
3871
|
});
|
|
3905
3872
|
createEffect(() => {
|
|
@@ -4079,35 +4046,11 @@ var SelectionLabel = (props) => {
|
|
|
4079
4046
|
}), null);
|
|
4080
4047
|
insert(_el$1, createComponent(Show, {
|
|
4081
4048
|
get when() {
|
|
4082
|
-
return memo(() => !!
|
|
4083
|
-
},
|
|
4084
|
-
get children() {
|
|
4085
|
-
var _el$13 = _tmpl$82();
|
|
4086
|
-
insert(_el$13, createComponent(TagBadge, {
|
|
4087
|
-
get tagName() {
|
|
4088
|
-
return tagDisplay();
|
|
4089
|
-
},
|
|
4090
|
-
get isClickable() {
|
|
4091
|
-
return isTagClickable();
|
|
4092
|
-
},
|
|
4093
|
-
onClick: handleTagClick,
|
|
4094
|
-
onHoverChange: handleTagHoverChange,
|
|
4095
|
-
showMono: true
|
|
4096
|
-
}), null);
|
|
4097
|
-
insert(_el$13, createComponent(ClickToCopyPill, {
|
|
4098
|
-
onClick: handleSubmit,
|
|
4099
|
-
asButton: true
|
|
4100
|
-
}), null);
|
|
4101
|
-
return _el$13;
|
|
4102
|
-
}
|
|
4103
|
-
}), null);
|
|
4104
|
-
insert(_el$1, createComponent(Show, {
|
|
4105
|
-
get when() {
|
|
4106
|
-
return memo(() => !!(isNotProcessing() && isIdle()))() && !props.isInputExpanded;
|
|
4049
|
+
return memo(() => !!isNotProcessing())() && !props.isInputExpanded;
|
|
4107
4050
|
},
|
|
4108
4051
|
get children() {
|
|
4109
|
-
var _el$
|
|
4110
|
-
insert(_el$
|
|
4052
|
+
var _el$13 = _tmpl$10(), _el$14 = _el$13.firstChild;
|
|
4053
|
+
insert(_el$14, createComponent(TagBadge, {
|
|
4111
4054
|
get tagName() {
|
|
4112
4055
|
return tagDisplay();
|
|
4113
4056
|
},
|
|
@@ -4119,21 +4062,21 @@ var SelectionLabel = (props) => {
|
|
|
4119
4062
|
showMono: true,
|
|
4120
4063
|
shrink: true
|
|
4121
4064
|
}), null);
|
|
4122
|
-
insert(_el$
|
|
4065
|
+
insert(_el$14, createComponent(ClickToCopyPill, {
|
|
4123
4066
|
onClick: handleSubmit,
|
|
4124
4067
|
shrink: true
|
|
4125
4068
|
}), null);
|
|
4126
|
-
insert(_el$
|
|
4069
|
+
insert(_el$13, createComponent(BottomSection, {
|
|
4127
4070
|
get children() {
|
|
4128
|
-
var _el$
|
|
4129
|
-
insert(_el$
|
|
4130
|
-
size:
|
|
4071
|
+
var _el$15 = _tmpl$1(), _el$16 = _el$15.firstChild;
|
|
4072
|
+
insert(_el$15, createComponent(IconReturnKey, {
|
|
4073
|
+
size: 12,
|
|
4131
4074
|
"class": "shrink-0 text-black opacity-[0.65]"
|
|
4132
|
-
}), _el$
|
|
4133
|
-
return _el$
|
|
4075
|
+
}), _el$16);
|
|
4076
|
+
return _el$15;
|
|
4134
4077
|
}
|
|
4135
4078
|
}), null);
|
|
4136
|
-
return _el$
|
|
4079
|
+
return _el$13;
|
|
4137
4080
|
}
|
|
4138
4081
|
}), null);
|
|
4139
4082
|
insert(_el$1, createComponent(Show, {
|
|
@@ -4141,8 +4084,8 @@ var SelectionLabel = (props) => {
|
|
|
4141
4084
|
return memo(() => !!isNotProcessing())() && props.isInputExpanded;
|
|
4142
4085
|
},
|
|
4143
4086
|
get children() {
|
|
4144
|
-
var _el$
|
|
4145
|
-
insert(_el$
|
|
4087
|
+
var _el$17 = _tmpl$10(), _el$18 = _el$17.firstChild;
|
|
4088
|
+
insert(_el$18, createComponent(TagBadge, {
|
|
4146
4089
|
get tagName() {
|
|
4147
4090
|
return tagDisplay();
|
|
4148
4091
|
},
|
|
@@ -4154,32 +4097,32 @@ var SelectionLabel = (props) => {
|
|
|
4154
4097
|
showMono: true,
|
|
4155
4098
|
shrink: true
|
|
4156
4099
|
}), null);
|
|
4157
|
-
insert(_el$
|
|
4100
|
+
insert(_el$18, createComponent(ClickToCopyPill, {
|
|
4158
4101
|
onClick: handleSubmit,
|
|
4159
4102
|
dimmed: true,
|
|
4160
4103
|
shrink: true
|
|
4161
4104
|
}), null);
|
|
4162
|
-
insert(_el$
|
|
4105
|
+
insert(_el$17, createComponent(BottomSection, {
|
|
4163
4106
|
get children() {
|
|
4164
|
-
var _el$
|
|
4165
|
-
_el$
|
|
4166
|
-
_el$
|
|
4107
|
+
var _el$19 = _tmpl$11(), _el$20 = _el$19.firstChild, _el$21 = _el$20.nextSibling;
|
|
4108
|
+
_el$20.$$keydown = handleKeyDown;
|
|
4109
|
+
_el$20.$$input = handleInput;
|
|
4167
4110
|
var _ref$2 = inputRef;
|
|
4168
|
-
typeof _ref$2 === "function" ? use(_ref$2, _el$
|
|
4169
|
-
_el$
|
|
4170
|
-
insert(_el$
|
|
4171
|
-
size:
|
|
4111
|
+
typeof _ref$2 === "function" ? use(_ref$2, _el$20) : inputRef = _el$20;
|
|
4112
|
+
_el$21.$$click = handleSubmit;
|
|
4113
|
+
insert(_el$21, createComponent(IconReturnKey, {
|
|
4114
|
+
size: 12,
|
|
4172
4115
|
"class": "shrink-0 text-black"
|
|
4173
4116
|
}));
|
|
4174
|
-
createRenderEffect(() => _el$
|
|
4175
|
-
return _el$
|
|
4117
|
+
createRenderEffect(() => _el$20.value = props.inputValue ?? "");
|
|
4118
|
+
return _el$19;
|
|
4176
4119
|
}
|
|
4177
4120
|
}), null);
|
|
4178
|
-
return _el$
|
|
4121
|
+
return _el$17;
|
|
4179
4122
|
}
|
|
4180
4123
|
}), null);
|
|
4181
4124
|
createRenderEffect((_p$) => {
|
|
4182
|
-
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" :
|
|
4125
|
+
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";
|
|
4183
4126
|
_v$3 !== _p$.e && setStyleProperty(_el$0, "top", _p$.e = _v$3);
|
|
4184
4127
|
_v$4 !== _p$.t && setStyleProperty(_el$0, "left", _p$.t = _v$4);
|
|
4185
4128
|
_v$5 !== _p$.a && setStyleProperty(_el$0, "pointer-events", _p$.a = _v$5);
|
|
@@ -5322,7 +5265,7 @@ var je2 = (e2) => {
|
|
|
5322
5265
|
var isCapitalized = (value) => value.length > 0 && /^[A-Z]/.test(value);
|
|
5323
5266
|
|
|
5324
5267
|
// src/instrumentation.ts
|
|
5325
|
-
var NEXT_INTERNAL_COMPONENT_NAMES = [
|
|
5268
|
+
var NEXT_INTERNAL_COMPONENT_NAMES = /* @__PURE__ */ new Set([
|
|
5326
5269
|
"InnerLayoutRouter",
|
|
5327
5270
|
"RedirectErrorBoundary",
|
|
5328
5271
|
"RedirectBoundary",
|
|
@@ -5336,28 +5279,23 @@ var NEXT_INTERNAL_COMPONENT_NAMES = [
|
|
|
5336
5279
|
"OuterLayoutRouter",
|
|
5337
5280
|
"body",
|
|
5338
5281
|
"html",
|
|
5339
|
-
"RedirectErrorBoundary",
|
|
5340
|
-
"RedirectBoundary",
|
|
5341
|
-
"HTTPAccessFallbackErrorBoundary",
|
|
5342
|
-
"HTTPAccessFallbackBoundary",
|
|
5343
5282
|
"DevRootHTTPAccessFallbackBoundary",
|
|
5344
5283
|
"AppDevOverlayErrorBoundary",
|
|
5345
5284
|
"AppDevOverlay",
|
|
5346
5285
|
"HotReload",
|
|
5347
5286
|
"Router",
|
|
5348
5287
|
"ErrorBoundaryHandler",
|
|
5349
|
-
"ErrorBoundary",
|
|
5350
5288
|
"AppRouter",
|
|
5351
5289
|
"ServerRoot",
|
|
5352
5290
|
"SegmentStateProvider",
|
|
5353
5291
|
"RootErrorBoundary"
|
|
5354
|
-
];
|
|
5292
|
+
]);
|
|
5355
5293
|
var checkIsNextProject = () => {
|
|
5356
5294
|
return Boolean(document.getElementById("__NEXT_DATA__"));
|
|
5357
5295
|
};
|
|
5358
5296
|
var checkIsInternalComponentName = (name) => {
|
|
5359
5297
|
if (name.startsWith("_")) return true;
|
|
5360
|
-
if (NEXT_INTERNAL_COMPONENT_NAMES.
|
|
5298
|
+
if (NEXT_INTERNAL_COMPONENT_NAMES.has(name)) return true;
|
|
5361
5299
|
return false;
|
|
5362
5300
|
};
|
|
5363
5301
|
var checkIsSourceComponentName = (name) => {
|
|
@@ -5901,81 +5839,43 @@ var DEFAULT_THEME = {
|
|
|
5901
5839
|
enabled: true
|
|
5902
5840
|
}
|
|
5903
5841
|
};
|
|
5904
|
-
var
|
|
5905
|
-
|
|
5906
|
-
|
|
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
|
-
var deepMergeTheme = (baseTheme, partialTheme) => {
|
|
5943
|
-
return {
|
|
5944
|
-
enabled: partialTheme.enabled ?? baseTheme.enabled,
|
|
5945
|
-
hue: partialTheme.hue ?? baseTheme.hue,
|
|
5946
|
-
selectionBox: {
|
|
5947
|
-
enabled: partialTheme.selectionBox?.enabled ?? baseTheme.selectionBox.enabled,
|
|
5948
|
-
color: partialTheme.selectionBox?.color ?? baseTheme.selectionBox.color,
|
|
5949
|
-
borderRadius: partialTheme.selectionBox?.borderRadius ?? baseTheme.selectionBox.borderRadius
|
|
5950
|
-
},
|
|
5951
|
-
dragBox: {
|
|
5952
|
-
enabled: partialTheme.dragBox?.enabled ?? baseTheme.dragBox.enabled,
|
|
5953
|
-
color: partialTheme.dragBox?.color ?? baseTheme.dragBox.color
|
|
5954
|
-
},
|
|
5955
|
-
grabbedBoxes: {
|
|
5956
|
-
enabled: partialTheme.grabbedBoxes?.enabled ?? baseTheme.grabbedBoxes.enabled,
|
|
5957
|
-
color: partialTheme.grabbedBoxes?.color ?? baseTheme.grabbedBoxes.color
|
|
5958
|
-
},
|
|
5959
|
-
elementLabel: {
|
|
5960
|
-
enabled: partialTheme.elementLabel?.enabled ?? baseTheme.elementLabel.enabled,
|
|
5961
|
-
backgroundColor: partialTheme.elementLabel?.backgroundColor ?? baseTheme.elementLabel.backgroundColor,
|
|
5962
|
-
textColor: partialTheme.elementLabel?.textColor ?? baseTheme.elementLabel.textColor,
|
|
5963
|
-
borderColor: partialTheme.elementLabel?.borderColor ?? baseTheme.elementLabel.borderColor,
|
|
5964
|
-
padding: partialTheme.elementLabel?.padding ?? baseTheme.elementLabel.padding,
|
|
5965
|
-
cursorOffset: partialTheme.elementLabel?.cursorOffset ?? baseTheme.elementLabel.cursorOffset
|
|
5966
|
-
},
|
|
5967
|
-
successLabels: {
|
|
5968
|
-
enabled: partialTheme.successLabels?.enabled ?? baseTheme.successLabels.enabled
|
|
5969
|
-
},
|
|
5970
|
-
crosshair: {
|
|
5971
|
-
enabled: partialTheme.crosshair?.enabled ?? baseTheme.crosshair.enabled,
|
|
5972
|
-
color: partialTheme.crosshair?.color ?? baseTheme.crosshair.color
|
|
5973
|
-
},
|
|
5974
|
-
inputOverlay: {
|
|
5975
|
-
enabled: partialTheme.inputOverlay?.enabled ?? baseTheme.inputOverlay.enabled
|
|
5976
|
-
}
|
|
5977
|
-
};
|
|
5978
|
-
};
|
|
5842
|
+
var mergeThemeWithBase = (baseTheme, partialTheme) => ({
|
|
5843
|
+
enabled: partialTheme.enabled ?? baseTheme.enabled,
|
|
5844
|
+
hue: partialTheme.hue ?? baseTheme.hue,
|
|
5845
|
+
selectionBox: {
|
|
5846
|
+
enabled: partialTheme.selectionBox?.enabled ?? baseTheme.selectionBox.enabled,
|
|
5847
|
+
color: partialTheme.selectionBox?.color ?? baseTheme.selectionBox.color,
|
|
5848
|
+
borderRadius: partialTheme.selectionBox?.borderRadius ?? baseTheme.selectionBox.borderRadius
|
|
5849
|
+
},
|
|
5850
|
+
dragBox: {
|
|
5851
|
+
enabled: partialTheme.dragBox?.enabled ?? baseTheme.dragBox.enabled,
|
|
5852
|
+
color: partialTheme.dragBox?.color ?? baseTheme.dragBox.color
|
|
5853
|
+
},
|
|
5854
|
+
grabbedBoxes: {
|
|
5855
|
+
enabled: partialTheme.grabbedBoxes?.enabled ?? baseTheme.grabbedBoxes.enabled,
|
|
5856
|
+
color: partialTheme.grabbedBoxes?.color ?? baseTheme.grabbedBoxes.color
|
|
5857
|
+
},
|
|
5858
|
+
elementLabel: {
|
|
5859
|
+
enabled: partialTheme.elementLabel?.enabled ?? baseTheme.elementLabel.enabled,
|
|
5860
|
+
backgroundColor: partialTheme.elementLabel?.backgroundColor ?? baseTheme.elementLabel.backgroundColor,
|
|
5861
|
+
textColor: partialTheme.elementLabel?.textColor ?? baseTheme.elementLabel.textColor,
|
|
5862
|
+
borderColor: partialTheme.elementLabel?.borderColor ?? baseTheme.elementLabel.borderColor,
|
|
5863
|
+
padding: partialTheme.elementLabel?.padding ?? baseTheme.elementLabel.padding,
|
|
5864
|
+
cursorOffset: partialTheme.elementLabel?.cursorOffset ?? baseTheme.elementLabel.cursorOffset
|
|
5865
|
+
},
|
|
5866
|
+
successLabels: {
|
|
5867
|
+
enabled: partialTheme.successLabels?.enabled ?? baseTheme.successLabels.enabled
|
|
5868
|
+
},
|
|
5869
|
+
crosshair: {
|
|
5870
|
+
enabled: partialTheme.crosshair?.enabled ?? baseTheme.crosshair.enabled,
|
|
5871
|
+
color: partialTheme.crosshair?.color ?? baseTheme.crosshair.color
|
|
5872
|
+
},
|
|
5873
|
+
inputOverlay: {
|
|
5874
|
+
enabled: partialTheme.inputOverlay?.enabled ?? baseTheme.inputOverlay.enabled
|
|
5875
|
+
}
|
|
5876
|
+
});
|
|
5877
|
+
var mergeTheme = (userTheme) => userTheme ? mergeThemeWithBase(DEFAULT_THEME, userTheme) : DEFAULT_THEME;
|
|
5878
|
+
var deepMergeTheme = mergeThemeWithBase;
|
|
5979
5879
|
|
|
5980
5880
|
// src/utils/agent-session.ts
|
|
5981
5881
|
var STORAGE_KEY = "react-grab:agent-sessions";
|
|
@@ -6309,7 +6209,7 @@ var init = (rawOptions) => {
|
|
|
6309
6209
|
hasInited = true;
|
|
6310
6210
|
const logIntro = () => {
|
|
6311
6211
|
try {
|
|
6312
|
-
const version = "0.0.
|
|
6212
|
+
const version = "0.0.56";
|
|
6313
6213
|
const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
|
|
6314
6214
|
console.log(`%cReact Grab${version ? ` v${version}` : ""}%c
|
|
6315
6215
|
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;`, "");
|
|
@@ -6362,8 +6262,48 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6362
6262
|
const [nativeSelectionCursorY, setNativeSelectionCursorY] = createSignal(OFFSCREEN_POSITION);
|
|
6363
6263
|
const [hasNativeSelection, setHasNativeSelection] = createSignal(false);
|
|
6364
6264
|
const [nativeSelectionElements, setNativeSelectionElements] = createSignal([]);
|
|
6365
|
-
const
|
|
6366
|
-
const
|
|
6265
|
+
const extractElementTagName = (element) => (element.tagName || "").toLowerCase();
|
|
6266
|
+
const nativeSelectionTagName = createMemo(() => {
|
|
6267
|
+
const elements = nativeSelectionElements();
|
|
6268
|
+
if (elements.length === 0 || !elements[0]) return void 0;
|
|
6269
|
+
return extractElementTagName(elements[0]) || void 0;
|
|
6270
|
+
});
|
|
6271
|
+
const nativeSelectionComponentName = createMemo(() => {
|
|
6272
|
+
const elements = nativeSelectionElements();
|
|
6273
|
+
if (elements.length === 0 || !elements[0]) return void 0;
|
|
6274
|
+
return getNearestComponentName(elements[0]) || void 0;
|
|
6275
|
+
});
|
|
6276
|
+
const clearNativeSelectionState = () => {
|
|
6277
|
+
setNativeSelectionCursorX(OFFSCREEN_POSITION);
|
|
6278
|
+
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
6279
|
+
setNativeSelectionElements([]);
|
|
6280
|
+
};
|
|
6281
|
+
const recalculateNativeSelectionCursor = () => {
|
|
6282
|
+
const currentSelection = window.getSelection();
|
|
6283
|
+
if (!currentSelection || currentSelection.isCollapsed || currentSelection.rangeCount === 0) {
|
|
6284
|
+
return;
|
|
6285
|
+
}
|
|
6286
|
+
const range = currentSelection.getRangeAt(0);
|
|
6287
|
+
const clientRects = range.getClientRects();
|
|
6288
|
+
if (clientRects.length === 0) return;
|
|
6289
|
+
const isBackward = (() => {
|
|
6290
|
+
if (!currentSelection.anchorNode || !currentSelection.focusNode) return false;
|
|
6291
|
+
const position = currentSelection.anchorNode.compareDocumentPosition(currentSelection.focusNode);
|
|
6292
|
+
if (position & Node.DOCUMENT_POSITION_FOLLOWING) return false;
|
|
6293
|
+
if (position & Node.DOCUMENT_POSITION_PRECEDING) return true;
|
|
6294
|
+
return currentSelection.anchorOffset > currentSelection.focusOffset;
|
|
6295
|
+
})();
|
|
6296
|
+
const cursorRect = isBackward ? clientRects[0] : clientRects[clientRects.length - 1];
|
|
6297
|
+
const cursorX = isBackward ? cursorRect.left : cursorRect.right;
|
|
6298
|
+
const cursorY = cursorRect.top + cursorRect.height / 2;
|
|
6299
|
+
setNativeSelectionCursorX(cursorX);
|
|
6300
|
+
setNativeSelectionCursorY(cursorY);
|
|
6301
|
+
};
|
|
6302
|
+
createEffect(on(() => viewportVersion(), () => {
|
|
6303
|
+
if (hasNativeSelection()) {
|
|
6304
|
+
recalculateNativeSelectionCursor();
|
|
6305
|
+
}
|
|
6306
|
+
}));
|
|
6367
6307
|
const nativeSelectionBounds = createMemo(() => {
|
|
6368
6308
|
viewportVersion();
|
|
6369
6309
|
const elements = nativeSelectionElements();
|
|
@@ -6415,7 +6355,6 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6415
6355
|
setSuccessLabels((previousLabels) => previousLabels.filter((label) => label.id !== labelId));
|
|
6416
6356
|
}, SUCCESS_LABEL_DURATION_MS);
|
|
6417
6357
|
};
|
|
6418
|
-
const extractElementTagName = (element) => (element.tagName || "").toLowerCase();
|
|
6419
6358
|
const extractElementTagNameForSuccess = (element) => {
|
|
6420
6359
|
const tagName = extractElementTagName(element);
|
|
6421
6360
|
return tagName ? `<${tagName}>` : "1 element";
|
|
@@ -6487,28 +6426,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6487
6426
|
const tryCopyWithFallback = async (elements, extraPrompt) => {
|
|
6488
6427
|
let didCopy = false;
|
|
6489
6428
|
let copiedContent = "";
|
|
6490
|
-
const isReactProject = Ee();
|
|
6491
6429
|
await options.onBeforeCopy?.(elements);
|
|
6492
|
-
if (options.copyFileOnly && isReactProject) {
|
|
6493
|
-
try {
|
|
6494
|
-
const firstElement = elements[0];
|
|
6495
|
-
if (firstElement) {
|
|
6496
|
-
const stack = await getStack(firstElement);
|
|
6497
|
-
const fileName = getFileName(stack);
|
|
6498
|
-
if (fileName) {
|
|
6499
|
-
copiedContent = `@${fileName}`;
|
|
6500
|
-
didCopy = await copyContent(copiedContent);
|
|
6501
|
-
if (didCopy) {
|
|
6502
|
-
options.onCopySuccess?.(elements, copiedContent);
|
|
6503
|
-
}
|
|
6504
|
-
}
|
|
6505
|
-
}
|
|
6506
|
-
} catch (error) {
|
|
6507
|
-
options.onCopyError?.(error);
|
|
6508
|
-
}
|
|
6509
|
-
options.onAfterCopy?.(elements, didCopy);
|
|
6510
|
-
return didCopy;
|
|
6511
|
-
}
|
|
6512
6430
|
try {
|
|
6513
6431
|
const elementSnippetResults = await Promise.allSettled(elements.map((element) => formatElementInfo(element)));
|
|
6514
6432
|
const elementSnippets = [];
|
|
@@ -6596,16 +6514,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6596
6514
|
viewportVersion();
|
|
6597
6515
|
const element = targetElement();
|
|
6598
6516
|
if (!element) return void 0;
|
|
6599
|
-
|
|
6600
|
-
const computedStyle = window.getComputedStyle(element);
|
|
6601
|
-
return {
|
|
6602
|
-
borderRadius: computedStyle.borderRadius || "0px",
|
|
6603
|
-
height: elementBounds.height,
|
|
6604
|
-
transform: stripTranslateFromTransform(element),
|
|
6605
|
-
width: elementBounds.width,
|
|
6606
|
-
x: elementBounds.left,
|
|
6607
|
-
y: elementBounds.top
|
|
6608
|
-
};
|
|
6517
|
+
return createElementBounds(element);
|
|
6609
6518
|
});
|
|
6610
6519
|
const calculateDragDistance = (endX, endY) => {
|
|
6611
6520
|
const endPageX = endX + window.scrollX;
|
|
@@ -6682,16 +6591,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6682
6591
|
return _el$10;
|
|
6683
6592
|
})();
|
|
6684
6593
|
});
|
|
6685
|
-
const
|
|
6686
|
-
return isCopying() ? {
|
|
6687
|
-
x: copyStartX(),
|
|
6688
|
-
y: copyStartY()
|
|
6689
|
-
} : {
|
|
6690
|
-
x: mouseX(),
|
|
6691
|
-
y: mouseY()
|
|
6692
|
-
};
|
|
6693
|
-
});
|
|
6694
|
-
const progressPosition = createMemo(() => isCopying() ? {
|
|
6594
|
+
const cursorPosition = createMemo(() => isCopying() ? {
|
|
6695
6595
|
x: copyStartX(),
|
|
6696
6596
|
y: copyStartY()
|
|
6697
6597
|
} : {
|
|
@@ -6770,7 +6670,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6770
6670
|
y: y2
|
|
6771
6671
|
});
|
|
6772
6672
|
}));
|
|
6773
|
-
createEffect(on(() => [labelVisible(), labelVariant(), labelContent(),
|
|
6673
|
+
createEffect(on(() => [labelVisible(), labelVariant(), labelContent(), cursorPosition()], ([visible, variant, content, position]) => {
|
|
6774
6674
|
const contentString = typeof content === "string" ? content : "";
|
|
6775
6675
|
options.onElementLabel?.(Boolean(visible), variant, {
|
|
6776
6676
|
x: position.x,
|
|
@@ -6922,32 +6822,19 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6922
6822
|
deactivateRenderer();
|
|
6923
6823
|
return;
|
|
6924
6824
|
}
|
|
6925
|
-
const
|
|
6926
|
-
const computedStyle = window.getComputedStyle(element);
|
|
6927
|
-
const bounds = {
|
|
6928
|
-
x: elementRect.left,
|
|
6929
|
-
y: elementRect.top,
|
|
6930
|
-
width: elementRect.width,
|
|
6931
|
-
height: elementRect.height,
|
|
6932
|
-
borderRadius: computedStyle.borderRadius || "0px",
|
|
6933
|
-
transform: stripTranslateFromTransform(element)
|
|
6934
|
-
};
|
|
6825
|
+
const bounds = createElementBounds(element);
|
|
6935
6826
|
const currentX = bounds.x + bounds.width / 2;
|
|
6936
6827
|
const currentY = bounds.y + bounds.height / 2;
|
|
6937
6828
|
setMouseX(currentX);
|
|
6938
6829
|
setMouseY(currentY);
|
|
6939
6830
|
if (options.agent?.provider && prompt) {
|
|
6940
|
-
const positionX = mouseX();
|
|
6941
|
-
const positionY = mouseY();
|
|
6942
|
-
setInputText("");
|
|
6943
|
-
setIsInputMode(false);
|
|
6944
6831
|
deactivateRenderer();
|
|
6945
6832
|
void agentManager.startSession({
|
|
6946
6833
|
element,
|
|
6947
6834
|
prompt,
|
|
6948
6835
|
position: {
|
|
6949
|
-
x:
|
|
6950
|
-
y:
|
|
6836
|
+
x: currentX,
|
|
6837
|
+
y: currentY
|
|
6951
6838
|
},
|
|
6952
6839
|
selectionBounds: bounds
|
|
6953
6840
|
});
|
|
@@ -6978,11 +6865,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6978
6865
|
const bounds = nativeSelectionBounds();
|
|
6979
6866
|
const tagName = nativeSelectionTagName();
|
|
6980
6867
|
setHasNativeSelection(false);
|
|
6981
|
-
|
|
6982
|
-
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
6983
|
-
setNativeSelectionElements([]);
|
|
6984
|
-
setNativeSelectionTagName(void 0);
|
|
6985
|
-
setNativeSelectionComponentName(void 0);
|
|
6868
|
+
clearNativeSelectionState();
|
|
6986
6869
|
window.getSelection()?.removeAllRanges();
|
|
6987
6870
|
if (elements.length === 1) {
|
|
6988
6871
|
await executeCopyOperation(currentX, currentY, () => copySingleElementToClipboard(elements[0]), bounds, tagName);
|
|
@@ -6997,11 +6880,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6997
6880
|
const currentX = bounds ? bounds.x + bounds.width / 2 : nativeSelectionCursorX();
|
|
6998
6881
|
const currentY = bounds ? bounds.y + bounds.height / 2 : nativeSelectionCursorY();
|
|
6999
6882
|
setHasNativeSelection(false);
|
|
7000
|
-
|
|
7001
|
-
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
7002
|
-
setNativeSelectionElements([]);
|
|
7003
|
-
setNativeSelectionTagName(void 0);
|
|
7004
|
-
setNativeSelectionComponentName(void 0);
|
|
6883
|
+
clearNativeSelectionState();
|
|
7005
6884
|
window.getSelection()?.removeAllRanges();
|
|
7006
6885
|
setMouseX(currentX);
|
|
7007
6886
|
setMouseY(currentY);
|
|
@@ -7079,16 +6958,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7079
6958
|
const element = getElementAtPosition(clientX, clientY);
|
|
7080
6959
|
if (!element) return;
|
|
7081
6960
|
setLastGrabbedElement(element);
|
|
7082
|
-
const
|
|
7083
|
-
const computedStyle = window.getComputedStyle(element);
|
|
7084
|
-
const bounds = {
|
|
7085
|
-
x: elementRect.left,
|
|
7086
|
-
y: elementRect.top,
|
|
7087
|
-
width: elementRect.width,
|
|
7088
|
-
height: elementRect.height,
|
|
7089
|
-
borderRadius: computedStyle.borderRadius || "0px",
|
|
7090
|
-
transform: stripTranslateFromTransform(element)
|
|
7091
|
-
};
|
|
6961
|
+
const bounds = createElementBounds(element);
|
|
7092
6962
|
const tagName = extractElementTagName(element);
|
|
7093
6963
|
void executeCopyOperation(clientX, clientY, () => copySingleElementToClipboard(element), bounds, tagName, element);
|
|
7094
6964
|
}
|
|
@@ -7361,11 +7231,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7361
7231
|
setHasNativeSelection(false);
|
|
7362
7232
|
const selection = window.getSelection();
|
|
7363
7233
|
if (!selection || selection.isCollapsed || selection.rangeCount === 0) {
|
|
7364
|
-
|
|
7365
|
-
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
7366
|
-
setNativeSelectionElements([]);
|
|
7367
|
-
setNativeSelectionTagName(void 0);
|
|
7368
|
-
setNativeSelectionComponentName(void 0);
|
|
7234
|
+
clearNativeSelectionState();
|
|
7369
7235
|
return;
|
|
7370
7236
|
}
|
|
7371
7237
|
selectionDebounceTimerId = window.setTimeout(() => {
|
|
@@ -7394,11 +7260,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7394
7260
|
const cursorX = isBackward ? cursorRect.left : cursorRect.right;
|
|
7395
7261
|
const cursorY = cursorRect.top + cursorRect.height / 2;
|
|
7396
7262
|
if (isSelectionInsideEditableElement(cursorX, cursorY)) {
|
|
7397
|
-
|
|
7398
|
-
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
7399
|
-
setNativeSelectionElements([]);
|
|
7400
|
-
setNativeSelectionTagName(void 0);
|
|
7401
|
-
setNativeSelectionComponentName(void 0);
|
|
7263
|
+
clearNativeSelectionState();
|
|
7402
7264
|
return;
|
|
7403
7265
|
}
|
|
7404
7266
|
setNativeSelectionCursorX(cursorX);
|
|
@@ -7407,13 +7269,9 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7407
7269
|
const element = container.nodeType === Node.ELEMENT_NODE ? container : container.parentElement;
|
|
7408
7270
|
if (element && isValidGrabbableElement(element)) {
|
|
7409
7271
|
setNativeSelectionElements([element]);
|
|
7410
|
-
setNativeSelectionTagName(extractElementTagName(element) || void 0);
|
|
7411
|
-
setNativeSelectionComponentName(getNearestComponentName(element) || void 0);
|
|
7412
7272
|
setHasNativeSelection(true);
|
|
7413
7273
|
} else {
|
|
7414
7274
|
setNativeSelectionElements([]);
|
|
7415
|
-
setNativeSelectionTagName(void 0);
|
|
7416
|
-
setNativeSelectionComponentName(void 0);
|
|
7417
7275
|
}
|
|
7418
7276
|
}, 150);
|
|
7419
7277
|
}, {
|
|
@@ -7449,18 +7307,9 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7449
7307
|
if (!instance.element || !document.body.contains(instance.element)) {
|
|
7450
7308
|
return instance;
|
|
7451
7309
|
}
|
|
7452
|
-
const elementRect = instance.element.getBoundingClientRect();
|
|
7453
|
-
const computedStyle = window.getComputedStyle(instance.element);
|
|
7454
7310
|
return {
|
|
7455
7311
|
...instance,
|
|
7456
|
-
bounds:
|
|
7457
|
-
x: elementRect.left,
|
|
7458
|
-
y: elementRect.top,
|
|
7459
|
-
width: elementRect.width,
|
|
7460
|
-
height: elementRect.height,
|
|
7461
|
-
borderRadius: computedStyle.borderRadius || "0px",
|
|
7462
|
-
transform: stripTranslateFromTransform(instance.element)
|
|
7463
|
-
}
|
|
7312
|
+
bounds: createElementBounds(instance.element)
|
|
7464
7313
|
};
|
|
7465
7314
|
});
|
|
7466
7315
|
});
|
|
@@ -7519,10 +7368,10 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7519
7368
|
},
|
|
7520
7369
|
labelZIndex: Z_INDEX_LABEL,
|
|
7521
7370
|
get mouseX() {
|
|
7522
|
-
return
|
|
7371
|
+
return cursorPosition().x;
|
|
7523
7372
|
},
|
|
7524
7373
|
get mouseY() {
|
|
7525
|
-
return
|
|
7374
|
+
return cursorPosition().y;
|
|
7526
7375
|
},
|
|
7527
7376
|
get crosshairVisible() {
|
|
7528
7377
|
return crosshairVisible();
|