react-grab 0.1.20 → 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 +752 -350
- package/dist/react.js +752 -350
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/chunk-5NNTSQ2N.js +0 -118
- package/dist/chunk-DHDUZ7MT.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
|
|
|
@@ -2140,7 +2140,7 @@ var VERSION, VIEWPORT_MARGIN_PX, OFFSCREEN_POSITION, SELECTION_LERP_FACTOR, FEED
|
|
|
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;
|
|
@@ -2530,6 +2530,46 @@ var init_is_element_connected = __esm({
|
|
|
2530
2530
|
}
|
|
2531
2531
|
});
|
|
2532
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
|
+
|
|
2533
2573
|
// src/core/store.ts
|
|
2534
2574
|
var createInitialStore, createGrabStore;
|
|
2535
2575
|
var init_store2 = __esm({
|
|
@@ -2539,6 +2579,7 @@ var init_store2 = __esm({
|
|
|
2539
2579
|
init_constants();
|
|
2540
2580
|
init_create_element_bounds();
|
|
2541
2581
|
init_is_element_connected();
|
|
2582
|
+
init_recalculate_session_position();
|
|
2542
2583
|
createInitialStore = (input) => ({
|
|
2543
2584
|
current: { state: "idle" },
|
|
2544
2585
|
wasActivatedByToggle: false,
|
|
@@ -2938,19 +2979,11 @@ var init_store2 = __esm({
|
|
|
2938
2979
|
if (isElementConnected(element)) {
|
|
2939
2980
|
const newBounds = createElementBounds(element);
|
|
2940
2981
|
const oldFirstBounds = session.selectionBounds[0];
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
const offsetRatio = oldHalfWidth > 0 ? offsetX / oldHalfWidth : 0;
|
|
2947
|
-
const newCenterX = newBounds.x + newBounds.width / 2;
|
|
2948
|
-
const newHalfWidth = newBounds.width / 2;
|
|
2949
|
-
updatedPosition = {
|
|
2950
|
-
...session.position,
|
|
2951
|
-
x: newCenterX + offsetRatio * newHalfWidth
|
|
2952
|
-
};
|
|
2953
|
-
}
|
|
2982
|
+
const updatedPosition = recalculateSessionPosition({
|
|
2983
|
+
currentPosition: session.position,
|
|
2984
|
+
previousBounds: oldFirstBounds,
|
|
2985
|
+
nextBounds: newBounds
|
|
2986
|
+
});
|
|
2954
2987
|
updatedSessions.set(sessionId, {
|
|
2955
2988
|
...session,
|
|
2956
2989
|
selectionBounds: [newBounds],
|
|
@@ -3882,7 +3915,7 @@ var init_truncate_string = __esm({
|
|
|
3882
3915
|
});
|
|
3883
3916
|
|
|
3884
3917
|
// src/core/context.ts
|
|
3885
|
-
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;
|
|
3886
3919
|
var init_context = __esm({
|
|
3887
3920
|
"src/core/context.ts"() {
|
|
3888
3921
|
"use strict";
|
|
@@ -3892,6 +3925,16 @@ var init_context = __esm({
|
|
|
3892
3925
|
init_constants();
|
|
3893
3926
|
init_get_tag_name();
|
|
3894
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
|
+
]);
|
|
3895
3938
|
NEXT_INTERNAL_COMPONENT_NAMES = /* @__PURE__ */ new Set([
|
|
3896
3939
|
"InnerLayoutRouter",
|
|
3897
3940
|
"RedirectErrorBoundary",
|
|
@@ -3936,9 +3979,11 @@ var init_context = __esm({
|
|
|
3936
3979
|
return cachedIsNextProject;
|
|
3937
3980
|
};
|
|
3938
3981
|
checkIsInternalComponentName = (name) => {
|
|
3939
|
-
if (name.startsWith("_")) return true;
|
|
3940
3982
|
if (NEXT_INTERNAL_COMPONENT_NAMES.has(name)) return true;
|
|
3941
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
|
+
}
|
|
3942
3987
|
return false;
|
|
3943
3988
|
};
|
|
3944
3989
|
checkIsSourceComponentName = (name) => {
|
|
@@ -8017,12 +8062,10 @@ var init_completion_view = __esm({
|
|
|
8017
8062
|
return (() => {
|
|
8018
8063
|
var _el$ = _tmpl$15();
|
|
8019
8064
|
addEventListener(_el$, "click", (event) => {
|
|
8020
|
-
event.stopPropagation();
|
|
8021
8065
|
event.stopImmediatePropagation();
|
|
8022
8066
|
props.onClick();
|
|
8023
8067
|
});
|
|
8024
8068
|
addEventListener(_el$, "pointerdown", (event) => {
|
|
8025
|
-
event.stopPropagation();
|
|
8026
8069
|
event.stopImmediatePropagation();
|
|
8027
8070
|
});
|
|
8028
8071
|
insert(_el$, createComponent(IconEllipsis, {
|
|
@@ -8074,7 +8117,6 @@ var init_completion_view = __esm({
|
|
|
8074
8117
|
const isEnterWithoutShift = event.code === "Enter" && !event.shiftKey;
|
|
8075
8118
|
const isEscape = event.code === "Escape";
|
|
8076
8119
|
if (!isUndoRedo) {
|
|
8077
|
-
event.stopPropagation();
|
|
8078
8120
|
event.stopImmediatePropagation();
|
|
8079
8121
|
}
|
|
8080
8122
|
if (isEnterWithoutShift) {
|
|
@@ -8281,8 +8323,166 @@ var init_completion_view = __esm({
|
|
|
8281
8323
|
}
|
|
8282
8324
|
});
|
|
8283
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
|
+
|
|
8284
8484
|
// src/components/selection-label/index.tsx
|
|
8285
|
-
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;
|
|
8286
8486
|
var init_selection_label = __esm({
|
|
8287
8487
|
"src/components/selection-label/index.tsx"() {
|
|
8288
8488
|
"use strict";
|
|
@@ -8296,6 +8496,7 @@ var init_selection_label = __esm({
|
|
|
8296
8496
|
init_web();
|
|
8297
8497
|
init_web();
|
|
8298
8498
|
init_web();
|
|
8499
|
+
init_web();
|
|
8299
8500
|
init_solid();
|
|
8300
8501
|
init_constants();
|
|
8301
8502
|
init_get_arrow_size();
|
|
@@ -8312,11 +8513,12 @@ var init_selection_label = __esm({
|
|
|
8312
8513
|
init_discard_prompt();
|
|
8313
8514
|
init_error_view();
|
|
8314
8515
|
init_completion_view();
|
|
8315
|
-
|
|
8316
|
-
_tmpl$
|
|
8317
|
-
_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">`);
|
|
8318
8520
|
_tmpl$43 = /* @__PURE__ */ template(`<div class="flex flex-col w-[calc(100%+16px)] -mx-2 -my-1.5">`);
|
|
8319
|
-
_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">`);
|
|
8320
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">`);
|
|
8321
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">`);
|
|
8322
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>`);
|
|
@@ -8356,6 +8558,7 @@ var init_selection_label = __esm({
|
|
|
8356
8558
|
if (props.status === "error" && (props.onAcknowledgeError || props.onRetry)) {
|
|
8357
8559
|
return true;
|
|
8358
8560
|
}
|
|
8561
|
+
if (props.arrowNavigationState?.isVisible) return true;
|
|
8359
8562
|
return false;
|
|
8360
8563
|
};
|
|
8361
8564
|
let resizeObserver;
|
|
@@ -8371,12 +8574,10 @@ var init_selection_label = __esm({
|
|
|
8371
8574
|
const isCtrlCToAbort = event.code === "KeyC" && event.ctrlKey && props.status === "copying" && props.onAbort;
|
|
8372
8575
|
if (isEnterToExpand) {
|
|
8373
8576
|
event.preventDefault();
|
|
8374
|
-
event.stopPropagation();
|
|
8375
8577
|
event.stopImmediatePropagation();
|
|
8376
8578
|
props.onToggleExpand?.();
|
|
8377
8579
|
} else if (isCtrlCToAbort) {
|
|
8378
8580
|
event.preventDefault();
|
|
8379
|
-
event.stopPropagation();
|
|
8380
8581
|
event.stopImmediatePropagation();
|
|
8381
8582
|
props.onAbort?.();
|
|
8382
8583
|
}
|
|
@@ -8501,7 +8702,6 @@ var init_selection_label = __esm({
|
|
|
8501
8702
|
computedArrowPosition
|
|
8502
8703
|
};
|
|
8503
8704
|
});
|
|
8504
|
-
const computedPosition = () => positionComputation().position;
|
|
8505
8705
|
createEffect(() => {
|
|
8506
8706
|
const result = positionComputation();
|
|
8507
8707
|
if (result.computedArrowPosition !== null) {
|
|
@@ -8514,7 +8714,6 @@ var init_selection_label = __esm({
|
|
|
8514
8714
|
if (event.isComposing || event.keyCode === IME_COMPOSING_KEY_CODE) {
|
|
8515
8715
|
return;
|
|
8516
8716
|
}
|
|
8517
|
-
event.stopPropagation();
|
|
8518
8717
|
event.stopImmediatePropagation();
|
|
8519
8718
|
const isEnterWithoutShift = event.code === "Enter" && !event.shiftKey;
|
|
8520
8719
|
const isEscape = event.code === "Escape";
|
|
@@ -8543,8 +8742,8 @@ var init_selection_label = __esm({
|
|
|
8543
8742
|
const actionCycleItems = () => props.actionCycleState?.items ?? [];
|
|
8544
8743
|
const actionCycleActiveIndex = () => props.actionCycleState?.activeIndex ?? 0;
|
|
8545
8744
|
const isActionCycleVisible = () => Boolean(props.actionCycleState?.isVisible);
|
|
8745
|
+
const isArrowNavigationVisible = () => Boolean(props.arrowNavigationState?.isVisible);
|
|
8546
8746
|
const handleTagClick = (event) => {
|
|
8547
|
-
event.stopPropagation();
|
|
8548
8747
|
event.stopImmediatePropagation();
|
|
8549
8748
|
if (props.filePath && props.onOpen) {
|
|
8550
8749
|
props.onOpen();
|
|
@@ -8552,7 +8751,6 @@ var init_selection_label = __esm({
|
|
|
8552
8751
|
};
|
|
8553
8752
|
const isTagClickable = () => Boolean(props.filePath && props.onOpen);
|
|
8554
8753
|
const handleContainerPointerDown = (event) => {
|
|
8555
|
-
event.stopPropagation();
|
|
8556
8754
|
event.stopImmediatePropagation();
|
|
8557
8755
|
const isEditableInputVisible = canInteract() && props.isPromptMode && !props.isPendingDismiss && props.onSubmit;
|
|
8558
8756
|
if (isEditableInputVisible && inputRef) {
|
|
@@ -8569,7 +8767,6 @@ var init_selection_label = __esm({
|
|
|
8569
8767
|
_el$.addEventListener("mouseleave", () => props.onHoverChange?.(false));
|
|
8570
8768
|
_el$.addEventListener("mouseenter", () => props.onHoverChange?.(true));
|
|
8571
8769
|
_el$.$$click = (event) => {
|
|
8572
|
-
event.stopPropagation();
|
|
8573
8770
|
event.stopImmediatePropagation();
|
|
8574
8771
|
};
|
|
8575
8772
|
_el$.$$pointerdown = handleContainerPointerDown;
|
|
@@ -8585,10 +8782,10 @@ var init_selection_label = __esm({
|
|
|
8585
8782
|
return arrowPosition();
|
|
8586
8783
|
},
|
|
8587
8784
|
get leftPercent() {
|
|
8588
|
-
return
|
|
8785
|
+
return positionComputation().position.arrowLeftPercent;
|
|
8589
8786
|
},
|
|
8590
8787
|
get leftOffsetPx() {
|
|
8591
|
-
return
|
|
8788
|
+
return positionComputation().position.arrowLeftOffset;
|
|
8592
8789
|
},
|
|
8593
8790
|
get labelWidth() {
|
|
8594
8791
|
return panelWidth();
|
|
@@ -8640,7 +8837,7 @@ var init_selection_label = __esm({
|
|
|
8640
8837
|
return memo(() => props.status === "copying")() && !props.isPendingAbort;
|
|
8641
8838
|
},
|
|
8642
8839
|
get children() {
|
|
8643
|
-
var _el$3 = _tmpl$
|
|
8840
|
+
var _el$3 = _tmpl$35(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
|
|
8644
8841
|
insert(_el$4, createComponent(IconLoader, {
|
|
8645
8842
|
size: 13,
|
|
8646
8843
|
"class": "text-[#71717a] shrink-0"
|
|
@@ -8653,7 +8850,7 @@ var init_selection_label = __esm({
|
|
|
8653
8850
|
get children() {
|
|
8654
8851
|
return createComponent(BottomSection, {
|
|
8655
8852
|
get children() {
|
|
8656
|
-
var _el$6 = _tmpl$
|
|
8853
|
+
var _el$6 = _tmpl$27(), _el$7 = _el$6.firstChild;
|
|
8657
8854
|
var _ref$3 = inputRef;
|
|
8658
8855
|
typeof _ref$3 === "function" ? use(_ref$3, _el$7) : inputRef = _el$7;
|
|
8659
8856
|
insert(_el$6, createComponent(Show, {
|
|
@@ -8661,7 +8858,7 @@ var init_selection_label = __esm({
|
|
|
8661
8858
|
return props.onAbort;
|
|
8662
8859
|
},
|
|
8663
8860
|
get children() {
|
|
8664
|
-
var _el$8 = _tmpl$
|
|
8861
|
+
var _el$8 = _tmpl$17();
|
|
8665
8862
|
_el$8.$$click = (event) => {
|
|
8666
8863
|
event.stopPropagation();
|
|
8667
8864
|
props.onAbort?.();
|
|
@@ -8715,12 +8912,28 @@ var init_selection_label = __esm({
|
|
|
8715
8912
|
onHoverChange: handleTagHoverChange,
|
|
8716
8913
|
shrink: true,
|
|
8717
8914
|
get forceShowIcon() {
|
|
8718
|
-
return Boolean(props.isContextMenuOpen);
|
|
8915
|
+
return memo(() => !!isArrowNavigationVisible())() ? isTagClickable() : Boolean(props.isContextMenuOpen);
|
|
8719
8916
|
}
|
|
8720
8917
|
}));
|
|
8721
8918
|
insert(_el$9, createComponent(Show, {
|
|
8722
8919
|
get when() {
|
|
8723
|
-
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();
|
|
8724
8937
|
},
|
|
8725
8938
|
get children() {
|
|
8726
8939
|
return createComponent(BottomSection, {
|
|
@@ -8744,10 +8957,10 @@ var init_selection_label = __esm({
|
|
|
8744
8957
|
}
|
|
8745
8958
|
}), null);
|
|
8746
8959
|
createRenderEffect((_p$) => {
|
|
8747
|
-
var _v$
|
|
8748
|
-
_v$
|
|
8749
|
-
_v$
|
|
8750
|
-
_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);
|
|
8751
8964
|
return _p$;
|
|
8752
8965
|
}, {
|
|
8753
8966
|
e: void 0,
|
|
@@ -8762,6 +8975,18 @@ var init_selection_label = __esm({
|
|
|
8762
8975
|
});
|
|
8763
8976
|
}
|
|
8764
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
|
+
});
|
|
8765
8990
|
return _el$9;
|
|
8766
8991
|
}
|
|
8767
8992
|
}), null);
|
|
@@ -8821,9 +9046,9 @@ var init_selection_label = __esm({
|
|
|
8821
9046
|
}
|
|
8822
9047
|
}), null);
|
|
8823
9048
|
createRenderEffect((_p$) => {
|
|
8824
|
-
var _v$ = props.replyToPrompt ? "14px" : "0", _v$
|
|
8825
|
-
_v$ !== _p$.e && setStyleProperty(_el$14, "padding-left", _p$.e = _v$);
|
|
8826
|
-
_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);
|
|
8827
9052
|
return _p$;
|
|
8828
9053
|
}, {
|
|
8829
9054
|
e: void 0,
|
|
@@ -8871,15 +9096,15 @@ var init_selection_label = __esm({
|
|
|
8871
9096
|
}
|
|
8872
9097
|
}), null);
|
|
8873
9098
|
createRenderEffect((_p$) => {
|
|
8874
|
-
var _v$
|
|
8875
|
-
_v$
|
|
8876
|
-
_v$
|
|
8877
|
-
_v$
|
|
8878
|
-
_v$
|
|
8879
|
-
_v$
|
|
8880
|
-
_v$
|
|
8881
|
-
_v$
|
|
8882
|
-
_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);
|
|
8883
9108
|
return _p$;
|
|
8884
9109
|
}, {
|
|
8885
9110
|
e: void 0,
|
|
@@ -8940,18 +9165,18 @@ var init_state = __esm({
|
|
|
8940
9165
|
});
|
|
8941
9166
|
|
|
8942
9167
|
// src/components/icons/icon-select.tsx
|
|
8943
|
-
var _tmpl$
|
|
9168
|
+
var _tmpl$18, IconSelect;
|
|
8944
9169
|
var init_icon_select = __esm({
|
|
8945
9170
|
"src/components/icons/icon-select.tsx"() {
|
|
8946
9171
|
"use strict";
|
|
8947
9172
|
init_web();
|
|
8948
9173
|
init_web();
|
|
8949
9174
|
init_web();
|
|
8950
|
-
_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">`);
|
|
8951
9176
|
IconSelect = (props) => {
|
|
8952
9177
|
const size = () => props.size ?? 14;
|
|
8953
9178
|
return (() => {
|
|
8954
|
-
var _el$ = _tmpl$
|
|
9179
|
+
var _el$ = _tmpl$18();
|
|
8955
9180
|
createRenderEffect((_p$) => {
|
|
8956
9181
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
8957
9182
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -8970,18 +9195,18 @@ var init_icon_select = __esm({
|
|
|
8970
9195
|
});
|
|
8971
9196
|
|
|
8972
9197
|
// src/components/icons/icon-chevron.tsx
|
|
8973
|
-
var _tmpl$
|
|
9198
|
+
var _tmpl$19, IconChevron;
|
|
8974
9199
|
var init_icon_chevron = __esm({
|
|
8975
9200
|
"src/components/icons/icon-chevron.tsx"() {
|
|
8976
9201
|
"use strict";
|
|
8977
9202
|
init_web();
|
|
8978
9203
|
init_web();
|
|
8979
9204
|
init_web();
|
|
8980
|
-
_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">`);
|
|
8981
9206
|
IconChevron = (props) => {
|
|
8982
9207
|
const size = () => props.size ?? 12;
|
|
8983
9208
|
return (() => {
|
|
8984
|
-
var _el$ = _tmpl$
|
|
9209
|
+
var _el$ = _tmpl$19();
|
|
8985
9210
|
createRenderEffect((_p$) => {
|
|
8986
9211
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
8987
9212
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -9000,18 +9225,18 @@ var init_icon_chevron = __esm({
|
|
|
9000
9225
|
});
|
|
9001
9226
|
|
|
9002
9227
|
// src/components/icons/icon-clock.tsx
|
|
9003
|
-
var _tmpl$
|
|
9228
|
+
var _tmpl$20, IconClock;
|
|
9004
9229
|
var init_icon_clock = __esm({
|
|
9005
9230
|
"src/components/icons/icon-clock.tsx"() {
|
|
9006
9231
|
"use strict";
|
|
9007
9232
|
init_web();
|
|
9008
9233
|
init_web();
|
|
9009
9234
|
init_web();
|
|
9010
|
-
_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">`);
|
|
9011
9236
|
IconClock = (props) => {
|
|
9012
9237
|
const size = () => props.size ?? 14;
|
|
9013
9238
|
return (() => {
|
|
9014
|
-
var _el$ = _tmpl$
|
|
9239
|
+
var _el$ = _tmpl$20();
|
|
9015
9240
|
createRenderEffect((_p$) => {
|
|
9016
9241
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
9017
9242
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -9030,18 +9255,18 @@ var init_icon_clock = __esm({
|
|
|
9030
9255
|
});
|
|
9031
9256
|
|
|
9032
9257
|
// src/components/icons/icon-copy.tsx
|
|
9033
|
-
var _tmpl$
|
|
9258
|
+
var _tmpl$21, IconCopy;
|
|
9034
9259
|
var init_icon_copy = __esm({
|
|
9035
9260
|
"src/components/icons/icon-copy.tsx"() {
|
|
9036
9261
|
"use strict";
|
|
9037
9262
|
init_web();
|
|
9038
9263
|
init_web();
|
|
9039
9264
|
init_web();
|
|
9040
|
-
_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">`);
|
|
9041
9266
|
IconCopy = (props) => {
|
|
9042
9267
|
const size = () => props.size ?? 14;
|
|
9043
9268
|
return (() => {
|
|
9044
|
-
var _el$ = _tmpl$
|
|
9269
|
+
var _el$ = _tmpl$21();
|
|
9045
9270
|
createRenderEffect((_p$) => {
|
|
9046
9271
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
9047
9272
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -9635,7 +9860,7 @@ var init_freeze_gsap = __esm({
|
|
|
9635
9860
|
});
|
|
9636
9861
|
|
|
9637
9862
|
// src/utils/freeze-animations.ts
|
|
9638
|
-
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;
|
|
9639
9864
|
var init_freeze_animations = __esm({
|
|
9640
9865
|
"src/utils/freeze-animations.ts"() {
|
|
9641
9866
|
"use strict";
|
|
@@ -9655,10 +9880,15 @@ var init_freeze_animations = __esm({
|
|
|
9655
9880
|
transition: none !important;
|
|
9656
9881
|
}
|
|
9657
9882
|
`;
|
|
9883
|
+
SVG_ROOT_SELECTOR = "svg";
|
|
9658
9884
|
styleElement = null;
|
|
9659
9885
|
frozenElements = [];
|
|
9886
|
+
frozenSvgElements = [];
|
|
9660
9887
|
lastInputElements = [];
|
|
9661
9888
|
globalAnimationStyleElement = null;
|
|
9889
|
+
globalFrozenSvgElements = [];
|
|
9890
|
+
svgFreezeDepthMap = /* @__PURE__ */ new Map();
|
|
9891
|
+
frozenWaapiAnimations = [];
|
|
9662
9892
|
ensureStylesInjected = () => {
|
|
9663
9893
|
if (styleElement) return;
|
|
9664
9894
|
styleElement = createStyleElement(
|
|
@@ -9666,7 +9896,70 @@ var init_freeze_animations = __esm({
|
|
|
9666
9896
|
FROZEN_STYLES
|
|
9667
9897
|
);
|
|
9668
9898
|
};
|
|
9669
|
-
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
|
+
};
|
|
9670
9963
|
freezeAllAnimations = (elements) => {
|
|
9671
9964
|
if (elements.length === 0) return;
|
|
9672
9965
|
if (areElementsSame(elements, lastInputElements)) return;
|
|
@@ -9674,16 +9967,27 @@ var init_freeze_animations = __esm({
|
|
|
9674
9967
|
lastInputElements = [...elements];
|
|
9675
9968
|
ensureStylesInjected();
|
|
9676
9969
|
frozenElements = elements;
|
|
9970
|
+
frozenSvgElements = collectFrozenSvgElements(frozenElements);
|
|
9971
|
+
pauseSvgAnimations(frozenSvgElements);
|
|
9677
9972
|
for (const element of frozenElements) {
|
|
9678
9973
|
element.setAttribute(FROZEN_ELEMENT_ATTRIBUTE, "");
|
|
9679
9974
|
}
|
|
9975
|
+
frozenWaapiAnimations = collectWaapiAnimations(frozenElements);
|
|
9976
|
+
for (const animation of frozenWaapiAnimations) {
|
|
9977
|
+
animation.pause();
|
|
9978
|
+
}
|
|
9680
9979
|
};
|
|
9681
9980
|
unfreezeAllAnimations = () => {
|
|
9682
|
-
if (frozenElements.length === 0)
|
|
9981
|
+
if (frozenElements.length === 0 && frozenSvgElements.length === 0 && frozenWaapiAnimations.length === 0)
|
|
9982
|
+
return;
|
|
9683
9983
|
for (const element of frozenElements) {
|
|
9684
9984
|
element.removeAttribute(FROZEN_ELEMENT_ATTRIBUTE);
|
|
9685
9985
|
}
|
|
9986
|
+
resumeSvgAnimations(frozenSvgElements);
|
|
9987
|
+
finishAnimations(frozenWaapiAnimations);
|
|
9686
9988
|
frozenElements = [];
|
|
9989
|
+
frozenSvgElements = [];
|
|
9990
|
+
frozenWaapiAnimations = [];
|
|
9687
9991
|
lastInputElements = [];
|
|
9688
9992
|
};
|
|
9689
9993
|
freezeAnimations = (elements) => {
|
|
@@ -9701,6 +10005,10 @@ var init_freeze_animations = __esm({
|
|
|
9701
10005
|
"data-react-grab-global-freeze",
|
|
9702
10006
|
GLOBAL_FREEZE_STYLES
|
|
9703
10007
|
);
|
|
10008
|
+
globalFrozenSvgElements = collectFrozenSvgElements(
|
|
10009
|
+
Array.from(document.querySelectorAll(SVG_ROOT_SELECTOR))
|
|
10010
|
+
);
|
|
10011
|
+
pauseSvgAnimations(globalFrozenSvgElements);
|
|
9704
10012
|
freezeGsap();
|
|
9705
10013
|
};
|
|
9706
10014
|
unfreezeGlobalAnimations = () => {
|
|
@@ -9710,6 +10018,7 @@ var init_freeze_animations = __esm({
|
|
|
9710
10018
|
transition: none !important;
|
|
9711
10019
|
}
|
|
9712
10020
|
`;
|
|
10021
|
+
const animations = [];
|
|
9713
10022
|
for (const animation of document.getAnimations()) {
|
|
9714
10023
|
if (animation.effect instanceof KeyframeEffect) {
|
|
9715
10024
|
const target = animation.effect.target;
|
|
@@ -9720,13 +10029,13 @@ var init_freeze_animations = __esm({
|
|
|
9720
10029
|
}
|
|
9721
10030
|
}
|
|
9722
10031
|
}
|
|
9723
|
-
|
|
9724
|
-
animation.finish();
|
|
9725
|
-
} catch {
|
|
9726
|
-
}
|
|
10032
|
+
animations.push(animation);
|
|
9727
10033
|
}
|
|
10034
|
+
finishAnimations(animations);
|
|
9728
10035
|
globalAnimationStyleElement.remove();
|
|
9729
10036
|
globalAnimationStyleElement = null;
|
|
10037
|
+
resumeSvgAnimations(globalFrozenSvgElements);
|
|
10038
|
+
globalFrozenSvgElements = [];
|
|
9730
10039
|
unfreezeGsap();
|
|
9731
10040
|
};
|
|
9732
10041
|
}
|
|
@@ -9840,7 +10149,6 @@ var init_get_element_at_position = __esm({
|
|
|
9840
10149
|
init_is_valid_grabbable_element();
|
|
9841
10150
|
init_constants();
|
|
9842
10151
|
init_freeze_pseudo_states();
|
|
9843
|
-
init_create_element_bounds();
|
|
9844
10152
|
cache = null;
|
|
9845
10153
|
resumeTimerId = null;
|
|
9846
10154
|
scheduleResume = () => {
|
|
@@ -9899,9 +10207,6 @@ var init_get_element_at_position = __esm({
|
|
|
9899
10207
|
}
|
|
9900
10208
|
}
|
|
9901
10209
|
}
|
|
9902
|
-
if (result) {
|
|
9903
|
-
createElementBounds(result);
|
|
9904
|
-
}
|
|
9905
10210
|
scheduleResume();
|
|
9906
10211
|
cache = { clientX, clientY, element: result, timestamp: now };
|
|
9907
10212
|
return result;
|
|
@@ -9915,13 +10220,13 @@ var init_get_element_at_position = __esm({
|
|
|
9915
10220
|
});
|
|
9916
10221
|
|
|
9917
10222
|
// src/utils/freeze-pseudo-states.ts
|
|
9918
|
-
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;
|
|
9919
10224
|
var init_freeze_pseudo_states = __esm({
|
|
9920
10225
|
"src/utils/freeze-pseudo-states.ts"() {
|
|
9921
10226
|
"use strict";
|
|
9922
10227
|
init_get_element_at_position();
|
|
9923
10228
|
init_create_style_element();
|
|
9924
|
-
POINTER_EVENTS_STYLES = "
|
|
10229
|
+
POINTER_EVENTS_STYLES = "html { pointer-events: none !important; }";
|
|
9925
10230
|
MOUSE_EVENTS_TO_BLOCK = [
|
|
9926
10231
|
"mouseenter",
|
|
9927
10232
|
"mouseleave",
|
|
@@ -9960,80 +10265,62 @@ var init_freeze_pseudo_states = __esm({
|
|
|
9960
10265
|
"ring-color",
|
|
9961
10266
|
"ring-width"
|
|
9962
10267
|
];
|
|
9963
|
-
ANIMATION_CONTROLLED_PROPERTIES = [
|
|
9964
|
-
"opacity",
|
|
9965
|
-
"transform",
|
|
9966
|
-
"scale",
|
|
9967
|
-
"translate",
|
|
9968
|
-
"rotate"
|
|
9969
|
-
];
|
|
9970
10268
|
frozenHoverElements = /* @__PURE__ */ new Map();
|
|
9971
10269
|
frozenFocusElements = /* @__PURE__ */ new Map();
|
|
9972
10270
|
pointerEventsStyle = null;
|
|
9973
10271
|
stopEvent = (event) => {
|
|
9974
|
-
event.stopPropagation();
|
|
9975
10272
|
event.stopImmediatePropagation();
|
|
9976
10273
|
};
|
|
9977
10274
|
preventFocusChange = (event) => {
|
|
9978
10275
|
event.preventDefault();
|
|
9979
|
-
event.stopPropagation();
|
|
9980
10276
|
event.stopImmediatePropagation();
|
|
9981
10277
|
};
|
|
9982
|
-
|
|
9983
|
-
const
|
|
9984
|
-
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
collectHoverStates = () => {
|
|
9989
|
-
const elementsToFreeze = [];
|
|
9990
|
-
for (const element of document.querySelectorAll(":hover")) {
|
|
9991
|
-
if (!(element instanceof HTMLElement)) continue;
|
|
9992
|
-
const originalCssText = element.style.cssText;
|
|
9993
|
-
const computed = getComputedStyle(element);
|
|
9994
|
-
let frozenStyles = originalCssText;
|
|
9995
|
-
for (const prop of HOVER_STYLE_PROPERTIES) {
|
|
9996
|
-
const computedValue = computed.getPropertyValue(prop);
|
|
9997
|
-
if (computedValue) {
|
|
9998
|
-
frozenStyles += `${prop}: ${computedValue} !important; `;
|
|
9999
|
-
}
|
|
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);
|
|
10000
10284
|
}
|
|
10001
|
-
elementsToFreeze.push({ element, originalCssText, frozenStyles });
|
|
10002
10285
|
}
|
|
10003
|
-
return
|
|
10286
|
+
return originalPropertyValues;
|
|
10004
10287
|
};
|
|
10005
|
-
|
|
10288
|
+
collectPseudoStates = (selector, properties, alreadyFrozen) => {
|
|
10006
10289
|
const elementsToFreeze = [];
|
|
10007
|
-
for (const element of document.querySelectorAll(
|
|
10290
|
+
for (const element of document.querySelectorAll(selector)) {
|
|
10008
10291
|
if (!(element instanceof HTMLElement)) continue;
|
|
10009
|
-
if (
|
|
10010
|
-
const originalCssText = element.style.cssText;
|
|
10292
|
+
if (alreadyFrozen?.has(element)) continue;
|
|
10011
10293
|
const computed = getComputedStyle(element);
|
|
10012
|
-
let frozenStyles =
|
|
10013
|
-
|
|
10294
|
+
let frozenStyles = element.style.cssText;
|
|
10295
|
+
const originalPropertyValues = collectOriginalPropertyValues(
|
|
10296
|
+
element,
|
|
10297
|
+
properties
|
|
10298
|
+
);
|
|
10299
|
+
for (const prop of properties) {
|
|
10014
10300
|
const computedValue = computed.getPropertyValue(prop);
|
|
10015
10301
|
if (computedValue) {
|
|
10016
10302
|
frozenStyles += `${prop}: ${computedValue} !important; `;
|
|
10017
10303
|
}
|
|
10018
10304
|
}
|
|
10019
|
-
elementsToFreeze.push({ element,
|
|
10305
|
+
elementsToFreeze.push({ element, frozenStyles, originalPropertyValues });
|
|
10020
10306
|
}
|
|
10021
10307
|
return elementsToFreeze;
|
|
10022
10308
|
};
|
|
10023
10309
|
applyFrozenStates = (states, storageMap) => {
|
|
10024
|
-
for (const { element,
|
|
10025
|
-
storageMap.set(element,
|
|
10310
|
+
for (const { element, frozenStyles, originalPropertyValues } of states) {
|
|
10311
|
+
storageMap.set(element, originalPropertyValues);
|
|
10026
10312
|
element.style.cssText = frozenStyles;
|
|
10027
10313
|
}
|
|
10028
10314
|
};
|
|
10029
10315
|
restoreFrozenStates = (storageMap, styleProperties) => {
|
|
10030
|
-
for (const [element,
|
|
10031
|
-
|
|
10032
|
-
|
|
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 {
|
|
10033
10322
|
element.style.removeProperty(prop);
|
|
10034
10323
|
}
|
|
10035
|
-
} else {
|
|
10036
|
-
element.style.cssText = originalCssText;
|
|
10037
10324
|
}
|
|
10038
10325
|
}
|
|
10039
10326
|
storageMap.clear();
|
|
@@ -10052,8 +10339,12 @@ var init_freeze_pseudo_states = __esm({
|
|
|
10052
10339
|
for (const eventType of FOCUS_EVENTS_TO_BLOCK) {
|
|
10053
10340
|
document.addEventListener(eventType, preventFocusChange, true);
|
|
10054
10341
|
}
|
|
10055
|
-
const hoverStates =
|
|
10056
|
-
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
|
+
);
|
|
10057
10348
|
applyFrozenStates(hoverStates, frozenHoverElements);
|
|
10058
10349
|
applyFrozenStates(focusStates, frozenFocusElements);
|
|
10059
10350
|
pointerEventsStyle = createStyleElement(
|
|
@@ -10078,7 +10369,7 @@ var init_freeze_pseudo_states = __esm({
|
|
|
10078
10369
|
});
|
|
10079
10370
|
|
|
10080
10371
|
// src/components/tooltip.tsx
|
|
10081
|
-
var _tmpl$
|
|
10372
|
+
var _tmpl$28, tooltipCloseTimestamp, wasTooltipRecentlyVisible, Tooltip;
|
|
10082
10373
|
var init_tooltip = __esm({
|
|
10083
10374
|
"src/components/tooltip.tsx"() {
|
|
10084
10375
|
"use strict";
|
|
@@ -10090,7 +10381,7 @@ var init_tooltip = __esm({
|
|
|
10090
10381
|
init_solid();
|
|
10091
10382
|
init_cn();
|
|
10092
10383
|
init_constants();
|
|
10093
|
-
_tmpl$
|
|
10384
|
+
_tmpl$28 = /* @__PURE__ */ template(`<div style=z-index:2147483647>`);
|
|
10094
10385
|
tooltipCloseTimestamp = 0;
|
|
10095
10386
|
wasTooltipRecentlyVisible = () => {
|
|
10096
10387
|
return Date.now() - tooltipCloseTimestamp < TOOLTIP_GRACE_PERIOD_MS;
|
|
@@ -10134,7 +10425,7 @@ var init_tooltip = __esm({
|
|
|
10134
10425
|
return delayedVisible();
|
|
10135
10426
|
},
|
|
10136
10427
|
get children() {
|
|
10137
|
-
var _el$ = _tmpl$
|
|
10428
|
+
var _el$ = _tmpl$28();
|
|
10138
10429
|
insert(_el$, () => props.children);
|
|
10139
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")));
|
|
10140
10431
|
return _el$;
|
|
@@ -10163,7 +10454,7 @@ var init_toolbar_layout = __esm({
|
|
|
10163
10454
|
});
|
|
10164
10455
|
|
|
10165
10456
|
// src/components/toolbar/index.tsx
|
|
10166
|
-
var _tmpl$
|
|
10457
|
+
var _tmpl$29, _tmpl$210, _tmpl$36, Toolbar;
|
|
10167
10458
|
var init_toolbar = __esm({
|
|
10168
10459
|
"src/components/toolbar/index.tsx"() {
|
|
10169
10460
|
"use strict";
|
|
@@ -10179,6 +10470,7 @@ var init_toolbar = __esm({
|
|
|
10179
10470
|
init_web();
|
|
10180
10471
|
init_web();
|
|
10181
10472
|
init_web();
|
|
10473
|
+
init_web();
|
|
10182
10474
|
init_solid();
|
|
10183
10475
|
init_cn();
|
|
10184
10476
|
init_format_shortcut();
|
|
@@ -10196,9 +10488,9 @@ var init_toolbar = __esm({
|
|
|
10196
10488
|
init_tooltip();
|
|
10197
10489
|
init_toolbar_layout();
|
|
10198
10490
|
init_native_raf();
|
|
10199
|
-
_tmpl$
|
|
10200
|
-
_tmpl$
|
|
10201
|
-
_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">`);
|
|
10202
10494
|
Toolbar = (props) => {
|
|
10203
10495
|
let containerRef;
|
|
10204
10496
|
let expandableButtonsRef;
|
|
@@ -10304,7 +10596,6 @@ var init_toolbar = __esm({
|
|
|
10304
10596
|
return `left-1/2 -translate-x-1/2 ${placementClass}`;
|
|
10305
10597
|
};
|
|
10306
10598
|
const stopEventPropagation = (event) => {
|
|
10307
|
-
event.stopPropagation();
|
|
10308
10599
|
event.stopImmediatePropagation();
|
|
10309
10600
|
};
|
|
10310
10601
|
const createFreezeHandlers = (setTooltipVisible, options) => ({
|
|
@@ -10573,7 +10864,6 @@ var init_toolbar = __esm({
|
|
|
10573
10864
|
};
|
|
10574
10865
|
let didDragOccur = false;
|
|
10575
10866
|
const createDragAwareHandler = (callback) => (event) => {
|
|
10576
|
-
event.stopPropagation();
|
|
10577
10867
|
event.stopImmediatePropagation();
|
|
10578
10868
|
if (didDragOccur) {
|
|
10579
10869
|
didDragOccur = false;
|
|
@@ -11138,9 +11428,9 @@ var init_toolbar = __esm({
|
|
|
11138
11428
|
}
|
|
11139
11429
|
};
|
|
11140
11430
|
return (() => {
|
|
11141
|
-
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;
|
|
11142
11432
|
_el$.addEventListener("mouseleave", () => props.onSelectHoverChange?.(false));
|
|
11143
|
-
_el$.addEventListener("mouseenter", () => props.onSelectHoverChange?.(true));
|
|
11433
|
+
_el$.addEventListener("mouseenter", () => !isCollapsed() && props.onSelectHoverChange?.(true));
|
|
11144
11434
|
_el$.$$pointerdown = handlePointerDown;
|
|
11145
11435
|
var _ref$ = containerRef;
|
|
11146
11436
|
typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
|
|
@@ -11182,6 +11472,12 @@ var init_toolbar = __esm({
|
|
|
11182
11472
|
handlePointerDown(event);
|
|
11183
11473
|
});
|
|
11184
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
|
+
},
|
|
11185
11481
|
get ["class"]() {
|
|
11186
11482
|
return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
|
|
11187
11483
|
}
|
|
@@ -11213,6 +11509,12 @@ var init_toolbar = __esm({
|
|
|
11213
11509
|
handlePointerDown(event);
|
|
11214
11510
|
});
|
|
11215
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
|
+
},
|
|
11216
11518
|
get ["class"]() {
|
|
11217
11519
|
return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
|
|
11218
11520
|
}
|
|
@@ -11237,7 +11539,7 @@ var init_toolbar = __esm({
|
|
|
11237
11539
|
return props.hasUnreadHistoryItems;
|
|
11238
11540
|
},
|
|
11239
11541
|
get children() {
|
|
11240
|
-
return _tmpl$
|
|
11542
|
+
return _tmpl$29();
|
|
11241
11543
|
}
|
|
11242
11544
|
}), null);
|
|
11243
11545
|
insert(_el$0, createComponent(Tooltip, {
|
|
@@ -11292,6 +11594,12 @@ var init_toolbar = __esm({
|
|
|
11292
11594
|
handlePointerDown(event);
|
|
11293
11595
|
});
|
|
11294
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
|
+
},
|
|
11295
11603
|
get ["class"]() {
|
|
11296
11604
|
return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
|
|
11297
11605
|
}
|
|
@@ -11345,13 +11653,13 @@ var init_toolbar = __esm({
|
|
|
11345
11653
|
return isShakeTooltipVisible();
|
|
11346
11654
|
},
|
|
11347
11655
|
get children() {
|
|
11348
|
-
var _el$23 = _tmpl$
|
|
11656
|
+
var _el$23 = _tmpl$210();
|
|
11349
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())));
|
|
11350
11658
|
return _el$23;
|
|
11351
11659
|
}
|
|
11352
11660
|
}), null);
|
|
11353
11661
|
createRenderEffect((_p$) => {
|
|
11354
|
-
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";
|
|
11355
11663
|
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
11356
11664
|
_v$2 !== _p$.t && setStyleProperty(_el$, "transform", _p$.t = _v$2);
|
|
11357
11665
|
_v$3 !== _p$.a && setStyleProperty(_el$, "transform-origin", _p$.a = _v$3);
|
|
@@ -11368,9 +11676,12 @@ var init_toolbar = __esm({
|
|
|
11368
11676
|
_v$12 !== _p$.w && className(_el$13, _p$.w = _v$12);
|
|
11369
11677
|
_v$13 !== _p$.m && className(_el$15, _p$.m = _v$13);
|
|
11370
11678
|
_v$14 !== _p$.f && className(_el$16, _p$.f = _v$14);
|
|
11371
|
-
_v$15 !== _p$.y &&
|
|
11372
|
-
_v$16 !== _p$.g &&
|
|
11373
|
-
_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);
|
|
11374
11685
|
return _p$;
|
|
11375
11686
|
}, {
|
|
11376
11687
|
e: void 0,
|
|
@@ -11391,7 +11702,10 @@ var init_toolbar = __esm({
|
|
|
11391
11702
|
f: void 0,
|
|
11392
11703
|
y: void 0,
|
|
11393
11704
|
g: void 0,
|
|
11394
|
-
p: void 0
|
|
11705
|
+
p: void 0,
|
|
11706
|
+
b: void 0,
|
|
11707
|
+
T: void 0,
|
|
11708
|
+
A: void 0
|
|
11395
11709
|
});
|
|
11396
11710
|
return _el$;
|
|
11397
11711
|
})();
|
|
@@ -11409,6 +11723,52 @@ var init_clamp_to_viewport = __esm({
|
|
|
11409
11723
|
}
|
|
11410
11724
|
});
|
|
11411
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
|
+
|
|
11412
11772
|
// src/utils/is-event-from-overlay.ts
|
|
11413
11773
|
var isEventFromOverlay;
|
|
11414
11774
|
var init_is_event_from_overlay = __esm({
|
|
@@ -11447,7 +11807,7 @@ var init_resolve_action_enabled = __esm({
|
|
|
11447
11807
|
});
|
|
11448
11808
|
|
|
11449
11809
|
// src/components/toolbar/toolbar-menu.tsx
|
|
11450
|
-
var _tmpl$
|
|
11810
|
+
var _tmpl$30, _tmpl$211, _tmpl$37, _tmpl$44, ToolbarMenu;
|
|
11451
11811
|
var init_toolbar_menu = __esm({
|
|
11452
11812
|
"src/components/toolbar/toolbar-menu.tsx"() {
|
|
11453
11813
|
"use strict";
|
|
@@ -11461,26 +11821,34 @@ var init_toolbar_menu = __esm({
|
|
|
11461
11821
|
init_web();
|
|
11462
11822
|
init_web();
|
|
11463
11823
|
init_web();
|
|
11824
|
+
init_web();
|
|
11464
11825
|
init_solid();
|
|
11465
11826
|
init_constants();
|
|
11466
|
-
|
|
11827
|
+
init_get_anchored_dropdown_position();
|
|
11467
11828
|
init_cn();
|
|
11468
11829
|
init_format_shortcut();
|
|
11469
11830
|
init_is_event_from_overlay();
|
|
11470
11831
|
init_resolve_action_enabled();
|
|
11471
11832
|
init_native_raf();
|
|
11472
|
-
|
|
11473
|
-
_tmpl$
|
|
11474
|
-
_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">`);
|
|
11475
11837
|
_tmpl$44 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
|
|
11476
11838
|
ToolbarMenu = (props) => {
|
|
11477
11839
|
let containerRef;
|
|
11840
|
+
const {
|
|
11841
|
+
containerRef: highlightContainerRef,
|
|
11842
|
+
highlightRef,
|
|
11843
|
+
updateHighlight,
|
|
11844
|
+
clearHighlight
|
|
11845
|
+
} = createMenuHighlight();
|
|
11478
11846
|
const [measuredWidth, setMeasuredWidth] = createSignal(0);
|
|
11479
11847
|
const [measuredHeight, setMeasuredHeight] = createSignal(0);
|
|
11480
11848
|
const [shouldMount, setShouldMount] = createSignal(false);
|
|
11481
11849
|
const [isAnimatedIn, setIsAnimatedIn] = createSignal(false);
|
|
11482
11850
|
const [lastAnchorEdge, setLastAnchorEdge] = createSignal("bottom");
|
|
11483
|
-
const [
|
|
11851
|
+
const [toggleRefreshCounter, setToggleRefreshCounter] = createSignal(0);
|
|
11484
11852
|
let exitAnimationTimeout;
|
|
11485
11853
|
let enterAnimationFrameId;
|
|
11486
11854
|
const measureContainer = () => {
|
|
@@ -11509,32 +11877,17 @@ var init_toolbar_menu = __esm({
|
|
|
11509
11877
|
}, DROPDOWN_ANIMATION_DURATION_MS);
|
|
11510
11878
|
}
|
|
11511
11879
|
});
|
|
11512
|
-
const computedPosition = () => {
|
|
11513
|
-
const anchor = props.position;
|
|
11514
|
-
const width = measuredWidth();
|
|
11515
|
-
const height = measuredHeight();
|
|
11516
|
-
if (!anchor || width === 0 || height === 0) {
|
|
11517
|
-
return DROPDOWN_OFFSCREEN_POSITION;
|
|
11518
|
-
}
|
|
11519
|
-
const {
|
|
11520
|
-
edge
|
|
11521
|
-
} = anchor;
|
|
11522
|
-
let rawLeft;
|
|
11523
|
-
let rawTop;
|
|
11524
|
-
if (edge === "left" || edge === "right") {
|
|
11525
|
-
rawLeft = edge === "left" ? anchor.x + DROPDOWN_ANCHOR_GAP_PX : anchor.x - width - DROPDOWN_ANCHOR_GAP_PX;
|
|
11526
|
-
rawTop = anchor.y - height / 2;
|
|
11527
|
-
} else {
|
|
11528
|
-
rawLeft = anchor.x - width / 2;
|
|
11529
|
-
rawTop = edge === "top" ? anchor.y + DROPDOWN_ANCHOR_GAP_PX : anchor.y - height - DROPDOWN_ANCHOR_GAP_PX;
|
|
11530
|
-
}
|
|
11531
|
-
return {
|
|
11532
|
-
left: clampToViewport(rawLeft, width, window.innerWidth, DROPDOWN_VIEWPORT_PADDING_PX),
|
|
11533
|
-
top: clampToViewport(rawTop, height, window.innerHeight, DROPDOWN_VIEWPORT_PADDING_PX)
|
|
11534
|
-
};
|
|
11535
|
-
};
|
|
11536
11880
|
const displayPosition = createMemo((previousPosition) => {
|
|
11537
|
-
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
|
+
});
|
|
11538
11891
|
if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
|
|
11539
11892
|
return position;
|
|
11540
11893
|
}
|
|
@@ -11551,7 +11904,7 @@ var init_toolbar_menu = __esm({
|
|
|
11551
11904
|
if (!resolveToolbarActionEnabled(action)) return;
|
|
11552
11905
|
action.onAction();
|
|
11553
11906
|
if (action.isActive !== void 0) {
|
|
11554
|
-
|
|
11907
|
+
setToggleRefreshCounter((previous) => previous + 1);
|
|
11555
11908
|
} else {
|
|
11556
11909
|
props.onDismiss();
|
|
11557
11910
|
}
|
|
@@ -11601,7 +11954,7 @@ var init_toolbar_menu = __esm({
|
|
|
11601
11954
|
return shouldMount();
|
|
11602
11955
|
},
|
|
11603
11956
|
get children() {
|
|
11604
|
-
var _el$ = _tmpl$
|
|
11957
|
+
var _el$ = _tmpl$30(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
|
|
11605
11958
|
_el$.$$contextmenu = handleMenuEvent;
|
|
11606
11959
|
_el$.$$click = handleMenuEvent;
|
|
11607
11960
|
_el$.$$mousedown = handleMenuEvent;
|
|
@@ -11609,6 +11962,8 @@ var init_toolbar_menu = __esm({
|
|
|
11609
11962
|
var _ref$ = containerRef;
|
|
11610
11963
|
typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
|
|
11611
11964
|
setStyleProperty(_el$2, "min-width", `${TOOLBAR_MENU_MIN_WIDTH_PX}px`);
|
|
11965
|
+
use(highlightContainerRef, _el$3);
|
|
11966
|
+
use(highlightRef, _el$4);
|
|
11612
11967
|
insert(_el$3, createComponent(For, {
|
|
11613
11968
|
get each() {
|
|
11614
11969
|
return props.actions;
|
|
@@ -11617,55 +11972,61 @@ var init_toolbar_menu = __esm({
|
|
|
11617
11972
|
const isEnabled = () => resolveToolbarActionEnabled(action);
|
|
11618
11973
|
const isToggle = () => action.isActive !== void 0;
|
|
11619
11974
|
const toggleActive = () => {
|
|
11620
|
-
void
|
|
11975
|
+
void toggleRefreshCounter();
|
|
11621
11976
|
return Boolean(action.isActive?.());
|
|
11622
11977
|
};
|
|
11623
11978
|
return (() => {
|
|
11624
|
-
var _el$
|
|
11625
|
-
_el$
|
|
11626
|
-
_el$
|
|
11627
|
-
|
|
11628
|
-
|
|
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, {
|
|
11629
11990
|
get when() {
|
|
11630
11991
|
return memo(() => !!!isToggle())() && action.shortcut;
|
|
11631
11992
|
},
|
|
11632
11993
|
children: (shortcutKey) => (() => {
|
|
11633
|
-
var _el$
|
|
11634
|
-
insert(_el$
|
|
11635
|
-
return _el$
|
|
11994
|
+
var _el$9 = _tmpl$44();
|
|
11995
|
+
insert(_el$9, () => formatShortcut(shortcutKey()));
|
|
11996
|
+
return _el$9;
|
|
11636
11997
|
})()
|
|
11637
11998
|
}), null);
|
|
11638
|
-
insert(_el$
|
|
11999
|
+
insert(_el$5, createComponent(Show, {
|
|
11639
12000
|
get when() {
|
|
11640
12001
|
return isToggle();
|
|
11641
12002
|
},
|
|
11642
12003
|
get children() {
|
|
11643
|
-
var _el$
|
|
12004
|
+
var _el$7 = _tmpl$211(), _el$8 = _el$7.firstChild;
|
|
11644
12005
|
createRenderEffect((_p$) => {
|
|
11645
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");
|
|
11646
|
-
_v$8 !== _p$.e && className(_el$
|
|
11647
|
-
_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);
|
|
11648
12009
|
return _p$;
|
|
11649
12010
|
}, {
|
|
11650
12011
|
e: void 0,
|
|
11651
12012
|
t: void 0
|
|
11652
12013
|
});
|
|
11653
|
-
return _el$
|
|
12014
|
+
return _el$7;
|
|
11654
12015
|
}
|
|
11655
12016
|
}), null);
|
|
11656
12017
|
createRenderEffect((_p$) => {
|
|
11657
12018
|
var _v$0 = action.id, _v$1 = !isEnabled();
|
|
11658
|
-
_v$0 !== _p$.e && setAttribute(_el$
|
|
11659
|
-
_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);
|
|
11660
12021
|
return _p$;
|
|
11661
12022
|
}, {
|
|
11662
12023
|
e: void 0,
|
|
11663
12024
|
t: void 0
|
|
11664
12025
|
});
|
|
11665
|
-
return _el$
|
|
12026
|
+
return _el$5;
|
|
11666
12027
|
})();
|
|
11667
12028
|
}
|
|
11668
|
-
}));
|
|
12029
|
+
}), null);
|
|
11669
12030
|
createRenderEffect((_p$) => {
|
|
11670
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);
|
|
11671
12032
|
_v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
|
|
@@ -11694,7 +12055,7 @@ var init_toolbar_menu = __esm({
|
|
|
11694
12055
|
});
|
|
11695
12056
|
|
|
11696
12057
|
// src/components/context-menu.tsx
|
|
11697
|
-
var _tmpl$
|
|
12058
|
+
var _tmpl$31, _tmpl$212, _tmpl$38, _tmpl$45, ContextMenu;
|
|
11698
12059
|
var init_context_menu = __esm({
|
|
11699
12060
|
"src/components/context-menu.tsx"() {
|
|
11700
12061
|
"use strict";
|
|
@@ -11707,6 +12068,7 @@ var init_context_menu = __esm({
|
|
|
11707
12068
|
init_web();
|
|
11708
12069
|
init_web();
|
|
11709
12070
|
init_web();
|
|
12071
|
+
init_web();
|
|
11710
12072
|
init_solid();
|
|
11711
12073
|
init_constants();
|
|
11712
12074
|
init_cn();
|
|
@@ -11718,12 +12080,19 @@ var init_context_menu = __esm({
|
|
|
11718
12080
|
init_resolve_action_enabled();
|
|
11719
12081
|
init_is_event_from_overlay();
|
|
11720
12082
|
init_native_raf();
|
|
11721
|
-
|
|
11722
|
-
_tmpl$
|
|
11723
|
-
_tmpl$
|
|
11724
|
-
_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">`);
|
|
11725
12088
|
ContextMenu = (props) => {
|
|
11726
12089
|
let containerRef;
|
|
12090
|
+
const {
|
|
12091
|
+
containerRef: highlightContainerRef,
|
|
12092
|
+
highlightRef,
|
|
12093
|
+
updateHighlight,
|
|
12094
|
+
clearHighlight
|
|
12095
|
+
} = createMenuHighlight();
|
|
11727
12096
|
const [measuredWidth, setMeasuredWidth] = createSignal(0);
|
|
11728
12097
|
const [measuredHeight, setMeasuredHeight] = createSignal(0);
|
|
11729
12098
|
const isVisible = () => props.position !== null;
|
|
@@ -11878,7 +12247,7 @@ var init_context_menu = __esm({
|
|
|
11878
12247
|
return isVisible();
|
|
11879
12248
|
},
|
|
11880
12249
|
get children() {
|
|
11881
|
-
var _el$ = _tmpl$
|
|
12250
|
+
var _el$ = _tmpl$212(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
11882
12251
|
_el$.$$contextmenu = handleMenuEvent;
|
|
11883
12252
|
_el$.$$click = handleMenuEvent;
|
|
11884
12253
|
_el$.$$mousedown = handleMenuEvent;
|
|
@@ -11918,38 +12287,46 @@ var init_context_menu = __esm({
|
|
|
11918
12287
|
}));
|
|
11919
12288
|
insert(_el$2, createComponent(BottomSection, {
|
|
11920
12289
|
get children() {
|
|
11921
|
-
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);
|
|
11922
12293
|
insert(_el$4, createComponent(For, {
|
|
11923
12294
|
get each() {
|
|
11924
12295
|
return menuItems();
|
|
11925
12296
|
},
|
|
11926
12297
|
children: (item) => (() => {
|
|
11927
|
-
var _el$
|
|
11928
|
-
_el$
|
|
11929
|
-
_el$
|
|
11930
|
-
|
|
11931
|
-
|
|
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, {
|
|
11932
12309
|
get when() {
|
|
11933
12310
|
return item.shortcut;
|
|
11934
12311
|
},
|
|
11935
12312
|
get children() {
|
|
11936
|
-
var _el$
|
|
11937
|
-
insert(_el$
|
|
11938
|
-
return _el$
|
|
12313
|
+
var _el$8 = _tmpl$38();
|
|
12314
|
+
insert(_el$8, () => formatShortcut(item.shortcut));
|
|
12315
|
+
return _el$8;
|
|
11939
12316
|
}
|
|
11940
12317
|
}), null);
|
|
11941
12318
|
createRenderEffect((_p$) => {
|
|
11942
12319
|
var _v$4 = item.label.toLowerCase(), _v$5 = !item.enabled;
|
|
11943
|
-
_v$4 !== _p$.e && setAttribute(_el$
|
|
11944
|
-
_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);
|
|
11945
12322
|
return _p$;
|
|
11946
12323
|
}, {
|
|
11947
12324
|
e: void 0,
|
|
11948
12325
|
t: void 0
|
|
11949
12326
|
});
|
|
11950
|
-
return _el$
|
|
12327
|
+
return _el$6;
|
|
11951
12328
|
})()
|
|
11952
|
-
}));
|
|
12329
|
+
}), null);
|
|
11953
12330
|
return _el$4;
|
|
11954
12331
|
}
|
|
11955
12332
|
}), null);
|
|
@@ -11973,18 +12350,18 @@ var init_context_menu = __esm({
|
|
|
11973
12350
|
});
|
|
11974
12351
|
|
|
11975
12352
|
// src/components/icons/icon-trash.tsx
|
|
11976
|
-
var _tmpl$
|
|
12353
|
+
var _tmpl$39, IconTrash;
|
|
11977
12354
|
var init_icon_trash = __esm({
|
|
11978
12355
|
"src/components/icons/icon-trash.tsx"() {
|
|
11979
12356
|
"use strict";
|
|
11980
12357
|
init_web();
|
|
11981
12358
|
init_web();
|
|
11982
12359
|
init_web();
|
|
11983
|
-
_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">`);
|
|
11984
12361
|
IconTrash = (props) => {
|
|
11985
12362
|
const size = () => props.size ?? 14;
|
|
11986
12363
|
return (() => {
|
|
11987
|
-
var _el$ = _tmpl$
|
|
12364
|
+
var _el$ = _tmpl$39();
|
|
11988
12365
|
createRenderEffect((_p$) => {
|
|
11989
12366
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
11990
12367
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -12003,7 +12380,7 @@ var init_icon_trash = __esm({
|
|
|
12003
12380
|
});
|
|
12004
12381
|
|
|
12005
12382
|
// src/components/history-dropdown.tsx
|
|
12006
|
-
var _tmpl$
|
|
12383
|
+
var _tmpl$40, _tmpl$213, _tmpl$310, _tmpl$46, ITEM_ACTION_CLASS, formatRelativeTime, getHistoryItemDisplayName, HistoryDropdown;
|
|
12007
12384
|
var init_history_dropdown = __esm({
|
|
12008
12385
|
"src/components/history-dropdown.tsx"() {
|
|
12009
12386
|
"use strict";
|
|
@@ -12016,20 +12393,22 @@ var init_history_dropdown = __esm({
|
|
|
12016
12393
|
init_web();
|
|
12017
12394
|
init_web();
|
|
12018
12395
|
init_web();
|
|
12396
|
+
init_web();
|
|
12019
12397
|
init_solid();
|
|
12020
12398
|
init_constants();
|
|
12021
12399
|
init_safe_polygon();
|
|
12022
|
-
|
|
12400
|
+
init_get_anchored_dropdown_position();
|
|
12023
12401
|
init_cn();
|
|
12024
12402
|
init_icon_trash();
|
|
12025
12403
|
init_icon_copy();
|
|
12026
12404
|
init_icon_check();
|
|
12027
12405
|
init_tooltip();
|
|
12028
12406
|
init_native_raf();
|
|
12029
|
-
|
|
12030
|
-
_tmpl$
|
|
12031
|
-
_tmpl$
|
|
12032
|
-
_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>`);
|
|
12033
12412
|
ITEM_ACTION_CLASS = "flex items-center justify-center cursor-pointer text-black/25 transition-colors press-scale";
|
|
12034
12413
|
formatRelativeTime = (timestamp) => {
|
|
12035
12414
|
const elapsedSeconds = Math.floor((Date.now() - timestamp) / 1e3);
|
|
@@ -12048,6 +12427,12 @@ var init_history_dropdown = __esm({
|
|
|
12048
12427
|
};
|
|
12049
12428
|
HistoryDropdown = (props) => {
|
|
12050
12429
|
let containerRef;
|
|
12430
|
+
const {
|
|
12431
|
+
containerRef: highlightContainerRef,
|
|
12432
|
+
highlightRef,
|
|
12433
|
+
updateHighlight,
|
|
12434
|
+
clearHighlight
|
|
12435
|
+
} = createMenuHighlight();
|
|
12051
12436
|
const safePolygonTracker = createSafePolygonTracker();
|
|
12052
12437
|
const getToolbarTargetRects = () => {
|
|
12053
12438
|
if (!containerRef) return null;
|
|
@@ -12107,32 +12492,17 @@ var init_history_dropdown = __esm({
|
|
|
12107
12492
|
}, {
|
|
12108
12493
|
defer: true
|
|
12109
12494
|
}));
|
|
12110
|
-
const computedPosition = () => {
|
|
12111
|
-
const anchor = props.position;
|
|
12112
|
-
const width = measuredWidth();
|
|
12113
|
-
const height = measuredHeight();
|
|
12114
|
-
if (!anchor || width === 0 || height === 0) {
|
|
12115
|
-
return DROPDOWN_OFFSCREEN_POSITION;
|
|
12116
|
-
}
|
|
12117
|
-
const {
|
|
12118
|
-
edge
|
|
12119
|
-
} = anchor;
|
|
12120
|
-
let rawLeft;
|
|
12121
|
-
let rawTop;
|
|
12122
|
-
if (edge === "left" || edge === "right") {
|
|
12123
|
-
rawLeft = edge === "left" ? anchor.x + DROPDOWN_ANCHOR_GAP_PX : anchor.x - width - DROPDOWN_ANCHOR_GAP_PX;
|
|
12124
|
-
rawTop = anchor.y - height / 2;
|
|
12125
|
-
} else {
|
|
12126
|
-
rawLeft = anchor.x - width / 2;
|
|
12127
|
-
rawTop = edge === "top" ? anchor.y + DROPDOWN_ANCHOR_GAP_PX : anchor.y - height - DROPDOWN_ANCHOR_GAP_PX;
|
|
12128
|
-
}
|
|
12129
|
-
return {
|
|
12130
|
-
left: clampToViewport(rawLeft, width, window.innerWidth, DROPDOWN_VIEWPORT_PADDING_PX),
|
|
12131
|
-
top: clampToViewport(rawTop, height, window.innerHeight, DROPDOWN_VIEWPORT_PADDING_PX)
|
|
12132
|
-
};
|
|
12133
|
-
};
|
|
12134
12495
|
const displayPosition = createMemo((previousPosition) => {
|
|
12135
|
-
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
|
+
});
|
|
12136
12506
|
if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
|
|
12137
12507
|
return position;
|
|
12138
12508
|
}
|
|
@@ -12176,7 +12546,7 @@ var init_history_dropdown = __esm({
|
|
|
12176
12546
|
return shouldMount();
|
|
12177
12547
|
},
|
|
12178
12548
|
get children() {
|
|
12179
|
-
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;
|
|
12180
12550
|
_el$.addEventListener("mouseleave", (event) => {
|
|
12181
12551
|
const targetRects = getToolbarTargetRects();
|
|
12182
12552
|
if (targetRects) {
|
|
@@ -12203,7 +12573,7 @@ var init_history_dropdown = __esm({
|
|
|
12203
12573
|
return props.items.length > 0;
|
|
12204
12574
|
},
|
|
12205
12575
|
get children() {
|
|
12206
|
-
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;
|
|
12207
12577
|
_el$7.addEventListener("mouseleave", () => setActiveHeaderTooltip(null));
|
|
12208
12578
|
_el$7.addEventListener("mouseenter", () => setActiveHeaderTooltip("clear"));
|
|
12209
12579
|
_el$7.$$click = (event) => {
|
|
@@ -12267,26 +12637,34 @@ var init_history_dropdown = __esm({
|
|
|
12267
12637
|
return _el$5;
|
|
12268
12638
|
}
|
|
12269
12639
|
}), null);
|
|
12640
|
+
use(highlightContainerRef, _el$1);
|
|
12641
|
+
use(highlightRef, _el$10);
|
|
12270
12642
|
insert(_el$1, createComponent(For, {
|
|
12271
12643
|
get each() {
|
|
12272
12644
|
return props.items;
|
|
12273
12645
|
},
|
|
12274
12646
|
children: (item) => (() => {
|
|
12275
|
-
var _el$
|
|
12276
|
-
_el$
|
|
12277
|
-
_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) => {
|
|
12278
12655
|
if (!props.disconnectedItemIds?.has(item.id)) {
|
|
12279
12656
|
props.onItemHover?.(item.id);
|
|
12280
12657
|
}
|
|
12658
|
+
updateHighlight(event.currentTarget);
|
|
12281
12659
|
});
|
|
12282
|
-
_el$
|
|
12660
|
+
_el$11.$$keydown = (event) => {
|
|
12283
12661
|
if (event.code === "Space" && event.currentTarget === event.target) {
|
|
12284
12662
|
event.preventDefault();
|
|
12285
12663
|
event.stopPropagation();
|
|
12286
12664
|
props.onSelectItem?.(item);
|
|
12287
12665
|
}
|
|
12288
12666
|
};
|
|
12289
|
-
_el$
|
|
12667
|
+
_el$11.$$click = (event) => {
|
|
12290
12668
|
event.stopPropagation();
|
|
12291
12669
|
props.onSelectItem?.(item);
|
|
12292
12670
|
setConfirmedCopyItemId(item.id);
|
|
@@ -12295,27 +12673,27 @@ var init_history_dropdown = __esm({
|
|
|
12295
12673
|
setConfirmedCopyItemId(null);
|
|
12296
12674
|
}, FEEDBACK_DURATION_MS);
|
|
12297
12675
|
};
|
|
12298
|
-
_el$
|
|
12299
|
-
insert(_el$
|
|
12300
|
-
insert(_el$
|
|
12676
|
+
_el$11.$$pointerdown = (event) => event.stopPropagation();
|
|
12677
|
+
insert(_el$13, () => getHistoryItemDisplayName(item));
|
|
12678
|
+
insert(_el$12, createComponent(Show, {
|
|
12301
12679
|
get when() {
|
|
12302
12680
|
return item.commentText;
|
|
12303
12681
|
},
|
|
12304
12682
|
get children() {
|
|
12305
|
-
var _el$
|
|
12306
|
-
insert(_el$
|
|
12307
|
-
return _el$
|
|
12683
|
+
var _el$14 = _tmpl$310();
|
|
12684
|
+
insert(_el$14, () => item.commentText);
|
|
12685
|
+
return _el$14;
|
|
12308
12686
|
}
|
|
12309
12687
|
}), null);
|
|
12310
|
-
insert(_el$
|
|
12311
|
-
_el$
|
|
12688
|
+
insert(_el$16, () => formatRelativeTime(item.timestamp));
|
|
12689
|
+
_el$18.$$click = (event) => {
|
|
12312
12690
|
event.stopPropagation();
|
|
12313
12691
|
props.onRemoveItem?.(item);
|
|
12314
12692
|
};
|
|
12315
|
-
insert(_el$
|
|
12693
|
+
insert(_el$18, createComponent(IconTrash, {
|
|
12316
12694
|
size: DROPDOWN_ICON_SIZE_PX
|
|
12317
12695
|
}));
|
|
12318
|
-
_el$
|
|
12696
|
+
_el$19.$$click = (event) => {
|
|
12319
12697
|
event.stopPropagation();
|
|
12320
12698
|
props.onCopyItem?.(item);
|
|
12321
12699
|
setConfirmedCopyItemId(item.id);
|
|
@@ -12324,7 +12702,7 @@ var init_history_dropdown = __esm({
|
|
|
12324
12702
|
setConfirmedCopyItemId(null);
|
|
12325
12703
|
}, FEEDBACK_DURATION_MS);
|
|
12326
12704
|
};
|
|
12327
|
-
insert(_el$
|
|
12705
|
+
insert(_el$19, createComponent(Show, {
|
|
12328
12706
|
get when() {
|
|
12329
12707
|
return confirmedCopyItemId() === item.id;
|
|
12330
12708
|
},
|
|
@@ -12344,18 +12722,18 @@ var init_history_dropdown = __esm({
|
|
|
12344
12722
|
var _v$1 = {
|
|
12345
12723
|
"opacity-40 hover:opacity-100": Boolean(props.disconnectedItemIds?.has(item.id))
|
|
12346
12724
|
}, _v$10 = cn(ITEM_ACTION_CLASS, "hover:text-[#B91C1C]"), _v$11 = cn(ITEM_ACTION_CLASS, "hover:text-black/60");
|
|
12347
|
-
_p$.e = classList(_el$
|
|
12348
|
-
_v$10 !== _p$.t && className(_el$
|
|
12349
|
-
_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);
|
|
12350
12728
|
return _p$;
|
|
12351
12729
|
}, {
|
|
12352
12730
|
e: void 0,
|
|
12353
12731
|
t: void 0,
|
|
12354
12732
|
a: void 0
|
|
12355
12733
|
});
|
|
12356
|
-
return _el$
|
|
12734
|
+
return _el$11;
|
|
12357
12735
|
})()
|
|
12358
|
-
}));
|
|
12736
|
+
}), null);
|
|
12359
12737
|
createRenderEffect((_p$) => {
|
|
12360
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`;
|
|
12361
12739
|
_v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
|
|
@@ -12390,7 +12768,7 @@ var init_history_dropdown = __esm({
|
|
|
12390
12768
|
});
|
|
12391
12769
|
|
|
12392
12770
|
// src/components/clear-history-prompt.tsx
|
|
12393
|
-
var _tmpl$
|
|
12771
|
+
var _tmpl$41, ClearHistoryPrompt;
|
|
12394
12772
|
var init_clear_history_prompt = __esm({
|
|
12395
12773
|
"src/components/clear-history-prompt.tsx"() {
|
|
12396
12774
|
"use strict";
|
|
@@ -12404,13 +12782,13 @@ var init_clear_history_prompt = __esm({
|
|
|
12404
12782
|
init_web();
|
|
12405
12783
|
init_solid();
|
|
12406
12784
|
init_constants();
|
|
12407
|
-
|
|
12785
|
+
init_get_anchored_dropdown_position();
|
|
12408
12786
|
init_cn();
|
|
12409
12787
|
init_is_event_from_overlay();
|
|
12410
12788
|
init_is_keyboard_event_triggered_by_input();
|
|
12411
12789
|
init_discard_prompt();
|
|
12412
12790
|
init_native_raf();
|
|
12413
|
-
_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>`);
|
|
12414
12792
|
ClearHistoryPrompt = (props) => {
|
|
12415
12793
|
let containerRef;
|
|
12416
12794
|
const [measuredWidth, setMeasuredWidth] = createSignal(0);
|
|
@@ -12446,32 +12824,17 @@ var init_clear_history_prompt = __esm({
|
|
|
12446
12824
|
}, DROPDOWN_ANIMATION_DURATION_MS);
|
|
12447
12825
|
}
|
|
12448
12826
|
});
|
|
12449
|
-
const computedPosition = () => {
|
|
12450
|
-
const anchor = props.position;
|
|
12451
|
-
const width = measuredWidth();
|
|
12452
|
-
const height = measuredHeight();
|
|
12453
|
-
if (!anchor || width === 0 || height === 0) {
|
|
12454
|
-
return DROPDOWN_OFFSCREEN_POSITION;
|
|
12455
|
-
}
|
|
12456
|
-
const {
|
|
12457
|
-
edge
|
|
12458
|
-
} = anchor;
|
|
12459
|
-
let rawLeft;
|
|
12460
|
-
let rawTop;
|
|
12461
|
-
if (edge === "left" || edge === "right") {
|
|
12462
|
-
rawLeft = edge === "left" ? anchor.x + DROPDOWN_ANCHOR_GAP_PX : anchor.x - width - DROPDOWN_ANCHOR_GAP_PX;
|
|
12463
|
-
rawTop = anchor.y - height / 2;
|
|
12464
|
-
} else {
|
|
12465
|
-
rawLeft = anchor.x - width / 2;
|
|
12466
|
-
rawTop = edge === "top" ? anchor.y + DROPDOWN_ANCHOR_GAP_PX : anchor.y - height - DROPDOWN_ANCHOR_GAP_PX;
|
|
12467
|
-
}
|
|
12468
|
-
return {
|
|
12469
|
-
left: clampToViewport(rawLeft, width, window.innerWidth, DROPDOWN_VIEWPORT_PADDING_PX),
|
|
12470
|
-
top: clampToViewport(rawTop, height, window.innerHeight, DROPDOWN_VIEWPORT_PADDING_PX)
|
|
12471
|
-
};
|
|
12472
|
-
};
|
|
12473
12827
|
const displayPosition = createMemo((previousPosition) => {
|
|
12474
|
-
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
|
+
});
|
|
12475
12838
|
if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
|
|
12476
12839
|
return position;
|
|
12477
12840
|
}
|
|
@@ -12492,7 +12855,6 @@ var init_clear_history_prompt = __esm({
|
|
|
12492
12855
|
const isEscape = event.code === "Escape";
|
|
12493
12856
|
if (isEnter || isEscape) {
|
|
12494
12857
|
event.preventDefault();
|
|
12495
|
-
event.stopPropagation();
|
|
12496
12858
|
event.stopImmediatePropagation();
|
|
12497
12859
|
if (isEscape) {
|
|
12498
12860
|
props.onCancel();
|
|
@@ -12536,7 +12898,7 @@ var init_clear_history_prompt = __esm({
|
|
|
12536
12898
|
return shouldMount();
|
|
12537
12899
|
},
|
|
12538
12900
|
get children() {
|
|
12539
|
-
var _el$ = _tmpl$
|
|
12901
|
+
var _el$ = _tmpl$41(), _el$2 = _el$.firstChild;
|
|
12540
12902
|
_el$.$$contextmenu = handlePromptEvent;
|
|
12541
12903
|
_el$.$$click = handlePromptEvent;
|
|
12542
12904
|
_el$.$$mousedown = handlePromptEvent;
|
|
@@ -12581,7 +12943,7 @@ var init_clear_history_prompt = __esm({
|
|
|
12581
12943
|
});
|
|
12582
12944
|
|
|
12583
12945
|
// src/components/renderer.tsx
|
|
12584
|
-
var _tmpl$
|
|
12946
|
+
var _tmpl$47, ReactGrabRenderer;
|
|
12585
12947
|
var init_renderer = __esm({
|
|
12586
12948
|
"src/components/renderer.tsx"() {
|
|
12587
12949
|
"use strict";
|
|
@@ -12601,7 +12963,7 @@ var init_renderer = __esm({
|
|
|
12601
12963
|
init_context_menu();
|
|
12602
12964
|
init_history_dropdown();
|
|
12603
12965
|
init_clear_history_prompt();
|
|
12604
|
-
_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)">`);
|
|
12605
12967
|
ReactGrabRenderer = (props) => {
|
|
12606
12968
|
return [createComponent(OverlayCanvas, {
|
|
12607
12969
|
get crosshairVisible() {
|
|
@@ -12644,7 +13006,7 @@ var init_renderer = __esm({
|
|
|
12644
13006
|
return props.labelInstances;
|
|
12645
13007
|
}
|
|
12646
13008
|
}), (() => {
|
|
12647
|
-
var _el$ = _tmpl$
|
|
13009
|
+
var _el$ = _tmpl$47();
|
|
12648
13010
|
setStyleProperty(_el$, "z-index", Z_INDEX_OVERLAY_CANVAS);
|
|
12649
13011
|
setStyleProperty(_el$, "box-shadow", `inset 0 0 ${FROZEN_GLOW_EDGE_PX}px ${FROZEN_GLOW_COLOR}`);
|
|
12650
13012
|
createRenderEffect((_$p) => setStyleProperty(_el$, "opacity", props.isFrozen ? 1 : 0));
|
|
@@ -12766,6 +13128,12 @@ var init_renderer = __esm({
|
|
|
12766
13128
|
get actionCycleState() {
|
|
12767
13129
|
return props.selectionActionCycleState;
|
|
12768
13130
|
},
|
|
13131
|
+
get arrowNavigationState() {
|
|
13132
|
+
return props.selectionArrowNavigationState;
|
|
13133
|
+
},
|
|
13134
|
+
get onArrowNavigationSelect() {
|
|
13135
|
+
return props.onArrowNavigationSelect;
|
|
13136
|
+
},
|
|
12769
13137
|
get filePath() {
|
|
12770
13138
|
return props.selectionFilePath;
|
|
12771
13139
|
},
|
|
@@ -13661,18 +14029,6 @@ var init_create_bounds_from_drag_rect = __esm({
|
|
|
13661
14029
|
}
|
|
13662
14030
|
});
|
|
13663
14031
|
|
|
13664
|
-
// src/utils/get-bounds-center.ts
|
|
13665
|
-
var getBoundsCenter;
|
|
13666
|
-
var init_get_bounds_center = __esm({
|
|
13667
|
-
"src/utils/get-bounds-center.ts"() {
|
|
13668
|
-
"use strict";
|
|
13669
|
-
getBoundsCenter = (bounds) => ({
|
|
13670
|
-
x: bounds.x + bounds.width / 2,
|
|
13671
|
-
y: bounds.y + bounds.height / 2
|
|
13672
|
-
});
|
|
13673
|
-
}
|
|
13674
|
-
});
|
|
13675
|
-
|
|
13676
14032
|
// src/utils/is-c-like-key.ts
|
|
13677
14033
|
var C_LIKE_CHARACTERS, isCLikeKey;
|
|
13678
14034
|
var init_is_c_like_key = __esm({
|
|
@@ -14260,6 +14616,7 @@ var init_manager = __esm({
|
|
|
14260
14616
|
init_create_element_bounds();
|
|
14261
14617
|
init_is_element_connected();
|
|
14262
14618
|
init_generate_snippet();
|
|
14619
|
+
init_recalculate_session_position();
|
|
14263
14620
|
init_context();
|
|
14264
14621
|
init_constants();
|
|
14265
14622
|
init_get_tag_name();
|
|
@@ -14749,19 +15106,11 @@ var init_manager = __esm({
|
|
|
14749
15106
|
if (newBounds.length > 0) {
|
|
14750
15107
|
const oldFirstBounds = session.selectionBounds[0];
|
|
14751
15108
|
const newFirstBounds = newBounds[0];
|
|
14752
|
-
|
|
14753
|
-
|
|
14754
|
-
|
|
14755
|
-
|
|
14756
|
-
|
|
14757
|
-
const offsetRatio = oldHalfWidth > 0 ? offsetX / oldHalfWidth : 0;
|
|
14758
|
-
const newCenterX = newFirstBounds.x + newFirstBounds.width / 2;
|
|
14759
|
-
const newHalfWidth = newFirstBounds.width / 2;
|
|
14760
|
-
updatedPosition = {
|
|
14761
|
-
...session.position,
|
|
14762
|
-
x: newCenterX + offsetRatio * newHalfWidth
|
|
14763
|
-
};
|
|
14764
|
-
}
|
|
15109
|
+
const updatedPosition = recalculateSessionPosition({
|
|
15110
|
+
currentPosition: session.position,
|
|
15111
|
+
previousBounds: oldFirstBounds,
|
|
15112
|
+
nextBounds: newFirstBounds
|
|
15113
|
+
});
|
|
14765
15114
|
updatedSessions.set(sessionId, {
|
|
14766
15115
|
...session,
|
|
14767
15116
|
selectionBounds: newBounds,
|
|
@@ -15057,7 +15406,7 @@ var init_log_intro = __esm({
|
|
|
15057
15406
|
init_is_extension_context();
|
|
15058
15407
|
logIntro = () => {
|
|
15059
15408
|
try {
|
|
15060
|
-
const version = "0.1.
|
|
15409
|
+
const version = "0.1.21";
|
|
15061
15410
|
const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
|
|
15062
15411
|
console.log(
|
|
15063
15412
|
`%cReact Grab${version ? ` v${version}` : ""}%c
|
|
@@ -15863,6 +16212,8 @@ var init_core = __esm({
|
|
|
15863
16212
|
const [resolvedComponentName, setResolvedComponentName] = createSignal(void 0);
|
|
15864
16213
|
const [actionCycleItems, setActionCycleItems] = createSignal([]);
|
|
15865
16214
|
const [actionCycleActiveIndex, setActionCycleActiveIndex] = createSignal(null);
|
|
16215
|
+
const [arrowNavigationElements, setArrowNavigationElements] = createSignal([]);
|
|
16216
|
+
const [arrowNavigationActiveIndex, setArrowNavigationActiveIndex] = createSignal(0);
|
|
15866
16217
|
const arrowNavigator = createArrowNavigator(isValidGrabbableElement, createElementBounds);
|
|
15867
16218
|
const autoScroller = createAutoScroller(() => store.pointer, () => isDragging());
|
|
15868
16219
|
const isRendererActive = createMemo(() => isActivated() && !isCopying());
|
|
@@ -16182,6 +16533,7 @@ var init_core = __esm({
|
|
|
16182
16533
|
});
|
|
16183
16534
|
};
|
|
16184
16535
|
const targetElement = createMemo(() => {
|
|
16536
|
+
void store.viewportVersion;
|
|
16185
16537
|
if (!isRendererActive() || isDragging()) return null;
|
|
16186
16538
|
const element = store.detectedElement;
|
|
16187
16539
|
if (!isElementConnected(element)) return null;
|
|
@@ -16516,7 +16868,7 @@ var init_core = __esm({
|
|
|
16516
16868
|
const wasDragging = isDragging();
|
|
16517
16869
|
const previousFocused = store.previouslyFocusedElement;
|
|
16518
16870
|
actions.deactivate();
|
|
16519
|
-
|
|
16871
|
+
clearArrowNavigation();
|
|
16520
16872
|
keyboardSelectedElement = null;
|
|
16521
16873
|
isPendingContextMenuSelect = false;
|
|
16522
16874
|
if (wasDragging) {
|
|
@@ -16710,6 +17062,7 @@ var init_core = __esm({
|
|
|
16710
17062
|
};
|
|
16711
17063
|
const openContextMenu = (element, position) => {
|
|
16712
17064
|
actions.showContextMenu(position, element);
|
|
17065
|
+
clearArrowNavigation();
|
|
16713
17066
|
dismissAllPopups();
|
|
16714
17067
|
pluginRegistry.hooks.onContextMenu(element, position);
|
|
16715
17068
|
};
|
|
@@ -16915,7 +17268,6 @@ var init_core = __esm({
|
|
|
16915
17268
|
if (shouldBlockEnter) {
|
|
16916
17269
|
keyboardClaimer.claimedEvents.add(event);
|
|
16917
17270
|
event.preventDefault();
|
|
16918
|
-
event.stopPropagation();
|
|
16919
17271
|
event.stopImmediatePropagation();
|
|
16920
17272
|
return true;
|
|
16921
17273
|
}
|
|
@@ -16949,30 +17301,67 @@ var init_core = __esm({
|
|
|
16949
17301
|
}
|
|
16950
17302
|
return false;
|
|
16951
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
|
+
};
|
|
16952
17333
|
const handleArrowNavigation = (event) => {
|
|
16953
17334
|
if (!isActivated() || isPromptMode()) return false;
|
|
16954
17335
|
if (!ARROW_KEYS.has(event.key)) return false;
|
|
16955
17336
|
let currentElement = effectiveElement();
|
|
16956
17337
|
const isInitialSelection = !currentElement;
|
|
16957
17338
|
if (!currentElement) {
|
|
16958
|
-
|
|
16959
|
-
const viewportCenterY = window.innerHeight / 2;
|
|
16960
|
-
currentElement = getElementAtPosition(viewportCenterX, viewportCenterY);
|
|
17339
|
+
currentElement = getElementAtPosition(window.innerWidth / 2, window.innerHeight / 2);
|
|
16961
17340
|
}
|
|
16962
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
|
+
}
|
|
16963
17355
|
const nextElement = arrowNavigator.findNext(event.key, currentElement);
|
|
16964
|
-
if (!nextElement && !isInitialSelection) return false;
|
|
16965
17356
|
const elementToSelect = nextElement ?? currentElement;
|
|
16966
17357
|
event.preventDefault();
|
|
16967
17358
|
event.stopPropagation();
|
|
16968
|
-
|
|
16969
|
-
|
|
16970
|
-
|
|
16971
|
-
|
|
16972
|
-
|
|
16973
|
-
|
|
16974
|
-
if (store.contextMenuPosition !== null) {
|
|
16975
|
-
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);
|
|
16976
17365
|
}
|
|
16977
17366
|
return true;
|
|
16978
17367
|
};
|
|
@@ -16983,7 +17372,6 @@ var init_core = __esm({
|
|
|
16983
17372
|
const canActivateFromCopied = !isHoldingKeys() && !isPromptMode() && !isActivated() && copiedElement && isElementConnected(copiedElement) && !store.labelInstances.some((instance) => instance.status === "copied" || instance.status === "fading");
|
|
16984
17373
|
if (canActivateFromCopied) {
|
|
16985
17374
|
event.preventDefault();
|
|
16986
|
-
event.stopPropagation();
|
|
16987
17375
|
event.stopImmediatePropagation();
|
|
16988
17376
|
const center = getBoundsCenter(createElementBounds(copiedElement));
|
|
16989
17377
|
actions.setPointer(center);
|
|
@@ -16999,7 +17387,6 @@ var init_core = __esm({
|
|
|
16999
17387
|
const canActivateFromHolding = isHoldingKeys() && !isPromptMode();
|
|
17000
17388
|
if (canActivateFromHolding) {
|
|
17001
17389
|
event.preventDefault();
|
|
17002
|
-
event.stopPropagation();
|
|
17003
17390
|
event.stopImmediatePropagation();
|
|
17004
17391
|
const element = store.frozenElement || targetElement();
|
|
17005
17392
|
if (element) {
|
|
@@ -17058,6 +17445,15 @@ var init_core = __esm({
|
|
|
17058
17445
|
activeIndex: actionCycleActiveIndex(),
|
|
17059
17446
|
isVisible: actionCycleActiveIndex() !== null && actionCycleItems().length > 0
|
|
17060
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
|
+
}));
|
|
17061
17457
|
createEffect(on(selectionElement, () => {
|
|
17062
17458
|
resetActionCycle();
|
|
17063
17459
|
}));
|
|
@@ -17170,7 +17566,6 @@ var init_core = __esm({
|
|
|
17170
17566
|
if ((isActivated() || isHoldingKeys()) && !isPromptMode()) {
|
|
17171
17567
|
event.preventDefault();
|
|
17172
17568
|
if (isEnterCode(event.code)) {
|
|
17173
|
-
event.stopPropagation();
|
|
17174
17569
|
event.stopImmediatePropagation();
|
|
17175
17570
|
}
|
|
17176
17571
|
}
|
|
@@ -17374,7 +17769,7 @@ var init_core = __esm({
|
|
|
17374
17769
|
const isActiveState = isTouchPointer ? isHoldingKeys() : isActivated();
|
|
17375
17770
|
if (isActiveState && !isPromptMode() && isToggleFrozen()) {
|
|
17376
17771
|
actions.unfreeze();
|
|
17377
|
-
|
|
17772
|
+
clearArrowNavigation();
|
|
17378
17773
|
}
|
|
17379
17774
|
handlePointerMove(event.clientX, event.clientY);
|
|
17380
17775
|
}, {
|
|
@@ -17401,7 +17796,6 @@ var init_core = __esm({
|
|
|
17401
17796
|
if (didHandle) {
|
|
17402
17797
|
document.documentElement.setPointerCapture(event.pointerId);
|
|
17403
17798
|
event.preventDefault();
|
|
17404
|
-
event.stopPropagation();
|
|
17405
17799
|
event.stopImmediatePropagation();
|
|
17406
17800
|
}
|
|
17407
17801
|
}, {
|
|
@@ -17419,7 +17813,12 @@ var init_core = __esm({
|
|
|
17419
17813
|
});
|
|
17420
17814
|
eventListenerManager.addWindowListener("contextmenu", (event) => {
|
|
17421
17815
|
if (!isRendererActive() || isCopying() || isPromptMode()) return;
|
|
17422
|
-
|
|
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
|
+
}
|
|
17423
17822
|
if (store.contextMenuPosition !== null) {
|
|
17424
17823
|
event.preventDefault();
|
|
17425
17824
|
return;
|
|
@@ -17455,7 +17854,6 @@ var init_core = __esm({
|
|
|
17455
17854
|
if (store.contextMenuPosition !== null) return;
|
|
17456
17855
|
if (isRendererActive() || isCopying() || didJustDrag()) {
|
|
17457
17856
|
event.preventDefault();
|
|
17458
|
-
event.stopPropagation();
|
|
17459
17857
|
event.stopImmediatePropagation();
|
|
17460
17858
|
if (store.wasActivatedByToggle && !isCopying() && !isPromptMode()) {
|
|
17461
17859
|
if (!isHoldingKeys()) {
|
|
@@ -18307,6 +18705,10 @@ var init_core = __esm({
|
|
|
18307
18705
|
get selectionActionCycleState() {
|
|
18308
18706
|
return actionCycleState();
|
|
18309
18707
|
},
|
|
18708
|
+
get selectionArrowNavigationState() {
|
|
18709
|
+
return arrowNavigationState();
|
|
18710
|
+
},
|
|
18711
|
+
onArrowNavigationSelect: handleArrowNavigationSelect,
|
|
18310
18712
|
get labelInstances() {
|
|
18311
18713
|
return computedLabelInstances();
|
|
18312
18714
|
},
|