react-grab 0.1.13 → 0.1.14
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/README.md +32 -10
- package/dist/chunk-HH5Y6LBC.cjs +112 -0
- package/dist/chunk-WMLJ3P7X.js +112 -0
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.cts +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/{index-CNwr6CHX.d.cts → index-KT3jIAik.d.cts} +35 -0
- package/dist/{index-CNwr6CHX.d.ts → index-KT3jIAik.d.ts} +35 -0
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.global.js +37 -32
- package/dist/index.js +1 -1
- package/dist/react.cjs +1308 -318
- package/dist/react.js +1308 -318
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/dist/chunk-2T22V7DM.cjs +0 -107
- package/dist/chunk-VR2ILUMN.js +0 -107
package/dist/react.cjs
CHANGED
|
@@ -1896,7 +1896,7 @@ var init_web = __esm({
|
|
|
1896
1896
|
var styles_default;
|
|
1897
1897
|
var init_styles = __esm({
|
|
1898
1898
|
"dist/styles.css"() {
|
|
1899
|
-
styles_default = '/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--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:"Geist",ui-sans-serif,system-ui,sans-serif;--font-mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--radius-sm:.25rem;--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);--transition-fast:.1s;--transition-normal:.15s;--transition-slow:.2s}}@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}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.touch-hitbox{position:relative}.touch-hitbox:before{content:"";width:100%;min-width:32px;height:100%;min-height:32px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.top-0{top:calc(var(--spacing)*0)}.top-0\\.5{top:calc(var(--spacing)*.5)}.top-full{top:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-0\\.5{left:calc(var(--spacing)*.5)}.left-1\\/2{left:50%}.left-2\\.5{left:calc(var(--spacing)*2.5)}.z-10{z-index:10}.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)}.-mx-2{margin-inline:calc(var(--spacing)*-2)}.mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.-my-1\\.5{margin-block:calc(var(--spacing)*-1.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-2\\.5{margin-top:calc(var(--spacing)*2.5)}.mr-1\\.5{margin-right:calc(var(--spacing)*1.5)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2\\.5{margin-bottom:calc(var(--spacing)*2.5)}.-ml-\\[2px\\]{margin-left:-2px}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.size-1\\.5{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-\\[18px\\]{width:18px;height:18px}.h-0{height:calc(var(--spacing)*0)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-\\[17px\\]{height:17px}.h-fit{height:fit-content}.min-h-4{min-height:calc(var(--spacing)*4)}.w-0{width:calc(var(--spacing)*0)}.w-2{width:calc(var(--spacing)*2)}.w-5{width:calc(var(--spacing)*5)}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: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)}.-rotate-90{rotate:-90deg}.rotate-0{rotate:none}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition-property:transform;transition-duration:var(--transition-normal);transition-timing-function:cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transform:scale(.97)}.press-scale{transition-property:transform;transition-duration:var(--transition-fast);transition-timing-function:ease-out}.press-scale:active{transform:scale(.97)}.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-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.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-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[10px\\]{border-radius:10px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-b-\\[6px\\]{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.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-t-\\[\\#D9D9D9\\]{border-top-color:#d9d9d9}.bg-\\[\\#FEF2F2\\]{background-color:#fef2f2}.bg-black{background-color:var(--color-black)}.bg-black\\/5{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/5{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.bg-black\\/25{background-color:#00000040}@supports (color:color-mix(in lab, red, red)){.bg-black\\/25{background-color:color-mix(in oklab,var(--color-black)25%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.p-0{padding:calc(var(--spacing)*0)}.px-0\\.25{padding-inline:calc(var(--spacing)*.25)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-\\[3px\\]{padding-inline:3px}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-0\\.25{padding-block:calc(var(--spacing)*.25)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-px{padding-block:1px}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.text-left{text-align:left}.font-sans{font-family:var(--font-sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[13px\\]{font-size:13px}.leading-3{--tw-leading:calc(var(--spacing)*3);line-height:calc(var(--spacing)*3)}.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)}.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-\\[\\#71717a\\]{color:#71717a}.text-\\[\\#B3B3B3\\]{color:#b3b3b3}.text-\\[\\#B91C1C\\]{color:#b91c1c}.text-black{color:var(--color-black)}.text-black\\/30{color:#0000004d}@supports (color:color-mix(in lab, red, red)){.text-black\\/30{color:color-mix(in oklab,var(--color-black)30%,transparent)}}.text-black\\/40{color:#0006}@supports (color:color-mix(in lab, red, red)){.text-black\\/40{color:color-mix(in oklab,var(--color-black)40%,transparent)}}.text-black\\/50{color:#00000080}@supports (color:color-mix(in lab, red, red)){.text-black\\/50{color:color-mix(in oklab,var(--color-black)50%,transparent)}}.text-black\\/60{color:#0009}@supports (color:color-mix(in lab, red, red)){.text-black\\/60{color:color-mix(in oklab,var(--color-black)60%,transparent)}}.text-black\\/70{color:#000000b3}@supports (color:color-mix(in lab, red, red)){.text-black\\/70{color:color-mix(in oklab,var(--color-black)70%,transparent)}}.text-black\\/85{color:#000000d9}@supports (color:color-mix(in lab, red, red)){.text-black\\/85{color:color-mix(in oklab,var(--color-black)85%,transparent)}}.text-white{color:var(--color-white)}.italic{font-style:italic}.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-35{opacity:.35}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);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_1px_2px_\\#51515140\\)\\]{filter:drop-shadow(0 1px 2px #51515140)}.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-\\[transform\\,opacity\\]{transition-property:transform,opacity;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-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;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-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.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}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}@media (hover:hover){.hover\\:bg-\\[\\#F5F5F5\\]:hover{background-color:#f5f5f5}.hover\\:bg-\\[\\#FEE2E2\\]:hover{background-color:#fee2e2}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.hover\\:bg-black\\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/10:hover{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.hover\\:text-black:hover{color:var(--color-black)}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}@media (hover:hover){.disabled\\:hover\\:bg-transparent:disabled:hover{background-color:#0000}}}@keyframes shake{0%,to{transform:translate(0)}15%{transform:translate(-3px)}30%{transform:translate(3px)}45%{transform:translate(-3px)}60%{transform:translate(3px)}75%{transform:translate(-2px)}90%{transform:translate(2px)}}@keyframes pop-in{0%{opacity:0;transform:scale(.9)}70%{opacity:1;transform:scale(1.02)}to{opacity:1;transform:scale(1)}}@keyframes pop-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@keyframes slide-in-bottom{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in-top{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in-left{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}@keyframes slide-in-right{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:translate(0)}}@keyframes success-pop{0%{opacity:0;transform:scale(.9)}60%{opacity:1;transform:scale(1.1)}80%{transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}@keyframes icon-loader-spin{0%{opacity:1}50%{opacity:.5}to{opacity:.2}}.icon-loader-bar{animation:.5s linear infinite icon-loader-spin}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer-text{color:#0000;background:linear-gradient(90deg,#71717a 0%,#a1a1aa 25%,#71717a 50%,#a1a1aa 75%,#71717a 100%) 0 0/200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}.animate-shake{will-change:transform;animation:.3s ease-out shake}.animate-pop-in{animation:pop-in var(--transition-normal)ease-out;will-change:transform,opacity}.animate-pop-out{animation:pop-out var(--transition-normal)ease-out forwards;will-change:transform,opacity}.animate-slide-in-bottom{animation:slide-in-bottom var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-top{animation:slide-in-top var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-left{animation:slide-in-left var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-right{animation:slide-in-right var(--transition-slow)ease-out;will-change:transform,opacity}.animate-success-pop{will-change:transform,opacity;animation:.25s ease-out success-pop}.animate-tooltip-fade-in{animation:tooltip-fade-in var(--transition-fast)ease-out;will-change:transform,opacity}@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-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-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@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}}';
|
|
1899
|
+
styles_default = '/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */\n@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--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:"Geist",ui-sans-serif,system-ui,sans-serif;--font-mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;--color-yellow-500:oklch(79.5% .184 86.047);--color-black:#000;--color-white:#fff;--spacing:4px;--text-sm:14px;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--radius-sm:4px;--ease-out:cubic-bezier(0,0,.2,1);--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--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);--transition-fast:.1s;--transition-normal:.15s;--transition-slow:.2s}}@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}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.touch-hitbox{position:relative}.touch-hitbox:before{content:"";width:100%;min-width:32px;height:100%;min-height:32px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.top-0{top:calc(var(--spacing)*0)}.top-0\\.5{top:calc(var(--spacing)*.5)}.top-full{top:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-0\\.5{left:calc(var(--spacing)*.5)}.left-1\\/2{left:50%}.left-2\\.5{left:calc(var(--spacing)*2.5)}.z-10{z-index:10}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.m-0{margin:calc(var(--spacing)*0)}.-mx-2{margin-inline:calc(var(--spacing)*-2)}.mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.-my-1\\.5{margin-block:calc(var(--spacing)*-1.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-2\\.5{margin-top:calc(var(--spacing)*2.5)}.mr-1\\.5{margin-right:calc(var(--spacing)*1.5)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-2\\.5{margin-bottom:calc(var(--spacing)*2.5)}.-ml-\\[2px\\]{margin-left:-2px}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.size-1\\.5{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-\\[18px\\]{width:18px;height:18px}.h-0{height:calc(var(--spacing)*0)}.h-2{height:calc(var(--spacing)*2)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-\\[17px\\]{height:17px}.h-fit{height:fit-content}.max-h-\\[240px\\]{max-height:240px}.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-2{width:calc(var(--spacing)*2)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x: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)}.-rotate-90{rotate:-90deg}.rotate-0{rotate:none}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition-property:transform;transition-duration:var(--transition-normal);transition-timing-function:cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transform:scale(.97)}.press-scale{transition-property:transform;transition-duration:var(--transition-fast);transition-timing-function:ease-out}.press-scale:active{transform:scale(.97)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.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-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[10px\\]{border-radius:10px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-b-\\[6px\\]{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.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-t-\\[\\#D9D9D9\\]{border-top-color:#d9d9d9}.bg-\\[\\#FEF2F2\\]{background-color:#fef2f2}.bg-black{background-color:var(--color-black)}.bg-black\\/5{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/5{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.bg-black\\/25{background-color:#00000040}@supports (color:color-mix(in lab, red, red)){.bg-black\\/25{background-color:color-mix(in oklab,var(--color-black)25%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-500{background-color:var(--color-yellow-500)}.p-0{padding:calc(var(--spacing)*0)}.px-0\\.25{padding-inline:calc(var(--spacing)*.25)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-\\[3px\\]{padding-inline:3px}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-0\\.25{padding-block:calc(var(--spacing)*.25)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-px{padding-block:1px}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.text-left{text-align:left}.font-sans{font-family:var(--font-sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-3{--tw-leading:calc(var(--spacing)*3);line-height:calc(var(--spacing)*3)}.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)}.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-\\[\\#71717a\\]{color:#71717a}.text-\\[\\#B3B3B3\\]{color:#b3b3b3}.text-\\[\\#B91C1C\\]{color:#b91c1c}.text-black{color:var(--color-black)}.text-black\\/25{color:#00000040}@supports (color:color-mix(in lab, red, red)){.text-black\\/25{color:color-mix(in oklab,var(--color-black)25%,transparent)}}.text-black\\/30{color:#0000004d}@supports (color:color-mix(in lab, red, red)){.text-black\\/30{color:color-mix(in oklab,var(--color-black)30%,transparent)}}.text-black\\/40{color:#0006}@supports (color:color-mix(in lab, red, red)){.text-black\\/40{color:color-mix(in oklab,var(--color-black)40%,transparent)}}.text-black\\/50{color:#00000080}@supports (color:color-mix(in lab, red, red)){.text-black\\/50{color:color-mix(in oklab,var(--color-black)50%,transparent)}}.text-black\\/60{color:#0009}@supports (color:color-mix(in lab, red, red)){.text-black\\/60{color:color-mix(in oklab,var(--color-black)60%,transparent)}}.text-black\\/70{color:#000000b3}@supports (color:color-mix(in lab, red, red)){.text-black\\/70{color:color-mix(in oklab,var(--color-black)70%,transparent)}}.text-black\\/85{color:#000000d9}@supports (color:color-mix(in lab, red, red)){.text-black\\/85{color:color-mix(in oklab,var(--color-black)85%,transparent)}}.text-white{color:var(--color-white)}.italic{font-style:italic}.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-35{opacity:.35}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);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_1px_2px_\\#51515140\\)\\]{filter:drop-shadow(0 1px 2px #51515140)}.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-\\[transform\\,opacity\\]{transition-property:transform,opacity;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-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;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-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.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}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}.\\[grid-area\\:1\\/1\\]{grid-area:1/1}.group-focus-within\\:invisible:is(:where(.group):focus-within *){visibility:hidden}.group-focus-within\\:visible:is(:where(.group):focus-within *){visibility:visible}@media (hover:hover){.group-hover\\:invisible:is(:where(.group):hover *){visibility:hidden}.group-hover\\:visible:is(:where(.group):hover *){visibility:visible}}.focus-within\\:bg-black\\/5:focus-within{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.focus-within\\:bg-black\\/5:focus-within{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}@media (hover:hover){.hover\\:bg-\\[\\#F5F5F5\\]:hover{background-color:#f5f5f5}.hover\\:bg-\\[\\#FEE2E2\\]:hover{background-color:#fee2e2}.hover\\:bg-black\\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/5:hover{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.hover\\:bg-black\\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/10:hover{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.hover\\:text-\\[\\#B91C1C\\]:hover{color:#b91c1c}.hover\\:text-black:hover{color:var(--color-black)}.hover\\:text-black\\/60:hover{color:#0009}@supports (color:color-mix(in lab, red, red)){.hover\\:text-black\\/60:hover{color:color-mix(in oklab,var(--color-black)60%,transparent)}}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}@media (hover:hover){.disabled\\:hover\\:bg-transparent:disabled:hover{background-color:#0000}}}:host{all:initial;direction:ltr}@keyframes shake{0%,to{transform:translate(0)}15%{transform:translate(-3px)}30%{transform:translate(3px)}45%{transform:translate(-3px)}60%{transform:translate(3px)}75%{transform:translate(-2px)}90%{transform:translate(2px)}}@keyframes pop-in{0%{opacity:0;transform:scale(.9)}70%{opacity:1;transform:scale(1.02)}to{opacity:1;transform:scale(1)}}@keyframes pop-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@keyframes slide-in-bottom{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in-top{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in-left{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}@keyframes slide-in-right{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:translate(0)}}@keyframes success-pop{0%{opacity:0;transform:scale(.9)}60%{opacity:1;transform:scale(1.1)}80%{transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}@keyframes icon-loader-spin{0%{opacity:1}50%{opacity:.5}to{opacity:.2}}.icon-loader-bar{animation:.5s linear infinite icon-loader-spin}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer-text{color:#0000;background:linear-gradient(90deg,#71717a 0%,#a1a1aa 25%,#71717a 50%,#a1a1aa 75%,#71717a 100%) 0 0/200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}.animate-shake{will-change:transform;animation:.3s ease-out shake}.animate-pop-in{animation:pop-in var(--transition-normal)ease-out;will-change:transform,opacity}.animate-pop-out{animation:pop-out var(--transition-normal)ease-out forwards;will-change:transform,opacity}.animate-slide-in-bottom{animation:slide-in-bottom var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-top{animation:slide-in-top var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-left{animation:slide-in-left var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-right{animation:slide-in-right var(--transition-slow)ease-out;will-change:transform,opacity}.animate-success-pop{will-change:transform,opacity;animation:.25s ease-out success-pop}.animate-tooltip-fade-in{animation:tooltip-fade-in var(--transition-fast)ease-out;will-change:transform,opacity}@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-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-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@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 ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}';
|
|
1900
1900
|
}
|
|
1901
1901
|
});
|
|
1902
1902
|
|
|
@@ -2148,11 +2148,11 @@ var init_store = __esm({
|
|
|
2148
2148
|
});
|
|
2149
2149
|
|
|
2150
2150
|
// src/constants.ts
|
|
2151
|
-
var VERSION, VIEWPORT_MARGIN_PX, OFFSCREEN_POSITION, SELECTION_LERP_FACTOR, FEEDBACK_DURATION_MS, FADE_DURATION_MS, FADE_COMPLETE_BUFFER_MS, DISMISS_ANIMATION_BUFFER_MS, KEYDOWN_SPAM_TIMEOUT_MS, BLUR_DEACTIVATION_THRESHOLD_MS, INPUT_FOCUS_ACTIVATION_DELAY_MS, INPUT_TEXT_SELECTION_ACTIVATION_DELAY_MS, DEFAULT_KEY_HOLD_DURATION_MS, MIN_HOLD_FOR_ACTIVATION_AFTER_COPY_MS, RECENT_THRESHOLD_MS, ACTION_CYCLE_IDLE_TRIGGER_MS,
|
|
2151
|
+
var VERSION, VIEWPORT_MARGIN_PX, OFFSCREEN_POSITION, SELECTION_LERP_FACTOR, FEEDBACK_DURATION_MS, FADE_DURATION_MS, FADE_COMPLETE_BUFFER_MS, DISMISS_ANIMATION_BUFFER_MS, KEYDOWN_SPAM_TIMEOUT_MS, BLUR_DEACTIVATION_THRESHOLD_MS, WINDOW_REFOCUS_GRACE_PERIOD_MS, INPUT_FOCUS_ACTIVATION_DELAY_MS, INPUT_TEXT_SELECTION_ACTIVATION_DELAY_MS, DEFAULT_KEY_HOLD_DURATION_MS, MIN_HOLD_FOR_ACTIVATION_AFTER_COPY_MS, RECENT_THRESHOLD_MS, ACTION_CYCLE_IDLE_TRIGGER_MS, DRAG_THRESHOLD_PX, ELEMENT_DETECTION_THROTTLE_MS, COMPONENT_NAME_DEBOUNCE_MS, DRAG_PREVIEW_DEBOUNCE_MS, BOUNDS_CACHE_TTL_MS, BOUNDS_RECALC_INTERVAL_MS, AUTO_SCROLL_EDGE_THRESHOLD_PX, AUTO_SCROLL_SPEED_PX, Z_INDEX_LABEL, Z_INDEX_OVERLAY_CANVAS, DRAG_LERP_FACTOR, LERP_CONVERGENCE_THRESHOLD_PX, FADE_OUT_BUFFER_MS, MIN_DEVICE_PIXEL_RATIO, GRAB_PURPLE_RGB, OVERLAY_CROSSHAIR_COLOR, OVERLAY_BORDER_COLOR_DRAG, OVERLAY_FILL_COLOR_DRAG, OVERLAY_BORDER_COLOR_DEFAULT, OVERLAY_FILL_COLOR_DEFAULT, FROZEN_GLOW_COLOR, FROZEN_GLOW_EDGE_PX, ARROW_HEIGHT_PX, ARROW_MIN_SIZE_PX, ARROW_MAX_LABEL_WIDTH_RATIO, ARROW_CENTER_PERCENT, ARROW_LABEL_MARGIN_PX, LABEL_GAP_PX, PREVIEW_ATTR_VALUE_MAX_LENGTH, PREVIEW_MAX_ATTRS, PREVIEW_PRIORITY_ATTRS, SCREENSHOT_CAPTURE_DELAY_MS, VIDEO_METADATA_TIMEOUT_MS, VIDEO_READY_POLL_INTERVAL_MS, VIDEO_READY_TIMEOUT_MS, MODIFIER_KEYS, ARROW_KEYS, FROZEN_ELEMENT_ATTRIBUTE, USER_IGNORE_ATTRIBUTE, VIEWPORT_COVERAGE_THRESHOLD, OVERLAY_Z_INDEX_THRESHOLD, DEV_TOOLS_OVERLAY_Z_INDEX_THRESHOLD, TOOLTIP_DELAY_MS, TOOLTIP_GRACE_PERIOD_MS, TOOLBAR_SNAP_MARGIN_PX, TOOLBAR_FADE_IN_DELAY_MS, TOOLBAR_SNAP_ANIMATION_DURATION_MS, TOOLBAR_DRAG_THRESHOLD_PX, TOOLBAR_VELOCITY_MULTIPLIER_MS, TOOLBAR_COLLAPSED_SHORT_PX, TOOLBAR_COLLAPSED_LONG_PX, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS, TOOLBAR_DEFAULT_WIDTH_PX, TOOLBAR_DEFAULT_HEIGHT_PX, TOOLBAR_SHAKE_TOOLTIP_DURATION_MS, DRAG_SELECTION_COVERAGE_THRESHOLD, DRAG_SELECTION_SAMPLE_SPACING_PX, DRAG_SELECTION_MIN_SAMPLES_PER_AXIS, DRAG_SELECTION_MAX_SAMPLES_PER_AXIS, DRAG_SELECTION_MAX_TOTAL_SAMPLE_POINTS, DRAG_SELECTION_EDGE_INSET_PX, MAX_TRANSFORM_ANCESTOR_DEPTH, TRANSFORM_EARLY_BAIL_DEPTH, ELEMENT_POSITION_CACHE_DISTANCE_THRESHOLD_PX, ELEMENT_POSITION_THROTTLE_MS, VISIBILITY_CACHE_TTL_MS, ZOOM_DETECTION_THRESHOLD, MOUNT_ROOT_RECHECK_DELAY_MS, MAX_RECENT_ITEMS, DROPDOWN_VIEWPORT_PADDING_PX, DROPDOWN_ANCHOR_GAP_PX, DROPDOWN_ICON_SIZE_PX, DROPDOWN_MIN_WIDTH_PX, DROPDOWN_MAX_WIDTH_PX, PANEL_STYLES, LOGO_SVG;
|
|
2152
2152
|
var init_constants = __esm({
|
|
2153
2153
|
"src/constants.ts"() {
|
|
2154
2154
|
"use strict";
|
|
2155
|
-
VERSION = "0.1.
|
|
2155
|
+
VERSION = "0.1.14";
|
|
2156
2156
|
VIEWPORT_MARGIN_PX = 8;
|
|
2157
2157
|
OFFSCREEN_POSITION = -1e3;
|
|
2158
2158
|
SELECTION_LERP_FACTOR = 0.95;
|
|
@@ -2162,22 +2162,13 @@ var init_constants = __esm({
|
|
|
2162
2162
|
DISMISS_ANIMATION_BUFFER_MS = 50;
|
|
2163
2163
|
KEYDOWN_SPAM_TIMEOUT_MS = 200;
|
|
2164
2164
|
BLUR_DEACTIVATION_THRESHOLD_MS = 500;
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2165
|
+
WINDOW_REFOCUS_GRACE_PERIOD_MS = 200;
|
|
2166
|
+
INPUT_FOCUS_ACTIVATION_DELAY_MS = 200;
|
|
2167
|
+
INPUT_TEXT_SELECTION_ACTIVATION_DELAY_MS = 400;
|
|
2168
|
+
DEFAULT_KEY_HOLD_DURATION_MS = 100;
|
|
2168
2169
|
MIN_HOLD_FOR_ACTIVATION_AFTER_COPY_MS = 200;
|
|
2169
2170
|
RECENT_THRESHOLD_MS = 1e4;
|
|
2170
2171
|
ACTION_CYCLE_IDLE_TRIGGER_MS = 600;
|
|
2171
|
-
ACTION_CYCLE_INPUT_THROTTLE_MS = 100;
|
|
2172
|
-
ACTION_CYCLE_SCROLL_THRESHOLD_PX = 30;
|
|
2173
|
-
ACTION_CYCLE_SCROLL_LINE_HEIGHT_PX = 16;
|
|
2174
|
-
ACTION_CYCLE_ACTION_IDS = [
|
|
2175
|
-
"copy",
|
|
2176
|
-
"comment",
|
|
2177
|
-
"screenshot",
|
|
2178
|
-
"copy-html",
|
|
2179
|
-
"open"
|
|
2180
|
-
];
|
|
2181
2172
|
DRAG_THRESHOLD_PX = 2;
|
|
2182
2173
|
ELEMENT_DETECTION_THROTTLE_MS = 32;
|
|
2183
2174
|
COMPONENT_NAME_DEBOUNCE_MS = 100;
|
|
@@ -2201,7 +2192,10 @@ var init_constants = __esm({
|
|
|
2201
2192
|
FROZEN_GLOW_COLOR = `rgba(${GRAB_PURPLE_RGB}, 0.15)`;
|
|
2202
2193
|
FROZEN_GLOW_EDGE_PX = 50;
|
|
2203
2194
|
ARROW_HEIGHT_PX = 8;
|
|
2195
|
+
ARROW_MIN_SIZE_PX = 4;
|
|
2196
|
+
ARROW_MAX_LABEL_WIDTH_RATIO = 0.2;
|
|
2204
2197
|
ARROW_CENTER_PERCENT = 50;
|
|
2198
|
+
ARROW_LABEL_MARGIN_PX = 16;
|
|
2205
2199
|
LABEL_GAP_PX = 4;
|
|
2206
2200
|
PREVIEW_ATTR_VALUE_MAX_LENGTH = 15;
|
|
2207
2201
|
PREVIEW_MAX_ATTRS = 3;
|
|
@@ -2261,6 +2255,12 @@ var init_constants = __esm({
|
|
|
2261
2255
|
VISIBILITY_CACHE_TTL_MS = 50;
|
|
2262
2256
|
ZOOM_DETECTION_THRESHOLD = 0.01;
|
|
2263
2257
|
MOUNT_ROOT_RECHECK_DELAY_MS = 1e3;
|
|
2258
|
+
MAX_RECENT_ITEMS = 20;
|
|
2259
|
+
DROPDOWN_VIEWPORT_PADDING_PX = 8;
|
|
2260
|
+
DROPDOWN_ANCHOR_GAP_PX = 8;
|
|
2261
|
+
DROPDOWN_ICON_SIZE_PX = 11;
|
|
2262
|
+
DROPDOWN_MIN_WIDTH_PX = 180;
|
|
2263
|
+
DROPDOWN_MAX_WIDTH_PX = 280;
|
|
2264
2264
|
PANEL_STYLES = "bg-white";
|
|
2265
2265
|
LOGO_SVG = `<svg width="294" height="294" viewBox="0 0 294 294" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_0_3)"><mask id="mask0_0_3" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="0" y="0" width="294" height="294"><path d="M294 0H0V294H294V0Z" fill="white"/></mask><g mask="url(#mask0_0_3)"><path d="M144.599 47.4924C169.712 27.3959 194.548 20.0265 212.132 30.1797C227.847 39.2555 234.881 60.3243 231.926 89.516C231.677 92.0069 231.328 94.5423 230.94 97.1058L228.526 110.14C228.517 110.136 228.505 110.132 228.495 110.127C228.486 110.165 228.479 110.203 228.468 110.24L216.255 105.741C216.256 105.736 216.248 105.728 216.248 105.723C207.915 103.125 199.421 101.075 190.82 99.5888L190.696 99.5588L173.526 97.2648L173.511 97.2631C173.492 97.236 173.467 97.2176 173.447 97.1905C163.862 96.2064 154.233 95.7166 144.599 95.7223C134.943 95.7162 125.295 96.219 115.693 97.2286C110.075 105.033 104.859 113.118 100.063 121.453C95.2426 129.798 90.8624 138.391 86.939 147.193C90.8624 155.996 95.2426 164.588 100.063 172.933C104.866 181.302 110.099 189.417 115.741 197.245C115.749 197.245 115.758 197.246 115.766 197.247L115.752 197.27L115.745 197.283L115.754 197.296L126.501 211.013L126.574 211.089C132.136 217.767 138.126 224.075 144.507 229.974L144.609 230.082L154.572 238.287C154.539 238.319 154.506 238.35 154.472 238.38C154.485 238.392 154.499 238.402 154.513 238.412L143.846 247.482L143.827 247.497C126.56 261.128 109.472 268.745 94.8019 268.745C88.5916 268.837 82.4687 267.272 77.0657 264.208C61.3496 255.132 54.3164 234.062 57.2707 204.871C57.528 202.307 57.8806 199.694 58.2904 197.054C28.3363 185.327 9.52301 167.51 9.52301 147.193C9.52301 129.042 24.2476 112.396 50.9901 100.375C53.3443 99.3163 55.7938 98.3058 58.2904 97.3526C57.8806 94.7023 57.528 92.0803 57.2707 89.516C54.3164 60.3243 61.3496 39.2555 77.0657 30.1797C94.6494 20.0265 119.486 27.3959 144.599 47.4924ZM70.6423 201.315C70.423 202.955 70.2229 204.566 70.0704 206.168C67.6686 229.567 72.5478 246.628 83.3615 252.988L83.5176 253.062C95.0399 259.717 114.015 254.426 134.782 238.38C125.298 229.45 116.594 219.725 108.764 209.314C95.8516 207.742 83.0977 205.066 70.6423 201.315ZM80.3534 163.438C77.34 171.677 74.8666 180.104 72.9484 188.664C81.1787 191.224 89.5657 193.247 98.0572 194.724L98.4618 194.813C95.2115 189.865 92.0191 184.66 88.9311 179.378C85.8433 174.097 83.003 168.768 80.3534 163.438ZM60.759 110.203C59.234 110.839 57.7378 111.475 56.27 112.11C34.7788 121.806 22.3891 134.591 22.3891 147.193C22.3891 160.493 36.4657 174.297 60.7494 184.26C63.7439 171.581 67.8124 159.182 72.9104 147.193C67.822 135.23 63.7566 122.855 60.759 110.203ZM98.4137 99.6404C89.8078 101.145 81.3075 103.206 72.9676 105.809C74.854 114.203 77.2741 122.468 80.2132 130.554L80.3059 130.939C82.9938 125.6 85.8049 120.338 88.8834 115.008C91.9618 109.679 95.1544 104.569 98.4137 99.6404ZM94.9258 38.5215C90.9331 38.4284 86.9866 39.3955 83.4891 41.3243C72.6291 47.6015 67.6975 64.5954 70.0424 87.9446L70.0416 88.2194C70.194 89.8208 70.3941 91.4325 70.6134 93.0624C83.0737 89.3364 95.8263 86.6703 108.736 85.0924C116.57 74.6779 125.28 64.9532 134.773 56.0249C119.877 44.5087 105.895 38.5215 94.9258 38.5215ZM205.737 41.3148C202.268 39.398 198.355 38.4308 194.394 38.5099L194.29 38.512C183.321 38.512 169.34 44.4991 154.444 56.0153C163.93 64.9374 172.634 74.6557 180.462 85.064C193.375 86.6345 206.128 89.3102 218.584 93.0624C218.812 91.4325 219.003 89.8118 219.165 88.2098C221.548 64.7099 216.65 47.6164 205.737 41.3148ZM144.552 64.3097C138.104 70.2614 132.054 76.6306 126.443 83.3765C132.39 82.995 138.426 82.8046 144.552 82.8046C150.727 82.8046 156.778 83.0143 162.707 83.3765C157.08 76.6293 151.015 70.2596 144.552 64.3097Z" fill="white"/><path d="M144.598 47.4924C169.712 27.3959 194.547 20.0265 212.131 30.1797C227.847 39.2555 234.88 60.3243 231.926 89.516C231.677 92.0069 231.327 94.5423 230.941 97.1058L228.526 110.14L228.496 110.127C228.487 110.165 228.478 110.203 228.469 110.24L216.255 105.741L216.249 105.723C207.916 103.125 199.42 101.075 190.82 99.5888L190.696 99.5588L173.525 97.2648L173.511 97.263C173.492 97.236 173.468 97.2176 173.447 97.1905C163.863 96.2064 154.234 95.7166 144.598 95.7223C134.943 95.7162 125.295 96.219 115.693 97.2286C110.075 105.033 104.859 113.118 100.063 121.453C95.2426 129.798 90.8622 138.391 86.939 147.193C90.8622 155.996 95.2426 164.588 100.063 172.933C104.866 181.302 110.099 189.417 115.741 197.245L115.766 197.247L115.752 197.27L115.745 197.283L115.754 197.296L126.501 211.013L126.574 211.089C132.136 217.767 138.126 224.075 144.506 229.974L144.61 230.082L154.572 238.287C154.539 238.319 154.506 238.35 154.473 238.38L154.512 238.412L143.847 247.482L143.827 247.497C126.56 261.13 109.472 268.745 94.8018 268.745C88.5915 268.837 82.4687 267.272 77.0657 264.208C61.3496 255.132 54.3162 234.062 57.2707 204.871C57.528 202.307 57.8806 199.694 58.2904 197.054C28.3362 185.327 9.52298 167.51 9.52298 147.193C9.52298 129.042 24.2476 112.396 50.9901 100.375C53.3443 99.3163 55.7938 98.3058 58.2904 97.3526C57.8806 94.7023 57.528 92.0803 57.2707 89.516C54.3162 60.3243 61.3496 39.2555 77.0657 30.1797C94.6493 20.0265 119.486 27.3959 144.598 47.4924ZM70.6422 201.315C70.423 202.955 70.2229 204.566 70.0704 206.168C67.6686 229.567 72.5478 246.628 83.3615 252.988L83.5175 253.062C95.0399 259.717 114.015 254.426 134.782 238.38C125.298 229.45 116.594 219.725 108.764 209.314C95.8515 207.742 83.0977 205.066 70.6422 201.315ZM80.3534 163.438C77.34 171.677 74.8666 180.104 72.9484 188.664C81.1786 191.224 89.5657 193.247 98.0572 194.724L98.4618 194.813C95.2115 189.865 92.0191 184.66 88.931 179.378C85.8433 174.097 83.003 168.768 80.3534 163.438ZM60.7589 110.203C59.234 110.839 57.7378 111.475 56.2699 112.11C34.7788 121.806 22.3891 134.591 22.3891 147.193C22.3891 160.493 36.4657 174.297 60.7494 184.26C63.7439 171.581 67.8124 159.182 72.9103 147.193C67.822 135.23 63.7566 122.855 60.7589 110.203ZM98.4137 99.6404C89.8078 101.145 81.3075 103.206 72.9676 105.809C74.8539 114.203 77.2741 122.468 80.2132 130.554L80.3059 130.939C82.9938 125.6 85.8049 120.338 88.8834 115.008C91.9618 109.679 95.1544 104.569 98.4137 99.6404ZM94.9258 38.5215C90.9331 38.4284 86.9866 39.3955 83.4891 41.3243C72.629 47.6015 67.6975 64.5954 70.0424 87.9446L70.0415 88.2194C70.194 89.8208 70.3941 91.4325 70.6134 93.0624C83.0737 89.3364 95.8262 86.6703 108.736 85.0924C116.57 74.6779 125.28 64.9532 134.772 56.0249C119.877 44.5087 105.895 38.5215 94.9258 38.5215ZM205.737 41.3148C202.268 39.398 198.355 38.4308 194.394 38.5099L194.291 38.512C183.321 38.512 169.34 44.4991 154.443 56.0153C163.929 64.9374 172.634 74.6557 180.462 85.064C193.374 86.6345 206.129 89.3102 218.584 93.0624C218.813 91.4325 219.003 89.8118 219.166 88.2098C221.548 64.7099 216.65 47.6164 205.737 41.3148ZM144.551 64.3097C138.103 70.2614 132.055 76.6306 126.443 83.3765C132.389 82.995 138.427 82.8046 144.551 82.8046C150.727 82.8046 156.779 83.0143 162.707 83.3765C157.079 76.6293 151.015 70.2596 144.551 64.3097Z" fill="#FF40E0"/></g><mask id="mask1_0_3" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="102" y="84" width="161" height="162"><path d="M235.282 84.827L102.261 112.259L129.693 245.28L262.714 217.848L235.282 84.827Z" fill="white"/></mask><g mask="url(#mask1_0_3)"><path d="M136.863 129.916L213.258 141.224C220.669 142.322 222.495 152.179 215.967 155.856L187.592 171.843L184.135 204.227C183.339 211.678 173.564 213.901 169.624 207.526L129.021 141.831C125.503 136.14 130.245 128.936 136.863 129.916Z" fill="#FF40E0" stroke="#FF40E0" stroke-width="0.817337" stroke-linecap="round" stroke-linejoin="round"/></g></g><defs><clipPath id="clip0_0_3"><rect width="294" height="294" fill="white"/></clipPath></defs></svg>`;
|
|
2266
2266
|
}
|
|
@@ -2527,6 +2527,7 @@ var init_store2 = __esm({
|
|
|
2527
2527
|
setStore("contextMenuElement", null);
|
|
2528
2528
|
setStore("contextMenuClickOffset", null);
|
|
2529
2529
|
setStore("selectedAgent", null);
|
|
2530
|
+
setStore("lastCopiedElement", null);
|
|
2530
2531
|
},
|
|
2531
2532
|
toggle: () => {
|
|
2532
2533
|
if (store.activationTimestamp !== null) {
|
|
@@ -3603,6 +3604,20 @@ var init_overlay_canvas = __esm({
|
|
|
3603
3604
|
}
|
|
3604
3605
|
});
|
|
3605
3606
|
|
|
3607
|
+
// src/utils/get-arrow-size.ts
|
|
3608
|
+
var getArrowSize;
|
|
3609
|
+
var init_get_arrow_size = __esm({
|
|
3610
|
+
"src/utils/get-arrow-size.ts"() {
|
|
3611
|
+
"use strict";
|
|
3612
|
+
init_constants();
|
|
3613
|
+
getArrowSize = (labelWidth) => {
|
|
3614
|
+
if (labelWidth <= 0) return ARROW_HEIGHT_PX;
|
|
3615
|
+
const scaledSize = labelWidth * ARROW_MAX_LABEL_WIDTH_RATIO;
|
|
3616
|
+
return Math.max(ARROW_MIN_SIZE_PX, Math.min(ARROW_HEIGHT_PX, scaledSize));
|
|
3617
|
+
};
|
|
3618
|
+
}
|
|
3619
|
+
});
|
|
3620
|
+
|
|
3606
3621
|
// ../../node_modules/.pnpm/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
3607
3622
|
function r2(e2) {
|
|
3608
3623
|
var t2, f3, n2 = "";
|
|
@@ -6252,21 +6267,24 @@ var init_arrow = __esm({
|
|
|
6252
6267
|
init_web();
|
|
6253
6268
|
init_web();
|
|
6254
6269
|
init_web();
|
|
6255
|
-
|
|
6270
|
+
init_get_arrow_size();
|
|
6271
|
+
_tmpl$5 = /* @__PURE__ */ template(`<div data-react-grab-arrow class="absolute w-0 h-0 z-10">`);
|
|
6256
6272
|
Arrow = (props) => {
|
|
6257
6273
|
const arrowColor = () => props.color ?? "white";
|
|
6258
6274
|
const isBottom = () => props.position === "bottom";
|
|
6275
|
+
const arrowSize = () => getArrowSize(props.labelWidth ?? 0);
|
|
6259
6276
|
return (() => {
|
|
6260
6277
|
var _el$ = _tmpl$5();
|
|
6261
6278
|
createRenderEffect((_p$) => {
|
|
6262
|
-
var _v$ = `calc(${props.leftPercent}% + ${props.leftOffsetPx}px)`, _v$2 = isBottom() ? "0" : void 0, _v$3 = isBottom() ? void 0 : "0", _v$4 = isBottom() ? "translateX(-50%) translateY(-100%)" : "translateX(-50%) translateY(100%)", _v$5 =
|
|
6279
|
+
var _v$ = `calc(${props.leftPercent}% + ${props.leftOffsetPx}px)`, _v$2 = isBottom() ? "0" : void 0, _v$3 = isBottom() ? void 0 : "0", _v$4 = isBottom() ? "translateX(-50%) translateY(-100%)" : "translateX(-50%) translateY(100%)", _v$5 = `${arrowSize()}px solid transparent`, _v$6 = `${arrowSize()}px solid transparent`, _v$7 = isBottom() ? `${arrowSize()}px solid ${arrowColor()}` : void 0, _v$8 = isBottom() ? void 0 : `${arrowSize()}px solid ${arrowColor()}`;
|
|
6263
6280
|
_v$ !== _p$.e && setStyleProperty(_el$, "left", _p$.e = _v$);
|
|
6264
6281
|
_v$2 !== _p$.t && setStyleProperty(_el$, "top", _p$.t = _v$2);
|
|
6265
6282
|
_v$3 !== _p$.a && setStyleProperty(_el$, "bottom", _p$.a = _v$3);
|
|
6266
6283
|
_v$4 !== _p$.o && setStyleProperty(_el$, "transform", _p$.o = _v$4);
|
|
6267
|
-
_v$5 !== _p$.i && setStyleProperty(_el$, "border-
|
|
6268
|
-
_v$6 !== _p$.n && setStyleProperty(_el$, "border-
|
|
6269
|
-
_v$7 !== _p$.s && setStyleProperty(_el$, "
|
|
6284
|
+
_v$5 !== _p$.i && setStyleProperty(_el$, "border-left", _p$.i = _v$5);
|
|
6285
|
+
_v$6 !== _p$.n && setStyleProperty(_el$, "border-right", _p$.n = _v$6);
|
|
6286
|
+
_v$7 !== _p$.s && setStyleProperty(_el$, "border-bottom", _p$.s = _v$7);
|
|
6287
|
+
_v$8 !== _p$.h && setStyleProperty(_el$, "border-top", _p$.h = _v$8);
|
|
6270
6288
|
return _p$;
|
|
6271
6289
|
}, {
|
|
6272
6290
|
e: void 0,
|
|
@@ -6275,7 +6293,8 @@ var init_arrow = __esm({
|
|
|
6275
6293
|
o: void 0,
|
|
6276
6294
|
i: void 0,
|
|
6277
6295
|
n: void 0,
|
|
6278
|
-
s: void 0
|
|
6296
|
+
s: void 0,
|
|
6297
|
+
h: void 0
|
|
6279
6298
|
});
|
|
6280
6299
|
return _el$;
|
|
6281
6300
|
})();
|
|
@@ -7003,7 +7022,7 @@ var init_completion_view = __esm({
|
|
|
7003
7022
|
});
|
|
7004
7023
|
|
|
7005
7024
|
// src/components/selection-label/index.tsx
|
|
7006
|
-
var _tmpl$16, _tmpl$26, _tmpl$34, _tmpl$43, _tmpl$53, _tmpl$63, _tmpl$73, _tmpl$83, _tmpl$92, _tmpl$0, _tmpl$1, DEFAULT_OFFSCREEN_POSITION, SelectionLabel;
|
|
7025
|
+
var _tmpl$16, _tmpl$26, _tmpl$34, _tmpl$43, _tmpl$53, _tmpl$63, _tmpl$73, _tmpl$83, _tmpl$92, _tmpl$0, _tmpl$1, _tmpl$102, DEFAULT_OFFSCREEN_POSITION, SelectionLabel;
|
|
7007
7026
|
var init_selection_label = __esm({
|
|
7008
7027
|
"src/components/selection-label/index.tsx"() {
|
|
7009
7028
|
"use strict";
|
|
@@ -7019,6 +7038,7 @@ var init_selection_label = __esm({
|
|
|
7019
7038
|
init_web();
|
|
7020
7039
|
init_solid();
|
|
7021
7040
|
init_constants();
|
|
7041
|
+
init_get_arrow_size();
|
|
7022
7042
|
init_is_keyboard_event_triggered_by_input();
|
|
7023
7043
|
init_cn();
|
|
7024
7044
|
init_get_tag_display();
|
|
@@ -7038,11 +7058,12 @@ var init_selection_label = __esm({
|
|
|
7038
7058
|
_tmpl$43 = /* @__PURE__ */ template(`<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5">`);
|
|
7039
7059
|
_tmpl$53 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col items-start w-fit h-fit"><div class="contain-layout shrink-0 flex items-center gap-1 py-1.5 w-fit h-fit px-2">`);
|
|
7040
7060
|
_tmpl$63 = /* @__PURE__ */ template(`<div class="flex items-center gap-1 w-full mb-1 overflow-hidden"><span class="text-black/40 text-[11px] leading-3 font-medium truncate italic">`);
|
|
7041
|
-
_tmpl$73 = /* @__PURE__ */ template(`<
|
|
7042
|
-
_tmpl$83 = /* @__PURE__ */ template(`<div class="
|
|
7043
|
-
_tmpl$92 = /* @__PURE__ */ template(`<div
|
|
7044
|
-
_tmpl$0 = /* @__PURE__ */ template(`<
|
|
7045
|
-
_tmpl$1 = /* @__PURE__ */ template(`<
|
|
7061
|
+
_tmpl$73 = /* @__PURE__ */ template(`<button data-react-grab-submit class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-black cursor-pointer ml-1 interactive-scale">`);
|
|
7062
|
+
_tmpl$83 = /* @__PURE__ */ template(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events data-react-grab-input class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 wrap-break-word overflow-y-auto"placeholder="Add context"rows=1 style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none>`);
|
|
7063
|
+
_tmpl$92 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit min-w-[150px] max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2 max-w-full">`);
|
|
7064
|
+
_tmpl$0 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-selection-label style=z-index:2147483647><div>`);
|
|
7065
|
+
_tmpl$1 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
|
|
7066
|
+
_tmpl$102 = /* @__PURE__ */ template(`<div class="contain-layout flex items-center justify-between w-full px-2 py-1 transition-colors"><span class="text-[13px] leading-4 font-sans font-medium text-black">`);
|
|
7046
7067
|
DEFAULT_OFFSCREEN_POSITION = {
|
|
7047
7068
|
left: -9999,
|
|
7048
7069
|
top: -9999,
|
|
@@ -7052,12 +7073,14 @@ var init_selection_label = __esm({
|
|
|
7052
7073
|
};
|
|
7053
7074
|
SelectionLabel = (props) => {
|
|
7054
7075
|
let containerRef;
|
|
7076
|
+
let panelRef;
|
|
7055
7077
|
let inputRef;
|
|
7056
7078
|
let isTagCurrentlyHovered = false;
|
|
7057
7079
|
let lastValidPosition = null;
|
|
7058
7080
|
let lastElementIdentity = null;
|
|
7059
7081
|
const [measuredWidth, setMeasuredWidth] = createSignal(0);
|
|
7060
7082
|
const [measuredHeight, setMeasuredHeight] = createSignal(0);
|
|
7083
|
+
const [panelWidth, setPanelWidth] = createSignal(0);
|
|
7061
7084
|
const [arrowPosition, setArrowPosition] = createSignal("bottom");
|
|
7062
7085
|
const [viewportVersion, setViewportVersion] = createSignal(0);
|
|
7063
7086
|
const [hadValidBounds, setHadValidBounds] = createSignal(false);
|
|
@@ -7081,6 +7104,9 @@ var init_selection_label = __esm({
|
|
|
7081
7104
|
setMeasuredWidth(rect.width);
|
|
7082
7105
|
setMeasuredHeight(rect.height);
|
|
7083
7106
|
}
|
|
7107
|
+
if (panelRef) {
|
|
7108
|
+
setPanelWidth(panelRef.getBoundingClientRect().width);
|
|
7109
|
+
}
|
|
7084
7110
|
};
|
|
7085
7111
|
const handleTagHoverChange = (hovered) => {
|
|
7086
7112
|
isTagCurrentlyHovered = hovered;
|
|
@@ -7145,7 +7171,7 @@ var init_selection_label = __esm({
|
|
|
7145
7171
|
queueMicrotask(measureContainer);
|
|
7146
7172
|
});
|
|
7147
7173
|
createEffect(() => {
|
|
7148
|
-
if (props.isPromptMode && inputRef) {
|
|
7174
|
+
if (props.isPromptMode && inputRef && props.onSubmit) {
|
|
7149
7175
|
setTimeout(() => {
|
|
7150
7176
|
inputRef?.focus();
|
|
7151
7177
|
}, 0);
|
|
@@ -7171,9 +7197,10 @@ var init_selection_label = __esm({
|
|
|
7171
7197
|
const cursorX = props.mouseX ?? selectionCenterX;
|
|
7172
7198
|
const selectionBottom = bounds.y + bounds.height;
|
|
7173
7199
|
const selectionTop = bounds.y;
|
|
7200
|
+
const actualArrowHeight = props.hideArrow ? 0 : getArrowSize(panelWidth());
|
|
7174
7201
|
const anchorX = cursorX;
|
|
7175
7202
|
let edgeOffsetX = 0;
|
|
7176
|
-
let positionTop = selectionBottom +
|
|
7203
|
+
let positionTop = selectionBottom + actualArrowHeight + LABEL_GAP_PX;
|
|
7177
7204
|
if (labelWidth > 0) {
|
|
7178
7205
|
const labelLeft = anchorX - labelWidth / 2;
|
|
7179
7206
|
const labelRight = anchorX + labelWidth / 2;
|
|
@@ -7184,7 +7211,7 @@ var init_selection_label = __esm({
|
|
|
7184
7211
|
edgeOffsetX = VIEWPORT_MARGIN_PX - labelLeft;
|
|
7185
7212
|
}
|
|
7186
7213
|
}
|
|
7187
|
-
const totalHeightNeeded = labelHeight +
|
|
7214
|
+
const totalHeightNeeded = labelHeight + actualArrowHeight + LABEL_GAP_PX;
|
|
7188
7215
|
const fitsBelow = positionTop + labelHeight <= viewportHeight - VIEWPORT_MARGIN_PX;
|
|
7189
7216
|
if (!fitsBelow) {
|
|
7190
7217
|
positionTop = selectionTop - totalHeightNeeded;
|
|
@@ -7196,7 +7223,12 @@ var init_selection_label = __esm({
|
|
|
7196
7223
|
positionTop = VIEWPORT_MARGIN_PX;
|
|
7197
7224
|
}
|
|
7198
7225
|
const arrowLeftPercent = ARROW_CENTER_PERCENT;
|
|
7199
|
-
const
|
|
7226
|
+
const labelHalfWidth = labelWidth / 2;
|
|
7227
|
+
const arrowCenterPx = labelHalfWidth - edgeOffsetX;
|
|
7228
|
+
const arrowMinPx = Math.min(ARROW_LABEL_MARGIN_PX, labelHalfWidth);
|
|
7229
|
+
const arrowMaxPx = Math.max(labelWidth - ARROW_LABEL_MARGIN_PX, labelHalfWidth);
|
|
7230
|
+
const clampedArrowCenterPx = Math.max(arrowMinPx, Math.min(arrowMaxPx, arrowCenterPx));
|
|
7231
|
+
const arrowLeftOffset = clampedArrowCenterPx - labelHalfWidth;
|
|
7200
7232
|
const position = {
|
|
7201
7233
|
left: anchorX,
|
|
7202
7234
|
top: positionTop,
|
|
@@ -7249,7 +7281,7 @@ var init_selection_label = __esm({
|
|
|
7249
7281
|
const handleContainerPointerDown = (event) => {
|
|
7250
7282
|
event.stopPropagation();
|
|
7251
7283
|
event.stopImmediatePropagation();
|
|
7252
|
-
const isEditableInputVisible = canInteract() && props.isPromptMode && !props.isPendingDismiss;
|
|
7284
|
+
const isEditableInputVisible = canInteract() && props.isPromptMode && !props.isPendingDismiss && props.onSubmit;
|
|
7253
7285
|
if (isEditableInputVisible && inputRef) {
|
|
7254
7286
|
inputRef.focus();
|
|
7255
7287
|
}
|
|
@@ -7260,7 +7292,7 @@ var init_selection_label = __esm({
|
|
|
7260
7292
|
return memo(() => props.visible !== false)() && (props.selectionBounds || shouldPersistDuringFade());
|
|
7261
7293
|
},
|
|
7262
7294
|
get children() {
|
|
7263
|
-
var _el$ = _tmpl$
|
|
7295
|
+
var _el$ = _tmpl$0(), _el$2 = _el$.firstChild;
|
|
7264
7296
|
_el$.addEventListener("mouseleave", () => props.onHoverChange?.(false));
|
|
7265
7297
|
_el$.addEventListener("mouseenter", () => props.onHoverChange?.(true));
|
|
7266
7298
|
_el$.$$click = (event) => {
|
|
@@ -7270,15 +7302,25 @@ var init_selection_label = __esm({
|
|
|
7270
7302
|
_el$.$$pointerdown = handleContainerPointerDown;
|
|
7271
7303
|
var _ref$ = containerRef;
|
|
7272
7304
|
typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
|
|
7273
|
-
insert(_el$, createComponent(
|
|
7274
|
-
get
|
|
7275
|
-
return
|
|
7276
|
-
},
|
|
7277
|
-
get leftPercent() {
|
|
7278
|
-
return computedPosition().arrowLeftPercent;
|
|
7305
|
+
insert(_el$, createComponent(Show, {
|
|
7306
|
+
get when() {
|
|
7307
|
+
return !props.hideArrow;
|
|
7279
7308
|
},
|
|
7280
|
-
get
|
|
7281
|
-
return
|
|
7309
|
+
get children() {
|
|
7310
|
+
return createComponent(Arrow, {
|
|
7311
|
+
get position() {
|
|
7312
|
+
return arrowPosition();
|
|
7313
|
+
},
|
|
7314
|
+
get leftPercent() {
|
|
7315
|
+
return computedPosition().arrowLeftPercent;
|
|
7316
|
+
},
|
|
7317
|
+
get leftOffsetPx() {
|
|
7318
|
+
return computedPosition().arrowLeftOffset;
|
|
7319
|
+
},
|
|
7320
|
+
get labelWidth() {
|
|
7321
|
+
return panelWidth();
|
|
7322
|
+
}
|
|
7323
|
+
});
|
|
7282
7324
|
}
|
|
7283
7325
|
}), _el$2);
|
|
7284
7326
|
insert(_el$, createComponent(Show, {
|
|
@@ -7321,6 +7363,8 @@ var init_selection_label = __esm({
|
|
|
7321
7363
|
});
|
|
7322
7364
|
}
|
|
7323
7365
|
}), _el$2);
|
|
7366
|
+
var _ref$2 = panelRef;
|
|
7367
|
+
typeof _ref$2 === "function" ? use(_ref$2, _el$2) : panelRef = _el$2;
|
|
7324
7368
|
insert(_el$2, createComponent(Show, {
|
|
7325
7369
|
get when() {
|
|
7326
7370
|
return memo(() => props.status === "copying")() && !props.isPendingAbort;
|
|
@@ -7340,8 +7384,8 @@ var init_selection_label = __esm({
|
|
|
7340
7384
|
return createComponent(BottomSection, {
|
|
7341
7385
|
get children() {
|
|
7342
7386
|
var _el$6 = _tmpl$26(), _el$7 = _el$6.firstChild;
|
|
7343
|
-
var _ref$
|
|
7344
|
-
typeof _ref$
|
|
7387
|
+
var _ref$3 = inputRef;
|
|
7388
|
+
typeof _ref$3 === "function" ? use(_ref$3, _el$7) : inputRef = _el$7;
|
|
7345
7389
|
insert(_el$6, createComponent(Show, {
|
|
7346
7390
|
get when() {
|
|
7347
7391
|
return props.onAbort;
|
|
@@ -7417,23 +7461,23 @@ var init_selection_label = __esm({
|
|
|
7417
7461
|
return actionCycleItems();
|
|
7418
7462
|
},
|
|
7419
7463
|
children: (item, itemIndex) => (() => {
|
|
7420
|
-
var _el$17 = _tmpl$
|
|
7464
|
+
var _el$17 = _tmpl$102(), _el$18 = _el$17.firstChild;
|
|
7421
7465
|
insert(_el$18, () => item.label);
|
|
7422
7466
|
insert(_el$17, createComponent(Show, {
|
|
7423
7467
|
get when() {
|
|
7424
7468
|
return item.shortcut;
|
|
7425
7469
|
},
|
|
7426
7470
|
get children() {
|
|
7427
|
-
var _el$19 = _tmpl$
|
|
7471
|
+
var _el$19 = _tmpl$1();
|
|
7428
7472
|
insert(_el$19, () => formatShortcut(item.shortcut));
|
|
7429
7473
|
return _el$19;
|
|
7430
7474
|
}
|
|
7431
7475
|
}), null);
|
|
7432
7476
|
createRenderEffect((_p$) => {
|
|
7433
|
-
var _v$
|
|
7434
|
-
_v$
|
|
7435
|
-
_v$
|
|
7436
|
-
_v$
|
|
7477
|
+
var _v$1 = item.label.toLowerCase(), _v$10 = !!(itemIndex() === actionCycleActiveIndex()), _v$11 = !!(itemIndex() === actionCycleItems().length - 1);
|
|
7478
|
+
_v$1 !== _p$.e && setAttribute(_el$17, "data-react-grab-action-cycle-item", _p$.e = _v$1);
|
|
7479
|
+
_v$10 !== _p$.t && _el$17.classList.toggle("bg-black/5", _p$.t = _v$10);
|
|
7480
|
+
_v$11 !== _p$.a && _el$17.classList.toggle("rounded-b-[6px]", _p$.a = _v$11);
|
|
7437
7481
|
return _p$;
|
|
7438
7482
|
}, {
|
|
7439
7483
|
e: void 0,
|
|
@@ -7456,7 +7500,7 @@ var init_selection_label = __esm({
|
|
|
7456
7500
|
return memo(() => !!(canInteract() && props.isPromptMode))() && !props.isPendingDismiss;
|
|
7457
7501
|
},
|
|
7458
7502
|
get children() {
|
|
7459
|
-
var _el$10 = _tmpl$
|
|
7503
|
+
var _el$10 = _tmpl$92(), _el$11 = _el$10.firstChild;
|
|
7460
7504
|
insert(_el$11, createComponent(TagBadge, {
|
|
7461
7505
|
get tagName() {
|
|
7462
7506
|
return tagDisplay();
|
|
@@ -7487,17 +7531,34 @@ var init_selection_label = __esm({
|
|
|
7487
7531
|
return _el$12;
|
|
7488
7532
|
}
|
|
7489
7533
|
}), (() => {
|
|
7490
|
-
var _el$14 = _tmpl$
|
|
7534
|
+
var _el$14 = _tmpl$83(), _el$15 = _el$14.firstChild;
|
|
7491
7535
|
_el$15.$$keydown = handleKeyDown;
|
|
7492
7536
|
_el$15.$$input = handleInput;
|
|
7493
|
-
var _ref$
|
|
7494
|
-
typeof _ref$
|
|
7495
|
-
_el$
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7537
|
+
var _ref$4 = inputRef;
|
|
7538
|
+
typeof _ref$4 === "function" ? use(_ref$4, _el$15) : inputRef = _el$15;
|
|
7539
|
+
insert(_el$14, createComponent(Show, {
|
|
7540
|
+
get when() {
|
|
7541
|
+
return props.onSubmit;
|
|
7542
|
+
},
|
|
7543
|
+
get children() {
|
|
7544
|
+
var _el$16 = _tmpl$73();
|
|
7545
|
+
_el$16.$$click = () => props.onSubmit?.();
|
|
7546
|
+
insert(_el$16, createComponent(IconSubmit, {
|
|
7547
|
+
size: 10,
|
|
7548
|
+
"class": "text-white"
|
|
7549
|
+
}));
|
|
7550
|
+
return _el$16;
|
|
7551
|
+
}
|
|
7552
|
+
}), null);
|
|
7553
|
+
createRenderEffect((_p$) => {
|
|
7554
|
+
var _v$ = props.replyToPrompt ? "14px" : "0", _v$2 = !props.onSubmit;
|
|
7555
|
+
_v$ !== _p$.e && setStyleProperty(_el$14, "padding-left", _p$.e = _v$);
|
|
7556
|
+
_v$2 !== _p$.t && (_el$15.readOnly = _p$.t = _v$2);
|
|
7557
|
+
return _p$;
|
|
7558
|
+
}, {
|
|
7559
|
+
e: void 0,
|
|
7560
|
+
t: void 0
|
|
7561
|
+
});
|
|
7501
7562
|
createRenderEffect(() => _el$15.value = props.inputValue ?? "");
|
|
7502
7563
|
return _el$14;
|
|
7503
7564
|
})()];
|
|
@@ -7540,15 +7601,15 @@ var init_selection_label = __esm({
|
|
|
7540
7601
|
}
|
|
7541
7602
|
}), null);
|
|
7542
7603
|
createRenderEffect((_p$) => {
|
|
7543
|
-
var _v$ = cn("fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-opacity duration-100 ease-out"), _v$
|
|
7544
|
-
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
7545
|
-
_v$
|
|
7546
|
-
_v$
|
|
7547
|
-
_v$
|
|
7548
|
-
_v$
|
|
7549
|
-
_v$
|
|
7550
|
-
_v$
|
|
7551
|
-
_v$
|
|
7604
|
+
var _v$3 = cn("fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-opacity duration-100 ease-out"), _v$4 = `${computedPosition().top}px`, _v$5 = `${computedPosition().left}px`, _v$6 = `translateX(calc(-50% + ${computedPosition().edgeOffsetX}px))`, _v$7 = shouldEnablePointerEvents() ? "auto" : "none", _v$8 = props.status === "fading" || isInternalFading() ? 0 : 1, _v$9 = cn("contain-layout flex items-center gap-[5px] rounded-[10px] antialiased w-fit h-fit p-0 [font-synthesis:none] [corner-shape:superellipse(1.25)]", PANEL_STYLES), _v$0 = isCompletedStatus() && !props.error ? "none" : void 0;
|
|
7605
|
+
_v$3 !== _p$.e && className(_el$, _p$.e = _v$3);
|
|
7606
|
+
_v$4 !== _p$.t && setStyleProperty(_el$, "top", _p$.t = _v$4);
|
|
7607
|
+
_v$5 !== _p$.a && setStyleProperty(_el$, "left", _p$.a = _v$5);
|
|
7608
|
+
_v$6 !== _p$.o && setStyleProperty(_el$, "transform", _p$.o = _v$6);
|
|
7609
|
+
_v$7 !== _p$.i && setStyleProperty(_el$, "pointer-events", _p$.i = _v$7);
|
|
7610
|
+
_v$8 !== _p$.n && setStyleProperty(_el$, "opacity", _p$.n = _v$8);
|
|
7611
|
+
_v$9 !== _p$.s && className(_el$2, _p$.s = _v$9);
|
|
7612
|
+
_v$0 !== _p$.h && setStyleProperty(_el$2, "display", _p$.h = _v$0);
|
|
7552
7613
|
return _p$;
|
|
7553
7614
|
}, {
|
|
7554
7615
|
e: void 0,
|
|
@@ -7698,6 +7759,55 @@ var init_icon_comment = __esm({
|
|
|
7698
7759
|
}
|
|
7699
7760
|
});
|
|
7700
7761
|
|
|
7762
|
+
// src/components/icons/icon-inbox.tsx
|
|
7763
|
+
var _tmpl$20, _tmpl$27, IconInbox, IconInboxUnread;
|
|
7764
|
+
var init_icon_inbox = __esm({
|
|
7765
|
+
"src/components/icons/icon-inbox.tsx"() {
|
|
7766
|
+
"use strict";
|
|
7767
|
+
init_web();
|
|
7768
|
+
init_web();
|
|
7769
|
+
init_web();
|
|
7770
|
+
_tmpl$20 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path d="M12.8277 1.75C15.0033 1.74998 15.7381 1.74997 17.0981 1.93282C18.5025 2.12164 19.6563 2.52175 20.5687 3.43414C21.4811 4.34653 21.8812 5.50033 22.07 6.90471C22.234 8.12428 22.2509 10.047 22.2526 12L22.2494 12.75H20.2528C20.2528 10.4826 20.2507 8.38258 20.0878 7.17121C19.9288 5.9886 19.6333 5.3272 19.1545 4.84835C18.6756 4.3695 18.0142 4.07399 16.8316 3.91499C15.6202 3.75212 15.0203 3.75 12.7528 3.75C10.4854 3.75 8.3854 3.75212 7.17403 3.91499C5.99143 4.07399 5.33003 4.3695 4.85118 4.84835C4.37232 5.3272 4.07681 5.9886 3.91782 7.17121C3.75495 8.38258 3.75283 10.4826 3.75283 12.75L1.75195 12.7518L1.75302 11.9999C1.75475 10.0469 1.77169 8.12426 1.93565 6.90471C2.12447 5.50033 2.52457 4.34653 3.43696 3.43414C4.34935 2.52175 5.50316 2.12164 6.90754 1.93282C8.26767 1.74996 10.0024 1.74998 12.1783 1.75H12.1784H12.8277H12.8277Z"></path><path d="M22.2453 13.5037C22.2368 15.2454 22.1975 16.6539 21.9924 17.7892C21.7834 18.9461 21.3919 19.8839 20.6368 20.6391C19.7786 21.4973 18.6863 21.8843 17.3097 22.0694C15.9662 22.25 14.2455 22.25 12.0548 22.25H11.9405C9.74978 22.25 8.02911 22.25 6.6857 22.0694C5.30904 21.8843 4.21679 21.4973 3.35859 20.6391C2.60342 19.8839 2.21192 18.9461 2.00296 17.7892C1.79789 16.6539 1.75858 15.2454 1.75 13.5037L1.75107 12.7518L3.75194 12.75L7.42333 12.75C8.70352 12.75 9.55879 13.7898 9.96929 14.6123C10.2595 15.1938 10.8231 15.75 11.9977 15.75C13.1723 15.75 13.7358 15.1938 14.0261 14.6123C14.4366 13.7898 15.2918 12.75 16.572 12.75L20.2519 12.75H22.2486L22.2453 13.5037Z">`);
|
|
7771
|
+
_tmpl$27 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill=#404040 d="M14.25 5.5C14.25 3.15279 16.1528 1.25 18.5 1.25C20.8472 1.25 22.75 3.15279 22.75 5.5C22.75 7.84721 20.8472 9.75 18.5 9.75C16.1528 9.75 14.25 7.84721 14.25 5.5Z"></path><path d="M20.2156 10.9897C19.9813 11.0629 19.8641 11.0994 19.8057 11.1792C19.7474 11.259 19.748 11.373 19.7491 11.6009C19.7513 12.0381 19.7518 12.4898 19.7519 12.9499C19.752 13.1155 19.6176 13.25 19.4519 13.25L16.072 13.25C14.7918 13.25 13.9366 14.2898 13.5261 15.1123C13.2358 15.6938 12.6723 16.25 11.4977 16.25C10.3231 16.25 9.7595 15.6938 9.46929 15.1123C9.05879 14.2898 8.20352 13.25 6.92333 13.25L3.55194 13.25C3.38626 13.25 3.25193 13.1155 3.25197 12.9499C3.25245 10.7983 3.26128 8.82894 3.41693 7.67121C3.57593 6.4886 3.87144 5.8272 4.35029 5.34835C4.82915 4.8695 5.49055 4.57399 6.67315 4.41499C7.88452 4.25212 9.9845 4.25 12.2519 4.25C12.3035 4.25 12.3542 4.25 12.4041 4.25001C12.6299 4.25002 12.7427 4.25003 12.822 4.19171C12.9014 4.13339 12.9377 4.0171 13.0103 3.78451C13.0682 3.59881 13.1354 3.41715 13.2111 3.24007C13.4166 2.75982 13.5193 2.51969 13.4304 2.38492C13.3415 2.25015 13.1029 2.25011 12.6257 2.25002C12.5291 2.25 12.4296 2.25 12.3268 2.25H11.6775C9.50152 2.24998 7.76678 2.24996 6.40666 2.43283C5.00228 2.62164 3.84847 3.02175 2.93608 3.93414C2.02369 4.84653 1.62358 6.00033 1.43477 7.40471C1.2708 8.62426 1.25387 10.5469 1.25214 12.4999L1.25 14.0037C1.25858 15.7454 1.29789 17.1539 1.50296 18.2892C1.71192 19.4461 2.10342 20.3839 2.85859 21.1391C3.71679 21.9973 4.80904 22.3843 6.1857 22.5694C7.52911 22.75 9.24978 22.75 11.4405 22.75H11.5548C13.7455 22.75 15.4662 22.75 16.8097 22.5694C18.1863 22.3843 19.2786 21.9973 20.1368 21.1391C20.8919 20.3839 21.2834 19.4461 21.4924 18.2892C21.6975 17.1539 21.7368 15.7454 21.7453 14.0037L21.7517 12.5C21.7514 12.1187 21.7505 11.7385 21.748 11.3645C21.7449 10.8942 21.7433 10.6591 21.6087 10.5709C21.4741 10.4828 21.2371 10.5844 20.763 10.7876C20.585 10.8638 20.4023 10.9314 20.2156 10.9897Z">`);
|
|
7772
|
+
IconInbox = (props) => {
|
|
7773
|
+
const size = () => props.size ?? 14;
|
|
7774
|
+
return (() => {
|
|
7775
|
+
var _el$ = _tmpl$20();
|
|
7776
|
+
createRenderEffect((_p$) => {
|
|
7777
|
+
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
7778
|
+
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
7779
|
+
_v$2 !== _p$.t && setAttribute(_el$, "height", _p$.t = _v$2);
|
|
7780
|
+
_v$3 !== _p$.a && setAttribute(_el$, "class", _p$.a = _v$3);
|
|
7781
|
+
return _p$;
|
|
7782
|
+
}, {
|
|
7783
|
+
e: void 0,
|
|
7784
|
+
t: void 0,
|
|
7785
|
+
a: void 0
|
|
7786
|
+
});
|
|
7787
|
+
return _el$;
|
|
7788
|
+
})();
|
|
7789
|
+
};
|
|
7790
|
+
IconInboxUnread = (props) => {
|
|
7791
|
+
const size = () => props.size ?? 14;
|
|
7792
|
+
return (() => {
|
|
7793
|
+
var _el$2 = _tmpl$27();
|
|
7794
|
+
createRenderEffect((_p$) => {
|
|
7795
|
+
var _v$4 = size(), _v$5 = size(), _v$6 = props.class;
|
|
7796
|
+
_v$4 !== _p$.e && setAttribute(_el$2, "width", _p$.e = _v$4);
|
|
7797
|
+
_v$5 !== _p$.t && setAttribute(_el$2, "height", _p$.t = _v$5);
|
|
7798
|
+
_v$6 !== _p$.a && setAttribute(_el$2, "class", _p$.a = _v$6);
|
|
7799
|
+
return _p$;
|
|
7800
|
+
}, {
|
|
7801
|
+
e: void 0,
|
|
7802
|
+
t: void 0,
|
|
7803
|
+
a: void 0
|
|
7804
|
+
});
|
|
7805
|
+
return _el$2;
|
|
7806
|
+
})();
|
|
7807
|
+
};
|
|
7808
|
+
}
|
|
7809
|
+
});
|
|
7810
|
+
|
|
7701
7811
|
// src/utils/freeze-updates.ts
|
|
7702
7812
|
var isUpdatesPaused, getOrCache, patchedDispatchers, wrappedDispatchCache, wrappedStartTransitionCache, pendingStoreCallbacks, pendingTransitionCallbacks, pendingStateUpdates, pausedQueueStates, pausedContextStates, renderersWithPatchedDispatcher, typedFiberRoots, getFiberRoot, collectFiberRoots, mergePendingChains, pauseHookQueue, resumeHookQueue, pauseContextDependency, resumeContextDependency, forEachHookQueue, forEachContextDependency, traverseFibers, pauseFiber, resumeFiber, patchDispatcher, installDispatcherPatching, scheduleReactUpdate, invokeCallbacks, initializeFreezeSupport, freezeUpdates;
|
|
7703
7813
|
var init_freeze_updates = __esm({
|
|
@@ -8170,7 +8280,28 @@ var init_freeze_animations = __esm({
|
|
|
8170
8280
|
);
|
|
8171
8281
|
};
|
|
8172
8282
|
unfreezeGlobalAnimations = () => {
|
|
8173
|
-
globalAnimationStyleElement
|
|
8283
|
+
if (!globalAnimationStyleElement) return;
|
|
8284
|
+
globalAnimationStyleElement.textContent = `
|
|
8285
|
+
*, *::before, *::after {
|
|
8286
|
+
transition: none !important;
|
|
8287
|
+
}
|
|
8288
|
+
`;
|
|
8289
|
+
for (const animation of document.getAnimations()) {
|
|
8290
|
+
if (animation.effect instanceof KeyframeEffect) {
|
|
8291
|
+
const target = animation.effect.target;
|
|
8292
|
+
if (target instanceof Element) {
|
|
8293
|
+
const rootNode = target.getRootNode();
|
|
8294
|
+
if (rootNode instanceof ShadowRoot) {
|
|
8295
|
+
continue;
|
|
8296
|
+
}
|
|
8297
|
+
}
|
|
8298
|
+
}
|
|
8299
|
+
try {
|
|
8300
|
+
animation.finish();
|
|
8301
|
+
} catch {
|
|
8302
|
+
}
|
|
8303
|
+
}
|
|
8304
|
+
globalAnimationStyleElement.remove();
|
|
8174
8305
|
globalAnimationStyleElement = null;
|
|
8175
8306
|
};
|
|
8176
8307
|
}
|
|
@@ -8479,7 +8610,7 @@ var init_freeze_pseudo_states = __esm({
|
|
|
8479
8610
|
});
|
|
8480
8611
|
|
|
8481
8612
|
// src/components/tooltip.tsx
|
|
8482
|
-
var _tmpl$
|
|
8613
|
+
var _tmpl$21, tooltipCloseTimestamp, wasTooltipRecentlyVisible, Tooltip;
|
|
8483
8614
|
var init_tooltip = __esm({
|
|
8484
8615
|
"src/components/tooltip.tsx"() {
|
|
8485
8616
|
"use strict";
|
|
@@ -8491,7 +8622,7 @@ var init_tooltip = __esm({
|
|
|
8491
8622
|
init_solid();
|
|
8492
8623
|
init_cn();
|
|
8493
8624
|
init_constants();
|
|
8494
|
-
_tmpl$
|
|
8625
|
+
_tmpl$21 = /* @__PURE__ */ template(`<div style=z-index:2147483647>`);
|
|
8495
8626
|
tooltipCloseTimestamp = 0;
|
|
8496
8627
|
wasTooltipRecentlyVisible = () => {
|
|
8497
8628
|
return Date.now() - tooltipCloseTimestamp < TOOLTIP_GRACE_PERIOD_MS;
|
|
@@ -8535,7 +8666,7 @@ var init_tooltip = __esm({
|
|
|
8535
8666
|
return delayedVisible();
|
|
8536
8667
|
},
|
|
8537
8668
|
get children() {
|
|
8538
|
-
var _el$ = _tmpl$
|
|
8669
|
+
var _el$ = _tmpl$21();
|
|
8539
8670
|
insert(_el$, () => props.children);
|
|
8540
8671
|
createRenderEffect(() => className(_el$, cn("absolute left-1/2 -translate-x-1/2 whitespace-nowrap px-1.5 py-0.5 rounded-[10px] text-[10px] text-black/60 pointer-events-none [corner-shape:superellipse(1.25)]", PANEL_STYLES, props.position === "top" ? "bottom-full mb-2.5" : "top-full mt-2.5", shouldAnimate() && "animate-tooltip-fade-in")));
|
|
8541
8672
|
return _el$;
|
|
@@ -8559,7 +8690,7 @@ var init_get_toolbar_icon_color = __esm({
|
|
|
8559
8690
|
});
|
|
8560
8691
|
|
|
8561
8692
|
// src/components/toolbar/index.tsx
|
|
8562
|
-
var _tmpl$
|
|
8693
|
+
var _tmpl$28, _tmpl$29, Toolbar;
|
|
8563
8694
|
var init_toolbar = __esm({
|
|
8564
8695
|
"src/components/toolbar/index.tsx"() {
|
|
8565
8696
|
"use strict";
|
|
@@ -8581,17 +8712,20 @@ var init_toolbar = __esm({
|
|
|
8581
8712
|
init_icon_select();
|
|
8582
8713
|
init_icon_chevron();
|
|
8583
8714
|
init_icon_comment();
|
|
8715
|
+
init_icon_inbox();
|
|
8584
8716
|
init_constants();
|
|
8585
8717
|
init_freeze_updates();
|
|
8586
8718
|
init_freeze_animations();
|
|
8587
8719
|
init_freeze_pseudo_states();
|
|
8588
8720
|
init_tooltip();
|
|
8589
8721
|
init_get_toolbar_icon_color();
|
|
8590
|
-
_tmpl$
|
|
8591
|
-
_tmpl$
|
|
8722
|
+
_tmpl$28 = /* @__PURE__ */ template(`<div style=z-index:2147483647>Enable to continue`);
|
|
8723
|
+
_tmpl$29 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-toolbar style=z-index:2147483647><div><div><div class="flex items-center min-w-0"><div class="flex items-center"><div><div class="relative overflow-visible min-w-0"><button data-react-grab-ignore-events data-react-grab-toolbar-toggle class="contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox mr-1.5"></button></div></div><div><div class="relative overflow-visible min-w-0"><button data-react-grab-ignore-events data-react-grab-toolbar-comment class="contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox mr-1.5"></button></div></div><div><div class="relative overflow-visible min-w-0"><button data-react-grab-ignore-events data-react-grab-toolbar-recent class="contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox mr-1.5"></button></div></div></div><div class="relative shrink-0 overflow-visible"><button data-react-grab-ignore-events data-react-grab-toolbar-enabled class="contain-layout flex items-center justify-center cursor-pointer interactive-scale outline-none mx-0.5"><div><div></div></div></button></div></div></div><button data-react-grab-ignore-events data-react-grab-toolbar-collapse class="contain-layout shrink-0 flex items-center justify-center cursor-pointer interactive-scale">`);
|
|
8592
8724
|
Toolbar = (props) => {
|
|
8593
8725
|
let containerRef;
|
|
8726
|
+
let expandableButtonsRef;
|
|
8594
8727
|
let unfreezeUpdatesCallback = null;
|
|
8728
|
+
let lastKnownExpandableWidth = 0;
|
|
8595
8729
|
const [isVisible, setIsVisible] = createSignal(false);
|
|
8596
8730
|
const [isCollapsed, setIsCollapsed] = createSignal(false);
|
|
8597
8731
|
const [isDragging, setIsDragging] = createSignal(false);
|
|
@@ -8618,12 +8752,18 @@ var init_toolbar = __esm({
|
|
|
8618
8752
|
const [isCommentTooltipVisible, setIsCommentTooltipVisible] = createSignal(false);
|
|
8619
8753
|
const [isToggleTooltipVisible, setIsToggleTooltipVisible] = createSignal(false);
|
|
8620
8754
|
const [isShakeTooltipVisible, setIsShakeTooltipVisible] = createSignal(false);
|
|
8755
|
+
const [isToggleAnimating, setIsToggleAnimating] = createSignal(false);
|
|
8756
|
+
const [isRecentTooltipVisible, setIsRecentTooltipVisible] = createSignal(false);
|
|
8757
|
+
const recentTooltipLabel = () => {
|
|
8758
|
+
const count = props.recentItemCount ?? 0;
|
|
8759
|
+
return count > 0 ? `Recent (${count})` : "Recent";
|
|
8760
|
+
};
|
|
8621
8761
|
const tooltipPosition = () => snapEdge() === "top" ? "bottom" : "top";
|
|
8622
8762
|
const stopEventPropagation = (event) => {
|
|
8623
8763
|
event.stopPropagation();
|
|
8624
8764
|
event.stopImmediatePropagation();
|
|
8625
8765
|
};
|
|
8626
|
-
const createFreezeHandlers = (setTooltipVisible) => ({
|
|
8766
|
+
const createFreezeHandlers = (setTooltipVisible, onHoverChange) => ({
|
|
8627
8767
|
onMouseEnter: () => {
|
|
8628
8768
|
setTooltipVisible(true);
|
|
8629
8769
|
props.onSelectHoverChange?.(true);
|
|
@@ -8632,6 +8772,7 @@ var init_toolbar = __esm({
|
|
|
8632
8772
|
freezeGlobalAnimations();
|
|
8633
8773
|
freezePseudoStates();
|
|
8634
8774
|
}
|
|
8775
|
+
onHoverChange?.(true);
|
|
8635
8776
|
},
|
|
8636
8777
|
onMouseLeave: () => {
|
|
8637
8778
|
setTooltipVisible(false);
|
|
@@ -8642,6 +8783,7 @@ var init_toolbar = __esm({
|
|
|
8642
8783
|
unfreezeGlobalAnimations();
|
|
8643
8784
|
unfreezePseudoStates();
|
|
8644
8785
|
}
|
|
8786
|
+
onHoverChange?.(false);
|
|
8645
8787
|
}
|
|
8646
8788
|
});
|
|
8647
8789
|
const collapsedEdgeClasses = () => {
|
|
@@ -8683,6 +8825,64 @@ var init_toolbar = __esm({
|
|
|
8683
8825
|
unfreezeUpdatesCallback = null;
|
|
8684
8826
|
}
|
|
8685
8827
|
}));
|
|
8828
|
+
const reclampToolbarToViewport = () => {
|
|
8829
|
+
if (!containerRef) return;
|
|
8830
|
+
const rect = containerRef.getBoundingClientRect();
|
|
8831
|
+
expandedDimensions = {
|
|
8832
|
+
width: rect.width,
|
|
8833
|
+
height: rect.height
|
|
8834
|
+
};
|
|
8835
|
+
const currentPos = position();
|
|
8836
|
+
const viewport = getVisualViewport();
|
|
8837
|
+
const edge = snapEdge();
|
|
8838
|
+
let clampedX = currentPos.x;
|
|
8839
|
+
let clampedY = currentPos.y;
|
|
8840
|
+
if (edge === "top" || edge === "bottom") {
|
|
8841
|
+
const minX = viewport.offsetLeft + TOOLBAR_SNAP_MARGIN_PX;
|
|
8842
|
+
const maxX = Math.max(minX, viewport.offsetLeft + viewport.width - rect.width - TOOLBAR_SNAP_MARGIN_PX);
|
|
8843
|
+
clampedX = clampToViewport2(currentPos.x, minX, maxX);
|
|
8844
|
+
clampedY = edge === "top" ? viewport.offsetTop + TOOLBAR_SNAP_MARGIN_PX : viewport.offsetTop + viewport.height - rect.height - TOOLBAR_SNAP_MARGIN_PX;
|
|
8845
|
+
} else {
|
|
8846
|
+
const minY = viewport.offsetTop + TOOLBAR_SNAP_MARGIN_PX;
|
|
8847
|
+
const maxY = Math.max(minY, viewport.offsetTop + viewport.height - rect.height - TOOLBAR_SNAP_MARGIN_PX);
|
|
8848
|
+
clampedY = clampToViewport2(currentPos.y, minY, maxY);
|
|
8849
|
+
clampedX = edge === "left" ? viewport.offsetLeft + TOOLBAR_SNAP_MARGIN_PX : viewport.offsetLeft + viewport.width - rect.width - TOOLBAR_SNAP_MARGIN_PX;
|
|
8850
|
+
}
|
|
8851
|
+
const newRatio = getRatioFromPosition(edge, clampedX, clampedY, rect.width, rect.height);
|
|
8852
|
+
setPositionRatio(newRatio);
|
|
8853
|
+
const didPositionChange = clampedX !== currentPos.x || clampedY !== currentPos.y;
|
|
8854
|
+
if (didPositionChange) {
|
|
8855
|
+
setIsCollapseAnimating(true);
|
|
8856
|
+
requestAnimationFrame(() => {
|
|
8857
|
+
requestAnimationFrame(() => {
|
|
8858
|
+
setPosition({
|
|
8859
|
+
x: clampedX,
|
|
8860
|
+
y: clampedY
|
|
8861
|
+
});
|
|
8862
|
+
if (collapseAnimationTimeout) {
|
|
8863
|
+
clearTimeout(collapseAnimationTimeout);
|
|
8864
|
+
}
|
|
8865
|
+
collapseAnimationTimeout = setTimeout(() => {
|
|
8866
|
+
setIsCollapseAnimating(false);
|
|
8867
|
+
}, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS);
|
|
8868
|
+
});
|
|
8869
|
+
});
|
|
8870
|
+
}
|
|
8871
|
+
};
|
|
8872
|
+
createEffect(on(() => props.recentItemCount ?? 0, () => {
|
|
8873
|
+
if (isCollapsed()) return;
|
|
8874
|
+
if (recentItemCountTimeout) {
|
|
8875
|
+
clearTimeout(recentItemCountTimeout);
|
|
8876
|
+
}
|
|
8877
|
+
recentItemCountTimeout = setTimeout(reclampToolbarToViewport, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS);
|
|
8878
|
+
onCleanup(() => {
|
|
8879
|
+
if (recentItemCountTimeout) {
|
|
8880
|
+
clearTimeout(recentItemCountTimeout);
|
|
8881
|
+
}
|
|
8882
|
+
});
|
|
8883
|
+
}, {
|
|
8884
|
+
defer: true
|
|
8885
|
+
}));
|
|
8686
8886
|
let lastPointerPosition = {
|
|
8687
8887
|
x: 0,
|
|
8688
8888
|
y: 0,
|
|
@@ -8700,7 +8900,7 @@ var init_toolbar = __esm({
|
|
|
8700
8900
|
width: TOOLBAR_COLLAPSED_SHORT_PX,
|
|
8701
8901
|
height: TOOLBAR_COLLAPSED_SHORT_PX
|
|
8702
8902
|
});
|
|
8703
|
-
const
|
|
8903
|
+
const clampToViewport2 = (value, min, max) => Math.max(min, Math.min(value, max));
|
|
8704
8904
|
const getVisualViewport = () => {
|
|
8705
8905
|
const visualViewport = window.visualViewport;
|
|
8706
8906
|
if (visualViewport) {
|
|
@@ -8733,7 +8933,7 @@ var init_toolbar = __esm({
|
|
|
8733
8933
|
if (edge === "top" || edge === "bottom") {
|
|
8734
8934
|
const xOffset = (expandedWidth - actualCollapsedWidth) / 2;
|
|
8735
8935
|
const newExpandedX = collapsedPosition.x - xOffset;
|
|
8736
|
-
const clampedX =
|
|
8936
|
+
const clampedX = clampToViewport2(newExpandedX, viewport.offsetLeft + TOOLBAR_SNAP_MARGIN_PX, viewport.offsetLeft + viewportWidth - expandedWidth - TOOLBAR_SNAP_MARGIN_PX);
|
|
8737
8937
|
const newExpandedY = edge === "top" ? viewport.offsetTop + TOOLBAR_SNAP_MARGIN_PX : viewport.offsetTop + viewportHeight - expandedHeight - TOOLBAR_SNAP_MARGIN_PX;
|
|
8738
8938
|
newPosition = {
|
|
8739
8939
|
x: clampedX,
|
|
@@ -8742,7 +8942,7 @@ var init_toolbar = __esm({
|
|
|
8742
8942
|
} else {
|
|
8743
8943
|
const yOffset = (expandedHeight - actualCollapsedHeight) / 2;
|
|
8744
8944
|
const newExpandedY = collapsedPosition.y - yOffset;
|
|
8745
|
-
const clampedY =
|
|
8945
|
+
const clampedY = clampToViewport2(newExpandedY, viewport.offsetTop + TOOLBAR_SNAP_MARGIN_PX, viewport.offsetTop + viewportHeight - expandedHeight - TOOLBAR_SNAP_MARGIN_PX);
|
|
8746
8946
|
const newExpandedX = edge === "left" ? viewport.offsetLeft + TOOLBAR_SNAP_MARGIN_PX : viewport.offsetLeft + viewportWidth - expandedWidth - TOOLBAR_SNAP_MARGIN_PX;
|
|
8747
8947
|
newPosition = {
|
|
8748
8948
|
x: newExpandedX,
|
|
@@ -8809,6 +9009,7 @@ var init_toolbar = __esm({
|
|
|
8809
9009
|
};
|
|
8810
9010
|
const handleToggle = createDragAwareHandler(() => props.onToggle?.());
|
|
8811
9011
|
const handleComment = createDragAwareHandler(() => props.onComment?.());
|
|
9012
|
+
const handleRecent = createDragAwareHandler(() => props.onToggleRecent?.());
|
|
8812
9013
|
const handleToggleCollapse = createDragAwareHandler(() => {
|
|
8813
9014
|
const rect = containerRef?.getBoundingClientRect();
|
|
8814
9015
|
const wasCollapsed = isCollapsed();
|
|
@@ -8851,7 +9052,61 @@ var init_toolbar = __esm({
|
|
|
8851
9052
|
}
|
|
8852
9053
|
}, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS);
|
|
8853
9054
|
});
|
|
8854
|
-
const handleToggleEnabled = createDragAwareHandler(() =>
|
|
9055
|
+
const handleToggleEnabled = createDragAwareHandler(() => {
|
|
9056
|
+
const isCurrentlyEnabled = Boolean(props.enabled);
|
|
9057
|
+
const edge = snapEdge();
|
|
9058
|
+
const preTogglePosition = position();
|
|
9059
|
+
const expandableWidth = lastKnownExpandableWidth;
|
|
9060
|
+
const shouldCompensatePosition = expandableWidth > 0 && edge !== "left";
|
|
9061
|
+
if (shouldCompensatePosition) {
|
|
9062
|
+
setIsToggleAnimating(true);
|
|
9063
|
+
}
|
|
9064
|
+
props.onToggleEnabled?.();
|
|
9065
|
+
if (expandableWidth > 0) {
|
|
9066
|
+
const widthChange = isCurrentlyEnabled ? -expandableWidth : expandableWidth;
|
|
9067
|
+
expandedDimensions = {
|
|
9068
|
+
width: expandedDimensions.width + widthChange,
|
|
9069
|
+
height: expandedDimensions.height
|
|
9070
|
+
};
|
|
9071
|
+
}
|
|
9072
|
+
if (shouldCompensatePosition) {
|
|
9073
|
+
const viewport = getVisualViewport();
|
|
9074
|
+
const positionOffset = isCurrentlyEnabled ? expandableWidth : -expandableWidth;
|
|
9075
|
+
const clampMin = viewport.offsetLeft + TOOLBAR_SNAP_MARGIN_PX;
|
|
9076
|
+
const clampMax = viewport.offsetLeft + viewport.width - expandedDimensions.width - TOOLBAR_SNAP_MARGIN_PX;
|
|
9077
|
+
const compensatedX = clampToViewport2(preTogglePosition.x + positionOffset, clampMin, clampMax);
|
|
9078
|
+
setPosition({
|
|
9079
|
+
x: compensatedX,
|
|
9080
|
+
y: preTogglePosition.y
|
|
9081
|
+
});
|
|
9082
|
+
clearTimeout(toggleAnimationTimeout);
|
|
9083
|
+
toggleAnimationTimeout = setTimeout(() => {
|
|
9084
|
+
setIsToggleAnimating(false);
|
|
9085
|
+
const newRatio = getRatioFromPosition(edge, position().x, position().y, expandedDimensions.width, expandedDimensions.height);
|
|
9086
|
+
setPositionRatio(newRatio);
|
|
9087
|
+
saveAndNotify({
|
|
9088
|
+
edge,
|
|
9089
|
+
ratio: newRatio,
|
|
9090
|
+
collapsed: isCollapsed(),
|
|
9091
|
+
enabled: !isCurrentlyEnabled
|
|
9092
|
+
});
|
|
9093
|
+
}, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS);
|
|
9094
|
+
} else if (!isCurrentlyEnabled && lastKnownExpandableWidth === 0) {
|
|
9095
|
+
clearTimeout(toggleAnimationTimeout);
|
|
9096
|
+
toggleAnimationTimeout = setTimeout(() => {
|
|
9097
|
+
if (expandableButtonsRef) {
|
|
9098
|
+
lastKnownExpandableWidth = expandableButtonsRef.offsetWidth;
|
|
9099
|
+
}
|
|
9100
|
+
const rect = containerRef?.getBoundingClientRect();
|
|
9101
|
+
if (rect) {
|
|
9102
|
+
expandedDimensions = {
|
|
9103
|
+
width: rect.width,
|
|
9104
|
+
height: rect.height
|
|
9105
|
+
};
|
|
9106
|
+
}
|
|
9107
|
+
}, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS);
|
|
9108
|
+
}
|
|
9109
|
+
});
|
|
8855
9110
|
const getSnapPosition = (currentX, currentY, elementWidth, elementHeight, velocityX, velocityY) => {
|
|
8856
9111
|
const viewport = getVisualViewport();
|
|
8857
9112
|
const viewportWidth = viewport.width;
|
|
@@ -8998,7 +9253,7 @@ var init_toolbar = __esm({
|
|
|
8998
9253
|
case "bottom": {
|
|
8999
9254
|
const xOffset = (expandedWidth - collapsedWidth) / 2;
|
|
9000
9255
|
const centeredX = pos.x + xOffset;
|
|
9001
|
-
const clampedX =
|
|
9256
|
+
const clampedX = clampToViewport2(centeredX, viewport.offsetLeft, viewport.offsetLeft + viewport.width - collapsedWidth);
|
|
9002
9257
|
return {
|
|
9003
9258
|
x: clampedX,
|
|
9004
9259
|
y: edge === "top" ? viewport.offsetTop : viewport.offsetTop + viewport.height - collapsedHeight
|
|
@@ -9008,7 +9263,7 @@ var init_toolbar = __esm({
|
|
|
9008
9263
|
case "right": {
|
|
9009
9264
|
const yOffset = (expandedHeight - collapsedHeight) / 2;
|
|
9010
9265
|
const centeredY = pos.y + yOffset;
|
|
9011
|
-
const clampedY =
|
|
9266
|
+
const clampedY = clampToViewport2(centeredY, viewport.offsetTop, viewport.offsetTop + viewport.height - collapsedHeight);
|
|
9012
9267
|
return {
|
|
9013
9268
|
x: edge === "left" ? viewport.offsetLeft : viewport.offsetLeft + viewport.width - collapsedWidth,
|
|
9014
9269
|
y: clampedY
|
|
@@ -9037,6 +9292,8 @@ var init_toolbar = __esm({
|
|
|
9037
9292
|
let resizeTimeout;
|
|
9038
9293
|
let collapseAnimationTimeout;
|
|
9039
9294
|
let snapAnimationTimeout;
|
|
9295
|
+
let toggleAnimationTimeout;
|
|
9296
|
+
let recentItemCountTimeout;
|
|
9040
9297
|
const handleResize = () => {
|
|
9041
9298
|
if (isDragging()) return;
|
|
9042
9299
|
setIsResizing(true);
|
|
@@ -9061,6 +9318,9 @@ var init_toolbar = __esm({
|
|
|
9061
9318
|
props.onStateChange?.(state);
|
|
9062
9319
|
};
|
|
9063
9320
|
onMount(() => {
|
|
9321
|
+
if (containerRef) {
|
|
9322
|
+
props.onContainerRef?.(containerRef);
|
|
9323
|
+
}
|
|
9064
9324
|
const savedState = loadToolbarState();
|
|
9065
9325
|
const rect = containerRef?.getBoundingClientRect();
|
|
9066
9326
|
const viewport = getVisualViewport();
|
|
@@ -9097,9 +9357,12 @@ var init_toolbar = __esm({
|
|
|
9097
9357
|
const defaultPosition = getPositionFromEdgeAndRatio("bottom", 0.5, expandedDimensions.width, expandedDimensions.height);
|
|
9098
9358
|
setPosition(defaultPosition);
|
|
9099
9359
|
}
|
|
9360
|
+
if (props.enabled && expandableButtonsRef) {
|
|
9361
|
+
lastKnownExpandableWidth = expandableButtonsRef.offsetWidth;
|
|
9362
|
+
}
|
|
9100
9363
|
if (props.onSubscribeToStateChanges) {
|
|
9101
9364
|
const unsubscribe = props.onSubscribeToStateChanges((state) => {
|
|
9102
|
-
if (isCollapseAnimating()) return;
|
|
9365
|
+
if (isCollapseAnimating() || isToggleAnimating()) return;
|
|
9103
9366
|
const rect2 = containerRef?.getBoundingClientRect();
|
|
9104
9367
|
if (!rect2) return;
|
|
9105
9368
|
const didCollapsedChange = isCollapsed() !== state.collapsed;
|
|
@@ -9114,18 +9377,14 @@ var init_toolbar = __esm({
|
|
|
9114
9377
|
} = calculateExpandedPositionFromCollapsed(collapsedPos, state.edge);
|
|
9115
9378
|
setPosition(newPos);
|
|
9116
9379
|
setPositionRatio(newRatio);
|
|
9117
|
-
|
|
9118
|
-
clearTimeout(collapseAnimationTimeout);
|
|
9119
|
-
}
|
|
9380
|
+
clearTimeout(collapseAnimationTimeout);
|
|
9120
9381
|
collapseAnimationTimeout = setTimeout(() => {
|
|
9121
9382
|
setIsCollapseAnimating(false);
|
|
9122
9383
|
}, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS);
|
|
9123
9384
|
} else {
|
|
9124
9385
|
if (didCollapsedChange) {
|
|
9125
9386
|
setIsCollapseAnimating(true);
|
|
9126
|
-
|
|
9127
|
-
clearTimeout(collapseAnimationTimeout);
|
|
9128
|
-
}
|
|
9387
|
+
clearTimeout(collapseAnimationTimeout);
|
|
9129
9388
|
collapseAnimationTimeout = setTimeout(() => {
|
|
9130
9389
|
setIsCollapseAnimating(false);
|
|
9131
9390
|
}, TOOLBAR_COLLAPSE_ANIMATION_DURATION_MS);
|
|
@@ -9154,18 +9413,12 @@ var init_toolbar = __esm({
|
|
|
9154
9413
|
window.visualViewport?.removeEventListener("scroll", handleResize);
|
|
9155
9414
|
window.removeEventListener("pointermove", handleWindowPointerMove);
|
|
9156
9415
|
window.removeEventListener("pointerup", handleWindowPointerUp);
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
if (shakeTooltipTimeout) {
|
|
9164
|
-
clearTimeout(shakeTooltipTimeout);
|
|
9165
|
-
}
|
|
9166
|
-
if (snapAnimationTimeout) {
|
|
9167
|
-
clearTimeout(snapAnimationTimeout);
|
|
9168
|
-
}
|
|
9416
|
+
clearTimeout(resizeTimeout);
|
|
9417
|
+
clearTimeout(collapseAnimationTimeout);
|
|
9418
|
+
clearTimeout(shakeTooltipTimeout);
|
|
9419
|
+
clearTimeout(snapAnimationTimeout);
|
|
9420
|
+
clearTimeout(toggleAnimationTimeout);
|
|
9421
|
+
clearTimeout(recentItemCountTimeout);
|
|
9169
9422
|
unfreezeUpdatesCallback?.();
|
|
9170
9423
|
});
|
|
9171
9424
|
const currentPosition = () => {
|
|
@@ -9188,7 +9441,7 @@ var init_toolbar = __esm({
|
|
|
9188
9441
|
if (isSnapping()) {
|
|
9189
9442
|
return "transition-[transform,opacity] duration-300 ease-out";
|
|
9190
9443
|
}
|
|
9191
|
-
if (isCollapseAnimating()) {
|
|
9444
|
+
if (isCollapseAnimating() || isToggleAnimating()) {
|
|
9192
9445
|
return "transition-[transform,opacity] duration-150 ease-out";
|
|
9193
9446
|
}
|
|
9194
9447
|
return "transition-opacity duration-300 ease-out";
|
|
@@ -9209,7 +9462,7 @@ var init_toolbar = __esm({
|
|
|
9209
9462
|
}
|
|
9210
9463
|
};
|
|
9211
9464
|
return (() => {
|
|
9212
|
-
var _el$ = _tmpl$
|
|
9465
|
+
var _el$ = _tmpl$29(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild, _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$7.firstChild, _el$9 = _el$6.nextSibling, _el$0 = _el$9.firstChild, _el$1 = _el$0.firstChild, _el$10 = _el$9.nextSibling, _el$11 = _el$10.firstChild, _el$12 = _el$11.firstChild, _el$13 = _el$5.nextSibling, _el$14 = _el$13.firstChild, _el$15 = _el$14.firstChild, _el$16 = _el$15.firstChild, _el$17 = _el$3.nextSibling;
|
|
9213
9466
|
_el$.$$pointerdown = handlePointerDown;
|
|
9214
9467
|
var _ref$ = containerRef;
|
|
9215
9468
|
typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
|
|
@@ -9239,23 +9492,25 @@ var init_toolbar = __esm({
|
|
|
9239
9492
|
}
|
|
9240
9493
|
};
|
|
9241
9494
|
_el$2.addEventListener("animationend", () => setIsShaking(false));
|
|
9242
|
-
|
|
9495
|
+
var _ref$2 = expandableButtonsRef;
|
|
9496
|
+
typeof _ref$2 === "function" ? use(_ref$2, _el$5) : expandableButtonsRef = _el$5;
|
|
9497
|
+
_el$8.$$click = (event) => {
|
|
9243
9498
|
setIsSelectTooltipVisible(false);
|
|
9244
9499
|
handleToggle(event);
|
|
9245
9500
|
};
|
|
9246
|
-
addEventListener(_el$
|
|
9247
|
-
addEventListener(_el$
|
|
9501
|
+
addEventListener(_el$8, "mousedown", stopEventPropagation);
|
|
9502
|
+
addEventListener(_el$8, "pointerdown", (event) => {
|
|
9248
9503
|
stopEventPropagation(event);
|
|
9249
9504
|
handlePointerDown(event);
|
|
9250
9505
|
});
|
|
9251
|
-
spread(_el$
|
|
9252
|
-
insert(_el$
|
|
9506
|
+
spread(_el$8, mergeProps(() => createFreezeHandlers(setIsSelectTooltipVisible)), false, true);
|
|
9507
|
+
insert(_el$8, createComponent(IconSelect, {
|
|
9253
9508
|
size: 14,
|
|
9254
9509
|
get ["class"]() {
|
|
9255
9510
|
return cn("transition-colors", getToolbarIconColor(Boolean(props.isActive) && !props.isCommentMode, Boolean(props.isCommentMode)));
|
|
9256
9511
|
}
|
|
9257
9512
|
}));
|
|
9258
|
-
insert(_el$
|
|
9513
|
+
insert(_el$7, createComponent(Tooltip, {
|
|
9259
9514
|
get visible() {
|
|
9260
9515
|
return memo(() => !!isSelectTooltipVisible())() && !isCollapsed();
|
|
9261
9516
|
},
|
|
@@ -9264,23 +9519,23 @@ var init_toolbar = __esm({
|
|
|
9264
9519
|
},
|
|
9265
9520
|
children: "Select"
|
|
9266
9521
|
}), null);
|
|
9267
|
-
_el$
|
|
9522
|
+
_el$1.$$click = (event) => {
|
|
9268
9523
|
setIsCommentTooltipVisible(false);
|
|
9269
9524
|
handleComment(event);
|
|
9270
9525
|
};
|
|
9271
|
-
addEventListener(_el$
|
|
9272
|
-
addEventListener(_el$
|
|
9526
|
+
addEventListener(_el$1, "mousedown", stopEventPropagation);
|
|
9527
|
+
addEventListener(_el$1, "pointerdown", (event) => {
|
|
9273
9528
|
stopEventPropagation(event);
|
|
9274
9529
|
handlePointerDown(event);
|
|
9275
9530
|
});
|
|
9276
|
-
spread(_el$
|
|
9277
|
-
insert(_el$
|
|
9531
|
+
spread(_el$1, mergeProps(() => createFreezeHandlers(setIsCommentTooltipVisible)), false, true);
|
|
9532
|
+
insert(_el$1, createComponent(IconComment, {
|
|
9278
9533
|
size: 14,
|
|
9279
9534
|
get ["class"]() {
|
|
9280
9535
|
return cn("transition-colors", getToolbarIconColor(Boolean(props.isCommentMode), Boolean(props.isActive) && !props.isCommentMode));
|
|
9281
9536
|
}
|
|
9282
9537
|
}));
|
|
9283
|
-
insert(_el$
|
|
9538
|
+
insert(_el$0, createComponent(Tooltip, {
|
|
9284
9539
|
get visible() {
|
|
9285
9540
|
return memo(() => !!isCommentTooltipVisible())() && !isCollapsed();
|
|
9286
9541
|
},
|
|
@@ -9289,13 +9544,51 @@ var init_toolbar = __esm({
|
|
|
9289
9544
|
},
|
|
9290
9545
|
children: "Comment"
|
|
9291
9546
|
}), null);
|
|
9292
|
-
_el$
|
|
9293
|
-
|
|
9294
|
-
|
|
9547
|
+
_el$12.$$click = (event) => {
|
|
9548
|
+
setIsRecentTooltipVisible(false);
|
|
9549
|
+
handleRecent(event);
|
|
9550
|
+
};
|
|
9551
|
+
addEventListener(_el$12, "mousedown", stopEventPropagation);
|
|
9552
|
+
addEventListener(_el$12, "pointerdown", (event) => {
|
|
9553
|
+
stopEventPropagation(event);
|
|
9554
|
+
handlePointerDown(event);
|
|
9555
|
+
});
|
|
9556
|
+
spread(_el$12, mergeProps(() => createFreezeHandlers(setIsRecentTooltipVisible, props.onRecentButtonHover)), false, true);
|
|
9557
|
+
insert(_el$12, createComponent(Show, {
|
|
9558
|
+
get when() {
|
|
9559
|
+
return props.hasUnreadRecentItems;
|
|
9560
|
+
},
|
|
9561
|
+
get fallback() {
|
|
9562
|
+
return createComponent(IconInbox, {
|
|
9563
|
+
size: 14,
|
|
9564
|
+
"class": "text-[#B3B3B3] transition-colors"
|
|
9565
|
+
});
|
|
9566
|
+
},
|
|
9567
|
+
get children() {
|
|
9568
|
+
return createComponent(IconInboxUnread, {
|
|
9569
|
+
size: 14,
|
|
9570
|
+
"class": "text-[#B3B3B3] transition-colors"
|
|
9571
|
+
});
|
|
9572
|
+
}
|
|
9573
|
+
}));
|
|
9574
|
+
insert(_el$11, createComponent(Tooltip, {
|
|
9575
|
+
get visible() {
|
|
9576
|
+
return memo(() => !!isRecentTooltipVisible())() && !isCollapsed();
|
|
9577
|
+
},
|
|
9578
|
+
get position() {
|
|
9579
|
+
return tooltipPosition();
|
|
9580
|
+
},
|
|
9581
|
+
get children() {
|
|
9582
|
+
return recentTooltipLabel();
|
|
9583
|
+
}
|
|
9584
|
+
}), null);
|
|
9585
|
+
_el$14.addEventListener("mouseleave", () => setIsToggleTooltipVisible(false));
|
|
9586
|
+
_el$14.addEventListener("mouseenter", () => setIsToggleTooltipVisible(true));
|
|
9587
|
+
_el$14.$$click = (event) => {
|
|
9295
9588
|
setIsToggleTooltipVisible(false);
|
|
9296
9589
|
handleToggleEnabled(event);
|
|
9297
9590
|
};
|
|
9298
|
-
insert(_el$
|
|
9591
|
+
insert(_el$13, createComponent(Tooltip, {
|
|
9299
9592
|
get visible() {
|
|
9300
9593
|
return memo(() => !!isToggleTooltipVisible())() && !isCollapsed();
|
|
9301
9594
|
},
|
|
@@ -9306,8 +9599,9 @@ var init_toolbar = __esm({
|
|
|
9306
9599
|
return props.enabled ? "Disable" : "Enable";
|
|
9307
9600
|
}
|
|
9308
9601
|
}), null);
|
|
9309
|
-
addEventListener(_el$
|
|
9310
|
-
insert(_el$
|
|
9602
|
+
addEventListener(_el$17, "click", handleToggleCollapse, true);
|
|
9603
|
+
insert(_el$17, createComponent(IconChevron, {
|
|
9604
|
+
size: 14,
|
|
9311
9605
|
get ["class"]() {
|
|
9312
9606
|
return cn("text-[#B3B3B3] transition-transform duration-150", chevronRotation());
|
|
9313
9607
|
}
|
|
@@ -9317,23 +9611,24 @@ var init_toolbar = __esm({
|
|
|
9317
9611
|
return isShakeTooltipVisible();
|
|
9318
9612
|
},
|
|
9319
9613
|
get children() {
|
|
9320
|
-
var _el$
|
|
9321
|
-
createRenderEffect(() => className(_el$
|
|
9322
|
-
return _el$
|
|
9614
|
+
var _el$18 = _tmpl$28();
|
|
9615
|
+
createRenderEffect(() => className(_el$18, cn("absolute left-1/2 -translate-x-1/2 whitespace-nowrap px-1.5 py-0.5 rounded-[10px] text-[10px] text-black/60 pointer-events-none animate-tooltip-fade-in [corner-shape:superellipse(1.25)]", PANEL_STYLES, tooltipPosition() === "top" ? "bottom-full mb-0.5" : "top-full mt-0.5")));
|
|
9616
|
+
return _el$18;
|
|
9323
9617
|
}
|
|
9324
9618
|
}), null);
|
|
9325
9619
|
createRenderEffect((_p$) => {
|
|
9326
|
-
var _v$ = cn("fixed left-0 top-0 font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none", getCursorClass(), getTransitionClass(), isVisible() ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"), _v$2 = `translate(${currentPosition().x}px, ${currentPosition().y}px)`, _v$3 = getTransformOrigin(), _v$4 = cn("flex items-center justify-center rounded-[10px] antialiased transition-all duration-150 ease-out relative overflow-visible [font-synthesis:none] [corner-shape:superellipse(1.25)]", PANEL_STYLES, !isCollapsed() && "py-1.5 gap-1.5 px-2", collapsedEdgeClasses(), isShaking() && "animate-shake"), _v$5 = getTransformOrigin(), _v$6 = cn("grid transition-all duration-150 ease-out", isCollapsed() ? "grid-cols-[0fr] opacity-0 pointer-events-none" : "grid-cols-[1fr] opacity-100"), _v$7 = cn("grid transition-all duration-150 ease-out", props.enabled ? "grid-cols-[1fr] opacity-100" : "grid-cols-[0fr] opacity-0"), _v$8 = cn("grid transition-all duration-150 ease-out", props.enabled ? "grid-cols-[1fr] opacity-100" : "grid-cols-[0fr] opacity-0"), _v$9 = cn("relative w-5 h-3 rounded-full transition-colors", props.enabled ? "bg-black" : "bg-black/25"), _v$
|
|
9620
|
+
var _v$ = cn("fixed left-0 top-0 font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none", getCursorClass(), getTransitionClass(), isVisible() ? "opacity-100 pointer-events-auto" : "opacity-0 pointer-events-none"), _v$2 = `translate(${currentPosition().x}px, ${currentPosition().y}px)`, _v$3 = getTransformOrigin(), _v$4 = cn("flex items-center justify-center rounded-[10px] antialiased transition-all duration-150 ease-out relative overflow-visible [font-synthesis:none] [corner-shape:superellipse(1.25)]", PANEL_STYLES, !isCollapsed() && "py-1.5 gap-1.5 px-2", collapsedEdgeClasses(), isShaking() && "animate-shake"), _v$5 = getTransformOrigin(), _v$6 = cn("grid transition-all duration-150 ease-out", isCollapsed() ? "grid-cols-[0fr] opacity-0 pointer-events-none" : "grid-cols-[1fr] opacity-100"), _v$7 = cn("grid transition-all duration-150 ease-out", props.enabled ? "grid-cols-[1fr] opacity-100" : "grid-cols-[0fr] opacity-0"), _v$8 = cn("grid transition-all duration-150 ease-out", props.enabled ? "grid-cols-[1fr] opacity-100" : "grid-cols-[0fr] opacity-0"), _v$9 = cn("grid transition-all duration-150 ease-out", props.enabled && (props.recentItemCount ?? 0) > 0 ? "grid-cols-[1fr] opacity-100" : "grid-cols-[0fr] opacity-0 pointer-events-none"), _v$0 = cn("relative w-5 h-3 rounded-full transition-colors", props.enabled ? "bg-black" : "bg-black/25"), _v$1 = cn("absolute top-0.5 w-2 h-2 rounded-full bg-white transition-transform", props.enabled ? "left-2.5" : "left-0.5");
|
|
9327
9621
|
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
9328
9622
|
_v$2 !== _p$.t && setStyleProperty(_el$, "transform", _p$.t = _v$2);
|
|
9329
9623
|
_v$3 !== _p$.a && setStyleProperty(_el$, "transform-origin", _p$.a = _v$3);
|
|
9330
9624
|
_v$4 !== _p$.o && className(_el$2, _p$.o = _v$4);
|
|
9331
9625
|
_v$5 !== _p$.i && setStyleProperty(_el$2, "transform-origin", _p$.i = _v$5);
|
|
9332
9626
|
_v$6 !== _p$.n && className(_el$3, _p$.n = _v$6);
|
|
9333
|
-
_v$7 !== _p$.s && className(_el$
|
|
9334
|
-
_v$8 !== _p$.h && className(_el$
|
|
9335
|
-
_v$9 !== _p$.r && className(_el$
|
|
9336
|
-
_v$0 !== _p$.d && className(_el$
|
|
9627
|
+
_v$7 !== _p$.s && className(_el$6, _p$.s = _v$7);
|
|
9628
|
+
_v$8 !== _p$.h && className(_el$9, _p$.h = _v$8);
|
|
9629
|
+
_v$9 !== _p$.r && className(_el$10, _p$.r = _v$9);
|
|
9630
|
+
_v$0 !== _p$.d && className(_el$15, _p$.d = _v$0);
|
|
9631
|
+
_v$1 !== _p$.l && className(_el$16, _p$.l = _v$1);
|
|
9337
9632
|
return _p$;
|
|
9338
9633
|
}, {
|
|
9339
9634
|
e: void 0,
|
|
@@ -9345,7 +9640,8 @@ var init_toolbar = __esm({
|
|
|
9345
9640
|
s: void 0,
|
|
9346
9641
|
h: void 0,
|
|
9347
9642
|
r: void 0,
|
|
9348
|
-
d: void 0
|
|
9643
|
+
d: void 0,
|
|
9644
|
+
l: void 0
|
|
9349
9645
|
});
|
|
9350
9646
|
return _el$;
|
|
9351
9647
|
})();
|
|
@@ -9386,7 +9682,7 @@ var init_is_event_from_overlay = __esm({
|
|
|
9386
9682
|
});
|
|
9387
9683
|
|
|
9388
9684
|
// src/components/context-menu.tsx
|
|
9389
|
-
var _tmpl$
|
|
9685
|
+
var _tmpl$30, _tmpl$210, _tmpl$35, _tmpl$44, ContextMenu;
|
|
9390
9686
|
var init_context_menu = __esm({
|
|
9391
9687
|
"src/components/context-menu.tsx"() {
|
|
9392
9688
|
"use strict";
|
|
@@ -9409,8 +9705,8 @@ var init_context_menu = __esm({
|
|
|
9409
9705
|
init_get_tag_display();
|
|
9410
9706
|
init_resolve_action_enabled();
|
|
9411
9707
|
init_is_event_from_overlay();
|
|
9412
|
-
_tmpl$
|
|
9413
|
-
_tmpl$
|
|
9708
|
+
_tmpl$30 = /* @__PURE__ */ template(`<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5">`);
|
|
9709
|
+
_tmpl$210 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-context-menu class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-opacity duration-150 ease-out"style=z-index:2147483647;pointer-events:auto><div><div class="contain-layout shrink-0 flex items-center gap-1 pt-1.5 pb-1 w-fit h-fit px-2">`);
|
|
9414
9710
|
_tmpl$35 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
|
|
9415
9711
|
_tmpl$44 = /* @__PURE__ */ template(`<button data-react-grab-ignore-events class="contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer transition-colors hover:bg-black/5 text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default disabled:hover:bg-transparent"><span class="text-[13px] leading-4 font-sans font-medium text-black">`);
|
|
9416
9712
|
ContextMenu = (props) => {
|
|
@@ -9564,7 +9860,7 @@ var init_context_menu = __esm({
|
|
|
9564
9860
|
return isVisible();
|
|
9565
9861
|
},
|
|
9566
9862
|
get children() {
|
|
9567
|
-
var _el$ = _tmpl$
|
|
9863
|
+
var _el$ = _tmpl$210(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
9568
9864
|
_el$.$$contextmenu = handleMenuEvent;
|
|
9569
9865
|
_el$.$$click = handleMenuEvent;
|
|
9570
9866
|
_el$.$$mousedown = handleMenuEvent;
|
|
@@ -9604,7 +9900,7 @@ var init_context_menu = __esm({
|
|
|
9604
9900
|
}));
|
|
9605
9901
|
insert(_el$2, createComponent(BottomSection, {
|
|
9606
9902
|
get children() {
|
|
9607
|
-
var _el$4 = _tmpl$
|
|
9903
|
+
var _el$4 = _tmpl$30();
|
|
9608
9904
|
insert(_el$4, createComponent(For, {
|
|
9609
9905
|
get each() {
|
|
9610
9906
|
return menuItems();
|
|
@@ -9658,67 +9954,415 @@ var init_context_menu = __esm({
|
|
|
9658
9954
|
}
|
|
9659
9955
|
});
|
|
9660
9956
|
|
|
9661
|
-
// src/
|
|
9662
|
-
var
|
|
9663
|
-
var
|
|
9664
|
-
"src/
|
|
9957
|
+
// src/utils/clamp-to-viewport.ts
|
|
9958
|
+
var clampToViewport;
|
|
9959
|
+
var init_clamp_to_viewport = __esm({
|
|
9960
|
+
"src/utils/clamp-to-viewport.ts"() {
|
|
9961
|
+
"use strict";
|
|
9962
|
+
clampToViewport = (value, elementSize, viewportSize, padding) => Math.max(padding, Math.min(value, viewportSize - elementSize - padding));
|
|
9963
|
+
}
|
|
9964
|
+
});
|
|
9965
|
+
|
|
9966
|
+
// src/components/icons/icon-trash.tsx
|
|
9967
|
+
var _tmpl$31, IconTrash;
|
|
9968
|
+
var init_icon_trash = __esm({
|
|
9969
|
+
"src/components/icons/icon-trash.tsx"() {
|
|
9970
|
+
"use strict";
|
|
9971
|
+
init_web();
|
|
9972
|
+
init_web();
|
|
9973
|
+
init_web();
|
|
9974
|
+
_tmpl$31 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path fill-rule=evenodd clip-rule=evenodd d="M4.63751 20.1665L3.82444 6.75092L3.73431 5.06621C3.72513 4.89447 3.8619 4.75018 4.03388 4.75018H19.9945C20.1685 4.75018 20.306 4.89769 20.2938 5.07124L20.1756 6.75092L19.3625 20.1665C19.2745 21.618 18.0717 22.7502 16.6176 22.7502H7.38247C5.9283 22.7502 4.72548 21.618 4.63751 20.1665ZM8.74963 16.5002C8.74963 16.9144 9.08542 17.2502 9.49963 17.2502C9.91385 17.2502 10.2496 16.9144 10.2496 16.5002V10.5002C10.2496 10.086 9.91385 9.75018 9.49963 9.75018C9.08542 9.75018 8.74963 10.086 8.74963 10.5002V16.5002ZM14.4996 9.75018C14.9138 9.75018 15.2496 10.086 15.2496 10.5002V16.5002C15.2496 16.9144 14.9138 17.2502 14.4996 17.2502C14.0854 17.2502 13.7496 16.9144 13.7496 16.5002V10.5002C13.7496 10.086 14.0854 9.75018 14.4996 9.75018Z"></path><path fill-rule=evenodd clip-rule=evenodd d="M8.31879 2.46286C8.63394 1.7275 9.35702 1.2507 10.1571 1.2507H13.8383C14.6383 1.2507 15.3614 1.7275 15.6766 2.46286L16.6569 4.75034H19.2239C19.2903 4.75034 19.3523 4.75034 19.4102 4.7507H19.4637C19.4857 4.74973 19.5079 4.74972 19.5303 4.7507H20.9977C21.55 4.7507 21.9977 5.19842 21.9977 5.7507C21.9977 6.30299 21.55 6.7507 20.9977 6.7507H2.99768C2.4454 6.7507 1.99768 6.30299 1.99768 5.7507C1.99768 5.19842 2.4454 4.7507 2.99768 4.7507H4.46507C4.48746 4.74972 4.50968 4.74973 4.53167 4.7507H4.58469C4.6426 4.75034 4.70457 4.75034 4.77093 4.75034H7.33844L8.31879 2.46286ZM13.8903 3.37192L14.481 4.75034H9.5144L10.1052 3.37192C10.1367 3.29838 10.209 3.2507 10.289 3.2507L13.7064 3.2507C13.7864 3.2507 13.8587 3.29838 13.8903 3.37192Z">`);
|
|
9975
|
+
IconTrash = (props) => {
|
|
9976
|
+
const size = () => props.size ?? 14;
|
|
9977
|
+
return (() => {
|
|
9978
|
+
var _el$ = _tmpl$31();
|
|
9979
|
+
createRenderEffect((_p$) => {
|
|
9980
|
+
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
9981
|
+
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
9982
|
+
_v$2 !== _p$.t && setAttribute(_el$, "height", _p$.t = _v$2);
|
|
9983
|
+
_v$3 !== _p$.a && setAttribute(_el$, "class", _p$.a = _v$3);
|
|
9984
|
+
return _p$;
|
|
9985
|
+
}, {
|
|
9986
|
+
e: void 0,
|
|
9987
|
+
t: void 0,
|
|
9988
|
+
a: void 0
|
|
9989
|
+
});
|
|
9990
|
+
return _el$;
|
|
9991
|
+
})();
|
|
9992
|
+
};
|
|
9993
|
+
}
|
|
9994
|
+
});
|
|
9995
|
+
|
|
9996
|
+
// src/components/icons/icon-copy.tsx
|
|
9997
|
+
var _tmpl$36, IconCopy;
|
|
9998
|
+
var init_icon_copy = __esm({
|
|
9999
|
+
"src/components/icons/icon-copy.tsx"() {
|
|
10000
|
+
"use strict";
|
|
10001
|
+
init_web();
|
|
10002
|
+
init_web();
|
|
10003
|
+
init_web();
|
|
10004
|
+
_tmpl$36 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=currentColor><path d="M16.0549 8.25C17.4225 8.24998 18.5248 8.24996 19.3918 8.36652C20.2919 8.48754 21.0497 8.74643 21.6517 9.34835C22.2536 9.95027 22.5125 10.7081 22.6335 11.6083C22.75 12.4752 22.75 13.5775 22.75 14.9451V14.9451V16.0549V16.0549C22.75 17.4225 22.75 18.5248 22.6335 19.3918C22.5125 20.2919 22.2536 21.0497 21.6517 21.6517C21.0497 22.2536 20.2919 22.5125 19.3918 22.6335C18.5248 22.75 17.4225 22.75 16.0549 22.75H16.0549H14.9451H14.9451C13.5775 22.75 12.4752 22.75 11.6082 22.6335C10.7081 22.5125 9.95027 22.2536 9.34835 21.6516C8.74643 21.0497 8.48754 20.2919 8.36652 19.3918C8.24996 18.5248 8.24998 17.4225 8.25 16.0549V16.0549V14.9451V14.9451C8.24998 13.5775 8.24996 12.4752 8.36652 11.6082C8.48754 10.7081 8.74643 9.95027 9.34835 9.34835C9.95027 8.74643 10.7081 8.48754 11.6083 8.36652C12.4752 8.24996 13.5775 8.24998 14.9451 8.25H14.9451H16.0549H16.0549Z"></path><path d="M6.75 14.8569C6.74991 13.5627 6.74983 12.3758 6.8799 11.4084C7.0232 10.3425 7.36034 9.21504 8.28769 8.28769C9.21504 7.36034 10.3425 7.0232 11.4084 6.8799C12.3758 6.74983 13.5627 6.74991 14.8569 6.75L17.0931 6.75C17.3891 6.75 17.5371 6.75 17.6261 6.65419C17.7151 6.55838 17.7045 6.4142 17.6833 6.12584C17.6648 5.87546 17.6412 5.63892 17.6111 5.41544C17.4818 4.45589 17.2232 3.6585 16.6718 2.98663C16.4744 2.74612 16.2539 2.52558 16.0134 2.3282C15.3044 1.74638 14.4557 1.49055 13.4248 1.36868C12.4205 1.24998 11.1512 1.24999 9.54893 1.25H9.45109C7.84883 1.24999 6.57947 1.24998 5.57525 1.36868C4.54428 1.49054 3.69558 1.74638 2.98663 2.3282C2.74612 2.52558 2.52558 2.74612 2.3282 2.98663C1.74638 3.69558 1.49055 4.54428 1.36868 5.57525C1.24998 6.57947 1.24999 7.84882 1.25 9.45108V9.54891C1.24999 11.1512 1.24998 12.4205 1.36868 13.4247C1.49054 14.4557 1.74638 15.3044 2.3282 16.0134C2.52558 16.2539 2.74612 16.4744 2.98663 16.6718C3.6585 17.2232 4.45589 17.4818 5.41544 17.6111C5.63892 17.6412 5.87546 17.6648 6.12584 17.6833C6.4142 17.7045 6.55838 17.7151 6.65419 17.6261C6.75 17.5371 6.75 17.3891 6.75 17.0931V14.8569Z">`);
|
|
10005
|
+
IconCopy = (props) => {
|
|
10006
|
+
const size = () => props.size ?? 14;
|
|
10007
|
+
return (() => {
|
|
10008
|
+
var _el$ = _tmpl$36();
|
|
10009
|
+
createRenderEffect((_p$) => {
|
|
10010
|
+
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
10011
|
+
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
10012
|
+
_v$2 !== _p$.t && setAttribute(_el$, "height", _p$.t = _v$2);
|
|
10013
|
+
_v$3 !== _p$.a && setAttribute(_el$, "class", _p$.a = _v$3);
|
|
10014
|
+
return _p$;
|
|
10015
|
+
}, {
|
|
10016
|
+
e: void 0,
|
|
10017
|
+
t: void 0,
|
|
10018
|
+
a: void 0
|
|
10019
|
+
});
|
|
10020
|
+
return _el$;
|
|
10021
|
+
})();
|
|
10022
|
+
};
|
|
10023
|
+
}
|
|
10024
|
+
});
|
|
10025
|
+
|
|
10026
|
+
// src/components/recent-dropdown.tsx
|
|
10027
|
+
var _tmpl$37, _tmpl$211, _tmpl$38, _tmpl$45, DEFAULT_OFFSCREEN_POSITION2, ITEM_ACTION_CLASS, formatRelativeTime, RecentDropdown;
|
|
10028
|
+
var init_recent_dropdown = __esm({
|
|
10029
|
+
"src/components/recent-dropdown.tsx"() {
|
|
9665
10030
|
"use strict";
|
|
9666
10031
|
init_web();
|
|
9667
10032
|
init_web();
|
|
9668
10033
|
init_web();
|
|
9669
10034
|
init_web();
|
|
9670
10035
|
init_web();
|
|
10036
|
+
init_web();
|
|
10037
|
+
init_web();
|
|
10038
|
+
init_web();
|
|
9671
10039
|
init_solid();
|
|
9672
10040
|
init_constants();
|
|
9673
|
-
|
|
9674
|
-
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9679
|
-
|
|
9680
|
-
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
|
|
9685
|
-
|
|
9686
|
-
|
|
9687
|
-
|
|
9688
|
-
|
|
9689
|
-
|
|
9690
|
-
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
|
|
9708
|
-
|
|
9709
|
-
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
}
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
|
|
9717
|
-
|
|
10041
|
+
init_clamp_to_viewport();
|
|
10042
|
+
init_cn();
|
|
10043
|
+
init_is_event_from_overlay();
|
|
10044
|
+
init_icon_trash();
|
|
10045
|
+
init_icon_copy();
|
|
10046
|
+
init_tooltip();
|
|
10047
|
+
_tmpl$37 = /* @__PURE__ */ template(`<div class="flex items-center gap-[5px]"><div class=relative><button data-react-grab-ignore-events data-react-grab-recent-clear class="contain-layout shrink-0 flex items-center justify-center px-[3px] py-px rounded-sm bg-[#FEF2F2] cursor-pointer transition-all hover:bg-[#FEE2E2] press-scale h-[17px] text-[#B91C1C]"></button></div><div class=relative><button data-react-grab-ignore-events data-react-grab-recent-copy-all class="contain-layout shrink-0 flex items-center justify-center gap-1 px-[3px] py-px rounded-sm bg-white [border-width:0.5px] border-solid border-[#B3B3B3] cursor-pointer transition-all hover:bg-[#F5F5F5] press-scale h-[17px] text-black/60"><span class="text-[11px] font-sans text-black/50">\u21B5`);
|
|
10048
|
+
_tmpl$211 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-recent-dropdown class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-opacity duration-150 ease-out"style=z-index:2147483647;pointer-events:auto><div><div class="contain-layout shrink-0 flex items-center justify-between px-2 pt-1.5 pb-1"><span class="text-[11px] font-medium text-black/40">Recent</span></div><div class="min-h-0 [border-top-width:0.5px] border-t-solid border-t-[#D9D9D9] px-2 py-1.5"><div class="flex flex-col max-h-[240px] overflow-y-auto -mx-2 -my-1.5"style="scrollbar-color:rgba(0,0,0,0.15) transparent">`);
|
|
10049
|
+
_tmpl$38 = /* @__PURE__ */ template(`<span class="text-[11px] leading-3 font-sans text-black/40 truncate mt-0.5">`);
|
|
10050
|
+
_tmpl$45 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-recent-item class="group contain-layout flex items-start justify-between w-full px-2 py-1 cursor-pointer transition-colors hover:bg-black/5 focus-within:bg-black/5 text-left gap-2"tabindex=0><span class="flex flex-col min-w-0 flex-1"><span class="text-[12px] leading-4 font-sans font-medium text-black truncate"></span></span><span class="shrink-0 grid"><span class="text-[10px] font-sans text-black/25 group-hover:invisible group-focus-within:invisible [grid-area:1/1] flex items-center justify-end"></span><span class="invisible group-hover:visible group-focus-within:visible [grid-area:1/1] flex items-center justify-end gap-1.5"><button data-react-grab-ignore-events data-react-grab-recent-item-remove></button><button data-react-grab-ignore-events data-react-grab-recent-item-copy>`);
|
|
10051
|
+
DEFAULT_OFFSCREEN_POSITION2 = {
|
|
10052
|
+
left: -9999,
|
|
10053
|
+
top: -9999
|
|
10054
|
+
};
|
|
10055
|
+
ITEM_ACTION_CLASS = "flex items-center justify-center cursor-pointer text-black/25 transition-colors press-scale";
|
|
10056
|
+
formatRelativeTime = (timestamp) => {
|
|
10057
|
+
const elapsedSeconds = Math.floor((Date.now() - timestamp) / 1e3);
|
|
10058
|
+
if (elapsedSeconds < 60) return "now";
|
|
10059
|
+
const elapsedMinutes = Math.floor(elapsedSeconds / 60);
|
|
10060
|
+
if (elapsedMinutes < 60) return `${elapsedMinutes}m`;
|
|
10061
|
+
const elapsedHours = Math.floor(elapsedMinutes / 60);
|
|
10062
|
+
if (elapsedHours < 24) return `${elapsedHours}h`;
|
|
10063
|
+
return `${Math.floor(elapsedHours / 24)}d`;
|
|
10064
|
+
};
|
|
10065
|
+
RecentDropdown = (props) => {
|
|
10066
|
+
let containerRef;
|
|
10067
|
+
const [measuredWidth, setMeasuredWidth] = createSignal(0);
|
|
10068
|
+
const [measuredHeight, setMeasuredHeight] = createSignal(0);
|
|
10069
|
+
const [activeHeaderTooltip, setActiveHeaderTooltip] = createSignal(null);
|
|
10070
|
+
const isVisible = () => props.position !== null;
|
|
10071
|
+
const measureContainer = () => {
|
|
10072
|
+
if (containerRef) {
|
|
10073
|
+
const rect = containerRef.getBoundingClientRect();
|
|
10074
|
+
setMeasuredWidth(rect.width);
|
|
10075
|
+
setMeasuredHeight(rect.height);
|
|
10076
|
+
}
|
|
10077
|
+
};
|
|
10078
|
+
createEffect(() => {
|
|
10079
|
+
if (isVisible()) {
|
|
10080
|
+
requestAnimationFrame(measureContainer);
|
|
10081
|
+
}
|
|
10082
|
+
});
|
|
10083
|
+
const computedPosition = () => {
|
|
10084
|
+
const anchor = props.position;
|
|
10085
|
+
const width = measuredWidth();
|
|
10086
|
+
const height = measuredHeight();
|
|
10087
|
+
if (!anchor || width === 0 || height === 0) {
|
|
10088
|
+
return DEFAULT_OFFSCREEN_POSITION2;
|
|
10089
|
+
}
|
|
10090
|
+
const {
|
|
10091
|
+
edge
|
|
10092
|
+
} = anchor;
|
|
10093
|
+
let rawLeft;
|
|
10094
|
+
let rawTop;
|
|
10095
|
+
if (edge === "left" || edge === "right") {
|
|
10096
|
+
rawLeft = edge === "left" ? anchor.x + DROPDOWN_ANCHOR_GAP_PX : anchor.x - width - DROPDOWN_ANCHOR_GAP_PX;
|
|
10097
|
+
rawTop = anchor.y - height / 2;
|
|
10098
|
+
} else {
|
|
10099
|
+
rawLeft = anchor.x - anchor.toolbarWidth / 2;
|
|
10100
|
+
rawTop = edge === "top" ? anchor.y + DROPDOWN_ANCHOR_GAP_PX : anchor.y - height - DROPDOWN_ANCHOR_GAP_PX;
|
|
10101
|
+
}
|
|
10102
|
+
return {
|
|
10103
|
+
left: clampToViewport(rawLeft, width, window.innerWidth, DROPDOWN_VIEWPORT_PADDING_PX),
|
|
10104
|
+
top: clampToViewport(rawTop, height, window.innerHeight, DROPDOWN_VIEWPORT_PADDING_PX)
|
|
10105
|
+
};
|
|
10106
|
+
};
|
|
10107
|
+
const clampedMaxWidth = () => Math.min(DROPDOWN_MAX_WIDTH_PX, window.innerWidth - computedPosition().left - DROPDOWN_VIEWPORT_PADDING_PX);
|
|
10108
|
+
const clampedMaxHeight = () => window.innerHeight - computedPosition().top - DROPDOWN_VIEWPORT_PADDING_PX;
|
|
10109
|
+
const panelMinWidth = () => Math.max(DROPDOWN_MIN_WIDTH_PX, props.position?.toolbarWidth ?? 0);
|
|
10110
|
+
const handleMenuEvent = (event) => {
|
|
10111
|
+
if (event.type === "contextmenu") {
|
|
10112
|
+
event.preventDefault();
|
|
10113
|
+
}
|
|
10114
|
+
event.stopImmediatePropagation();
|
|
10115
|
+
};
|
|
10116
|
+
onMount(() => {
|
|
10117
|
+
measureContainer();
|
|
10118
|
+
const handleClickOutside = (event) => {
|
|
10119
|
+
if (!isVisible() || isEventFromOverlay(event, "data-react-grab-ignore-events")) return;
|
|
10120
|
+
if (event instanceof MouseEvent && event.button === 2) return;
|
|
10121
|
+
props.onDismiss?.();
|
|
10122
|
+
};
|
|
10123
|
+
const handleKeyDown = (event) => {
|
|
10124
|
+
if (!isVisible()) return;
|
|
10125
|
+
if (event.code === "Escape") {
|
|
10126
|
+
event.preventDefault();
|
|
10127
|
+
event.stopPropagation();
|
|
10128
|
+
props.onDismiss?.();
|
|
10129
|
+
}
|
|
10130
|
+
if (event.code === "Enter" && props.items.length > 0) {
|
|
10131
|
+
event.preventDefault();
|
|
10132
|
+
event.stopPropagation();
|
|
10133
|
+
props.onCopyAll?.();
|
|
10134
|
+
}
|
|
10135
|
+
};
|
|
10136
|
+
const frameId = requestAnimationFrame(() => {
|
|
10137
|
+
window.addEventListener("mousedown", handleClickOutside, {
|
|
10138
|
+
capture: true
|
|
10139
|
+
});
|
|
10140
|
+
window.addEventListener("touchstart", handleClickOutside, {
|
|
10141
|
+
capture: true
|
|
10142
|
+
});
|
|
10143
|
+
});
|
|
10144
|
+
window.addEventListener("keydown", handleKeyDown, {
|
|
10145
|
+
capture: true
|
|
10146
|
+
});
|
|
10147
|
+
onCleanup(() => {
|
|
10148
|
+
cancelAnimationFrame(frameId);
|
|
10149
|
+
window.removeEventListener("mousedown", handleClickOutside, {
|
|
10150
|
+
capture: true
|
|
10151
|
+
});
|
|
10152
|
+
window.removeEventListener("touchstart", handleClickOutside, {
|
|
10153
|
+
capture: true
|
|
10154
|
+
});
|
|
10155
|
+
window.removeEventListener("keydown", handleKeyDown, {
|
|
10156
|
+
capture: true
|
|
10157
|
+
});
|
|
10158
|
+
});
|
|
10159
|
+
});
|
|
10160
|
+
return createComponent(Show, {
|
|
10161
|
+
get when() {
|
|
10162
|
+
return isVisible();
|
|
10163
|
+
},
|
|
10164
|
+
get children() {
|
|
10165
|
+
var _el$ = _tmpl$211(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$1 = _el$3.nextSibling, _el$10 = _el$1.firstChild;
|
|
10166
|
+
_el$.$$contextmenu = handleMenuEvent;
|
|
10167
|
+
_el$.$$click = handleMenuEvent;
|
|
10168
|
+
_el$.$$mousedown = handleMenuEvent;
|
|
10169
|
+
_el$.$$pointerdown = handleMenuEvent;
|
|
10170
|
+
var _ref$ = containerRef;
|
|
10171
|
+
typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
|
|
10172
|
+
insert(_el$3, createComponent(Show, {
|
|
10173
|
+
get when() {
|
|
10174
|
+
return props.items.length > 0;
|
|
10175
|
+
},
|
|
10176
|
+
get children() {
|
|
10177
|
+
var _el$5 = _tmpl$37(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$6.nextSibling, _el$9 = _el$8.firstChild, _el$0 = _el$9.firstChild;
|
|
10178
|
+
_el$7.addEventListener("mouseleave", () => setActiveHeaderTooltip(null));
|
|
10179
|
+
_el$7.addEventListener("mouseenter", () => setActiveHeaderTooltip("clear"));
|
|
10180
|
+
_el$7.$$click = (event) => {
|
|
10181
|
+
event.stopPropagation();
|
|
10182
|
+
setActiveHeaderTooltip(null);
|
|
10183
|
+
props.onClearAll?.();
|
|
10184
|
+
};
|
|
10185
|
+
insert(_el$7, createComponent(IconTrash, {
|
|
10186
|
+
size: DROPDOWN_ICON_SIZE_PX
|
|
10187
|
+
}));
|
|
10188
|
+
insert(_el$6, createComponent(Tooltip, {
|
|
10189
|
+
get visible() {
|
|
10190
|
+
return activeHeaderTooltip() === "clear";
|
|
10191
|
+
},
|
|
10192
|
+
position: "top",
|
|
10193
|
+
children: "Clear all"
|
|
10194
|
+
}), null);
|
|
10195
|
+
_el$9.addEventListener("mouseleave", () => {
|
|
10196
|
+
setActiveHeaderTooltip(null);
|
|
10197
|
+
props.onCopyAllHover?.(false);
|
|
10198
|
+
});
|
|
10199
|
+
_el$9.addEventListener("mouseenter", () => {
|
|
10200
|
+
setActiveHeaderTooltip("copy");
|
|
10201
|
+
props.onCopyAllHover?.(true);
|
|
10202
|
+
});
|
|
10203
|
+
_el$9.$$click = (event) => {
|
|
10204
|
+
event.stopPropagation();
|
|
10205
|
+
setActiveHeaderTooltip(null);
|
|
10206
|
+
props.onCopyAll?.();
|
|
10207
|
+
};
|
|
10208
|
+
insert(_el$9, createComponent(IconCopy, {
|
|
10209
|
+
size: DROPDOWN_ICON_SIZE_PX
|
|
10210
|
+
}), _el$0);
|
|
10211
|
+
insert(_el$8, createComponent(Tooltip, {
|
|
10212
|
+
get visible() {
|
|
10213
|
+
return activeHeaderTooltip() === "copy";
|
|
10214
|
+
},
|
|
10215
|
+
position: "top",
|
|
10216
|
+
children: "Copy all"
|
|
10217
|
+
}), null);
|
|
10218
|
+
return _el$5;
|
|
10219
|
+
}
|
|
10220
|
+
}), null);
|
|
10221
|
+
insert(_el$10, createComponent(For, {
|
|
10222
|
+
get each() {
|
|
10223
|
+
return props.items;
|
|
10224
|
+
},
|
|
10225
|
+
children: (item) => (() => {
|
|
10226
|
+
var _el$11 = _tmpl$45(), _el$12 = _el$11.firstChild, _el$13 = _el$12.firstChild, _el$15 = _el$12.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.nextSibling, _el$18 = _el$17.firstChild, _el$19 = _el$18.nextSibling;
|
|
10227
|
+
_el$11.addEventListener("mouseleave", () => props.onItemHover?.(null));
|
|
10228
|
+
_el$11.addEventListener("mouseenter", () => props.onItemHover?.(item.id));
|
|
10229
|
+
_el$11.$$keydown = (event) => {
|
|
10230
|
+
if (event.code === "Space" && event.currentTarget === event.target) {
|
|
10231
|
+
event.preventDefault();
|
|
10232
|
+
event.stopPropagation();
|
|
10233
|
+
props.onSelectItem?.(item);
|
|
10234
|
+
}
|
|
10235
|
+
};
|
|
10236
|
+
_el$11.$$click = (event) => {
|
|
10237
|
+
event.stopPropagation();
|
|
10238
|
+
props.onSelectItem?.(item);
|
|
10239
|
+
};
|
|
10240
|
+
_el$11.$$pointerdown = (event) => event.stopPropagation();
|
|
10241
|
+
insert(_el$13, () => item.componentName ?? item.tagName);
|
|
10242
|
+
insert(_el$12, createComponent(Show, {
|
|
10243
|
+
get when() {
|
|
10244
|
+
return item.commentText;
|
|
10245
|
+
},
|
|
10246
|
+
get children() {
|
|
10247
|
+
var _el$14 = _tmpl$38();
|
|
10248
|
+
insert(_el$14, () => item.commentText);
|
|
10249
|
+
return _el$14;
|
|
10250
|
+
}
|
|
10251
|
+
}), null);
|
|
10252
|
+
insert(_el$16, () => formatRelativeTime(item.timestamp));
|
|
10253
|
+
_el$18.$$click = (event) => {
|
|
10254
|
+
event.stopPropagation();
|
|
10255
|
+
props.onRemoveItem?.(item);
|
|
10256
|
+
};
|
|
10257
|
+
insert(_el$18, createComponent(IconTrash, {
|
|
10258
|
+
size: DROPDOWN_ICON_SIZE_PX
|
|
10259
|
+
}));
|
|
10260
|
+
_el$19.$$click = (event) => {
|
|
10261
|
+
event.stopPropagation();
|
|
10262
|
+
props.onCopyItem?.(item);
|
|
10263
|
+
};
|
|
10264
|
+
insert(_el$19, createComponent(IconCopy, {
|
|
10265
|
+
size: DROPDOWN_ICON_SIZE_PX
|
|
10266
|
+
}));
|
|
10267
|
+
createRenderEffect((_p$) => {
|
|
10268
|
+
var _v$7 = cn(ITEM_ACTION_CLASS, "hover:text-[#B91C1C]"), _v$8 = cn(ITEM_ACTION_CLASS, "hover:text-black/60");
|
|
10269
|
+
_v$7 !== _p$.e && className(_el$18, _p$.e = _v$7);
|
|
10270
|
+
_v$8 !== _p$.t && className(_el$19, _p$.t = _v$8);
|
|
10271
|
+
return _p$;
|
|
10272
|
+
}, {
|
|
10273
|
+
e: void 0,
|
|
10274
|
+
t: void 0
|
|
10275
|
+
});
|
|
10276
|
+
return _el$11;
|
|
10277
|
+
})()
|
|
10278
|
+
}));
|
|
10279
|
+
createRenderEffect((_p$) => {
|
|
10280
|
+
var _v$ = `${computedPosition().top}px`, _v$2 = `${computedPosition().left}px`, _v$3 = cn("contain-layout flex flex-col rounded-[10px] antialiased w-fit h-fit overflow-hidden [font-synthesis:none] [corner-shape:superellipse(1.25)]", PANEL_STYLES), _v$4 = `${panelMinWidth()}px`, _v$5 = `${clampedMaxWidth()}px`, _v$6 = `${clampedMaxHeight()}px`;
|
|
10281
|
+
_v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
|
|
10282
|
+
_v$2 !== _p$.t && setStyleProperty(_el$, "left", _p$.t = _v$2);
|
|
10283
|
+
_v$3 !== _p$.a && className(_el$2, _p$.a = _v$3);
|
|
10284
|
+
_v$4 !== _p$.o && setStyleProperty(_el$2, "min-width", _p$.o = _v$4);
|
|
10285
|
+
_v$5 !== _p$.i && setStyleProperty(_el$2, "max-width", _p$.i = _v$5);
|
|
10286
|
+
_v$6 !== _p$.n && setStyleProperty(_el$2, "max-height", _p$.n = _v$6);
|
|
10287
|
+
return _p$;
|
|
10288
|
+
}, {
|
|
10289
|
+
e: void 0,
|
|
10290
|
+
t: void 0,
|
|
10291
|
+
a: void 0,
|
|
10292
|
+
o: void 0,
|
|
10293
|
+
i: void 0,
|
|
10294
|
+
n: void 0
|
|
10295
|
+
});
|
|
10296
|
+
return _el$;
|
|
10297
|
+
}
|
|
10298
|
+
});
|
|
10299
|
+
};
|
|
10300
|
+
delegateEvents(["pointerdown", "mousedown", "click", "contextmenu", "keydown"]);
|
|
10301
|
+
}
|
|
10302
|
+
});
|
|
10303
|
+
|
|
10304
|
+
// src/components/renderer.tsx
|
|
10305
|
+
var _tmpl$39, ReactGrabRenderer;
|
|
10306
|
+
var init_renderer = __esm({
|
|
10307
|
+
"src/components/renderer.tsx"() {
|
|
10308
|
+
"use strict";
|
|
10309
|
+
init_web();
|
|
10310
|
+
init_web();
|
|
10311
|
+
init_web();
|
|
10312
|
+
init_web();
|
|
10313
|
+
init_web();
|
|
10314
|
+
init_solid();
|
|
10315
|
+
init_constants();
|
|
10316
|
+
init_build_open_file_url();
|
|
10317
|
+
init_overlay_canvas();
|
|
10318
|
+
init_selection_label();
|
|
10319
|
+
init_toolbar();
|
|
10320
|
+
init_context_menu();
|
|
10321
|
+
init_recent_dropdown();
|
|
10322
|
+
_tmpl$39 = /* @__PURE__ */ template(`<div style="position:fixed;top:0;right:0;bottom:0;left:0;pointer-events:none;transition:opacity 100ms ease-out;will-change:opacity;contain:strict;transform:translateZ(0)">`);
|
|
10323
|
+
ReactGrabRenderer = (props) => {
|
|
10324
|
+
return [createComponent(OverlayCanvas, {
|
|
10325
|
+
get crosshairVisible() {
|
|
10326
|
+
return props.crosshairVisible;
|
|
10327
|
+
},
|
|
10328
|
+
get mouseX() {
|
|
10329
|
+
return props.mouseX;
|
|
10330
|
+
},
|
|
10331
|
+
get mouseY() {
|
|
10332
|
+
return props.mouseY;
|
|
10333
|
+
},
|
|
10334
|
+
get selectionVisible() {
|
|
10335
|
+
return props.selectionVisible;
|
|
10336
|
+
},
|
|
10337
|
+
get selectionBounds() {
|
|
10338
|
+
return props.selectionBounds;
|
|
10339
|
+
},
|
|
10340
|
+
get selectionBoundsMultiple() {
|
|
10341
|
+
return props.selectionBoundsMultiple;
|
|
10342
|
+
},
|
|
10343
|
+
get selectionShouldSnap() {
|
|
10344
|
+
return props.selectionShouldSnap;
|
|
10345
|
+
},
|
|
10346
|
+
get selectionIsFading() {
|
|
10347
|
+
return props.selectionLabelStatus === "fading";
|
|
10348
|
+
},
|
|
10349
|
+
get dragVisible() {
|
|
10350
|
+
return props.dragVisible;
|
|
10351
|
+
},
|
|
10352
|
+
get dragBounds() {
|
|
10353
|
+
return props.dragBounds;
|
|
10354
|
+
},
|
|
10355
|
+
get grabbedBoxes() {
|
|
10356
|
+
return props.grabbedBoxes;
|
|
10357
|
+
},
|
|
10358
|
+
get agentSessions() {
|
|
10359
|
+
return props.agentSessions;
|
|
10360
|
+
},
|
|
10361
|
+
get labelInstances() {
|
|
9718
10362
|
return props.labelInstances;
|
|
9719
10363
|
}
|
|
9720
10364
|
}), (() => {
|
|
9721
|
-
var _el$ = _tmpl$
|
|
10365
|
+
var _el$ = _tmpl$39();
|
|
9722
10366
|
setStyleProperty(_el$, "z-index", Z_INDEX_OVERLAY_CANVAS);
|
|
9723
10367
|
setStyleProperty(_el$, "box-shadow", `inset 0 0 ${FROZEN_GLOW_EDGE_PX}px ${FROZEN_GLOW_COLOR}`);
|
|
9724
10368
|
createRenderEffect((_$p) => setStyleProperty(_el$, "opacity", props.isFrozen ? 1 : 0));
|
|
@@ -9899,9 +10543,24 @@ var init_renderer = __esm({
|
|
|
9899
10543
|
get status() {
|
|
9900
10544
|
return instance().status;
|
|
9901
10545
|
},
|
|
10546
|
+
get statusText() {
|
|
10547
|
+
return instance().statusText;
|
|
10548
|
+
},
|
|
10549
|
+
get hasAgent() {
|
|
10550
|
+
return Boolean(instance().statusText);
|
|
10551
|
+
},
|
|
10552
|
+
get isPromptMode() {
|
|
10553
|
+
return instance().isPromptMode;
|
|
10554
|
+
},
|
|
10555
|
+
get inputValue() {
|
|
10556
|
+
return instance().inputValue;
|
|
10557
|
+
},
|
|
9902
10558
|
get error() {
|
|
9903
10559
|
return instance().errorMessage;
|
|
9904
10560
|
},
|
|
10561
|
+
get hideArrow() {
|
|
10562
|
+
return instance().hideArrow;
|
|
10563
|
+
},
|
|
9905
10564
|
get onShowContextMenu() {
|
|
9906
10565
|
return (instance().status === "copied" || instance().status === "fading") && instance().element && (document.body ?? document.documentElement).contains(instance().element) ? () => props.onShowContextMenuInstance?.(instance().id) : void 0;
|
|
9907
10566
|
},
|
|
@@ -9945,6 +10604,21 @@ var init_renderer = __esm({
|
|
|
9945
10604
|
},
|
|
9946
10605
|
get onSelectHoverChange() {
|
|
9947
10606
|
return props.onToolbarSelectHoverChange;
|
|
10607
|
+
},
|
|
10608
|
+
get onContainerRef() {
|
|
10609
|
+
return props.onToolbarRef;
|
|
10610
|
+
},
|
|
10611
|
+
get recentItemCount() {
|
|
10612
|
+
return props.recentItemCount;
|
|
10613
|
+
},
|
|
10614
|
+
get hasUnreadRecentItems() {
|
|
10615
|
+
return props.hasUnreadRecentItems;
|
|
10616
|
+
},
|
|
10617
|
+
get onToggleRecent() {
|
|
10618
|
+
return props.onToggleRecent;
|
|
10619
|
+
},
|
|
10620
|
+
get onRecentButtonHover() {
|
|
10621
|
+
return props.onRecentButtonHover;
|
|
9948
10622
|
}
|
|
9949
10623
|
});
|
|
9950
10624
|
}
|
|
@@ -9978,6 +10652,37 @@ var init_renderer = __esm({
|
|
|
9978
10652
|
return props.onContextMenuHide ?? (() => {
|
|
9979
10653
|
});
|
|
9980
10654
|
}
|
|
10655
|
+
}), createComponent(RecentDropdown, {
|
|
10656
|
+
get position() {
|
|
10657
|
+
return props.recentDropdownPosition ?? null;
|
|
10658
|
+
},
|
|
10659
|
+
get items() {
|
|
10660
|
+
return props.recentItems ?? [];
|
|
10661
|
+
},
|
|
10662
|
+
get onSelectItem() {
|
|
10663
|
+
return props.onRecentItemSelect;
|
|
10664
|
+
},
|
|
10665
|
+
get onRemoveItem() {
|
|
10666
|
+
return props.onRecentItemRemove;
|
|
10667
|
+
},
|
|
10668
|
+
get onCopyItem() {
|
|
10669
|
+
return props.onRecentItemCopy;
|
|
10670
|
+
},
|
|
10671
|
+
get onItemHover() {
|
|
10672
|
+
return props.onRecentItemHover;
|
|
10673
|
+
},
|
|
10674
|
+
get onCopyAll() {
|
|
10675
|
+
return props.onRecentCopyAll;
|
|
10676
|
+
},
|
|
10677
|
+
get onCopyAllHover() {
|
|
10678
|
+
return props.onRecentCopyAllHover;
|
|
10679
|
+
},
|
|
10680
|
+
get onClearAll() {
|
|
10681
|
+
return props.onRecentClear;
|
|
10682
|
+
},
|
|
10683
|
+
get onDismiss() {
|
|
10684
|
+
return props.onRecentDismiss;
|
|
10685
|
+
}
|
|
9981
10686
|
})];
|
|
9982
10687
|
};
|
|
9983
10688
|
}
|
|
@@ -11034,20 +11739,18 @@ var init_events = __esm({
|
|
|
11034
11739
|
});
|
|
11035
11740
|
|
|
11036
11741
|
// src/utils/copy-content.ts
|
|
11037
|
-
var LEXICAL_EDITOR_MIME_TYPE, REACT_GRAB_MIME_TYPE, generateUuid, createMentionNode, createTextNode,
|
|
11742
|
+
var LEXICAL_EDITOR_MIME_TYPE, REACT_GRAB_MIME_TYPE, generateUuid, createMentionNode, createTextNode, escapeHtml, createClipboardData, copyContent;
|
|
11038
11743
|
var init_copy_content = __esm({
|
|
11039
11744
|
"src/utils/copy-content.ts"() {
|
|
11040
11745
|
"use strict";
|
|
11041
11746
|
init_constants();
|
|
11042
11747
|
LEXICAL_EDITOR_MIME_TYPE = "application/x-lexical-editor";
|
|
11043
11748
|
REACT_GRAB_MIME_TYPE = "application/x-react-grab";
|
|
11044
|
-
generateUuid = () => {
|
|
11045
|
-
|
|
11046
|
-
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
});
|
|
11050
|
-
};
|
|
11749
|
+
generateUuid = () => "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (character) => {
|
|
11750
|
+
const randomNibble = Math.random() * 16 | 0;
|
|
11751
|
+
const hexValue = character === "x" ? randomNibble : randomNibble & 3 | 8;
|
|
11752
|
+
return hexValue.toString(16);
|
|
11753
|
+
});
|
|
11051
11754
|
createMentionNode = (displayName, mentionKey, typeaheadType, metadata) => ({
|
|
11052
11755
|
detail: 1,
|
|
11053
11756
|
format: 0,
|
|
@@ -11071,7 +11774,8 @@ var init_copy_content = __esm({
|
|
|
11071
11774
|
type: "text",
|
|
11072
11775
|
version: 1
|
|
11073
11776
|
});
|
|
11074
|
-
|
|
11777
|
+
escapeHtml = (text) => text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
11778
|
+
createClipboardData = (content, elementName) => {
|
|
11075
11779
|
const mentionKey = String(Math.floor(Math.random() * 1e4));
|
|
11076
11780
|
const namespaceUuid = generateUuid();
|
|
11077
11781
|
const displayName = `<${elementName}>`;
|
|
@@ -11094,16 +11798,12 @@ var init_copy_content = __esm({
|
|
|
11094
11798
|
selection: { type: 0 },
|
|
11095
11799
|
selectedOption
|
|
11096
11800
|
};
|
|
11097
|
-
const escapedMentionMetadata = JSON.stringify(mentionMetadata).replace(
|
|
11098
|
-
/"/g,
|
|
11099
|
-
"""
|
|
11100
|
-
);
|
|
11101
11801
|
return {
|
|
11102
11802
|
plainText: `@${displayName}
|
|
11103
11803
|
|
|
11104
11804
|
${content}
|
|
11105
11805
|
`,
|
|
11106
|
-
htmlContent: `<meta charset='utf-8'><
|
|
11806
|
+
htmlContent: `<meta charset='utf-8'><pre><code>${escapeHtml(content)}</code></pre>`,
|
|
11107
11807
|
lexicalData: JSON.stringify({
|
|
11108
11808
|
namespace: `chat-input${namespaceUuid}-pane`,
|
|
11109
11809
|
nodes: [
|
|
@@ -11122,7 +11822,7 @@ ${content}`)
|
|
|
11122
11822
|
};
|
|
11123
11823
|
copyContent = (content, options) => {
|
|
11124
11824
|
const elementName = options?.name ?? "div";
|
|
11125
|
-
const { plainText, htmlContent, lexicalData } =
|
|
11825
|
+
const { plainText, htmlContent, lexicalData } = createClipboardData(
|
|
11126
11826
|
content,
|
|
11127
11827
|
elementName
|
|
11128
11828
|
);
|
|
@@ -11181,6 +11881,19 @@ var init_generate_snippet = __esm({
|
|
|
11181
11881
|
}
|
|
11182
11882
|
});
|
|
11183
11883
|
|
|
11884
|
+
// src/utils/join-snippets.ts
|
|
11885
|
+
var joinSnippets;
|
|
11886
|
+
var init_join_snippets = __esm({
|
|
11887
|
+
"src/utils/join-snippets.ts"() {
|
|
11888
|
+
"use strict";
|
|
11889
|
+
joinSnippets = (snippets) => {
|
|
11890
|
+
if (snippets.length <= 1) return snippets[0] ?? "";
|
|
11891
|
+
return snippets.map((snippet, index) => `[${index + 1}]
|
|
11892
|
+
${snippet}`).join("\n\n");
|
|
11893
|
+
};
|
|
11894
|
+
}
|
|
11895
|
+
});
|
|
11896
|
+
|
|
11184
11897
|
// src/core/copy.ts
|
|
11185
11898
|
var tryCopyWithFallback;
|
|
11186
11899
|
var init_copy = __esm({
|
|
@@ -11188,6 +11901,7 @@ var init_copy = __esm({
|
|
|
11188
11901
|
"use strict";
|
|
11189
11902
|
init_copy_content();
|
|
11190
11903
|
init_generate_snippet();
|
|
11904
|
+
init_join_snippets();
|
|
11191
11905
|
tryCopyWithFallback = async (options, hooks, elements, extraPrompt) => {
|
|
11192
11906
|
let didCopy = false;
|
|
11193
11907
|
let copiedContent = "";
|
|
@@ -11205,7 +11919,8 @@ var init_copy = __esm({
|
|
|
11205
11919
|
(snippet, index) => snippet.trim() ? hooks.transformSnippet(snippet, elements[index]) : Promise.resolve("")
|
|
11206
11920
|
)
|
|
11207
11921
|
);
|
|
11208
|
-
|
|
11922
|
+
const nonEmptySnippets = transformedSnippets.filter((s3) => s3.trim());
|
|
11923
|
+
generatedContent = joinSnippets(nonEmptySnippets);
|
|
11209
11924
|
}
|
|
11210
11925
|
if (generatedContent.trim()) {
|
|
11211
11926
|
const transformedContent = await hooks.transformCopyContent(
|
|
@@ -11815,44 +12530,6 @@ var init_delay = __esm({
|
|
|
11815
12530
|
}
|
|
11816
12531
|
});
|
|
11817
12532
|
|
|
11818
|
-
// src/utils/create-scroll-cycler.ts
|
|
11819
|
-
var createScrollCycler;
|
|
11820
|
-
var init_create_scroll_cycler = __esm({
|
|
11821
|
-
"src/utils/create-scroll-cycler.ts"() {
|
|
11822
|
-
"use strict";
|
|
11823
|
-
createScrollCycler = (options) => {
|
|
11824
|
-
const { thresholdPx, throttleMs, lineHeightPx, onStep } = options;
|
|
11825
|
-
let accumulatedDelta = 0;
|
|
11826
|
-
let currentDirection = null;
|
|
11827
|
-
let lastStepTimestamp = 0;
|
|
11828
|
-
const handleWheel = (event) => {
|
|
11829
|
-
const primaryAxisDelta = Math.abs(event.deltaY) >= Math.abs(event.deltaX) ? event.deltaY : event.deltaX;
|
|
11830
|
-
if (primaryAxisDelta === 0) return;
|
|
11831
|
-
let normalizedDelta = primaryAxisDelta;
|
|
11832
|
-
if (event.deltaMode === 1) {
|
|
11833
|
-
normalizedDelta *= lineHeightPx;
|
|
11834
|
-
} else if (event.deltaMode === 2) {
|
|
11835
|
-
normalizedDelta *= window.innerHeight;
|
|
11836
|
-
}
|
|
11837
|
-
const direction = normalizedDelta > 0 ? 1 : -1;
|
|
11838
|
-
if (currentDirection !== direction) {
|
|
11839
|
-
currentDirection = direction;
|
|
11840
|
-
accumulatedDelta = 0;
|
|
11841
|
-
}
|
|
11842
|
-
accumulatedDelta += Math.abs(normalizedDelta);
|
|
11843
|
-
const now = Date.now();
|
|
11844
|
-
if (now - lastStepTimestamp < throttleMs || accumulatedDelta < thresholdPx) {
|
|
11845
|
-
return;
|
|
11846
|
-
}
|
|
11847
|
-
accumulatedDelta -= thresholdPx;
|
|
11848
|
-
lastStepTimestamp = now;
|
|
11849
|
-
onStep(direction < 0 ? "backward" : "forward");
|
|
11850
|
-
};
|
|
11851
|
-
return { handleWheel };
|
|
11852
|
-
};
|
|
11853
|
-
}
|
|
11854
|
-
});
|
|
11855
|
-
|
|
11856
12533
|
// src/core/theme.ts
|
|
11857
12534
|
var DEFAULT_THEME, mergeThemeWithBase, deepMergeTheme;
|
|
11858
12535
|
var init_theme = __esm({
|
|
@@ -12941,7 +13618,7 @@ var init_log_intro = __esm({
|
|
|
12941
13618
|
init_is_extension_context();
|
|
12942
13619
|
logIntro = () => {
|
|
12943
13620
|
try {
|
|
12944
|
-
const version = "0.1.
|
|
13621
|
+
const version = "0.1.14";
|
|
12945
13622
|
const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
|
|
12946
13623
|
console.log(
|
|
12947
13624
|
`%cReact Grab${version ? ` v${version}` : ""}%c
|
|
@@ -13183,6 +13860,53 @@ var init_comment = __esm({
|
|
|
13183
13860
|
}
|
|
13184
13861
|
});
|
|
13185
13862
|
|
|
13863
|
+
// src/utils/recent-storage.ts
|
|
13864
|
+
var SESSION_STORAGE_KEY, loadFromSessionStorage, saveToSessionStorage, recentItems, generateRecentItemId, loadRecent, addRecentItem, removeRecentItem, clearRecent;
|
|
13865
|
+
var init_recent_storage = __esm({
|
|
13866
|
+
"src/utils/recent-storage.ts"() {
|
|
13867
|
+
"use strict";
|
|
13868
|
+
init_constants();
|
|
13869
|
+
SESSION_STORAGE_KEY = "react-grab-recent-items";
|
|
13870
|
+
loadFromSessionStorage = () => {
|
|
13871
|
+
try {
|
|
13872
|
+
const serializedRecentItems = sessionStorage.getItem(SESSION_STORAGE_KEY);
|
|
13873
|
+
if (!serializedRecentItems) return [];
|
|
13874
|
+
return JSON.parse(serializedRecentItems);
|
|
13875
|
+
} catch {
|
|
13876
|
+
return [];
|
|
13877
|
+
}
|
|
13878
|
+
};
|
|
13879
|
+
saveToSessionStorage = (items) => {
|
|
13880
|
+
try {
|
|
13881
|
+
sessionStorage.setItem(SESSION_STORAGE_KEY, JSON.stringify(items));
|
|
13882
|
+
} catch {
|
|
13883
|
+
}
|
|
13884
|
+
};
|
|
13885
|
+
recentItems = loadFromSessionStorage();
|
|
13886
|
+
generateRecentItemId = () => `recent-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
13887
|
+
loadRecent = () => recentItems;
|
|
13888
|
+
addRecentItem = (item) => {
|
|
13889
|
+
const newItem = {
|
|
13890
|
+
...item,
|
|
13891
|
+
id: generateRecentItemId()
|
|
13892
|
+
};
|
|
13893
|
+
recentItems = [newItem, ...recentItems].slice(0, MAX_RECENT_ITEMS);
|
|
13894
|
+
saveToSessionStorage(recentItems);
|
|
13895
|
+
return recentItems;
|
|
13896
|
+
};
|
|
13897
|
+
removeRecentItem = (itemId) => {
|
|
13898
|
+
recentItems = recentItems.filter((item) => item.id !== itemId);
|
|
13899
|
+
saveToSessionStorage(recentItems);
|
|
13900
|
+
return recentItems;
|
|
13901
|
+
};
|
|
13902
|
+
clearRecent = () => {
|
|
13903
|
+
recentItems = [];
|
|
13904
|
+
saveToSessionStorage(recentItems);
|
|
13905
|
+
return recentItems;
|
|
13906
|
+
};
|
|
13907
|
+
}
|
|
13908
|
+
});
|
|
13909
|
+
|
|
13186
13910
|
// src/core/index.tsx
|
|
13187
13911
|
var core_exports = {};
|
|
13188
13912
|
__export(core_exports, {
|
|
@@ -13232,7 +13956,6 @@ var init_core = __esm({
|
|
|
13232
13956
|
init_is_screenshot_supported();
|
|
13233
13957
|
init_delay();
|
|
13234
13958
|
init_resolve_action_enabled();
|
|
13235
|
-
init_create_scroll_cycler();
|
|
13236
13959
|
init_theme();
|
|
13237
13960
|
init_plugin_registry();
|
|
13238
13961
|
init_agent();
|
|
@@ -13253,6 +13976,9 @@ var init_core = __esm({
|
|
|
13253
13976
|
init_freeze_animations();
|
|
13254
13977
|
init_freeze_pseudo_states();
|
|
13255
13978
|
init_freeze_updates();
|
|
13979
|
+
init_recent_storage();
|
|
13980
|
+
init_copy_content();
|
|
13981
|
+
init_join_snippets();
|
|
13256
13982
|
init_context();
|
|
13257
13983
|
init_dist();
|
|
13258
13984
|
init_theme();
|
|
@@ -13328,6 +14054,13 @@ var init_core = __esm({
|
|
|
13328
14054
|
const [toolbarShakeCount, setToolbarShakeCount] = createSignal(0);
|
|
13329
14055
|
const [currentToolbarState, setCurrentToolbarState] = createSignal(savedToolbarState);
|
|
13330
14056
|
const [isToolbarSelectHovered, setIsToolbarSelectHovered] = createSignal(false);
|
|
14057
|
+
const [recentItems2, setRecentItems] = createSignal(loadRecent());
|
|
14058
|
+
const [recentDropdownPosition, setRecentDropdownPosition] = createSignal(null);
|
|
14059
|
+
let toolbarElement;
|
|
14060
|
+
let recentPositionFrameId = null;
|
|
14061
|
+
const recentElementMap = /* @__PURE__ */ new Map();
|
|
14062
|
+
const [hasUnreadRecentItems, setHasUnreadRecentItems] = createSignal(false);
|
|
14063
|
+
let recentHoverPreviews = [];
|
|
13331
14064
|
const pendingAbortSessionId = createMemo(() => store.pendingAbortSessionId);
|
|
13332
14065
|
const hasAgentProvider = createMemo(() => store.hasAgentProvider);
|
|
13333
14066
|
const clearHoldTimer = () => {
|
|
@@ -13383,14 +14116,9 @@ var init_core = __esm({
|
|
|
13383
14116
|
}
|
|
13384
14117
|
previouslyHoldingKeys = currentlyHolding;
|
|
13385
14118
|
});
|
|
13386
|
-
const elementInputCache = /* @__PURE__ */ new WeakMap();
|
|
13387
|
-
const loadCachedInput = (element) => {
|
|
13388
|
-
const cachedInput = elementInputCache.get(element);
|
|
13389
|
-
actions.setInputText(cachedInput ?? "");
|
|
13390
|
-
};
|
|
13391
14119
|
const preparePromptMode = (element, positionX, positionY) => {
|
|
13392
14120
|
setCopyStartPosition(element, positionX, positionY);
|
|
13393
|
-
|
|
14121
|
+
actions.clearInputText();
|
|
13394
14122
|
};
|
|
13395
14123
|
const activatePromptMode = () => {
|
|
13396
14124
|
const element = store.frozenElement || targetElement();
|
|
@@ -13430,6 +14158,7 @@ var init_core = __esm({
|
|
|
13430
14158
|
let copyWaitingForConfirmation = false;
|
|
13431
14159
|
let holdTimerFiredWaitingForConfirmation = false;
|
|
13432
14160
|
let isScreenshotInProgress = false;
|
|
14161
|
+
let lastWindowFocusTimestamp = 0;
|
|
13433
14162
|
let inToggleFeedbackPeriod = false;
|
|
13434
14163
|
let toggleFeedbackTimerId = null;
|
|
13435
14164
|
let actionCycleIdleTimeoutId = null;
|
|
@@ -13506,25 +14235,27 @@ var init_core = __esm({
|
|
|
13506
14235
|
}
|
|
13507
14236
|
}));
|
|
13508
14237
|
};
|
|
13509
|
-
const createLabelInstance = (bounds, tagName, componentName, status,
|
|
14238
|
+
const createLabelInstance = (bounds, tagName, componentName, status, options) => {
|
|
13510
14239
|
actions.clearLabelInstances();
|
|
13511
14240
|
const instanceId = `label-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
13512
14241
|
const boundsCenterX = bounds.x + bounds.width / 2;
|
|
13513
14242
|
const boundsHalfWidth = bounds.width / 2;
|
|
14243
|
+
const mouseX = options?.mouseX;
|
|
13514
14244
|
const mouseXOffset = mouseX !== void 0 ? mouseX - boundsCenterX : void 0;
|
|
13515
14245
|
const instance = {
|
|
13516
14246
|
id: instanceId,
|
|
13517
14247
|
bounds,
|
|
13518
|
-
boundsMultiple,
|
|
14248
|
+
boundsMultiple: options?.boundsMultiple,
|
|
13519
14249
|
tagName,
|
|
13520
14250
|
componentName,
|
|
13521
14251
|
status,
|
|
13522
14252
|
createdAt: Date.now(),
|
|
13523
|
-
element,
|
|
13524
|
-
elements,
|
|
14253
|
+
element: options?.element,
|
|
14254
|
+
elements: options?.elements,
|
|
13525
14255
|
mouseX,
|
|
13526
14256
|
mouseXOffsetFromCenter: mouseXOffset,
|
|
13527
|
-
mouseXOffsetRatio: mouseXOffset !== void 0 && boundsHalfWidth > 0 ? mouseXOffset / boundsHalfWidth : void 0
|
|
14257
|
+
mouseXOffsetRatio: mouseXOffset !== void 0 && boundsHalfWidth > 0 ? mouseXOffset / boundsHalfWidth : void 0,
|
|
14258
|
+
hideArrow: options?.hideArrow
|
|
13528
14259
|
};
|
|
13529
14260
|
actions.addLabelInstance(instance);
|
|
13530
14261
|
return instanceId;
|
|
@@ -13568,7 +14299,11 @@ var init_core = __esm({
|
|
|
13568
14299
|
const executeCopyOperation = async (positionX, positionY, operation, bounds, tagName, componentName, element, shouldDeactivateAfter, elements) => {
|
|
13569
14300
|
inToggleFeedbackPeriod = false;
|
|
13570
14301
|
actions.startCopy();
|
|
13571
|
-
const instanceId = bounds && tagName ? createLabelInstance(bounds, tagName, componentName, "copying",
|
|
14302
|
+
const instanceId = bounds && tagName ? createLabelInstance(bounds, tagName, componentName, "copying", {
|
|
14303
|
+
element,
|
|
14304
|
+
mouseX: positionX,
|
|
14305
|
+
elements
|
|
14306
|
+
}) : null;
|
|
13572
14307
|
await operation().finally(() => {
|
|
13573
14308
|
actions.completeCopy(element);
|
|
13574
14309
|
if (instanceId) {
|
|
@@ -13590,9 +14325,9 @@ var init_core = __esm({
|
|
|
13590
14325
|
}
|
|
13591
14326
|
});
|
|
13592
14327
|
};
|
|
13593
|
-
const copyWithFallback = (elements, extraPrompt) => {
|
|
14328
|
+
const copyWithFallback = (elements, extraPrompt, resolvedComponentName2) => {
|
|
13594
14329
|
const firstElement = elements[0];
|
|
13595
|
-
const componentName = firstElement ? getComponentDisplayName(firstElement) : null;
|
|
14330
|
+
const componentName = resolvedComponentName2 ?? (firstElement ? getComponentDisplayName(firstElement) : null);
|
|
13596
14331
|
const tagName = firstElement ? getTagName(firstElement) : null;
|
|
13597
14332
|
const elementName = componentName ?? tagName ?? void 0;
|
|
13598
14333
|
return tryCopyWithFallback({
|
|
@@ -13604,11 +14339,50 @@ var init_core = __esm({
|
|
|
13604
14339
|
transformSnippet: pluginRegistry.hooks.transformSnippet,
|
|
13605
14340
|
transformCopyContent: pluginRegistry.hooks.transformCopyContent,
|
|
13606
14341
|
onAfterCopy: pluginRegistry.hooks.onAfterCopy,
|
|
13607
|
-
onCopySuccess:
|
|
14342
|
+
onCopySuccess: (copiedElements, content) => {
|
|
14343
|
+
pluginRegistry.hooks.onCopySuccess(copiedElements, content);
|
|
14344
|
+
const primaryElement = copiedElements[0];
|
|
14345
|
+
const isComment = Boolean(extraPrompt);
|
|
14346
|
+
if (primaryElement) {
|
|
14347
|
+
const currentItems = recentItems2();
|
|
14348
|
+
for (const [existingItemId, mappedElement] of recentElementMap.entries()) {
|
|
14349
|
+
if (mappedElement !== primaryElement) continue;
|
|
14350
|
+
const existingItem = currentItems.find((item) => item.id === existingItemId);
|
|
14351
|
+
if (!existingItem) continue;
|
|
14352
|
+
const shouldDedup = isComment ? existingItem.isComment && existingItem.commentText === extraPrompt : !existingItem.isComment;
|
|
14353
|
+
if (shouldDedup) {
|
|
14354
|
+
removeRecentItem(existingItemId);
|
|
14355
|
+
recentElementMap.delete(existingItemId);
|
|
14356
|
+
break;
|
|
14357
|
+
}
|
|
14358
|
+
}
|
|
14359
|
+
}
|
|
14360
|
+
const updatedRecentItems = addRecentItem({
|
|
14361
|
+
content,
|
|
14362
|
+
elementName: elementName ?? "element",
|
|
14363
|
+
tagName: tagName ?? "div",
|
|
14364
|
+
componentName: componentName ?? void 0,
|
|
14365
|
+
isComment,
|
|
14366
|
+
commentText: extraPrompt ?? void 0,
|
|
14367
|
+
timestamp: Date.now()
|
|
14368
|
+
});
|
|
14369
|
+
setRecentItems(updatedRecentItems);
|
|
14370
|
+
setHasUnreadRecentItems(true);
|
|
14371
|
+
const newestRecentItem = updatedRecentItems[0];
|
|
14372
|
+
if (newestRecentItem && primaryElement) {
|
|
14373
|
+
recentElementMap.set(newestRecentItem.id, primaryElement);
|
|
14374
|
+
}
|
|
14375
|
+
const currentItemIds = new Set(updatedRecentItems.map((item) => item.id));
|
|
14376
|
+
for (const mapItemId of recentElementMap.keys()) {
|
|
14377
|
+
if (!currentItemIds.has(mapItemId)) {
|
|
14378
|
+
recentElementMap.delete(mapItemId);
|
|
14379
|
+
}
|
|
14380
|
+
}
|
|
14381
|
+
},
|
|
13608
14382
|
onCopyError: pluginRegistry.hooks.onCopyError
|
|
13609
14383
|
}, elements, extraPrompt);
|
|
13610
14384
|
};
|
|
13611
|
-
const copyElementsToClipboard = async (targetElements, extraPrompt) => {
|
|
14385
|
+
const copyElementsToClipboard = async (targetElements, extraPrompt, resolvedComponentName2) => {
|
|
13612
14386
|
if (targetElements.length === 0) return;
|
|
13613
14387
|
for (const element of targetElements) {
|
|
13614
14388
|
pluginRegistry.hooks.onElementSelect(element);
|
|
@@ -13617,7 +14391,7 @@ var init_core = __esm({
|
|
|
13617
14391
|
}
|
|
13618
14392
|
}
|
|
13619
14393
|
await new Promise((resolve) => requestAnimationFrame(resolve));
|
|
13620
|
-
await copyWithFallback(targetElements, extraPrompt);
|
|
14394
|
+
await copyWithFallback(targetElements, extraPrompt, resolvedComponentName2);
|
|
13621
14395
|
void notifyElementsSelected(targetElements);
|
|
13622
14396
|
};
|
|
13623
14397
|
const performCopyWithLabel = ({
|
|
@@ -13641,7 +14415,7 @@ var init_core = __esm({
|
|
|
13641
14415
|
const labelPositionX = allElements.length > 1 ? overlayBounds.x + overlayBounds.width / 2 : positionX;
|
|
13642
14416
|
const tagName = getTagName(element);
|
|
13643
14417
|
void getNearestComponentName(element).then((componentName) => {
|
|
13644
|
-
void executeCopyOperation(labelPositionX, positionY, () => copyElementsToClipboard(allElements, extraPrompt), overlayBounds, tagName, componentName ?? void 0, element, shouldDeactivateAfter, elements).then(() => {
|
|
14418
|
+
void executeCopyOperation(labelPositionX, positionY, () => copyElementsToClipboard(allElements, extraPrompt, componentName ?? void 0), overlayBounds, tagName, componentName ?? void 0, element, shouldDeactivateAfter, elements).then(() => {
|
|
13645
14419
|
onComplete?.();
|
|
13646
14420
|
});
|
|
13647
14421
|
});
|
|
@@ -14024,7 +14798,6 @@ var init_core = __esm({
|
|
|
14024
14798
|
const currentY = firstBounds.y + firstBounds.height / 2;
|
|
14025
14799
|
const labelPositionX = currentX + store.copyOffsetFromCenterX;
|
|
14026
14800
|
if ((store.selectedAgent || hasAgentProvider()) && prompt) {
|
|
14027
|
-
elementInputCache.delete(element);
|
|
14028
14801
|
const currentReplySessionId = store.replySessionId;
|
|
14029
14802
|
const selectedAgent = store.selectedAgent;
|
|
14030
14803
|
deactivateRenderer();
|
|
@@ -14050,11 +14823,6 @@ var init_core = __esm({
|
|
|
14050
14823
|
actions.exitPromptMode();
|
|
14051
14824
|
actions.clearInputText();
|
|
14052
14825
|
actions.clearReplySessionId();
|
|
14053
|
-
if (prompt) {
|
|
14054
|
-
elementInputCache.set(element, prompt);
|
|
14055
|
-
} else {
|
|
14056
|
-
elementInputCache.delete(element);
|
|
14057
|
-
}
|
|
14058
14826
|
performCopyWithLabel({
|
|
14059
14827
|
element,
|
|
14060
14828
|
positionX: labelPositionX,
|
|
@@ -14072,10 +14840,6 @@ var init_core = __esm({
|
|
|
14072
14840
|
actions.setPendingDismiss(true);
|
|
14073
14841
|
return;
|
|
14074
14842
|
}
|
|
14075
|
-
const element = store.frozenElement || targetElement();
|
|
14076
|
-
if (element && currentInput) {
|
|
14077
|
-
elementInputCache.set(element, currentInput);
|
|
14078
|
-
}
|
|
14079
14843
|
actions.clearInputText();
|
|
14080
14844
|
actions.clearReplySessionId();
|
|
14081
14845
|
deactivateRenderer();
|
|
@@ -14137,7 +14901,7 @@ var init_core = __esm({
|
|
|
14137
14901
|
};
|
|
14138
14902
|
const enterCommentModeForElement = (element, positionX, positionY) => {
|
|
14139
14903
|
actions.setPendingCommentMode(false);
|
|
14140
|
-
|
|
14904
|
+
actions.clearInputText();
|
|
14141
14905
|
actions.enterPromptMode({
|
|
14142
14906
|
x: positionX,
|
|
14143
14907
|
y: positionY
|
|
@@ -14175,6 +14939,7 @@ var init_core = __esm({
|
|
|
14175
14939
|
if (isActivated()) {
|
|
14176
14940
|
deactivateRenderer();
|
|
14177
14941
|
}
|
|
14942
|
+
dismissRecentDropdown();
|
|
14178
14943
|
if (toggleFeedbackTimerId !== null) {
|
|
14179
14944
|
window.clearTimeout(toggleFeedbackTimerId);
|
|
14180
14945
|
toggleFeedbackTimerId = null;
|
|
@@ -14384,6 +15149,7 @@ var init_core = __esm({
|
|
|
14384
15149
|
};
|
|
14385
15150
|
const handleEnterKeyActivation = (event) => {
|
|
14386
15151
|
if (!isEnterCode(event.code)) return false;
|
|
15152
|
+
if (isKeyboardEventTriggeredByInput(event)) return false;
|
|
14387
15153
|
const copiedElement = store.lastCopiedElement;
|
|
14388
15154
|
const canActivateFromCopied = !isHoldingKeys() && !isPromptMode() && !isActivated() && copiedElement && isElementConnected(copiedElement) && !store.labelInstances.some((instance) => instance.status === "copied" || instance.status === "fading");
|
|
14389
15155
|
if (canActivateFromCopied) {
|
|
@@ -14461,7 +15227,11 @@ var init_core = __esm({
|
|
|
14461
15227
|
const shouldDeactivate = store.wasActivatedByToggle;
|
|
14462
15228
|
const overlayBounds = createFlatOverlayBounds(bounds);
|
|
14463
15229
|
const selectionBoundsArray = allBounds.length > 1 ? allBounds : singleBounds ? [singleBounds] : [];
|
|
14464
|
-
const instanceId = createLabelInstance(overlayBounds, tagName, void 0, "copying",
|
|
15230
|
+
const instanceId = createLabelInstance(overlayBounds, tagName, void 0, "copying", {
|
|
15231
|
+
element: element ?? void 0,
|
|
15232
|
+
mouseX: bounds.x + bounds.width / 2,
|
|
15233
|
+
boundsMultiple: selectionBoundsArray
|
|
15234
|
+
});
|
|
14465
15235
|
isScreenshotInProgress = true;
|
|
14466
15236
|
rendererRoot.style.visibility = "hidden";
|
|
14467
15237
|
const elementsForScreenshot = store.frozenElements.length > 0 ? [...store.frozenElements] : element ? [element] : [];
|
|
@@ -14540,13 +15310,9 @@ var init_core = __esm({
|
|
|
14540
15310
|
});
|
|
14541
15311
|
};
|
|
14542
15312
|
const availableActionCycleItems = createMemo(() => {
|
|
14543
|
-
|
|
14544
|
-
if (!element) return [];
|
|
14545
|
-
const actionsById = new Map(pluginRegistry.store.actions.map((action) => [action.id, action]));
|
|
15313
|
+
if (!selectionElement()) return [];
|
|
14546
15314
|
const cycleItems = [];
|
|
14547
|
-
for (const
|
|
14548
|
-
const action = actionsById.get(actionId);
|
|
14549
|
-
if (!action) continue;
|
|
15315
|
+
for (const action of pluginRegistry.store.actions) {
|
|
14550
15316
|
const isStaticallyDisabled = typeof action.enabled === "boolean" && !action.enabled;
|
|
14551
15317
|
if (isStaticallyDisabled) continue;
|
|
14552
15318
|
cycleItems.push({
|
|
@@ -14582,33 +15348,23 @@ var init_core = __esm({
|
|
|
14582
15348
|
}
|
|
14583
15349
|
}, ACTION_CYCLE_IDLE_TRIGGER_MS);
|
|
14584
15350
|
};
|
|
14585
|
-
const
|
|
15351
|
+
const advanceActionCycle = () => {
|
|
15352
|
+
if (!canCycleActions()) return false;
|
|
15353
|
+
const cycleItems = availableActionCycleItems();
|
|
14586
15354
|
if (cycleItems.length === 0) return false;
|
|
14587
15355
|
setActionCycleItems(cycleItems);
|
|
14588
15356
|
const currentIndex = actionCycleActiveIndex();
|
|
14589
15357
|
const isCurrentIndexValid = currentIndex !== null && currentIndex < cycleItems.length;
|
|
14590
|
-
const
|
|
14591
|
-
let nextIndex;
|
|
14592
|
-
if (!isCurrentIndexValid) {
|
|
14593
|
-
nextIndex = direction === "forward" ? 0 : cycleItems.length - 1;
|
|
14594
|
-
} else {
|
|
14595
|
-
nextIndex = (currentIndex + stepOffset + cycleItems.length) % cycleItems.length;
|
|
14596
|
-
}
|
|
15358
|
+
const nextIndex = isCurrentIndexValid ? (currentIndex + 1) % cycleItems.length : 0;
|
|
14597
15359
|
setActionCycleActiveIndex(nextIndex);
|
|
14598
15360
|
scheduleActionCycleActivation();
|
|
14599
15361
|
return true;
|
|
14600
15362
|
};
|
|
14601
|
-
const handleActionCycleInput = (direction) => {
|
|
14602
|
-
if (!canCycleActions()) return false;
|
|
14603
|
-
const cycleItems = availableActionCycleItems();
|
|
14604
|
-
if (cycleItems.length === 0) return false;
|
|
14605
|
-
return applyActionCycleItems(cycleItems, direction);
|
|
14606
|
-
};
|
|
14607
15363
|
const handleActionCycleKey = (event) => {
|
|
14608
15364
|
if (event.code !== "KeyC") return false;
|
|
14609
15365
|
if (event.altKey || event.repeat) return false;
|
|
14610
15366
|
if (isKeyboardEventTriggeredByInput(event)) return false;
|
|
14611
|
-
if (!
|
|
15367
|
+
if (!advanceActionCycle()) return false;
|
|
14612
15368
|
event.preventDefault();
|
|
14613
15369
|
event.stopPropagation();
|
|
14614
15370
|
if (event.metaKey || event.ctrlKey) {
|
|
@@ -14616,23 +15372,6 @@ var init_core = __esm({
|
|
|
14616
15372
|
}
|
|
14617
15373
|
return true;
|
|
14618
15374
|
};
|
|
14619
|
-
const actionCycleScrollCycler = createScrollCycler({
|
|
14620
|
-
thresholdPx: ACTION_CYCLE_SCROLL_THRESHOLD_PX,
|
|
14621
|
-
throttleMs: ACTION_CYCLE_INPUT_THROTTLE_MS,
|
|
14622
|
-
lineHeightPx: ACTION_CYCLE_SCROLL_LINE_HEIGHT_PX,
|
|
14623
|
-
onStep: handleActionCycleInput
|
|
14624
|
-
});
|
|
14625
|
-
const handleActionCycleWheel = (event) => {
|
|
14626
|
-
if (!canCycleActions()) return;
|
|
14627
|
-
const isActionCycleActive = actionCycleActiveIndex() !== null;
|
|
14628
|
-
if (!isActionCycleActive) {
|
|
14629
|
-
const cycleItems = availableActionCycleItems();
|
|
14630
|
-
if (cycleItems.length === 0) return;
|
|
14631
|
-
}
|
|
14632
|
-
event.preventDefault();
|
|
14633
|
-
event.stopPropagation();
|
|
14634
|
-
actionCycleScrollCycler.handleWheel(event);
|
|
14635
|
-
};
|
|
14636
15375
|
const handleActivationKeys = (event) => {
|
|
14637
15376
|
if (!pluginRegistry.store.options.allowActivationInsideInput && isKeyboardEventTriggeredByInput(event)) {
|
|
14638
15377
|
return;
|
|
@@ -14740,18 +15479,18 @@ var init_core = __esm({
|
|
|
14740
15479
|
return;
|
|
14741
15480
|
}
|
|
14742
15481
|
}
|
|
14743
|
-
|
|
15482
|
+
const didWindowJustRegainFocus = Date.now() - lastWindowFocusTimestamp < WINDOW_REFOCUS_GRACE_PERIOD_MS;
|
|
15483
|
+
if (!didWindowJustRegainFocus && handleActionCycleKey(event)) return;
|
|
14744
15484
|
if (handleArrowNavigation(event)) return;
|
|
14745
15485
|
if (handleEnterKeyActivation(event)) return;
|
|
14746
15486
|
if (handleOpenFileShortcut(event)) return;
|
|
14747
15487
|
if (handleScreenshotShortcut(event)) return;
|
|
14748
|
-
|
|
15488
|
+
if (!didWindowJustRegainFocus) {
|
|
15489
|
+
handleActivationKeys(event);
|
|
15490
|
+
}
|
|
14749
15491
|
}, {
|
|
14750
15492
|
capture: true
|
|
14751
15493
|
});
|
|
14752
|
-
eventListenerManager.addWindowListener("wheel", handleActionCycleWheel, {
|
|
14753
|
-
passive: false
|
|
14754
|
-
});
|
|
14755
15494
|
eventListenerManager.addWindowListener("keyup", (event) => {
|
|
14756
15495
|
if (blockEnterIfNeeded(event)) return;
|
|
14757
15496
|
const requiredModifiers = getRequiredModifiers(pluginRegistry.store.options);
|
|
@@ -14822,6 +15561,7 @@ var init_core = __esm({
|
|
|
14822
15561
|
actions.setTouchMode(isTouchPointer);
|
|
14823
15562
|
if (isEventFromOverlay(event, "data-react-grab-ignore-events")) return;
|
|
14824
15563
|
if (store.contextMenuPosition !== null) return;
|
|
15564
|
+
if (isTouchPointer && !isHoldingKeys() && !isActivated()) return;
|
|
14825
15565
|
const isActiveState = isTouchPointer ? isHoldingKeys() : isActivated();
|
|
14826
15566
|
if (isActiveState && !isPromptMode() && isToggleFrozen()) {
|
|
14827
15567
|
actions.unfreeze();
|
|
@@ -14892,6 +15632,7 @@ var init_core = __esm({
|
|
|
14892
15632
|
actions.setPointer(position);
|
|
14893
15633
|
actions.freeze();
|
|
14894
15634
|
actions.showContextMenu(position, element);
|
|
15635
|
+
dismissRecentDropdown();
|
|
14895
15636
|
pluginRegistry.hooks.onContextMenu(element, position);
|
|
14896
15637
|
}, {
|
|
14897
15638
|
capture: true
|
|
@@ -14931,7 +15672,11 @@ var init_core = __esm({
|
|
|
14931
15672
|
}
|
|
14932
15673
|
}
|
|
14933
15674
|
});
|
|
15675
|
+
eventListenerManager.addWindowListener("focus", () => {
|
|
15676
|
+
lastWindowFocusTimestamp = Date.now();
|
|
15677
|
+
});
|
|
14934
15678
|
const redetectElementUnderPointer = () => {
|
|
15679
|
+
if (store.isTouchMode && !isHoldingKeys() && !isActivated()) return;
|
|
14935
15680
|
if (isEnabled() && !isPromptMode() && !isToggleFrozen() && !isDragging() && store.contextMenuPosition === null && store.frozenElements.length === 0) {
|
|
14936
15681
|
const candidate = getElementAtPosition(store.pointer.x, store.pointer.y);
|
|
14937
15682
|
actions.setDetectedElement(candidate);
|
|
@@ -15188,7 +15933,12 @@ var init_core = __esm({
|
|
|
15188
15933
|
actions.hideContextMenu();
|
|
15189
15934
|
if (labelBounds) {
|
|
15190
15935
|
const labelPositionX = hasMultipleElements ? labelBounds.x + labelBounds.width / 2 : position.x;
|
|
15191
|
-
const labelInstanceId = createLabelInstance(labelBounds, tagName || "element", componentName, "copying",
|
|
15936
|
+
const labelInstanceId = createLabelInstance(labelBounds, tagName || "element", componentName, "copying", {
|
|
15937
|
+
element,
|
|
15938
|
+
mouseX: labelPositionX,
|
|
15939
|
+
elements: hasMultipleElements ? elements : void 0,
|
|
15940
|
+
boundsMultiple: selectionBoundsForLabel
|
|
15941
|
+
});
|
|
15192
15942
|
let didSucceed = false;
|
|
15193
15943
|
let errorMessage;
|
|
15194
15944
|
try {
|
|
@@ -15318,7 +16068,7 @@ var init_core = __esm({
|
|
|
15318
16068
|
if (agent) {
|
|
15319
16069
|
actions.setSelectedAgent(agent);
|
|
15320
16070
|
}
|
|
15321
|
-
|
|
16071
|
+
actions.clearInputText();
|
|
15322
16072
|
actions.enterPromptMode(position, element);
|
|
15323
16073
|
deferHideContextMenu();
|
|
15324
16074
|
}
|
|
@@ -15330,6 +16080,220 @@ var init_core = __esm({
|
|
|
15330
16080
|
deactivateRenderer();
|
|
15331
16081
|
}, 0);
|
|
15332
16082
|
};
|
|
16083
|
+
const clearRecentHoverPreviews = () => {
|
|
16084
|
+
for (const {
|
|
16085
|
+
boxId,
|
|
16086
|
+
labelId
|
|
16087
|
+
} of recentHoverPreviews) {
|
|
16088
|
+
actions.removeGrabbedBox(boxId);
|
|
16089
|
+
if (labelId) {
|
|
16090
|
+
actions.removeLabelInstance(labelId);
|
|
16091
|
+
}
|
|
16092
|
+
}
|
|
16093
|
+
recentHoverPreviews = [];
|
|
16094
|
+
};
|
|
16095
|
+
const addRecentItemPreview = (item, element, idPrefix) => {
|
|
16096
|
+
const bounds = createElementBounds(element);
|
|
16097
|
+
const boxId = `${idPrefix}-${item.id}`;
|
|
16098
|
+
actions.addGrabbedBox({
|
|
16099
|
+
id: boxId,
|
|
16100
|
+
bounds,
|
|
16101
|
+
createdAt: 0,
|
|
16102
|
+
element
|
|
16103
|
+
});
|
|
16104
|
+
let labelId = null;
|
|
16105
|
+
if (item.isComment && item.commentText) {
|
|
16106
|
+
labelId = `${idPrefix}-label-${item.id}`;
|
|
16107
|
+
actions.addLabelInstance({
|
|
16108
|
+
id: labelId,
|
|
16109
|
+
bounds,
|
|
16110
|
+
tagName: item.tagName,
|
|
16111
|
+
componentName: item.componentName,
|
|
16112
|
+
status: "idle",
|
|
16113
|
+
isPromptMode: true,
|
|
16114
|
+
inputValue: item.commentText,
|
|
16115
|
+
createdAt: 0,
|
|
16116
|
+
element,
|
|
16117
|
+
mouseX: bounds.x + bounds.width / 2
|
|
16118
|
+
});
|
|
16119
|
+
}
|
|
16120
|
+
recentHoverPreviews.push({
|
|
16121
|
+
boxId,
|
|
16122
|
+
labelId
|
|
16123
|
+
});
|
|
16124
|
+
};
|
|
16125
|
+
const stopTrackingToolbarPosition = () => {
|
|
16126
|
+
if (recentPositionFrameId !== null) {
|
|
16127
|
+
cancelAnimationFrame(recentPositionFrameId);
|
|
16128
|
+
recentPositionFrameId = null;
|
|
16129
|
+
}
|
|
16130
|
+
};
|
|
16131
|
+
const getNearestEdge = (rect) => {
|
|
16132
|
+
const centerX = rect.left + rect.width / 2;
|
|
16133
|
+
const centerY = rect.top + rect.height / 2;
|
|
16134
|
+
const distanceToTop = centerY;
|
|
16135
|
+
const distanceToBottom = window.innerHeight - centerY;
|
|
16136
|
+
const distanceToLeft = centerX;
|
|
16137
|
+
const distanceToRight = window.innerWidth - centerX;
|
|
16138
|
+
const minimumDistance = Math.min(distanceToTop, distanceToBottom, distanceToLeft, distanceToRight);
|
|
16139
|
+
if (minimumDistance === distanceToTop) return "top";
|
|
16140
|
+
if (minimumDistance === distanceToLeft) return "left";
|
|
16141
|
+
if (minimumDistance === distanceToRight) return "right";
|
|
16142
|
+
return "bottom";
|
|
16143
|
+
};
|
|
16144
|
+
const startTrackingToolbarPosition = () => {
|
|
16145
|
+
stopTrackingToolbarPosition();
|
|
16146
|
+
const updatePosition = () => {
|
|
16147
|
+
if (!toolbarElement) return;
|
|
16148
|
+
const toolbarRect = toolbarElement.getBoundingClientRect();
|
|
16149
|
+
const edge = getNearestEdge(toolbarRect);
|
|
16150
|
+
let anchorX;
|
|
16151
|
+
let anchorY;
|
|
16152
|
+
if (edge === "left" || edge === "right") {
|
|
16153
|
+
anchorX = edge === "left" ? toolbarRect.right : toolbarRect.left;
|
|
16154
|
+
anchorY = toolbarRect.top + toolbarRect.height / 2;
|
|
16155
|
+
} else {
|
|
16156
|
+
anchorX = toolbarRect.left + toolbarRect.width / 2;
|
|
16157
|
+
anchorY = edge === "top" ? toolbarRect.bottom : toolbarRect.top;
|
|
16158
|
+
}
|
|
16159
|
+
setRecentDropdownPosition({
|
|
16160
|
+
x: anchorX,
|
|
16161
|
+
y: anchorY,
|
|
16162
|
+
edge,
|
|
16163
|
+
toolbarWidth: toolbarRect.width
|
|
16164
|
+
});
|
|
16165
|
+
recentPositionFrameId = requestAnimationFrame(updatePosition);
|
|
16166
|
+
};
|
|
16167
|
+
recentPositionFrameId = requestAnimationFrame(updatePosition);
|
|
16168
|
+
};
|
|
16169
|
+
const dismissRecentDropdown = () => {
|
|
16170
|
+
stopTrackingToolbarPosition();
|
|
16171
|
+
clearRecentHoverPreviews();
|
|
16172
|
+
setRecentDropdownPosition(null);
|
|
16173
|
+
};
|
|
16174
|
+
const handleToggleRecent = () => {
|
|
16175
|
+
const isCurrentlyOpen = recentDropdownPosition() !== null;
|
|
16176
|
+
if (isCurrentlyOpen) {
|
|
16177
|
+
dismissRecentDropdown();
|
|
16178
|
+
} else {
|
|
16179
|
+
clearRecentHoverPreviews();
|
|
16180
|
+
actions.hideContextMenu();
|
|
16181
|
+
setRecentItems(loadRecent());
|
|
16182
|
+
setHasUnreadRecentItems(false);
|
|
16183
|
+
startTrackingToolbarPosition();
|
|
16184
|
+
}
|
|
16185
|
+
};
|
|
16186
|
+
const copyRecentItemContent = (item) => {
|
|
16187
|
+
copyContent(item.content, {
|
|
16188
|
+
name: item.elementName
|
|
16189
|
+
});
|
|
16190
|
+
const element = recentElementMap.get(item.id);
|
|
16191
|
+
if (element && isElementConnected(element)) {
|
|
16192
|
+
const bounds = createElementBounds(element);
|
|
16193
|
+
const instanceId = createLabelInstance(bounds, item.tagName, item.componentName, "copied", {
|
|
16194
|
+
element,
|
|
16195
|
+
mouseX: bounds.x + bounds.width / 2
|
|
16196
|
+
});
|
|
16197
|
+
scheduleLabelFade(instanceId);
|
|
16198
|
+
}
|
|
16199
|
+
};
|
|
16200
|
+
const handleRecentItemSelect = (item) => {
|
|
16201
|
+
dismissRecentDropdown();
|
|
16202
|
+
const element = recentElementMap.get(item.id);
|
|
16203
|
+
if (item.isComment && item.commentText) {
|
|
16204
|
+
if (element && isElementConnected(element)) {
|
|
16205
|
+
const bounds = createElementBounds(element);
|
|
16206
|
+
const centerX = bounds.x + bounds.width / 2;
|
|
16207
|
+
const centerY = bounds.y + bounds.height / 2;
|
|
16208
|
+
actions.enterPromptMode({
|
|
16209
|
+
x: centerX,
|
|
16210
|
+
y: centerY
|
|
16211
|
+
}, element);
|
|
16212
|
+
actions.setInputText(item.commentText);
|
|
16213
|
+
} else {
|
|
16214
|
+
copyContent(item.content, {
|
|
16215
|
+
name: item.elementName
|
|
16216
|
+
});
|
|
16217
|
+
}
|
|
16218
|
+
} else {
|
|
16219
|
+
copyRecentItemContent(item);
|
|
16220
|
+
}
|
|
16221
|
+
};
|
|
16222
|
+
const handleRecentItemRemove = (item) => {
|
|
16223
|
+
clearRecentHoverPreviews();
|
|
16224
|
+
recentElementMap.delete(item.id);
|
|
16225
|
+
const updatedRecentItems = removeRecentItem(item.id);
|
|
16226
|
+
setRecentItems(updatedRecentItems);
|
|
16227
|
+
if (updatedRecentItems.length === 0) {
|
|
16228
|
+
setHasUnreadRecentItems(false);
|
|
16229
|
+
dismissRecentDropdown();
|
|
16230
|
+
}
|
|
16231
|
+
};
|
|
16232
|
+
const handleRecentCopyAll = () => {
|
|
16233
|
+
const currentRecentItems = recentItems2();
|
|
16234
|
+
if (currentRecentItems.length === 0) return;
|
|
16235
|
+
const combinedContent = joinSnippets(currentRecentItems.map((recentItem) => recentItem.content));
|
|
16236
|
+
const firstItem = currentRecentItems[0];
|
|
16237
|
+
copyContent(combinedContent, {
|
|
16238
|
+
name: firstItem.componentName ?? firstItem.tagName
|
|
16239
|
+
});
|
|
16240
|
+
dismissRecentDropdown();
|
|
16241
|
+
actions.clearLabelInstances();
|
|
16242
|
+
for (const recentItem of currentRecentItems) {
|
|
16243
|
+
const element = recentElementMap.get(recentItem.id);
|
|
16244
|
+
if (!element || !isElementConnected(element)) continue;
|
|
16245
|
+
const bounds = createElementBounds(element);
|
|
16246
|
+
const labelId = `label-${Date.now()}-${Math.random().toString(36).slice(2)}`;
|
|
16247
|
+
actions.addLabelInstance({
|
|
16248
|
+
id: labelId,
|
|
16249
|
+
bounds,
|
|
16250
|
+
tagName: recentItem.tagName,
|
|
16251
|
+
componentName: recentItem.componentName,
|
|
16252
|
+
status: "copied",
|
|
16253
|
+
createdAt: Date.now(),
|
|
16254
|
+
element,
|
|
16255
|
+
mouseX: bounds.x + bounds.width / 2
|
|
16256
|
+
});
|
|
16257
|
+
scheduleLabelFade(labelId);
|
|
16258
|
+
}
|
|
16259
|
+
};
|
|
16260
|
+
const handleRecentItemHover = (recentItemId) => {
|
|
16261
|
+
clearRecentHoverPreviews();
|
|
16262
|
+
if (recentItemId) {
|
|
16263
|
+
const item = recentItems2().find((innerItem) => innerItem.id === recentItemId);
|
|
16264
|
+
const element = recentElementMap.get(recentItemId);
|
|
16265
|
+
if (item && element && isElementConnected(element)) {
|
|
16266
|
+
addRecentItemPreview(item, element, "recent-hover");
|
|
16267
|
+
}
|
|
16268
|
+
}
|
|
16269
|
+
};
|
|
16270
|
+
const handleRecentButtonHover = (isHovered) => {
|
|
16271
|
+
clearRecentHoverPreviews();
|
|
16272
|
+
if (isHovered && recentDropdownPosition() === null) {
|
|
16273
|
+
showAllRecentItemPreviews();
|
|
16274
|
+
}
|
|
16275
|
+
};
|
|
16276
|
+
const handleRecentCopyAllHover = (isHovered) => {
|
|
16277
|
+
clearRecentHoverPreviews();
|
|
16278
|
+
if (isHovered) {
|
|
16279
|
+
showAllRecentItemPreviews();
|
|
16280
|
+
}
|
|
16281
|
+
};
|
|
16282
|
+
const showAllRecentItemPreviews = () => {
|
|
16283
|
+
for (const item of recentItems2()) {
|
|
16284
|
+
const element = recentElementMap.get(item.id);
|
|
16285
|
+
if (element && isElementConnected(element)) {
|
|
16286
|
+
addRecentItemPreview(item, element, "recent-all-hover");
|
|
16287
|
+
}
|
|
16288
|
+
}
|
|
16289
|
+
};
|
|
16290
|
+
const handleRecentClear = () => {
|
|
16291
|
+
recentElementMap.clear();
|
|
16292
|
+
const updatedRecentItems = clearRecent();
|
|
16293
|
+
setRecentItems(updatedRecentItems);
|
|
16294
|
+
setHasUnreadRecentItems(false);
|
|
16295
|
+
dismissRecentDropdown();
|
|
16296
|
+
};
|
|
15333
16297
|
const handleShowContextMenuSession = (sessionId) => {
|
|
15334
16298
|
const session = agentManager.sessions().get(sessionId);
|
|
15335
16299
|
if (!session) return;
|
|
@@ -15526,6 +16490,9 @@ var init_core = __esm({
|
|
|
15526
16490
|
};
|
|
15527
16491
|
},
|
|
15528
16492
|
onToolbarSelectHoverChange: setIsToolbarSelectHovered,
|
|
16493
|
+
onToolbarRef: (element) => {
|
|
16494
|
+
toolbarElement = element;
|
|
16495
|
+
},
|
|
15529
16496
|
get contextMenuPosition() {
|
|
15530
16497
|
return contextMenuPosition();
|
|
15531
16498
|
},
|
|
@@ -15548,7 +16515,29 @@ var init_core = __esm({
|
|
|
15548
16515
|
return contextMenuActionContext();
|
|
15549
16516
|
},
|
|
15550
16517
|
onContextMenuDismiss: handleContextMenuDismiss,
|
|
15551
|
-
onContextMenuHide: deferHideContextMenu
|
|
16518
|
+
onContextMenuHide: deferHideContextMenu,
|
|
16519
|
+
get recentItems() {
|
|
16520
|
+
return recentItems2();
|
|
16521
|
+
},
|
|
16522
|
+
get recentItemCount() {
|
|
16523
|
+
return recentItems2().length;
|
|
16524
|
+
},
|
|
16525
|
+
get hasUnreadRecentItems() {
|
|
16526
|
+
return hasUnreadRecentItems();
|
|
16527
|
+
},
|
|
16528
|
+
get recentDropdownPosition() {
|
|
16529
|
+
return recentDropdownPosition();
|
|
16530
|
+
},
|
|
16531
|
+
onToggleRecent: handleToggleRecent,
|
|
16532
|
+
onRecentButtonHover: handleRecentButtonHover,
|
|
16533
|
+
onRecentItemSelect: handleRecentItemSelect,
|
|
16534
|
+
onRecentItemRemove: handleRecentItemRemove,
|
|
16535
|
+
onRecentItemCopy: copyRecentItemContent,
|
|
16536
|
+
onRecentItemHover: handleRecentItemHover,
|
|
16537
|
+
onRecentCopyAll: handleRecentCopyAll,
|
|
16538
|
+
onRecentCopyAllHover: handleRecentCopyAllHover,
|
|
16539
|
+
onRecentClear: handleRecentClear,
|
|
16540
|
+
onRecentDismiss: dismissRecentDropdown
|
|
15552
16541
|
});
|
|
15553
16542
|
}, rendererRoot);
|
|
15554
16543
|
}
|
|
@@ -15661,6 +16650,7 @@ var init_core = __esm({
|
|
|
15661
16650
|
},
|
|
15662
16651
|
dispose: () => {
|
|
15663
16652
|
hasInited = false;
|
|
16653
|
+
stopTrackingToolbarPosition();
|
|
15664
16654
|
toolbarStateChangeCallbacks.clear();
|
|
15665
16655
|
dispose2();
|
|
15666
16656
|
},
|