react-grab 0.0.55 → 0.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-GQ7Z2X35.js → chunk-B3JEIYPC.js} +313 -391
- package/dist/{chunk-EAIY6I5Y.cjs → chunk-IN2B3ZLM.cjs} +313 -391
- package/dist/{core-DeAAaVyA.d.cts → core-DPj35Ngb.d.cts} +3 -3
- package/dist/{core-DeAAaVyA.d.ts → core-DPj35Ngb.d.ts} +3 -3
- 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 +10 -9
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.global.js +29 -29
- package/dist/index.js +3 -2
- package/dist/styles.css +1 -1
- package/package.json +2 -2
|
@@ -749,7 +749,8 @@ 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 */
|
|
753
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--font-weight-medium:500;--radius-xs:.125rem;--ease-out:cubic-bezier(0,0,.2,1);--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-grab-pink:#b21c8e;--color-grab-purple:#d239c0;--color-label-tag-border:#730079;--color-label-gray-border:#b0b0b0;--color-label-success-bg:#d9ffe4;--color-label-success-border:#00bb69;--color-label-success-text:#006e3b;--color-label-muted:#767676}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.top-0{top:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.z-2147483645{z-index:2147483645}.z-2147483646{z-index:2147483646}.z-2147483647{z-index:2147483647}.z-\\[2147483645\\]{z-index:2147483645}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.-ml-\\[2px\\]{margin-left:-2px}.ml-1{margin-left:calc(var(--spacing)*1)}.box-border{box-sizing:border-box}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-0{height:calc(var(--spacing)*0)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-5\\.5{height:calc(var(--spacing)*5.5)}.h-\\[9px\\]{height:9px}.h-\\[18px\\]{height:18px}.h-fit{height:fit-content}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-4{min-height:calc(var(--spacing)*4)}.w-0{width:calc(var(--spacing)*0)}.w-0\\.5{width:calc(var(--spacing)*.5)}.w-1{width:calc(var(--spacing)*1)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-\\[18px\\]{width:18px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-crosshair{cursor:crosshair}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}.gap-\\[2px\\]{gap:2px}.gap-\\[3px\\]{gap:3px}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.rounded-\\[1\\.5px\\]{border-radius:1.5px}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[2px\\]{border-radius:2px}.rounded-\\[3px\\]{border-radius:3px}.rounded-full{border-radius:3.40282e38px}.rounded-xs{border-radius:var(--radius-xs)}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-br-\\[3px\\]{border-bottom-right-radius:3px}.rounded-bl-\\[3px\\]{border-bottom-left-radius:3px}.border{border-style:var(--tw-border-style);border-width:1px}.border-\\[0\\.5px\\]{border-style:var(--tw-border-style);border-width:.5px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-grab-purple{border-color:var(--color-grab-purple)}.border-grab-purple\\/40{border-color:#d239c066}@supports (color:color-mix(in lab, red, red)){.border-grab-purple\\/40{border-color:color-mix(in oklab,var(--color-grab-purple)40%,transparent)}}.border-grab-purple\\/50{border-color:#d239c080}@supports (color:color-mix(in lab, red, red)){.border-grab-purple\\/50{border-color:color-mix(in oklab,var(--color-grab-purple)50%,transparent)}}.border-label-gray-border{border-color:var(--color-label-gray-border)}.border-label-success-border{border-color:var(--color-label-success-border)}.border-label-tag-border{border-color:var(--color-label-tag-border)}.border-white{border-color:var(--color-white)}.border-t-\\[\\#B6B6B6\\]{border-top-color:#b6b6b6}.bg-\\[\\#F2F2F2\\]{background-color:#f2f2f2}.bg-black{background-color:var(--color-black)}.bg-grab-pink{background-color:var(--color-grab-pink)}.bg-grab-purple\\/5{background-color:#d239c00d}@supports (color:color-mix(in lab, red, red)){.bg-grab-purple\\/5{background-color:color-mix(in oklab,var(--color-grab-purple)5%,transparent)}}.bg-grab-purple\\/8{background-color:#d239c014}@supports (color:color-mix(in lab, red, red)){.bg-grab-purple\\/8{background-color:color-mix(in oklab,var(--color-grab-purple)8%,transparent)}}.bg-label-success-bg{background-color:var(--color-label-success-bg)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-cover{background-size:cover}.bg-center{background-position:50%}.p-0{padding:calc(var(--spacing)*0)}.p-0\\.5{padding:calc(var(--spacing)*.5)}.px-0{padding-inline:calc(var(--spacing)*0)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-\\[3px\\]{padding-inline:3px}.px-\\[5px\\]{padding-inline:5px}.py-0{padding-block:calc(var(--spacing)*0)}.py-\\[5px\\]{padding-block:5px}.py-px{padding-block:1px}.pt-1{padding-top:calc(var(--spacing)*1)}.pb-1\\.5{padding-bottom:calc(var(--spacing)*1.5)}.align-middle{vertical-align:middle}.font-\\[ui-monospace\\,\\'SFMono-Regular\\'\\,\\'SF_Mono\\'\\,\\'Menlo\\'\\,\\'Consolas\\'\\,\\'Liberation_Mono\\'\\,monospace\\]{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-\\[11\\.5px\\]{font-size:11.5px}.text-\\[12px\\]{font-size:12px}.leading-3\\.5{--tw-leading:calc(var(--spacing)*3.5);line-height:calc(var(--spacing)*3.5)}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.tracking-\\[-0\\.04em\\]{--tw-tracking:-.04em;letter-spacing:-.04em}.tracking-\\[-0\\.08em\\]{--tw-tracking:-.08em;letter-spacing:-.08em}.text-\\[\\#47004A\\]{color:#47004a}.text-black{color:var(--color-black)}.text-label-muted{color:var(--color-label-muted)}.text-label-success-text{color:var(--color-label-success-text)}.text-label-tag-border{color:var(--color-label-tag-border)}.text-white{color:var(--color-white)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-100{opacity:1}.opacity-\\[0\\.99\\]{opacity:.99}.brightness-125{--tw-brightness:brightness(125%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[width\\,height\\]{transition-property:width,height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-30{--tw-duration:30ms;transition-duration:30ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-\\[transform\\,width\\,height\\]{will-change:transform,width,height}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.\\[font-synthesis\\:none\\]{font-synthesis:none}@media (hover:hover){.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:opacity-100:hover{opacity:1}.hover\\:shadow-md:hover{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.react-grab-shimmer{position:relative;overflow:hidden}.react-grab-shimmer:after{content:"";border-radius:inherit;pointer-events:none;background:linear-gradient(90deg,#0000 0%,#fff6 50%,#0000 100%) 0 0/200% 100%;animation:1.5s ease-in-out infinite shimmer;position:absolute;inset:0}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@keyframes pulse{50%{opacity:.5}}`;
|
|
753
754
|
|
|
754
755
|
// src/utils/is-keyboard-event-triggered-by-input.ts
|
|
755
756
|
var FORM_TAGS_AND_ROLES = [
|
|
@@ -862,6 +863,11 @@ var mountRoot = (cssText) => {
|
|
|
862
863
|
shadowRoot.appendChild(root);
|
|
863
864
|
const doc = document.body ?? document.documentElement;
|
|
864
865
|
doc.appendChild(host);
|
|
866
|
+
setTimeout(() => {
|
|
867
|
+
if (!doc.contains(host)) {
|
|
868
|
+
doc.appendChild(host);
|
|
869
|
+
}
|
|
870
|
+
}, 1e3);
|
|
865
871
|
return root;
|
|
866
872
|
};
|
|
867
873
|
|
|
@@ -3368,9 +3374,7 @@ var getDefaultConfig = () => {
|
|
|
3368
3374
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
3369
3375
|
|
|
3370
3376
|
// src/utils/cn.ts
|
|
3371
|
-
var cn = (...inputs) =>
|
|
3372
|
-
return twMerge(clsx(inputs));
|
|
3373
|
-
};
|
|
3377
|
+
var cn = (...inputs) => twMerge(clsx(inputs));
|
|
3374
3378
|
|
|
3375
3379
|
// src/components/selection-box.tsx
|
|
3376
3380
|
var _tmpl$ = /* @__PURE__ */ template(`<div style=overflow:visible>`);
|
|
@@ -3654,33 +3658,12 @@ var IconOpen = (props) => {
|
|
|
3654
3658
|
})();
|
|
3655
3659
|
};
|
|
3656
3660
|
|
|
3657
|
-
// src/components/icon-return-key.tsx
|
|
3658
|
-
var _tmpl$6 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 12 12"><g fill=none stroke-linecap=round stroke-linejoin=round stroke-width=1 stroke=currentColor><path d=m1.25,6.75h8.5c.5523,0,1-.4477,1-1v-2.5c0-.5523-.4477-1-1-1h-1.75></path><polyline points="3.75 4 1 6.75 3.75 9.5">`);
|
|
3659
|
-
var IconReturnKey = (props) => {
|
|
3660
|
-
const size = () => props.size ?? 14;
|
|
3661
|
-
return (() => {
|
|
3662
|
-
var _el$ = _tmpl$6();
|
|
3663
|
-
createRenderEffect((_p$) => {
|
|
3664
|
-
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
3665
|
-
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
3666
|
-
_v$2 !== _p$.t && setAttribute(_el$, "height", _p$.t = _v$2);
|
|
3667
|
-
_v$3 !== _p$.a && setAttribute(_el$, "class", _p$.a = _v$3);
|
|
3668
|
-
return _p$;
|
|
3669
|
-
}, {
|
|
3670
|
-
e: void 0,
|
|
3671
|
-
t: void 0,
|
|
3672
|
-
a: void 0
|
|
3673
|
-
});
|
|
3674
|
-
return _el$;
|
|
3675
|
-
})();
|
|
3676
|
-
};
|
|
3677
|
-
|
|
3678
3661
|
// src/components/icon-stop.tsx
|
|
3679
|
-
var _tmpl$
|
|
3662
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 9 9"fill=none><rect x=1 y=1 width=7 height=7 rx=1 fill=currentColor>`);
|
|
3680
3663
|
var IconStop = (props) => {
|
|
3681
3664
|
const size = () => props.size ?? 9;
|
|
3682
3665
|
return (() => {
|
|
3683
|
-
var _el$ = _tmpl$
|
|
3666
|
+
var _el$ = _tmpl$6();
|
|
3684
3667
|
createRenderEffect((_p$) => {
|
|
3685
3668
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
3686
3669
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -3697,23 +3680,25 @@ var IconStop = (props) => {
|
|
|
3697
3680
|
};
|
|
3698
3681
|
|
|
3699
3682
|
// src/components/selection-label.tsx
|
|
3700
|
-
var _tmpl$
|
|
3683
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<div style="background-image:linear-gradient(in oklab 180deg, oklab(88.7% 0.086 -0.058) 0%, oklab(83.2% 0.132 -0.089) 100%)"><span>`);
|
|
3701
3684
|
var _tmpl$22 = /* @__PURE__ */ template(`<span>`);
|
|
3702
3685
|
var _tmpl$32 = /* @__PURE__ */ template(`<button>`);
|
|
3703
3686
|
var _tmpl$42 = /* @__PURE__ */ template(`<div>`);
|
|
3704
3687
|
var _tmpl$52 = /* @__PURE__ */ template(`<div class="flex items-center h-[18px] rounded-[1.5px] gap-[3px] px-[5px] py-px bg-label-success-bg border-[0.5px] border-solid border-label-success-border"><span class="text-label-success-text text-[12px] leading-4 font-medium tracking-[-0.04em]">`);
|
|
3705
|
-
var _tmpl$62 = /* @__PURE__ */ template(`<div class="absolute w-0 h-0"style="border-left:8px solid transparent;border-right:8px solid transparent
|
|
3706
|
-
var _tmpl$72 = /* @__PURE__ */ template(`<div class="
|
|
3707
|
-
var _tmpl$
|
|
3708
|
-
var _tmpl$9 = /* @__PURE__ */ template(`<
|
|
3709
|
-
var _tmpl$0 = /* @__PURE__ */ template(`<
|
|
3710
|
-
var _tmpl$1 = /* @__PURE__ */ template(`<div class="
|
|
3711
|
-
var _tmpl$10 = /* @__PURE__ */ template(`<div class="shrink-0 flex
|
|
3712
|
-
var _tmpl$11 = /* @__PURE__ */ template(`<div class="shrink-0 flex justify-
|
|
3713
|
-
var _tmpl$12 = /* @__PURE__ */ template(`<div
|
|
3688
|
+
var _tmpl$62 = /* @__PURE__ */ template(`<div class="absolute w-0 h-0"style="border-left:8px solid transparent;border-right:8px solid transparent">`);
|
|
3689
|
+
var _tmpl$72 = /* @__PURE__ */ template(`<div role=button><div class="text-black text-[12px] leading-4 shrink-0 tracking-[-0.04em] font-sans font-medium w-fit h-fit">Click to copy`);
|
|
3690
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col items-start px-2 py-[5px] w-auto h-fit rounded-bl-[3px] rounded-br-[3px] self-stretch bg-[#F2F2F2] [border-top-width:0.5px] border-t-solid border-t-[#B6B6B6] rounded-t-none">`);
|
|
3691
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<div class="flex items-center gap-[3px] pt-1 pb-1.5 px-1.5">`);
|
|
3692
|
+
var _tmpl$0 = /* @__PURE__ */ template(`<button class="flex items-center justify-center w-[18px] h-[18px] rounded-full cursor-pointer bg-black border-none transition-opacity hover:opacity-80"title=Stop>`);
|
|
3693
|
+
var _tmpl$1 = /* @__PURE__ */ template(`<div class="flex items-center gap-[3px] react-grab-shimmer rounded-[3px] pt-1 pb-1.5 px-1.5">`);
|
|
3694
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex items-center gap-1 w-fit h-fit"><span class="text-label-muted text-[12px] leading-4 shrink-0 tracking-[-0.04em] font-sans font-medium w-fit h-fit">Press</span><div class="contain-layout shrink-0 flex flex-col items-start p-0.5 rounded-[1px] bg-white [border-width:0.5px] border-solid border-white w-fit h-fit"style="box-shadow:#0000008C 0px 0px 2px"><div class="w-2.5 h-[9px] shrink-0 opacity-[0.99] bg-cover bg-center"style=background-image:url(https://workers.paper.design/file-assets/01K8D51Q7E2ESJTN18XN2MT96X/01KBEJ7N5GQ0ZZ7K456R42AP4V.svg)></div></div><span class="text-label-muted text-[12px] leading-4 shrink-0 tracking-[-0.04em] font-sans font-medium w-fit h-fit">to edit`);
|
|
3695
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 w-fit h-fit pt-1 px-1.5"></div><div class="grid w-full transition-[grid-template-rows] duration-30 ease-out"><div class="overflow-hidden min-h-0">`);
|
|
3696
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea class="text-black text-[12px] leading-4 tracking-[-0.04em] font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0"placeholder="type to edit"rows=1 style=field-sizing:content;min-height:16px></textarea><button class="contain-layout shrink-0 flex flex-col items-start p-0.5 rounded-xs bg-white [border-width:0.5px] border-solid border-white w-fit h-fit cursor-pointer ml-1 transition-none hover:scale-105 hover:shadow-md"style="box-shadow:#0000008C 0px 0px 2px"><div style=background-image:url(https://workers.paper.design/file-assets/01K8D51Q7E2ESJTN18XN2MT96X/01KBEJ7N5GQ0ZZ7K456R42AP4V.svg)>`);
|
|
3697
|
+
var _tmpl$13 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 px-1.5 w-fit h-fit">`);
|
|
3698
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events class="fixed font-sans antialiased transition-opacity duration-300 ease-out"style="z-index:2147483647;filter:drop-shadow(0 1px 2px rgba(0,0,0,0.2)) drop-shadow(0 2px 4px rgba(0,0,0,0.25))"><div class="[font-synthesis:none] contain-layout flex items-center gap-[5px] rounded-[2px] bg-white antialiased w-fit h-fit p-0">`);
|
|
3714
3699
|
var ARROW_HEIGHT = 8;
|
|
3715
3700
|
var LABEL_GAP = 4;
|
|
3716
|
-
var IDLE_TIMEOUT_MS =
|
|
3701
|
+
var IDLE_TIMEOUT_MS = 400;
|
|
3717
3702
|
var TagBadge = (props) => {
|
|
3718
3703
|
const [isHovered, setIsHovered] = createSignal(false);
|
|
3719
3704
|
const handleMouseEnter = () => {
|
|
@@ -3725,26 +3710,26 @@ var TagBadge = (props) => {
|
|
|
3725
3710
|
props.onHoverChange?.(false);
|
|
3726
3711
|
};
|
|
3727
3712
|
return (() => {
|
|
3728
|
-
var _el$ = _tmpl$
|
|
3713
|
+
var _el$ = _tmpl$7(), _el$2 = _el$.firstChild;
|
|
3729
3714
|
addEventListener(_el$, "click", props.onClick);
|
|
3730
3715
|
_el$.addEventListener("mouseleave", handleMouseLeave);
|
|
3731
3716
|
_el$.addEventListener("mouseenter", handleMouseEnter);
|
|
3732
3717
|
insert(_el$2, () => props.tagName);
|
|
3733
3718
|
insert(_el$, createComponent(Show, {
|
|
3734
3719
|
get when() {
|
|
3735
|
-
return props.isClickable;
|
|
3720
|
+
return props.isClickable || props.forceShowIcon;
|
|
3736
3721
|
},
|
|
3737
3722
|
get children() {
|
|
3738
3723
|
return createComponent(IconOpen, {
|
|
3739
3724
|
size: 10,
|
|
3740
3725
|
get ["class"]() {
|
|
3741
|
-
return cn("text-label-tag-border transition-all duration-100", isHovered() ? "opacity-100 scale-100" : "opacity-0 scale-75 -ml-[
|
|
3726
|
+
return cn("text-label-tag-border transition-all duration-100", isHovered() || props.forceShowIcon ? "opacity-100 scale-100" : "opacity-0 scale-75 -ml-[2px] w-0");
|
|
3742
3727
|
}
|
|
3743
3728
|
});
|
|
3744
3729
|
}
|
|
3745
3730
|
}), null);
|
|
3746
3731
|
createRenderEffect((_p$) => {
|
|
3747
|
-
var _v$ = cn("flex items-center px-
|
|
3732
|
+
var _v$ = cn("contain-layout flex items-center px-[3px] py-0 h-4 rounded-[1px] gap-[2px] [border-width:0.5px] border-solid border-label-tag-border", props.shrink && "shrink-0 w-fit", props.isClickable && "cursor-pointer"), _v$2 = cn("text-[#47004A] text-[11.5px] leading-3.5 shrink-0 w-fit h-fit", props.showMono ? "tracking-[-0.08em] font-[ui-monospace,'SFMono-Regular','SF_Mono','Menlo','Consolas','Liberation_Mono',monospace]" : "tracking-[-0.04em] font-medium");
|
|
3748
3733
|
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
3749
3734
|
_v$2 !== _p$.t && className(_el$2, _p$.t = _v$2);
|
|
3750
3735
|
return _p$;
|
|
@@ -3806,32 +3791,17 @@ var Arrow = (props) => (() => {
|
|
|
3806
3791
|
}, _$p));
|
|
3807
3792
|
return _el$8;
|
|
3808
3793
|
})();
|
|
3809
|
-
var ClickToCopyPill = (props) =>
|
|
3810
|
-
get icon() {
|
|
3811
|
-
return createComponent(IconCursorSimple, {
|
|
3812
|
-
size: 9,
|
|
3813
|
-
"class": "text-black shrink-0"
|
|
3814
|
-
});
|
|
3815
|
-
},
|
|
3816
|
-
label: "Click to copy",
|
|
3817
|
-
get onClick() {
|
|
3818
|
-
return props.onClick;
|
|
3819
|
-
},
|
|
3820
|
-
get asButton() {
|
|
3821
|
-
return props.asButton;
|
|
3822
|
-
},
|
|
3823
|
-
get dimmed() {
|
|
3824
|
-
return props.dimmed;
|
|
3825
|
-
},
|
|
3826
|
-
get shrink() {
|
|
3827
|
-
return props.shrink;
|
|
3828
|
-
}
|
|
3829
|
-
});
|
|
3830
|
-
var BottomSection = (props) => (() => {
|
|
3794
|
+
var ClickToCopyPill = (props) => (() => {
|
|
3831
3795
|
var _el$9 = _tmpl$72();
|
|
3832
|
-
|
|
3796
|
+
addEventListener(_el$9, "click", props.onClick);
|
|
3797
|
+
createRenderEffect(() => className(_el$9, cn("contain-layout shrink-0 flex items-center px-0 py-px w-fit h-[18px] rounded-[1.5px] gap-[3px]", props.asButton && "cursor-pointer", props.dimmed && "opacity-50 hover:opacity-100 transition-opacity")));
|
|
3833
3798
|
return _el$9;
|
|
3834
3799
|
})();
|
|
3800
|
+
var BottomSection = (props) => (() => {
|
|
3801
|
+
var _el$0 = _tmpl$8();
|
|
3802
|
+
insert(_el$0, () => props.children);
|
|
3803
|
+
return _el$0;
|
|
3804
|
+
})();
|
|
3835
3805
|
var SelectionLabel = (props) => {
|
|
3836
3806
|
let containerRef;
|
|
3837
3807
|
let inputRef;
|
|
@@ -3876,7 +3846,6 @@ var SelectionLabel = (props) => {
|
|
|
3876
3846
|
measureContainer();
|
|
3877
3847
|
window.addEventListener("scroll", handleViewportChange, true);
|
|
3878
3848
|
window.addEventListener("resize", handleViewportChange);
|
|
3879
|
-
window.addEventListener("mousemove", resetIdleTimer);
|
|
3880
3849
|
window.addEventListener("keydown", handleGlobalKeyDown, {
|
|
3881
3850
|
capture: true
|
|
3882
3851
|
});
|
|
@@ -3885,7 +3854,6 @@ var SelectionLabel = (props) => {
|
|
|
3885
3854
|
onCleanup(() => {
|
|
3886
3855
|
window.removeEventListener("scroll", handleViewportChange, true);
|
|
3887
3856
|
window.removeEventListener("resize", handleViewportChange);
|
|
3888
|
-
window.removeEventListener("mousemove", resetIdleTimer);
|
|
3889
3857
|
window.removeEventListener("keydown", handleGlobalKeyDown, {
|
|
3890
3858
|
capture: true
|
|
3891
3859
|
});
|
|
@@ -3893,13 +3861,17 @@ var SelectionLabel = (props) => {
|
|
|
3893
3861
|
clearTimeout(idleTimeout);
|
|
3894
3862
|
}
|
|
3895
3863
|
});
|
|
3864
|
+
createEffect(() => {
|
|
3865
|
+
void props.selectionBounds;
|
|
3866
|
+
resetIdleTimer();
|
|
3867
|
+
});
|
|
3896
3868
|
createEffect(() => {
|
|
3897
3869
|
if (props.visible) {
|
|
3898
3870
|
requestAnimationFrame(measureContainer);
|
|
3899
3871
|
}
|
|
3900
3872
|
});
|
|
3901
3873
|
createEffect(() => {
|
|
3902
|
-
void
|
|
3874
|
+
void props.status;
|
|
3903
3875
|
requestAnimationFrame(measureContainer);
|
|
3904
3876
|
});
|
|
3905
3877
|
createEffect(() => {
|
|
@@ -3985,26 +3957,26 @@ var SelectionLabel = (props) => {
|
|
|
3985
3957
|
return memo(() => props.visible !== false)() && props.selectionBounds;
|
|
3986
3958
|
},
|
|
3987
3959
|
get children() {
|
|
3988
|
-
var _el$
|
|
3989
|
-
_el$
|
|
3990
|
-
_el$
|
|
3960
|
+
var _el$1 = _tmpl$14(), _el$10 = _el$1.firstChild;
|
|
3961
|
+
_el$1.$$click = stopPropagation;
|
|
3962
|
+
_el$1.$$mousedown = stopPropagation;
|
|
3991
3963
|
var _ref$ = containerRef;
|
|
3992
|
-
typeof _ref$ === "function" ? use(_ref$, _el$
|
|
3993
|
-
insert(_el$
|
|
3964
|
+
typeof _ref$ === "function" ? use(_ref$, _el$1) : containerRef = _el$1;
|
|
3965
|
+
insert(_el$1, createComponent(Arrow, {
|
|
3994
3966
|
get position() {
|
|
3995
3967
|
return arrowPosition();
|
|
3996
3968
|
},
|
|
3997
3969
|
get leftPx() {
|
|
3998
3970
|
return computedPosition().arrowLeft;
|
|
3999
3971
|
}
|
|
4000
|
-
}), _el$
|
|
4001
|
-
insert(_el$
|
|
3972
|
+
}), _el$10);
|
|
3973
|
+
insert(_el$10, createComponent(Show, {
|
|
4002
3974
|
get when() {
|
|
4003
3975
|
return props.status === "copied" || props.status === "fading";
|
|
4004
3976
|
},
|
|
4005
3977
|
get children() {
|
|
4006
|
-
var _el$
|
|
4007
|
-
insert(_el$
|
|
3978
|
+
var _el$11 = _tmpl$9();
|
|
3979
|
+
insert(_el$11, createComponent(TagBadge, {
|
|
4008
3980
|
get tagName() {
|
|
4009
3981
|
return tagDisplay();
|
|
4010
3982
|
},
|
|
@@ -4012,23 +3984,25 @@ var SelectionLabel = (props) => {
|
|
|
4012
3984
|
return isTagClickable();
|
|
4013
3985
|
},
|
|
4014
3986
|
onClick: handleTagClick,
|
|
4015
|
-
onHoverChange: handleTagHoverChange
|
|
3987
|
+
onHoverChange: handleTagHoverChange,
|
|
3988
|
+
showMono: true,
|
|
3989
|
+
shrink: true
|
|
4016
3990
|
}), null);
|
|
4017
|
-
insert(_el$
|
|
3991
|
+
insert(_el$11, createComponent(SuccessPill, {
|
|
4018
3992
|
get hasAgent() {
|
|
4019
3993
|
return props.hasAgent;
|
|
4020
3994
|
}
|
|
4021
3995
|
}), null);
|
|
4022
|
-
return _el$
|
|
3996
|
+
return _el$11;
|
|
4023
3997
|
}
|
|
4024
3998
|
}), null);
|
|
4025
|
-
insert(_el$
|
|
3999
|
+
insert(_el$10, createComponent(Show, {
|
|
4026
4000
|
get when() {
|
|
4027
4001
|
return props.status === "copying";
|
|
4028
4002
|
},
|
|
4029
4003
|
get children() {
|
|
4030
|
-
var _el$
|
|
4031
|
-
insert(_el$
|
|
4004
|
+
var _el$12 = _tmpl$1();
|
|
4005
|
+
insert(_el$12, createComponent(TagBadge, {
|
|
4032
4006
|
get tagName() {
|
|
4033
4007
|
return tagDisplay();
|
|
4034
4008
|
},
|
|
@@ -4037,9 +4011,10 @@ var SelectionLabel = (props) => {
|
|
|
4037
4011
|
},
|
|
4038
4012
|
onClick: handleTagClick,
|
|
4039
4013
|
onHoverChange: handleTagHoverChange,
|
|
4040
|
-
showMono: true
|
|
4014
|
+
showMono: true,
|
|
4015
|
+
shrink: true
|
|
4041
4016
|
}), null);
|
|
4042
|
-
insert(_el$
|
|
4017
|
+
insert(_el$12, createComponent(ActionPill, {
|
|
4043
4018
|
get icon() {
|
|
4044
4019
|
return createComponent(IconCursorSimple, {
|
|
4045
4020
|
size: 9,
|
|
@@ -4050,63 +4025,43 @@ var SelectionLabel = (props) => {
|
|
|
4050
4025
|
return props.statusText ?? "Grabbing\u2026";
|
|
4051
4026
|
}
|
|
4052
4027
|
}), null);
|
|
4053
|
-
insert(_el$
|
|
4028
|
+
insert(_el$12, createComponent(Show, {
|
|
4054
4029
|
get when() {
|
|
4055
4030
|
return memo(() => !!props.hasAgent)() && props.onAbort;
|
|
4056
4031
|
},
|
|
4057
4032
|
get children() {
|
|
4058
|
-
var _el$
|
|
4059
|
-
_el$
|
|
4033
|
+
var _el$13 = _tmpl$0();
|
|
4034
|
+
_el$13.$$click = (event) => {
|
|
4060
4035
|
event.preventDefault();
|
|
4061
4036
|
event.stopPropagation();
|
|
4062
4037
|
event.stopImmediatePropagation();
|
|
4063
4038
|
props.onAbort?.();
|
|
4064
4039
|
};
|
|
4065
|
-
_el$
|
|
4040
|
+
_el$13.$$mousedown = (event) => {
|
|
4066
4041
|
event.preventDefault();
|
|
4067
4042
|
event.stopPropagation();
|
|
4068
4043
|
event.stopImmediatePropagation();
|
|
4069
4044
|
};
|
|
4070
|
-
insert(_el$
|
|
4045
|
+
insert(_el$13, createComponent(IconStop, {
|
|
4071
4046
|
size: 8,
|
|
4072
4047
|
"class": "text-white"
|
|
4073
4048
|
}));
|
|
4074
|
-
return _el$
|
|
4049
|
+
return _el$13;
|
|
4075
4050
|
}
|
|
4076
4051
|
}), null);
|
|
4077
|
-
return _el$
|
|
4052
|
+
return _el$12;
|
|
4078
4053
|
}
|
|
4079
4054
|
}), null);
|
|
4080
|
-
insert(_el$
|
|
4055
|
+
insert(_el$10, createComponent(Show, {
|
|
4081
4056
|
get when() {
|
|
4082
|
-
return memo(() => !!
|
|
4057
|
+
return memo(() => !!isNotProcessing())() && !props.isInputExpanded;
|
|
4083
4058
|
},
|
|
4084
4059
|
get children() {
|
|
4085
|
-
var _el$
|
|
4086
|
-
insert(_el$
|
|
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, {
|
|
4060
|
+
var _el$14 = _tmpl$11(), _el$15 = _el$14.firstChild, _el$16 = _el$15.nextSibling, _el$17 = _el$16.firstChild;
|
|
4061
|
+
insert(_el$15, createComponent(ClickToCopyPill, {
|
|
4098
4062
|
onClick: handleSubmit,
|
|
4099
|
-
|
|
4063
|
+
shrink: true
|
|
4100
4064
|
}), null);
|
|
4101
|
-
return _el$13;
|
|
4102
|
-
}
|
|
4103
|
-
}), null);
|
|
4104
|
-
insert(_el$1, createComponent(Show, {
|
|
4105
|
-
get when() {
|
|
4106
|
-
return memo(() => !!(isNotProcessing() && isIdle()))() && !props.isInputExpanded;
|
|
4107
|
-
},
|
|
4108
|
-
get children() {
|
|
4109
|
-
var _el$14 = _tmpl$10(), _el$15 = _el$14.firstChild;
|
|
4110
4065
|
insert(_el$15, createComponent(TagBadge, {
|
|
4111
4066
|
get tagName() {
|
|
4112
4067
|
return tagDisplay();
|
|
@@ -4119,30 +4074,28 @@ var SelectionLabel = (props) => {
|
|
|
4119
4074
|
showMono: true,
|
|
4120
4075
|
shrink: true
|
|
4121
4076
|
}), null);
|
|
4122
|
-
insert(_el$
|
|
4123
|
-
onClick: handleSubmit,
|
|
4124
|
-
shrink: true
|
|
4125
|
-
}), null);
|
|
4126
|
-
insert(_el$14, createComponent(BottomSection, {
|
|
4077
|
+
insert(_el$17, createComponent(BottomSection, {
|
|
4127
4078
|
get children() {
|
|
4128
|
-
var _el$
|
|
4129
|
-
|
|
4130
|
-
size: 10,
|
|
4131
|
-
"class": "shrink-0 text-black opacity-[0.65]"
|
|
4132
|
-
}), _el$17);
|
|
4133
|
-
return _el$16;
|
|
4079
|
+
var _el$18 = _tmpl$10(), _el$19 = _el$18.firstChild, _el$20 = _el$19.nextSibling; _el$20.firstChild;
|
|
4080
|
+
return _el$18;
|
|
4134
4081
|
}
|
|
4135
|
-
})
|
|
4082
|
+
}));
|
|
4083
|
+
createRenderEffect((_$p) => setStyleProperty(_el$16, "grid-template-rows", isIdle() ? "1fr" : "0fr"));
|
|
4136
4084
|
return _el$14;
|
|
4137
4085
|
}
|
|
4138
4086
|
}), null);
|
|
4139
|
-
insert(_el$
|
|
4087
|
+
insert(_el$10, createComponent(Show, {
|
|
4140
4088
|
get when() {
|
|
4141
4089
|
return memo(() => !!isNotProcessing())() && props.isInputExpanded;
|
|
4142
4090
|
},
|
|
4143
4091
|
get children() {
|
|
4144
|
-
var _el$
|
|
4145
|
-
insert(_el$
|
|
4092
|
+
var _el$22 = _tmpl$13(), _el$23 = _el$22.firstChild;
|
|
4093
|
+
insert(_el$23, createComponent(ClickToCopyPill, {
|
|
4094
|
+
onClick: handleSubmit,
|
|
4095
|
+
dimmed: true,
|
|
4096
|
+
shrink: true
|
|
4097
|
+
}), null);
|
|
4098
|
+
insert(_el$23, createComponent(TagBadge, {
|
|
4146
4099
|
get tagName() {
|
|
4147
4100
|
return tagDisplay();
|
|
4148
4101
|
},
|
|
@@ -4152,55 +4105,46 @@ var SelectionLabel = (props) => {
|
|
|
4152
4105
|
onClick: handleTagClick,
|
|
4153
4106
|
onHoverChange: handleTagHoverChange,
|
|
4154
4107
|
showMono: true,
|
|
4155
|
-
shrink: true
|
|
4156
|
-
|
|
4157
|
-
insert(_el$19, createComponent(ClickToCopyPill, {
|
|
4158
|
-
onClick: handleSubmit,
|
|
4159
|
-
dimmed: true,
|
|
4160
|
-
shrink: true
|
|
4108
|
+
shrink: true,
|
|
4109
|
+
forceShowIcon: true
|
|
4161
4110
|
}), null);
|
|
4162
|
-
insert(_el$
|
|
4111
|
+
insert(_el$22, createComponent(BottomSection, {
|
|
4163
4112
|
get children() {
|
|
4164
|
-
var _el$
|
|
4165
|
-
_el$
|
|
4166
|
-
_el$
|
|
4113
|
+
var _el$24 = _tmpl$12(), _el$25 = _el$24.firstChild, _el$26 = _el$25.nextSibling, _el$27 = _el$26.firstChild;
|
|
4114
|
+
_el$25.$$keydown = handleKeyDown;
|
|
4115
|
+
_el$25.$$input = handleInput;
|
|
4167
4116
|
var _ref$2 = inputRef;
|
|
4168
|
-
typeof _ref$2 === "function" ? use(_ref$2, _el$
|
|
4169
|
-
_el$
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
}));
|
|
4174
|
-
createRenderEffect(() => _el$21.value = props.inputValue ?? "");
|
|
4175
|
-
return _el$20;
|
|
4117
|
+
typeof _ref$2 === "function" ? use(_ref$2, _el$25) : inputRef = _el$25;
|
|
4118
|
+
_el$26.$$click = handleSubmit;
|
|
4119
|
+
createRenderEffect(() => className(_el$27, cn("w-2.5 h-[9px] shrink-0 bg-cover bg-center transition-opacity duration-100", props.inputValue ? "opacity-[0.99]" : "opacity-50")));
|
|
4120
|
+
createRenderEffect(() => _el$25.value = props.inputValue ?? "");
|
|
4121
|
+
return _el$24;
|
|
4176
4122
|
}
|
|
4177
4123
|
}), null);
|
|
4178
|
-
return _el$
|
|
4124
|
+
return _el$22;
|
|
4179
4125
|
}
|
|
4180
4126
|
}), null);
|
|
4181
4127
|
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
|
|
4183
|
-
_v$3 !== _p$.e && setStyleProperty(_el$
|
|
4184
|
-
_v$4 !== _p$.t && setStyleProperty(_el$
|
|
4185
|
-
_v$5 !== _p$.a && setStyleProperty(_el$
|
|
4186
|
-
_v$6 !== _p$.o && setStyleProperty(_el$
|
|
4187
|
-
_v$7 !== _p$.i && setStyleProperty(_el$1, "padding", _p$.i = _v$7);
|
|
4128
|
+
var _v$3 = `${computedPosition().top}px`, _v$4 = `${computedPosition().left}px`, _v$5 = props.visible ? "auto" : "none", _v$6 = props.status === "fading" ? 0 : 1;
|
|
4129
|
+
_v$3 !== _p$.e && setStyleProperty(_el$1, "top", _p$.e = _v$3);
|
|
4130
|
+
_v$4 !== _p$.t && setStyleProperty(_el$1, "left", _p$.t = _v$4);
|
|
4131
|
+
_v$5 !== _p$.a && setStyleProperty(_el$1, "pointer-events", _p$.a = _v$5);
|
|
4132
|
+
_v$6 !== _p$.o && setStyleProperty(_el$1, "opacity", _p$.o = _v$6);
|
|
4188
4133
|
return _p$;
|
|
4189
4134
|
}, {
|
|
4190
4135
|
e: void 0,
|
|
4191
4136
|
t: void 0,
|
|
4192
4137
|
a: void 0,
|
|
4193
|
-
o: void 0
|
|
4194
|
-
i: void 0
|
|
4138
|
+
o: void 0
|
|
4195
4139
|
});
|
|
4196
|
-
return _el$
|
|
4140
|
+
return _el$1;
|
|
4197
4141
|
}
|
|
4198
4142
|
});
|
|
4199
4143
|
};
|
|
4200
4144
|
delegateEvents(["click", "mousedown", "input", "keydown"]);
|
|
4201
4145
|
|
|
4202
4146
|
// src/components/selection-cursor.tsx
|
|
4203
|
-
var _tmpl$
|
|
4147
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<div class="fixed z-2147483647"><button data-react-grab-selection-cursor>`);
|
|
4204
4148
|
var SelectionCursor = (props) => {
|
|
4205
4149
|
const [isHovered, setIsHovered] = createSignal(false);
|
|
4206
4150
|
const [debouncedVisible, setDebouncedVisible] = createSignal(false);
|
|
@@ -4237,7 +4181,7 @@ var SelectionCursor = (props) => {
|
|
|
4237
4181
|
});
|
|
4238
4182
|
}
|
|
4239
4183
|
}), (() => {
|
|
4240
|
-
var _el$ = _tmpl$
|
|
4184
|
+
var _el$ = _tmpl$15(), _el$2 = _el$.firstChild;
|
|
4241
4185
|
_el$.addEventListener("mouseleave", () => setIsHovered(false));
|
|
4242
4186
|
_el$.addEventListener("mouseenter", () => setIsHovered(true));
|
|
4243
4187
|
_el$2.$$click = handleClick;
|
|
@@ -4482,8 +4426,8 @@ var ReactGrabRenderer = (props) => {
|
|
|
4482
4426
|
})];
|
|
4483
4427
|
};
|
|
4484
4428
|
|
|
4485
|
-
// ../../node_modules/.pnpm/bippy@0.5.
|
|
4486
|
-
var e = `0.5.
|
|
4429
|
+
// ../../node_modules/.pnpm/bippy@0.5.17_@types+react@19.2.2_react@19.2.0/node_modules/bippy/dist/rdt-hook-Ds2lt3Ph.js
|
|
4430
|
+
var e = `0.5.17`;
|
|
4487
4431
|
var t = `bippy-${e}`;
|
|
4488
4432
|
var n = Object.defineProperty;
|
|
4489
4433
|
var r2 = Object.prototype.hasOwnProperty;
|
|
@@ -4570,10 +4514,10 @@ var _ = () => {
|
|
|
4570
4514
|
}
|
|
4571
4515
|
};
|
|
4572
4516
|
|
|
4573
|
-
// ../../node_modules/.pnpm/bippy@0.5.
|
|
4517
|
+
// ../../node_modules/.pnpm/bippy@0.5.17_@types+react@19.2.2_react@19.2.0/node_modules/bippy/dist/install-hook-only-BE254Zqc.js
|
|
4574
4518
|
_();
|
|
4575
4519
|
|
|
4576
|
-
// ../../node_modules/.pnpm/bippy@0.5.
|
|
4520
|
+
// ../../node_modules/.pnpm/bippy@0.5.17_@types+react@19.2.2_react@19.2.0/node_modules/bippy/dist/core-BKZAzaFk.js
|
|
4577
4521
|
var a2 = 0;
|
|
4578
4522
|
var o2 = 1;
|
|
4579
4523
|
var c2 = 5;
|
|
@@ -4609,7 +4553,7 @@ var pe = (e2) => {
|
|
|
4609
4553
|
return false;
|
|
4610
4554
|
}
|
|
4611
4555
|
};
|
|
4612
|
-
var me = (e2) => !e2 || typeof e2 != `object` ?
|
|
4556
|
+
var me = (e2) => !e2 || typeof e2 != `object` ? false : `pendingProps` in e2 && !(`containerInfo` in e2);
|
|
4613
4557
|
function N(e2, t2, n2 = false) {
|
|
4614
4558
|
if (!e2) return null;
|
|
4615
4559
|
let r3 = t2(e2);
|
|
@@ -4698,7 +4642,7 @@ var Pe = (e2) => {
|
|
|
4698
4642
|
};
|
|
4699
4643
|
var $ = /* @__PURE__ */ new Set();
|
|
4700
4644
|
|
|
4701
|
-
// ../../node_modules/.pnpm/bippy@0.5.
|
|
4645
|
+
// ../../node_modules/.pnpm/bippy@0.5.17_@types+react@19.2.2_react@19.2.0/node_modules/bippy/dist/source.js
|
|
4702
4646
|
var b2 = Object.create;
|
|
4703
4647
|
var x2 = Object.defineProperty;
|
|
4704
4648
|
var S2 = Object.getOwnPropertyDescriptor;
|
|
@@ -5255,7 +5199,7 @@ var Y = async (e2, t2 = true, n2) => {
|
|
|
5255
5199
|
return t2 && W2.delete(e2), t2 && (i2 === null ? U2.set(e2, null) : U2.set(e2, H2 ? new WeakRef(i2) : i2)), i2;
|
|
5256
5200
|
};
|
|
5257
5201
|
var be2 = /^[a-zA-Z][a-zA-Z\d+\-.]*:/;
|
|
5258
|
-
var xe2 = [`rsc://`, `file:///`, `webpack://`, `node:`, `turbopack://`, `metro
|
|
5202
|
+
var xe2 = [`rsc://`, `file:///`, `webpack://`, `node:`, `turbopack://`, `metro://`, `///app-pages-browser/`];
|
|
5259
5203
|
var Se2 = `about://React/`;
|
|
5260
5204
|
var Ce2 = [`<anonymous>`, `eval`, ``];
|
|
5261
5205
|
var we2 = /\.(jsx|tsx|ts|js)$/;
|
|
@@ -5322,7 +5266,7 @@ var je2 = (e2) => {
|
|
|
5322
5266
|
var isCapitalized = (value) => value.length > 0 && /^[A-Z]/.test(value);
|
|
5323
5267
|
|
|
5324
5268
|
// src/instrumentation.ts
|
|
5325
|
-
var NEXT_INTERNAL_COMPONENT_NAMES = [
|
|
5269
|
+
var NEXT_INTERNAL_COMPONENT_NAMES = /* @__PURE__ */ new Set([
|
|
5326
5270
|
"InnerLayoutRouter",
|
|
5327
5271
|
"RedirectErrorBoundary",
|
|
5328
5272
|
"RedirectBoundary",
|
|
@@ -5336,28 +5280,24 @@ var NEXT_INTERNAL_COMPONENT_NAMES = [
|
|
|
5336
5280
|
"OuterLayoutRouter",
|
|
5337
5281
|
"body",
|
|
5338
5282
|
"html",
|
|
5339
|
-
"RedirectErrorBoundary",
|
|
5340
|
-
"RedirectBoundary",
|
|
5341
|
-
"HTTPAccessFallbackErrorBoundary",
|
|
5342
|
-
"HTTPAccessFallbackBoundary",
|
|
5343
5283
|
"DevRootHTTPAccessFallbackBoundary",
|
|
5344
5284
|
"AppDevOverlayErrorBoundary",
|
|
5345
5285
|
"AppDevOverlay",
|
|
5346
5286
|
"HotReload",
|
|
5347
5287
|
"Router",
|
|
5348
5288
|
"ErrorBoundaryHandler",
|
|
5349
|
-
"ErrorBoundary",
|
|
5350
5289
|
"AppRouter",
|
|
5351
5290
|
"ServerRoot",
|
|
5352
5291
|
"SegmentStateProvider",
|
|
5353
5292
|
"RootErrorBoundary"
|
|
5354
|
-
];
|
|
5293
|
+
]);
|
|
5355
5294
|
var checkIsNextProject = () => {
|
|
5295
|
+
if (typeof document === "undefined") return false;
|
|
5356
5296
|
return Boolean(document.getElementById("__NEXT_DATA__"));
|
|
5357
5297
|
};
|
|
5358
5298
|
var checkIsInternalComponentName = (name) => {
|
|
5359
5299
|
if (name.startsWith("_")) return true;
|
|
5360
|
-
if (NEXT_INTERNAL_COMPONENT_NAMES.
|
|
5300
|
+
if (NEXT_INTERNAL_COMPONENT_NAMES.has(name)) return true;
|
|
5361
5301
|
return false;
|
|
5362
5302
|
};
|
|
5363
5303
|
var checkIsSourceComponentName = (name) => {
|
|
@@ -5427,15 +5367,17 @@ var formatElementInfo = async (element) => {
|
|
|
5427
5367
|
const html = getHTMLPreview(element);
|
|
5428
5368
|
const stack = await getStack(element);
|
|
5429
5369
|
const isNextProject = checkIsNextProject();
|
|
5430
|
-
let
|
|
5431
|
-
let
|
|
5370
|
+
let serverComponentName = null;
|
|
5371
|
+
let clientComponentName = null;
|
|
5432
5372
|
let fileName = null;
|
|
5433
5373
|
let lineNumber = null;
|
|
5434
5374
|
let columnNumber = null;
|
|
5435
5375
|
for (const frame of stack) {
|
|
5436
5376
|
if (!frame.source) continue;
|
|
5437
5377
|
if (frame.source.fileName.startsWith("about://React/Server")) {
|
|
5438
|
-
if (!
|
|
5378
|
+
if (!serverComponentName && checkIsSourceComponentName(frame.name)) {
|
|
5379
|
+
serverComponentName = frame.name;
|
|
5380
|
+
}
|
|
5439
5381
|
continue;
|
|
5440
5382
|
}
|
|
5441
5383
|
if (je2(frame.source.fileName)) {
|
|
@@ -5444,25 +5386,27 @@ var formatElementInfo = async (element) => {
|
|
|
5444
5386
|
lineNumber = frame.source.lineNumber ?? null;
|
|
5445
5387
|
columnNumber = frame.source.columnNumber ?? null;
|
|
5446
5388
|
}
|
|
5447
|
-
if (!
|
|
5448
|
-
|
|
5389
|
+
if (!clientComponentName && checkIsSourceComponentName(frame.name)) {
|
|
5390
|
+
clientComponentName = frame.name;
|
|
5449
5391
|
}
|
|
5450
|
-
if (fileName &&
|
|
5392
|
+
if (fileName && clientComponentName) {
|
|
5451
5393
|
break;
|
|
5452
5394
|
}
|
|
5453
5395
|
}
|
|
5454
5396
|
}
|
|
5397
|
+
const componentName = serverComponentName ?? clientComponentName;
|
|
5455
5398
|
if (!componentName || !fileName) {
|
|
5456
5399
|
return html;
|
|
5457
5400
|
}
|
|
5458
5401
|
let result = `${html}
|
|
5459
|
-
in ${componentName}
|
|
5402
|
+
in ${componentName}`;
|
|
5403
|
+
if (serverComponentName && clientComponentName) {
|
|
5404
|
+
result += ` (Server \u2192 Client: ${clientComponentName})`;
|
|
5405
|
+
}
|
|
5406
|
+
result += ` at ${fileName}`;
|
|
5460
5407
|
if (isNextProject && lineNumber && columnNumber) {
|
|
5461
5408
|
result += `:${lineNumber}:${columnNumber}`;
|
|
5462
5409
|
}
|
|
5463
|
-
if (serverBoundary) {
|
|
5464
|
-
result += ` (via Server: ${serverBoundary})`;
|
|
5465
|
-
}
|
|
5466
5410
|
return result;
|
|
5467
5411
|
};
|
|
5468
5412
|
var getFileName = (stack) => {
|
|
@@ -5901,81 +5845,43 @@ var DEFAULT_THEME = {
|
|
|
5901
5845
|
enabled: true
|
|
5902
5846
|
}
|
|
5903
5847
|
};
|
|
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
|
-
};
|
|
5848
|
+
var mergeThemeWithBase = (baseTheme, partialTheme) => ({
|
|
5849
|
+
enabled: partialTheme.enabled ?? baseTheme.enabled,
|
|
5850
|
+
hue: partialTheme.hue ?? baseTheme.hue,
|
|
5851
|
+
selectionBox: {
|
|
5852
|
+
enabled: partialTheme.selectionBox?.enabled ?? baseTheme.selectionBox.enabled,
|
|
5853
|
+
color: partialTheme.selectionBox?.color ?? baseTheme.selectionBox.color,
|
|
5854
|
+
borderRadius: partialTheme.selectionBox?.borderRadius ?? baseTheme.selectionBox.borderRadius
|
|
5855
|
+
},
|
|
5856
|
+
dragBox: {
|
|
5857
|
+
enabled: partialTheme.dragBox?.enabled ?? baseTheme.dragBox.enabled,
|
|
5858
|
+
color: partialTheme.dragBox?.color ?? baseTheme.dragBox.color
|
|
5859
|
+
},
|
|
5860
|
+
grabbedBoxes: {
|
|
5861
|
+
enabled: partialTheme.grabbedBoxes?.enabled ?? baseTheme.grabbedBoxes.enabled,
|
|
5862
|
+
color: partialTheme.grabbedBoxes?.color ?? baseTheme.grabbedBoxes.color
|
|
5863
|
+
},
|
|
5864
|
+
elementLabel: {
|
|
5865
|
+
enabled: partialTheme.elementLabel?.enabled ?? baseTheme.elementLabel.enabled,
|
|
5866
|
+
backgroundColor: partialTheme.elementLabel?.backgroundColor ?? baseTheme.elementLabel.backgroundColor,
|
|
5867
|
+
textColor: partialTheme.elementLabel?.textColor ?? baseTheme.elementLabel.textColor,
|
|
5868
|
+
borderColor: partialTheme.elementLabel?.borderColor ?? baseTheme.elementLabel.borderColor,
|
|
5869
|
+
padding: partialTheme.elementLabel?.padding ?? baseTheme.elementLabel.padding,
|
|
5870
|
+
cursorOffset: partialTheme.elementLabel?.cursorOffset ?? baseTheme.elementLabel.cursorOffset
|
|
5871
|
+
},
|
|
5872
|
+
successLabels: {
|
|
5873
|
+
enabled: partialTheme.successLabels?.enabled ?? baseTheme.successLabels.enabled
|
|
5874
|
+
},
|
|
5875
|
+
crosshair: {
|
|
5876
|
+
enabled: partialTheme.crosshair?.enabled ?? baseTheme.crosshair.enabled,
|
|
5877
|
+
color: partialTheme.crosshair?.color ?? baseTheme.crosshair.color
|
|
5878
|
+
},
|
|
5879
|
+
inputOverlay: {
|
|
5880
|
+
enabled: partialTheme.inputOverlay?.enabled ?? baseTheme.inputOverlay.enabled
|
|
5881
|
+
}
|
|
5882
|
+
});
|
|
5883
|
+
var mergeTheme = (userTheme) => userTheme ? mergeThemeWithBase(DEFAULT_THEME, userTheme) : DEFAULT_THEME;
|
|
5884
|
+
var deepMergeTheme = mergeThemeWithBase;
|
|
5979
5885
|
|
|
5980
5886
|
// src/utils/agent-session.ts
|
|
5981
5887
|
var STORAGE_KEY = "react-grab:agent-sessions";
|
|
@@ -6065,10 +5971,17 @@ var generateSnippet = async (elements) => {
|
|
|
6065
5971
|
};
|
|
6066
5972
|
|
|
6067
5973
|
// src/agent.ts
|
|
6068
|
-
var createAgentManager = (
|
|
5974
|
+
var createAgentManager = (initialAgentOptions) => {
|
|
6069
5975
|
const [sessions, setSessions] = createSignal(/* @__PURE__ */ new Map());
|
|
6070
5976
|
const abortControllers = /* @__PURE__ */ new Map();
|
|
6071
5977
|
const sessionElements = /* @__PURE__ */ new Map();
|
|
5978
|
+
let agentOptions = initialAgentOptions;
|
|
5979
|
+
const setOptions = (options) => {
|
|
5980
|
+
agentOptions = options;
|
|
5981
|
+
};
|
|
5982
|
+
const getOptions = () => {
|
|
5983
|
+
return agentOptions;
|
|
5984
|
+
};
|
|
6072
5985
|
const isProcessing = () => sessions().size > 0;
|
|
6073
5986
|
const executeSessionStream = async (session, streamIterator) => {
|
|
6074
5987
|
const storage = agentOptions?.storage;
|
|
@@ -6252,12 +6165,14 @@ var createAgentManager = (agentOptions) => {
|
|
|
6252
6165
|
abortSession,
|
|
6253
6166
|
abortAllSessions,
|
|
6254
6167
|
updateSessionBoundsOnViewportChange,
|
|
6255
|
-
getSessionElement
|
|
6168
|
+
getSessionElement,
|
|
6169
|
+
setOptions,
|
|
6170
|
+
getOptions
|
|
6256
6171
|
};
|
|
6257
6172
|
};
|
|
6258
6173
|
|
|
6259
6174
|
// src/core.tsx
|
|
6260
|
-
var _tmpl$
|
|
6175
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<span class="tabular-nums align-middle">`);
|
|
6261
6176
|
var _tmpl$23 = /* @__PURE__ */ template(`<span class="font-mono tabular-nums align-middle"><<!>>`);
|
|
6262
6177
|
var _tmpl$33 = /* @__PURE__ */ template(`<span class="tabular-nums ml-1 align-middle"> in `);
|
|
6263
6178
|
var hasInited = false;
|
|
@@ -6272,6 +6187,34 @@ var getScriptOptions = () => {
|
|
|
6272
6187
|
}
|
|
6273
6188
|
};
|
|
6274
6189
|
var init = (rawOptions) => {
|
|
6190
|
+
const initialTheme = mergeTheme(rawOptions?.theme);
|
|
6191
|
+
if (typeof window === "undefined") {
|
|
6192
|
+
return {
|
|
6193
|
+
activate: () => {
|
|
6194
|
+
},
|
|
6195
|
+
deactivate: () => {
|
|
6196
|
+
},
|
|
6197
|
+
toggle: () => {
|
|
6198
|
+
},
|
|
6199
|
+
isActive: () => false,
|
|
6200
|
+
dispose: () => {
|
|
6201
|
+
},
|
|
6202
|
+
copyElement: () => Promise.resolve(false),
|
|
6203
|
+
getState: () => ({
|
|
6204
|
+
isActive: false,
|
|
6205
|
+
isDragging: false,
|
|
6206
|
+
isCopying: false,
|
|
6207
|
+
isInputMode: false,
|
|
6208
|
+
targetElement: null,
|
|
6209
|
+
dragBounds: null
|
|
6210
|
+
}),
|
|
6211
|
+
updateTheme: () => {
|
|
6212
|
+
},
|
|
6213
|
+
getTheme: () => initialTheme,
|
|
6214
|
+
setAgent: () => {
|
|
6215
|
+
}
|
|
6216
|
+
};
|
|
6217
|
+
}
|
|
6275
6218
|
const scriptOptions = getScriptOptions();
|
|
6276
6219
|
const options = {
|
|
6277
6220
|
enabled: true,
|
|
@@ -6280,7 +6223,7 @@ var init = (rawOptions) => {
|
|
|
6280
6223
|
...scriptOptions,
|
|
6281
6224
|
...rawOptions
|
|
6282
6225
|
};
|
|
6283
|
-
const
|
|
6226
|
+
const mergedTheme = mergeTheme(options.theme);
|
|
6284
6227
|
if (options.enabled === false || hasInited) {
|
|
6285
6228
|
return {
|
|
6286
6229
|
activate: () => {
|
|
@@ -6303,13 +6246,15 @@ var init = (rawOptions) => {
|
|
|
6303
6246
|
}),
|
|
6304
6247
|
updateTheme: () => {
|
|
6305
6248
|
},
|
|
6306
|
-
getTheme: () =>
|
|
6249
|
+
getTheme: () => mergedTheme,
|
|
6250
|
+
setAgent: () => {
|
|
6251
|
+
}
|
|
6307
6252
|
};
|
|
6308
6253
|
}
|
|
6309
6254
|
hasInited = true;
|
|
6310
6255
|
const logIntro = () => {
|
|
6311
6256
|
try {
|
|
6312
|
-
const version = "0.0.
|
|
6257
|
+
const version = "0.0.57";
|
|
6313
6258
|
const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
|
|
6314
6259
|
console.log(`%cReact Grab${version ? ` v${version}` : ""}%c
|
|
6315
6260
|
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;`, "");
|
|
@@ -6330,7 +6275,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6330
6275
|
};
|
|
6331
6276
|
logIntro();
|
|
6332
6277
|
return createRoot((dispose2) => {
|
|
6333
|
-
const [theme, setTheme] = createSignal(
|
|
6278
|
+
const [theme, setTheme] = createSignal(mergedTheme);
|
|
6334
6279
|
const [isHoldingKeys, setIsHoldingKeys] = createSignal(false);
|
|
6335
6280
|
const [mouseX, setMouseX] = createSignal(OFFSCREEN_POSITION);
|
|
6336
6281
|
const [mouseY, setMouseY] = createSignal(OFFSCREEN_POSITION);
|
|
@@ -6358,12 +6303,53 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6358
6303
|
const [isToggleFrozen, setIsToggleFrozen] = createSignal(false);
|
|
6359
6304
|
const [isInputExpanded, setIsInputExpanded] = createSignal(false);
|
|
6360
6305
|
const [frozenElement, setFrozenElement] = createSignal(null);
|
|
6306
|
+
const [hasAgentProvider, setHasAgentProvider] = createSignal(Boolean(options.agent?.provider));
|
|
6361
6307
|
const [nativeSelectionCursorX, setNativeSelectionCursorX] = createSignal(OFFSCREEN_POSITION);
|
|
6362
6308
|
const [nativeSelectionCursorY, setNativeSelectionCursorY] = createSignal(OFFSCREEN_POSITION);
|
|
6363
6309
|
const [hasNativeSelection, setHasNativeSelection] = createSignal(false);
|
|
6364
6310
|
const [nativeSelectionElements, setNativeSelectionElements] = createSignal([]);
|
|
6365
|
-
const
|
|
6366
|
-
const
|
|
6311
|
+
const extractElementTagName = (element) => (element.tagName || "").toLowerCase();
|
|
6312
|
+
const nativeSelectionTagName = createMemo(() => {
|
|
6313
|
+
const elements = nativeSelectionElements();
|
|
6314
|
+
if (elements.length === 0 || !elements[0]) return void 0;
|
|
6315
|
+
return extractElementTagName(elements[0]) || void 0;
|
|
6316
|
+
});
|
|
6317
|
+
const nativeSelectionComponentName = createMemo(() => {
|
|
6318
|
+
const elements = nativeSelectionElements();
|
|
6319
|
+
if (elements.length === 0 || !elements[0]) return void 0;
|
|
6320
|
+
return getNearestComponentName(elements[0]) || void 0;
|
|
6321
|
+
});
|
|
6322
|
+
const clearNativeSelectionState = () => {
|
|
6323
|
+
setNativeSelectionCursorX(OFFSCREEN_POSITION);
|
|
6324
|
+
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
6325
|
+
setNativeSelectionElements([]);
|
|
6326
|
+
};
|
|
6327
|
+
const recalculateNativeSelectionCursor = () => {
|
|
6328
|
+
const currentSelection = window.getSelection();
|
|
6329
|
+
if (!currentSelection || currentSelection.isCollapsed || currentSelection.rangeCount === 0) {
|
|
6330
|
+
return;
|
|
6331
|
+
}
|
|
6332
|
+
const range = currentSelection.getRangeAt(0);
|
|
6333
|
+
const clientRects = range.getClientRects();
|
|
6334
|
+
if (clientRects.length === 0) return;
|
|
6335
|
+
const isBackward = (() => {
|
|
6336
|
+
if (!currentSelection.anchorNode || !currentSelection.focusNode) return false;
|
|
6337
|
+
const position = currentSelection.anchorNode.compareDocumentPosition(currentSelection.focusNode);
|
|
6338
|
+
if (position & Node.DOCUMENT_POSITION_FOLLOWING) return false;
|
|
6339
|
+
if (position & Node.DOCUMENT_POSITION_PRECEDING) return true;
|
|
6340
|
+
return currentSelection.anchorOffset > currentSelection.focusOffset;
|
|
6341
|
+
})();
|
|
6342
|
+
const cursorRect = isBackward ? clientRects[0] : clientRects[clientRects.length - 1];
|
|
6343
|
+
const cursorX = isBackward ? cursorRect.left : cursorRect.right;
|
|
6344
|
+
const cursorY = cursorRect.top + cursorRect.height / 2;
|
|
6345
|
+
setNativeSelectionCursorX(cursorX);
|
|
6346
|
+
setNativeSelectionCursorY(cursorY);
|
|
6347
|
+
};
|
|
6348
|
+
createEffect(on(() => viewportVersion(), () => {
|
|
6349
|
+
if (hasNativeSelection()) {
|
|
6350
|
+
recalculateNativeSelectionCursor();
|
|
6351
|
+
}
|
|
6352
|
+
}));
|
|
6367
6353
|
const nativeSelectionBounds = createMemo(() => {
|
|
6368
6354
|
viewportVersion();
|
|
6369
6355
|
const elements = nativeSelectionElements();
|
|
@@ -6415,7 +6401,6 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6415
6401
|
setSuccessLabels((previousLabels) => previousLabels.filter((label) => label.id !== labelId));
|
|
6416
6402
|
}, SUCCESS_LABEL_DURATION_MS);
|
|
6417
6403
|
};
|
|
6418
|
-
const extractElementTagName = (element) => (element.tagName || "").toLowerCase();
|
|
6419
6404
|
const extractElementTagNameForSuccess = (element) => {
|
|
6420
6405
|
const tagName = extractElementTagName(element);
|
|
6421
6406
|
return tagName ? `<${tagName}>` : "1 element";
|
|
@@ -6470,9 +6455,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6470
6455
|
}, COPIED_LABEL_DURATION_MS);
|
|
6471
6456
|
}
|
|
6472
6457
|
if (isToggleMode()) {
|
|
6473
|
-
|
|
6474
|
-
deactivateRenderer();
|
|
6475
|
-
}, COPIED_LABEL_DURATION_MS + 350);
|
|
6458
|
+
deactivateRenderer();
|
|
6476
6459
|
}
|
|
6477
6460
|
});
|
|
6478
6461
|
};
|
|
@@ -6487,28 +6470,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6487
6470
|
const tryCopyWithFallback = async (elements, extraPrompt) => {
|
|
6488
6471
|
let didCopy = false;
|
|
6489
6472
|
let copiedContent = "";
|
|
6490
|
-
const isReactProject = Ee();
|
|
6491
6473
|
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
6474
|
try {
|
|
6513
6475
|
const elementSnippetResults = await Promise.allSettled(elements.map((element) => formatElementInfo(element)));
|
|
6514
6476
|
const elementSnippets = [];
|
|
@@ -6596,16 +6558,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6596
6558
|
viewportVersion();
|
|
6597
6559
|
const element = targetElement();
|
|
6598
6560
|
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
|
-
};
|
|
6561
|
+
return createElementBounds(element);
|
|
6609
6562
|
});
|
|
6610
6563
|
const calculateDragDistance = (endX, endY) => {
|
|
6611
6564
|
const endPageX = endX + window.scrollX;
|
|
@@ -6651,7 +6604,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6651
6604
|
const copying = isCopying();
|
|
6652
6605
|
if (!element) {
|
|
6653
6606
|
return (() => {
|
|
6654
|
-
var _el$ = _tmpl$
|
|
6607
|
+
var _el$ = _tmpl$16();
|
|
6655
6608
|
insert(_el$, copying ? "Please wait\u2026" : "1 element");
|
|
6656
6609
|
return _el$;
|
|
6657
6610
|
})();
|
|
@@ -6677,21 +6630,12 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6677
6630
|
})();
|
|
6678
6631
|
}
|
|
6679
6632
|
return (() => {
|
|
6680
|
-
var _el$10 = _tmpl$
|
|
6633
|
+
var _el$10 = _tmpl$16();
|
|
6681
6634
|
insert(_el$10, copying ? "Please wait\u2026" : "1 element");
|
|
6682
6635
|
return _el$10;
|
|
6683
6636
|
})();
|
|
6684
6637
|
});
|
|
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() ? {
|
|
6638
|
+
const cursorPosition = createMemo(() => isCopying() ? {
|
|
6695
6639
|
x: copyStartX(),
|
|
6696
6640
|
y: copyStartY()
|
|
6697
6641
|
} : {
|
|
@@ -6770,7 +6714,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6770
6714
|
y: y2
|
|
6771
6715
|
});
|
|
6772
6716
|
}));
|
|
6773
|
-
createEffect(on(() => [labelVisible(), labelVariant(), labelContent(),
|
|
6717
|
+
createEffect(on(() => [labelVisible(), labelVariant(), labelContent(), cursorPosition()], ([visible, variant, content, position]) => {
|
|
6774
6718
|
const contentString = typeof content === "string" ? content : "";
|
|
6775
6719
|
options.onElementLabel?.(Boolean(visible), variant, {
|
|
6776
6720
|
x: position.x,
|
|
@@ -6922,32 +6866,19 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6922
6866
|
deactivateRenderer();
|
|
6923
6867
|
return;
|
|
6924
6868
|
}
|
|
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
|
-
};
|
|
6869
|
+
const bounds = createElementBounds(element);
|
|
6935
6870
|
const currentX = bounds.x + bounds.width / 2;
|
|
6936
6871
|
const currentY = bounds.y + bounds.height / 2;
|
|
6937
6872
|
setMouseX(currentX);
|
|
6938
6873
|
setMouseY(currentY);
|
|
6939
|
-
if (
|
|
6940
|
-
const positionX = mouseX();
|
|
6941
|
-
const positionY = mouseY();
|
|
6942
|
-
setInputText("");
|
|
6943
|
-
setIsInputMode(false);
|
|
6874
|
+
if (hasAgentProvider() && prompt) {
|
|
6944
6875
|
deactivateRenderer();
|
|
6945
6876
|
void agentManager.startSession({
|
|
6946
6877
|
element,
|
|
6947
6878
|
prompt,
|
|
6948
6879
|
position: {
|
|
6949
|
-
x:
|
|
6950
|
-
y:
|
|
6880
|
+
x: currentX,
|
|
6881
|
+
y: currentY
|
|
6951
6882
|
},
|
|
6952
6883
|
selectionBounds: bounds
|
|
6953
6884
|
});
|
|
@@ -6978,11 +6909,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6978
6909
|
const bounds = nativeSelectionBounds();
|
|
6979
6910
|
const tagName = nativeSelectionTagName();
|
|
6980
6911
|
setHasNativeSelection(false);
|
|
6981
|
-
|
|
6982
|
-
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
6983
|
-
setNativeSelectionElements([]);
|
|
6984
|
-
setNativeSelectionTagName(void 0);
|
|
6985
|
-
setNativeSelectionComponentName(void 0);
|
|
6912
|
+
clearNativeSelectionState();
|
|
6986
6913
|
window.getSelection()?.removeAllRanges();
|
|
6987
6914
|
if (elements.length === 1) {
|
|
6988
6915
|
await executeCopyOperation(currentX, currentY, () => copySingleElementToClipboard(elements[0]), bounds, tagName);
|
|
@@ -6997,11 +6924,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6997
6924
|
const currentX = bounds ? bounds.x + bounds.width / 2 : nativeSelectionCursorX();
|
|
6998
6925
|
const currentY = bounds ? bounds.y + bounds.height / 2 : nativeSelectionCursorY();
|
|
6999
6926
|
setHasNativeSelection(false);
|
|
7000
|
-
|
|
7001
|
-
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
7002
|
-
setNativeSelectionElements([]);
|
|
7003
|
-
setNativeSelectionTagName(void 0);
|
|
7004
|
-
setNativeSelectionComponentName(void 0);
|
|
6927
|
+
clearNativeSelectionState();
|
|
7005
6928
|
window.getSelection()?.removeAllRanges();
|
|
7006
6929
|
setMouseX(currentX);
|
|
7007
6930
|
setMouseY(currentY);
|
|
@@ -7061,7 +6984,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7061
6984
|
transform: stripTranslateFromTransform(firstElement)
|
|
7062
6985
|
};
|
|
7063
6986
|
const tagName = extractElementTagName(firstElement);
|
|
7064
|
-
if (
|
|
6987
|
+
if (hasAgentProvider()) {
|
|
7065
6988
|
const centerX = bounds.x + bounds.width / 2;
|
|
7066
6989
|
const centerY = bounds.y + bounds.height / 2;
|
|
7067
6990
|
setMouseX(centerX);
|
|
@@ -7079,16 +7002,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7079
7002
|
const element = getElementAtPosition(clientX, clientY);
|
|
7080
7003
|
if (!element) return;
|
|
7081
7004
|
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
|
-
};
|
|
7005
|
+
const bounds = createElementBounds(element);
|
|
7092
7006
|
const tagName = extractElementTagName(element);
|
|
7093
7007
|
void executeCopyOperation(clientX, clientY, () => copySingleElementToClipboard(element), bounds, tagName, element);
|
|
7094
7008
|
}
|
|
@@ -7361,11 +7275,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7361
7275
|
setHasNativeSelection(false);
|
|
7362
7276
|
const selection = window.getSelection();
|
|
7363
7277
|
if (!selection || selection.isCollapsed || selection.rangeCount === 0) {
|
|
7364
|
-
|
|
7365
|
-
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
7366
|
-
setNativeSelectionElements([]);
|
|
7367
|
-
setNativeSelectionTagName(void 0);
|
|
7368
|
-
setNativeSelectionComponentName(void 0);
|
|
7278
|
+
clearNativeSelectionState();
|
|
7369
7279
|
return;
|
|
7370
7280
|
}
|
|
7371
7281
|
selectionDebounceTimerId = window.setTimeout(() => {
|
|
@@ -7394,11 +7304,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7394
7304
|
const cursorX = isBackward ? cursorRect.left : cursorRect.right;
|
|
7395
7305
|
const cursorY = cursorRect.top + cursorRect.height / 2;
|
|
7396
7306
|
if (isSelectionInsideEditableElement(cursorX, cursorY)) {
|
|
7397
|
-
|
|
7398
|
-
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
7399
|
-
setNativeSelectionElements([]);
|
|
7400
|
-
setNativeSelectionTagName(void 0);
|
|
7401
|
-
setNativeSelectionComponentName(void 0);
|
|
7307
|
+
clearNativeSelectionState();
|
|
7402
7308
|
return;
|
|
7403
7309
|
}
|
|
7404
7310
|
setNativeSelectionCursorX(cursorX);
|
|
@@ -7407,13 +7313,9 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7407
7313
|
const element = container.nodeType === Node.ELEMENT_NODE ? container : container.parentElement;
|
|
7408
7314
|
if (element && isValidGrabbableElement(element)) {
|
|
7409
7315
|
setNativeSelectionElements([element]);
|
|
7410
|
-
setNativeSelectionTagName(extractElementTagName(element) || void 0);
|
|
7411
|
-
setNativeSelectionComponentName(getNearestComponentName(element) || void 0);
|
|
7412
7316
|
setHasNativeSelection(true);
|
|
7413
7317
|
} else {
|
|
7414
7318
|
setNativeSelectionElements([]);
|
|
7415
|
-
setNativeSelectionTagName(void 0);
|
|
7416
|
-
setNativeSelectionComponentName(void 0);
|
|
7417
7319
|
}
|
|
7418
7320
|
}, 150);
|
|
7419
7321
|
}, {
|
|
@@ -7449,18 +7351,9 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7449
7351
|
if (!instance.element || !document.body.contains(instance.element)) {
|
|
7450
7352
|
return instance;
|
|
7451
7353
|
}
|
|
7452
|
-
const elementRect = instance.element.getBoundingClientRect();
|
|
7453
|
-
const computedStyle = window.getComputedStyle(instance.element);
|
|
7454
7354
|
return {
|
|
7455
7355
|
...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
|
-
}
|
|
7356
|
+
bounds: createElementBounds(instance.element)
|
|
7464
7357
|
};
|
|
7465
7358
|
});
|
|
7466
7359
|
});
|
|
@@ -7519,10 +7412,10 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7519
7412
|
},
|
|
7520
7413
|
labelZIndex: Z_INDEX_LABEL,
|
|
7521
7414
|
get mouseX() {
|
|
7522
|
-
return
|
|
7415
|
+
return cursorPosition().x;
|
|
7523
7416
|
},
|
|
7524
7417
|
get mouseY() {
|
|
7525
|
-
return
|
|
7418
|
+
return cursorPosition().y;
|
|
7526
7419
|
},
|
|
7527
7420
|
get crosshairVisible() {
|
|
7528
7421
|
return crosshairVisible();
|
|
@@ -7534,7 +7427,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7534
7427
|
return isInputExpanded();
|
|
7535
7428
|
},
|
|
7536
7429
|
get hasAgent() {
|
|
7537
|
-
return
|
|
7430
|
+
return hasAgentProvider();
|
|
7538
7431
|
},
|
|
7539
7432
|
get agentSessions() {
|
|
7540
7433
|
return agentManager.sessions();
|
|
@@ -7569,7 +7462,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7569
7462
|
}
|
|
7570
7463
|
}), rendererRoot);
|
|
7571
7464
|
}
|
|
7572
|
-
if (
|
|
7465
|
+
if (hasAgentProvider()) {
|
|
7573
7466
|
agentManager.tryResumeSessions();
|
|
7574
7467
|
}
|
|
7575
7468
|
const copyElementAPI = async (elements) => {
|
|
@@ -7622,16 +7515,45 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7622
7515
|
getState: getStateAPI,
|
|
7623
7516
|
updateTheme: (partialTheme) => {
|
|
7624
7517
|
const currentTheme = theme();
|
|
7625
|
-
const
|
|
7626
|
-
setTheme(
|
|
7518
|
+
const mergedTheme2 = deepMergeTheme(currentTheme, partialTheme);
|
|
7519
|
+
setTheme(mergedTheme2);
|
|
7627
7520
|
},
|
|
7628
|
-
getTheme: () => theme()
|
|
7521
|
+
getTheme: () => theme(),
|
|
7522
|
+
setAgent: (newAgentOptions) => {
|
|
7523
|
+
const existingOptions = agentManager.getOptions();
|
|
7524
|
+
const mergedOptions = {
|
|
7525
|
+
...existingOptions,
|
|
7526
|
+
...newAgentOptions,
|
|
7527
|
+
provider: newAgentOptions.provider ?? existingOptions?.provider,
|
|
7528
|
+
onAbort: (session, element) => {
|
|
7529
|
+
newAgentOptions?.onAbort?.(session, element);
|
|
7530
|
+
if (element && document.contains(element)) {
|
|
7531
|
+
const rect = element.getBoundingClientRect();
|
|
7532
|
+
const centerX = rect.left + rect.width / 2;
|
|
7533
|
+
const centerY = rect.top + rect.height / 2;
|
|
7534
|
+
setMouseX(centerX);
|
|
7535
|
+
setMouseY(centerY);
|
|
7536
|
+
setFrozenElement(element);
|
|
7537
|
+
setInputText(session.context.prompt);
|
|
7538
|
+
setIsInputExpanded(true);
|
|
7539
|
+
setIsInputMode(true);
|
|
7540
|
+
setIsToggleMode(true);
|
|
7541
|
+
setIsToggleFrozen(true);
|
|
7542
|
+
if (!isActivated()) {
|
|
7543
|
+
activateRenderer();
|
|
7544
|
+
}
|
|
7545
|
+
}
|
|
7546
|
+
}
|
|
7547
|
+
};
|
|
7548
|
+
agentManager.setOptions(mergedOptions);
|
|
7549
|
+
setHasAgentProvider(Boolean(mergedOptions.provider));
|
|
7550
|
+
}
|
|
7629
7551
|
};
|
|
7630
7552
|
});
|
|
7631
7553
|
};
|
|
7632
7554
|
/*! Bundled license information:
|
|
7633
7555
|
|
|
7634
|
-
bippy/dist/rdt-hook-
|
|
7556
|
+
bippy/dist/rdt-hook-Ds2lt3Ph.js:
|
|
7635
7557
|
(**
|
|
7636
7558
|
* @license bippy
|
|
7637
7559
|
*
|
|
@@ -7641,7 +7563,7 @@ bippy/dist/rdt-hook-CrcWl4lP.js:
|
|
|
7641
7563
|
* LICENSE file in the root directory of this source tree.
|
|
7642
7564
|
*)
|
|
7643
7565
|
|
|
7644
|
-
bippy/dist/install-hook-only-
|
|
7566
|
+
bippy/dist/install-hook-only-BE254Zqc.js:
|
|
7645
7567
|
(**
|
|
7646
7568
|
* @license bippy
|
|
7647
7569
|
*
|
|
@@ -7651,7 +7573,7 @@ bippy/dist/install-hook-only-DtUPvEBg.js:
|
|
|
7651
7573
|
* LICENSE file in the root directory of this source tree.
|
|
7652
7574
|
*)
|
|
7653
7575
|
|
|
7654
|
-
bippy/dist/core-
|
|
7576
|
+
bippy/dist/core-BKZAzaFk.js:
|
|
7655
7577
|
(**
|
|
7656
7578
|
* @license bippy
|
|
7657
7579
|
*
|