react-grab 0.0.71 → 0.0.72
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-HJLMLJJA.js → chunk-DZ2VZRJA.js} +420 -146
- package/dist/{chunk-RPPUX2ZU.cjs → chunk-GFBDYRPI.cjs} +420 -146
- package/dist/{core-Dm5hxkI3.d.cts → core-HtZR37lF.d.cts} +7 -2
- package/dist/{core-Dm5hxkI3.d.ts → core-HtZR37lF.d.ts} +7 -2
- package/dist/core.cjs +7 -7
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/core.js +1 -1
- package/dist/index.cjs +8 -8
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.global.js +27 -27
- package/dist/index.js +2 -2
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -578,6 +578,61 @@ function mapArray(list, mapFn, options = {}) {
|
|
|
578
578
|
}
|
|
579
579
|
};
|
|
580
580
|
}
|
|
581
|
+
function indexArray(list, mapFn, options = {}) {
|
|
582
|
+
let items = [], mapped = [], disposers = [], signals = [], len = 0, i2;
|
|
583
|
+
onCleanup(() => dispose(disposers));
|
|
584
|
+
return () => {
|
|
585
|
+
const newItems = list() || [], newLen = newItems.length;
|
|
586
|
+
newItems[$TRACK];
|
|
587
|
+
return untrack(() => {
|
|
588
|
+
if (newLen === 0) {
|
|
589
|
+
if (len !== 0) {
|
|
590
|
+
dispose(disposers);
|
|
591
|
+
disposers = [];
|
|
592
|
+
items = [];
|
|
593
|
+
mapped = [];
|
|
594
|
+
len = 0;
|
|
595
|
+
signals = [];
|
|
596
|
+
}
|
|
597
|
+
if (options.fallback) {
|
|
598
|
+
items = [FALLBACK];
|
|
599
|
+
mapped[0] = createRoot((disposer) => {
|
|
600
|
+
disposers[0] = disposer;
|
|
601
|
+
return options.fallback();
|
|
602
|
+
});
|
|
603
|
+
len = 1;
|
|
604
|
+
}
|
|
605
|
+
return mapped;
|
|
606
|
+
}
|
|
607
|
+
if (items[0] === FALLBACK) {
|
|
608
|
+
disposers[0]();
|
|
609
|
+
disposers = [];
|
|
610
|
+
items = [];
|
|
611
|
+
mapped = [];
|
|
612
|
+
len = 0;
|
|
613
|
+
}
|
|
614
|
+
for (i2 = 0; i2 < newLen; i2++) {
|
|
615
|
+
if (i2 < items.length && items[i2] !== newItems[i2]) {
|
|
616
|
+
signals[i2](() => newItems[i2]);
|
|
617
|
+
} else if (i2 >= items.length) {
|
|
618
|
+
mapped[i2] = createRoot(mapper);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
for (; i2 < items.length; i2++) {
|
|
622
|
+
disposers[i2]();
|
|
623
|
+
}
|
|
624
|
+
len = signals.length = disposers.length = newLen;
|
|
625
|
+
items = newItems.slice(0);
|
|
626
|
+
return mapped = mapped.slice(0, len);
|
|
627
|
+
});
|
|
628
|
+
function mapper(disposer) {
|
|
629
|
+
disposers[i2] = disposer;
|
|
630
|
+
const [s3, set] = createSignal(newItems[i2]);
|
|
631
|
+
signals[i2] = set;
|
|
632
|
+
return mapFn(s3, i2);
|
|
633
|
+
}
|
|
634
|
+
};
|
|
635
|
+
}
|
|
581
636
|
function createComponent(Comp, props) {
|
|
582
637
|
return untrack(() => Comp(props || {}));
|
|
583
638
|
}
|
|
@@ -588,6 +643,12 @@ function For(props) {
|
|
|
588
643
|
};
|
|
589
644
|
return createMemo(mapArray(() => props.each, props.children, fallback || void 0));
|
|
590
645
|
}
|
|
646
|
+
function Index(props) {
|
|
647
|
+
const fallback = "fallback" in props && {
|
|
648
|
+
fallback: () => props.fallback
|
|
649
|
+
};
|
|
650
|
+
return createMemo(indexArray(() => props.each, props.children, fallback || void 0));
|
|
651
|
+
}
|
|
591
652
|
function Show(props) {
|
|
592
653
|
const keyed = props.keyed;
|
|
593
654
|
const conditionValue = createMemo(() => props.when, void 0, void 0);
|
|
@@ -890,7 +951,7 @@ function cleanChildren(parent, current, marker, replacement) {
|
|
|
890
951
|
|
|
891
952
|
// dist/styles.css
|
|
892
953
|
var styles_default = `/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
|
|
893
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--font-weight-medium:500;--radius-xs:.125rem;--ease-out:cubic-bezier(0,0,.2,1);--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-grab-pink:#b21c8e;--color-grab-purple:#d239c0;--color-label-tag-border:#730079;--color-label-muted:#767676}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.top-0{top:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.z-2147483645{z-index:2147483645}.z-2147483646{z-index:2147483646}.z-2147483647{z-index:2147483647}.z-\\[2147483645\\]{z-index:2147483645}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.-ml-\\[2px\\]{margin-left:-2px}.ml-1{margin-left:calc(var(--spacing)*1)}.box-border{box-sizing:border-box}.flex{display:flex}.grid{display:grid}.hidden{display:none}.size-fit{width:fit-content;height:fit-content}.h-0{height:calc(var(--spacing)*0)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-5\\.5{height:calc(var(--spacing)*5.5)}.h-\\[7px\\]{height:7px}.h-\\[9px\\]{height:9px}.h-\\[17px\\]{height:17px}.h-\\[18px\\]{height:18px}.h-fit{height:fit-content}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-4{min-height:calc(var(--spacing)*4)}.w-0{width:calc(var(--spacing)*0)}.w-0\\.5{width:calc(var(--spacing)*.5)}.w-1{width:calc(var(--spacing)*1)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-\\[7px\\]{width:7px}.w-\\[17px\\]{width:17px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-crosshair{cursor:crosshair}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-\\[3px\\]{gap:3px}.gap-\\[5px\\]{gap:5px}.gap-px{gap:1px}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-\\[1\\.5px\\]{border-radius:1.5px}.rounded-\\[1px\\]{border-radius:1px}.rounded-full{border-radius:3.40282e38px}.rounded-xs{border-radius:var(--radius-xs)}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-b-xs{border-bottom-right-radius:var(--radius-xs);border-bottom-left-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[\\#B3B3B3\\]{border-color:#b3b3b3}.border-grab-purple{border-color:var(--color-grab-purple)}.border-grab-purple\\/40{border-color:#d239c066}@supports (color:color-mix(in lab, red, red)){.border-grab-purple\\/40{border-color:color-mix(in oklab,var(--color-grab-purple)40%,transparent)}}.border-grab-purple\\/50{border-color:#d239c080}@supports (color:color-mix(in lab, red, red)){.border-grab-purple\\/50{border-color:color-mix(in oklab,var(--color-grab-purple)50%,transparent)}}.border-label-tag-border{border-color:var(--color-label-tag-border)}.border-white{border-color:var(--color-white)}.border-t-\\[\\#D9D9D9\\]{border-top-color:#d9d9d9}.bg-\\[\\#F7F7F7\\]{background-color:#f7f7f7}.bg-black{background-color:var(--color-black)}.bg-grab-pink{background-color:var(--color-grab-pink)}.bg-grab-purple{background-color:var(--color-grab-purple)}.bg-grab-purple\\/5{background-color:#d239c00d}@supports (color:color-mix(in lab, red, red)){.bg-grab-purple\\/5{background-color:color-mix(in oklab,var(--color-grab-purple)5%,transparent)}}.bg-grab-purple\\/8{background-color:#d239c014}@supports (color:color-mix(in lab, red, red)){.bg-grab-purple\\/8{background-color:color-mix(in oklab,var(--color-grab-purple)8%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-cover{background-size:cover}.bg-center{background-position:50%}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.px-0{padding-inline:calc(var(--spacing)*0)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-\\[2px\\]{padding-inline:2px}.px-\\[3px\\]{padding-inline:3px}.py-0{padding-block:calc(var(--spacing)*0)}.py-1{padding-block:calc(var(--spacing)*1)}.py-\\[2px\\]{padding-block:2px}.py-\\[3px\\]{padding-block:3px}.py-\\[5px\\]{padding-block:5px}.py-px{padding-block:1px}.pt-1{padding-top:calc(var(--spacing)*1)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-1\\.5{padding-right:calc(var(--spacing)*1.5)}.pl-1\\.5{padding-left:calc(var(--spacing)*1.5)}.align-middle{vertical-align:middle}.font-\\[ui-monospace\\,\\'SFMono-Regular\\'\\,\\'SF_Mono\\'\\,\\'Menlo\\'\\,\\'Consolas\\'\\,\\'Liberation_Mono\\'\\,monospace\\]{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-\\[11\\.5px\\]{font-size:11.5px}.text-\\[12px\\]{font-size:12px}.leading-3\\.5{--tw-leading:calc(var(--spacing)*3.5);line-height:calc(var(--spacing)*3.5)}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.tracking-\\[-0\\.04em\\]{--tw-tracking:-.04em;letter-spacing:-.04em}.tracking-\\[-0\\.08em\\]{--tw-tracking:-.08em;letter-spacing:-.08em}.wrap-break-word{overflow-wrap:break-word}.whitespace-normal{white-space:normal}.text-\\[\\#0C0C0C\\]{color:#0c0c0c}.text-\\[\\#47004A\\]{color:#47004a}.text-black{color:var(--color-black)}.text-label-muted{color:var(--color-label-muted)}.text-label-tag-border{color:var(--color-label-tag-border)}.text-white{color:var(--color-white)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-100{opacity:1}.opacity-\\[0\\.99\\]{opacity:.99}.brightness-125{--tw-brightness:brightness(125%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter-\\[drop-shadow\\(0px_0px_4px_\\#51515180\\)\\]{filter:drop-shadow(0 0 4px #51515180)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[width\\,height\\]{transition-property:width,height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-30{--tw-duration:30ms;transition-duration:30ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-\\[transform\\,width\\,height\\]{will-change:transform,width,height}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[font-synthesis\\:none\\]{font-synthesis:none}@media (hover:hover){.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:opacity-100:hover{opacity:1}}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@keyframes flash{0%{opacity:1;background-color:#d239c040;border-color:#d239c0}50%{opacity:1;background-color:#d239c073;border-color:#e650d2}to{opacity:1;background-color:#d239c014;border-color:#d239c080}}.react-grab-flash{animation:.4s ease-out forwards flash}.react-grab-shimmer{position:relative;overflow:hidden}.react-grab-shimmer:after{content:"";border-radius:inherit;pointer-events:none;background:linear-gradient(90deg,#0000 0%,#fff6 50%,#0000 100%) 0 0/200% 100%;animation:1.5s ease-in-out infinite shimmer;position:absolute;inset:0}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}`;
|
|
954
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--font-weight-medium:500;--radius-xs:.125rem;--ease-out:cubic-bezier(0,0,.2,1);--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-grab-pink:#b21c8e;--color-grab-purple:#d239c0;--color-label-tag-border:#730079;--color-label-muted:#767676}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.top-0{top:calc(var(--spacing)*0)}.left-0{left:calc(var(--spacing)*0)}.z-2147483645{z-index:2147483645}.z-2147483646{z-index:2147483646}.z-2147483647{z-index:2147483647}.z-\\[2147483645\\]{z-index:2147483645}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.m-0{margin:calc(var(--spacing)*0)}.-mt-px{margin-top:-1px}.-ml-\\[2px\\]{margin-left:-2px}.ml-1{margin-left:calc(var(--spacing)*1)}.box-border{box-sizing:border-box}.flex{display:flex}.grid{display:grid}.hidden{display:none}.size-fit{width:fit-content;height:fit-content}.h-0{height:calc(var(--spacing)*0)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-5\\.5{height:calc(var(--spacing)*5.5)}.h-\\[7px\\]{height:7px}.h-\\[17px\\]{height:17px}.h-\\[18px\\]{height:18px}.h-fit{height:fit-content}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-4{min-height:calc(var(--spacing)*4)}.w-0{width:calc(var(--spacing)*0)}.w-0\\.5{width:calc(var(--spacing)*.5)}.w-1{width:calc(var(--spacing)*1)}.w-\\[7px\\]{width:7px}.w-\\[17px\\]{width:17px}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.cursor-crosshair{cursor:crosshair}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.flex-col{flex-direction:column}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-\\[3px\\]{gap:3px}.gap-\\[5px\\]{gap:5px}.gap-px{gap:1px}.self-stretch{align-self:stretch}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded-\\[1\\.5px\\]{border-radius:1.5px}.rounded-\\[1px\\]{border-radius:1px}.rounded-full{border-radius:3.40282e38px}.rounded-xs{border-radius:var(--radius-xs)}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-b-xs{border-bottom-right-radius:var(--radius-xs);border-bottom-left-radius:var(--radius-xs)}.border{border-style:var(--tw-border-style);border-width:1px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[\\#7e0002\\]{border-color:#7e0002}.border-\\[\\#B3B3B3\\]{border-color:#b3b3b3}.border-grab-purple{border-color:var(--color-grab-purple)}.border-grab-purple\\/40{border-color:#d239c066}@supports (color:color-mix(in lab, red, red)){.border-grab-purple\\/40{border-color:color-mix(in oklab,var(--color-grab-purple)40%,transparent)}}.border-grab-purple\\/50{border-color:#d239c080}@supports (color:color-mix(in lab, red, red)){.border-grab-purple\\/50{border-color:color-mix(in oklab,var(--color-grab-purple)50%,transparent)}}.border-label-tag-border{border-color:var(--color-label-tag-border)}.border-white{border-color:var(--color-white)}.border-t-\\[\\#D9D9D9\\]{border-top-color:#d9d9d9}.bg-\\[\\#F7F7F7\\]{background-color:#f7f7f7}.bg-black{background-color:var(--color-black)}.bg-grab-pink{background-color:var(--color-grab-pink)}.bg-grab-purple{background-color:var(--color-grab-purple)}.bg-grab-purple\\/5{background-color:#d239c00d}@supports (color:color-mix(in lab, red, red)){.bg-grab-purple\\/5{background-color:color-mix(in oklab,var(--color-grab-purple)5%,transparent)}}.bg-grab-purple\\/8{background-color:#d239c014}@supports (color:color-mix(in lab, red, red)){.bg-grab-purple\\/8{background-color:color-mix(in oklab,var(--color-grab-purple)8%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.p-0{padding:calc(var(--spacing)*0)}.p-1{padding:calc(var(--spacing)*1)}.px-0{padding-inline:calc(var(--spacing)*0)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-\\[2px\\]{padding-inline:2px}.px-\\[3px\\]{padding-inline:3px}.py-0{padding-block:calc(var(--spacing)*0)}.py-1{padding-block:calc(var(--spacing)*1)}.py-\\[2px\\]{padding-block:2px}.py-\\[3px\\]{padding-block:3px}.py-\\[5px\\]{padding-block:5px}.py-px{padding-block:1px}.pt-1{padding-top:calc(var(--spacing)*1)}.pr-1{padding-right:calc(var(--spacing)*1)}.pr-1\\.5{padding-right:calc(var(--spacing)*1.5)}.pl-1\\.5{padding-left:calc(var(--spacing)*1.5)}.align-middle{vertical-align:middle}.font-\\[ui-monospace\\,\\'SFMono-Regular\\'\\,\\'SF_Mono\\'\\,\\'Menlo\\'\\,\\'Consolas\\'\\,\\'Liberation_Mono\\'\\,monospace\\]{font-family:ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace}.font-mono{font-family:var(--font-mono)}.font-sans{font-family:var(--font-sans)}.text-\\[11\\.5px\\]{font-size:11.5px}.text-\\[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}.tracking-\\[-0\\.08em\\]{--tw-tracking:-.08em;letter-spacing:-.08em}.wrap-break-word{overflow-wrap:break-word}.whitespace-normal{white-space:normal}.text-\\[\\#0C0C0C\\]{color:#0c0c0c}.text-\\[\\#47004A\\]{color:#47004a}.text-\\[\\#71717a\\]{color:#71717a}.text-\\[\\#B91C1C\\]{color:#b91c1c}.text-\\[\\#c00002\\]{color:#c00002}.text-black{color:var(--color-black)}.text-label-muted{color:var(--color-label-muted)}.text-label-tag-border{color:var(--color-label-tag-border)}.text-white{color:var(--color-white)}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-100{opacity:1}.opacity-\\[0\\.99\\]{opacity:.99}.brightness-125{--tw-brightness:brightness(125%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.filter-\\[drop-shadow\\(0px_0px_4px_\\#51515180\\)\\]{filter:drop-shadow(0 0 4px #51515180)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[width\\,height\\]{transition-property:width,height;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-none{transition-property:none}.duration-30{--tw-duration:30ms;transition-duration:30ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-\\[transform\\,width\\,height\\]{will-change:transform,width,height}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[font-synthesis\\:none\\]{font-synthesis:none}@media (hover:hover){.hover\\:scale-105:hover{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:bg-\\[\\#F5F5F5\\]:hover{background-color:#f5f5f5}.hover\\:bg-\\[\\#FEF2F2\\]:hover{background-color:#fef2f2}.hover\\:opacity-100:hover{opacity:1}}}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@keyframes pulse{50%{opacity:.5}}`;
|
|
894
955
|
|
|
895
956
|
// src/utils/is-keyboard-event-triggered-by-input.ts
|
|
896
957
|
var FORM_TAGS_AND_ROLES = [
|
|
@@ -1019,7 +1080,7 @@ var buildOpenFileUrl = (filePath, lineNumber) => {
|
|
|
1019
1080
|
};
|
|
1020
1081
|
|
|
1021
1082
|
// src/constants.ts
|
|
1022
|
-
var VERSION = "0.0.
|
|
1083
|
+
var VERSION = "0.0.72";
|
|
1023
1084
|
var VIEWPORT_MARGIN_PX = 8;
|
|
1024
1085
|
var OFFSCREEN_POSITION = -1e3;
|
|
1025
1086
|
var SELECTION_LERP_FACTOR = 0.95;
|
|
@@ -3601,7 +3662,7 @@ var SelectionBox = (props) => {
|
|
|
3601
3662
|
get children() {
|
|
3602
3663
|
var _el$ = _tmpl$();
|
|
3603
3664
|
createRenderEffect((_p$) => {
|
|
3604
|
-
var _v$ = cn("fixed box-border", props.variant === "drag" && "pointer-events-none", props.variant !== "drag" && "pointer-events-auto", props.variant === "grabbed" && "z-2147483645", props.variant !== "grabbed" && "z-2147483646", props.variant === "drag" && "border border-solid border-grab-purple/40 bg-grab-purple/5 will-change-[transform,width,height] cursor-crosshair", props.variant === "selection" && "border border-solid border-grab-purple/50 bg-grab-purple/8 transition-opacity duration-100 ease-out", props.variant === "grabbed" && "border border-solid
|
|
3665
|
+
var _v$ = cn("fixed box-border", props.variant === "drag" && "pointer-events-none", props.variant !== "drag" && "pointer-events-auto", props.variant === "grabbed" && "z-2147483645", props.variant !== "grabbed" && "z-2147483646", props.variant === "drag" && "border border-solid border-grab-purple/40 bg-grab-purple/5 will-change-[transform,width,height] cursor-crosshair", props.variant === "selection" && "border border-solid border-grab-purple/50 bg-grab-purple/8 transition-opacity duration-100 ease-out", props.variant === "grabbed" && "border border-solid border-grab-purple/50 bg-grab-purple/8", props.variant === "processing" && !props.isCompleted && "border border-solid border-grab-purple/50 bg-grab-purple/8", props.variant === "processing" && props.isCompleted && "border border-solid border-grab-purple/50 bg-grab-purple/8"), _v$2 = `${currentY()}px`, _v$3 = `${currentX()}px`, _v$4 = `${currentWidth()}px`, _v$5 = `${currentHeight()}px`, _v$6 = props.bounds.borderRadius, _v$7 = props.bounds.transform, _v$8 = props.isFading ? 0 : opacity(), _v$9 = props.variant === "drag" ? "layout paint size" : void 0;
|
|
3605
3666
|
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
3606
3667
|
_v$2 !== _p$.t && setStyleProperty(_el$, "top", _p$.t = _v$2);
|
|
3607
3668
|
_v$3 !== _p$.a && setStyleProperty(_el$, "left", _p$.a = _v$3);
|
|
@@ -3763,7 +3824,7 @@ var useSpeechRecognition = (options) => {
|
|
|
3763
3824
|
let baseValue;
|
|
3764
3825
|
if (lastInterimText && currentValue.endsWith(lastInterimText)) {
|
|
3765
3826
|
baseValue = currentValue.slice(0, -lastInterimText.length);
|
|
3766
|
-
} else if (currentValue === lastValueWeSet) {
|
|
3827
|
+
} else if (currentValue === lastValueWeSet && lastInterimText) {
|
|
3767
3828
|
baseValue = currentValue.slice(0, -lastInterimText.length);
|
|
3768
3829
|
} else {
|
|
3769
3830
|
baseValue = currentValue;
|
|
@@ -3860,25 +3921,48 @@ var IconMic = (props) => {
|
|
|
3860
3921
|
})();
|
|
3861
3922
|
};
|
|
3862
3923
|
|
|
3924
|
+
// src/components/icon-return.tsx
|
|
3925
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 22 19"fill=none><path d="M6.76263 18.6626C7.48251 18.6626 7.95474 18.1682 7.95474 17.4895C7.95474 17.1207 7.80474 16.8576 7.58683 16.6361L5.3018 14.4137L2.84621 12.3589L2.44374 13.0037L5.92137 13.1622H17.9232C20.4842 13.1622 21.593 12.021 21.593 9.47237V3.66983C21.593 1.10875 20.4842 0 17.9232 0H12.5414C11.8179 0 11.3018 0.545895 11.3018 1.21695C11.3018 1.888 11.8179 2.43389 12.5414 2.43389H17.8424C18.7937 2.43389 19.1897 2.83653 19.1897 3.78784V9.35747C19.1897 10.3257 18.7937 10.7314 17.8424 10.7314H5.92137L2.44374 10.8832L2.84621 11.5281L5.3018 9.47993L7.58683 7.2606C7.80474 7.03914 7.95474 6.7693 7.95474 6.40049C7.95474 5.72854 7.48251 5.22747 6.76263 5.22747C6.46129 5.22747 6.12975 5.36905 5.89231 5.6096L0.376815 11.0425C0.134921 11.2777 0 11.6141 0 11.9452C0 12.2728 0.134921 12.6158 0.376815 12.848L5.89231 18.2871C6.12975 18.5276 6.46129 18.6626 6.76263 18.6626Z"fill=currentColor>`);
|
|
3926
|
+
var IconReturn = (props) => {
|
|
3927
|
+
const size = () => props.size ?? 12;
|
|
3928
|
+
return (() => {
|
|
3929
|
+
var _el$ = _tmpl$5();
|
|
3930
|
+
createRenderEffect((_p$) => {
|
|
3931
|
+
var _v$ = size(), _v$2 = size() * 19 / 22, _v$3 = props.class;
|
|
3932
|
+
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
3933
|
+
_v$2 !== _p$.t && setAttribute(_el$, "height", _p$.t = _v$2);
|
|
3934
|
+
_v$3 !== _p$.a && setAttribute(_el$, "class", _p$.a = _v$3);
|
|
3935
|
+
return _p$;
|
|
3936
|
+
}, {
|
|
3937
|
+
e: void 0,
|
|
3938
|
+
t: void 0,
|
|
3939
|
+
a: void 0
|
|
3940
|
+
});
|
|
3941
|
+
return _el$;
|
|
3942
|
+
})();
|
|
3943
|
+
};
|
|
3944
|
+
|
|
3863
3945
|
// src/components/selection-label.tsx
|
|
3864
|
-
var _tmpl$
|
|
3946
|
+
var _tmpl$6 = /* @__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>`);
|
|
3865
3947
|
var _tmpl$22 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex items-center w-fit h-4 rounded-[1px] gap-1 px-[3px] [border-width:0.5px] border-solid border-[#B3B3B3] py-0 bg-[#F7F7F7]"><span class="text-[#0C0C0C] text-[11.5px] leading-3.5 shrink-0 tracking-[-0.08em] font-[ui-monospace,'SFMono-Regular','SF_Mono','Menlo','Consolas','Liberation_Mono',monospace] w-fit h-fit">`);
|
|
3866
3948
|
var _tmpl$32 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex items-center w-fit h-4 rounded-[1px] gap-1 px-[3px] [border-width:0.5px] border-solid border-white py-0"><span class="text-[#0C0C0C] text-[11.5px] leading-3.5 shrink-0 tracking-[-0.08em] font-[ui-monospace,'SFMono-Regular','SF_Mono','Menlo','Consolas','Liberation_Mono',monospace] w-fit h-fit">>`);
|
|
3867
3949
|
var _tmpl$42 = /* @__PURE__ */ template(`<div class="absolute w-0 h-0"style="border-left:8px solid transparent;border-right:8px solid transparent">`);
|
|
3868
3950
|
var _tmpl$52 = /* @__PURE__ */ template(`<div role=button><div class="text-black text-[12px] leading-4 shrink-0 tracking-[-0.04em] font-sans font-medium w-fit h-fit">`);
|
|
3869
|
-
var _tmpl$
|
|
3870
|
-
var _tmpl$7 = /* @__PURE__ */ template(`<div class="[
|
|
3871
|
-
var _tmpl$8 = /* @__PURE__ */ template(`<
|
|
3872
|
-
var _tmpl$9 = /* @__PURE__ */ template(`<div class="shrink-0 flex
|
|
3873
|
-
var _tmpl$0 = /* @__PURE__ */ template(`<
|
|
3874
|
-
var _tmpl$1 = /* @__PURE__ */ template(`<div class="
|
|
3875
|
-
var _tmpl$10 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex
|
|
3876
|
-
var _tmpl$11 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex
|
|
3877
|
-
var _tmpl$12 = /* @__PURE__ */ template(`<
|
|
3878
|
-
var _tmpl$13 = /* @__PURE__ */ template(`<
|
|
3879
|
-
var _tmpl$14 = /* @__PURE__ */ template(`<
|
|
3880
|
-
var _tmpl$15 = /* @__PURE__ */ template(`<
|
|
3881
|
-
var _tmpl$16 = /* @__PURE__ */ template(`<div
|
|
3951
|
+
var _tmpl$62 = /* @__PURE__ */ template(`<div class="[font-synthesis:none] contain-layout shrink-0 flex flex-col items-start px-2 py-[5px] w-auto h-fit self-stretch [border-top-width:0.5px] border-t-solid border-t-[#D9D9D9] antialiased rounded-t-none rounded-b-xs -mt-px"style="background-image:linear-gradient(in oklab 180deg, oklab(100% 0 0) 0%, oklab(96.1% 0 0) 5.92%)">`);
|
|
3952
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex items-center justify-end gap-[5px] w-full h-fit"><button class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-xs bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] h-[17px]"><span class="text-black text-[11px] leading-3.5 tracking-[-0.04em] font-sans font-medium">No</span></button><button class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-xs bg-white [border-width:0.5px] border-solid border-[#7e0002] cursor-pointer transition-all hover:bg-[#FEF2F2] h-[17px]"><span class="text-[#B91C1C] text-[11px] leading-3.5 tracking-[-0.04em] font-sans font-medium">Yes`);
|
|
3953
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-end gap-1 w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 px-1.5 w-full h-fit"><span class="text-black text-[12px] leading-4 shrink-0 tracking-[-0.04em] font-sans font-medium w-fit h-fit">Discard prompt?`);
|
|
3954
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<div class="[font-synthesis:none] contain-layout shrink-0 flex items-center gap-1 rounded-xs bg-white antialiased w-fit h-fit py-1 px-1.5"><div class="contain-layout shrink-0 flex items-center px-0 py-px w-fit h-[18px] rounded-[1.5px] gap-[3px]"><div class="text-black text-[12px] leading-4 shrink-0 tracking-[-0.04em] font-sans font-medium w-fit h-fit">`);
|
|
3955
|
+
var _tmpl$0 = /* @__PURE__ */ template(`<button data-react-grab-ignore-events class="contain-layout shrink-0 flex flex-col items-start rounded-xs bg-white [border-width:0.5px] border-solid border-[#B3B3B3] p-1 size-fit cursor-pointer ml-1 transition-none hover:scale-105"><div data-react-grab-ignore-events class="shrink-0 w-[7px] h-[7px] rounded-[1px] bg-black pointer-events-none">`);
|
|
3956
|
+
var _tmpl$1 = /* @__PURE__ */ template(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea class="text-black text-[12px] leading-4 tracking-[-0.04em] font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 opacity-50 wrap-break-word overflow-y-auto"placeholder="type to edit"rows=1 disabled style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none>`);
|
|
3957
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1 px-1.5 w-auto h-fit"><div class="contain-layout flex items-center px-0 py-px w-auto h-fit rounded-[1.5px] gap-[3px]"><span class="text-[12px] leading-4 tracking-[-0.04em] font-sans font-medium w-auto h-fit whitespace-normal text-[#71717a] animate-pulse">`);
|
|
3958
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex items-center gap-px w-fit h-fit">`);
|
|
3959
|
+
var _tmpl$12 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex items-center gap-1 w-fit h-fit"><span class="text-label-muted text-[12px] leading-4 shrink-0 tracking-[-0.04em] font-sans font-medium w-fit h-fit">Press</span><div class="contain-layout shrink-0 flex flex-col items-start px-[3px] py-[3px] rounded-xs bg-white [border-width:0.5px] border-solid border-[#B3B3B3] size-fit"></div><span class="text-label-muted text-[12px] leading-4 shrink-0 tracking-[-0.04em] font-sans font-medium w-fit h-fit">to edit`);
|
|
3960
|
+
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></div><div class="grid transition-[grid-template-rows] duration-30 ease-out self-stretch"><div>`);
|
|
3961
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<button>`);
|
|
3962
|
+
var _tmpl$15 = /* @__PURE__ */ template(`<button class="contain-layout shrink-0 flex flex-col items-start px-[3px] py-[3px] rounded-xs bg-white [border-width:0.5px] border-solid border-[#B3B3B3] size-fit cursor-pointer transition-all hover:scale-105">`);
|
|
3963
|
+
var _tmpl$16 = /* @__PURE__ */ template(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea class="text-black text-[12px] leading-4 tracking-[-0.04em] font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"rows=1 style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none></textarea><div class="flex items-center gap-0.5 ml-1 w-[17px] h-[17px] justify-end">`);
|
|
3964
|
+
var _tmpl$17 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start gap-1 w-fit h-fit max-w-[280px]"><div>`);
|
|
3965
|
+
var _tmpl$18 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events class="fixed font-sans antialiased transition-opacity duration-300 ease-out filter-[drop-shadow(0px_0px_4px_#51515180)] select-none"style=z-index:2147483647><div class="[font-synthesis:none] contain-layout flex items-center gap-[5px] rounded-xs bg-white antialiased w-fit h-fit p-0">`);
|
|
3882
3966
|
var ARROW_HEIGHT = 8;
|
|
3883
3967
|
var LABEL_GAP = 4;
|
|
3884
3968
|
var IDLE_TIMEOUT_MS = 400;
|
|
@@ -3893,7 +3977,7 @@ var TagBadge = (props) => {
|
|
|
3893
3977
|
props.onHoverChange?.(false);
|
|
3894
3978
|
};
|
|
3895
3979
|
return (() => {
|
|
3896
|
-
var _el$ = _tmpl$
|
|
3980
|
+
var _el$ = _tmpl$6(), _el$2 = _el$.firstChild;
|
|
3897
3981
|
addEventListener(_el$, "click", props.onClick);
|
|
3898
3982
|
_el$.addEventListener("mouseleave", handleMouseLeave);
|
|
3899
3983
|
_el$.addEventListener("mouseenter", handleMouseEnter);
|
|
@@ -3966,19 +4050,61 @@ var ClickToCopyPill = (props) => {
|
|
|
3966
4050
|
})();
|
|
3967
4051
|
};
|
|
3968
4052
|
var BottomSection = (props) => (() => {
|
|
3969
|
-
var _el$9 = _tmpl$
|
|
4053
|
+
var _el$9 = _tmpl$62();
|
|
3970
4054
|
insert(_el$9, () => props.children);
|
|
3971
4055
|
return _el$9;
|
|
3972
4056
|
})();
|
|
4057
|
+
var DismissConfirmation = (props) => {
|
|
4058
|
+
const handleKeyDown = (event) => {
|
|
4059
|
+
if (event.code === "Enter") {
|
|
4060
|
+
event.preventDefault();
|
|
4061
|
+
event.stopPropagation();
|
|
4062
|
+
props.onConfirm?.();
|
|
4063
|
+
} else if (event.code === "Escape") {
|
|
4064
|
+
event.preventDefault();
|
|
4065
|
+
event.stopPropagation();
|
|
4066
|
+
props.onCancel?.();
|
|
4067
|
+
}
|
|
4068
|
+
};
|
|
4069
|
+
onMount(() => {
|
|
4070
|
+
window.addEventListener("keydown", handleKeyDown, {
|
|
4071
|
+
capture: true
|
|
4072
|
+
});
|
|
4073
|
+
});
|
|
4074
|
+
onCleanup(() => {
|
|
4075
|
+
window.removeEventListener("keydown", handleKeyDown, {
|
|
4076
|
+
capture: true
|
|
4077
|
+
});
|
|
4078
|
+
});
|
|
4079
|
+
return (() => {
|
|
4080
|
+
var _el$0 = _tmpl$8(); _el$0.firstChild;
|
|
4081
|
+
insert(_el$0, createComponent(BottomSection, {
|
|
4082
|
+
get children() {
|
|
4083
|
+
var _el$10 = _tmpl$7(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling; _el$12.firstChild;
|
|
4084
|
+
addEventListener(_el$11, "click", props.onCancel);
|
|
4085
|
+
addEventListener(_el$12, "click", props.onConfirm);
|
|
4086
|
+
insert(_el$12, createComponent(IconReturn, {
|
|
4087
|
+
size: 10,
|
|
4088
|
+
"class": "text-[#c00002]"
|
|
4089
|
+
}), null);
|
|
4090
|
+
return _el$10;
|
|
4091
|
+
}
|
|
4092
|
+
}), null);
|
|
4093
|
+
return _el$0;
|
|
4094
|
+
})();
|
|
4095
|
+
};
|
|
3973
4096
|
var SelectionLabel = (props) => {
|
|
3974
4097
|
let containerRef;
|
|
3975
4098
|
let inputRef;
|
|
3976
4099
|
let isTagCurrentlyHovered = false;
|
|
4100
|
+
let lastValidPosition = null;
|
|
4101
|
+
let lastElementIdentity = null;
|
|
3977
4102
|
const [measuredWidth, setMeasuredWidth] = createSignal(0);
|
|
3978
4103
|
const [measuredHeight, setMeasuredHeight] = createSignal(0);
|
|
3979
4104
|
const [arrowPosition, setArrowPosition] = createSignal("bottom");
|
|
3980
4105
|
const [viewportVersion, setViewportVersion] = createSignal(0);
|
|
3981
4106
|
const [isIdle, setIsIdle] = createSignal(false);
|
|
4107
|
+
const [hadValidBounds, setHadValidBounds] = createSignal(false);
|
|
3982
4108
|
const speechRecognition = useSpeechRecognition({
|
|
3983
4109
|
onTranscript: (transcript) => props.onInputChange?.(transcript),
|
|
3984
4110
|
getCurrentValue: () => props.inputValue ?? ""
|
|
@@ -4035,8 +4161,11 @@ var SelectionLabel = (props) => {
|
|
|
4035
4161
|
}
|
|
4036
4162
|
});
|
|
4037
4163
|
createEffect(() => {
|
|
4038
|
-
|
|
4039
|
-
|
|
4164
|
+
const elementIdentity = `${props.tagName ?? ""}:${props.componentName ?? ""}`;
|
|
4165
|
+
if (elementIdentity !== lastElementIdentity) {
|
|
4166
|
+
lastElementIdentity = elementIdentity;
|
|
4167
|
+
resetIdleTimer();
|
|
4168
|
+
}
|
|
4040
4169
|
});
|
|
4041
4170
|
createEffect(() => {
|
|
4042
4171
|
if (props.visible) {
|
|
@@ -4061,8 +4190,10 @@ var SelectionLabel = (props) => {
|
|
|
4061
4190
|
const bounds = props.selectionBounds;
|
|
4062
4191
|
const labelWidth = measuredWidth();
|
|
4063
4192
|
const labelHeight = measuredHeight();
|
|
4064
|
-
|
|
4065
|
-
|
|
4193
|
+
const hasMeasurements = labelWidth > 0 && labelHeight > 0;
|
|
4194
|
+
const hasValidBounds = bounds && bounds.width > 0 && bounds.height > 0;
|
|
4195
|
+
if (!hasMeasurements || !hasValidBounds) {
|
|
4196
|
+
return lastValidPosition ?? {
|
|
4066
4197
|
left: -9999,
|
|
4067
4198
|
top: -9999,
|
|
4068
4199
|
arrowLeft: 0
|
|
@@ -4094,11 +4225,14 @@ var SelectionLabel = (props) => {
|
|
|
4094
4225
|
positionTop = VIEWPORT_MARGIN_PX;
|
|
4095
4226
|
}
|
|
4096
4227
|
const arrowLeft = Math.max(12, Math.min(cursorX - positionLeft, labelWidth - 12));
|
|
4097
|
-
|
|
4228
|
+
const position = {
|
|
4098
4229
|
left: positionLeft,
|
|
4099
4230
|
top: positionTop,
|
|
4100
4231
|
arrowLeft
|
|
4101
4232
|
};
|
|
4233
|
+
lastValidPosition = position;
|
|
4234
|
+
setHadValidBounds(true);
|
|
4235
|
+
return position;
|
|
4102
4236
|
};
|
|
4103
4237
|
const handleKeyDown = (event) => {
|
|
4104
4238
|
event.stopPropagation();
|
|
@@ -4131,85 +4265,93 @@ var SelectionLabel = (props) => {
|
|
|
4131
4265
|
event.stopPropagation();
|
|
4132
4266
|
event.stopImmediatePropagation();
|
|
4133
4267
|
};
|
|
4268
|
+
const handleContainerPointerDown = (event) => {
|
|
4269
|
+
stopPropagation(event);
|
|
4270
|
+
const isEditableInputVisible = isNotProcessing() && props.isInputExpanded && !props.isPendingDismiss;
|
|
4271
|
+
if (isEditableInputVisible && inputRef) {
|
|
4272
|
+
inputRef.focus();
|
|
4273
|
+
}
|
|
4274
|
+
};
|
|
4134
4275
|
const handleSubmit = () => {
|
|
4135
4276
|
if (props.isInputExpanded && !props.inputValue?.trim()) return;
|
|
4136
4277
|
speechRecognition.stop();
|
|
4137
4278
|
props.onSubmit?.();
|
|
4138
4279
|
};
|
|
4280
|
+
const shouldShowWithoutBounds = () => hadValidBounds() && (props.status === "copied" || props.status === "fading");
|
|
4139
4281
|
return createComponent(Show, {
|
|
4140
4282
|
get when() {
|
|
4141
|
-
return memo(() => props.visible !== false)() && props.selectionBounds;
|
|
4283
|
+
return memo(() => props.visible !== false)() && (props.selectionBounds || shouldShowWithoutBounds());
|
|
4142
4284
|
},
|
|
4143
4285
|
get children() {
|
|
4144
|
-
var _el$
|
|
4145
|
-
_el$
|
|
4146
|
-
_el$
|
|
4147
|
-
_el$
|
|
4286
|
+
var _el$14 = _tmpl$18(), _el$18 = _el$14.firstChild;
|
|
4287
|
+
_el$14.$$click = stopPropagation;
|
|
4288
|
+
_el$14.$$mousedown = stopPropagation;
|
|
4289
|
+
_el$14.$$pointerdown = handleContainerPointerDown;
|
|
4148
4290
|
var _ref$ = containerRef;
|
|
4149
|
-
typeof _ref$ === "function" ? use(_ref$, _el$
|
|
4150
|
-
insert(_el$
|
|
4291
|
+
typeof _ref$ === "function" ? use(_ref$, _el$14) : containerRef = _el$14;
|
|
4292
|
+
insert(_el$14, createComponent(Arrow, {
|
|
4151
4293
|
get position() {
|
|
4152
4294
|
return arrowPosition();
|
|
4153
4295
|
},
|
|
4154
4296
|
get leftPx() {
|
|
4155
4297
|
return computedPosition().arrowLeft;
|
|
4156
4298
|
}
|
|
4157
|
-
}), _el$
|
|
4158
|
-
insert(_el$
|
|
4299
|
+
}), _el$18);
|
|
4300
|
+
insert(_el$14, createComponent(Show, {
|
|
4159
4301
|
get when() {
|
|
4160
4302
|
return props.status === "copied" || props.status === "fading";
|
|
4161
4303
|
},
|
|
4162
4304
|
get children() {
|
|
4163
|
-
var _el$
|
|
4164
|
-
insert(_el$
|
|
4165
|
-
return _el$
|
|
4305
|
+
var _el$15 = _tmpl$9(), _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild;
|
|
4306
|
+
insert(_el$17, () => props.hasAgent ? "Completed" : "Copied");
|
|
4307
|
+
return _el$15;
|
|
4166
4308
|
}
|
|
4167
|
-
}), _el$
|
|
4168
|
-
insert(_el$
|
|
4309
|
+
}), _el$18);
|
|
4310
|
+
insert(_el$18, createComponent(Show, {
|
|
4169
4311
|
get when() {
|
|
4170
4312
|
return props.status === "copying";
|
|
4171
4313
|
},
|
|
4172
4314
|
get children() {
|
|
4173
|
-
var _el$
|
|
4174
|
-
insert(_el$
|
|
4175
|
-
insert(_el$
|
|
4315
|
+
var _el$19 = _tmpl$10(), _el$20 = _el$19.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$21.firstChild;
|
|
4316
|
+
insert(_el$22, () => props.statusText ?? "Grabbing\u2026");
|
|
4317
|
+
insert(_el$19, createComponent(BottomSection, {
|
|
4176
4318
|
get children() {
|
|
4177
|
-
var _el$
|
|
4319
|
+
var _el$23 = _tmpl$1(), _el$24 = _el$23.firstChild;
|
|
4178
4320
|
var _ref$2 = inputRef;
|
|
4179
|
-
typeof _ref$2 === "function" ? use(_ref$2, _el$
|
|
4180
|
-
insert(_el$
|
|
4321
|
+
typeof _ref$2 === "function" ? use(_ref$2, _el$24) : inputRef = _el$24;
|
|
4322
|
+
insert(_el$23, createComponent(Show, {
|
|
4181
4323
|
get when() {
|
|
4182
4324
|
return props.onAbort;
|
|
4183
4325
|
},
|
|
4184
4326
|
get children() {
|
|
4185
|
-
var _el$
|
|
4186
|
-
_el$
|
|
4327
|
+
var _el$25 = _tmpl$0();
|
|
4328
|
+
_el$25.$$click = (event) => {
|
|
4187
4329
|
event.stopPropagation();
|
|
4188
4330
|
props.onAbort?.();
|
|
4189
4331
|
};
|
|
4190
|
-
_el$
|
|
4332
|
+
_el$25.$$pointerup = (event) => {
|
|
4191
4333
|
event.stopPropagation();
|
|
4192
4334
|
props.onAbort?.();
|
|
4193
4335
|
};
|
|
4194
|
-
_el$
|
|
4195
|
-
_el$
|
|
4196
|
-
return _el$
|
|
4336
|
+
_el$25.$$mousedown = (event) => event.stopPropagation();
|
|
4337
|
+
_el$25.$$pointerdown = (event) => event.stopPropagation();
|
|
4338
|
+
return _el$25;
|
|
4197
4339
|
}
|
|
4198
4340
|
}), null);
|
|
4199
|
-
createRenderEffect(() => _el$
|
|
4200
|
-
return _el$
|
|
4341
|
+
createRenderEffect(() => _el$24.value = props.inputValue ?? "");
|
|
4342
|
+
return _el$23;
|
|
4201
4343
|
}
|
|
4202
4344
|
}), null);
|
|
4203
|
-
return _el$
|
|
4345
|
+
return _el$19;
|
|
4204
4346
|
}
|
|
4205
4347
|
}), null);
|
|
4206
|
-
insert(_el$
|
|
4348
|
+
insert(_el$18, createComponent(Show, {
|
|
4207
4349
|
get when() {
|
|
4208
4350
|
return memo(() => !!isNotProcessing())() && !props.isInputExpanded;
|
|
4209
4351
|
},
|
|
4210
4352
|
get children() {
|
|
4211
|
-
var _el$
|
|
4212
|
-
insert(_el$
|
|
4353
|
+
var _el$26 = _tmpl$13(), _el$27 = _el$26.firstChild, _el$29 = _el$27.nextSibling, _el$30 = _el$29.firstChild;
|
|
4354
|
+
insert(_el$27, createComponent(ClickToCopyPill, {
|
|
4213
4355
|
onClick: handleSubmit,
|
|
4214
4356
|
shrink: true,
|
|
4215
4357
|
get hasParent() {
|
|
@@ -4219,19 +4361,19 @@ var SelectionLabel = (props) => {
|
|
|
4219
4361
|
return props.hasAgent;
|
|
4220
4362
|
}
|
|
4221
4363
|
}), null);
|
|
4222
|
-
insert(_el$
|
|
4364
|
+
insert(_el$27, createComponent(Show, {
|
|
4223
4365
|
get when() {
|
|
4224
4366
|
return props.componentName;
|
|
4225
4367
|
},
|
|
4226
4368
|
get children() {
|
|
4227
|
-
var _el$
|
|
4228
|
-
insert(_el$
|
|
4369
|
+
var _el$28 = _tmpl$11();
|
|
4370
|
+
insert(_el$28, createComponent(ParentBadge, {
|
|
4229
4371
|
get name() {
|
|
4230
4372
|
return props.componentName;
|
|
4231
4373
|
}
|
|
4232
4374
|
}), null);
|
|
4233
|
-
insert(_el$
|
|
4234
|
-
insert(_el$
|
|
4375
|
+
insert(_el$28, createComponent(ChevronSeparator, {}), null);
|
|
4376
|
+
insert(_el$28, createComponent(TagBadge, {
|
|
4235
4377
|
get tagName() {
|
|
4236
4378
|
return tagDisplay();
|
|
4237
4379
|
},
|
|
@@ -4243,10 +4385,10 @@ var SelectionLabel = (props) => {
|
|
|
4243
4385
|
showMono: true,
|
|
4244
4386
|
shrink: true
|
|
4245
4387
|
}), null);
|
|
4246
|
-
return _el$
|
|
4388
|
+
return _el$28;
|
|
4247
4389
|
}
|
|
4248
4390
|
}), null);
|
|
4249
|
-
insert(_el$
|
|
4391
|
+
insert(_el$27, createComponent(Show, {
|
|
4250
4392
|
get when() {
|
|
4251
4393
|
return !props.componentName;
|
|
4252
4394
|
},
|
|
@@ -4265,33 +4407,37 @@ var SelectionLabel = (props) => {
|
|
|
4265
4407
|
});
|
|
4266
4408
|
}
|
|
4267
4409
|
}), null);
|
|
4268
|
-
insert(_el$
|
|
4410
|
+
insert(_el$30, createComponent(BottomSection, {
|
|
4269
4411
|
get children() {
|
|
4270
|
-
var _el$
|
|
4271
|
-
|
|
4412
|
+
var _el$31 = _tmpl$12(), _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling;
|
|
4413
|
+
insert(_el$33, createComponent(IconReturn, {
|
|
4414
|
+
size: 10,
|
|
4415
|
+
"class": "opacity-[0.99] text-black"
|
|
4416
|
+
}));
|
|
4417
|
+
return _el$31;
|
|
4272
4418
|
}
|
|
4273
4419
|
}));
|
|
4274
4420
|
createRenderEffect((_p$) => {
|
|
4275
4421
|
var _v$3 = cn("contain-layout shrink-0 flex items-center gap-1 pt-1 w-fit h-fit pl-1.5", props.componentName ? "pr-1.5" : "pr-1"), _v$4 = isIdle() ? "1fr" : "0fr", _v$5 = cn("overflow-hidden min-h-0", !isIdle() && "w-0");
|
|
4276
|
-
_v$3 !== _p$.e && className(_el$
|
|
4277
|
-
_v$4 !== _p$.t && setStyleProperty(_el$
|
|
4278
|
-
_v$5 !== _p$.a && className(_el$
|
|
4422
|
+
_v$3 !== _p$.e && className(_el$27, _p$.e = _v$3);
|
|
4423
|
+
_v$4 !== _p$.t && setStyleProperty(_el$29, "grid-template-rows", _p$.t = _v$4);
|
|
4424
|
+
_v$5 !== _p$.a && className(_el$30, _p$.a = _v$5);
|
|
4279
4425
|
return _p$;
|
|
4280
4426
|
}, {
|
|
4281
4427
|
e: void 0,
|
|
4282
4428
|
t: void 0,
|
|
4283
4429
|
a: void 0
|
|
4284
4430
|
});
|
|
4285
|
-
return _el$
|
|
4431
|
+
return _el$26;
|
|
4286
4432
|
}
|
|
4287
4433
|
}), null);
|
|
4288
|
-
insert(_el$
|
|
4434
|
+
insert(_el$18, createComponent(Show, {
|
|
4289
4435
|
get when() {
|
|
4290
|
-
return memo(() => !!isNotProcessing())() && props.
|
|
4436
|
+
return memo(() => !!(isNotProcessing() && props.isInputExpanded))() && !props.isPendingDismiss;
|
|
4291
4437
|
},
|
|
4292
4438
|
get children() {
|
|
4293
|
-
var _el$
|
|
4294
|
-
insert(_el$
|
|
4439
|
+
var _el$34 = _tmpl$17(), _el$35 = _el$34.firstChild;
|
|
4440
|
+
insert(_el$35, createComponent(ClickToCopyPill, {
|
|
4295
4441
|
onClick: handleSubmit,
|
|
4296
4442
|
dimmed: true,
|
|
4297
4443
|
shrink: true,
|
|
@@ -4302,19 +4448,19 @@ var SelectionLabel = (props) => {
|
|
|
4302
4448
|
return props.hasAgent;
|
|
4303
4449
|
}
|
|
4304
4450
|
}), null);
|
|
4305
|
-
insert(_el$
|
|
4451
|
+
insert(_el$35, createComponent(Show, {
|
|
4306
4452
|
get when() {
|
|
4307
4453
|
return props.componentName;
|
|
4308
4454
|
},
|
|
4309
4455
|
get children() {
|
|
4310
|
-
var _el$
|
|
4311
|
-
insert(_el$
|
|
4456
|
+
var _el$36 = _tmpl$11();
|
|
4457
|
+
insert(_el$36, createComponent(ParentBadge, {
|
|
4312
4458
|
get name() {
|
|
4313
4459
|
return props.componentName;
|
|
4314
4460
|
}
|
|
4315
4461
|
}), null);
|
|
4316
|
-
insert(_el$
|
|
4317
|
-
insert(_el$
|
|
4462
|
+
insert(_el$36, createComponent(ChevronSeparator, {}), null);
|
|
4463
|
+
insert(_el$36, createComponent(TagBadge, {
|
|
4318
4464
|
get tagName() {
|
|
4319
4465
|
return tagDisplay();
|
|
4320
4466
|
},
|
|
@@ -4327,10 +4473,10 @@ var SelectionLabel = (props) => {
|
|
|
4327
4473
|
shrink: true,
|
|
4328
4474
|
forceShowIcon: true
|
|
4329
4475
|
}), null);
|
|
4330
|
-
return _el$
|
|
4476
|
+
return _el$36;
|
|
4331
4477
|
}
|
|
4332
4478
|
}), null);
|
|
4333
|
-
insert(_el$
|
|
4479
|
+
insert(_el$35, createComponent(Show, {
|
|
4334
4480
|
get when() {
|
|
4335
4481
|
return !props.componentName;
|
|
4336
4482
|
},
|
|
@@ -4350,21 +4496,21 @@ var SelectionLabel = (props) => {
|
|
|
4350
4496
|
});
|
|
4351
4497
|
}
|
|
4352
4498
|
}), null);
|
|
4353
|
-
insert(_el$
|
|
4499
|
+
insert(_el$34, createComponent(BottomSection, {
|
|
4354
4500
|
get children() {
|
|
4355
|
-
var _el$
|
|
4356
|
-
_el$
|
|
4357
|
-
_el$
|
|
4501
|
+
var _el$37 = _tmpl$16(), _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling;
|
|
4502
|
+
_el$38.$$keydown = handleKeyDown;
|
|
4503
|
+
_el$38.$$input = handleInput;
|
|
4358
4504
|
var _ref$3 = inputRef;
|
|
4359
|
-
typeof _ref$3 === "function" ? use(_ref$3, _el$
|
|
4360
|
-
insert(_el$
|
|
4505
|
+
typeof _ref$3 === "function" ? use(_ref$3, _el$38) : inputRef = _el$38;
|
|
4506
|
+
insert(_el$39, createComponent(Show, {
|
|
4361
4507
|
get when() {
|
|
4362
4508
|
return memo(() => !!(props.hasAgent && speechRecognition.isSupported()))() && !props.inputValue;
|
|
4363
4509
|
},
|
|
4364
4510
|
get children() {
|
|
4365
|
-
var _el$
|
|
4366
|
-
addEventListener(_el$
|
|
4367
|
-
insert(_el$
|
|
4511
|
+
var _el$40 = _tmpl$14();
|
|
4512
|
+
addEventListener(_el$40, "click", speechRecognition.toggle);
|
|
4513
|
+
insert(_el$40, createComponent(IconMic, {
|
|
4368
4514
|
size: 11,
|
|
4369
4515
|
get ["class"]() {
|
|
4370
4516
|
return speechRecognition.isListening() ? "animate-pulse" : "";
|
|
@@ -4372,42 +4518,61 @@ var SelectionLabel = (props) => {
|
|
|
4372
4518
|
}));
|
|
4373
4519
|
createRenderEffect((_p$) => {
|
|
4374
4520
|
var _v$6 = cn("contain-layout shrink-0 flex items-center justify-center px-[2px] py-[2px] rounded-xs [border-width:0.5px] border-solid size-fit cursor-pointer transition-all hover:scale-105", speechRecognition.isListening() ? "bg-grab-purple border-grab-purple text-white" : "bg-white border-[#B3B3B3] text-black"), _v$7 = speechRecognition.isListening() ? "Stop listening" : "Start voice input";
|
|
4375
|
-
_v$6 !== _p$.e && className(_el$
|
|
4376
|
-
_v$7 !== _p$.t && setAttribute(_el$
|
|
4521
|
+
_v$6 !== _p$.e && className(_el$40, _p$.e = _v$6);
|
|
4522
|
+
_v$7 !== _p$.t && setAttribute(_el$40, "title", _p$.t = _v$7);
|
|
4377
4523
|
return _p$;
|
|
4378
4524
|
}, {
|
|
4379
4525
|
e: void 0,
|
|
4380
4526
|
t: void 0
|
|
4381
4527
|
});
|
|
4382
|
-
return _el$
|
|
4528
|
+
return _el$40;
|
|
4383
4529
|
}
|
|
4384
4530
|
}), null);
|
|
4385
|
-
insert(_el$
|
|
4531
|
+
insert(_el$39, createComponent(Show, {
|
|
4386
4532
|
get when() {
|
|
4387
4533
|
return props.inputValue;
|
|
4388
4534
|
},
|
|
4389
4535
|
get children() {
|
|
4390
|
-
var _el$
|
|
4391
|
-
_el$
|
|
4392
|
-
|
|
4536
|
+
var _el$41 = _tmpl$15();
|
|
4537
|
+
_el$41.$$click = handleSubmit;
|
|
4538
|
+
insert(_el$41, createComponent(IconReturn, {
|
|
4539
|
+
size: 10,
|
|
4540
|
+
"class": "opacity-[0.99] text-black"
|
|
4541
|
+
}));
|
|
4542
|
+
return _el$41;
|
|
4393
4543
|
}
|
|
4394
4544
|
}), null);
|
|
4395
|
-
createRenderEffect(() => setAttribute(_el$
|
|
4396
|
-
createRenderEffect(() => _el$
|
|
4397
|
-
return _el$
|
|
4545
|
+
createRenderEffect(() => setAttribute(_el$38, "placeholder", speechRecognition.isListening() ? "listening..." : props.hasAgent && props.isAgentConnected ? "type to edit" : "type prompt"));
|
|
4546
|
+
createRenderEffect(() => _el$38.value = props.inputValue ?? "");
|
|
4547
|
+
return _el$37;
|
|
4398
4548
|
}
|
|
4399
4549
|
}), null);
|
|
4400
|
-
createRenderEffect(() => className(_el$
|
|
4401
|
-
return _el$
|
|
4550
|
+
createRenderEffect(() => className(_el$35, cn("contain-layout shrink-0 flex items-center gap-1 pt-1 w-fit h-fit pl-1.5", props.componentName ? "pr-1.5" : "pr-1")));
|
|
4551
|
+
return _el$34;
|
|
4552
|
+
}
|
|
4553
|
+
}), null);
|
|
4554
|
+
insert(_el$18, createComponent(Show, {
|
|
4555
|
+
get when() {
|
|
4556
|
+
return props.isPendingDismiss;
|
|
4557
|
+
},
|
|
4558
|
+
get children() {
|
|
4559
|
+
return createComponent(DismissConfirmation, {
|
|
4560
|
+
get onConfirm() {
|
|
4561
|
+
return props.onConfirmDismiss;
|
|
4562
|
+
},
|
|
4563
|
+
get onCancel() {
|
|
4564
|
+
return props.onCancelDismiss;
|
|
4565
|
+
}
|
|
4566
|
+
});
|
|
4402
4567
|
}
|
|
4403
4568
|
}), null);
|
|
4404
4569
|
createRenderEffect((_p$) => {
|
|
4405
4570
|
var _v$8 = `${computedPosition().top}px`, _v$9 = `${computedPosition().left}px`, _v$0 = props.isInputExpanded ? "auto" : "none", _v$1 = props.status === "fading" ? 0 : 1, _v$10 = props.status === "copied" || props.status === "fading" ? "none" : void 0;
|
|
4406
|
-
_v$8 !== _p$.e && setStyleProperty(_el$
|
|
4407
|
-
_v$9 !== _p$.t && setStyleProperty(_el$
|
|
4408
|
-
_v$0 !== _p$.a && setStyleProperty(_el$
|
|
4409
|
-
_v$1 !== _p$.o && setStyleProperty(_el$
|
|
4410
|
-
_v$10 !== _p$.i && setStyleProperty(_el$
|
|
4571
|
+
_v$8 !== _p$.e && setStyleProperty(_el$14, "top", _p$.e = _v$8);
|
|
4572
|
+
_v$9 !== _p$.t && setStyleProperty(_el$14, "left", _p$.t = _v$9);
|
|
4573
|
+
_v$0 !== _p$.a && setStyleProperty(_el$14, "pointer-events", _p$.a = _v$0);
|
|
4574
|
+
_v$1 !== _p$.o && setStyleProperty(_el$14, "opacity", _p$.o = _v$1);
|
|
4575
|
+
_v$10 !== _p$.i && setStyleProperty(_el$18, "display", _p$.i = _v$10);
|
|
4411
4576
|
return _p$;
|
|
4412
4577
|
}, {
|
|
4413
4578
|
e: void 0,
|
|
@@ -4416,14 +4581,14 @@ var SelectionLabel = (props) => {
|
|
|
4416
4581
|
o: void 0,
|
|
4417
4582
|
i: void 0
|
|
4418
4583
|
});
|
|
4419
|
-
return _el$
|
|
4584
|
+
return _el$14;
|
|
4420
4585
|
}
|
|
4421
4586
|
});
|
|
4422
4587
|
};
|
|
4423
4588
|
delegateEvents(["click", "pointerdown", "mousedown", "pointerup", "input", "keydown"]);
|
|
4424
4589
|
|
|
4425
4590
|
// src/components/selection-cursor.tsx
|
|
4426
|
-
var _tmpl$
|
|
4591
|
+
var _tmpl$19 = /* @__PURE__ */ template(`<div class="fixed z-2147483647"><button data-react-grab-selection-cursor>`);
|
|
4427
4592
|
var SelectionCursor = (props) => {
|
|
4428
4593
|
const [isHovered, setIsHovered] = createSignal(false);
|
|
4429
4594
|
const [debouncedVisible, setDebouncedVisible] = createSignal(false);
|
|
@@ -4460,7 +4625,7 @@ var SelectionCursor = (props) => {
|
|
|
4460
4625
|
});
|
|
4461
4626
|
}
|
|
4462
4627
|
}), (() => {
|
|
4463
|
-
var _el$ = _tmpl$
|
|
4628
|
+
var _el$ = _tmpl$19(), _el$2 = _el$.firstChild;
|
|
4464
4629
|
_el$.addEventListener("mouseleave", () => setIsHovered(false));
|
|
4465
4630
|
_el$.addEventListener("mouseenter", () => setIsHovered(true));
|
|
4466
4631
|
_el$2.$$click = handleClick;
|
|
@@ -4505,6 +4670,7 @@ delegateEvents(["click"]);
|
|
|
4505
4670
|
|
|
4506
4671
|
// src/components/renderer.tsx
|
|
4507
4672
|
var ReactGrabRenderer = (props) => {
|
|
4673
|
+
const agentSessionsList = createMemo(() => props.agentSessions ? Array.from(props.agentSessions.values()) : []);
|
|
4508
4674
|
return [createComponent(Show, {
|
|
4509
4675
|
get when() {
|
|
4510
4676
|
return memo(() => !!props.selectionVisible)() && props.selectionBounds;
|
|
@@ -4566,51 +4732,52 @@ var ReactGrabRenderer = (props) => {
|
|
|
4566
4732
|
return box.createdAt;
|
|
4567
4733
|
}
|
|
4568
4734
|
})
|
|
4569
|
-
}), createComponent(
|
|
4735
|
+
}), createComponent(Index, {
|
|
4570
4736
|
get each() {
|
|
4571
|
-
return
|
|
4737
|
+
return agentSessionsList();
|
|
4572
4738
|
},
|
|
4573
4739
|
children: (session) => [createComponent(Show, {
|
|
4574
4740
|
get when() {
|
|
4575
|
-
return session.selectionBounds;
|
|
4741
|
+
return session().selectionBounds;
|
|
4576
4742
|
},
|
|
4577
4743
|
get children() {
|
|
4578
4744
|
return createComponent(SelectionBox, {
|
|
4579
4745
|
variant: "processing",
|
|
4580
4746
|
get bounds() {
|
|
4581
|
-
return session.selectionBounds;
|
|
4747
|
+
return session().selectionBounds;
|
|
4582
4748
|
},
|
|
4583
4749
|
visible: true,
|
|
4584
4750
|
get isCompleted() {
|
|
4585
|
-
return !session.isStreaming;
|
|
4751
|
+
return !session().isStreaming;
|
|
4586
4752
|
}
|
|
4587
4753
|
});
|
|
4588
4754
|
}
|
|
4589
4755
|
}), createComponent(SelectionLabel, {
|
|
4590
4756
|
get tagName() {
|
|
4591
|
-
return session.tagName;
|
|
4757
|
+
return session().tagName;
|
|
4592
4758
|
},
|
|
4593
4759
|
get componentName() {
|
|
4594
|
-
return session.componentName;
|
|
4760
|
+
return session().componentName;
|
|
4595
4761
|
},
|
|
4596
4762
|
get selectionBounds() {
|
|
4597
|
-
return session.selectionBounds;
|
|
4763
|
+
return session().selectionBounds;
|
|
4598
4764
|
},
|
|
4599
4765
|
get mouseX() {
|
|
4600
|
-
return session.position.x;
|
|
4766
|
+
return session().position.x;
|
|
4601
4767
|
},
|
|
4602
4768
|
visible: true,
|
|
4603
4769
|
hasAgent: true,
|
|
4770
|
+
isAgentConnected: true,
|
|
4604
4771
|
get status() {
|
|
4605
|
-
return session.isStreaming ? "copying" : "copied";
|
|
4772
|
+
return session().isStreaming ? "copying" : "copied";
|
|
4606
4773
|
},
|
|
4607
4774
|
get statusText() {
|
|
4608
|
-
return session.lastStatus || "Thinking\u2026";
|
|
4775
|
+
return session().lastStatus || "Thinking\u2026";
|
|
4609
4776
|
},
|
|
4610
4777
|
get inputValue() {
|
|
4611
|
-
return session.context.prompt;
|
|
4778
|
+
return session().context.prompt;
|
|
4612
4779
|
},
|
|
4613
|
-
onAbort: () => props.onAbortSession?.(session.id)
|
|
4780
|
+
onAbort: () => props.onAbortSession?.(session().id)
|
|
4614
4781
|
})]
|
|
4615
4782
|
}), createComponent(Show, {
|
|
4616
4783
|
get when() {
|
|
@@ -4642,6 +4809,9 @@ var ReactGrabRenderer = (props) => {
|
|
|
4642
4809
|
get hasAgent() {
|
|
4643
4810
|
return props.hasAgent;
|
|
4644
4811
|
},
|
|
4812
|
+
get isAgentConnected() {
|
|
4813
|
+
return props.isAgentConnected;
|
|
4814
|
+
},
|
|
4645
4815
|
get status() {
|
|
4646
4816
|
return props.selectionLabelStatus;
|
|
4647
4817
|
},
|
|
@@ -4663,6 +4833,15 @@ var ReactGrabRenderer = (props) => {
|
|
|
4663
4833
|
get onToggleExpand() {
|
|
4664
4834
|
return props.onToggleExpand;
|
|
4665
4835
|
},
|
|
4836
|
+
get isPendingDismiss() {
|
|
4837
|
+
return props.isPendingDismiss;
|
|
4838
|
+
},
|
|
4839
|
+
get onConfirmDismiss() {
|
|
4840
|
+
return props.onConfirmDismiss;
|
|
4841
|
+
},
|
|
4842
|
+
get onCancelDismiss() {
|
|
4843
|
+
return props.onCancelDismiss;
|
|
4844
|
+
},
|
|
4666
4845
|
onOpen: () => {
|
|
4667
4846
|
if (props.selectionFilePath) {
|
|
4668
4847
|
const openFileUrl = buildOpenFileUrl(props.selectionFilePath, props.selectionLineNumber);
|
|
@@ -6211,7 +6390,8 @@ var createAgentManager = (initialAgentOptions) => {
|
|
|
6211
6390
|
storage
|
|
6212
6391
|
);
|
|
6213
6392
|
setSessions((prev) => new Map(prev).set(session.id, completedSession));
|
|
6214
|
-
|
|
6393
|
+
const element = sessionElements.get(session.id);
|
|
6394
|
+
agentOptions?.onComplete?.(completedSession, element);
|
|
6215
6395
|
}
|
|
6216
6396
|
} catch (error) {
|
|
6217
6397
|
const currentSessions = sessions();
|
|
@@ -6344,7 +6524,7 @@ var createAgentManager = (initialAgentOptions) => {
|
|
|
6344
6524
|
return;
|
|
6345
6525
|
}
|
|
6346
6526
|
const elements = [element];
|
|
6347
|
-
const content = await generateSnippet(elements);
|
|
6527
|
+
const content = await generateSnippet(elements, { maxLines: Infinity });
|
|
6348
6528
|
const context = {
|
|
6349
6529
|
content,
|
|
6350
6530
|
prompt,
|
|
@@ -6363,7 +6543,7 @@ var createAgentManager = (initialAgentOptions) => {
|
|
|
6363
6543
|
sessionElements.set(session.id, element);
|
|
6364
6544
|
setSessions((prev) => new Map(prev).set(session.id, session));
|
|
6365
6545
|
saveSessionById(session, storage);
|
|
6366
|
-
agentOptions.onStart?.(session);
|
|
6546
|
+
agentOptions.onStart?.(session, element);
|
|
6367
6547
|
const abortController = new AbortController();
|
|
6368
6548
|
abortControllers.set(session.id, abortController);
|
|
6369
6549
|
const streamIterator = agentOptions.provider.send(
|
|
@@ -6440,7 +6620,7 @@ var createAgentManager = (initialAgentOptions) => {
|
|
|
6440
6620
|
};
|
|
6441
6621
|
|
|
6442
6622
|
// src/core.tsx
|
|
6443
|
-
var _tmpl$
|
|
6623
|
+
var _tmpl$20 = /* @__PURE__ */ template(`<span class="tabular-nums align-middle">`);
|
|
6444
6624
|
var _tmpl$23 = /* @__PURE__ */ template(`<span class="font-mono tabular-nums align-middle"><<!>>`);
|
|
6445
6625
|
var _tmpl$33 = /* @__PURE__ */ template(`<span class="tabular-nums ml-1 align-middle"> in `);
|
|
6446
6626
|
var onIdle = (callback) => {
|
|
@@ -6534,7 +6714,7 @@ var init = (rawOptions) => {
|
|
|
6534
6714
|
hasInited = true;
|
|
6535
6715
|
const logIntro = () => {
|
|
6536
6716
|
try {
|
|
6537
|
-
const version = "0.0.
|
|
6717
|
+
const version = "0.0.72";
|
|
6538
6718
|
const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
|
|
6539
6719
|
console.log(`%cReact Grab${version ? ` v${version}` : ""}%c
|
|
6540
6720
|
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;`, "");
|
|
@@ -6568,6 +6748,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6568
6748
|
const [selectionLabelStatus, setSelectionLabelStatus] = createSignal("idle");
|
|
6569
6749
|
const [labelInstances, setLabelInstances] = createSignal([]);
|
|
6570
6750
|
const [lastGrabbedElement, setLastGrabbedElement] = createSignal(null);
|
|
6751
|
+
const [lastCopiedElement, setLastCopiedElement] = createSignal(null);
|
|
6571
6752
|
const [progressStartTime, setProgressStartTime] = createSignal(null);
|
|
6572
6753
|
const [grabbedBoxes, setGrabbedBoxes] = createSignal([]);
|
|
6573
6754
|
const [isActivated, setIsActivated] = createSignal(false);
|
|
@@ -6587,6 +6768,8 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6587
6768
|
const [isInputExpanded, setIsInputExpanded] = createSignal(false);
|
|
6588
6769
|
const [frozenElement, setFrozenElement] = createSignal(null);
|
|
6589
6770
|
const [hasAgentProvider, setHasAgentProvider] = createSignal(Boolean(options.agent?.provider));
|
|
6771
|
+
const [isAgentConnected, setIsAgentConnected] = createSignal(false);
|
|
6772
|
+
const [isPendingDismiss, setIsPendingDismiss] = createSignal(false);
|
|
6590
6773
|
const elementInputCache = /* @__PURE__ */ new WeakMap();
|
|
6591
6774
|
const [nativeSelectionCursorX, setNativeSelectionCursorX] = createSignal(OFFSCREEN_POSITION);
|
|
6592
6775
|
const [nativeSelectionCursorY, setNativeSelectionCursorY] = createSignal(OFFSCREEN_POSITION);
|
|
@@ -6607,6 +6790,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6607
6790
|
return await getNearestComponentName(element) || void 0;
|
|
6608
6791
|
});
|
|
6609
6792
|
const clearNativeSelectionState = () => {
|
|
6793
|
+
setHasNativeSelection(false);
|
|
6610
6794
|
setNativeSelectionCursorX(OFFSCREEN_POSITION);
|
|
6611
6795
|
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
6612
6796
|
setNativeSelectionElements([]);
|
|
@@ -6722,6 +6906,9 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6722
6906
|
await operation().finally(() => {
|
|
6723
6907
|
setIsCopying(false);
|
|
6724
6908
|
setDidJustCopy(true);
|
|
6909
|
+
if (element) {
|
|
6910
|
+
setLastCopiedElement(element);
|
|
6911
|
+
}
|
|
6725
6912
|
stopProgressAnimation();
|
|
6726
6913
|
if (instanceId) {
|
|
6727
6914
|
updateLabelInstance(instanceId, "copied");
|
|
@@ -6823,6 +7010,12 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6823
7010
|
if (element && !document.contains(element)) return null;
|
|
6824
7011
|
return element;
|
|
6825
7012
|
});
|
|
7013
|
+
const effectiveElement = createMemo(() => {
|
|
7014
|
+
if (isToggleFrozen()) {
|
|
7015
|
+
return frozenElement();
|
|
7016
|
+
}
|
|
7017
|
+
return targetElement();
|
|
7018
|
+
});
|
|
6826
7019
|
createEffect(() => {
|
|
6827
7020
|
const element = detectedElement();
|
|
6828
7021
|
if (!element) return;
|
|
@@ -6841,7 +7034,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6841
7034
|
});
|
|
6842
7035
|
const selectionBounds = createMemo(() => {
|
|
6843
7036
|
viewportVersion();
|
|
6844
|
-
const element =
|
|
7037
|
+
const element = effectiveElement();
|
|
6845
7038
|
if (!element) return void 0;
|
|
6846
7039
|
return createElementBounds(element);
|
|
6847
7040
|
});
|
|
@@ -6893,7 +7086,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6893
7086
|
const copying = isCopying();
|
|
6894
7087
|
if (!element) {
|
|
6895
7088
|
return (() => {
|
|
6896
|
-
var _el$ = _tmpl$
|
|
7089
|
+
var _el$ = _tmpl$20();
|
|
6897
7090
|
insert(_el$, copying ? "Processing\u2026" : "1 element");
|
|
6898
7091
|
return _el$;
|
|
6899
7092
|
})();
|
|
@@ -6919,7 +7112,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6919
7112
|
})();
|
|
6920
7113
|
}
|
|
6921
7114
|
return (() => {
|
|
6922
|
-
var _el$10 = _tmpl$
|
|
7115
|
+
var _el$10 = _tmpl$20();
|
|
6923
7116
|
insert(_el$10, copying ? "Processing\u2026" : "1 element");
|
|
6924
7117
|
return _el$10;
|
|
6925
7118
|
})();
|
|
@@ -7112,6 +7305,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7112
7305
|
setInputText("");
|
|
7113
7306
|
setIsToggleFrozen(false);
|
|
7114
7307
|
setIsInputExpanded(false);
|
|
7308
|
+
setIsPendingDismiss(false);
|
|
7115
7309
|
setFrozenElement(null);
|
|
7116
7310
|
setSelectionLabelStatus("idle");
|
|
7117
7311
|
setDidJustCopy(false);
|
|
@@ -7156,6 +7350,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7156
7350
|
setInputText(value);
|
|
7157
7351
|
};
|
|
7158
7352
|
const handleInputSubmit = () => {
|
|
7353
|
+
setLastCopiedElement(null);
|
|
7159
7354
|
const element = frozenElement() || targetElement();
|
|
7160
7355
|
const prompt = isInputMode() ? inputText().trim() : "";
|
|
7161
7356
|
if (!element) {
|
|
@@ -7184,7 +7379,11 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7184
7379
|
}
|
|
7185
7380
|
setIsInputMode(false);
|
|
7186
7381
|
setInputText("");
|
|
7187
|
-
|
|
7382
|
+
if (prompt) {
|
|
7383
|
+
elementInputCache.set(element, prompt);
|
|
7384
|
+
} else {
|
|
7385
|
+
elementInputCache.delete(element);
|
|
7386
|
+
}
|
|
7188
7387
|
const tagName = extractElementTagName(element);
|
|
7189
7388
|
void getNearestComponentName(element).then((componentName) => {
|
|
7190
7389
|
void executeCopyOperation(currentX, currentY, () => copySingleElementToClipboard(element, prompt || void 0), bounds, tagName, componentName ?? void 0, element).then(() => {
|
|
@@ -7193,14 +7392,27 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7193
7392
|
});
|
|
7194
7393
|
};
|
|
7195
7394
|
const handleInputCancel = () => {
|
|
7395
|
+
setLastCopiedElement(null);
|
|
7196
7396
|
if (!isInputMode()) return;
|
|
7197
|
-
const element = frozenElement() || targetElement();
|
|
7198
7397
|
const currentInput = inputText().trim();
|
|
7398
|
+
if (currentInput && !isPendingDismiss()) {
|
|
7399
|
+
setIsPendingDismiss(true);
|
|
7400
|
+
return;
|
|
7401
|
+
}
|
|
7402
|
+
const element = frozenElement() || targetElement();
|
|
7199
7403
|
if (element && currentInput) {
|
|
7200
7404
|
elementInputCache.set(element, currentInput);
|
|
7201
7405
|
}
|
|
7406
|
+
setIsPendingDismiss(false);
|
|
7407
|
+
deactivateRenderer();
|
|
7408
|
+
};
|
|
7409
|
+
const handleConfirmDismiss = () => {
|
|
7410
|
+
setIsPendingDismiss(false);
|
|
7202
7411
|
deactivateRenderer();
|
|
7203
7412
|
};
|
|
7413
|
+
const handleCancelDismiss = () => {
|
|
7414
|
+
setIsPendingDismiss(false);
|
|
7415
|
+
};
|
|
7204
7416
|
const handleToggleExpand = () => {
|
|
7205
7417
|
const element = frozenElement() || targetElement();
|
|
7206
7418
|
if (element) {
|
|
@@ -7312,19 +7524,22 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7312
7524
|
transform: stripTranslateFromTransform(firstElement)
|
|
7313
7525
|
};
|
|
7314
7526
|
const tagName = extractElementTagName(firstElement);
|
|
7527
|
+
const centerX = bounds.x + bounds.width / 2;
|
|
7528
|
+
const centerY = bounds.y + bounds.height / 2;
|
|
7315
7529
|
if (hasAgentProvider()) {
|
|
7316
|
-
const centerX = bounds.x + bounds.width / 2;
|
|
7317
|
-
const centerY = bounds.y + bounds.height / 2;
|
|
7318
7530
|
setMouseX(centerX);
|
|
7319
7531
|
setMouseY(centerY);
|
|
7320
7532
|
setFrozenElement(firstElement);
|
|
7321
7533
|
setIsToggleMode(true);
|
|
7322
7534
|
setIsToggleFrozen(true);
|
|
7323
7535
|
setIsInputExpanded(true);
|
|
7536
|
+
if (!isActivated()) {
|
|
7537
|
+
activateRenderer();
|
|
7538
|
+
}
|
|
7324
7539
|
setIsInputMode(true);
|
|
7325
7540
|
} else {
|
|
7326
7541
|
void getNearestComponentName(firstElement).then((componentName) => {
|
|
7327
|
-
void executeCopyOperation(
|
|
7542
|
+
void executeCopyOperation(centerX, centerY, () => copyMultipleElementsToClipboard(selectedElements), bounds, tagName, componentName ?? void 0, firstElement, true);
|
|
7328
7543
|
});
|
|
7329
7544
|
}
|
|
7330
7545
|
}
|
|
@@ -7364,7 +7579,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7364
7579
|
const originalKey = originalKeyDescriptor?.get ? originalKeyDescriptor.get.call(event) : event.key;
|
|
7365
7580
|
const isEnterKey = originalKey === "Enter" || isEnterCode(event.code);
|
|
7366
7581
|
const isOverlayActive = isActivated() || isHoldingKeys();
|
|
7367
|
-
const shouldBlockEnter = isEnterKey && isOverlayActive && !isInputMode();
|
|
7582
|
+
const shouldBlockEnter = isEnterKey && isOverlayActive && !isInputMode() && !isToggleMode();
|
|
7368
7583
|
if (shouldBlockEnter) {
|
|
7369
7584
|
claimedEvents.add(event);
|
|
7370
7585
|
event.preventDefault();
|
|
@@ -7389,13 +7604,14 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7389
7604
|
window.addEventListener("keydown", (event) => {
|
|
7390
7605
|
blockEnterIfNeeded(event);
|
|
7391
7606
|
const isEnterToActivateInput = isEnterCode(event.code) && isHoldingKeys() && !isInputMode();
|
|
7392
|
-
if (isInputMode() && isTargetKeyCombination(event, options)) {
|
|
7607
|
+
if (isInputMode() && isTargetKeyCombination(event, options) && !event.repeat) {
|
|
7393
7608
|
event.preventDefault();
|
|
7394
7609
|
event.stopPropagation();
|
|
7395
7610
|
setIsInputMode(false);
|
|
7396
7611
|
setInputText("");
|
|
7397
7612
|
setIsToggleFrozen(false);
|
|
7398
7613
|
setIsInputExpanded(false);
|
|
7614
|
+
setIsPendingDismiss(false);
|
|
7399
7615
|
return;
|
|
7400
7616
|
}
|
|
7401
7617
|
if (isInputMode() || isEventFromOverlay(event, "data-react-grab-ignore-events") && !isEnterToActivateInput) {
|
|
@@ -7414,6 +7630,33 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7414
7630
|
return;
|
|
7415
7631
|
}
|
|
7416
7632
|
}
|
|
7633
|
+
const copiedElement = lastCopiedElement();
|
|
7634
|
+
if (isEnterCode(event.code) && !isHoldingKeys() && !isInputMode() && !isActivated() && copiedElement && document.contains(copiedElement)) {
|
|
7635
|
+
event.preventDefault();
|
|
7636
|
+
event.stopPropagation();
|
|
7637
|
+
event.stopImmediatePropagation();
|
|
7638
|
+
const bounds = createElementBounds(copiedElement);
|
|
7639
|
+
const selectionCenterX = bounds.x + bounds.width / 2;
|
|
7640
|
+
const centerY = bounds.y + bounds.height / 2;
|
|
7641
|
+
setMouseX(selectionCenterX);
|
|
7642
|
+
setMouseY(centerY);
|
|
7643
|
+
setCopyStartX(selectionCenterX);
|
|
7644
|
+
setCopyStartY(centerY);
|
|
7645
|
+
setCopyOffsetFromCenterX(0);
|
|
7646
|
+
setFrozenElement(copiedElement);
|
|
7647
|
+
setLastCopiedElement(null);
|
|
7648
|
+
setLabelInstances([]);
|
|
7649
|
+
const cachedInput = elementInputCache.get(copiedElement);
|
|
7650
|
+
if (cachedInput) {
|
|
7651
|
+
setInputText(cachedInput);
|
|
7652
|
+
}
|
|
7653
|
+
setIsToggleMode(true);
|
|
7654
|
+
setIsToggleFrozen(true);
|
|
7655
|
+
setIsInputExpanded(true);
|
|
7656
|
+
activateRenderer();
|
|
7657
|
+
setIsInputMode(true);
|
|
7658
|
+
return;
|
|
7659
|
+
}
|
|
7417
7660
|
if (isEnterCode(event.code) && isHoldingKeys() && !isInputMode()) {
|
|
7418
7661
|
event.preventDefault();
|
|
7419
7662
|
event.stopPropagation();
|
|
@@ -7636,7 +7879,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7636
7879
|
if (hadDrag) {
|
|
7637
7880
|
setDidJustDrag(false);
|
|
7638
7881
|
}
|
|
7639
|
-
if (isToggleMode() && !isCopying()) {
|
|
7882
|
+
if (isToggleMode() && !isCopying() && !isInputMode()) {
|
|
7640
7883
|
if (!isHoldingKeys()) {
|
|
7641
7884
|
deactivateRenderer();
|
|
7642
7885
|
} else {
|
|
@@ -7700,6 +7943,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7700
7943
|
selectionDebounceTimerId = null;
|
|
7701
7944
|
const currentSelection = window.getSelection();
|
|
7702
7945
|
if (!currentSelection || currentSelection.isCollapsed || currentSelection.rangeCount === 0) {
|
|
7946
|
+
clearNativeSelectionState();
|
|
7703
7947
|
return;
|
|
7704
7948
|
}
|
|
7705
7949
|
const range = currentSelection.getRangeAt(0);
|
|
@@ -7708,6 +7952,11 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7708
7952
|
clearNativeSelectionState();
|
|
7709
7953
|
return;
|
|
7710
7954
|
}
|
|
7955
|
+
const selectedText = currentSelection.toString().trim();
|
|
7956
|
+
if (!selectedText) {
|
|
7957
|
+
clearNativeSelectionState();
|
|
7958
|
+
return;
|
|
7959
|
+
}
|
|
7711
7960
|
const isBackward = (() => {
|
|
7712
7961
|
if (!currentSelection.anchorNode || !currentSelection.focusNode) return false;
|
|
7713
7962
|
const position = currentSelection.anchorNode.compareDocumentPosition(currentSelection.focusNode);
|
|
@@ -7757,14 +8006,14 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7757
8006
|
const selectionVisible = createMemo(() => {
|
|
7758
8007
|
if (!theme().selectionBox.enabled) return false;
|
|
7759
8008
|
if (didJustCopy()) return false;
|
|
7760
|
-
return isRendererActive() && !isDragging() && Boolean(
|
|
8009
|
+
return isRendererActive() && !isDragging() && Boolean(effectiveElement());
|
|
7761
8010
|
});
|
|
7762
8011
|
const selectionTagName = createMemo(() => {
|
|
7763
|
-
const element =
|
|
8012
|
+
const element = effectiveElement();
|
|
7764
8013
|
if (!element) return void 0;
|
|
7765
8014
|
return extractElementTagName(element) || void 0;
|
|
7766
8015
|
});
|
|
7767
|
-
const [selectionComponentName] = createResource(() =>
|
|
8016
|
+
const [selectionComponentName] = createResource(() => effectiveElement(), async (element) => {
|
|
7768
8017
|
if (!element) return void 0;
|
|
7769
8018
|
const name = await getNearestComponentName(element);
|
|
7770
8019
|
return name ?? void 0;
|
|
@@ -7772,7 +8021,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7772
8021
|
const selectionLabelVisible = createMemo(() => {
|
|
7773
8022
|
if (!theme().elementLabel.enabled) return false;
|
|
7774
8023
|
if (didJustCopy()) return false;
|
|
7775
|
-
return isRendererActive() && !isDragging() && Boolean(
|
|
8024
|
+
return isRendererActive() && !isDragging() && Boolean(effectiveElement());
|
|
7776
8025
|
});
|
|
7777
8026
|
const computedLabelInstances = createMemo(() => {
|
|
7778
8027
|
viewportVersion();
|
|
@@ -7786,13 +8035,25 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7786
8035
|
};
|
|
7787
8036
|
});
|
|
7788
8037
|
});
|
|
8038
|
+
const computedGrabbedBoxes = createMemo(() => {
|
|
8039
|
+
viewportVersion();
|
|
8040
|
+
return grabbedBoxes().map((box) => {
|
|
8041
|
+
if (!box.element || !document.body.contains(box.element)) {
|
|
8042
|
+
return box;
|
|
8043
|
+
}
|
|
8044
|
+
return {
|
|
8045
|
+
...box,
|
|
8046
|
+
bounds: createElementBounds(box.element)
|
|
8047
|
+
};
|
|
8048
|
+
});
|
|
8049
|
+
});
|
|
7789
8050
|
const dragVisible = createMemo(() => theme().dragBox.enabled && isRendererActive() && isDraggingBeyondThreshold());
|
|
7790
8051
|
const labelVariant = createMemo(() => isCopying() ? "processing" : "hover");
|
|
7791
8052
|
const labelVisible = createMemo(() => {
|
|
7792
8053
|
if (!theme().elementLabel.enabled) return false;
|
|
7793
8054
|
if (isInputMode()) return false;
|
|
7794
8055
|
if (isCopying()) return true;
|
|
7795
|
-
return isRendererActive() && !isDragging() && Boolean(
|
|
8056
|
+
return isRendererActive() && !isDragging() && Boolean(effectiveElement());
|
|
7796
8057
|
});
|
|
7797
8058
|
const crosshairVisible = createMemo(() => theme().crosshair.enabled && isRendererActive() && !isDragging() && !isTouchMode() && !isToggleFrozen());
|
|
7798
8059
|
const shouldShowGrabbedBoxes = createMemo(() => theme().grabbedBoxes.enabled);
|
|
@@ -7839,7 +8100,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7839
8100
|
return dragBounds();
|
|
7840
8101
|
},
|
|
7841
8102
|
get grabbedBoxes() {
|
|
7842
|
-
return memo(() => !!shouldShowGrabbedBoxes())() ?
|
|
8103
|
+
return memo(() => !!shouldShowGrabbedBoxes())() ? computedGrabbedBoxes() : [];
|
|
7843
8104
|
},
|
|
7844
8105
|
labelZIndex: Z_INDEX_LABEL,
|
|
7845
8106
|
get mouseX() {
|
|
@@ -7860,6 +8121,9 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7860
8121
|
get hasAgent() {
|
|
7861
8122
|
return hasAgentProvider();
|
|
7862
8123
|
},
|
|
8124
|
+
get isAgentConnected() {
|
|
8125
|
+
return isAgentConnected();
|
|
8126
|
+
},
|
|
7863
8127
|
get agentSessions() {
|
|
7864
8128
|
return agentManager.sessions();
|
|
7865
8129
|
},
|
|
@@ -7868,6 +8132,11 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7868
8132
|
onInputSubmit: () => void handleInputSubmit(),
|
|
7869
8133
|
onInputCancel: handleInputCancel,
|
|
7870
8134
|
onToggleExpand: handleToggleExpand,
|
|
8135
|
+
get isPendingDismiss() {
|
|
8136
|
+
return isPendingDismiss();
|
|
8137
|
+
},
|
|
8138
|
+
onConfirmDismiss: handleConfirmDismiss,
|
|
8139
|
+
onCancelDismiss: handleCancelDismiss,
|
|
7871
8140
|
get nativeSelectionCursorVisible() {
|
|
7872
8141
|
return hasNativeSelection();
|
|
7873
8142
|
},
|
|
@@ -7977,6 +8246,11 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7977
8246
|
};
|
|
7978
8247
|
agentManager.setOptions(mergedOptions);
|
|
7979
8248
|
setHasAgentProvider(Boolean(mergedOptions.provider));
|
|
8249
|
+
if (mergedOptions.provider?.checkConnection) {
|
|
8250
|
+
void mergedOptions.provider.checkConnection().then((connected) => {
|
|
8251
|
+
setIsAgentConnected(connected);
|
|
8252
|
+
});
|
|
8253
|
+
}
|
|
7980
8254
|
agentManager.tryResumeSessions();
|
|
7981
8255
|
}
|
|
7982
8256
|
};
|