react-grab 0.1.19 → 0.1.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-A4P2NQ77.cjs +118 -0
- package/dist/chunk-GYJRJR7H.js +118 -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-BgQgrh_y.d.cts → index-BurXddDF.d.cts} +11 -0
- package/dist/{index-BgQgrh_y.d.ts → index-BurXddDF.d.ts} +11 -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 +35 -35
- package/dist/index.js +1 -1
- package/dist/react.cjs +838 -382
- package/dist/react.js +838 -382
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-F2RYLP4R.js +0 -118
- package/dist/chunk-QFXAROZP.cjs +0 -118
package/dist/react.js
CHANGED
|
@@ -1884,7 +1884,7 @@ var init_web = __esm({
|
|
|
1884
1884
|
var styles_default;
|
|
1885
1885
|
var init_styles = __esm({
|
|
1886
1886
|
"dist/styles.css"() {
|
|
1887
|
-
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-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial;--tw-content:""}}}@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:44px;height:100%;min-height:44px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-top-0\\.5{top:calc(var(--spacing)*-.5)}.top-0{top:calc(var(--spacing)*0)}.top-0\\.5{top:calc(var(--spacing)*.5)}.top-1\\/2{top:50%}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.right-full{right:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-0\\.5{left:calc(var(--spacing)*.5)}.left-1\\.5{left:calc(var(--spacing)*1.5)}.left-1\\/2{left:50%}.left-2\\.5{left:calc(var(--spacing)*2.5)}.left-full{left:100%}.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)}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-2\\.5{margin-top:calc(var(--spacing)*2.5)}.mr-0\\.5{margin-right:calc(var(--spacing)*.5)}.mr-1\\.5{margin-right:calc(var(--spacing)*1.5)}.mr-2\\.5{margin-right:calc(var(--spacing)*2.5)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing)*2.5)}.-ml-\\[2px\\]{margin-left:-2px}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2\\.5{margin-left:calc(var(--spacing)*2.5)}.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}.inline-flex{display:inline-flex}.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-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.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-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.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}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.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)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.-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}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.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-\\[\\#404040\\]{background-color:#404040}.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-\\[\\#B91C1C\\]\\/50{color:oklab(50.542% .168942 .0880134/.5)}.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\\/80{color:#000c}@supports (color:color-mix(in lab, red, red)){.text-black\\/80{color:color-mix(in oklab,var(--color-black)80%,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-40{opacity:.4}.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)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-columns\\,opacity\\]{transition-property:grid-template-columns,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\,opacity\\]{transition-property:grid-template-rows,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;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)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.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}}.before\\:\\!min-h-full:before{content:var(--tw-content);min-height:100%!important}.before\\:\\!min-w-full:before{content:var(--tw-content);min-width:100%!important}.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)}}.hover\\:opacity-100:hover{opacity:1}}.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}@keyframes clock-flash{0%{transform:scale(1)}25%{transform:scale(1.2)}50%{transform:scale(.92)}75%{transform:scale(1.05)}to{transform:scale(1)}}.animate-clock-flash{will-change:transform;animation:.4s ease-out clock-flash}.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-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}';
|
|
1887
|
+
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-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial;--tw-content:""}}}@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:44px;height:100%;min-height:44px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-top-0\\.5{top:calc(var(--spacing)*-.5)}.top-0{top:calc(var(--spacing)*0)}.top-0\\.5{top:calc(var(--spacing)*.5)}.top-1\\/2{top:50%}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.right-full{right:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-0\\.5{left:calc(var(--spacing)*.5)}.left-1\\.5{left:calc(var(--spacing)*1.5)}.left-1\\/2{left:50%}.left-2\\.5{left:calc(var(--spacing)*2.5)}.left-full{left:100%}.z-1{z-index:1}.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)}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-2\\.5{margin-top:calc(var(--spacing)*2.5)}.mr-0\\.5{margin-right:calc(var(--spacing)*.5)}.mr-1\\.5{margin-right:calc(var(--spacing)*1.5)}.mr-2\\.5{margin-right:calc(var(--spacing)*2.5)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing)*2.5)}.-ml-\\[2px\\]{margin-left:-2px}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2\\.5{margin-left:calc(var(--spacing)*2.5)}.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-block{display:inline-block}.inline-flex{display:inline-flex}.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-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.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-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.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}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.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)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.-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}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.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-\\[\\#404040\\]{background-color:#404040}.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-\\[\\#B91C1C\\]\\/50{color:oklab(50.542% .168942 .0880134/.5)}.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\\/80{color:#000c}@supports (color:color-mix(in lab, red, red)){.text-black\\/80{color:color-mix(in oklab,var(--color-black)80%,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-40{opacity:.4}.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)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-columns\\,opacity\\]{transition-property:grid-template-columns,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\,opacity\\]{transition-property:grid-template-rows,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[top\\,left\\,width\\,height\\,opacity\\]{transition-property:top,left,width,height,opacity;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-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.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}.\\[scrollbar-color\\:transparent_transparent\\]{scrollbar-color:transparent transparent}.\\[scrollbar-width\\:thin\\]{scrollbar-width:thin}.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}}.before\\:\\!min-h-full:before{content:var(--tw-content);min-height:100%!important}.before\\:\\!min-w-full:before{content:var(--tw-content);min-width:100%!important}@media (hover:hover){.hover\\:bg-\\[\\#F5F5F5\\]:hover{background-color:#f5f5f5}.hover\\:bg-\\[\\#FEE2E2\\]:hover{background-color:#fee2e2}.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)}}.hover\\:opacity-100:hover{opacity:1}.hover\\:\\[scrollbar-color\\:rgba\\(0\\,0\\,0\\,0\\.15\\)_transparent\\]:hover{scrollbar-color:#00000026 transparent}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}}: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}@keyframes clock-flash{0%{transform:scale(1)}25%{transform:scale(1.2)}50%{transform:scale(.92)}75%{transform:scale(1.05)}to{transform:scale(1)}}.animate-clock-flash{will-change:transform;animation:.4s ease-out clock-flash}.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-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}';
|
|
1888
1888
|
}
|
|
1889
1889
|
});
|
|
1890
1890
|
|
|
@@ -2136,11 +2136,11 @@ var init_store = __esm({
|
|
|
2136
2136
|
});
|
|
2137
2137
|
|
|
2138
2138
|
// src/constants.ts
|
|
2139
|
-
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, DEFERRED_EXECUTION_DELAY_MS, DEFAULT_KEY_HOLD_DURATION_MS, MIN_HOLD_FOR_ACTIVATION_AFTER_COPY_MS, RECENT_THRESHOLD_MS, FINDER_TIMEOUT_MS, SELECTOR_ATTR_VALUE_MAX_LENGTH_CHARS, 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_HOST, 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_TEXT_MAX_LENGTH, PREVIEW_ATTR_VALUE_MAX_LENGTH, PREVIEW_MAX_ATTRS, PREVIEW_PRIORITY_ATTRS, SYMBOLICATION_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, TOGGLE_ANIMATION_BUFFER_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_ARROW_NAVIGATION_HISTORY, MAX_MEMORY_SESSIONS, 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_HISTORY_ITEMS, MAX_SESSION_STORAGE_SIZE_BYTES, DROPDOWN_ANIMATION_DURATION_MS, DROPDOWN_HOVER_OPEN_DELAY_MS, DROPDOWN_VIEWPORT_PADDING_PX, DROPDOWN_ANCHOR_GAP_PX, SAFE_POLYGON_BUFFER_PX, DROPDOWN_ICON_SIZE_PX, DROPDOWN_MIN_WIDTH_PX, DROPDOWN_MAX_WIDTH_PX, TOOLBAR_MENU_MIN_WIDTH_PX, PANEL_STYLES, DROPDOWN_OFFSCREEN_POSITION, DROPDOWN_EDGE_TRANSFORM_ORIGIN, LOGO_SVG, NEXTJS_REVALIDATION_DELAY_MS, IME_COMPOSING_KEY_CODE, SELECTION_LABEL_OFFSCREEN_PX, RELEVANT_CSS_PROPERTIES;
|
|
2139
|
+
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, DEFERRED_EXECUTION_DELAY_MS, DEFAULT_KEY_HOLD_DURATION_MS, MIN_HOLD_FOR_ACTIVATION_AFTER_COPY_MS, RECENT_THRESHOLD_MS, FINDER_TIMEOUT_MS, SELECTOR_ATTR_VALUE_MAX_LENGTH_CHARS, ACTION_CYCLE_IDLE_TRIGGER_MS, DRAG_THRESHOLD_PX, ELEMENT_DETECTION_THROTTLE_MS, PENDING_DETECTION_STALENESS_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_HOST, 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_TEXT_MAX_LENGTH, PREVIEW_ATTR_VALUE_MAX_LENGTH, PREVIEW_MAX_ATTRS, PREVIEW_PRIORITY_ATTRS, SYMBOLICATION_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, TOGGLE_ANIMATION_BUFFER_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_ARROW_NAVIGATION_HISTORY, MAX_MEMORY_SESSIONS, MAX_TRANSFORM_ANCESTOR_DEPTH, TRANSFORM_EARLY_BAIL_DEPTH, ELEMENT_POSITION_CACHE_DISTANCE_THRESHOLD_PX, ELEMENT_POSITION_THROTTLE_MS, POINTER_EVENTS_RESUME_DEBOUNCE_MS, VISIBILITY_CACHE_TTL_MS, ZOOM_DETECTION_THRESHOLD, MOUNT_ROOT_RECHECK_DELAY_MS, MAX_HISTORY_ITEMS, MAX_SESSION_STORAGE_SIZE_BYTES, DROPDOWN_ANIMATION_DURATION_MS, DROPDOWN_HOVER_OPEN_DELAY_MS, DROPDOWN_VIEWPORT_PADDING_PX, DROPDOWN_ANCHOR_GAP_PX, SAFE_POLYGON_BUFFER_PX, DROPDOWN_ICON_SIZE_PX, DROPDOWN_MIN_WIDTH_PX, DROPDOWN_MAX_WIDTH_PX, TOOLBAR_MENU_MIN_WIDTH_PX, PANEL_STYLES, DROPDOWN_OFFSCREEN_POSITION, DROPDOWN_EDGE_TRANSFORM_ORIGIN, LOGO_SVG, NEXTJS_REVALIDATION_DELAY_MS, IME_COMPOSING_KEY_CODE, SELECTION_LABEL_OFFSCREEN_PX, RELEVANT_CSS_PROPERTIES;
|
|
2140
2140
|
var init_constants = __esm({
|
|
2141
2141
|
"src/constants.ts"() {
|
|
2142
2142
|
"use strict";
|
|
2143
|
-
VERSION = "0.1.
|
|
2143
|
+
VERSION = "0.1.21";
|
|
2144
2144
|
VIEWPORT_MARGIN_PX = 8;
|
|
2145
2145
|
OFFSCREEN_POSITION = -1e3;
|
|
2146
2146
|
SELECTION_LERP_FACTOR = 0.95;
|
|
@@ -2162,6 +2162,7 @@ var init_constants = __esm({
|
|
|
2162
2162
|
ACTION_CYCLE_IDLE_TRIGGER_MS = 600;
|
|
2163
2163
|
DRAG_THRESHOLD_PX = 2;
|
|
2164
2164
|
ELEMENT_DETECTION_THROTTLE_MS = 32;
|
|
2165
|
+
PENDING_DETECTION_STALENESS_MS = 200;
|
|
2165
2166
|
COMPONENT_NAME_DEBOUNCE_MS = 100;
|
|
2166
2167
|
DRAG_PREVIEW_DEBOUNCE_MS = 32;
|
|
2167
2168
|
BOUNDS_CACHE_TTL_MS = 16;
|
|
@@ -2245,6 +2246,7 @@ var init_constants = __esm({
|
|
|
2245
2246
|
TRANSFORM_EARLY_BAIL_DEPTH = 3;
|
|
2246
2247
|
ELEMENT_POSITION_CACHE_DISTANCE_THRESHOLD_PX = 2;
|
|
2247
2248
|
ELEMENT_POSITION_THROTTLE_MS = 16;
|
|
2249
|
+
POINTER_EVENTS_RESUME_DEBOUNCE_MS = 100;
|
|
2248
2250
|
VISIBILITY_CACHE_TTL_MS = 50;
|
|
2249
2251
|
ZOOM_DETECTION_THRESHOLD = 0.01;
|
|
2250
2252
|
MOUNT_ROOT_RECHECK_DELAY_MS = 1e3;
|
|
@@ -2528,6 +2530,46 @@ var init_is_element_connected = __esm({
|
|
|
2528
2530
|
}
|
|
2529
2531
|
});
|
|
2530
2532
|
|
|
2533
|
+
// src/utils/get-bounds-center.ts
|
|
2534
|
+
var getBoundsCenter;
|
|
2535
|
+
var init_get_bounds_center = __esm({
|
|
2536
|
+
"src/utils/get-bounds-center.ts"() {
|
|
2537
|
+
"use strict";
|
|
2538
|
+
getBoundsCenter = (bounds) => ({
|
|
2539
|
+
x: bounds.x + bounds.width / 2,
|
|
2540
|
+
y: bounds.y + bounds.height / 2
|
|
2541
|
+
});
|
|
2542
|
+
}
|
|
2543
|
+
});
|
|
2544
|
+
|
|
2545
|
+
// src/utils/recalculate-session-position.ts
|
|
2546
|
+
var recalculateSessionPosition;
|
|
2547
|
+
var init_recalculate_session_position = __esm({
|
|
2548
|
+
"src/utils/recalculate-session-position.ts"() {
|
|
2549
|
+
"use strict";
|
|
2550
|
+
init_get_bounds_center();
|
|
2551
|
+
recalculateSessionPosition = ({
|
|
2552
|
+
currentPosition,
|
|
2553
|
+
previousBounds,
|
|
2554
|
+
nextBounds
|
|
2555
|
+
}) => {
|
|
2556
|
+
if (!previousBounds || !nextBounds) {
|
|
2557
|
+
return currentPosition;
|
|
2558
|
+
}
|
|
2559
|
+
const previousBoundsCenter = getBoundsCenter(previousBounds);
|
|
2560
|
+
const nextBoundsCenter = getBoundsCenter(nextBounds);
|
|
2561
|
+
const previousBoundsHalfWidth = previousBounds.width / 2;
|
|
2562
|
+
const positionOffsetFromCenterX = currentPosition.x - previousBoundsCenter.x;
|
|
2563
|
+
const positionOffsetRatio = previousBoundsHalfWidth > 0 ? positionOffsetFromCenterX / previousBoundsHalfWidth : 0;
|
|
2564
|
+
const nextBoundsHalfWidth = nextBounds.width / 2;
|
|
2565
|
+
return {
|
|
2566
|
+
...currentPosition,
|
|
2567
|
+
x: nextBoundsCenter.x + positionOffsetRatio * nextBoundsHalfWidth
|
|
2568
|
+
};
|
|
2569
|
+
};
|
|
2570
|
+
}
|
|
2571
|
+
});
|
|
2572
|
+
|
|
2531
2573
|
// src/core/store.ts
|
|
2532
2574
|
var createInitialStore, createGrabStore;
|
|
2533
2575
|
var init_store2 = __esm({
|
|
@@ -2537,6 +2579,7 @@ var init_store2 = __esm({
|
|
|
2537
2579
|
init_constants();
|
|
2538
2580
|
init_create_element_bounds();
|
|
2539
2581
|
init_is_element_connected();
|
|
2582
|
+
init_recalculate_session_position();
|
|
2540
2583
|
createInitialStore = (input) => ({
|
|
2541
2584
|
current: { state: "idle" },
|
|
2542
2585
|
wasActivatedByToggle: false,
|
|
@@ -2936,19 +2979,11 @@ var init_store2 = __esm({
|
|
|
2936
2979
|
if (isElementConnected(element)) {
|
|
2937
2980
|
const newBounds = createElementBounds(element);
|
|
2938
2981
|
const oldFirstBounds = session.selectionBounds[0];
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
const offsetRatio = oldHalfWidth > 0 ? offsetX / oldHalfWidth : 0;
|
|
2945
|
-
const newCenterX = newBounds.x + newBounds.width / 2;
|
|
2946
|
-
const newHalfWidth = newBounds.width / 2;
|
|
2947
|
-
updatedPosition = {
|
|
2948
|
-
...session.position,
|
|
2949
|
-
x: newCenterX + offsetRatio * newHalfWidth
|
|
2950
|
-
};
|
|
2951
|
-
}
|
|
2982
|
+
const updatedPosition = recalculateSessionPosition({
|
|
2983
|
+
currentPosition: session.position,
|
|
2984
|
+
previousBounds: oldFirstBounds,
|
|
2985
|
+
nextBounds: newBounds
|
|
2986
|
+
});
|
|
2952
2987
|
updatedSessions.set(sessionId, {
|
|
2953
2988
|
...session,
|
|
2954
2989
|
selectionBounds: [newBounds],
|
|
@@ -3880,7 +3915,7 @@ var init_truncate_string = __esm({
|
|
|
3880
3915
|
});
|
|
3881
3916
|
|
|
3882
3917
|
// src/core/context.ts
|
|
3883
|
-
var NEXT_INTERNAL_COMPONENT_NAMES, REACT_INTERNAL_COMPONENT_NAMES, cachedIsNextProject, checkIsNextProject, checkIsInternalComponentName, checkIsSourceComponentName, SERVER_COMPONENT_URL_PREFIXES, isServerComponentUrl, devirtualizeServerUrl, symbolicateServerFrames, extractServerFramesFromDebugStack, enrichServerFrameLocations, stackCache, fetchStackForElement, getStack, getNearestComponentName, resolveSourceFromStack, isUsefulComponentName, getComponentDisplayName, hasSourceFiles, getComponentNamesFromFiber, formatStackContext, getStackContext, getElementContext, getFallbackContext, truncateAttrValue, formatPriorityAttrs, getHTMLPreview;
|
|
3918
|
+
var NON_COMPONENT_PREFIXES, NEXT_INTERNAL_COMPONENT_NAMES, REACT_INTERNAL_COMPONENT_NAMES, cachedIsNextProject, checkIsNextProject, checkIsInternalComponentName, checkIsSourceComponentName, SERVER_COMPONENT_URL_PREFIXES, isServerComponentUrl, devirtualizeServerUrl, symbolicateServerFrames, extractServerFramesFromDebugStack, enrichServerFrameLocations, stackCache, fetchStackForElement, getStack, getNearestComponentName, resolveSourceFromStack, isUsefulComponentName, getComponentDisplayName, hasSourceFiles, getComponentNamesFromFiber, formatStackContext, getStackContext, getElementContext, getFallbackContext, truncateAttrValue, formatPriorityAttrs, getHTMLPreview;
|
|
3884
3919
|
var init_context = __esm({
|
|
3885
3920
|
"src/core/context.ts"() {
|
|
3886
3921
|
"use strict";
|
|
@@ -3890,6 +3925,16 @@ var init_context = __esm({
|
|
|
3890
3925
|
init_constants();
|
|
3891
3926
|
init_get_tag_name();
|
|
3892
3927
|
init_truncate_string();
|
|
3928
|
+
NON_COMPONENT_PREFIXES = /* @__PURE__ */ new Set([
|
|
3929
|
+
"_",
|
|
3930
|
+
"$",
|
|
3931
|
+
"motion.",
|
|
3932
|
+
"styled.",
|
|
3933
|
+
"chakra.",
|
|
3934
|
+
"ark.",
|
|
3935
|
+
"Primitive.",
|
|
3936
|
+
"Slot."
|
|
3937
|
+
]);
|
|
3893
3938
|
NEXT_INTERNAL_COMPONENT_NAMES = /* @__PURE__ */ new Set([
|
|
3894
3939
|
"InnerLayoutRouter",
|
|
3895
3940
|
"RedirectErrorBoundary",
|
|
@@ -3934,9 +3979,11 @@ var init_context = __esm({
|
|
|
3934
3979
|
return cachedIsNextProject;
|
|
3935
3980
|
};
|
|
3936
3981
|
checkIsInternalComponentName = (name) => {
|
|
3937
|
-
if (name.startsWith("_")) return true;
|
|
3938
3982
|
if (NEXT_INTERNAL_COMPONENT_NAMES.has(name)) return true;
|
|
3939
3983
|
if (REACT_INTERNAL_COMPONENT_NAMES.has(name)) return true;
|
|
3984
|
+
for (const prefix of NON_COMPONENT_PREFIXES) {
|
|
3985
|
+
if (name.startsWith(prefix)) return true;
|
|
3986
|
+
}
|
|
3940
3987
|
return false;
|
|
3941
3988
|
};
|
|
3942
3989
|
checkIsSourceComponentName = (name) => {
|
|
@@ -8015,12 +8062,10 @@ var init_completion_view = __esm({
|
|
|
8015
8062
|
return (() => {
|
|
8016
8063
|
var _el$ = _tmpl$15();
|
|
8017
8064
|
addEventListener(_el$, "click", (event) => {
|
|
8018
|
-
event.stopPropagation();
|
|
8019
8065
|
event.stopImmediatePropagation();
|
|
8020
8066
|
props.onClick();
|
|
8021
8067
|
});
|
|
8022
8068
|
addEventListener(_el$, "pointerdown", (event) => {
|
|
8023
|
-
event.stopPropagation();
|
|
8024
8069
|
event.stopImmediatePropagation();
|
|
8025
8070
|
});
|
|
8026
8071
|
insert(_el$, createComponent(IconEllipsis, {
|
|
@@ -8072,7 +8117,6 @@ var init_completion_view = __esm({
|
|
|
8072
8117
|
const isEnterWithoutShift = event.code === "Enter" && !event.shiftKey;
|
|
8073
8118
|
const isEscape = event.code === "Escape";
|
|
8074
8119
|
if (!isUndoRedo) {
|
|
8075
|
-
event.stopPropagation();
|
|
8076
8120
|
event.stopImmediatePropagation();
|
|
8077
8121
|
}
|
|
8078
8122
|
if (isEnterWithoutShift) {
|
|
@@ -8279,8 +8323,166 @@ var init_completion_view = __esm({
|
|
|
8279
8323
|
}
|
|
8280
8324
|
});
|
|
8281
8325
|
|
|
8326
|
+
// src/utils/create-menu-highlight.ts
|
|
8327
|
+
var DEFAULT_HIDDEN_OPACITY, DEFAULT_VISIBLE_OPACITY, createAnimatedBoundsFollower, createMenuHighlight;
|
|
8328
|
+
var init_create_menu_highlight = __esm({
|
|
8329
|
+
"src/utils/create-menu-highlight.ts"() {
|
|
8330
|
+
"use strict";
|
|
8331
|
+
DEFAULT_HIDDEN_OPACITY = "0";
|
|
8332
|
+
DEFAULT_VISIBLE_OPACITY = "1";
|
|
8333
|
+
createAnimatedBoundsFollower = ({
|
|
8334
|
+
hiddenOpacity = DEFAULT_HIDDEN_OPACITY,
|
|
8335
|
+
visibleOpacity = DEFAULT_VISIBLE_OPACITY
|
|
8336
|
+
} = {}) => {
|
|
8337
|
+
let containerElement;
|
|
8338
|
+
let followerElement;
|
|
8339
|
+
const hideFollower = () => {
|
|
8340
|
+
if (!followerElement) return;
|
|
8341
|
+
followerElement.style.opacity = hiddenOpacity;
|
|
8342
|
+
};
|
|
8343
|
+
const followElement = (targetElement) => {
|
|
8344
|
+
if (!followerElement || !containerElement) return;
|
|
8345
|
+
if (!targetElement) {
|
|
8346
|
+
hideFollower();
|
|
8347
|
+
return;
|
|
8348
|
+
}
|
|
8349
|
+
const containerRect = containerElement.getBoundingClientRect();
|
|
8350
|
+
const targetRect = targetElement.getBoundingClientRect();
|
|
8351
|
+
const targetTopWithinContainer = targetRect.top - containerRect.top + containerElement.scrollTop;
|
|
8352
|
+
const targetLeftWithinContainer = targetRect.left - containerRect.left + containerElement.scrollLeft;
|
|
8353
|
+
followerElement.style.opacity = visibleOpacity;
|
|
8354
|
+
followerElement.style.top = `${targetTopWithinContainer}px`;
|
|
8355
|
+
followerElement.style.left = `${targetLeftWithinContainer}px`;
|
|
8356
|
+
followerElement.style.width = `${targetRect.width}px`;
|
|
8357
|
+
followerElement.style.height = `${targetRect.height}px`;
|
|
8358
|
+
};
|
|
8359
|
+
const setContainerRef = (containerNode) => {
|
|
8360
|
+
containerElement = containerNode;
|
|
8361
|
+
};
|
|
8362
|
+
const setFollowerRef = (followerNode) => {
|
|
8363
|
+
followerElement = followerNode;
|
|
8364
|
+
};
|
|
8365
|
+
return {
|
|
8366
|
+
containerRef: setContainerRef,
|
|
8367
|
+
followerRef: setFollowerRef,
|
|
8368
|
+
followElement,
|
|
8369
|
+
hideFollower
|
|
8370
|
+
};
|
|
8371
|
+
};
|
|
8372
|
+
createMenuHighlight = () => {
|
|
8373
|
+
const {
|
|
8374
|
+
containerRef,
|
|
8375
|
+
followerRef: highlightRef,
|
|
8376
|
+
followElement: updateHighlight,
|
|
8377
|
+
hideFollower: clearHighlight
|
|
8378
|
+
} = createAnimatedBoundsFollower();
|
|
8379
|
+
return {
|
|
8380
|
+
containerRef,
|
|
8381
|
+
highlightRef,
|
|
8382
|
+
updateHighlight,
|
|
8383
|
+
clearHighlight
|
|
8384
|
+
};
|
|
8385
|
+
};
|
|
8386
|
+
}
|
|
8387
|
+
});
|
|
8388
|
+
|
|
8389
|
+
// src/components/selection-label/arrow-navigation-menu.tsx
|
|
8390
|
+
var _tmpl$16, _tmpl$26, _tmpl$34, ArrowNavigationMenu;
|
|
8391
|
+
var init_arrow_navigation_menu = __esm({
|
|
8392
|
+
"src/components/selection-label/arrow-navigation-menu.tsx"() {
|
|
8393
|
+
"use strict";
|
|
8394
|
+
init_web();
|
|
8395
|
+
init_web();
|
|
8396
|
+
init_web();
|
|
8397
|
+
init_web();
|
|
8398
|
+
init_web();
|
|
8399
|
+
init_web();
|
|
8400
|
+
init_web();
|
|
8401
|
+
init_web();
|
|
8402
|
+
init_solid();
|
|
8403
|
+
init_create_menu_highlight();
|
|
8404
|
+
init_bottom_section();
|
|
8405
|
+
_tmpl$16 = /* @__PURE__ */ template(`<div class="relative flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">`);
|
|
8406
|
+
_tmpl$26 = /* @__PURE__ */ template(`<span class=text-black/40>.`);
|
|
8407
|
+
_tmpl$34 = /* @__PURE__ */ template(`<button data-react-grab-ignore-events class="relative z-1 contain-layout flex items-center w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent"><span class="text-[13px] leading-4 h-fit font-medium overflow-hidden text-ellipsis whitespace-nowrap min-w-0 transition-colors">`);
|
|
8408
|
+
ArrowNavigationMenu = (props) => {
|
|
8409
|
+
const {
|
|
8410
|
+
containerRef: highlightContainerRef,
|
|
8411
|
+
highlightRef,
|
|
8412
|
+
updateHighlight,
|
|
8413
|
+
clearHighlight
|
|
8414
|
+
} = createMenuHighlight();
|
|
8415
|
+
let itemRefs = [];
|
|
8416
|
+
createEffect(() => {
|
|
8417
|
+
const itemRef = itemRefs[props.activeIndex];
|
|
8418
|
+
if (itemRef) {
|
|
8419
|
+
updateHighlight(itemRef);
|
|
8420
|
+
}
|
|
8421
|
+
});
|
|
8422
|
+
return createComponent(BottomSection, {
|
|
8423
|
+
get children() {
|
|
8424
|
+
var _el$ = _tmpl$16(), _el$2 = _el$.firstChild;
|
|
8425
|
+
use(highlightContainerRef, _el$);
|
|
8426
|
+
use(highlightRef, _el$2);
|
|
8427
|
+
insert(_el$, createComponent(For, {
|
|
8428
|
+
get each() {
|
|
8429
|
+
return props.items;
|
|
8430
|
+
},
|
|
8431
|
+
children: (item, itemIndex) => (() => {
|
|
8432
|
+
var _el$3 = _tmpl$34(), _el$4 = _el$3.firstChild;
|
|
8433
|
+
_el$3.$$click = (event) => {
|
|
8434
|
+
event.stopPropagation();
|
|
8435
|
+
props.onSelect(itemIndex());
|
|
8436
|
+
};
|
|
8437
|
+
_el$3.addEventListener("pointerleave", () => {
|
|
8438
|
+
const activeRef = itemRefs[props.activeIndex];
|
|
8439
|
+
if (activeRef) {
|
|
8440
|
+
updateHighlight(activeRef);
|
|
8441
|
+
} else {
|
|
8442
|
+
clearHighlight();
|
|
8443
|
+
}
|
|
8444
|
+
});
|
|
8445
|
+
_el$3.addEventListener("pointerenter", (event) => {
|
|
8446
|
+
updateHighlight(event.currentTarget);
|
|
8447
|
+
props.onSelect(itemIndex());
|
|
8448
|
+
});
|
|
8449
|
+
_el$3.$$pointerdown = (event) => event.stopPropagation();
|
|
8450
|
+
use((element) => {
|
|
8451
|
+
itemRefs[itemIndex()] = element;
|
|
8452
|
+
}, _el$3);
|
|
8453
|
+
insert(_el$4, createComponent(Show, {
|
|
8454
|
+
get when() {
|
|
8455
|
+
return item.componentName;
|
|
8456
|
+
},
|
|
8457
|
+
get children() {
|
|
8458
|
+
return [memo(() => item.componentName), _tmpl$26()];
|
|
8459
|
+
}
|
|
8460
|
+
}), null);
|
|
8461
|
+
insert(_el$4, () => item.tagName, null);
|
|
8462
|
+
createRenderEffect((_p$) => {
|
|
8463
|
+
var _v$ = item.tagName, _v$2 = !!(itemIndex() === props.activeIndex), _v$3 = !!(itemIndex() !== props.activeIndex);
|
|
8464
|
+
_v$ !== _p$.e && setAttribute(_el$3, "data-react-grab-arrow-nav-item", _p$.e = _v$);
|
|
8465
|
+
_v$2 !== _p$.t && _el$4.classList.toggle("text-black", _p$.t = _v$2);
|
|
8466
|
+
_v$3 !== _p$.a && _el$4.classList.toggle("text-black/30", _p$.a = _v$3);
|
|
8467
|
+
return _p$;
|
|
8468
|
+
}, {
|
|
8469
|
+
e: void 0,
|
|
8470
|
+
t: void 0,
|
|
8471
|
+
a: void 0
|
|
8472
|
+
});
|
|
8473
|
+
return _el$3;
|
|
8474
|
+
})()
|
|
8475
|
+
}), null);
|
|
8476
|
+
return _el$;
|
|
8477
|
+
}
|
|
8478
|
+
});
|
|
8479
|
+
};
|
|
8480
|
+
delegateEvents(["pointerdown", "click"]);
|
|
8481
|
+
}
|
|
8482
|
+
});
|
|
8483
|
+
|
|
8282
8484
|
// src/components/selection-label/index.tsx
|
|
8283
|
-
var _tmpl$
|
|
8485
|
+
var _tmpl$17, _tmpl$27, _tmpl$35, _tmpl$43, _tmpl$53, _tmpl$63, _tmpl$73, _tmpl$83, _tmpl$92, _tmpl$0, _tmpl$1, _tmpl$102, DEFAULT_OFFSCREEN_POSITION, SelectionLabel;
|
|
8284
8486
|
var init_selection_label = __esm({
|
|
8285
8487
|
"src/components/selection-label/index.tsx"() {
|
|
8286
8488
|
"use strict";
|
|
@@ -8294,6 +8496,7 @@ var init_selection_label = __esm({
|
|
|
8294
8496
|
init_web();
|
|
8295
8497
|
init_web();
|
|
8296
8498
|
init_web();
|
|
8499
|
+
init_web();
|
|
8297
8500
|
init_solid();
|
|
8298
8501
|
init_constants();
|
|
8299
8502
|
init_get_arrow_size();
|
|
@@ -8310,11 +8513,12 @@ var init_selection_label = __esm({
|
|
|
8310
8513
|
init_discard_prompt();
|
|
8311
8514
|
init_error_view();
|
|
8312
8515
|
init_completion_view();
|
|
8313
|
-
|
|
8314
|
-
_tmpl$
|
|
8315
|
-
_tmpl$
|
|
8516
|
+
init_arrow_navigation_menu();
|
|
8517
|
+
_tmpl$17 = /* @__PURE__ */ template(`<button data-react-grab-ignore-events data-react-grab-abort class="contain-layout shrink-0 flex items-center justify-center size-4 rounded-full bg-black cursor-pointer ml-1 interactive-scale"><div class="size-1.5 bg-white rounded-[1px]">`);
|
|
8518
|
+
_tmpl$27 = /* @__PURE__ */ template(`<div class="shrink-0 flex justify-between items-end w-full min-h-4"><textarea data-react-grab-ignore-events class="text-black text-[13px] leading-4 font-medium bg-transparent border-none outline-none resize-none flex-1 p-0 m-0 opacity-50 wrap-break-word overflow-y-auto"placeholder="Add context"rows=1 disabled style=field-sizing:content;min-height:16px;max-height:95px;scrollbar-width:none>`);
|
|
8519
|
+
_tmpl$35 = /* @__PURE__ */ template(`<div class="contain-layout shrink-0 flex flex-col justify-center items-start w-fit h-fit max-w-[280px]"><div class="contain-layout shrink-0 flex items-center gap-1 py-1.5 px-2 w-full h-fit"><span class="shimmer-text text-[13px] leading-4 font-sans font-medium h-fit tabular-nums overflow-hidden text-ellipsis whitespace-nowrap">`);
|
|
8316
8520
|
_tmpl$43 = /* @__PURE__ */ template(`<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5">`);
|
|
8317
|
-
_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
|
|
8521
|
+
_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 w-fit h-fit px-2">`);
|
|
8318
8522
|
_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">`);
|
|
8319
8523
|
_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">`);
|
|
8320
8524
|
_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>`);
|
|
@@ -8354,18 +8558,10 @@ var init_selection_label = __esm({
|
|
|
8354
8558
|
if (props.status === "error" && (props.onAcknowledgeError || props.onRetry)) {
|
|
8355
8559
|
return true;
|
|
8356
8560
|
}
|
|
8561
|
+
if (props.arrowNavigationState?.isVisible) return true;
|
|
8357
8562
|
return false;
|
|
8358
8563
|
};
|
|
8359
|
-
|
|
8360
|
-
if (containerRef && !isTagCurrentlyHovered) {
|
|
8361
|
-
const rect = containerRef.getBoundingClientRect();
|
|
8362
|
-
setMeasuredWidth(rect.width);
|
|
8363
|
-
setMeasuredHeight(rect.height);
|
|
8364
|
-
}
|
|
8365
|
-
if (panelRef) {
|
|
8366
|
-
setPanelWidth(panelRef.getBoundingClientRect().width);
|
|
8367
|
-
}
|
|
8368
|
-
};
|
|
8564
|
+
let resizeObserver;
|
|
8369
8565
|
const handleTagHoverChange = (hovered) => {
|
|
8370
8566
|
isTagCurrentlyHovered = hovered;
|
|
8371
8567
|
};
|
|
@@ -8378,18 +8574,36 @@ var init_selection_label = __esm({
|
|
|
8378
8574
|
const isCtrlCToAbort = event.code === "KeyC" && event.ctrlKey && props.status === "copying" && props.onAbort;
|
|
8379
8575
|
if (isEnterToExpand) {
|
|
8380
8576
|
event.preventDefault();
|
|
8381
|
-
event.stopPropagation();
|
|
8382
8577
|
event.stopImmediatePropagation();
|
|
8383
8578
|
props.onToggleExpand?.();
|
|
8384
8579
|
} else if (isCtrlCToAbort) {
|
|
8385
8580
|
event.preventDefault();
|
|
8386
|
-
event.stopPropagation();
|
|
8387
8581
|
event.stopImmediatePropagation();
|
|
8388
8582
|
props.onAbort?.();
|
|
8389
8583
|
}
|
|
8390
8584
|
};
|
|
8391
8585
|
onMount(() => {
|
|
8392
|
-
|
|
8586
|
+
resizeObserver = new ResizeObserver((entries) => {
|
|
8587
|
+
for (const entry of entries) {
|
|
8588
|
+
const rect = entry.target.getBoundingClientRect();
|
|
8589
|
+
if (entry.target === containerRef && !isTagCurrentlyHovered) {
|
|
8590
|
+
setMeasuredWidth(rect.width);
|
|
8591
|
+
setMeasuredHeight(rect.height);
|
|
8592
|
+
} else if (entry.target === panelRef) {
|
|
8593
|
+
setPanelWidth(rect.width);
|
|
8594
|
+
}
|
|
8595
|
+
}
|
|
8596
|
+
});
|
|
8597
|
+
if (containerRef) {
|
|
8598
|
+
const rect = containerRef.getBoundingClientRect();
|
|
8599
|
+
setMeasuredWidth(rect.width);
|
|
8600
|
+
setMeasuredHeight(rect.height);
|
|
8601
|
+
resizeObserver.observe(containerRef);
|
|
8602
|
+
}
|
|
8603
|
+
if (panelRef) {
|
|
8604
|
+
setPanelWidth(panelRef.getBoundingClientRect().width);
|
|
8605
|
+
resizeObserver.observe(panelRef);
|
|
8606
|
+
}
|
|
8393
8607
|
window.addEventListener("scroll", handleViewportChange, true);
|
|
8394
8608
|
window.addEventListener("resize", handleViewportChange);
|
|
8395
8609
|
window.addEventListener("keydown", handleGlobalKeyDown, {
|
|
@@ -8397,6 +8611,7 @@ var init_selection_label = __esm({
|
|
|
8397
8611
|
});
|
|
8398
8612
|
});
|
|
8399
8613
|
onCleanup(() => {
|
|
8614
|
+
resizeObserver?.disconnect();
|
|
8400
8615
|
window.removeEventListener("scroll", handleViewportChange, true);
|
|
8401
8616
|
window.removeEventListener("resize", handleViewportChange);
|
|
8402
8617
|
window.removeEventListener("keydown", handleGlobalKeyDown, {
|
|
@@ -8410,11 +8625,6 @@ var init_selection_label = __esm({
|
|
|
8410
8625
|
lastValidPosition = null;
|
|
8411
8626
|
}
|
|
8412
8627
|
});
|
|
8413
|
-
const sizeAffectingSignature = createMemo(() => [props.tagName, props.componentName, props.elementsCount, props.statusText, props.inputValue, props.hasAgent, props.isPromptMode, props.isPendingDismiss, props.error, props.isPendingAbort, props.visible, props.status, props.actionCycleState?.items, props.actionCycleState?.activeIndex, props.actionCycleState?.isVisible]);
|
|
8414
|
-
createEffect(() => {
|
|
8415
|
-
void sizeAffectingSignature();
|
|
8416
|
-
queueMicrotask(measureContainer);
|
|
8417
|
-
});
|
|
8418
8628
|
createEffect(() => {
|
|
8419
8629
|
if (props.isPromptMode && inputRef && props.onSubmit) {
|
|
8420
8630
|
const focusTimeout = setTimeout(() => {
|
|
@@ -8492,7 +8702,6 @@ var init_selection_label = __esm({
|
|
|
8492
8702
|
computedArrowPosition
|
|
8493
8703
|
};
|
|
8494
8704
|
});
|
|
8495
|
-
const computedPosition = () => positionComputation().position;
|
|
8496
8705
|
createEffect(() => {
|
|
8497
8706
|
const result = positionComputation();
|
|
8498
8707
|
if (result.computedArrowPosition !== null) {
|
|
@@ -8505,7 +8714,6 @@ var init_selection_label = __esm({
|
|
|
8505
8714
|
if (event.isComposing || event.keyCode === IME_COMPOSING_KEY_CODE) {
|
|
8506
8715
|
return;
|
|
8507
8716
|
}
|
|
8508
|
-
event.stopPropagation();
|
|
8509
8717
|
event.stopImmediatePropagation();
|
|
8510
8718
|
const isEnterWithoutShift = event.code === "Enter" && !event.shiftKey;
|
|
8511
8719
|
const isEscape = event.code === "Escape";
|
|
@@ -8534,8 +8742,8 @@ var init_selection_label = __esm({
|
|
|
8534
8742
|
const actionCycleItems = () => props.actionCycleState?.items ?? [];
|
|
8535
8743
|
const actionCycleActiveIndex = () => props.actionCycleState?.activeIndex ?? 0;
|
|
8536
8744
|
const isActionCycleVisible = () => Boolean(props.actionCycleState?.isVisible);
|
|
8745
|
+
const isArrowNavigationVisible = () => Boolean(props.arrowNavigationState?.isVisible);
|
|
8537
8746
|
const handleTagClick = (event) => {
|
|
8538
|
-
event.stopPropagation();
|
|
8539
8747
|
event.stopImmediatePropagation();
|
|
8540
8748
|
if (props.filePath && props.onOpen) {
|
|
8541
8749
|
props.onOpen();
|
|
@@ -8543,7 +8751,6 @@ var init_selection_label = __esm({
|
|
|
8543
8751
|
};
|
|
8544
8752
|
const isTagClickable = () => Boolean(props.filePath && props.onOpen);
|
|
8545
8753
|
const handleContainerPointerDown = (event) => {
|
|
8546
|
-
event.stopPropagation();
|
|
8547
8754
|
event.stopImmediatePropagation();
|
|
8548
8755
|
const isEditableInputVisible = canInteract() && props.isPromptMode && !props.isPendingDismiss && props.onSubmit;
|
|
8549
8756
|
if (isEditableInputVisible && inputRef) {
|
|
@@ -8560,7 +8767,6 @@ var init_selection_label = __esm({
|
|
|
8560
8767
|
_el$.addEventListener("mouseleave", () => props.onHoverChange?.(false));
|
|
8561
8768
|
_el$.addEventListener("mouseenter", () => props.onHoverChange?.(true));
|
|
8562
8769
|
_el$.$$click = (event) => {
|
|
8563
|
-
event.stopPropagation();
|
|
8564
8770
|
event.stopImmediatePropagation();
|
|
8565
8771
|
};
|
|
8566
8772
|
_el$.$$pointerdown = handleContainerPointerDown;
|
|
@@ -8576,10 +8782,10 @@ var init_selection_label = __esm({
|
|
|
8576
8782
|
return arrowPosition();
|
|
8577
8783
|
},
|
|
8578
8784
|
get leftPercent() {
|
|
8579
|
-
return
|
|
8785
|
+
return positionComputation().position.arrowLeftPercent;
|
|
8580
8786
|
},
|
|
8581
8787
|
get leftOffsetPx() {
|
|
8582
|
-
return
|
|
8788
|
+
return positionComputation().position.arrowLeftOffset;
|
|
8583
8789
|
},
|
|
8584
8790
|
get labelWidth() {
|
|
8585
8791
|
return panelWidth();
|
|
@@ -8617,9 +8823,6 @@ var init_selection_label = __esm({
|
|
|
8617
8823
|
get onFollowUpSubmit() {
|
|
8618
8824
|
return props.onFollowUpSubmit;
|
|
8619
8825
|
},
|
|
8620
|
-
onCopyStateChange: () => {
|
|
8621
|
-
queueMicrotask(measureContainer);
|
|
8622
|
-
},
|
|
8623
8826
|
onFadingChange: setIsInternalFading,
|
|
8624
8827
|
get onShowContextMenu() {
|
|
8625
8828
|
return props.onShowContextMenu;
|
|
@@ -8634,7 +8837,7 @@ var init_selection_label = __esm({
|
|
|
8634
8837
|
return memo(() => props.status === "copying")() && !props.isPendingAbort;
|
|
8635
8838
|
},
|
|
8636
8839
|
get children() {
|
|
8637
|
-
var _el$3 = _tmpl$
|
|
8840
|
+
var _el$3 = _tmpl$35(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
|
|
8638
8841
|
insert(_el$4, createComponent(IconLoader, {
|
|
8639
8842
|
size: 13,
|
|
8640
8843
|
"class": "text-[#71717a] shrink-0"
|
|
@@ -8647,7 +8850,7 @@ var init_selection_label = __esm({
|
|
|
8647
8850
|
get children() {
|
|
8648
8851
|
return createComponent(BottomSection, {
|
|
8649
8852
|
get children() {
|
|
8650
|
-
var _el$6 = _tmpl$
|
|
8853
|
+
var _el$6 = _tmpl$27(), _el$7 = _el$6.firstChild;
|
|
8651
8854
|
var _ref$3 = inputRef;
|
|
8652
8855
|
typeof _ref$3 === "function" ? use(_ref$3, _el$7) : inputRef = _el$7;
|
|
8653
8856
|
insert(_el$6, createComponent(Show, {
|
|
@@ -8655,7 +8858,7 @@ var init_selection_label = __esm({
|
|
|
8655
8858
|
return props.onAbort;
|
|
8656
8859
|
},
|
|
8657
8860
|
get children() {
|
|
8658
|
-
var _el$8 = _tmpl$
|
|
8861
|
+
var _el$8 = _tmpl$17();
|
|
8659
8862
|
_el$8.$$click = (event) => {
|
|
8660
8863
|
event.stopPropagation();
|
|
8661
8864
|
props.onAbort?.();
|
|
@@ -8709,12 +8912,28 @@ var init_selection_label = __esm({
|
|
|
8709
8912
|
onHoverChange: handleTagHoverChange,
|
|
8710
8913
|
shrink: true,
|
|
8711
8914
|
get forceShowIcon() {
|
|
8712
|
-
return Boolean(props.isContextMenuOpen);
|
|
8915
|
+
return memo(() => !!isArrowNavigationVisible())() ? isTagClickable() : Boolean(props.isContextMenuOpen);
|
|
8713
8916
|
}
|
|
8714
8917
|
}));
|
|
8715
8918
|
insert(_el$9, createComponent(Show, {
|
|
8716
8919
|
get when() {
|
|
8717
|
-
return
|
|
8920
|
+
return props.arrowNavigationState?.isVisible;
|
|
8921
|
+
},
|
|
8922
|
+
get children() {
|
|
8923
|
+
return createComponent(ArrowNavigationMenu, {
|
|
8924
|
+
get items() {
|
|
8925
|
+
return props.arrowNavigationState.items;
|
|
8926
|
+
},
|
|
8927
|
+
get activeIndex() {
|
|
8928
|
+
return props.arrowNavigationState.activeIndex;
|
|
8929
|
+
},
|
|
8930
|
+
onSelect: (index) => props.onArrowNavigationSelect?.(index)
|
|
8931
|
+
});
|
|
8932
|
+
}
|
|
8933
|
+
}), null);
|
|
8934
|
+
insert(_el$9, createComponent(Show, {
|
|
8935
|
+
get when() {
|
|
8936
|
+
return memo(() => !!!isArrowNavigationVisible())() && isActionCycleVisible();
|
|
8718
8937
|
},
|
|
8719
8938
|
get children() {
|
|
8720
8939
|
return createComponent(BottomSection, {
|
|
@@ -8738,10 +8957,10 @@ var init_selection_label = __esm({
|
|
|
8738
8957
|
}
|
|
8739
8958
|
}), null);
|
|
8740
8959
|
createRenderEffect((_p$) => {
|
|
8741
|
-
var _v$
|
|
8742
|
-
_v$
|
|
8743
|
-
_v$
|
|
8744
|
-
_v$
|
|
8960
|
+
var _v$11 = item.label.toLowerCase(), _v$12 = !!(itemIndex() === actionCycleActiveIndex()), _v$13 = !!(itemIndex() === actionCycleItems().length - 1);
|
|
8961
|
+
_v$11 !== _p$.e && setAttribute(_el$17, "data-react-grab-action-cycle-item", _p$.e = _v$11);
|
|
8962
|
+
_v$12 !== _p$.t && _el$17.classList.toggle("bg-black/5", _p$.t = _v$12);
|
|
8963
|
+
_v$13 !== _p$.a && _el$17.classList.toggle("rounded-b-[6px]", _p$.a = _v$13);
|
|
8745
8964
|
return _p$;
|
|
8746
8965
|
}, {
|
|
8747
8966
|
e: void 0,
|
|
@@ -8756,6 +8975,18 @@ var init_selection_label = __esm({
|
|
|
8756
8975
|
});
|
|
8757
8976
|
}
|
|
8758
8977
|
}), null);
|
|
8978
|
+
createRenderEffect((_p$) => {
|
|
8979
|
+
var _v$ = !!isArrowNavigationVisible(), _v$2 = {
|
|
8980
|
+
"py-1.5": !isArrowNavigationVisible(),
|
|
8981
|
+
"pt-1.5 pb-1": isArrowNavigationVisible()
|
|
8982
|
+
};
|
|
8983
|
+
_v$ !== _p$.e && _el$9.classList.toggle("min-w-[100px]", _p$.e = _v$);
|
|
8984
|
+
_p$.t = classList(_el$0, _v$2, _p$.t);
|
|
8985
|
+
return _p$;
|
|
8986
|
+
}, {
|
|
8987
|
+
e: void 0,
|
|
8988
|
+
t: void 0
|
|
8989
|
+
});
|
|
8759
8990
|
return _el$9;
|
|
8760
8991
|
}
|
|
8761
8992
|
}), null);
|
|
@@ -8815,9 +9046,9 @@ var init_selection_label = __esm({
|
|
|
8815
9046
|
}
|
|
8816
9047
|
}), null);
|
|
8817
9048
|
createRenderEffect((_p$) => {
|
|
8818
|
-
var _v$ = props.replyToPrompt ? "14px" : "0", _v$
|
|
8819
|
-
_v$ !== _p$.e && setStyleProperty(_el$14, "padding-left", _p$.e = _v$);
|
|
8820
|
-
_v$
|
|
9049
|
+
var _v$3 = props.replyToPrompt ? "14px" : "0", _v$4 = !props.onSubmit;
|
|
9050
|
+
_v$3 !== _p$.e && setStyleProperty(_el$14, "padding-left", _p$.e = _v$3);
|
|
9051
|
+
_v$4 !== _p$.t && (_el$15.readOnly = _p$.t = _v$4);
|
|
8821
9052
|
return _p$;
|
|
8822
9053
|
}, {
|
|
8823
9054
|
e: void 0,
|
|
@@ -8865,15 +9096,15 @@ var init_selection_label = __esm({
|
|
|
8865
9096
|
}
|
|
8866
9097
|
}), null);
|
|
8867
9098
|
createRenderEffect((_p$) => {
|
|
8868
|
-
var _v$
|
|
8869
|
-
_v$
|
|
8870
|
-
_v$
|
|
8871
|
-
_v$
|
|
8872
|
-
_v$
|
|
8873
|
-
_v$
|
|
8874
|
-
_v$
|
|
8875
|
-
_v$
|
|
8876
|
-
_v$
|
|
9099
|
+
var _v$5 = cn("fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-opacity duration-100 ease-out"), _v$6 = `${positionComputation().position.top}px`, _v$7 = `${positionComputation().position.left}px`, _v$8 = `translateX(calc(-50% + ${positionComputation().position.edgeOffsetX}px))`, _v$9 = shouldEnablePointerEvents() ? "auto" : "none", _v$0 = props.status === "fading" || isInternalFading() ? 0 : 1, _v$1 = 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$10 = isCompletedStatus() && !props.error ? "none" : void 0;
|
|
9100
|
+
_v$5 !== _p$.e && className(_el$, _p$.e = _v$5);
|
|
9101
|
+
_v$6 !== _p$.t && setStyleProperty(_el$, "top", _p$.t = _v$6);
|
|
9102
|
+
_v$7 !== _p$.a && setStyleProperty(_el$, "left", _p$.a = _v$7);
|
|
9103
|
+
_v$8 !== _p$.o && setStyleProperty(_el$, "transform", _p$.o = _v$8);
|
|
9104
|
+
_v$9 !== _p$.i && setStyleProperty(_el$, "pointer-events", _p$.i = _v$9);
|
|
9105
|
+
_v$0 !== _p$.n && setStyleProperty(_el$, "opacity", _p$.n = _v$0);
|
|
9106
|
+
_v$1 !== _p$.s && className(_el$2, _p$.s = _v$1);
|
|
9107
|
+
_v$10 !== _p$.h && setStyleProperty(_el$2, "display", _p$.h = _v$10);
|
|
8877
9108
|
return _p$;
|
|
8878
9109
|
}, {
|
|
8879
9110
|
e: void 0,
|
|
@@ -8934,18 +9165,18 @@ var init_state = __esm({
|
|
|
8934
9165
|
});
|
|
8935
9166
|
|
|
8936
9167
|
// src/components/icons/icon-select.tsx
|
|
8937
|
-
var _tmpl$
|
|
9168
|
+
var _tmpl$18, IconSelect;
|
|
8938
9169
|
var init_icon_select = __esm({
|
|
8939
9170
|
"src/components/icons/icon-select.tsx"() {
|
|
8940
9171
|
"use strict";
|
|
8941
9172
|
init_web();
|
|
8942
9173
|
init_web();
|
|
8943
9174
|
init_web();
|
|
8944
|
-
_tmpl$
|
|
9175
|
+
_tmpl$18 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 18 18"fill=currentColor><path opacity=0.4 d="M7.65631 10.9565C7.31061 10.0014 7.54012 8.96635 8.25592 8.25195C8.74522 7.76615 9.38771 7.49951 10.0694 7.49951C10.3682 7.49951 10.6641 7.55171 10.9483 7.65381L16.0001 9.49902V4.75C16.0001 3.2334 14.7667 2 13.2501 2H4.75012C3.23352 2 2.00012 3.2334 2.00012 4.75V13.25C2.00012 14.7666 3.23352 16 4.75012 16H9.49962L7.65631 10.9565Z"></path><path d="M17.296 11.5694L10.4415 9.06545C10.0431 8.92235 9.61441 9.01658 9.31551 9.31338C9.01671 9.61168 8.92101 10.0429 9.06551 10.4413L11.5704 17.2948C11.7247 17.7191 12.128 18.0004 12.5772 18.0004C12.585 18.0004 12.5918 17.9999 12.5987 17.9999C13.0577 17.9906 13.4591 17.6913 13.5987 17.2543L14.4854 14.4857L17.2559 13.5985C17.6914 13.4589 17.9903 13.057 18 12.599C18.0097 12.141 17.7267 11.7276 17.296 11.5694Z">`);
|
|
8945
9176
|
IconSelect = (props) => {
|
|
8946
9177
|
const size = () => props.size ?? 14;
|
|
8947
9178
|
return (() => {
|
|
8948
|
-
var _el$ = _tmpl$
|
|
9179
|
+
var _el$ = _tmpl$18();
|
|
8949
9180
|
createRenderEffect((_p$) => {
|
|
8950
9181
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
8951
9182
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -8964,18 +9195,18 @@ var init_icon_select = __esm({
|
|
|
8964
9195
|
});
|
|
8965
9196
|
|
|
8966
9197
|
// src/components/icons/icon-chevron.tsx
|
|
8967
|
-
var _tmpl$
|
|
9198
|
+
var _tmpl$19, IconChevron;
|
|
8968
9199
|
var init_icon_chevron = __esm({
|
|
8969
9200
|
"src/components/icons/icon-chevron.tsx"() {
|
|
8970
9201
|
"use strict";
|
|
8971
9202
|
init_web();
|
|
8972
9203
|
init_web();
|
|
8973
9204
|
init_web();
|
|
8974
|
-
_tmpl$
|
|
9205
|
+
_tmpl$19 = /* @__PURE__ */ template(`<svg xmlns=http://www.w3.org/2000/svg viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2.5 stroke-linecap=round stroke-linejoin=round><path d="m18 15-6-6-6 6">`);
|
|
8975
9206
|
IconChevron = (props) => {
|
|
8976
9207
|
const size = () => props.size ?? 12;
|
|
8977
9208
|
return (() => {
|
|
8978
|
-
var _el$ = _tmpl$
|
|
9209
|
+
var _el$ = _tmpl$19();
|
|
8979
9210
|
createRenderEffect((_p$) => {
|
|
8980
9211
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
8981
9212
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -8994,18 +9225,18 @@ var init_icon_chevron = __esm({
|
|
|
8994
9225
|
});
|
|
8995
9226
|
|
|
8996
9227
|
// src/components/icons/icon-clock.tsx
|
|
8997
|
-
var _tmpl$
|
|
9228
|
+
var _tmpl$20, IconClock;
|
|
8998
9229
|
var init_icon_clock = __esm({
|
|
8999
9230
|
"src/components/icons/icon-clock.tsx"() {
|
|
9000
9231
|
"use strict";
|
|
9001
9232
|
init_web();
|
|
9002
9233
|
init_web();
|
|
9003
9234
|
init_web();
|
|
9004
|
-
_tmpl$
|
|
9235
|
+
_tmpl$20 = /* @__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="M12 1.25C6.06294 1.25 1.25 6.06294 1.25 12C1.25 17.9371 6.06294 22.75 12 22.75C17.9371 22.75 22.75 17.9371 22.75 12C22.75 6.06294 17.9371 1.25 12 1.25ZM13 8C13 7.44772 12.5523 7 12 7C11.4477 7 11 7.44772 11 8V12C11 12.2652 11.1054 12.5196 11.2929 12.7071L13.2929 14.7071C13.6834 15.0976 14.3166 15.0976 14.7071 14.7071C15.0976 14.3166 15.0976 13.6834 14.7071 13.2929L13 11.5858V8Z">`);
|
|
9005
9236
|
IconClock = (props) => {
|
|
9006
9237
|
const size = () => props.size ?? 14;
|
|
9007
9238
|
return (() => {
|
|
9008
|
-
var _el$ = _tmpl$
|
|
9239
|
+
var _el$ = _tmpl$20();
|
|
9009
9240
|
createRenderEffect((_p$) => {
|
|
9010
9241
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
9011
9242
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -9024,18 +9255,18 @@ var init_icon_clock = __esm({
|
|
|
9024
9255
|
});
|
|
9025
9256
|
|
|
9026
9257
|
// src/components/icons/icon-copy.tsx
|
|
9027
|
-
var _tmpl$
|
|
9258
|
+
var _tmpl$21, IconCopy;
|
|
9028
9259
|
var init_icon_copy = __esm({
|
|
9029
9260
|
"src/components/icons/icon-copy.tsx"() {
|
|
9030
9261
|
"use strict";
|
|
9031
9262
|
init_web();
|
|
9032
9263
|
init_web();
|
|
9033
9264
|
init_web();
|
|
9034
|
-
_tmpl$
|
|
9265
|
+
_tmpl$21 = /* @__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">`);
|
|
9035
9266
|
IconCopy = (props) => {
|
|
9036
9267
|
const size = () => props.size ?? 14;
|
|
9037
9268
|
return (() => {
|
|
9038
|
-
var _el$ = _tmpl$
|
|
9269
|
+
var _el$ = _tmpl$21();
|
|
9039
9270
|
createRenderEffect((_p$) => {
|
|
9040
9271
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
9041
9272
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -9629,7 +9860,7 @@ var init_freeze_gsap = __esm({
|
|
|
9629
9860
|
});
|
|
9630
9861
|
|
|
9631
9862
|
// src/utils/freeze-animations.ts
|
|
9632
|
-
var FROZEN_STYLES, GLOBAL_FREEZE_STYLES, styleElement, frozenElements, lastInputElements, globalAnimationStyleElement, ensureStylesInjected, areElementsSame, freezeAllAnimations, unfreezeAllAnimations, freezeAnimations, freezeGlobalAnimations, unfreezeGlobalAnimations;
|
|
9863
|
+
var FROZEN_STYLES, GLOBAL_FREEZE_STYLES, SVG_ROOT_SELECTOR, styleElement, frozenElements, frozenSvgElements, lastInputElements, globalAnimationStyleElement, globalFrozenSvgElements, svgFreezeDepthMap, frozenWaapiAnimations, ensureStylesInjected, areElementsSame, collectFrozenSvgElements, callSvgAnimationMethod, pauseSvgAnimations, resumeSvgAnimations, collectWaapiAnimations, finishAnimations, freezeAllAnimations, unfreezeAllAnimations, freezeAnimations, freezeGlobalAnimations, unfreezeGlobalAnimations;
|
|
9633
9864
|
var init_freeze_animations = __esm({
|
|
9634
9865
|
"src/utils/freeze-animations.ts"() {
|
|
9635
9866
|
"use strict";
|
|
@@ -9649,10 +9880,15 @@ var init_freeze_animations = __esm({
|
|
|
9649
9880
|
transition: none !important;
|
|
9650
9881
|
}
|
|
9651
9882
|
`;
|
|
9883
|
+
SVG_ROOT_SELECTOR = "svg";
|
|
9652
9884
|
styleElement = null;
|
|
9653
9885
|
frozenElements = [];
|
|
9886
|
+
frozenSvgElements = [];
|
|
9654
9887
|
lastInputElements = [];
|
|
9655
9888
|
globalAnimationStyleElement = null;
|
|
9889
|
+
globalFrozenSvgElements = [];
|
|
9890
|
+
svgFreezeDepthMap = /* @__PURE__ */ new Map();
|
|
9891
|
+
frozenWaapiAnimations = [];
|
|
9656
9892
|
ensureStylesInjected = () => {
|
|
9657
9893
|
if (styleElement) return;
|
|
9658
9894
|
styleElement = createStyleElement(
|
|
@@ -9660,7 +9896,70 @@ var init_freeze_animations = __esm({
|
|
|
9660
9896
|
FROZEN_STYLES
|
|
9661
9897
|
);
|
|
9662
9898
|
};
|
|
9663
|
-
areElementsSame = (
|
|
9899
|
+
areElementsSame = (firstElements, secondElements) => firstElements.length === secondElements.length && firstElements.every(
|
|
9900
|
+
(currentElement, index) => currentElement === secondElements[index]
|
|
9901
|
+
);
|
|
9902
|
+
collectFrozenSvgElements = (elements) => {
|
|
9903
|
+
const svgElements = /* @__PURE__ */ new Set();
|
|
9904
|
+
for (const element of elements) {
|
|
9905
|
+
if (element instanceof SVGSVGElement) {
|
|
9906
|
+
svgElements.add(element);
|
|
9907
|
+
} else if (element instanceof SVGElement && element.ownerSVGElement) {
|
|
9908
|
+
svgElements.add(element.ownerSVGElement);
|
|
9909
|
+
}
|
|
9910
|
+
for (const innerSvgElement of element.querySelectorAll(SVG_ROOT_SELECTOR)) {
|
|
9911
|
+
if (innerSvgElement instanceof SVGSVGElement) {
|
|
9912
|
+
svgElements.add(innerSvgElement);
|
|
9913
|
+
}
|
|
9914
|
+
}
|
|
9915
|
+
}
|
|
9916
|
+
return [...svgElements];
|
|
9917
|
+
};
|
|
9918
|
+
callSvgAnimationMethod = (svgElement, methodName) => {
|
|
9919
|
+
const animationMethod = Reflect.get(svgElement, methodName);
|
|
9920
|
+
if (typeof animationMethod !== "function") return;
|
|
9921
|
+
animationMethod.call(svgElement);
|
|
9922
|
+
};
|
|
9923
|
+
pauseSvgAnimations = (svgElements) => {
|
|
9924
|
+
for (const svgElement of svgElements) {
|
|
9925
|
+
const currentFreezeDepth = svgFreezeDepthMap.get(svgElement) ?? 0;
|
|
9926
|
+
if (currentFreezeDepth === 0) {
|
|
9927
|
+
callSvgAnimationMethod(svgElement, "pauseAnimations");
|
|
9928
|
+
}
|
|
9929
|
+
svgFreezeDepthMap.set(svgElement, currentFreezeDepth + 1);
|
|
9930
|
+
}
|
|
9931
|
+
};
|
|
9932
|
+
resumeSvgAnimations = (svgElements) => {
|
|
9933
|
+
for (const svgElement of svgElements) {
|
|
9934
|
+
const currentFreezeDepth = svgFreezeDepthMap.get(svgElement);
|
|
9935
|
+
if (!currentFreezeDepth) continue;
|
|
9936
|
+
if (currentFreezeDepth === 1) {
|
|
9937
|
+
svgFreezeDepthMap.delete(svgElement);
|
|
9938
|
+
callSvgAnimationMethod(svgElement, "unpauseAnimations");
|
|
9939
|
+
continue;
|
|
9940
|
+
}
|
|
9941
|
+
svgFreezeDepthMap.set(svgElement, currentFreezeDepth - 1);
|
|
9942
|
+
}
|
|
9943
|
+
};
|
|
9944
|
+
collectWaapiAnimations = (elements) => {
|
|
9945
|
+
const animations = [];
|
|
9946
|
+
for (const element of elements) {
|
|
9947
|
+
for (const animation of element.getAnimations({ subtree: true })) {
|
|
9948
|
+
if (animation.playState === "running") {
|
|
9949
|
+
animations.push(animation);
|
|
9950
|
+
}
|
|
9951
|
+
}
|
|
9952
|
+
}
|
|
9953
|
+
return animations;
|
|
9954
|
+
};
|
|
9955
|
+
finishAnimations = (animations) => {
|
|
9956
|
+
for (const animation of animations) {
|
|
9957
|
+
try {
|
|
9958
|
+
animation.finish();
|
|
9959
|
+
} catch {
|
|
9960
|
+
}
|
|
9961
|
+
}
|
|
9962
|
+
};
|
|
9664
9963
|
freezeAllAnimations = (elements) => {
|
|
9665
9964
|
if (elements.length === 0) return;
|
|
9666
9965
|
if (areElementsSame(elements, lastInputElements)) return;
|
|
@@ -9668,16 +9967,27 @@ var init_freeze_animations = __esm({
|
|
|
9668
9967
|
lastInputElements = [...elements];
|
|
9669
9968
|
ensureStylesInjected();
|
|
9670
9969
|
frozenElements = elements;
|
|
9970
|
+
frozenSvgElements = collectFrozenSvgElements(frozenElements);
|
|
9971
|
+
pauseSvgAnimations(frozenSvgElements);
|
|
9671
9972
|
for (const element of frozenElements) {
|
|
9672
9973
|
element.setAttribute(FROZEN_ELEMENT_ATTRIBUTE, "");
|
|
9673
9974
|
}
|
|
9975
|
+
frozenWaapiAnimations = collectWaapiAnimations(frozenElements);
|
|
9976
|
+
for (const animation of frozenWaapiAnimations) {
|
|
9977
|
+
animation.pause();
|
|
9978
|
+
}
|
|
9674
9979
|
};
|
|
9675
9980
|
unfreezeAllAnimations = () => {
|
|
9676
|
-
if (frozenElements.length === 0)
|
|
9981
|
+
if (frozenElements.length === 0 && frozenSvgElements.length === 0 && frozenWaapiAnimations.length === 0)
|
|
9982
|
+
return;
|
|
9677
9983
|
for (const element of frozenElements) {
|
|
9678
9984
|
element.removeAttribute(FROZEN_ELEMENT_ATTRIBUTE);
|
|
9679
9985
|
}
|
|
9986
|
+
resumeSvgAnimations(frozenSvgElements);
|
|
9987
|
+
finishAnimations(frozenWaapiAnimations);
|
|
9680
9988
|
frozenElements = [];
|
|
9989
|
+
frozenSvgElements = [];
|
|
9990
|
+
frozenWaapiAnimations = [];
|
|
9681
9991
|
lastInputElements = [];
|
|
9682
9992
|
};
|
|
9683
9993
|
freezeAnimations = (elements) => {
|
|
@@ -9695,6 +10005,10 @@ var init_freeze_animations = __esm({
|
|
|
9695
10005
|
"data-react-grab-global-freeze",
|
|
9696
10006
|
GLOBAL_FREEZE_STYLES
|
|
9697
10007
|
);
|
|
10008
|
+
globalFrozenSvgElements = collectFrozenSvgElements(
|
|
10009
|
+
Array.from(document.querySelectorAll(SVG_ROOT_SELECTOR))
|
|
10010
|
+
);
|
|
10011
|
+
pauseSvgAnimations(globalFrozenSvgElements);
|
|
9698
10012
|
freezeGsap();
|
|
9699
10013
|
};
|
|
9700
10014
|
unfreezeGlobalAnimations = () => {
|
|
@@ -9704,6 +10018,7 @@ var init_freeze_animations = __esm({
|
|
|
9704
10018
|
transition: none !important;
|
|
9705
10019
|
}
|
|
9706
10020
|
`;
|
|
10021
|
+
const animations = [];
|
|
9707
10022
|
for (const animation of document.getAnimations()) {
|
|
9708
10023
|
if (animation.effect instanceof KeyframeEffect) {
|
|
9709
10024
|
const target = animation.effect.target;
|
|
@@ -9714,13 +10029,13 @@ var init_freeze_animations = __esm({
|
|
|
9714
10029
|
}
|
|
9715
10030
|
}
|
|
9716
10031
|
}
|
|
9717
|
-
|
|
9718
|
-
animation.finish();
|
|
9719
|
-
} catch {
|
|
9720
|
-
}
|
|
10032
|
+
animations.push(animation);
|
|
9721
10033
|
}
|
|
10034
|
+
finishAnimations(animations);
|
|
9722
10035
|
globalAnimationStyleElement.remove();
|
|
9723
10036
|
globalAnimationStyleElement = null;
|
|
10037
|
+
resumeSvgAnimations(globalFrozenSvgElements);
|
|
10038
|
+
globalFrozenSvgElements = [];
|
|
9724
10039
|
unfreezeGsap();
|
|
9725
10040
|
};
|
|
9726
10041
|
}
|
|
@@ -9806,21 +10121,28 @@ var init_is_valid_grabbable_element = __esm({
|
|
|
9806
10121
|
return cached.isVisible;
|
|
9807
10122
|
}
|
|
9808
10123
|
const computedStyle = window.getComputedStyle(element);
|
|
9809
|
-
|
|
10124
|
+
const isVisible = isElementVisible(element, computedStyle);
|
|
10125
|
+
if (!isVisible) {
|
|
10126
|
+
visibilityCache.set(element, { isVisible: false, timestamp: now });
|
|
9810
10127
|
return false;
|
|
9811
10128
|
}
|
|
9812
|
-
|
|
9813
|
-
|
|
10129
|
+
const couldBeOverlay = element.clientWidth / window.innerWidth >= VIEWPORT_COVERAGE_THRESHOLD && element.clientHeight / window.innerHeight >= VIEWPORT_COVERAGE_THRESHOLD;
|
|
10130
|
+
if (couldBeOverlay) {
|
|
10131
|
+
if (isDevToolsOverlay(computedStyle)) {
|
|
10132
|
+
return false;
|
|
10133
|
+
}
|
|
10134
|
+
if (isFullViewportOverlay(element, computedStyle)) {
|
|
10135
|
+
return false;
|
|
10136
|
+
}
|
|
9814
10137
|
}
|
|
9815
|
-
|
|
9816
|
-
|
|
9817
|
-
return isVisible;
|
|
10138
|
+
visibilityCache.set(element, { isVisible: true, timestamp: now });
|
|
10139
|
+
return true;
|
|
9818
10140
|
};
|
|
9819
10141
|
}
|
|
9820
10142
|
});
|
|
9821
10143
|
|
|
9822
10144
|
// src/utils/get-element-at-position.ts
|
|
9823
|
-
var cache, isWithinThreshold, getElementsAtPoint, getElementAtPosition, clearElementPositionCache;
|
|
10145
|
+
var cache, resumeTimerId, scheduleResume, cancelScheduledResume, isWithinThreshold, getElementsAtPoint, getElementAtPosition, clearElementPositionCache;
|
|
9824
10146
|
var init_get_element_at_position = __esm({
|
|
9825
10147
|
"src/utils/get-element-at-position.ts"() {
|
|
9826
10148
|
"use strict";
|
|
@@ -9828,15 +10150,32 @@ var init_get_element_at_position = __esm({
|
|
|
9828
10150
|
init_constants();
|
|
9829
10151
|
init_freeze_pseudo_states();
|
|
9830
10152
|
cache = null;
|
|
10153
|
+
resumeTimerId = null;
|
|
10154
|
+
scheduleResume = () => {
|
|
10155
|
+
if (resumeTimerId !== null) {
|
|
10156
|
+
clearTimeout(resumeTimerId);
|
|
10157
|
+
}
|
|
10158
|
+
resumeTimerId = setTimeout(() => {
|
|
10159
|
+
resumeTimerId = null;
|
|
10160
|
+
resumePointerEventsFreeze();
|
|
10161
|
+
}, POINTER_EVENTS_RESUME_DEBOUNCE_MS);
|
|
10162
|
+
};
|
|
10163
|
+
cancelScheduledResume = () => {
|
|
10164
|
+
if (resumeTimerId !== null) {
|
|
10165
|
+
clearTimeout(resumeTimerId);
|
|
10166
|
+
resumeTimerId = null;
|
|
10167
|
+
}
|
|
10168
|
+
};
|
|
9831
10169
|
isWithinThreshold = (x1, y1, x22, y22) => {
|
|
9832
10170
|
const deltaX = Math.abs(x1 - x22);
|
|
9833
10171
|
const deltaY = Math.abs(y1 - y22);
|
|
9834
10172
|
return deltaX <= ELEMENT_POSITION_CACHE_DISTANCE_THRESHOLD_PX && deltaY <= ELEMENT_POSITION_CACHE_DISTANCE_THRESHOLD_PX;
|
|
9835
10173
|
};
|
|
9836
10174
|
getElementsAtPoint = (clientX, clientY) => {
|
|
10175
|
+
cancelScheduledResume();
|
|
9837
10176
|
suspendPointerEventsFreeze();
|
|
9838
10177
|
const elements = document.elementsFromPoint(clientX, clientY);
|
|
9839
|
-
|
|
10178
|
+
scheduleResume();
|
|
9840
10179
|
return elements;
|
|
9841
10180
|
};
|
|
9842
10181
|
getElementAtPosition = (clientX, clientY) => {
|
|
@@ -9853,31 +10192,41 @@ var init_get_element_at_position = __esm({
|
|
|
9853
10192
|
return cache.element;
|
|
9854
10193
|
}
|
|
9855
10194
|
}
|
|
9856
|
-
|
|
10195
|
+
cancelScheduledResume();
|
|
10196
|
+
suspendPointerEventsFreeze();
|
|
9857
10197
|
let result = null;
|
|
9858
|
-
|
|
9859
|
-
|
|
9860
|
-
|
|
9861
|
-
|
|
10198
|
+
const topElement = document.elementFromPoint(clientX, clientY);
|
|
10199
|
+
if (topElement && isValidGrabbableElement(topElement)) {
|
|
10200
|
+
result = topElement;
|
|
10201
|
+
} else {
|
|
10202
|
+
const elementsAtPoint = document.elementsFromPoint(clientX, clientY);
|
|
10203
|
+
for (const candidateElement of elementsAtPoint) {
|
|
10204
|
+
if (candidateElement !== topElement && isValidGrabbableElement(candidateElement)) {
|
|
10205
|
+
result = candidateElement;
|
|
10206
|
+
break;
|
|
10207
|
+
}
|
|
9862
10208
|
}
|
|
9863
10209
|
}
|
|
10210
|
+
scheduleResume();
|
|
9864
10211
|
cache = { clientX, clientY, element: result, timestamp: now };
|
|
9865
10212
|
return result;
|
|
9866
10213
|
};
|
|
9867
10214
|
clearElementPositionCache = () => {
|
|
10215
|
+
cancelScheduledResume();
|
|
10216
|
+
resumePointerEventsFreeze();
|
|
9868
10217
|
cache = null;
|
|
9869
10218
|
};
|
|
9870
10219
|
}
|
|
9871
10220
|
});
|
|
9872
10221
|
|
|
9873
10222
|
// src/utils/freeze-pseudo-states.ts
|
|
9874
|
-
var POINTER_EVENTS_STYLES, MOUSE_EVENTS_TO_BLOCK, FOCUS_EVENTS_TO_BLOCK, HOVER_STYLE_PROPERTIES, FOCUS_STYLE_PROPERTIES,
|
|
10223
|
+
var POINTER_EVENTS_STYLES, MOUSE_EVENTS_TO_BLOCK, FOCUS_EVENTS_TO_BLOCK, HOVER_STYLE_PROPERTIES, FOCUS_STYLE_PROPERTIES, frozenHoverElements, frozenFocusElements, pointerEventsStyle, stopEvent, preventFocusChange, collectOriginalPropertyValues, collectPseudoStates, applyFrozenStates, restoreFrozenStates, suspendPointerEventsFreeze, resumePointerEventsFreeze, freezePseudoStates, unfreezePseudoStates;
|
|
9875
10224
|
var init_freeze_pseudo_states = __esm({
|
|
9876
10225
|
"src/utils/freeze-pseudo-states.ts"() {
|
|
9877
10226
|
"use strict";
|
|
9878
10227
|
init_get_element_at_position();
|
|
9879
10228
|
init_create_style_element();
|
|
9880
|
-
POINTER_EVENTS_STYLES = "
|
|
10229
|
+
POINTER_EVENTS_STYLES = "html { pointer-events: none !important; }";
|
|
9881
10230
|
MOUSE_EVENTS_TO_BLOCK = [
|
|
9882
10231
|
"mouseenter",
|
|
9883
10232
|
"mouseleave",
|
|
@@ -9916,80 +10265,62 @@ var init_freeze_pseudo_states = __esm({
|
|
|
9916
10265
|
"ring-color",
|
|
9917
10266
|
"ring-width"
|
|
9918
10267
|
];
|
|
9919
|
-
ANIMATION_CONTROLLED_PROPERTIES = [
|
|
9920
|
-
"opacity",
|
|
9921
|
-
"transform",
|
|
9922
|
-
"scale",
|
|
9923
|
-
"translate",
|
|
9924
|
-
"rotate"
|
|
9925
|
-
];
|
|
9926
10268
|
frozenHoverElements = /* @__PURE__ */ new Map();
|
|
9927
10269
|
frozenFocusElements = /* @__PURE__ */ new Map();
|
|
9928
10270
|
pointerEventsStyle = null;
|
|
9929
10271
|
stopEvent = (event) => {
|
|
9930
|
-
event.stopPropagation();
|
|
9931
10272
|
event.stopImmediatePropagation();
|
|
9932
10273
|
};
|
|
9933
10274
|
preventFocusChange = (event) => {
|
|
9934
10275
|
event.preventDefault();
|
|
9935
|
-
event.stopPropagation();
|
|
9936
10276
|
event.stopImmediatePropagation();
|
|
9937
10277
|
};
|
|
9938
|
-
|
|
9939
|
-
const
|
|
9940
|
-
|
|
9941
|
-
|
|
9942
|
-
|
|
9943
|
-
|
|
9944
|
-
collectHoverStates = () => {
|
|
9945
|
-
const elementsToFreeze = [];
|
|
9946
|
-
for (const element of document.querySelectorAll(":hover")) {
|
|
9947
|
-
if (!(element instanceof HTMLElement)) continue;
|
|
9948
|
-
const originalCssText = element.style.cssText;
|
|
9949
|
-
const computed = getComputedStyle(element);
|
|
9950
|
-
let frozenStyles = originalCssText;
|
|
9951
|
-
for (const prop of HOVER_STYLE_PROPERTIES) {
|
|
9952
|
-
const computedValue = computed.getPropertyValue(prop);
|
|
9953
|
-
if (computedValue) {
|
|
9954
|
-
frozenStyles += `${prop}: ${computedValue} !important; `;
|
|
9955
|
-
}
|
|
10278
|
+
collectOriginalPropertyValues = (element, properties) => {
|
|
10279
|
+
const originalPropertyValues = /* @__PURE__ */ new Map();
|
|
10280
|
+
for (const prop of properties) {
|
|
10281
|
+
const inlineValue = element.style.getPropertyValue(prop);
|
|
10282
|
+
if (inlineValue) {
|
|
10283
|
+
originalPropertyValues.set(prop, inlineValue);
|
|
9956
10284
|
}
|
|
9957
|
-
elementsToFreeze.push({ element, originalCssText, frozenStyles });
|
|
9958
10285
|
}
|
|
9959
|
-
return
|
|
10286
|
+
return originalPropertyValues;
|
|
9960
10287
|
};
|
|
9961
|
-
|
|
10288
|
+
collectPseudoStates = (selector, properties, alreadyFrozen) => {
|
|
9962
10289
|
const elementsToFreeze = [];
|
|
9963
|
-
for (const element of document.querySelectorAll(
|
|
10290
|
+
for (const element of document.querySelectorAll(selector)) {
|
|
9964
10291
|
if (!(element instanceof HTMLElement)) continue;
|
|
9965
|
-
if (
|
|
9966
|
-
const originalCssText = element.style.cssText;
|
|
10292
|
+
if (alreadyFrozen?.has(element)) continue;
|
|
9967
10293
|
const computed = getComputedStyle(element);
|
|
9968
|
-
let frozenStyles =
|
|
9969
|
-
|
|
10294
|
+
let frozenStyles = element.style.cssText;
|
|
10295
|
+
const originalPropertyValues = collectOriginalPropertyValues(
|
|
10296
|
+
element,
|
|
10297
|
+
properties
|
|
10298
|
+
);
|
|
10299
|
+
for (const prop of properties) {
|
|
9970
10300
|
const computedValue = computed.getPropertyValue(prop);
|
|
9971
10301
|
if (computedValue) {
|
|
9972
10302
|
frozenStyles += `${prop}: ${computedValue} !important; `;
|
|
9973
10303
|
}
|
|
9974
10304
|
}
|
|
9975
|
-
elementsToFreeze.push({ element,
|
|
10305
|
+
elementsToFreeze.push({ element, frozenStyles, originalPropertyValues });
|
|
9976
10306
|
}
|
|
9977
10307
|
return elementsToFreeze;
|
|
9978
10308
|
};
|
|
9979
10309
|
applyFrozenStates = (states, storageMap) => {
|
|
9980
|
-
for (const { element,
|
|
9981
|
-
storageMap.set(element,
|
|
10310
|
+
for (const { element, frozenStyles, originalPropertyValues } of states) {
|
|
10311
|
+
storageMap.set(element, originalPropertyValues);
|
|
9982
10312
|
element.style.cssText = frozenStyles;
|
|
9983
10313
|
}
|
|
9984
10314
|
};
|
|
9985
10315
|
restoreFrozenStates = (storageMap, styleProperties) => {
|
|
9986
|
-
for (const [element,
|
|
9987
|
-
|
|
9988
|
-
|
|
10316
|
+
for (const [element, originalPropertyValues] of storageMap) {
|
|
10317
|
+
for (const prop of styleProperties) {
|
|
10318
|
+
const originalValue = originalPropertyValues.get(prop);
|
|
10319
|
+
if (originalValue) {
|
|
10320
|
+
element.style.setProperty(prop, originalValue);
|
|
10321
|
+
} else {
|
|
9989
10322
|
element.style.removeProperty(prop);
|
|
9990
10323
|
}
|
|
9991
|
-
} else {
|
|
9992
|
-
element.style.cssText = originalCssText;
|
|
9993
10324
|
}
|
|
9994
10325
|
}
|
|
9995
10326
|
storageMap.clear();
|
|
@@ -10008,8 +10339,12 @@ var init_freeze_pseudo_states = __esm({
|
|
|
10008
10339
|
for (const eventType of FOCUS_EVENTS_TO_BLOCK) {
|
|
10009
10340
|
document.addEventListener(eventType, preventFocusChange, true);
|
|
10010
10341
|
}
|
|
10011
|
-
const hoverStates =
|
|
10012
|
-
const focusStates =
|
|
10342
|
+
const hoverStates = collectPseudoStates(":hover", HOVER_STYLE_PROPERTIES);
|
|
10343
|
+
const focusStates = collectPseudoStates(
|
|
10344
|
+
":focus, :focus-visible",
|
|
10345
|
+
FOCUS_STYLE_PROPERTIES,
|
|
10346
|
+
frozenFocusElements
|
|
10347
|
+
);
|
|
10013
10348
|
applyFrozenStates(hoverStates, frozenHoverElements);
|
|
10014
10349
|
applyFrozenStates(focusStates, frozenFocusElements);
|
|
10015
10350
|
pointerEventsStyle = createStyleElement(
|
|
@@ -10034,7 +10369,7 @@ var init_freeze_pseudo_states = __esm({
|
|
|
10034
10369
|
});
|
|
10035
10370
|
|
|
10036
10371
|
// src/components/tooltip.tsx
|
|
10037
|
-
var _tmpl$
|
|
10372
|
+
var _tmpl$28, tooltipCloseTimestamp, wasTooltipRecentlyVisible, Tooltip;
|
|
10038
10373
|
var init_tooltip = __esm({
|
|
10039
10374
|
"src/components/tooltip.tsx"() {
|
|
10040
10375
|
"use strict";
|
|
@@ -10046,7 +10381,7 @@ var init_tooltip = __esm({
|
|
|
10046
10381
|
init_solid();
|
|
10047
10382
|
init_cn();
|
|
10048
10383
|
init_constants();
|
|
10049
|
-
_tmpl$
|
|
10384
|
+
_tmpl$28 = /* @__PURE__ */ template(`<div style=z-index:2147483647>`);
|
|
10050
10385
|
tooltipCloseTimestamp = 0;
|
|
10051
10386
|
wasTooltipRecentlyVisible = () => {
|
|
10052
10387
|
return Date.now() - tooltipCloseTimestamp < TOOLTIP_GRACE_PERIOD_MS;
|
|
@@ -10090,7 +10425,7 @@ var init_tooltip = __esm({
|
|
|
10090
10425
|
return delayedVisible();
|
|
10091
10426
|
},
|
|
10092
10427
|
get children() {
|
|
10093
|
-
var _el$ = _tmpl$
|
|
10428
|
+
var _el$ = _tmpl$28();
|
|
10094
10429
|
insert(_el$, () => props.children);
|
|
10095
10430
|
createRenderEffect(() => className(_el$, cn("absolute 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 === "left" || props.position === "right" ? "top-1/2 -translate-y-1/2" : "left-1/2 -translate-x-1/2", props.position === "top" && "bottom-full mb-2.5", props.position === "bottom" && "top-full mt-2.5", props.position === "left" && "right-full mr-2.5", props.position === "right" && "left-full ml-2.5", shouldAnimate() && "animate-tooltip-fade-in")));
|
|
10096
10431
|
return _el$;
|
|
@@ -10119,7 +10454,7 @@ var init_toolbar_layout = __esm({
|
|
|
10119
10454
|
});
|
|
10120
10455
|
|
|
10121
10456
|
// src/components/toolbar/index.tsx
|
|
10122
|
-
var _tmpl$
|
|
10457
|
+
var _tmpl$29, _tmpl$210, _tmpl$36, Toolbar;
|
|
10123
10458
|
var init_toolbar = __esm({
|
|
10124
10459
|
"src/components/toolbar/index.tsx"() {
|
|
10125
10460
|
"use strict";
|
|
@@ -10135,6 +10470,7 @@ var init_toolbar = __esm({
|
|
|
10135
10470
|
init_web();
|
|
10136
10471
|
init_web();
|
|
10137
10472
|
init_web();
|
|
10473
|
+
init_web();
|
|
10138
10474
|
init_solid();
|
|
10139
10475
|
init_cn();
|
|
10140
10476
|
init_format_shortcut();
|
|
@@ -10152,9 +10488,9 @@ var init_toolbar = __esm({
|
|
|
10152
10488
|
init_tooltip();
|
|
10153
10489
|
init_toolbar_layout();
|
|
10154
10490
|
init_native_raf();
|
|
10155
|
-
_tmpl$
|
|
10156
|
-
_tmpl$
|
|
10157
|
-
_tmpl$
|
|
10491
|
+
_tmpl$29 = /* @__PURE__ */ template(`<span data-react-grab-unread-indicator class="absolute -top-0.5 -right-0.5 w-1.5 h-1.5 rounded-full bg-[#404040]">`);
|
|
10492
|
+
_tmpl$210 = /* @__PURE__ */ template(`<div style=z-index:2147483647>Enable to continue`);
|
|
10493
|
+
_tmpl$36 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-toolbar style=z-index:2147483647><div><div><div><div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-toggle></button></div></div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-history aria-haspopup=menu><span class="inline-flex relative"></span></button></div></div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-copy-all aria-label="Copy all history items"></button></div></div><div><div><button data-react-grab-ignore-events data-react-grab-toolbar-menu aria-haspopup=menu></button></div></div></div><div class="relative shrink-0 overflow-visible"><button data-react-grab-ignore-events data-react-grab-toolbar-enabled><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">`);
|
|
10158
10494
|
Toolbar = (props) => {
|
|
10159
10495
|
let containerRef;
|
|
10160
10496
|
let expandableButtonsRef;
|
|
@@ -10260,7 +10596,6 @@ var init_toolbar = __esm({
|
|
|
10260
10596
|
return `left-1/2 -translate-x-1/2 ${placementClass}`;
|
|
10261
10597
|
};
|
|
10262
10598
|
const stopEventPropagation = (event) => {
|
|
10263
|
-
event.stopPropagation();
|
|
10264
10599
|
event.stopImmediatePropagation();
|
|
10265
10600
|
};
|
|
10266
10601
|
const createFreezeHandlers = (setTooltipVisible, options) => ({
|
|
@@ -10529,7 +10864,6 @@ var init_toolbar = __esm({
|
|
|
10529
10864
|
};
|
|
10530
10865
|
let didDragOccur = false;
|
|
10531
10866
|
const createDragAwareHandler = (callback) => (event) => {
|
|
10532
|
-
event.stopPropagation();
|
|
10533
10867
|
event.stopImmediatePropagation();
|
|
10534
10868
|
if (didDragOccur) {
|
|
10535
10869
|
didDragOccur = false;
|
|
@@ -11094,9 +11428,9 @@ var init_toolbar = __esm({
|
|
|
11094
11428
|
}
|
|
11095
11429
|
};
|
|
11096
11430
|
return (() => {
|
|
11097
|
-
var _el$ = _tmpl$
|
|
11431
|
+
var _el$ = _tmpl$36(), _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$1.firstChild, _el$12 = _el$9.nextSibling, _el$13 = _el$12.firstChild, _el$14 = _el$13.firstChild, _el$15 = _el$12.nextSibling, _el$16 = _el$15.firstChild, _el$17 = _el$16.firstChild, _el$18 = _el$5.nextSibling, _el$19 = _el$18.firstChild, _el$20 = _el$19.firstChild, _el$21 = _el$20.firstChild, _el$22 = _el$3.nextSibling;
|
|
11098
11432
|
_el$.addEventListener("mouseleave", () => props.onSelectHoverChange?.(false));
|
|
11099
|
-
_el$.addEventListener("mouseenter", () => props.onSelectHoverChange?.(true));
|
|
11433
|
+
_el$.addEventListener("mouseenter", () => !isCollapsed() && props.onSelectHoverChange?.(true));
|
|
11100
11434
|
_el$.$$pointerdown = handlePointerDown;
|
|
11101
11435
|
var _ref$ = containerRef;
|
|
11102
11436
|
typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
|
|
@@ -11138,6 +11472,12 @@ var init_toolbar = __esm({
|
|
|
11138
11472
|
handlePointerDown(event);
|
|
11139
11473
|
});
|
|
11140
11474
|
spread(_el$8, mergeProps({
|
|
11475
|
+
get ["aria-label"]() {
|
|
11476
|
+
return props.isActive ? "Stop selecting element" : "Select element";
|
|
11477
|
+
},
|
|
11478
|
+
get ["aria-pressed"]() {
|
|
11479
|
+
return Boolean(props.isActive);
|
|
11480
|
+
},
|
|
11141
11481
|
get ["class"]() {
|
|
11142
11482
|
return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
|
|
11143
11483
|
}
|
|
@@ -11169,6 +11509,12 @@ var init_toolbar = __esm({
|
|
|
11169
11509
|
handlePointerDown(event);
|
|
11170
11510
|
});
|
|
11171
11511
|
spread(_el$1, mergeProps({
|
|
11512
|
+
get ["aria-label"]() {
|
|
11513
|
+
return `Open history${(props.historyItemCount ?? 0) > 0 ? ` (${props.historyItemCount ?? 0} items)` : ""}`;
|
|
11514
|
+
},
|
|
11515
|
+
get ["aria-expanded"]() {
|
|
11516
|
+
return Boolean(props.isHistoryDropdownOpen);
|
|
11517
|
+
},
|
|
11172
11518
|
get ["class"]() {
|
|
11173
11519
|
return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
|
|
11174
11520
|
}
|
|
@@ -11193,7 +11539,7 @@ var init_toolbar = __esm({
|
|
|
11193
11539
|
return props.hasUnreadHistoryItems;
|
|
11194
11540
|
},
|
|
11195
11541
|
get children() {
|
|
11196
|
-
return _tmpl$
|
|
11542
|
+
return _tmpl$29();
|
|
11197
11543
|
}
|
|
11198
11544
|
}), null);
|
|
11199
11545
|
insert(_el$0, createComponent(Tooltip, {
|
|
@@ -11248,6 +11594,12 @@ var init_toolbar = __esm({
|
|
|
11248
11594
|
handlePointerDown(event);
|
|
11249
11595
|
});
|
|
11250
11596
|
spread(_el$17, mergeProps({
|
|
11597
|
+
get ["aria-label"]() {
|
|
11598
|
+
return props.isMenuOpen ? "Close more actions menu" : "Open more actions menu";
|
|
11599
|
+
},
|
|
11600
|
+
get ["aria-expanded"]() {
|
|
11601
|
+
return Boolean(props.isMenuOpen);
|
|
11602
|
+
},
|
|
11251
11603
|
get ["class"]() {
|
|
11252
11604
|
return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
|
|
11253
11605
|
}
|
|
@@ -11301,13 +11653,13 @@ var init_toolbar = __esm({
|
|
|
11301
11653
|
return isShakeTooltipVisible();
|
|
11302
11654
|
},
|
|
11303
11655
|
get children() {
|
|
11304
|
-
var _el$23 = _tmpl$
|
|
11656
|
+
var _el$23 = _tmpl$210();
|
|
11305
11657
|
createRenderEffect(() => className(_el$23, cn("absolute 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, shakeTooltipPositionClass())));
|
|
11306
11658
|
return _el$23;
|
|
11307
11659
|
}
|
|
11308
11660
|
}), null);
|
|
11309
11661
|
createRenderEffect((_p$) => {
|
|
11310
|
-
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 relative overflow-visible [font-synthesis:none] [corner-shape:superellipse(1.25)]", isVertical() && "flex-col", PANEL_STYLES, !isCollapsed() && (isVertical() ? "px-1.5 gap-1.5 py-2" : "py-1.5 gap-1.5 px-2"), collapsedEdgeClasses(), isShaking() && "animate-shake"), _v$5 = getTransformOrigin(), _v$6 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(!isCollapsed(), "pointer-events-none")), _v$7 = cn("flex", isVertical() ? "flex-col items-center min-h-0" : "items-center min-w-0"), _v$8 = cn("flex items-center", isVertical() && "flex-col"), _v$9 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.enabled))), _v$0 = cn("relative overflow-visible", minDimensionClass()), _v$1 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.enabled) && (props.historyItemCount ?? 0) > 0, "pointer-events-none")), _v$10 = cn("relative overflow-visible", minDimensionClass()), _v$11 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.isHistoryDropdownOpen), "pointer-events-none")), _v$12 = cn("relative overflow-visible", minDimensionClass()), _v$13 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.enabled) && hasToolbarActions(), "pointer-events-none")), _v$14 = cn("relative overflow-visible", minDimensionClass()), _v$15 = cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale outline-none", isVertical() ? "my-0.5" : "mx-0.5"), _v$
|
|
11662
|
+
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 relative overflow-visible [font-synthesis:none] [corner-shape:superellipse(1.25)]", isVertical() && "flex-col", PANEL_STYLES, !isCollapsed() && (isVertical() ? "px-1.5 gap-1.5 py-2" : "py-1.5 gap-1.5 px-2"), collapsedEdgeClasses(), isShaking() && "animate-shake"), _v$5 = getTransformOrigin(), _v$6 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(!isCollapsed(), "pointer-events-none")), _v$7 = cn("flex", isVertical() ? "flex-col items-center min-h-0" : "items-center min-w-0"), _v$8 = cn("flex items-center", isVertical() && "flex-col"), _v$9 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.enabled))), _v$0 = cn("relative overflow-visible", minDimensionClass()), _v$1 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.enabled) && (props.historyItemCount ?? 0) > 0, "pointer-events-none")), _v$10 = cn("relative overflow-visible", minDimensionClass()), _v$11 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.isHistoryDropdownOpen), "pointer-events-none")), _v$12 = cn("relative overflow-visible", minDimensionClass()), _v$13 = cn("grid", !isRapidRetoggle() && gridTransitionClass(), expandGridClass(Boolean(props.enabled) && hasToolbarActions(), "pointer-events-none")), _v$14 = cn("relative overflow-visible", minDimensionClass()), _v$15 = props.enabled ? "Disable React Grab" : "Enable React Grab", _v$16 = Boolean(props.enabled), _v$17 = cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale outline-none", isVertical() ? "my-0.5" : "mx-0.5"), _v$18 = cn("relative rounded-full transition-colors", isVertical() ? "w-3.5 h-2.5" : "w-5 h-3", props.enabled ? "bg-black" : "bg-black/25"), _v$19 = cn("absolute top-0.5 rounded-full bg-white transition-transform", isVertical() ? "w-1.5 h-1.5" : "w-2 h-2", !props.enabled && "left-0.5", props.enabled && (isVertical() ? "left-1.5" : "left-2.5")), _v$20 = isCollapsed() ? "Expand toolbar" : "Collapse toolbar";
|
|
11311
11663
|
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
11312
11664
|
_v$2 !== _p$.t && setStyleProperty(_el$, "transform", _p$.t = _v$2);
|
|
11313
11665
|
_v$3 !== _p$.a && setStyleProperty(_el$, "transform-origin", _p$.a = _v$3);
|
|
@@ -11324,9 +11676,12 @@ var init_toolbar = __esm({
|
|
|
11324
11676
|
_v$12 !== _p$.w && className(_el$13, _p$.w = _v$12);
|
|
11325
11677
|
_v$13 !== _p$.m && className(_el$15, _p$.m = _v$13);
|
|
11326
11678
|
_v$14 !== _p$.f && className(_el$16, _p$.f = _v$14);
|
|
11327
|
-
_v$15 !== _p$.y &&
|
|
11328
|
-
_v$16 !== _p$.g &&
|
|
11329
|
-
_v$17 !== _p$.p && className(_el$
|
|
11679
|
+
_v$15 !== _p$.y && setAttribute(_el$19, "aria-label", _p$.y = _v$15);
|
|
11680
|
+
_v$16 !== _p$.g && setAttribute(_el$19, "aria-pressed", _p$.g = _v$16);
|
|
11681
|
+
_v$17 !== _p$.p && className(_el$19, _p$.p = _v$17);
|
|
11682
|
+
_v$18 !== _p$.b && className(_el$20, _p$.b = _v$18);
|
|
11683
|
+
_v$19 !== _p$.T && className(_el$21, _p$.T = _v$19);
|
|
11684
|
+
_v$20 !== _p$.A && setAttribute(_el$22, "aria-label", _p$.A = _v$20);
|
|
11330
11685
|
return _p$;
|
|
11331
11686
|
}, {
|
|
11332
11687
|
e: void 0,
|
|
@@ -11347,7 +11702,10 @@ var init_toolbar = __esm({
|
|
|
11347
11702
|
f: void 0,
|
|
11348
11703
|
y: void 0,
|
|
11349
11704
|
g: void 0,
|
|
11350
|
-
p: void 0
|
|
11705
|
+
p: void 0,
|
|
11706
|
+
b: void 0,
|
|
11707
|
+
T: void 0,
|
|
11708
|
+
A: void 0
|
|
11351
11709
|
});
|
|
11352
11710
|
return _el$;
|
|
11353
11711
|
})();
|
|
@@ -11365,6 +11723,52 @@ var init_clamp_to_viewport = __esm({
|
|
|
11365
11723
|
}
|
|
11366
11724
|
});
|
|
11367
11725
|
|
|
11726
|
+
// src/utils/get-anchored-dropdown-position.ts
|
|
11727
|
+
var getAnchoredDropdownPosition;
|
|
11728
|
+
var init_get_anchored_dropdown_position = __esm({
|
|
11729
|
+
"src/utils/get-anchored-dropdown-position.ts"() {
|
|
11730
|
+
"use strict";
|
|
11731
|
+
init_clamp_to_viewport();
|
|
11732
|
+
getAnchoredDropdownPosition = ({
|
|
11733
|
+
anchor,
|
|
11734
|
+
measuredWidth,
|
|
11735
|
+
measuredHeight,
|
|
11736
|
+
viewportWidth,
|
|
11737
|
+
viewportHeight,
|
|
11738
|
+
anchorGapPx,
|
|
11739
|
+
viewportPaddingPx,
|
|
11740
|
+
offscreenPosition
|
|
11741
|
+
}) => {
|
|
11742
|
+
if (!anchor || measuredWidth === 0 || measuredHeight === 0) {
|
|
11743
|
+
return offscreenPosition;
|
|
11744
|
+
}
|
|
11745
|
+
let rawLeft;
|
|
11746
|
+
let rawTop;
|
|
11747
|
+
if (anchor.edge === "left" || anchor.edge === "right") {
|
|
11748
|
+
rawLeft = anchor.edge === "left" ? anchor.x + anchorGapPx : anchor.x - measuredWidth - anchorGapPx;
|
|
11749
|
+
rawTop = anchor.y - measuredHeight / 2;
|
|
11750
|
+
} else {
|
|
11751
|
+
rawLeft = anchor.x - measuredWidth / 2;
|
|
11752
|
+
rawTop = anchor.edge === "top" ? anchor.y + anchorGapPx : anchor.y - measuredHeight - anchorGapPx;
|
|
11753
|
+
}
|
|
11754
|
+
return {
|
|
11755
|
+
left: clampToViewport(
|
|
11756
|
+
rawLeft,
|
|
11757
|
+
measuredWidth,
|
|
11758
|
+
viewportWidth,
|
|
11759
|
+
viewportPaddingPx
|
|
11760
|
+
),
|
|
11761
|
+
top: clampToViewport(
|
|
11762
|
+
rawTop,
|
|
11763
|
+
measuredHeight,
|
|
11764
|
+
viewportHeight,
|
|
11765
|
+
viewportPaddingPx
|
|
11766
|
+
)
|
|
11767
|
+
};
|
|
11768
|
+
};
|
|
11769
|
+
}
|
|
11770
|
+
});
|
|
11771
|
+
|
|
11368
11772
|
// src/utils/is-event-from-overlay.ts
|
|
11369
11773
|
var isEventFromOverlay;
|
|
11370
11774
|
var init_is_event_from_overlay = __esm({
|
|
@@ -11403,7 +11807,7 @@ var init_resolve_action_enabled = __esm({
|
|
|
11403
11807
|
});
|
|
11404
11808
|
|
|
11405
11809
|
// src/components/toolbar/toolbar-menu.tsx
|
|
11406
|
-
var _tmpl$
|
|
11810
|
+
var _tmpl$30, _tmpl$211, _tmpl$37, _tmpl$44, ToolbarMenu;
|
|
11407
11811
|
var init_toolbar_menu = __esm({
|
|
11408
11812
|
"src/components/toolbar/toolbar-menu.tsx"() {
|
|
11409
11813
|
"use strict";
|
|
@@ -11417,26 +11821,34 @@ var init_toolbar_menu = __esm({
|
|
|
11417
11821
|
init_web();
|
|
11418
11822
|
init_web();
|
|
11419
11823
|
init_web();
|
|
11824
|
+
init_web();
|
|
11420
11825
|
init_solid();
|
|
11421
11826
|
init_constants();
|
|
11422
|
-
|
|
11827
|
+
init_get_anchored_dropdown_position();
|
|
11423
11828
|
init_cn();
|
|
11424
11829
|
init_format_shortcut();
|
|
11425
11830
|
init_is_event_from_overlay();
|
|
11426
11831
|
init_resolve_action_enabled();
|
|
11427
11832
|
init_native_raf();
|
|
11428
|
-
|
|
11429
|
-
_tmpl$
|
|
11430
|
-
_tmpl$
|
|
11833
|
+
init_create_menu_highlight();
|
|
11834
|
+
_tmpl$30 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-toolbar-menu class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"style=z-index:2147483647><div><div class="relative flex flex-col py-1"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">`);
|
|
11835
|
+
_tmpl$211 = /* @__PURE__ */ template(`<div><div>`);
|
|
11836
|
+
_tmpl$37 = /* @__PURE__ */ template(`<button data-react-grab-ignore-events class="relative z-1 contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default"><span class="text-[13px] leading-4 font-sans font-medium text-black">`);
|
|
11431
11837
|
_tmpl$44 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
|
|
11432
11838
|
ToolbarMenu = (props) => {
|
|
11433
11839
|
let containerRef;
|
|
11840
|
+
const {
|
|
11841
|
+
containerRef: highlightContainerRef,
|
|
11842
|
+
highlightRef,
|
|
11843
|
+
updateHighlight,
|
|
11844
|
+
clearHighlight
|
|
11845
|
+
} = createMenuHighlight();
|
|
11434
11846
|
const [measuredWidth, setMeasuredWidth] = createSignal(0);
|
|
11435
11847
|
const [measuredHeight, setMeasuredHeight] = createSignal(0);
|
|
11436
11848
|
const [shouldMount, setShouldMount] = createSignal(false);
|
|
11437
11849
|
const [isAnimatedIn, setIsAnimatedIn] = createSignal(false);
|
|
11438
11850
|
const [lastAnchorEdge, setLastAnchorEdge] = createSignal("bottom");
|
|
11439
|
-
const [
|
|
11851
|
+
const [toggleRefreshCounter, setToggleRefreshCounter] = createSignal(0);
|
|
11440
11852
|
let exitAnimationTimeout;
|
|
11441
11853
|
let enterAnimationFrameId;
|
|
11442
11854
|
const measureContainer = () => {
|
|
@@ -11465,32 +11877,17 @@ var init_toolbar_menu = __esm({
|
|
|
11465
11877
|
}, DROPDOWN_ANIMATION_DURATION_MS);
|
|
11466
11878
|
}
|
|
11467
11879
|
});
|
|
11468
|
-
const computedPosition = () => {
|
|
11469
|
-
const anchor = props.position;
|
|
11470
|
-
const width = measuredWidth();
|
|
11471
|
-
const height = measuredHeight();
|
|
11472
|
-
if (!anchor || width === 0 || height === 0) {
|
|
11473
|
-
return DROPDOWN_OFFSCREEN_POSITION;
|
|
11474
|
-
}
|
|
11475
|
-
const {
|
|
11476
|
-
edge
|
|
11477
|
-
} = anchor;
|
|
11478
|
-
let rawLeft;
|
|
11479
|
-
let rawTop;
|
|
11480
|
-
if (edge === "left" || edge === "right") {
|
|
11481
|
-
rawLeft = edge === "left" ? anchor.x + DROPDOWN_ANCHOR_GAP_PX : anchor.x - width - DROPDOWN_ANCHOR_GAP_PX;
|
|
11482
|
-
rawTop = anchor.y - height / 2;
|
|
11483
|
-
} else {
|
|
11484
|
-
rawLeft = anchor.x - width / 2;
|
|
11485
|
-
rawTop = edge === "top" ? anchor.y + DROPDOWN_ANCHOR_GAP_PX : anchor.y - height - DROPDOWN_ANCHOR_GAP_PX;
|
|
11486
|
-
}
|
|
11487
|
-
return {
|
|
11488
|
-
left: clampToViewport(rawLeft, width, window.innerWidth, DROPDOWN_VIEWPORT_PADDING_PX),
|
|
11489
|
-
top: clampToViewport(rawTop, height, window.innerHeight, DROPDOWN_VIEWPORT_PADDING_PX)
|
|
11490
|
-
};
|
|
11491
|
-
};
|
|
11492
11880
|
const displayPosition = createMemo((previousPosition) => {
|
|
11493
|
-
const position =
|
|
11881
|
+
const position = getAnchoredDropdownPosition({
|
|
11882
|
+
anchor: props.position,
|
|
11883
|
+
measuredWidth: measuredWidth(),
|
|
11884
|
+
measuredHeight: measuredHeight(),
|
|
11885
|
+
viewportWidth: window.innerWidth,
|
|
11886
|
+
viewportHeight: window.innerHeight,
|
|
11887
|
+
anchorGapPx: DROPDOWN_ANCHOR_GAP_PX,
|
|
11888
|
+
viewportPaddingPx: DROPDOWN_VIEWPORT_PADDING_PX,
|
|
11889
|
+
offscreenPosition: DROPDOWN_OFFSCREEN_POSITION
|
|
11890
|
+
});
|
|
11494
11891
|
if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
|
|
11495
11892
|
return position;
|
|
11496
11893
|
}
|
|
@@ -11507,7 +11904,7 @@ var init_toolbar_menu = __esm({
|
|
|
11507
11904
|
if (!resolveToolbarActionEnabled(action)) return;
|
|
11508
11905
|
action.onAction();
|
|
11509
11906
|
if (action.isActive !== void 0) {
|
|
11510
|
-
|
|
11907
|
+
setToggleRefreshCounter((previous) => previous + 1);
|
|
11511
11908
|
} else {
|
|
11512
11909
|
props.onDismiss();
|
|
11513
11910
|
}
|
|
@@ -11557,7 +11954,7 @@ var init_toolbar_menu = __esm({
|
|
|
11557
11954
|
return shouldMount();
|
|
11558
11955
|
},
|
|
11559
11956
|
get children() {
|
|
11560
|
-
var _el$ = _tmpl$
|
|
11957
|
+
var _el$ = _tmpl$30(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
|
|
11561
11958
|
_el$.$$contextmenu = handleMenuEvent;
|
|
11562
11959
|
_el$.$$click = handleMenuEvent;
|
|
11563
11960
|
_el$.$$mousedown = handleMenuEvent;
|
|
@@ -11565,6 +11962,8 @@ var init_toolbar_menu = __esm({
|
|
|
11565
11962
|
var _ref$ = containerRef;
|
|
11566
11963
|
typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
|
|
11567
11964
|
setStyleProperty(_el$2, "min-width", `${TOOLBAR_MENU_MIN_WIDTH_PX}px`);
|
|
11965
|
+
use(highlightContainerRef, _el$3);
|
|
11966
|
+
use(highlightRef, _el$4);
|
|
11568
11967
|
insert(_el$3, createComponent(For, {
|
|
11569
11968
|
get each() {
|
|
11570
11969
|
return props.actions;
|
|
@@ -11573,55 +11972,61 @@ var init_toolbar_menu = __esm({
|
|
|
11573
11972
|
const isEnabled = () => resolveToolbarActionEnabled(action);
|
|
11574
11973
|
const isToggle = () => action.isActive !== void 0;
|
|
11575
11974
|
const toggleActive = () => {
|
|
11576
|
-
void
|
|
11975
|
+
void toggleRefreshCounter();
|
|
11577
11976
|
return Boolean(action.isActive?.());
|
|
11578
11977
|
};
|
|
11579
11978
|
return (() => {
|
|
11580
|
-
var _el$
|
|
11581
|
-
_el$
|
|
11582
|
-
_el$
|
|
11583
|
-
|
|
11584
|
-
|
|
11979
|
+
var _el$5 = _tmpl$37(), _el$6 = _el$5.firstChild;
|
|
11980
|
+
_el$5.$$click = (event) => handleActionClick(action, event);
|
|
11981
|
+
addEventListener(_el$5, "pointerleave", clearHighlight);
|
|
11982
|
+
_el$5.addEventListener("pointerenter", (event) => {
|
|
11983
|
+
if (isEnabled()) {
|
|
11984
|
+
updateHighlight(event.currentTarget);
|
|
11985
|
+
}
|
|
11986
|
+
});
|
|
11987
|
+
_el$5.$$pointerdown = (event) => event.stopPropagation();
|
|
11988
|
+
insert(_el$6, () => action.label);
|
|
11989
|
+
insert(_el$5, createComponent(Show, {
|
|
11585
11990
|
get when() {
|
|
11586
11991
|
return memo(() => !!!isToggle())() && action.shortcut;
|
|
11587
11992
|
},
|
|
11588
11993
|
children: (shortcutKey) => (() => {
|
|
11589
|
-
var _el$
|
|
11590
|
-
insert(_el$
|
|
11591
|
-
return _el$
|
|
11994
|
+
var _el$9 = _tmpl$44();
|
|
11995
|
+
insert(_el$9, () => formatShortcut(shortcutKey()));
|
|
11996
|
+
return _el$9;
|
|
11592
11997
|
})()
|
|
11593
11998
|
}), null);
|
|
11594
|
-
insert(_el$
|
|
11999
|
+
insert(_el$5, createComponent(Show, {
|
|
11595
12000
|
get when() {
|
|
11596
12001
|
return isToggle();
|
|
11597
12002
|
},
|
|
11598
12003
|
get children() {
|
|
11599
|
-
var _el$
|
|
12004
|
+
var _el$7 = _tmpl$211(), _el$8 = _el$7.firstChild;
|
|
11600
12005
|
createRenderEffect((_p$) => {
|
|
11601
12006
|
var _v$8 = cn("relative rounded-full transition-colors ml-4 shrink-0 w-5 h-3", toggleActive() ? "bg-black" : "bg-black/25"), _v$9 = cn("absolute top-0.5 rounded-full bg-white transition-transform w-2 h-2", toggleActive() ? "left-2.5" : "left-0.5");
|
|
11602
|
-
_v$8 !== _p$.e && className(_el$
|
|
11603
|
-
_v$9 !== _p$.t && className(_el$
|
|
12007
|
+
_v$8 !== _p$.e && className(_el$7, _p$.e = _v$8);
|
|
12008
|
+
_v$9 !== _p$.t && className(_el$8, _p$.t = _v$9);
|
|
11604
12009
|
return _p$;
|
|
11605
12010
|
}, {
|
|
11606
12011
|
e: void 0,
|
|
11607
12012
|
t: void 0
|
|
11608
12013
|
});
|
|
11609
|
-
return _el$
|
|
12014
|
+
return _el$7;
|
|
11610
12015
|
}
|
|
11611
12016
|
}), null);
|
|
11612
12017
|
createRenderEffect((_p$) => {
|
|
11613
12018
|
var _v$0 = action.id, _v$1 = !isEnabled();
|
|
11614
|
-
_v$0 !== _p$.e && setAttribute(_el$
|
|
11615
|
-
_v$1 !== _p$.t && (_el$
|
|
12019
|
+
_v$0 !== _p$.e && setAttribute(_el$5, "data-react-grab-menu-item", _p$.e = _v$0);
|
|
12020
|
+
_v$1 !== _p$.t && (_el$5.disabled = _p$.t = _v$1);
|
|
11616
12021
|
return _p$;
|
|
11617
12022
|
}, {
|
|
11618
12023
|
e: void 0,
|
|
11619
12024
|
t: void 0
|
|
11620
12025
|
});
|
|
11621
|
-
return _el$
|
|
12026
|
+
return _el$5;
|
|
11622
12027
|
})();
|
|
11623
12028
|
}
|
|
11624
|
-
}));
|
|
12029
|
+
}), null);
|
|
11625
12030
|
createRenderEffect((_p$) => {
|
|
11626
12031
|
var _v$ = `${displayPosition().top}px`, _v$2 = `${displayPosition().left}px`, _v$3 = isAnimatedIn() ? "auto" : "none", _v$4 = DROPDOWN_EDGE_TRANSFORM_ORIGIN[lastAnchorEdge()], _v$5 = isAnimatedIn() ? "1" : "0", _v$6 = isAnimatedIn() ? "scale(1)" : "scale(0.95)", _v$7 = 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);
|
|
11627
12032
|
_v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
|
|
@@ -11650,7 +12055,7 @@ var init_toolbar_menu = __esm({
|
|
|
11650
12055
|
});
|
|
11651
12056
|
|
|
11652
12057
|
// src/components/context-menu.tsx
|
|
11653
|
-
var _tmpl$
|
|
12058
|
+
var _tmpl$31, _tmpl$212, _tmpl$38, _tmpl$45, ContextMenu;
|
|
11654
12059
|
var init_context_menu = __esm({
|
|
11655
12060
|
"src/components/context-menu.tsx"() {
|
|
11656
12061
|
"use strict";
|
|
@@ -11663,6 +12068,7 @@ var init_context_menu = __esm({
|
|
|
11663
12068
|
init_web();
|
|
11664
12069
|
init_web();
|
|
11665
12070
|
init_web();
|
|
12071
|
+
init_web();
|
|
11666
12072
|
init_solid();
|
|
11667
12073
|
init_constants();
|
|
11668
12074
|
init_cn();
|
|
@@ -11674,12 +12080,19 @@ var init_context_menu = __esm({
|
|
|
11674
12080
|
init_resolve_action_enabled();
|
|
11675
12081
|
init_is_event_from_overlay();
|
|
11676
12082
|
init_native_raf();
|
|
11677
|
-
|
|
11678
|
-
_tmpl$
|
|
11679
|
-
_tmpl$
|
|
11680
|
-
_tmpl$
|
|
12083
|
+
init_create_menu_highlight();
|
|
12084
|
+
_tmpl$31 = /* @__PURE__ */ template(`<div class="relative flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">`);
|
|
12085
|
+
_tmpl$212 = /* @__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"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">`);
|
|
12086
|
+
_tmpl$38 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
|
|
12087
|
+
_tmpl$45 = /* @__PURE__ */ template(`<button data-react-grab-ignore-events class="relative z-1 contain-layout flex items-center justify-between w-full px-2 py-1 cursor-pointer text-left border-none bg-transparent disabled:opacity-40 disabled:cursor-default"><span class="text-[13px] leading-4 font-sans font-medium text-black">`);
|
|
11681
12088
|
ContextMenu = (props) => {
|
|
11682
12089
|
let containerRef;
|
|
12090
|
+
const {
|
|
12091
|
+
containerRef: highlightContainerRef,
|
|
12092
|
+
highlightRef,
|
|
12093
|
+
updateHighlight,
|
|
12094
|
+
clearHighlight
|
|
12095
|
+
} = createMenuHighlight();
|
|
11683
12096
|
const [measuredWidth, setMeasuredWidth] = createSignal(0);
|
|
11684
12097
|
const [measuredHeight, setMeasuredHeight] = createSignal(0);
|
|
11685
12098
|
const isVisible = () => props.position !== null;
|
|
@@ -11834,7 +12247,7 @@ var init_context_menu = __esm({
|
|
|
11834
12247
|
return isVisible();
|
|
11835
12248
|
},
|
|
11836
12249
|
get children() {
|
|
11837
|
-
var _el$ = _tmpl$
|
|
12250
|
+
var _el$ = _tmpl$212(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
11838
12251
|
_el$.$$contextmenu = handleMenuEvent;
|
|
11839
12252
|
_el$.$$click = handleMenuEvent;
|
|
11840
12253
|
_el$.$$mousedown = handleMenuEvent;
|
|
@@ -11874,38 +12287,46 @@ var init_context_menu = __esm({
|
|
|
11874
12287
|
}));
|
|
11875
12288
|
insert(_el$2, createComponent(BottomSection, {
|
|
11876
12289
|
get children() {
|
|
11877
|
-
var _el$4 = _tmpl$
|
|
12290
|
+
var _el$4 = _tmpl$31(), _el$5 = _el$4.firstChild;
|
|
12291
|
+
use(highlightContainerRef, _el$4);
|
|
12292
|
+
use(highlightRef, _el$5);
|
|
11878
12293
|
insert(_el$4, createComponent(For, {
|
|
11879
12294
|
get each() {
|
|
11880
12295
|
return menuItems();
|
|
11881
12296
|
},
|
|
11882
12297
|
children: (item) => (() => {
|
|
11883
|
-
var _el$
|
|
11884
|
-
_el$
|
|
11885
|
-
_el$
|
|
11886
|
-
|
|
11887
|
-
|
|
12298
|
+
var _el$6 = _tmpl$45(), _el$7 = _el$6.firstChild;
|
|
12299
|
+
_el$6.$$click = (event) => handleAction(item, event);
|
|
12300
|
+
addEventListener(_el$6, "pointerleave", clearHighlight);
|
|
12301
|
+
_el$6.addEventListener("pointerenter", (event) => {
|
|
12302
|
+
if (item.enabled) {
|
|
12303
|
+
updateHighlight(event.currentTarget);
|
|
12304
|
+
}
|
|
12305
|
+
});
|
|
12306
|
+
_el$6.$$pointerdown = (event) => event.stopPropagation();
|
|
12307
|
+
insert(_el$7, () => item.label);
|
|
12308
|
+
insert(_el$6, createComponent(Show, {
|
|
11888
12309
|
get when() {
|
|
11889
12310
|
return item.shortcut;
|
|
11890
12311
|
},
|
|
11891
12312
|
get children() {
|
|
11892
|
-
var _el$
|
|
11893
|
-
insert(_el$
|
|
11894
|
-
return _el$
|
|
12313
|
+
var _el$8 = _tmpl$38();
|
|
12314
|
+
insert(_el$8, () => formatShortcut(item.shortcut));
|
|
12315
|
+
return _el$8;
|
|
11895
12316
|
}
|
|
11896
12317
|
}), null);
|
|
11897
12318
|
createRenderEffect((_p$) => {
|
|
11898
12319
|
var _v$4 = item.label.toLowerCase(), _v$5 = !item.enabled;
|
|
11899
|
-
_v$4 !== _p$.e && setAttribute(_el$
|
|
11900
|
-
_v$5 !== _p$.t && (_el$
|
|
12320
|
+
_v$4 !== _p$.e && setAttribute(_el$6, "data-react-grab-menu-item", _p$.e = _v$4);
|
|
12321
|
+
_v$5 !== _p$.t && (_el$6.disabled = _p$.t = _v$5);
|
|
11901
12322
|
return _p$;
|
|
11902
12323
|
}, {
|
|
11903
12324
|
e: void 0,
|
|
11904
12325
|
t: void 0
|
|
11905
12326
|
});
|
|
11906
|
-
return _el$
|
|
12327
|
+
return _el$6;
|
|
11907
12328
|
})()
|
|
11908
|
-
}));
|
|
12329
|
+
}), null);
|
|
11909
12330
|
return _el$4;
|
|
11910
12331
|
}
|
|
11911
12332
|
}), null);
|
|
@@ -11929,18 +12350,18 @@ var init_context_menu = __esm({
|
|
|
11929
12350
|
});
|
|
11930
12351
|
|
|
11931
12352
|
// src/components/icons/icon-trash.tsx
|
|
11932
|
-
var _tmpl$
|
|
12353
|
+
var _tmpl$39, IconTrash;
|
|
11933
12354
|
var init_icon_trash = __esm({
|
|
11934
12355
|
"src/components/icons/icon-trash.tsx"() {
|
|
11935
12356
|
"use strict";
|
|
11936
12357
|
init_web();
|
|
11937
12358
|
init_web();
|
|
11938
12359
|
init_web();
|
|
11939
|
-
_tmpl$
|
|
12360
|
+
_tmpl$39 = /* @__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">`);
|
|
11940
12361
|
IconTrash = (props) => {
|
|
11941
12362
|
const size = () => props.size ?? 14;
|
|
11942
12363
|
return (() => {
|
|
11943
|
-
var _el$ = _tmpl$
|
|
12364
|
+
var _el$ = _tmpl$39();
|
|
11944
12365
|
createRenderEffect((_p$) => {
|
|
11945
12366
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
11946
12367
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -11959,7 +12380,7 @@ var init_icon_trash = __esm({
|
|
|
11959
12380
|
});
|
|
11960
12381
|
|
|
11961
12382
|
// src/components/history-dropdown.tsx
|
|
11962
|
-
var _tmpl$
|
|
12383
|
+
var _tmpl$40, _tmpl$213, _tmpl$310, _tmpl$46, ITEM_ACTION_CLASS, formatRelativeTime, getHistoryItemDisplayName, HistoryDropdown;
|
|
11963
12384
|
var init_history_dropdown = __esm({
|
|
11964
12385
|
"src/components/history-dropdown.tsx"() {
|
|
11965
12386
|
"use strict";
|
|
@@ -11972,20 +12393,22 @@ var init_history_dropdown = __esm({
|
|
|
11972
12393
|
init_web();
|
|
11973
12394
|
init_web();
|
|
11974
12395
|
init_web();
|
|
12396
|
+
init_web();
|
|
11975
12397
|
init_solid();
|
|
11976
12398
|
init_constants();
|
|
11977
12399
|
init_safe_polygon();
|
|
11978
|
-
|
|
12400
|
+
init_get_anchored_dropdown_position();
|
|
11979
12401
|
init_cn();
|
|
11980
12402
|
init_icon_trash();
|
|
11981
12403
|
init_icon_copy();
|
|
11982
12404
|
init_icon_check();
|
|
11983
12405
|
init_tooltip();
|
|
11984
12406
|
init_native_raf();
|
|
11985
|
-
|
|
11986
|
-
_tmpl$
|
|
11987
|
-
_tmpl$
|
|
11988
|
-
_tmpl$
|
|
12407
|
+
init_create_menu_highlight();
|
|
12408
|
+
_tmpl$40 = /* @__PURE__ */ template(`<div class="flex items-center gap-[5px]"><div class=relative><button data-react-grab-ignore-events data-react-grab-history-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-history-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">`);
|
|
12409
|
+
_tmpl$213 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-history-dropdown class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"style=z-index:2147483647><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">History</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="relative flex flex-col max-h-[240px] overflow-y-auto -mx-2 -my-1.5 [scrollbar-width:thin] [scrollbar-color:transparent_transparent] hover:[scrollbar-color:rgba(0,0,0,0.15)_transparent]"><div class="pointer-events-none absolute bg-black/5 opacity-0 transition-[top,left,width,height,opacity] duration-75 ease-out">`);
|
|
12410
|
+
_tmpl$310 = /* @__PURE__ */ template(`<span class="text-[11px] leading-3 font-sans text-black/40 truncate mt-0.5">`);
|
|
12411
|
+
_tmpl$46 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-history-item class="group relative z-1 contain-layout flex items-start justify-between w-full px-2 py-1 cursor-pointer 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-history-item-remove></button><button data-react-grab-ignore-events data-react-grab-history-item-copy>`);
|
|
11989
12412
|
ITEM_ACTION_CLASS = "flex items-center justify-center cursor-pointer text-black/25 transition-colors press-scale";
|
|
11990
12413
|
formatRelativeTime = (timestamp) => {
|
|
11991
12414
|
const elapsedSeconds = Math.floor((Date.now() - timestamp) / 1e3);
|
|
@@ -12004,6 +12427,12 @@ var init_history_dropdown = __esm({
|
|
|
12004
12427
|
};
|
|
12005
12428
|
HistoryDropdown = (props) => {
|
|
12006
12429
|
let containerRef;
|
|
12430
|
+
const {
|
|
12431
|
+
containerRef: highlightContainerRef,
|
|
12432
|
+
highlightRef,
|
|
12433
|
+
updateHighlight,
|
|
12434
|
+
clearHighlight
|
|
12435
|
+
} = createMenuHighlight();
|
|
12007
12436
|
const safePolygonTracker = createSafePolygonTracker();
|
|
12008
12437
|
const getToolbarTargetRects = () => {
|
|
12009
12438
|
if (!containerRef) return null;
|
|
@@ -12063,32 +12492,17 @@ var init_history_dropdown = __esm({
|
|
|
12063
12492
|
}, {
|
|
12064
12493
|
defer: true
|
|
12065
12494
|
}));
|
|
12066
|
-
const computedPosition = () => {
|
|
12067
|
-
const anchor = props.position;
|
|
12068
|
-
const width = measuredWidth();
|
|
12069
|
-
const height = measuredHeight();
|
|
12070
|
-
if (!anchor || width === 0 || height === 0) {
|
|
12071
|
-
return DROPDOWN_OFFSCREEN_POSITION;
|
|
12072
|
-
}
|
|
12073
|
-
const {
|
|
12074
|
-
edge
|
|
12075
|
-
} = anchor;
|
|
12076
|
-
let rawLeft;
|
|
12077
|
-
let rawTop;
|
|
12078
|
-
if (edge === "left" || edge === "right") {
|
|
12079
|
-
rawLeft = edge === "left" ? anchor.x + DROPDOWN_ANCHOR_GAP_PX : anchor.x - width - DROPDOWN_ANCHOR_GAP_PX;
|
|
12080
|
-
rawTop = anchor.y - height / 2;
|
|
12081
|
-
} else {
|
|
12082
|
-
rawLeft = anchor.x - width / 2;
|
|
12083
|
-
rawTop = edge === "top" ? anchor.y + DROPDOWN_ANCHOR_GAP_PX : anchor.y - height - DROPDOWN_ANCHOR_GAP_PX;
|
|
12084
|
-
}
|
|
12085
|
-
return {
|
|
12086
|
-
left: clampToViewport(rawLeft, width, window.innerWidth, DROPDOWN_VIEWPORT_PADDING_PX),
|
|
12087
|
-
top: clampToViewport(rawTop, height, window.innerHeight, DROPDOWN_VIEWPORT_PADDING_PX)
|
|
12088
|
-
};
|
|
12089
|
-
};
|
|
12090
12495
|
const displayPosition = createMemo((previousPosition) => {
|
|
12091
|
-
const position =
|
|
12496
|
+
const position = getAnchoredDropdownPosition({
|
|
12497
|
+
anchor: props.position,
|
|
12498
|
+
measuredWidth: measuredWidth(),
|
|
12499
|
+
measuredHeight: measuredHeight(),
|
|
12500
|
+
viewportWidth: window.innerWidth,
|
|
12501
|
+
viewportHeight: window.innerHeight,
|
|
12502
|
+
anchorGapPx: DROPDOWN_ANCHOR_GAP_PX,
|
|
12503
|
+
viewportPaddingPx: DROPDOWN_VIEWPORT_PADDING_PX,
|
|
12504
|
+
offscreenPosition: DROPDOWN_OFFSCREEN_POSITION
|
|
12505
|
+
});
|
|
12092
12506
|
if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
|
|
12093
12507
|
return position;
|
|
12094
12508
|
}
|
|
@@ -12132,7 +12546,7 @@ var init_history_dropdown = __esm({
|
|
|
12132
12546
|
return shouldMount();
|
|
12133
12547
|
},
|
|
12134
12548
|
get children() {
|
|
12135
|
-
var _el$ = _tmpl$
|
|
12549
|
+
var _el$ = _tmpl$213(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild, _el$0 = _el$3.nextSibling, _el$1 = _el$0.firstChild, _el$10 = _el$1.firstChild;
|
|
12136
12550
|
_el$.addEventListener("mouseleave", (event) => {
|
|
12137
12551
|
const targetRects = getToolbarTargetRects();
|
|
12138
12552
|
if (targetRects) {
|
|
@@ -12159,7 +12573,7 @@ var init_history_dropdown = __esm({
|
|
|
12159
12573
|
return props.items.length > 0;
|
|
12160
12574
|
},
|
|
12161
12575
|
get children() {
|
|
12162
|
-
var _el$5 = _tmpl$
|
|
12576
|
+
var _el$5 = _tmpl$40(), _el$6 = _el$5.firstChild, _el$7 = _el$6.firstChild, _el$8 = _el$6.nextSibling, _el$9 = _el$8.firstChild;
|
|
12163
12577
|
_el$7.addEventListener("mouseleave", () => setActiveHeaderTooltip(null));
|
|
12164
12578
|
_el$7.addEventListener("mouseenter", () => setActiveHeaderTooltip("clear"));
|
|
12165
12579
|
_el$7.$$click = (event) => {
|
|
@@ -12223,26 +12637,34 @@ var init_history_dropdown = __esm({
|
|
|
12223
12637
|
return _el$5;
|
|
12224
12638
|
}
|
|
12225
12639
|
}), null);
|
|
12640
|
+
use(highlightContainerRef, _el$1);
|
|
12641
|
+
use(highlightRef, _el$10);
|
|
12226
12642
|
insert(_el$1, createComponent(For, {
|
|
12227
12643
|
get each() {
|
|
12228
12644
|
return props.items;
|
|
12229
12645
|
},
|
|
12230
12646
|
children: (item) => (() => {
|
|
12231
|
-
var _el$
|
|
12232
|
-
_el$
|
|
12233
|
-
_el$
|
|
12647
|
+
var _el$11 = _tmpl$46(), _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;
|
|
12648
|
+
addEventListener(_el$11, "blur", clearHighlight);
|
|
12649
|
+
_el$11.addEventListener("focus", (event) => updateHighlight(event.currentTarget));
|
|
12650
|
+
_el$11.addEventListener("mouseleave", () => {
|
|
12651
|
+
props.onItemHover?.(null);
|
|
12652
|
+
clearHighlight();
|
|
12653
|
+
});
|
|
12654
|
+
_el$11.addEventListener("mouseenter", (event) => {
|
|
12234
12655
|
if (!props.disconnectedItemIds?.has(item.id)) {
|
|
12235
12656
|
props.onItemHover?.(item.id);
|
|
12236
12657
|
}
|
|
12658
|
+
updateHighlight(event.currentTarget);
|
|
12237
12659
|
});
|
|
12238
|
-
_el$
|
|
12660
|
+
_el$11.$$keydown = (event) => {
|
|
12239
12661
|
if (event.code === "Space" && event.currentTarget === event.target) {
|
|
12240
12662
|
event.preventDefault();
|
|
12241
12663
|
event.stopPropagation();
|
|
12242
12664
|
props.onSelectItem?.(item);
|
|
12243
12665
|
}
|
|
12244
12666
|
};
|
|
12245
|
-
_el$
|
|
12667
|
+
_el$11.$$click = (event) => {
|
|
12246
12668
|
event.stopPropagation();
|
|
12247
12669
|
props.onSelectItem?.(item);
|
|
12248
12670
|
setConfirmedCopyItemId(item.id);
|
|
@@ -12251,27 +12673,27 @@ var init_history_dropdown = __esm({
|
|
|
12251
12673
|
setConfirmedCopyItemId(null);
|
|
12252
12674
|
}, FEEDBACK_DURATION_MS);
|
|
12253
12675
|
};
|
|
12254
|
-
_el$
|
|
12255
|
-
insert(_el$
|
|
12256
|
-
insert(_el$
|
|
12676
|
+
_el$11.$$pointerdown = (event) => event.stopPropagation();
|
|
12677
|
+
insert(_el$13, () => getHistoryItemDisplayName(item));
|
|
12678
|
+
insert(_el$12, createComponent(Show, {
|
|
12257
12679
|
get when() {
|
|
12258
12680
|
return item.commentText;
|
|
12259
12681
|
},
|
|
12260
12682
|
get children() {
|
|
12261
|
-
var _el$
|
|
12262
|
-
insert(_el$
|
|
12263
|
-
return _el$
|
|
12683
|
+
var _el$14 = _tmpl$310();
|
|
12684
|
+
insert(_el$14, () => item.commentText);
|
|
12685
|
+
return _el$14;
|
|
12264
12686
|
}
|
|
12265
12687
|
}), null);
|
|
12266
|
-
insert(_el$
|
|
12267
|
-
_el$
|
|
12688
|
+
insert(_el$16, () => formatRelativeTime(item.timestamp));
|
|
12689
|
+
_el$18.$$click = (event) => {
|
|
12268
12690
|
event.stopPropagation();
|
|
12269
12691
|
props.onRemoveItem?.(item);
|
|
12270
12692
|
};
|
|
12271
|
-
insert(_el$
|
|
12693
|
+
insert(_el$18, createComponent(IconTrash, {
|
|
12272
12694
|
size: DROPDOWN_ICON_SIZE_PX
|
|
12273
12695
|
}));
|
|
12274
|
-
_el$
|
|
12696
|
+
_el$19.$$click = (event) => {
|
|
12275
12697
|
event.stopPropagation();
|
|
12276
12698
|
props.onCopyItem?.(item);
|
|
12277
12699
|
setConfirmedCopyItemId(item.id);
|
|
@@ -12280,7 +12702,7 @@ var init_history_dropdown = __esm({
|
|
|
12280
12702
|
setConfirmedCopyItemId(null);
|
|
12281
12703
|
}, FEEDBACK_DURATION_MS);
|
|
12282
12704
|
};
|
|
12283
|
-
insert(_el$
|
|
12705
|
+
insert(_el$19, createComponent(Show, {
|
|
12284
12706
|
get when() {
|
|
12285
12707
|
return confirmedCopyItemId() === item.id;
|
|
12286
12708
|
},
|
|
@@ -12300,18 +12722,18 @@ var init_history_dropdown = __esm({
|
|
|
12300
12722
|
var _v$1 = {
|
|
12301
12723
|
"opacity-40 hover:opacity-100": Boolean(props.disconnectedItemIds?.has(item.id))
|
|
12302
12724
|
}, _v$10 = cn(ITEM_ACTION_CLASS, "hover:text-[#B91C1C]"), _v$11 = cn(ITEM_ACTION_CLASS, "hover:text-black/60");
|
|
12303
|
-
_p$.e = classList(_el$
|
|
12304
|
-
_v$10 !== _p$.t && className(_el$
|
|
12305
|
-
_v$11 !== _p$.a && className(_el$
|
|
12725
|
+
_p$.e = classList(_el$11, _v$1, _p$.e);
|
|
12726
|
+
_v$10 !== _p$.t && className(_el$18, _p$.t = _v$10);
|
|
12727
|
+
_v$11 !== _p$.a && className(_el$19, _p$.a = _v$11);
|
|
12306
12728
|
return _p$;
|
|
12307
12729
|
}, {
|
|
12308
12730
|
e: void 0,
|
|
12309
12731
|
t: void 0,
|
|
12310
12732
|
a: void 0
|
|
12311
12733
|
});
|
|
12312
|
-
return _el$
|
|
12734
|
+
return _el$11;
|
|
12313
12735
|
})()
|
|
12314
|
-
}));
|
|
12736
|
+
}), null);
|
|
12315
12737
|
createRenderEffect((_p$) => {
|
|
12316
12738
|
var _v$ = `${displayPosition().top}px`, _v$2 = `${displayPosition().left}px`, _v$3 = isAnimatedIn() ? "auto" : "none", _v$4 = DROPDOWN_EDGE_TRANSFORM_ORIGIN[lastAnchorEdge()], _v$5 = isAnimatedIn() ? "1" : "0", _v$6 = isAnimatedIn() ? "scale(1)" : "scale(0.95)", _v$7 = 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$8 = `${panelMinWidth()}px`, _v$9 = `${clampedMaxWidth()}px`, _v$0 = `${clampedMaxHeight()}px`;
|
|
12317
12739
|
_v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
|
|
@@ -12346,7 +12768,7 @@ var init_history_dropdown = __esm({
|
|
|
12346
12768
|
});
|
|
12347
12769
|
|
|
12348
12770
|
// src/components/clear-history-prompt.tsx
|
|
12349
|
-
var _tmpl$
|
|
12771
|
+
var _tmpl$41, ClearHistoryPrompt;
|
|
12350
12772
|
var init_clear_history_prompt = __esm({
|
|
12351
12773
|
"src/components/clear-history-prompt.tsx"() {
|
|
12352
12774
|
"use strict";
|
|
@@ -12360,13 +12782,13 @@ var init_clear_history_prompt = __esm({
|
|
|
12360
12782
|
init_web();
|
|
12361
12783
|
init_solid();
|
|
12362
12784
|
init_constants();
|
|
12363
|
-
|
|
12785
|
+
init_get_anchored_dropdown_position();
|
|
12364
12786
|
init_cn();
|
|
12365
12787
|
init_is_event_from_overlay();
|
|
12366
12788
|
init_is_keyboard_event_triggered_by_input();
|
|
12367
12789
|
init_discard_prompt();
|
|
12368
12790
|
init_native_raf();
|
|
12369
|
-
_tmpl$
|
|
12791
|
+
_tmpl$41 = /* @__PURE__ */ template(`<div data-react-grab-ignore-events data-react-grab-clear-history-prompt class="fixed font-sans text-[13px] antialiased filter-[drop-shadow(0px_1px_2px_#51515140)] select-none transition-[opacity,transform] duration-100 ease-out will-change-[opacity,transform]"style=z-index:2147483647><div>`);
|
|
12370
12792
|
ClearHistoryPrompt = (props) => {
|
|
12371
12793
|
let containerRef;
|
|
12372
12794
|
const [measuredWidth, setMeasuredWidth] = createSignal(0);
|
|
@@ -12402,32 +12824,17 @@ var init_clear_history_prompt = __esm({
|
|
|
12402
12824
|
}, DROPDOWN_ANIMATION_DURATION_MS);
|
|
12403
12825
|
}
|
|
12404
12826
|
});
|
|
12405
|
-
const computedPosition = () => {
|
|
12406
|
-
const anchor = props.position;
|
|
12407
|
-
const width = measuredWidth();
|
|
12408
|
-
const height = measuredHeight();
|
|
12409
|
-
if (!anchor || width === 0 || height === 0) {
|
|
12410
|
-
return DROPDOWN_OFFSCREEN_POSITION;
|
|
12411
|
-
}
|
|
12412
|
-
const {
|
|
12413
|
-
edge
|
|
12414
|
-
} = anchor;
|
|
12415
|
-
let rawLeft;
|
|
12416
|
-
let rawTop;
|
|
12417
|
-
if (edge === "left" || edge === "right") {
|
|
12418
|
-
rawLeft = edge === "left" ? anchor.x + DROPDOWN_ANCHOR_GAP_PX : anchor.x - width - DROPDOWN_ANCHOR_GAP_PX;
|
|
12419
|
-
rawTop = anchor.y - height / 2;
|
|
12420
|
-
} else {
|
|
12421
|
-
rawLeft = anchor.x - width / 2;
|
|
12422
|
-
rawTop = edge === "top" ? anchor.y + DROPDOWN_ANCHOR_GAP_PX : anchor.y - height - DROPDOWN_ANCHOR_GAP_PX;
|
|
12423
|
-
}
|
|
12424
|
-
return {
|
|
12425
|
-
left: clampToViewport(rawLeft, width, window.innerWidth, DROPDOWN_VIEWPORT_PADDING_PX),
|
|
12426
|
-
top: clampToViewport(rawTop, height, window.innerHeight, DROPDOWN_VIEWPORT_PADDING_PX)
|
|
12427
|
-
};
|
|
12428
|
-
};
|
|
12429
12827
|
const displayPosition = createMemo((previousPosition) => {
|
|
12430
|
-
const position =
|
|
12828
|
+
const position = getAnchoredDropdownPosition({
|
|
12829
|
+
anchor: props.position,
|
|
12830
|
+
measuredWidth: measuredWidth(),
|
|
12831
|
+
measuredHeight: measuredHeight(),
|
|
12832
|
+
viewportWidth: window.innerWidth,
|
|
12833
|
+
viewportHeight: window.innerHeight,
|
|
12834
|
+
anchorGapPx: DROPDOWN_ANCHOR_GAP_PX,
|
|
12835
|
+
viewportPaddingPx: DROPDOWN_VIEWPORT_PADDING_PX,
|
|
12836
|
+
offscreenPosition: DROPDOWN_OFFSCREEN_POSITION
|
|
12837
|
+
});
|
|
12431
12838
|
if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
|
|
12432
12839
|
return position;
|
|
12433
12840
|
}
|
|
@@ -12448,7 +12855,6 @@ var init_clear_history_prompt = __esm({
|
|
|
12448
12855
|
const isEscape = event.code === "Escape";
|
|
12449
12856
|
if (isEnter || isEscape) {
|
|
12450
12857
|
event.preventDefault();
|
|
12451
|
-
event.stopPropagation();
|
|
12452
12858
|
event.stopImmediatePropagation();
|
|
12453
12859
|
if (isEscape) {
|
|
12454
12860
|
props.onCancel();
|
|
@@ -12492,7 +12898,7 @@ var init_clear_history_prompt = __esm({
|
|
|
12492
12898
|
return shouldMount();
|
|
12493
12899
|
},
|
|
12494
12900
|
get children() {
|
|
12495
|
-
var _el$ = _tmpl$
|
|
12901
|
+
var _el$ = _tmpl$41(), _el$2 = _el$.firstChild;
|
|
12496
12902
|
_el$.$$contextmenu = handlePromptEvent;
|
|
12497
12903
|
_el$.$$click = handlePromptEvent;
|
|
12498
12904
|
_el$.$$mousedown = handlePromptEvent;
|
|
@@ -12537,7 +12943,7 @@ var init_clear_history_prompt = __esm({
|
|
|
12537
12943
|
});
|
|
12538
12944
|
|
|
12539
12945
|
// src/components/renderer.tsx
|
|
12540
|
-
var _tmpl$
|
|
12946
|
+
var _tmpl$47, ReactGrabRenderer;
|
|
12541
12947
|
var init_renderer = __esm({
|
|
12542
12948
|
"src/components/renderer.tsx"() {
|
|
12543
12949
|
"use strict";
|
|
@@ -12557,7 +12963,7 @@ var init_renderer = __esm({
|
|
|
12557
12963
|
init_context_menu();
|
|
12558
12964
|
init_history_dropdown();
|
|
12559
12965
|
init_clear_history_prompt();
|
|
12560
|
-
_tmpl$
|
|
12966
|
+
_tmpl$47 = /* @__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)">`);
|
|
12561
12967
|
ReactGrabRenderer = (props) => {
|
|
12562
12968
|
return [createComponent(OverlayCanvas, {
|
|
12563
12969
|
get crosshairVisible() {
|
|
@@ -12600,7 +13006,7 @@ var init_renderer = __esm({
|
|
|
12600
13006
|
return props.labelInstances;
|
|
12601
13007
|
}
|
|
12602
13008
|
}), (() => {
|
|
12603
|
-
var _el$ = _tmpl$
|
|
13009
|
+
var _el$ = _tmpl$47();
|
|
12604
13010
|
setStyleProperty(_el$, "z-index", Z_INDEX_OVERLAY_CANVAS);
|
|
12605
13011
|
setStyleProperty(_el$, "box-shadow", `inset 0 0 ${FROZEN_GLOW_EDGE_PX}px ${FROZEN_GLOW_COLOR}`);
|
|
12606
13012
|
createRenderEffect((_$p) => setStyleProperty(_el$, "opacity", props.isFrozen ? 1 : 0));
|
|
@@ -12722,6 +13128,12 @@ var init_renderer = __esm({
|
|
|
12722
13128
|
get actionCycleState() {
|
|
12723
13129
|
return props.selectionActionCycleState;
|
|
12724
13130
|
},
|
|
13131
|
+
get arrowNavigationState() {
|
|
13132
|
+
return props.selectionArrowNavigationState;
|
|
13133
|
+
},
|
|
13134
|
+
get onArrowNavigationSelect() {
|
|
13135
|
+
return props.onArrowNavigationSelect;
|
|
13136
|
+
},
|
|
12725
13137
|
get filePath() {
|
|
12726
13138
|
return props.selectionFilePath;
|
|
12727
13139
|
},
|
|
@@ -13617,18 +14029,6 @@ var init_create_bounds_from_drag_rect = __esm({
|
|
|
13617
14029
|
}
|
|
13618
14030
|
});
|
|
13619
14031
|
|
|
13620
|
-
// src/utils/get-bounds-center.ts
|
|
13621
|
-
var getBoundsCenter;
|
|
13622
|
-
var init_get_bounds_center = __esm({
|
|
13623
|
-
"src/utils/get-bounds-center.ts"() {
|
|
13624
|
-
"use strict";
|
|
13625
|
-
getBoundsCenter = (bounds) => ({
|
|
13626
|
-
x: bounds.x + bounds.width / 2,
|
|
13627
|
-
y: bounds.y + bounds.height / 2
|
|
13628
|
-
});
|
|
13629
|
-
}
|
|
13630
|
-
});
|
|
13631
|
-
|
|
13632
14032
|
// src/utils/is-c-like-key.ts
|
|
13633
14033
|
var C_LIKE_CHARACTERS, isCLikeKey;
|
|
13634
14034
|
var init_is_c_like_key = __esm({
|
|
@@ -14216,6 +14616,7 @@ var init_manager = __esm({
|
|
|
14216
14616
|
init_create_element_bounds();
|
|
14217
14617
|
init_is_element_connected();
|
|
14218
14618
|
init_generate_snippet();
|
|
14619
|
+
init_recalculate_session_position();
|
|
14219
14620
|
init_context();
|
|
14220
14621
|
init_constants();
|
|
14221
14622
|
init_get_tag_name();
|
|
@@ -14705,19 +15106,11 @@ var init_manager = __esm({
|
|
|
14705
15106
|
if (newBounds.length > 0) {
|
|
14706
15107
|
const oldFirstBounds = session.selectionBounds[0];
|
|
14707
15108
|
const newFirstBounds = newBounds[0];
|
|
14708
|
-
|
|
14709
|
-
|
|
14710
|
-
|
|
14711
|
-
|
|
14712
|
-
|
|
14713
|
-
const offsetRatio = oldHalfWidth > 0 ? offsetX / oldHalfWidth : 0;
|
|
14714
|
-
const newCenterX = newFirstBounds.x + newFirstBounds.width / 2;
|
|
14715
|
-
const newHalfWidth = newFirstBounds.width / 2;
|
|
14716
|
-
updatedPosition = {
|
|
14717
|
-
...session.position,
|
|
14718
|
-
x: newCenterX + offsetRatio * newHalfWidth
|
|
14719
|
-
};
|
|
14720
|
-
}
|
|
15109
|
+
const updatedPosition = recalculateSessionPosition({
|
|
15110
|
+
currentPosition: session.position,
|
|
15111
|
+
previousBounds: oldFirstBounds,
|
|
15112
|
+
nextBounds: newFirstBounds
|
|
15113
|
+
});
|
|
14721
15114
|
updatedSessions.set(sessionId, {
|
|
14722
15115
|
...session,
|
|
14723
15116
|
selectionBounds: newBounds,
|
|
@@ -15013,7 +15406,7 @@ var init_log_intro = __esm({
|
|
|
15013
15406
|
init_is_extension_context();
|
|
15014
15407
|
logIntro = () => {
|
|
15015
15408
|
try {
|
|
15016
|
-
const version = "0.1.
|
|
15409
|
+
const version = "0.1.21";
|
|
15017
15410
|
const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
|
|
15018
15411
|
console.log(
|
|
15019
15412
|
`%cReact Grab${version ? ` v${version}` : ""}%c
|
|
@@ -15783,6 +16176,9 @@ var init_core = __esm({
|
|
|
15783
16176
|
return createElementBounds(element);
|
|
15784
16177
|
};
|
|
15785
16178
|
let lastElementDetectionTime = 0;
|
|
16179
|
+
let pendingDetectionScheduledAt = 0;
|
|
16180
|
+
let latestDetectionX = 0;
|
|
16181
|
+
let latestDetectionY = 0;
|
|
15786
16182
|
let dragPreviewDebounceTimerId = null;
|
|
15787
16183
|
const [debouncedDragPointer, setDebouncedDragPointer] = createSignal(null);
|
|
15788
16184
|
const scheduleDragPreviewUpdate = (clientX, clientY) => {
|
|
@@ -15816,6 +16212,8 @@ var init_core = __esm({
|
|
|
15816
16212
|
const [resolvedComponentName, setResolvedComponentName] = createSignal(void 0);
|
|
15817
16213
|
const [actionCycleItems, setActionCycleItems] = createSignal([]);
|
|
15818
16214
|
const [actionCycleActiveIndex, setActionCycleActiveIndex] = createSignal(null);
|
|
16215
|
+
const [arrowNavigationElements, setArrowNavigationElements] = createSignal([]);
|
|
16216
|
+
const [arrowNavigationActiveIndex, setArrowNavigationActiveIndex] = createSignal(0);
|
|
15819
16217
|
const arrowNavigator = createArrowNavigator(isValidGrabbableElement, createElementBounds);
|
|
15820
16218
|
const autoScroller = createAutoScroller(() => store.pointer, () => isDragging());
|
|
15821
16219
|
const isRendererActive = createMemo(() => isActivated() && !isCopying());
|
|
@@ -16135,6 +16533,7 @@ var init_core = __esm({
|
|
|
16135
16533
|
});
|
|
16136
16534
|
};
|
|
16137
16535
|
const targetElement = createMemo(() => {
|
|
16536
|
+
void store.viewportVersion;
|
|
16138
16537
|
if (!isRendererActive() || isDragging()) return null;
|
|
16139
16538
|
const element = store.detectedElement;
|
|
16140
16539
|
if (!isElementConnected(element)) return null;
|
|
@@ -16469,7 +16868,7 @@ var init_core = __esm({
|
|
|
16469
16868
|
const wasDragging = isDragging();
|
|
16470
16869
|
const previousFocused = store.previouslyFocusedElement;
|
|
16471
16870
|
actions.deactivate();
|
|
16472
|
-
|
|
16871
|
+
clearArrowNavigation();
|
|
16473
16872
|
keyboardSelectedElement = null;
|
|
16474
16873
|
isPendingContextMenuSelect = false;
|
|
16475
16874
|
if (wasDragging) {
|
|
@@ -16663,6 +17062,7 @@ var init_core = __esm({
|
|
|
16663
17062
|
};
|
|
16664
17063
|
const openContextMenu = (element, position) => {
|
|
16665
17064
|
actions.showContextMenu(position, element);
|
|
17065
|
+
clearArrowNavigation();
|
|
16666
17066
|
dismissAllPopups();
|
|
16667
17067
|
pluginRegistry.hooks.onContextMenu(element, position);
|
|
16668
17068
|
};
|
|
@@ -16702,12 +17102,19 @@ var init_core = __esm({
|
|
|
16702
17102
|
x: clientX,
|
|
16703
17103
|
y: clientY
|
|
16704
17104
|
});
|
|
17105
|
+
latestDetectionX = clientX;
|
|
17106
|
+
latestDetectionY = clientY;
|
|
16705
17107
|
const now = performance.now();
|
|
16706
|
-
|
|
17108
|
+
const isDetectionPending = pendingDetectionScheduledAt > 0 && now - pendingDetectionScheduledAt < PENDING_DETECTION_STALENESS_MS;
|
|
17109
|
+
if (now - lastElementDetectionTime >= ELEMENT_DETECTION_THROTTLE_MS && !isDetectionPending) {
|
|
16707
17110
|
lastElementDetectionTime = now;
|
|
17111
|
+
pendingDetectionScheduledAt = now;
|
|
16708
17112
|
onIdle(() => {
|
|
16709
|
-
const candidate = getElementAtPosition(
|
|
16710
|
-
|
|
17113
|
+
const candidate = getElementAtPosition(latestDetectionX, latestDetectionY);
|
|
17114
|
+
if (candidate !== store.detectedElement) {
|
|
17115
|
+
actions.setDetectedElement(candidate);
|
|
17116
|
+
}
|
|
17117
|
+
pendingDetectionScheduledAt = 0;
|
|
16711
17118
|
});
|
|
16712
17119
|
}
|
|
16713
17120
|
if (isDragging()) {
|
|
@@ -16861,7 +17268,6 @@ var init_core = __esm({
|
|
|
16861
17268
|
if (shouldBlockEnter) {
|
|
16862
17269
|
keyboardClaimer.claimedEvents.add(event);
|
|
16863
17270
|
event.preventDefault();
|
|
16864
|
-
event.stopPropagation();
|
|
16865
17271
|
event.stopImmediatePropagation();
|
|
16866
17272
|
return true;
|
|
16867
17273
|
}
|
|
@@ -16895,30 +17301,67 @@ var init_core = __esm({
|
|
|
16895
17301
|
}
|
|
16896
17302
|
return false;
|
|
16897
17303
|
};
|
|
17304
|
+
const clearArrowNavigation = () => {
|
|
17305
|
+
setArrowNavigationElements([]);
|
|
17306
|
+
setArrowNavigationActiveIndex(0);
|
|
17307
|
+
arrowNavigator.clearHistory();
|
|
17308
|
+
};
|
|
17309
|
+
const selectAndFocusElement = (element) => {
|
|
17310
|
+
actions.setFrozenElement(element);
|
|
17311
|
+
actions.freeze();
|
|
17312
|
+
keyboardSelectedElement = element;
|
|
17313
|
+
const bounds = createElementBounds(element);
|
|
17314
|
+
const center = getBoundsCenter(bounds);
|
|
17315
|
+
actions.setPointer(center);
|
|
17316
|
+
if (store.contextMenuPosition !== null) {
|
|
17317
|
+
actions.showContextMenu(center, element);
|
|
17318
|
+
}
|
|
17319
|
+
};
|
|
17320
|
+
const openArrowNavigationMenu = (anchorElement) => {
|
|
17321
|
+
const bounds = createElementBounds(anchorElement);
|
|
17322
|
+
const elementsAtPoint = getElementsAtPoint(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2).filter(isValidGrabbableElement).reverse();
|
|
17323
|
+
setArrowNavigationElements(elementsAtPoint);
|
|
17324
|
+
setArrowNavigationActiveIndex(Math.max(0, elementsAtPoint.indexOf(anchorElement)));
|
|
17325
|
+
};
|
|
17326
|
+
const handleArrowNavigationSelect = (index) => {
|
|
17327
|
+
const targetElement2 = arrowNavigationElements()[index];
|
|
17328
|
+
if (!targetElement2) return;
|
|
17329
|
+
setArrowNavigationActiveIndex(index);
|
|
17330
|
+
arrowNavigator.clearHistory();
|
|
17331
|
+
selectAndFocusElement(targetElement2);
|
|
17332
|
+
};
|
|
16898
17333
|
const handleArrowNavigation = (event) => {
|
|
16899
17334
|
if (!isActivated() || isPromptMode()) return false;
|
|
16900
17335
|
if (!ARROW_KEYS.has(event.key)) return false;
|
|
16901
17336
|
let currentElement = effectiveElement();
|
|
16902
17337
|
const isInitialSelection = !currentElement;
|
|
16903
17338
|
if (!currentElement) {
|
|
16904
|
-
|
|
16905
|
-
const viewportCenterY = window.innerHeight / 2;
|
|
16906
|
-
currentElement = getElementAtPosition(viewportCenterX, viewportCenterY);
|
|
17339
|
+
currentElement = getElementAtPosition(window.innerWidth / 2, window.innerHeight / 2);
|
|
16907
17340
|
}
|
|
16908
17341
|
if (!currentElement) return false;
|
|
17342
|
+
const isVertical = event.key === "ArrowUp" || event.key === "ArrowDown";
|
|
17343
|
+
if (!isVertical) {
|
|
17344
|
+
clearArrowNavigation();
|
|
17345
|
+
const nextElement2 = arrowNavigator.findNext(event.key, currentElement);
|
|
17346
|
+
if (!nextElement2 && !isInitialSelection) return false;
|
|
17347
|
+
event.preventDefault();
|
|
17348
|
+
event.stopPropagation();
|
|
17349
|
+
selectAndFocusElement(nextElement2 ?? currentElement);
|
|
17350
|
+
return true;
|
|
17351
|
+
}
|
|
17352
|
+
if (arrowNavigationElements().length === 0) {
|
|
17353
|
+
openArrowNavigationMenu(currentElement);
|
|
17354
|
+
}
|
|
16909
17355
|
const nextElement = arrowNavigator.findNext(event.key, currentElement);
|
|
16910
|
-
if (!nextElement && !isInitialSelection) return false;
|
|
16911
17356
|
const elementToSelect = nextElement ?? currentElement;
|
|
16912
17357
|
event.preventDefault();
|
|
16913
17358
|
event.stopPropagation();
|
|
16914
|
-
|
|
16915
|
-
|
|
16916
|
-
|
|
16917
|
-
|
|
16918
|
-
|
|
16919
|
-
|
|
16920
|
-
if (store.contextMenuPosition !== null) {
|
|
16921
|
-
actions.showContextMenu(selectionCenter, elementToSelect);
|
|
17359
|
+
selectAndFocusElement(elementToSelect);
|
|
17360
|
+
const newIndex = arrowNavigationElements().indexOf(elementToSelect);
|
|
17361
|
+
if (newIndex !== -1) {
|
|
17362
|
+
setArrowNavigationActiveIndex(newIndex);
|
|
17363
|
+
} else {
|
|
17364
|
+
openArrowNavigationMenu(elementToSelect);
|
|
16922
17365
|
}
|
|
16923
17366
|
return true;
|
|
16924
17367
|
};
|
|
@@ -16929,7 +17372,6 @@ var init_core = __esm({
|
|
|
16929
17372
|
const canActivateFromCopied = !isHoldingKeys() && !isPromptMode() && !isActivated() && copiedElement && isElementConnected(copiedElement) && !store.labelInstances.some((instance) => instance.status === "copied" || instance.status === "fading");
|
|
16930
17373
|
if (canActivateFromCopied) {
|
|
16931
17374
|
event.preventDefault();
|
|
16932
|
-
event.stopPropagation();
|
|
16933
17375
|
event.stopImmediatePropagation();
|
|
16934
17376
|
const center = getBoundsCenter(createElementBounds(copiedElement));
|
|
16935
17377
|
actions.setPointer(center);
|
|
@@ -16945,7 +17387,6 @@ var init_core = __esm({
|
|
|
16945
17387
|
const canActivateFromHolding = isHoldingKeys() && !isPromptMode();
|
|
16946
17388
|
if (canActivateFromHolding) {
|
|
16947
17389
|
event.preventDefault();
|
|
16948
|
-
event.stopPropagation();
|
|
16949
17390
|
event.stopImmediatePropagation();
|
|
16950
17391
|
const element = store.frozenElement || targetElement();
|
|
16951
17392
|
if (element) {
|
|
@@ -17004,6 +17445,15 @@ var init_core = __esm({
|
|
|
17004
17445
|
activeIndex: actionCycleActiveIndex(),
|
|
17005
17446
|
isVisible: actionCycleActiveIndex() !== null && actionCycleItems().length > 0
|
|
17006
17447
|
}));
|
|
17448
|
+
const arrowNavigationItems = createMemo(() => arrowNavigationElements().map((element) => ({
|
|
17449
|
+
tagName: getTagName(element) || "element",
|
|
17450
|
+
componentName: getComponentDisplayName(element) ?? void 0
|
|
17451
|
+
})));
|
|
17452
|
+
const arrowNavigationState = createMemo(() => ({
|
|
17453
|
+
items: arrowNavigationItems(),
|
|
17454
|
+
activeIndex: arrowNavigationActiveIndex(),
|
|
17455
|
+
isVisible: arrowNavigationElements().length > 0
|
|
17456
|
+
}));
|
|
17007
17457
|
createEffect(on(selectionElement, () => {
|
|
17008
17458
|
resetActionCycle();
|
|
17009
17459
|
}));
|
|
@@ -17116,7 +17566,6 @@ var init_core = __esm({
|
|
|
17116
17566
|
if ((isActivated() || isHoldingKeys()) && !isPromptMode()) {
|
|
17117
17567
|
event.preventDefault();
|
|
17118
17568
|
if (isEnterCode(event.code)) {
|
|
17119
|
-
event.stopPropagation();
|
|
17120
17569
|
event.stopImmediatePropagation();
|
|
17121
17570
|
}
|
|
17122
17571
|
}
|
|
@@ -17320,7 +17769,7 @@ var init_core = __esm({
|
|
|
17320
17769
|
const isActiveState = isTouchPointer ? isHoldingKeys() : isActivated();
|
|
17321
17770
|
if (isActiveState && !isPromptMode() && isToggleFrozen()) {
|
|
17322
17771
|
actions.unfreeze();
|
|
17323
|
-
|
|
17772
|
+
clearArrowNavigation();
|
|
17324
17773
|
}
|
|
17325
17774
|
handlePointerMove(event.clientX, event.clientY);
|
|
17326
17775
|
}, {
|
|
@@ -17347,7 +17796,6 @@ var init_core = __esm({
|
|
|
17347
17796
|
if (didHandle) {
|
|
17348
17797
|
document.documentElement.setPointerCapture(event.pointerId);
|
|
17349
17798
|
event.preventDefault();
|
|
17350
|
-
event.stopPropagation();
|
|
17351
17799
|
event.stopImmediatePropagation();
|
|
17352
17800
|
}
|
|
17353
17801
|
}, {
|
|
@@ -17365,7 +17813,12 @@ var init_core = __esm({
|
|
|
17365
17813
|
});
|
|
17366
17814
|
eventListenerManager.addWindowListener("contextmenu", (event) => {
|
|
17367
17815
|
if (!isRendererActive() || isCopying() || isPromptMode()) return;
|
|
17368
|
-
|
|
17816
|
+
const isFromOverlay = isEventFromOverlay(event, "data-react-grab-ignore-events");
|
|
17817
|
+
if (isFromOverlay && arrowNavigationElements().length > 0) {
|
|
17818
|
+
clearArrowNavigation();
|
|
17819
|
+
} else if (isFromOverlay) {
|
|
17820
|
+
return;
|
|
17821
|
+
}
|
|
17369
17822
|
if (store.contextMenuPosition !== null) {
|
|
17370
17823
|
event.preventDefault();
|
|
17371
17824
|
return;
|
|
@@ -17401,7 +17854,6 @@ var init_core = __esm({
|
|
|
17401
17854
|
if (store.contextMenuPosition !== null) return;
|
|
17402
17855
|
if (isRendererActive() || isCopying() || didJustDrag()) {
|
|
17403
17856
|
event.preventDefault();
|
|
17404
|
-
event.stopPropagation();
|
|
17405
17857
|
event.stopImmediatePropagation();
|
|
17406
17858
|
if (store.wasActivatedByToggle && !isCopying() && !isPromptMode()) {
|
|
17407
17859
|
if (!isHoldingKeys()) {
|
|
@@ -18253,6 +18705,10 @@ var init_core = __esm({
|
|
|
18253
18705
|
get selectionActionCycleState() {
|
|
18254
18706
|
return actionCycleState();
|
|
18255
18707
|
},
|
|
18708
|
+
get selectionArrowNavigationState() {
|
|
18709
|
+
return arrowNavigationState();
|
|
18710
|
+
},
|
|
18711
|
+
onArrowNavigationSelect: handleArrowNavigationSelect,
|
|
18256
18712
|
get labelInstances() {
|
|
18257
18713
|
return computedLabelInstances();
|
|
18258
18714
|
},
|