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
|
@@ -576,6 +576,61 @@ function mapArray(list, mapFn, options = {}) {
|
|
|
576
576
|
}
|
|
577
577
|
};
|
|
578
578
|
}
|
|
579
|
+
function indexArray(list, mapFn, options = {}) {
|
|
580
|
+
let items = [], mapped = [], disposers = [], signals = [], len = 0, i2;
|
|
581
|
+
onCleanup(() => dispose(disposers));
|
|
582
|
+
return () => {
|
|
583
|
+
const newItems = list() || [], newLen = newItems.length;
|
|
584
|
+
newItems[$TRACK];
|
|
585
|
+
return untrack(() => {
|
|
586
|
+
if (newLen === 0) {
|
|
587
|
+
if (len !== 0) {
|
|
588
|
+
dispose(disposers);
|
|
589
|
+
disposers = [];
|
|
590
|
+
items = [];
|
|
591
|
+
mapped = [];
|
|
592
|
+
len = 0;
|
|
593
|
+
signals = [];
|
|
594
|
+
}
|
|
595
|
+
if (options.fallback) {
|
|
596
|
+
items = [FALLBACK];
|
|
597
|
+
mapped[0] = createRoot((disposer) => {
|
|
598
|
+
disposers[0] = disposer;
|
|
599
|
+
return options.fallback();
|
|
600
|
+
});
|
|
601
|
+
len = 1;
|
|
602
|
+
}
|
|
603
|
+
return mapped;
|
|
604
|
+
}
|
|
605
|
+
if (items[0] === FALLBACK) {
|
|
606
|
+
disposers[0]();
|
|
607
|
+
disposers = [];
|
|
608
|
+
items = [];
|
|
609
|
+
mapped = [];
|
|
610
|
+
len = 0;
|
|
611
|
+
}
|
|
612
|
+
for (i2 = 0; i2 < newLen; i2++) {
|
|
613
|
+
if (i2 < items.length && items[i2] !== newItems[i2]) {
|
|
614
|
+
signals[i2](() => newItems[i2]);
|
|
615
|
+
} else if (i2 >= items.length) {
|
|
616
|
+
mapped[i2] = createRoot(mapper);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
for (; i2 < items.length; i2++) {
|
|
620
|
+
disposers[i2]();
|
|
621
|
+
}
|
|
622
|
+
len = signals.length = disposers.length = newLen;
|
|
623
|
+
items = newItems.slice(0);
|
|
624
|
+
return mapped = mapped.slice(0, len);
|
|
625
|
+
});
|
|
626
|
+
function mapper(disposer) {
|
|
627
|
+
disposers[i2] = disposer;
|
|
628
|
+
const [s3, set] = createSignal(newItems[i2]);
|
|
629
|
+
signals[i2] = set;
|
|
630
|
+
return mapFn(s3, i2);
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
}
|
|
579
634
|
function createComponent(Comp, props) {
|
|
580
635
|
return untrack(() => Comp(props || {}));
|
|
581
636
|
}
|
|
@@ -586,6 +641,12 @@ function For(props) {
|
|
|
586
641
|
};
|
|
587
642
|
return createMemo(mapArray(() => props.each, props.children, fallback || void 0));
|
|
588
643
|
}
|
|
644
|
+
function Index(props) {
|
|
645
|
+
const fallback = "fallback" in props && {
|
|
646
|
+
fallback: () => props.fallback
|
|
647
|
+
};
|
|
648
|
+
return createMemo(indexArray(() => props.each, props.children, fallback || void 0));
|
|
649
|
+
}
|
|
589
650
|
function Show(props) {
|
|
590
651
|
const keyed = props.keyed;
|
|
591
652
|
const conditionValue = createMemo(() => props.when, void 0, void 0);
|
|
@@ -888,7 +949,7 @@ function cleanChildren(parent, current, marker, replacement) {
|
|
|
888
949
|
|
|
889
950
|
// dist/styles.css
|
|
890
951
|
var styles_default = `/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */
|
|
891
|
-
@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}}`;
|
|
952
|
+
@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}}`;
|
|
892
953
|
|
|
893
954
|
// src/utils/is-keyboard-event-triggered-by-input.ts
|
|
894
955
|
var FORM_TAGS_AND_ROLES = [
|
|
@@ -1017,7 +1078,7 @@ var buildOpenFileUrl = (filePath, lineNumber) => {
|
|
|
1017
1078
|
};
|
|
1018
1079
|
|
|
1019
1080
|
// src/constants.ts
|
|
1020
|
-
var VERSION = "0.0.
|
|
1081
|
+
var VERSION = "0.0.72";
|
|
1021
1082
|
var VIEWPORT_MARGIN_PX = 8;
|
|
1022
1083
|
var OFFSCREEN_POSITION = -1e3;
|
|
1023
1084
|
var SELECTION_LERP_FACTOR = 0.95;
|
|
@@ -3599,7 +3660,7 @@ var SelectionBox = (props) => {
|
|
|
3599
3660
|
get children() {
|
|
3600
3661
|
var _el$ = _tmpl$();
|
|
3601
3662
|
createRenderEffect((_p$) => {
|
|
3602
|
-
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
|
|
3663
|
+
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;
|
|
3603
3664
|
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
3604
3665
|
_v$2 !== _p$.t && setStyleProperty(_el$, "top", _p$.t = _v$2);
|
|
3605
3666
|
_v$3 !== _p$.a && setStyleProperty(_el$, "left", _p$.a = _v$3);
|
|
@@ -3761,7 +3822,7 @@ var useSpeechRecognition = (options) => {
|
|
|
3761
3822
|
let baseValue;
|
|
3762
3823
|
if (lastInterimText && currentValue.endsWith(lastInterimText)) {
|
|
3763
3824
|
baseValue = currentValue.slice(0, -lastInterimText.length);
|
|
3764
|
-
} else if (currentValue === lastValueWeSet) {
|
|
3825
|
+
} else if (currentValue === lastValueWeSet && lastInterimText) {
|
|
3765
3826
|
baseValue = currentValue.slice(0, -lastInterimText.length);
|
|
3766
3827
|
} else {
|
|
3767
3828
|
baseValue = currentValue;
|
|
@@ -3858,25 +3919,48 @@ var IconMic = (props) => {
|
|
|
3858
3919
|
})();
|
|
3859
3920
|
};
|
|
3860
3921
|
|
|
3922
|
+
// src/components/icon-return.tsx
|
|
3923
|
+
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>`);
|
|
3924
|
+
var IconReturn = (props) => {
|
|
3925
|
+
const size = () => props.size ?? 12;
|
|
3926
|
+
return (() => {
|
|
3927
|
+
var _el$ = _tmpl$5();
|
|
3928
|
+
createRenderEffect((_p$) => {
|
|
3929
|
+
var _v$ = size(), _v$2 = size() * 19 / 22, _v$3 = props.class;
|
|
3930
|
+
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
3931
|
+
_v$2 !== _p$.t && setAttribute(_el$, "height", _p$.t = _v$2);
|
|
3932
|
+
_v$3 !== _p$.a && setAttribute(_el$, "class", _p$.a = _v$3);
|
|
3933
|
+
return _p$;
|
|
3934
|
+
}, {
|
|
3935
|
+
e: void 0,
|
|
3936
|
+
t: void 0,
|
|
3937
|
+
a: void 0
|
|
3938
|
+
});
|
|
3939
|
+
return _el$;
|
|
3940
|
+
})();
|
|
3941
|
+
};
|
|
3942
|
+
|
|
3861
3943
|
// src/components/selection-label.tsx
|
|
3862
|
-
var _tmpl$
|
|
3944
|
+
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>`);
|
|
3863
3945
|
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">`);
|
|
3864
3946
|
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">>`);
|
|
3865
3947
|
var _tmpl$42 = /* @__PURE__ */ template(`<div class="absolute w-0 h-0"style="border-left:8px solid transparent;border-right:8px solid transparent">`);
|
|
3866
3948
|
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">`);
|
|
3867
|
-
var _tmpl$
|
|
3868
|
-
var _tmpl$7 = /* @__PURE__ */ template(`<div class="[
|
|
3869
|
-
var _tmpl$8 = /* @__PURE__ */ template(`<
|
|
3870
|
-
var _tmpl$9 = /* @__PURE__ */ template(`<div class="shrink-0 flex
|
|
3871
|
-
var _tmpl$0 = /* @__PURE__ */ template(`<
|
|
3872
|
-
var _tmpl$1 = /* @__PURE__ */ template(`<div class="
|
|
3873
|
-
var _tmpl$10 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex
|
|
3874
|
-
var _tmpl$11 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex
|
|
3875
|
-
var _tmpl$12 = /* @__PURE__ */ template(`<
|
|
3876
|
-
var _tmpl$13 = /* @__PURE__ */ template(`<
|
|
3877
|
-
var _tmpl$14 = /* @__PURE__ */ template(`<
|
|
3878
|
-
var _tmpl$15 = /* @__PURE__ */ template(`<
|
|
3879
|
-
var _tmpl$16 = /* @__PURE__ */ template(`<div
|
|
3949
|
+
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%)">`);
|
|
3950
|
+
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`);
|
|
3951
|
+
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?`);
|
|
3952
|
+
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">`);
|
|
3953
|
+
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">`);
|
|
3954
|
+
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>`);
|
|
3955
|
+
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">`);
|
|
3956
|
+
var _tmpl$11 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex items-center gap-px w-fit h-fit">`);
|
|
3957
|
+
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`);
|
|
3958
|
+
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>`);
|
|
3959
|
+
var _tmpl$14 = /* @__PURE__ */ template(`<button>`);
|
|
3960
|
+
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">`);
|
|
3961
|
+
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">`);
|
|
3962
|
+
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>`);
|
|
3963
|
+
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">`);
|
|
3880
3964
|
var ARROW_HEIGHT = 8;
|
|
3881
3965
|
var LABEL_GAP = 4;
|
|
3882
3966
|
var IDLE_TIMEOUT_MS = 400;
|
|
@@ -3891,7 +3975,7 @@ var TagBadge = (props) => {
|
|
|
3891
3975
|
props.onHoverChange?.(false);
|
|
3892
3976
|
};
|
|
3893
3977
|
return (() => {
|
|
3894
|
-
var _el$ = _tmpl$
|
|
3978
|
+
var _el$ = _tmpl$6(), _el$2 = _el$.firstChild;
|
|
3895
3979
|
addEventListener(_el$, "click", props.onClick);
|
|
3896
3980
|
_el$.addEventListener("mouseleave", handleMouseLeave);
|
|
3897
3981
|
_el$.addEventListener("mouseenter", handleMouseEnter);
|
|
@@ -3964,19 +4048,61 @@ var ClickToCopyPill = (props) => {
|
|
|
3964
4048
|
})();
|
|
3965
4049
|
};
|
|
3966
4050
|
var BottomSection = (props) => (() => {
|
|
3967
|
-
var _el$9 = _tmpl$
|
|
4051
|
+
var _el$9 = _tmpl$62();
|
|
3968
4052
|
insert(_el$9, () => props.children);
|
|
3969
4053
|
return _el$9;
|
|
3970
4054
|
})();
|
|
4055
|
+
var DismissConfirmation = (props) => {
|
|
4056
|
+
const handleKeyDown = (event) => {
|
|
4057
|
+
if (event.code === "Enter") {
|
|
4058
|
+
event.preventDefault();
|
|
4059
|
+
event.stopPropagation();
|
|
4060
|
+
props.onConfirm?.();
|
|
4061
|
+
} else if (event.code === "Escape") {
|
|
4062
|
+
event.preventDefault();
|
|
4063
|
+
event.stopPropagation();
|
|
4064
|
+
props.onCancel?.();
|
|
4065
|
+
}
|
|
4066
|
+
};
|
|
4067
|
+
onMount(() => {
|
|
4068
|
+
window.addEventListener("keydown", handleKeyDown, {
|
|
4069
|
+
capture: true
|
|
4070
|
+
});
|
|
4071
|
+
});
|
|
4072
|
+
onCleanup(() => {
|
|
4073
|
+
window.removeEventListener("keydown", handleKeyDown, {
|
|
4074
|
+
capture: true
|
|
4075
|
+
});
|
|
4076
|
+
});
|
|
4077
|
+
return (() => {
|
|
4078
|
+
var _el$0 = _tmpl$8(); _el$0.firstChild;
|
|
4079
|
+
insert(_el$0, createComponent(BottomSection, {
|
|
4080
|
+
get children() {
|
|
4081
|
+
var _el$10 = _tmpl$7(), _el$11 = _el$10.firstChild, _el$12 = _el$11.nextSibling; _el$12.firstChild;
|
|
4082
|
+
addEventListener(_el$11, "click", props.onCancel);
|
|
4083
|
+
addEventListener(_el$12, "click", props.onConfirm);
|
|
4084
|
+
insert(_el$12, createComponent(IconReturn, {
|
|
4085
|
+
size: 10,
|
|
4086
|
+
"class": "text-[#c00002]"
|
|
4087
|
+
}), null);
|
|
4088
|
+
return _el$10;
|
|
4089
|
+
}
|
|
4090
|
+
}), null);
|
|
4091
|
+
return _el$0;
|
|
4092
|
+
})();
|
|
4093
|
+
};
|
|
3971
4094
|
var SelectionLabel = (props) => {
|
|
3972
4095
|
let containerRef;
|
|
3973
4096
|
let inputRef;
|
|
3974
4097
|
let isTagCurrentlyHovered = false;
|
|
4098
|
+
let lastValidPosition = null;
|
|
4099
|
+
let lastElementIdentity = null;
|
|
3975
4100
|
const [measuredWidth, setMeasuredWidth] = createSignal(0);
|
|
3976
4101
|
const [measuredHeight, setMeasuredHeight] = createSignal(0);
|
|
3977
4102
|
const [arrowPosition, setArrowPosition] = createSignal("bottom");
|
|
3978
4103
|
const [viewportVersion, setViewportVersion] = createSignal(0);
|
|
3979
4104
|
const [isIdle, setIsIdle] = createSignal(false);
|
|
4105
|
+
const [hadValidBounds, setHadValidBounds] = createSignal(false);
|
|
3980
4106
|
const speechRecognition = useSpeechRecognition({
|
|
3981
4107
|
onTranscript: (transcript) => props.onInputChange?.(transcript),
|
|
3982
4108
|
getCurrentValue: () => props.inputValue ?? ""
|
|
@@ -4033,8 +4159,11 @@ var SelectionLabel = (props) => {
|
|
|
4033
4159
|
}
|
|
4034
4160
|
});
|
|
4035
4161
|
createEffect(() => {
|
|
4036
|
-
|
|
4037
|
-
|
|
4162
|
+
const elementIdentity = `${props.tagName ?? ""}:${props.componentName ?? ""}`;
|
|
4163
|
+
if (elementIdentity !== lastElementIdentity) {
|
|
4164
|
+
lastElementIdentity = elementIdentity;
|
|
4165
|
+
resetIdleTimer();
|
|
4166
|
+
}
|
|
4038
4167
|
});
|
|
4039
4168
|
createEffect(() => {
|
|
4040
4169
|
if (props.visible) {
|
|
@@ -4059,8 +4188,10 @@ var SelectionLabel = (props) => {
|
|
|
4059
4188
|
const bounds = props.selectionBounds;
|
|
4060
4189
|
const labelWidth = measuredWidth();
|
|
4061
4190
|
const labelHeight = measuredHeight();
|
|
4062
|
-
|
|
4063
|
-
|
|
4191
|
+
const hasMeasurements = labelWidth > 0 && labelHeight > 0;
|
|
4192
|
+
const hasValidBounds = bounds && bounds.width > 0 && bounds.height > 0;
|
|
4193
|
+
if (!hasMeasurements || !hasValidBounds) {
|
|
4194
|
+
return lastValidPosition ?? {
|
|
4064
4195
|
left: -9999,
|
|
4065
4196
|
top: -9999,
|
|
4066
4197
|
arrowLeft: 0
|
|
@@ -4092,11 +4223,14 @@ var SelectionLabel = (props) => {
|
|
|
4092
4223
|
positionTop = VIEWPORT_MARGIN_PX;
|
|
4093
4224
|
}
|
|
4094
4225
|
const arrowLeft = Math.max(12, Math.min(cursorX - positionLeft, labelWidth - 12));
|
|
4095
|
-
|
|
4226
|
+
const position = {
|
|
4096
4227
|
left: positionLeft,
|
|
4097
4228
|
top: positionTop,
|
|
4098
4229
|
arrowLeft
|
|
4099
4230
|
};
|
|
4231
|
+
lastValidPosition = position;
|
|
4232
|
+
setHadValidBounds(true);
|
|
4233
|
+
return position;
|
|
4100
4234
|
};
|
|
4101
4235
|
const handleKeyDown = (event) => {
|
|
4102
4236
|
event.stopPropagation();
|
|
@@ -4129,85 +4263,93 @@ var SelectionLabel = (props) => {
|
|
|
4129
4263
|
event.stopPropagation();
|
|
4130
4264
|
event.stopImmediatePropagation();
|
|
4131
4265
|
};
|
|
4266
|
+
const handleContainerPointerDown = (event) => {
|
|
4267
|
+
stopPropagation(event);
|
|
4268
|
+
const isEditableInputVisible = isNotProcessing() && props.isInputExpanded && !props.isPendingDismiss;
|
|
4269
|
+
if (isEditableInputVisible && inputRef) {
|
|
4270
|
+
inputRef.focus();
|
|
4271
|
+
}
|
|
4272
|
+
};
|
|
4132
4273
|
const handleSubmit = () => {
|
|
4133
4274
|
if (props.isInputExpanded && !props.inputValue?.trim()) return;
|
|
4134
4275
|
speechRecognition.stop();
|
|
4135
4276
|
props.onSubmit?.();
|
|
4136
4277
|
};
|
|
4278
|
+
const shouldShowWithoutBounds = () => hadValidBounds() && (props.status === "copied" || props.status === "fading");
|
|
4137
4279
|
return createComponent(Show, {
|
|
4138
4280
|
get when() {
|
|
4139
|
-
return memo(() => props.visible !== false)() && props.selectionBounds;
|
|
4281
|
+
return memo(() => props.visible !== false)() && (props.selectionBounds || shouldShowWithoutBounds());
|
|
4140
4282
|
},
|
|
4141
4283
|
get children() {
|
|
4142
|
-
var _el$
|
|
4143
|
-
_el$
|
|
4144
|
-
_el$
|
|
4145
|
-
_el$
|
|
4284
|
+
var _el$14 = _tmpl$18(), _el$18 = _el$14.firstChild;
|
|
4285
|
+
_el$14.$$click = stopPropagation;
|
|
4286
|
+
_el$14.$$mousedown = stopPropagation;
|
|
4287
|
+
_el$14.$$pointerdown = handleContainerPointerDown;
|
|
4146
4288
|
var _ref$ = containerRef;
|
|
4147
|
-
typeof _ref$ === "function" ? use(_ref$, _el$
|
|
4148
|
-
insert(_el$
|
|
4289
|
+
typeof _ref$ === "function" ? use(_ref$, _el$14) : containerRef = _el$14;
|
|
4290
|
+
insert(_el$14, createComponent(Arrow, {
|
|
4149
4291
|
get position() {
|
|
4150
4292
|
return arrowPosition();
|
|
4151
4293
|
},
|
|
4152
4294
|
get leftPx() {
|
|
4153
4295
|
return computedPosition().arrowLeft;
|
|
4154
4296
|
}
|
|
4155
|
-
}), _el$
|
|
4156
|
-
insert(_el$
|
|
4297
|
+
}), _el$18);
|
|
4298
|
+
insert(_el$14, createComponent(Show, {
|
|
4157
4299
|
get when() {
|
|
4158
4300
|
return props.status === "copied" || props.status === "fading";
|
|
4159
4301
|
},
|
|
4160
4302
|
get children() {
|
|
4161
|
-
var _el$
|
|
4162
|
-
insert(_el$
|
|
4163
|
-
return _el$
|
|
4303
|
+
var _el$15 = _tmpl$9(), _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild;
|
|
4304
|
+
insert(_el$17, () => props.hasAgent ? "Completed" : "Copied");
|
|
4305
|
+
return _el$15;
|
|
4164
4306
|
}
|
|
4165
|
-
}), _el$
|
|
4166
|
-
insert(_el$
|
|
4307
|
+
}), _el$18);
|
|
4308
|
+
insert(_el$18, createComponent(Show, {
|
|
4167
4309
|
get when() {
|
|
4168
4310
|
return props.status === "copying";
|
|
4169
4311
|
},
|
|
4170
4312
|
get children() {
|
|
4171
|
-
var _el$
|
|
4172
|
-
insert(_el$
|
|
4173
|
-
insert(_el$
|
|
4313
|
+
var _el$19 = _tmpl$10(), _el$20 = _el$19.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$21.firstChild;
|
|
4314
|
+
insert(_el$22, () => props.statusText ?? "Grabbing\u2026");
|
|
4315
|
+
insert(_el$19, createComponent(BottomSection, {
|
|
4174
4316
|
get children() {
|
|
4175
|
-
var _el$
|
|
4317
|
+
var _el$23 = _tmpl$1(), _el$24 = _el$23.firstChild;
|
|
4176
4318
|
var _ref$2 = inputRef;
|
|
4177
|
-
typeof _ref$2 === "function" ? use(_ref$2, _el$
|
|
4178
|
-
insert(_el$
|
|
4319
|
+
typeof _ref$2 === "function" ? use(_ref$2, _el$24) : inputRef = _el$24;
|
|
4320
|
+
insert(_el$23, createComponent(Show, {
|
|
4179
4321
|
get when() {
|
|
4180
4322
|
return props.onAbort;
|
|
4181
4323
|
},
|
|
4182
4324
|
get children() {
|
|
4183
|
-
var _el$
|
|
4184
|
-
_el$
|
|
4325
|
+
var _el$25 = _tmpl$0();
|
|
4326
|
+
_el$25.$$click = (event) => {
|
|
4185
4327
|
event.stopPropagation();
|
|
4186
4328
|
props.onAbort?.();
|
|
4187
4329
|
};
|
|
4188
|
-
_el$
|
|
4330
|
+
_el$25.$$pointerup = (event) => {
|
|
4189
4331
|
event.stopPropagation();
|
|
4190
4332
|
props.onAbort?.();
|
|
4191
4333
|
};
|
|
4192
|
-
_el$
|
|
4193
|
-
_el$
|
|
4194
|
-
return _el$
|
|
4334
|
+
_el$25.$$mousedown = (event) => event.stopPropagation();
|
|
4335
|
+
_el$25.$$pointerdown = (event) => event.stopPropagation();
|
|
4336
|
+
return _el$25;
|
|
4195
4337
|
}
|
|
4196
4338
|
}), null);
|
|
4197
|
-
createRenderEffect(() => _el$
|
|
4198
|
-
return _el$
|
|
4339
|
+
createRenderEffect(() => _el$24.value = props.inputValue ?? "");
|
|
4340
|
+
return _el$23;
|
|
4199
4341
|
}
|
|
4200
4342
|
}), null);
|
|
4201
|
-
return _el$
|
|
4343
|
+
return _el$19;
|
|
4202
4344
|
}
|
|
4203
4345
|
}), null);
|
|
4204
|
-
insert(_el$
|
|
4346
|
+
insert(_el$18, createComponent(Show, {
|
|
4205
4347
|
get when() {
|
|
4206
4348
|
return memo(() => !!isNotProcessing())() && !props.isInputExpanded;
|
|
4207
4349
|
},
|
|
4208
4350
|
get children() {
|
|
4209
|
-
var _el$
|
|
4210
|
-
insert(_el$
|
|
4351
|
+
var _el$26 = _tmpl$13(), _el$27 = _el$26.firstChild, _el$29 = _el$27.nextSibling, _el$30 = _el$29.firstChild;
|
|
4352
|
+
insert(_el$27, createComponent(ClickToCopyPill, {
|
|
4211
4353
|
onClick: handleSubmit,
|
|
4212
4354
|
shrink: true,
|
|
4213
4355
|
get hasParent() {
|
|
@@ -4217,19 +4359,19 @@ var SelectionLabel = (props) => {
|
|
|
4217
4359
|
return props.hasAgent;
|
|
4218
4360
|
}
|
|
4219
4361
|
}), null);
|
|
4220
|
-
insert(_el$
|
|
4362
|
+
insert(_el$27, createComponent(Show, {
|
|
4221
4363
|
get when() {
|
|
4222
4364
|
return props.componentName;
|
|
4223
4365
|
},
|
|
4224
4366
|
get children() {
|
|
4225
|
-
var _el$
|
|
4226
|
-
insert(_el$
|
|
4367
|
+
var _el$28 = _tmpl$11();
|
|
4368
|
+
insert(_el$28, createComponent(ParentBadge, {
|
|
4227
4369
|
get name() {
|
|
4228
4370
|
return props.componentName;
|
|
4229
4371
|
}
|
|
4230
4372
|
}), null);
|
|
4231
|
-
insert(_el$
|
|
4232
|
-
insert(_el$
|
|
4373
|
+
insert(_el$28, createComponent(ChevronSeparator, {}), null);
|
|
4374
|
+
insert(_el$28, createComponent(TagBadge, {
|
|
4233
4375
|
get tagName() {
|
|
4234
4376
|
return tagDisplay();
|
|
4235
4377
|
},
|
|
@@ -4241,10 +4383,10 @@ var SelectionLabel = (props) => {
|
|
|
4241
4383
|
showMono: true,
|
|
4242
4384
|
shrink: true
|
|
4243
4385
|
}), null);
|
|
4244
|
-
return _el$
|
|
4386
|
+
return _el$28;
|
|
4245
4387
|
}
|
|
4246
4388
|
}), null);
|
|
4247
|
-
insert(_el$
|
|
4389
|
+
insert(_el$27, createComponent(Show, {
|
|
4248
4390
|
get when() {
|
|
4249
4391
|
return !props.componentName;
|
|
4250
4392
|
},
|
|
@@ -4263,33 +4405,37 @@ var SelectionLabel = (props) => {
|
|
|
4263
4405
|
});
|
|
4264
4406
|
}
|
|
4265
4407
|
}), null);
|
|
4266
|
-
insert(_el$
|
|
4408
|
+
insert(_el$30, createComponent(BottomSection, {
|
|
4267
4409
|
get children() {
|
|
4268
|
-
var _el$
|
|
4269
|
-
|
|
4410
|
+
var _el$31 = _tmpl$12(), _el$32 = _el$31.firstChild, _el$33 = _el$32.nextSibling;
|
|
4411
|
+
insert(_el$33, createComponent(IconReturn, {
|
|
4412
|
+
size: 10,
|
|
4413
|
+
"class": "opacity-[0.99] text-black"
|
|
4414
|
+
}));
|
|
4415
|
+
return _el$31;
|
|
4270
4416
|
}
|
|
4271
4417
|
}));
|
|
4272
4418
|
createRenderEffect((_p$) => {
|
|
4273
4419
|
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");
|
|
4274
|
-
_v$3 !== _p$.e && className(_el$
|
|
4275
|
-
_v$4 !== _p$.t && setStyleProperty(_el$
|
|
4276
|
-
_v$5 !== _p$.a && className(_el$
|
|
4420
|
+
_v$3 !== _p$.e && className(_el$27, _p$.e = _v$3);
|
|
4421
|
+
_v$4 !== _p$.t && setStyleProperty(_el$29, "grid-template-rows", _p$.t = _v$4);
|
|
4422
|
+
_v$5 !== _p$.a && className(_el$30, _p$.a = _v$5);
|
|
4277
4423
|
return _p$;
|
|
4278
4424
|
}, {
|
|
4279
4425
|
e: void 0,
|
|
4280
4426
|
t: void 0,
|
|
4281
4427
|
a: void 0
|
|
4282
4428
|
});
|
|
4283
|
-
return _el$
|
|
4429
|
+
return _el$26;
|
|
4284
4430
|
}
|
|
4285
4431
|
}), null);
|
|
4286
|
-
insert(_el$
|
|
4432
|
+
insert(_el$18, createComponent(Show, {
|
|
4287
4433
|
get when() {
|
|
4288
|
-
return memo(() => !!isNotProcessing())() && props.
|
|
4434
|
+
return memo(() => !!(isNotProcessing() && props.isInputExpanded))() && !props.isPendingDismiss;
|
|
4289
4435
|
},
|
|
4290
4436
|
get children() {
|
|
4291
|
-
var _el$
|
|
4292
|
-
insert(_el$
|
|
4437
|
+
var _el$34 = _tmpl$17(), _el$35 = _el$34.firstChild;
|
|
4438
|
+
insert(_el$35, createComponent(ClickToCopyPill, {
|
|
4293
4439
|
onClick: handleSubmit,
|
|
4294
4440
|
dimmed: true,
|
|
4295
4441
|
shrink: true,
|
|
@@ -4300,19 +4446,19 @@ var SelectionLabel = (props) => {
|
|
|
4300
4446
|
return props.hasAgent;
|
|
4301
4447
|
}
|
|
4302
4448
|
}), null);
|
|
4303
|
-
insert(_el$
|
|
4449
|
+
insert(_el$35, createComponent(Show, {
|
|
4304
4450
|
get when() {
|
|
4305
4451
|
return props.componentName;
|
|
4306
4452
|
},
|
|
4307
4453
|
get children() {
|
|
4308
|
-
var _el$
|
|
4309
|
-
insert(_el$
|
|
4454
|
+
var _el$36 = _tmpl$11();
|
|
4455
|
+
insert(_el$36, createComponent(ParentBadge, {
|
|
4310
4456
|
get name() {
|
|
4311
4457
|
return props.componentName;
|
|
4312
4458
|
}
|
|
4313
4459
|
}), null);
|
|
4314
|
-
insert(_el$
|
|
4315
|
-
insert(_el$
|
|
4460
|
+
insert(_el$36, createComponent(ChevronSeparator, {}), null);
|
|
4461
|
+
insert(_el$36, createComponent(TagBadge, {
|
|
4316
4462
|
get tagName() {
|
|
4317
4463
|
return tagDisplay();
|
|
4318
4464
|
},
|
|
@@ -4325,10 +4471,10 @@ var SelectionLabel = (props) => {
|
|
|
4325
4471
|
shrink: true,
|
|
4326
4472
|
forceShowIcon: true
|
|
4327
4473
|
}), null);
|
|
4328
|
-
return _el$
|
|
4474
|
+
return _el$36;
|
|
4329
4475
|
}
|
|
4330
4476
|
}), null);
|
|
4331
|
-
insert(_el$
|
|
4477
|
+
insert(_el$35, createComponent(Show, {
|
|
4332
4478
|
get when() {
|
|
4333
4479
|
return !props.componentName;
|
|
4334
4480
|
},
|
|
@@ -4348,21 +4494,21 @@ var SelectionLabel = (props) => {
|
|
|
4348
4494
|
});
|
|
4349
4495
|
}
|
|
4350
4496
|
}), null);
|
|
4351
|
-
insert(_el$
|
|
4497
|
+
insert(_el$34, createComponent(BottomSection, {
|
|
4352
4498
|
get children() {
|
|
4353
|
-
var _el$
|
|
4354
|
-
_el$
|
|
4355
|
-
_el$
|
|
4499
|
+
var _el$37 = _tmpl$16(), _el$38 = _el$37.firstChild, _el$39 = _el$38.nextSibling;
|
|
4500
|
+
_el$38.$$keydown = handleKeyDown;
|
|
4501
|
+
_el$38.$$input = handleInput;
|
|
4356
4502
|
var _ref$3 = inputRef;
|
|
4357
|
-
typeof _ref$3 === "function" ? use(_ref$3, _el$
|
|
4358
|
-
insert(_el$
|
|
4503
|
+
typeof _ref$3 === "function" ? use(_ref$3, _el$38) : inputRef = _el$38;
|
|
4504
|
+
insert(_el$39, createComponent(Show, {
|
|
4359
4505
|
get when() {
|
|
4360
4506
|
return memo(() => !!(props.hasAgent && speechRecognition.isSupported()))() && !props.inputValue;
|
|
4361
4507
|
},
|
|
4362
4508
|
get children() {
|
|
4363
|
-
var _el$
|
|
4364
|
-
addEventListener(_el$
|
|
4365
|
-
insert(_el$
|
|
4509
|
+
var _el$40 = _tmpl$14();
|
|
4510
|
+
addEventListener(_el$40, "click", speechRecognition.toggle);
|
|
4511
|
+
insert(_el$40, createComponent(IconMic, {
|
|
4366
4512
|
size: 11,
|
|
4367
4513
|
get ["class"]() {
|
|
4368
4514
|
return speechRecognition.isListening() ? "animate-pulse" : "";
|
|
@@ -4370,42 +4516,61 @@ var SelectionLabel = (props) => {
|
|
|
4370
4516
|
}));
|
|
4371
4517
|
createRenderEffect((_p$) => {
|
|
4372
4518
|
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";
|
|
4373
|
-
_v$6 !== _p$.e && className(_el$
|
|
4374
|
-
_v$7 !== _p$.t && setAttribute(_el$
|
|
4519
|
+
_v$6 !== _p$.e && className(_el$40, _p$.e = _v$6);
|
|
4520
|
+
_v$7 !== _p$.t && setAttribute(_el$40, "title", _p$.t = _v$7);
|
|
4375
4521
|
return _p$;
|
|
4376
4522
|
}, {
|
|
4377
4523
|
e: void 0,
|
|
4378
4524
|
t: void 0
|
|
4379
4525
|
});
|
|
4380
|
-
return _el$
|
|
4526
|
+
return _el$40;
|
|
4381
4527
|
}
|
|
4382
4528
|
}), null);
|
|
4383
|
-
insert(_el$
|
|
4529
|
+
insert(_el$39, createComponent(Show, {
|
|
4384
4530
|
get when() {
|
|
4385
4531
|
return props.inputValue;
|
|
4386
4532
|
},
|
|
4387
4533
|
get children() {
|
|
4388
|
-
var _el$
|
|
4389
|
-
_el$
|
|
4390
|
-
|
|
4534
|
+
var _el$41 = _tmpl$15();
|
|
4535
|
+
_el$41.$$click = handleSubmit;
|
|
4536
|
+
insert(_el$41, createComponent(IconReturn, {
|
|
4537
|
+
size: 10,
|
|
4538
|
+
"class": "opacity-[0.99] text-black"
|
|
4539
|
+
}));
|
|
4540
|
+
return _el$41;
|
|
4391
4541
|
}
|
|
4392
4542
|
}), null);
|
|
4393
|
-
createRenderEffect(() => setAttribute(_el$
|
|
4394
|
-
createRenderEffect(() => _el$
|
|
4395
|
-
return _el$
|
|
4543
|
+
createRenderEffect(() => setAttribute(_el$38, "placeholder", speechRecognition.isListening() ? "listening..." : props.hasAgent && props.isAgentConnected ? "type to edit" : "type prompt"));
|
|
4544
|
+
createRenderEffect(() => _el$38.value = props.inputValue ?? "");
|
|
4545
|
+
return _el$37;
|
|
4396
4546
|
}
|
|
4397
4547
|
}), null);
|
|
4398
|
-
createRenderEffect(() => className(_el$
|
|
4399
|
-
return _el$
|
|
4548
|
+
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")));
|
|
4549
|
+
return _el$34;
|
|
4550
|
+
}
|
|
4551
|
+
}), null);
|
|
4552
|
+
insert(_el$18, createComponent(Show, {
|
|
4553
|
+
get when() {
|
|
4554
|
+
return props.isPendingDismiss;
|
|
4555
|
+
},
|
|
4556
|
+
get children() {
|
|
4557
|
+
return createComponent(DismissConfirmation, {
|
|
4558
|
+
get onConfirm() {
|
|
4559
|
+
return props.onConfirmDismiss;
|
|
4560
|
+
},
|
|
4561
|
+
get onCancel() {
|
|
4562
|
+
return props.onCancelDismiss;
|
|
4563
|
+
}
|
|
4564
|
+
});
|
|
4400
4565
|
}
|
|
4401
4566
|
}), null);
|
|
4402
4567
|
createRenderEffect((_p$) => {
|
|
4403
4568
|
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;
|
|
4404
|
-
_v$8 !== _p$.e && setStyleProperty(_el$
|
|
4405
|
-
_v$9 !== _p$.t && setStyleProperty(_el$
|
|
4406
|
-
_v$0 !== _p$.a && setStyleProperty(_el$
|
|
4407
|
-
_v$1 !== _p$.o && setStyleProperty(_el$
|
|
4408
|
-
_v$10 !== _p$.i && setStyleProperty(_el$
|
|
4569
|
+
_v$8 !== _p$.e && setStyleProperty(_el$14, "top", _p$.e = _v$8);
|
|
4570
|
+
_v$9 !== _p$.t && setStyleProperty(_el$14, "left", _p$.t = _v$9);
|
|
4571
|
+
_v$0 !== _p$.a && setStyleProperty(_el$14, "pointer-events", _p$.a = _v$0);
|
|
4572
|
+
_v$1 !== _p$.o && setStyleProperty(_el$14, "opacity", _p$.o = _v$1);
|
|
4573
|
+
_v$10 !== _p$.i && setStyleProperty(_el$18, "display", _p$.i = _v$10);
|
|
4409
4574
|
return _p$;
|
|
4410
4575
|
}, {
|
|
4411
4576
|
e: void 0,
|
|
@@ -4414,14 +4579,14 @@ var SelectionLabel = (props) => {
|
|
|
4414
4579
|
o: void 0,
|
|
4415
4580
|
i: void 0
|
|
4416
4581
|
});
|
|
4417
|
-
return _el$
|
|
4582
|
+
return _el$14;
|
|
4418
4583
|
}
|
|
4419
4584
|
});
|
|
4420
4585
|
};
|
|
4421
4586
|
delegateEvents(["click", "pointerdown", "mousedown", "pointerup", "input", "keydown"]);
|
|
4422
4587
|
|
|
4423
4588
|
// src/components/selection-cursor.tsx
|
|
4424
|
-
var _tmpl$
|
|
4589
|
+
var _tmpl$19 = /* @__PURE__ */ template(`<div class="fixed z-2147483647"><button data-react-grab-selection-cursor>`);
|
|
4425
4590
|
var SelectionCursor = (props) => {
|
|
4426
4591
|
const [isHovered, setIsHovered] = createSignal(false);
|
|
4427
4592
|
const [debouncedVisible, setDebouncedVisible] = createSignal(false);
|
|
@@ -4458,7 +4623,7 @@ var SelectionCursor = (props) => {
|
|
|
4458
4623
|
});
|
|
4459
4624
|
}
|
|
4460
4625
|
}), (() => {
|
|
4461
|
-
var _el$ = _tmpl$
|
|
4626
|
+
var _el$ = _tmpl$19(), _el$2 = _el$.firstChild;
|
|
4462
4627
|
_el$.addEventListener("mouseleave", () => setIsHovered(false));
|
|
4463
4628
|
_el$.addEventListener("mouseenter", () => setIsHovered(true));
|
|
4464
4629
|
_el$2.$$click = handleClick;
|
|
@@ -4503,6 +4668,7 @@ delegateEvents(["click"]);
|
|
|
4503
4668
|
|
|
4504
4669
|
// src/components/renderer.tsx
|
|
4505
4670
|
var ReactGrabRenderer = (props) => {
|
|
4671
|
+
const agentSessionsList = createMemo(() => props.agentSessions ? Array.from(props.agentSessions.values()) : []);
|
|
4506
4672
|
return [createComponent(Show, {
|
|
4507
4673
|
get when() {
|
|
4508
4674
|
return memo(() => !!props.selectionVisible)() && props.selectionBounds;
|
|
@@ -4564,51 +4730,52 @@ var ReactGrabRenderer = (props) => {
|
|
|
4564
4730
|
return box.createdAt;
|
|
4565
4731
|
}
|
|
4566
4732
|
})
|
|
4567
|
-
}), createComponent(
|
|
4733
|
+
}), createComponent(Index, {
|
|
4568
4734
|
get each() {
|
|
4569
|
-
return
|
|
4735
|
+
return agentSessionsList();
|
|
4570
4736
|
},
|
|
4571
4737
|
children: (session) => [createComponent(Show, {
|
|
4572
4738
|
get when() {
|
|
4573
|
-
return session.selectionBounds;
|
|
4739
|
+
return session().selectionBounds;
|
|
4574
4740
|
},
|
|
4575
4741
|
get children() {
|
|
4576
4742
|
return createComponent(SelectionBox, {
|
|
4577
4743
|
variant: "processing",
|
|
4578
4744
|
get bounds() {
|
|
4579
|
-
return session.selectionBounds;
|
|
4745
|
+
return session().selectionBounds;
|
|
4580
4746
|
},
|
|
4581
4747
|
visible: true,
|
|
4582
4748
|
get isCompleted() {
|
|
4583
|
-
return !session.isStreaming;
|
|
4749
|
+
return !session().isStreaming;
|
|
4584
4750
|
}
|
|
4585
4751
|
});
|
|
4586
4752
|
}
|
|
4587
4753
|
}), createComponent(SelectionLabel, {
|
|
4588
4754
|
get tagName() {
|
|
4589
|
-
return session.tagName;
|
|
4755
|
+
return session().tagName;
|
|
4590
4756
|
},
|
|
4591
4757
|
get componentName() {
|
|
4592
|
-
return session.componentName;
|
|
4758
|
+
return session().componentName;
|
|
4593
4759
|
},
|
|
4594
4760
|
get selectionBounds() {
|
|
4595
|
-
return session.selectionBounds;
|
|
4761
|
+
return session().selectionBounds;
|
|
4596
4762
|
},
|
|
4597
4763
|
get mouseX() {
|
|
4598
|
-
return session.position.x;
|
|
4764
|
+
return session().position.x;
|
|
4599
4765
|
},
|
|
4600
4766
|
visible: true,
|
|
4601
4767
|
hasAgent: true,
|
|
4768
|
+
isAgentConnected: true,
|
|
4602
4769
|
get status() {
|
|
4603
|
-
return session.isStreaming ? "copying" : "copied";
|
|
4770
|
+
return session().isStreaming ? "copying" : "copied";
|
|
4604
4771
|
},
|
|
4605
4772
|
get statusText() {
|
|
4606
|
-
return session.lastStatus || "Thinking\u2026";
|
|
4773
|
+
return session().lastStatus || "Thinking\u2026";
|
|
4607
4774
|
},
|
|
4608
4775
|
get inputValue() {
|
|
4609
|
-
return session.context.prompt;
|
|
4776
|
+
return session().context.prompt;
|
|
4610
4777
|
},
|
|
4611
|
-
onAbort: () => props.onAbortSession?.(session.id)
|
|
4778
|
+
onAbort: () => props.onAbortSession?.(session().id)
|
|
4612
4779
|
})]
|
|
4613
4780
|
}), createComponent(Show, {
|
|
4614
4781
|
get when() {
|
|
@@ -4640,6 +4807,9 @@ var ReactGrabRenderer = (props) => {
|
|
|
4640
4807
|
get hasAgent() {
|
|
4641
4808
|
return props.hasAgent;
|
|
4642
4809
|
},
|
|
4810
|
+
get isAgentConnected() {
|
|
4811
|
+
return props.isAgentConnected;
|
|
4812
|
+
},
|
|
4643
4813
|
get status() {
|
|
4644
4814
|
return props.selectionLabelStatus;
|
|
4645
4815
|
},
|
|
@@ -4661,6 +4831,15 @@ var ReactGrabRenderer = (props) => {
|
|
|
4661
4831
|
get onToggleExpand() {
|
|
4662
4832
|
return props.onToggleExpand;
|
|
4663
4833
|
},
|
|
4834
|
+
get isPendingDismiss() {
|
|
4835
|
+
return props.isPendingDismiss;
|
|
4836
|
+
},
|
|
4837
|
+
get onConfirmDismiss() {
|
|
4838
|
+
return props.onConfirmDismiss;
|
|
4839
|
+
},
|
|
4840
|
+
get onCancelDismiss() {
|
|
4841
|
+
return props.onCancelDismiss;
|
|
4842
|
+
},
|
|
4664
4843
|
onOpen: () => {
|
|
4665
4844
|
if (props.selectionFilePath) {
|
|
4666
4845
|
const openFileUrl = buildOpenFileUrl(props.selectionFilePath, props.selectionLineNumber);
|
|
@@ -6209,7 +6388,8 @@ var createAgentManager = (initialAgentOptions) => {
|
|
|
6209
6388
|
storage
|
|
6210
6389
|
);
|
|
6211
6390
|
setSessions((prev) => new Map(prev).set(session.id, completedSession));
|
|
6212
|
-
|
|
6391
|
+
const element = sessionElements.get(session.id);
|
|
6392
|
+
agentOptions?.onComplete?.(completedSession, element);
|
|
6213
6393
|
}
|
|
6214
6394
|
} catch (error) {
|
|
6215
6395
|
const currentSessions = sessions();
|
|
@@ -6342,7 +6522,7 @@ var createAgentManager = (initialAgentOptions) => {
|
|
|
6342
6522
|
return;
|
|
6343
6523
|
}
|
|
6344
6524
|
const elements = [element];
|
|
6345
|
-
const content = await generateSnippet(elements);
|
|
6525
|
+
const content = await generateSnippet(elements, { maxLines: Infinity });
|
|
6346
6526
|
const context = {
|
|
6347
6527
|
content,
|
|
6348
6528
|
prompt,
|
|
@@ -6361,7 +6541,7 @@ var createAgentManager = (initialAgentOptions) => {
|
|
|
6361
6541
|
sessionElements.set(session.id, element);
|
|
6362
6542
|
setSessions((prev) => new Map(prev).set(session.id, session));
|
|
6363
6543
|
saveSessionById(session, storage);
|
|
6364
|
-
agentOptions.onStart?.(session);
|
|
6544
|
+
agentOptions.onStart?.(session, element);
|
|
6365
6545
|
const abortController = new AbortController();
|
|
6366
6546
|
abortControllers.set(session.id, abortController);
|
|
6367
6547
|
const streamIterator = agentOptions.provider.send(
|
|
@@ -6438,7 +6618,7 @@ var createAgentManager = (initialAgentOptions) => {
|
|
|
6438
6618
|
};
|
|
6439
6619
|
|
|
6440
6620
|
// src/core.tsx
|
|
6441
|
-
var _tmpl$
|
|
6621
|
+
var _tmpl$20 = /* @__PURE__ */ template(`<span class="tabular-nums align-middle">`);
|
|
6442
6622
|
var _tmpl$23 = /* @__PURE__ */ template(`<span class="font-mono tabular-nums align-middle"><<!>>`);
|
|
6443
6623
|
var _tmpl$33 = /* @__PURE__ */ template(`<span class="tabular-nums ml-1 align-middle"> in `);
|
|
6444
6624
|
var onIdle = (callback) => {
|
|
@@ -6532,7 +6712,7 @@ var init = (rawOptions) => {
|
|
|
6532
6712
|
hasInited = true;
|
|
6533
6713
|
const logIntro = () => {
|
|
6534
6714
|
try {
|
|
6535
|
-
const version = "0.0.
|
|
6715
|
+
const version = "0.0.72";
|
|
6536
6716
|
const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
|
|
6537
6717
|
console.log(`%cReact Grab${version ? ` v${version}` : ""}%c
|
|
6538
6718
|
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;`, "");
|
|
@@ -6566,6 +6746,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6566
6746
|
const [selectionLabelStatus, setSelectionLabelStatus] = createSignal("idle");
|
|
6567
6747
|
const [labelInstances, setLabelInstances] = createSignal([]);
|
|
6568
6748
|
const [lastGrabbedElement, setLastGrabbedElement] = createSignal(null);
|
|
6749
|
+
const [lastCopiedElement, setLastCopiedElement] = createSignal(null);
|
|
6569
6750
|
const [progressStartTime, setProgressStartTime] = createSignal(null);
|
|
6570
6751
|
const [grabbedBoxes, setGrabbedBoxes] = createSignal([]);
|
|
6571
6752
|
const [isActivated, setIsActivated] = createSignal(false);
|
|
@@ -6585,6 +6766,8 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6585
6766
|
const [isInputExpanded, setIsInputExpanded] = createSignal(false);
|
|
6586
6767
|
const [frozenElement, setFrozenElement] = createSignal(null);
|
|
6587
6768
|
const [hasAgentProvider, setHasAgentProvider] = createSignal(Boolean(options.agent?.provider));
|
|
6769
|
+
const [isAgentConnected, setIsAgentConnected] = createSignal(false);
|
|
6770
|
+
const [isPendingDismiss, setIsPendingDismiss] = createSignal(false);
|
|
6588
6771
|
const elementInputCache = /* @__PURE__ */ new WeakMap();
|
|
6589
6772
|
const [nativeSelectionCursorX, setNativeSelectionCursorX] = createSignal(OFFSCREEN_POSITION);
|
|
6590
6773
|
const [nativeSelectionCursorY, setNativeSelectionCursorY] = createSignal(OFFSCREEN_POSITION);
|
|
@@ -6605,6 +6788,7 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6605
6788
|
return await getNearestComponentName(element) || void 0;
|
|
6606
6789
|
});
|
|
6607
6790
|
const clearNativeSelectionState = () => {
|
|
6791
|
+
setHasNativeSelection(false);
|
|
6608
6792
|
setNativeSelectionCursorX(OFFSCREEN_POSITION);
|
|
6609
6793
|
setNativeSelectionCursorY(OFFSCREEN_POSITION);
|
|
6610
6794
|
setNativeSelectionElements([]);
|
|
@@ -6720,6 +6904,9 @@ https://react-grab.com`, `background: #330039; color: #ffffff; border: 1px solid
|
|
|
6720
6904
|
await operation().finally(() => {
|
|
6721
6905
|
setIsCopying(false);
|
|
6722
6906
|
setDidJustCopy(true);
|
|
6907
|
+
if (element) {
|
|
6908
|
+
setLastCopiedElement(element);
|
|
6909
|
+
}
|
|
6723
6910
|
stopProgressAnimation();
|
|
6724
6911
|
if (instanceId) {
|
|
6725
6912
|
updateLabelInstance(instanceId, "copied");
|
|
@@ -6821,6 +7008,12 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6821
7008
|
if (element && !document.contains(element)) return null;
|
|
6822
7009
|
return element;
|
|
6823
7010
|
});
|
|
7011
|
+
const effectiveElement = createMemo(() => {
|
|
7012
|
+
if (isToggleFrozen()) {
|
|
7013
|
+
return frozenElement();
|
|
7014
|
+
}
|
|
7015
|
+
return targetElement();
|
|
7016
|
+
});
|
|
6824
7017
|
createEffect(() => {
|
|
6825
7018
|
const element = detectedElement();
|
|
6826
7019
|
if (!element) return;
|
|
@@ -6839,7 +7032,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6839
7032
|
});
|
|
6840
7033
|
const selectionBounds = createMemo(() => {
|
|
6841
7034
|
viewportVersion();
|
|
6842
|
-
const element =
|
|
7035
|
+
const element = effectiveElement();
|
|
6843
7036
|
if (!element) return void 0;
|
|
6844
7037
|
return createElementBounds(element);
|
|
6845
7038
|
});
|
|
@@ -6891,7 +7084,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6891
7084
|
const copying = isCopying();
|
|
6892
7085
|
if (!element) {
|
|
6893
7086
|
return (() => {
|
|
6894
|
-
var _el$ = _tmpl$
|
|
7087
|
+
var _el$ = _tmpl$20();
|
|
6895
7088
|
insert(_el$, copying ? "Processing\u2026" : "1 element");
|
|
6896
7089
|
return _el$;
|
|
6897
7090
|
})();
|
|
@@ -6917,7 +7110,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
6917
7110
|
})();
|
|
6918
7111
|
}
|
|
6919
7112
|
return (() => {
|
|
6920
|
-
var _el$10 = _tmpl$
|
|
7113
|
+
var _el$10 = _tmpl$20();
|
|
6921
7114
|
insert(_el$10, copying ? "Processing\u2026" : "1 element");
|
|
6922
7115
|
return _el$10;
|
|
6923
7116
|
})();
|
|
@@ -7110,6 +7303,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7110
7303
|
setInputText("");
|
|
7111
7304
|
setIsToggleFrozen(false);
|
|
7112
7305
|
setIsInputExpanded(false);
|
|
7306
|
+
setIsPendingDismiss(false);
|
|
7113
7307
|
setFrozenElement(null);
|
|
7114
7308
|
setSelectionLabelStatus("idle");
|
|
7115
7309
|
setDidJustCopy(false);
|
|
@@ -7154,6 +7348,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7154
7348
|
setInputText(value);
|
|
7155
7349
|
};
|
|
7156
7350
|
const handleInputSubmit = () => {
|
|
7351
|
+
setLastCopiedElement(null);
|
|
7157
7352
|
const element = frozenElement() || targetElement();
|
|
7158
7353
|
const prompt = isInputMode() ? inputText().trim() : "";
|
|
7159
7354
|
if (!element) {
|
|
@@ -7182,7 +7377,11 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7182
7377
|
}
|
|
7183
7378
|
setIsInputMode(false);
|
|
7184
7379
|
setInputText("");
|
|
7185
|
-
|
|
7380
|
+
if (prompt) {
|
|
7381
|
+
elementInputCache.set(element, prompt);
|
|
7382
|
+
} else {
|
|
7383
|
+
elementInputCache.delete(element);
|
|
7384
|
+
}
|
|
7186
7385
|
const tagName = extractElementTagName(element);
|
|
7187
7386
|
void getNearestComponentName(element).then((componentName) => {
|
|
7188
7387
|
void executeCopyOperation(currentX, currentY, () => copySingleElementToClipboard(element, prompt || void 0), bounds, tagName, componentName ?? void 0, element).then(() => {
|
|
@@ -7191,14 +7390,27 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7191
7390
|
});
|
|
7192
7391
|
};
|
|
7193
7392
|
const handleInputCancel = () => {
|
|
7393
|
+
setLastCopiedElement(null);
|
|
7194
7394
|
if (!isInputMode()) return;
|
|
7195
|
-
const element = frozenElement() || targetElement();
|
|
7196
7395
|
const currentInput = inputText().trim();
|
|
7396
|
+
if (currentInput && !isPendingDismiss()) {
|
|
7397
|
+
setIsPendingDismiss(true);
|
|
7398
|
+
return;
|
|
7399
|
+
}
|
|
7400
|
+
const element = frozenElement() || targetElement();
|
|
7197
7401
|
if (element && currentInput) {
|
|
7198
7402
|
elementInputCache.set(element, currentInput);
|
|
7199
7403
|
}
|
|
7404
|
+
setIsPendingDismiss(false);
|
|
7405
|
+
deactivateRenderer();
|
|
7406
|
+
};
|
|
7407
|
+
const handleConfirmDismiss = () => {
|
|
7408
|
+
setIsPendingDismiss(false);
|
|
7200
7409
|
deactivateRenderer();
|
|
7201
7410
|
};
|
|
7411
|
+
const handleCancelDismiss = () => {
|
|
7412
|
+
setIsPendingDismiss(false);
|
|
7413
|
+
};
|
|
7202
7414
|
const handleToggleExpand = () => {
|
|
7203
7415
|
const element = frozenElement() || targetElement();
|
|
7204
7416
|
if (element) {
|
|
@@ -7310,19 +7522,22 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7310
7522
|
transform: stripTranslateFromTransform(firstElement)
|
|
7311
7523
|
};
|
|
7312
7524
|
const tagName = extractElementTagName(firstElement);
|
|
7525
|
+
const centerX = bounds.x + bounds.width / 2;
|
|
7526
|
+
const centerY = bounds.y + bounds.height / 2;
|
|
7313
7527
|
if (hasAgentProvider()) {
|
|
7314
|
-
const centerX = bounds.x + bounds.width / 2;
|
|
7315
|
-
const centerY = bounds.y + bounds.height / 2;
|
|
7316
7528
|
setMouseX(centerX);
|
|
7317
7529
|
setMouseY(centerY);
|
|
7318
7530
|
setFrozenElement(firstElement);
|
|
7319
7531
|
setIsToggleMode(true);
|
|
7320
7532
|
setIsToggleFrozen(true);
|
|
7321
7533
|
setIsInputExpanded(true);
|
|
7534
|
+
if (!isActivated()) {
|
|
7535
|
+
activateRenderer();
|
|
7536
|
+
}
|
|
7322
7537
|
setIsInputMode(true);
|
|
7323
7538
|
} else {
|
|
7324
7539
|
void getNearestComponentName(firstElement).then((componentName) => {
|
|
7325
|
-
void executeCopyOperation(
|
|
7540
|
+
void executeCopyOperation(centerX, centerY, () => copyMultipleElementsToClipboard(selectedElements), bounds, tagName, componentName ?? void 0, firstElement, true);
|
|
7326
7541
|
});
|
|
7327
7542
|
}
|
|
7328
7543
|
}
|
|
@@ -7362,7 +7577,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7362
7577
|
const originalKey = originalKeyDescriptor?.get ? originalKeyDescriptor.get.call(event) : event.key;
|
|
7363
7578
|
const isEnterKey = originalKey === "Enter" || isEnterCode(event.code);
|
|
7364
7579
|
const isOverlayActive = isActivated() || isHoldingKeys();
|
|
7365
|
-
const shouldBlockEnter = isEnterKey && isOverlayActive && !isInputMode();
|
|
7580
|
+
const shouldBlockEnter = isEnterKey && isOverlayActive && !isInputMode() && !isToggleMode();
|
|
7366
7581
|
if (shouldBlockEnter) {
|
|
7367
7582
|
claimedEvents.add(event);
|
|
7368
7583
|
event.preventDefault();
|
|
@@ -7387,13 +7602,14 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7387
7602
|
window.addEventListener("keydown", (event) => {
|
|
7388
7603
|
blockEnterIfNeeded(event);
|
|
7389
7604
|
const isEnterToActivateInput = isEnterCode(event.code) && isHoldingKeys() && !isInputMode();
|
|
7390
|
-
if (isInputMode() && isTargetKeyCombination(event, options)) {
|
|
7605
|
+
if (isInputMode() && isTargetKeyCombination(event, options) && !event.repeat) {
|
|
7391
7606
|
event.preventDefault();
|
|
7392
7607
|
event.stopPropagation();
|
|
7393
7608
|
setIsInputMode(false);
|
|
7394
7609
|
setInputText("");
|
|
7395
7610
|
setIsToggleFrozen(false);
|
|
7396
7611
|
setIsInputExpanded(false);
|
|
7612
|
+
setIsPendingDismiss(false);
|
|
7397
7613
|
return;
|
|
7398
7614
|
}
|
|
7399
7615
|
if (isInputMode() || isEventFromOverlay(event, "data-react-grab-ignore-events") && !isEnterToActivateInput) {
|
|
@@ -7412,6 +7628,33 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7412
7628
|
return;
|
|
7413
7629
|
}
|
|
7414
7630
|
}
|
|
7631
|
+
const copiedElement = lastCopiedElement();
|
|
7632
|
+
if (isEnterCode(event.code) && !isHoldingKeys() && !isInputMode() && !isActivated() && copiedElement && document.contains(copiedElement)) {
|
|
7633
|
+
event.preventDefault();
|
|
7634
|
+
event.stopPropagation();
|
|
7635
|
+
event.stopImmediatePropagation();
|
|
7636
|
+
const bounds = createElementBounds(copiedElement);
|
|
7637
|
+
const selectionCenterX = bounds.x + bounds.width / 2;
|
|
7638
|
+
const centerY = bounds.y + bounds.height / 2;
|
|
7639
|
+
setMouseX(selectionCenterX);
|
|
7640
|
+
setMouseY(centerY);
|
|
7641
|
+
setCopyStartX(selectionCenterX);
|
|
7642
|
+
setCopyStartY(centerY);
|
|
7643
|
+
setCopyOffsetFromCenterX(0);
|
|
7644
|
+
setFrozenElement(copiedElement);
|
|
7645
|
+
setLastCopiedElement(null);
|
|
7646
|
+
setLabelInstances([]);
|
|
7647
|
+
const cachedInput = elementInputCache.get(copiedElement);
|
|
7648
|
+
if (cachedInput) {
|
|
7649
|
+
setInputText(cachedInput);
|
|
7650
|
+
}
|
|
7651
|
+
setIsToggleMode(true);
|
|
7652
|
+
setIsToggleFrozen(true);
|
|
7653
|
+
setIsInputExpanded(true);
|
|
7654
|
+
activateRenderer();
|
|
7655
|
+
setIsInputMode(true);
|
|
7656
|
+
return;
|
|
7657
|
+
}
|
|
7415
7658
|
if (isEnterCode(event.code) && isHoldingKeys() && !isInputMode()) {
|
|
7416
7659
|
event.preventDefault();
|
|
7417
7660
|
event.stopPropagation();
|
|
@@ -7634,7 +7877,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7634
7877
|
if (hadDrag) {
|
|
7635
7878
|
setDidJustDrag(false);
|
|
7636
7879
|
}
|
|
7637
|
-
if (isToggleMode() && !isCopying()) {
|
|
7880
|
+
if (isToggleMode() && !isCopying() && !isInputMode()) {
|
|
7638
7881
|
if (!isHoldingKeys()) {
|
|
7639
7882
|
deactivateRenderer();
|
|
7640
7883
|
} else {
|
|
@@ -7698,6 +7941,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7698
7941
|
selectionDebounceTimerId = null;
|
|
7699
7942
|
const currentSelection = window.getSelection();
|
|
7700
7943
|
if (!currentSelection || currentSelection.isCollapsed || currentSelection.rangeCount === 0) {
|
|
7944
|
+
clearNativeSelectionState();
|
|
7701
7945
|
return;
|
|
7702
7946
|
}
|
|
7703
7947
|
const range = currentSelection.getRangeAt(0);
|
|
@@ -7706,6 +7950,11 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7706
7950
|
clearNativeSelectionState();
|
|
7707
7951
|
return;
|
|
7708
7952
|
}
|
|
7953
|
+
const selectedText = currentSelection.toString().trim();
|
|
7954
|
+
if (!selectedText) {
|
|
7955
|
+
clearNativeSelectionState();
|
|
7956
|
+
return;
|
|
7957
|
+
}
|
|
7709
7958
|
const isBackward = (() => {
|
|
7710
7959
|
if (!currentSelection.anchorNode || !currentSelection.focusNode) return false;
|
|
7711
7960
|
const position = currentSelection.anchorNode.compareDocumentPosition(currentSelection.focusNode);
|
|
@@ -7755,14 +8004,14 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7755
8004
|
const selectionVisible = createMemo(() => {
|
|
7756
8005
|
if (!theme().selectionBox.enabled) return false;
|
|
7757
8006
|
if (didJustCopy()) return false;
|
|
7758
|
-
return isRendererActive() && !isDragging() && Boolean(
|
|
8007
|
+
return isRendererActive() && !isDragging() && Boolean(effectiveElement());
|
|
7759
8008
|
});
|
|
7760
8009
|
const selectionTagName = createMemo(() => {
|
|
7761
|
-
const element =
|
|
8010
|
+
const element = effectiveElement();
|
|
7762
8011
|
if (!element) return void 0;
|
|
7763
8012
|
return extractElementTagName(element) || void 0;
|
|
7764
8013
|
});
|
|
7765
|
-
const [selectionComponentName] = createResource(() =>
|
|
8014
|
+
const [selectionComponentName] = createResource(() => effectiveElement(), async (element) => {
|
|
7766
8015
|
if (!element) return void 0;
|
|
7767
8016
|
const name = await getNearestComponentName(element);
|
|
7768
8017
|
return name ?? void 0;
|
|
@@ -7770,7 +8019,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7770
8019
|
const selectionLabelVisible = createMemo(() => {
|
|
7771
8020
|
if (!theme().elementLabel.enabled) return false;
|
|
7772
8021
|
if (didJustCopy()) return false;
|
|
7773
|
-
return isRendererActive() && !isDragging() && Boolean(
|
|
8022
|
+
return isRendererActive() && !isDragging() && Boolean(effectiveElement());
|
|
7774
8023
|
});
|
|
7775
8024
|
const computedLabelInstances = createMemo(() => {
|
|
7776
8025
|
viewportVersion();
|
|
@@ -7784,13 +8033,25 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7784
8033
|
};
|
|
7785
8034
|
});
|
|
7786
8035
|
});
|
|
8036
|
+
const computedGrabbedBoxes = createMemo(() => {
|
|
8037
|
+
viewportVersion();
|
|
8038
|
+
return grabbedBoxes().map((box) => {
|
|
8039
|
+
if (!box.element || !document.body.contains(box.element)) {
|
|
8040
|
+
return box;
|
|
8041
|
+
}
|
|
8042
|
+
return {
|
|
8043
|
+
...box,
|
|
8044
|
+
bounds: createElementBounds(box.element)
|
|
8045
|
+
};
|
|
8046
|
+
});
|
|
8047
|
+
});
|
|
7787
8048
|
const dragVisible = createMemo(() => theme().dragBox.enabled && isRendererActive() && isDraggingBeyondThreshold());
|
|
7788
8049
|
const labelVariant = createMemo(() => isCopying() ? "processing" : "hover");
|
|
7789
8050
|
const labelVisible = createMemo(() => {
|
|
7790
8051
|
if (!theme().elementLabel.enabled) return false;
|
|
7791
8052
|
if (isInputMode()) return false;
|
|
7792
8053
|
if (isCopying()) return true;
|
|
7793
|
-
return isRendererActive() && !isDragging() && Boolean(
|
|
8054
|
+
return isRendererActive() && !isDragging() && Boolean(effectiveElement());
|
|
7794
8055
|
});
|
|
7795
8056
|
const crosshairVisible = createMemo(() => theme().crosshair.enabled && isRendererActive() && !isDragging() && !isTouchMode() && !isToggleFrozen());
|
|
7796
8057
|
const shouldShowGrabbedBoxes = createMemo(() => theme().grabbedBoxes.enabled);
|
|
@@ -7837,7 +8098,7 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7837
8098
|
return dragBounds();
|
|
7838
8099
|
},
|
|
7839
8100
|
get grabbedBoxes() {
|
|
7840
|
-
return memo(() => !!shouldShowGrabbedBoxes())() ?
|
|
8101
|
+
return memo(() => !!shouldShowGrabbedBoxes())() ? computedGrabbedBoxes() : [];
|
|
7841
8102
|
},
|
|
7842
8103
|
labelZIndex: Z_INDEX_LABEL,
|
|
7843
8104
|
get mouseX() {
|
|
@@ -7858,6 +8119,9 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7858
8119
|
get hasAgent() {
|
|
7859
8120
|
return hasAgentProvider();
|
|
7860
8121
|
},
|
|
8122
|
+
get isAgentConnected() {
|
|
8123
|
+
return isAgentConnected();
|
|
8124
|
+
},
|
|
7861
8125
|
get agentSessions() {
|
|
7862
8126
|
return agentManager.sessions();
|
|
7863
8127
|
},
|
|
@@ -7866,6 +8130,11 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7866
8130
|
onInputSubmit: () => void handleInputSubmit(),
|
|
7867
8131
|
onInputCancel: handleInputCancel,
|
|
7868
8132
|
onToggleExpand: handleToggleExpand,
|
|
8133
|
+
get isPendingDismiss() {
|
|
8134
|
+
return isPendingDismiss();
|
|
8135
|
+
},
|
|
8136
|
+
onConfirmDismiss: handleConfirmDismiss,
|
|
8137
|
+
onCancelDismiss: handleCancelDismiss,
|
|
7869
8138
|
get nativeSelectionCursorVisible() {
|
|
7870
8139
|
return hasNativeSelection();
|
|
7871
8140
|
},
|
|
@@ -7975,6 +8244,11 @@ ${plainTextContentOnly}` : plainTextContentOnly;
|
|
|
7975
8244
|
};
|
|
7976
8245
|
agentManager.setOptions(mergedOptions);
|
|
7977
8246
|
setHasAgentProvider(Boolean(mergedOptions.provider));
|
|
8247
|
+
if (mergedOptions.provider?.checkConnection) {
|
|
8248
|
+
void mergedOptions.provider.checkConnection().then((connected) => {
|
|
8249
|
+
setIsAgentConnected(connected);
|
|
8250
|
+
});
|
|
8251
|
+
}
|
|
7978
8252
|
agentManager.tryResumeSessions();
|
|
7979
8253
|
}
|
|
7980
8254
|
};
|