react-grab 0.1.20 → 0.1.22
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-H7IR3CM4.js +118 -0
- package/dist/chunk-RL275Y6D.cjs +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 +38 -38
- package/dist/index.js +1 -1
- package/dist/react.cjs +826 -367
- package/dist/react.js +826 -367
- 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.22";
|
|
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, findNearestFiberElement, 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) => {
|
|
@@ -4061,6 +4106,15 @@ var init_context = __esm({
|
|
|
4061
4106
|
};
|
|
4062
4107
|
});
|
|
4063
4108
|
};
|
|
4109
|
+
findNearestFiberElement = (element) => {
|
|
4110
|
+
if (!Ee()) return element;
|
|
4111
|
+
let current = element;
|
|
4112
|
+
while (current) {
|
|
4113
|
+
if (Pe(current)) return current;
|
|
4114
|
+
current = current.parentElement;
|
|
4115
|
+
}
|
|
4116
|
+
return element;
|
|
4117
|
+
};
|
|
4064
4118
|
stackCache = /* @__PURE__ */ new WeakMap();
|
|
4065
4119
|
fetchStackForElement = async (element) => {
|
|
4066
4120
|
try {
|
|
@@ -4078,10 +4132,11 @@ var init_context = __esm({
|
|
|
4078
4132
|
};
|
|
4079
4133
|
getStack = (element) => {
|
|
4080
4134
|
if (!Ee()) return Promise.resolve([]);
|
|
4081
|
-
const
|
|
4135
|
+
const resolvedElement = findNearestFiberElement(element);
|
|
4136
|
+
const cached = stackCache.get(resolvedElement);
|
|
4082
4137
|
if (cached) return cached;
|
|
4083
|
-
const promise = fetchStackForElement(
|
|
4084
|
-
stackCache.set(
|
|
4138
|
+
const promise = fetchStackForElement(resolvedElement);
|
|
4139
|
+
stackCache.set(resolvedElement, promise);
|
|
4085
4140
|
return promise;
|
|
4086
4141
|
};
|
|
4087
4142
|
getNearestComponentName = async (element) => {
|
|
@@ -4117,7 +4172,8 @@ var init_context = __esm({
|
|
|
4117
4172
|
};
|
|
4118
4173
|
getComponentDisplayName = (element) => {
|
|
4119
4174
|
if (!Ee()) return null;
|
|
4120
|
-
const
|
|
4175
|
+
const resolvedElement = findNearestFiberElement(element);
|
|
4176
|
+
const fiber = Pe(resolvedElement);
|
|
4121
4177
|
if (!fiber) return null;
|
|
4122
4178
|
let currentFiber = fiber.return;
|
|
4123
4179
|
while (currentFiber) {
|
|
@@ -4204,12 +4260,13 @@ var init_context = __esm({
|
|
|
4204
4260
|
return "";
|
|
4205
4261
|
};
|
|
4206
4262
|
getElementContext = async (element, options = {}) => {
|
|
4207
|
-
const
|
|
4208
|
-
const
|
|
4263
|
+
const resolvedElement = findNearestFiberElement(element);
|
|
4264
|
+
const html = getHTMLPreview(resolvedElement);
|
|
4265
|
+
const stackContext = await getStackContext(resolvedElement, options);
|
|
4209
4266
|
if (stackContext) {
|
|
4210
4267
|
return `${html}${stackContext}`;
|
|
4211
4268
|
}
|
|
4212
|
-
return getFallbackContext(
|
|
4269
|
+
return getFallbackContext(resolvedElement);
|
|
4213
4270
|
};
|
|
4214
4271
|
getFallbackContext = (element) => {
|
|
4215
4272
|
const tagName = getTagName(element);
|
|
@@ -8017,12 +8074,10 @@ var init_completion_view = __esm({
|
|
|
8017
8074
|
return (() => {
|
|
8018
8075
|
var _el$ = _tmpl$15();
|
|
8019
8076
|
addEventListener(_el$, "click", (event) => {
|
|
8020
|
-
event.stopPropagation();
|
|
8021
8077
|
event.stopImmediatePropagation();
|
|
8022
8078
|
props.onClick();
|
|
8023
8079
|
});
|
|
8024
8080
|
addEventListener(_el$, "pointerdown", (event) => {
|
|
8025
|
-
event.stopPropagation();
|
|
8026
8081
|
event.stopImmediatePropagation();
|
|
8027
8082
|
});
|
|
8028
8083
|
insert(_el$, createComponent(IconEllipsis, {
|
|
@@ -8074,7 +8129,6 @@ var init_completion_view = __esm({
|
|
|
8074
8129
|
const isEnterWithoutShift = event.code === "Enter" && !event.shiftKey;
|
|
8075
8130
|
const isEscape = event.code === "Escape";
|
|
8076
8131
|
if (!isUndoRedo) {
|
|
8077
|
-
event.stopPropagation();
|
|
8078
8132
|
event.stopImmediatePropagation();
|
|
8079
8133
|
}
|
|
8080
8134
|
if (isEnterWithoutShift) {
|
|
@@ -8281,8 +8335,166 @@ var init_completion_view = __esm({
|
|
|
8281
8335
|
}
|
|
8282
8336
|
});
|
|
8283
8337
|
|
|
8338
|
+
// src/utils/create-menu-highlight.ts
|
|
8339
|
+
var DEFAULT_HIDDEN_OPACITY, DEFAULT_VISIBLE_OPACITY, createAnimatedBoundsFollower, createMenuHighlight;
|
|
8340
|
+
var init_create_menu_highlight = __esm({
|
|
8341
|
+
"src/utils/create-menu-highlight.ts"() {
|
|
8342
|
+
"use strict";
|
|
8343
|
+
DEFAULT_HIDDEN_OPACITY = "0";
|
|
8344
|
+
DEFAULT_VISIBLE_OPACITY = "1";
|
|
8345
|
+
createAnimatedBoundsFollower = ({
|
|
8346
|
+
hiddenOpacity = DEFAULT_HIDDEN_OPACITY,
|
|
8347
|
+
visibleOpacity = DEFAULT_VISIBLE_OPACITY
|
|
8348
|
+
} = {}) => {
|
|
8349
|
+
let containerElement;
|
|
8350
|
+
let followerElement;
|
|
8351
|
+
const hideFollower = () => {
|
|
8352
|
+
if (!followerElement) return;
|
|
8353
|
+
followerElement.style.opacity = hiddenOpacity;
|
|
8354
|
+
};
|
|
8355
|
+
const followElement = (targetElement) => {
|
|
8356
|
+
if (!followerElement || !containerElement) return;
|
|
8357
|
+
if (!targetElement) {
|
|
8358
|
+
hideFollower();
|
|
8359
|
+
return;
|
|
8360
|
+
}
|
|
8361
|
+
const containerRect = containerElement.getBoundingClientRect();
|
|
8362
|
+
const targetRect = targetElement.getBoundingClientRect();
|
|
8363
|
+
const targetTopWithinContainer = targetRect.top - containerRect.top + containerElement.scrollTop;
|
|
8364
|
+
const targetLeftWithinContainer = targetRect.left - containerRect.left + containerElement.scrollLeft;
|
|
8365
|
+
followerElement.style.opacity = visibleOpacity;
|
|
8366
|
+
followerElement.style.top = `${targetTopWithinContainer}px`;
|
|
8367
|
+
followerElement.style.left = `${targetLeftWithinContainer}px`;
|
|
8368
|
+
followerElement.style.width = `${targetRect.width}px`;
|
|
8369
|
+
followerElement.style.height = `${targetRect.height}px`;
|
|
8370
|
+
};
|
|
8371
|
+
const setContainerRef = (containerNode) => {
|
|
8372
|
+
containerElement = containerNode;
|
|
8373
|
+
};
|
|
8374
|
+
const setFollowerRef = (followerNode) => {
|
|
8375
|
+
followerElement = followerNode;
|
|
8376
|
+
};
|
|
8377
|
+
return {
|
|
8378
|
+
containerRef: setContainerRef,
|
|
8379
|
+
followerRef: setFollowerRef,
|
|
8380
|
+
followElement,
|
|
8381
|
+
hideFollower
|
|
8382
|
+
};
|
|
8383
|
+
};
|
|
8384
|
+
createMenuHighlight = () => {
|
|
8385
|
+
const {
|
|
8386
|
+
containerRef,
|
|
8387
|
+
followerRef: highlightRef,
|
|
8388
|
+
followElement: updateHighlight,
|
|
8389
|
+
hideFollower: clearHighlight
|
|
8390
|
+
} = createAnimatedBoundsFollower();
|
|
8391
|
+
return {
|
|
8392
|
+
containerRef,
|
|
8393
|
+
highlightRef,
|
|
8394
|
+
updateHighlight,
|
|
8395
|
+
clearHighlight
|
|
8396
|
+
};
|
|
8397
|
+
};
|
|
8398
|
+
}
|
|
8399
|
+
});
|
|
8400
|
+
|
|
8401
|
+
// src/components/selection-label/arrow-navigation-menu.tsx
|
|
8402
|
+
var _tmpl$16, _tmpl$26, _tmpl$34, ArrowNavigationMenu;
|
|
8403
|
+
var init_arrow_navigation_menu = __esm({
|
|
8404
|
+
"src/components/selection-label/arrow-navigation-menu.tsx"() {
|
|
8405
|
+
"use strict";
|
|
8406
|
+
init_web();
|
|
8407
|
+
init_web();
|
|
8408
|
+
init_web();
|
|
8409
|
+
init_web();
|
|
8410
|
+
init_web();
|
|
8411
|
+
init_web();
|
|
8412
|
+
init_web();
|
|
8413
|
+
init_web();
|
|
8414
|
+
init_solid();
|
|
8415
|
+
init_create_menu_highlight();
|
|
8416
|
+
init_bottom_section();
|
|
8417
|
+
_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">`);
|
|
8418
|
+
_tmpl$26 = /* @__PURE__ */ template(`<span class=text-black/40>.`);
|
|
8419
|
+
_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">`);
|
|
8420
|
+
ArrowNavigationMenu = (props) => {
|
|
8421
|
+
const {
|
|
8422
|
+
containerRef: highlightContainerRef,
|
|
8423
|
+
highlightRef,
|
|
8424
|
+
updateHighlight,
|
|
8425
|
+
clearHighlight
|
|
8426
|
+
} = createMenuHighlight();
|
|
8427
|
+
let itemRefs = [];
|
|
8428
|
+
createEffect(() => {
|
|
8429
|
+
const itemRef = itemRefs[props.activeIndex];
|
|
8430
|
+
if (itemRef) {
|
|
8431
|
+
updateHighlight(itemRef);
|
|
8432
|
+
}
|
|
8433
|
+
});
|
|
8434
|
+
return createComponent(BottomSection, {
|
|
8435
|
+
get children() {
|
|
8436
|
+
var _el$ = _tmpl$16(), _el$2 = _el$.firstChild;
|
|
8437
|
+
use(highlightContainerRef, _el$);
|
|
8438
|
+
use(highlightRef, _el$2);
|
|
8439
|
+
insert(_el$, createComponent(For, {
|
|
8440
|
+
get each() {
|
|
8441
|
+
return props.items;
|
|
8442
|
+
},
|
|
8443
|
+
children: (item, itemIndex) => (() => {
|
|
8444
|
+
var _el$3 = _tmpl$34(), _el$4 = _el$3.firstChild;
|
|
8445
|
+
_el$3.$$click = (event) => {
|
|
8446
|
+
event.stopPropagation();
|
|
8447
|
+
props.onSelect(itemIndex());
|
|
8448
|
+
};
|
|
8449
|
+
_el$3.addEventListener("pointerleave", () => {
|
|
8450
|
+
const activeRef = itemRefs[props.activeIndex];
|
|
8451
|
+
if (activeRef) {
|
|
8452
|
+
updateHighlight(activeRef);
|
|
8453
|
+
} else {
|
|
8454
|
+
clearHighlight();
|
|
8455
|
+
}
|
|
8456
|
+
});
|
|
8457
|
+
_el$3.addEventListener("pointerenter", (event) => {
|
|
8458
|
+
updateHighlight(event.currentTarget);
|
|
8459
|
+
props.onSelect(itemIndex());
|
|
8460
|
+
});
|
|
8461
|
+
_el$3.$$pointerdown = (event) => event.stopPropagation();
|
|
8462
|
+
use((element) => {
|
|
8463
|
+
itemRefs[itemIndex()] = element;
|
|
8464
|
+
}, _el$3);
|
|
8465
|
+
insert(_el$4, createComponent(Show, {
|
|
8466
|
+
get when() {
|
|
8467
|
+
return item.componentName;
|
|
8468
|
+
},
|
|
8469
|
+
get children() {
|
|
8470
|
+
return [memo(() => item.componentName), _tmpl$26()];
|
|
8471
|
+
}
|
|
8472
|
+
}), null);
|
|
8473
|
+
insert(_el$4, () => item.tagName, null);
|
|
8474
|
+
createRenderEffect((_p$) => {
|
|
8475
|
+
var _v$ = item.tagName, _v$2 = !!(itemIndex() === props.activeIndex), _v$3 = !!(itemIndex() !== props.activeIndex);
|
|
8476
|
+
_v$ !== _p$.e && setAttribute(_el$3, "data-react-grab-arrow-nav-item", _p$.e = _v$);
|
|
8477
|
+
_v$2 !== _p$.t && _el$4.classList.toggle("text-black", _p$.t = _v$2);
|
|
8478
|
+
_v$3 !== _p$.a && _el$4.classList.toggle("text-black/30", _p$.a = _v$3);
|
|
8479
|
+
return _p$;
|
|
8480
|
+
}, {
|
|
8481
|
+
e: void 0,
|
|
8482
|
+
t: void 0,
|
|
8483
|
+
a: void 0
|
|
8484
|
+
});
|
|
8485
|
+
return _el$3;
|
|
8486
|
+
})()
|
|
8487
|
+
}), null);
|
|
8488
|
+
return _el$;
|
|
8489
|
+
}
|
|
8490
|
+
});
|
|
8491
|
+
};
|
|
8492
|
+
delegateEvents(["pointerdown", "click"]);
|
|
8493
|
+
}
|
|
8494
|
+
});
|
|
8495
|
+
|
|
8284
8496
|
// src/components/selection-label/index.tsx
|
|
8285
|
-
var _tmpl$
|
|
8497
|
+
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
8498
|
var init_selection_label = __esm({
|
|
8287
8499
|
"src/components/selection-label/index.tsx"() {
|
|
8288
8500
|
"use strict";
|
|
@@ -8296,6 +8508,7 @@ var init_selection_label = __esm({
|
|
|
8296
8508
|
init_web();
|
|
8297
8509
|
init_web();
|
|
8298
8510
|
init_web();
|
|
8511
|
+
init_web();
|
|
8299
8512
|
init_solid();
|
|
8300
8513
|
init_constants();
|
|
8301
8514
|
init_get_arrow_size();
|
|
@@ -8312,11 +8525,12 @@ var init_selection_label = __esm({
|
|
|
8312
8525
|
init_discard_prompt();
|
|
8313
8526
|
init_error_view();
|
|
8314
8527
|
init_completion_view();
|
|
8315
|
-
|
|
8316
|
-
_tmpl$
|
|
8317
|
-
_tmpl$
|
|
8528
|
+
init_arrow_navigation_menu();
|
|
8529
|
+
_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]">`);
|
|
8530
|
+
_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>`);
|
|
8531
|
+
_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
8532
|
_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
|
|
8533
|
+
_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
8534
|
_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
8535
|
_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
8536
|
_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 +8570,7 @@ var init_selection_label = __esm({
|
|
|
8356
8570
|
if (props.status === "error" && (props.onAcknowledgeError || props.onRetry)) {
|
|
8357
8571
|
return true;
|
|
8358
8572
|
}
|
|
8573
|
+
if (props.arrowNavigationState?.isVisible) return true;
|
|
8359
8574
|
return false;
|
|
8360
8575
|
};
|
|
8361
8576
|
let resizeObserver;
|
|
@@ -8371,12 +8586,10 @@ var init_selection_label = __esm({
|
|
|
8371
8586
|
const isCtrlCToAbort = event.code === "KeyC" && event.ctrlKey && props.status === "copying" && props.onAbort;
|
|
8372
8587
|
if (isEnterToExpand) {
|
|
8373
8588
|
event.preventDefault();
|
|
8374
|
-
event.stopPropagation();
|
|
8375
8589
|
event.stopImmediatePropagation();
|
|
8376
8590
|
props.onToggleExpand?.();
|
|
8377
8591
|
} else if (isCtrlCToAbort) {
|
|
8378
8592
|
event.preventDefault();
|
|
8379
|
-
event.stopPropagation();
|
|
8380
8593
|
event.stopImmediatePropagation();
|
|
8381
8594
|
props.onAbort?.();
|
|
8382
8595
|
}
|
|
@@ -8447,8 +8660,8 @@ var init_selection_label = __esm({
|
|
|
8447
8660
|
computedArrowPosition: null
|
|
8448
8661
|
};
|
|
8449
8662
|
}
|
|
8450
|
-
const viewportWidth = window.innerWidth;
|
|
8451
|
-
const viewportHeight = window.innerHeight;
|
|
8663
|
+
const viewportWidth = window.visualViewport?.width ?? window.innerWidth;
|
|
8664
|
+
const viewportHeight = window.visualViewport?.height ?? window.innerHeight;
|
|
8452
8665
|
const isSelectionVisibleInViewport = bounds.x + bounds.width > 0 && bounds.x < viewportWidth && bounds.y + bounds.height > 0 && bounds.y < viewportHeight;
|
|
8453
8666
|
if (!isSelectionVisibleInViewport) {
|
|
8454
8667
|
return {
|
|
@@ -8501,7 +8714,6 @@ var init_selection_label = __esm({
|
|
|
8501
8714
|
computedArrowPosition
|
|
8502
8715
|
};
|
|
8503
8716
|
});
|
|
8504
|
-
const computedPosition = () => positionComputation().position;
|
|
8505
8717
|
createEffect(() => {
|
|
8506
8718
|
const result = positionComputation();
|
|
8507
8719
|
if (result.computedArrowPosition !== null) {
|
|
@@ -8514,7 +8726,6 @@ var init_selection_label = __esm({
|
|
|
8514
8726
|
if (event.isComposing || event.keyCode === IME_COMPOSING_KEY_CODE) {
|
|
8515
8727
|
return;
|
|
8516
8728
|
}
|
|
8517
|
-
event.stopPropagation();
|
|
8518
8729
|
event.stopImmediatePropagation();
|
|
8519
8730
|
const isEnterWithoutShift = event.code === "Enter" && !event.shiftKey;
|
|
8520
8731
|
const isEscape = event.code === "Escape";
|
|
@@ -8543,8 +8754,8 @@ var init_selection_label = __esm({
|
|
|
8543
8754
|
const actionCycleItems = () => props.actionCycleState?.items ?? [];
|
|
8544
8755
|
const actionCycleActiveIndex = () => props.actionCycleState?.activeIndex ?? 0;
|
|
8545
8756
|
const isActionCycleVisible = () => Boolean(props.actionCycleState?.isVisible);
|
|
8757
|
+
const isArrowNavigationVisible = () => Boolean(props.arrowNavigationState?.isVisible);
|
|
8546
8758
|
const handleTagClick = (event) => {
|
|
8547
|
-
event.stopPropagation();
|
|
8548
8759
|
event.stopImmediatePropagation();
|
|
8549
8760
|
if (props.filePath && props.onOpen) {
|
|
8550
8761
|
props.onOpen();
|
|
@@ -8552,7 +8763,6 @@ var init_selection_label = __esm({
|
|
|
8552
8763
|
};
|
|
8553
8764
|
const isTagClickable = () => Boolean(props.filePath && props.onOpen);
|
|
8554
8765
|
const handleContainerPointerDown = (event) => {
|
|
8555
|
-
event.stopPropagation();
|
|
8556
8766
|
event.stopImmediatePropagation();
|
|
8557
8767
|
const isEditableInputVisible = canInteract() && props.isPromptMode && !props.isPendingDismiss && props.onSubmit;
|
|
8558
8768
|
if (isEditableInputVisible && inputRef) {
|
|
@@ -8569,7 +8779,6 @@ var init_selection_label = __esm({
|
|
|
8569
8779
|
_el$.addEventListener("mouseleave", () => props.onHoverChange?.(false));
|
|
8570
8780
|
_el$.addEventListener("mouseenter", () => props.onHoverChange?.(true));
|
|
8571
8781
|
_el$.$$click = (event) => {
|
|
8572
|
-
event.stopPropagation();
|
|
8573
8782
|
event.stopImmediatePropagation();
|
|
8574
8783
|
};
|
|
8575
8784
|
_el$.$$pointerdown = handleContainerPointerDown;
|
|
@@ -8585,10 +8794,10 @@ var init_selection_label = __esm({
|
|
|
8585
8794
|
return arrowPosition();
|
|
8586
8795
|
},
|
|
8587
8796
|
get leftPercent() {
|
|
8588
|
-
return
|
|
8797
|
+
return positionComputation().position.arrowLeftPercent;
|
|
8589
8798
|
},
|
|
8590
8799
|
get leftOffsetPx() {
|
|
8591
|
-
return
|
|
8800
|
+
return positionComputation().position.arrowLeftOffset;
|
|
8592
8801
|
},
|
|
8593
8802
|
get labelWidth() {
|
|
8594
8803
|
return panelWidth();
|
|
@@ -8640,7 +8849,7 @@ var init_selection_label = __esm({
|
|
|
8640
8849
|
return memo(() => props.status === "copying")() && !props.isPendingAbort;
|
|
8641
8850
|
},
|
|
8642
8851
|
get children() {
|
|
8643
|
-
var _el$3 = _tmpl$
|
|
8852
|
+
var _el$3 = _tmpl$35(), _el$4 = _el$3.firstChild, _el$5 = _el$4.firstChild;
|
|
8644
8853
|
insert(_el$4, createComponent(IconLoader, {
|
|
8645
8854
|
size: 13,
|
|
8646
8855
|
"class": "text-[#71717a] shrink-0"
|
|
@@ -8653,7 +8862,7 @@ var init_selection_label = __esm({
|
|
|
8653
8862
|
get children() {
|
|
8654
8863
|
return createComponent(BottomSection, {
|
|
8655
8864
|
get children() {
|
|
8656
|
-
var _el$6 = _tmpl$
|
|
8865
|
+
var _el$6 = _tmpl$27(), _el$7 = _el$6.firstChild;
|
|
8657
8866
|
var _ref$3 = inputRef;
|
|
8658
8867
|
typeof _ref$3 === "function" ? use(_ref$3, _el$7) : inputRef = _el$7;
|
|
8659
8868
|
insert(_el$6, createComponent(Show, {
|
|
@@ -8661,7 +8870,7 @@ var init_selection_label = __esm({
|
|
|
8661
8870
|
return props.onAbort;
|
|
8662
8871
|
},
|
|
8663
8872
|
get children() {
|
|
8664
|
-
var _el$8 = _tmpl$
|
|
8873
|
+
var _el$8 = _tmpl$17();
|
|
8665
8874
|
_el$8.$$click = (event) => {
|
|
8666
8875
|
event.stopPropagation();
|
|
8667
8876
|
props.onAbort?.();
|
|
@@ -8715,12 +8924,28 @@ var init_selection_label = __esm({
|
|
|
8715
8924
|
onHoverChange: handleTagHoverChange,
|
|
8716
8925
|
shrink: true,
|
|
8717
8926
|
get forceShowIcon() {
|
|
8718
|
-
return Boolean(props.isContextMenuOpen);
|
|
8927
|
+
return memo(() => !!isArrowNavigationVisible())() ? isTagClickable() : Boolean(props.isContextMenuOpen);
|
|
8719
8928
|
}
|
|
8720
8929
|
}));
|
|
8721
8930
|
insert(_el$9, createComponent(Show, {
|
|
8722
8931
|
get when() {
|
|
8723
|
-
return
|
|
8932
|
+
return props.arrowNavigationState?.isVisible;
|
|
8933
|
+
},
|
|
8934
|
+
get children() {
|
|
8935
|
+
return createComponent(ArrowNavigationMenu, {
|
|
8936
|
+
get items() {
|
|
8937
|
+
return props.arrowNavigationState.items;
|
|
8938
|
+
},
|
|
8939
|
+
get activeIndex() {
|
|
8940
|
+
return props.arrowNavigationState.activeIndex;
|
|
8941
|
+
},
|
|
8942
|
+
onSelect: (index) => props.onArrowNavigationSelect?.(index)
|
|
8943
|
+
});
|
|
8944
|
+
}
|
|
8945
|
+
}), null);
|
|
8946
|
+
insert(_el$9, createComponent(Show, {
|
|
8947
|
+
get when() {
|
|
8948
|
+
return memo(() => !!!isArrowNavigationVisible())() && isActionCycleVisible();
|
|
8724
8949
|
},
|
|
8725
8950
|
get children() {
|
|
8726
8951
|
return createComponent(BottomSection, {
|
|
@@ -8744,10 +8969,10 @@ var init_selection_label = __esm({
|
|
|
8744
8969
|
}
|
|
8745
8970
|
}), null);
|
|
8746
8971
|
createRenderEffect((_p$) => {
|
|
8747
|
-
var _v$
|
|
8748
|
-
_v$
|
|
8749
|
-
_v$
|
|
8750
|
-
_v$
|
|
8972
|
+
var _v$11 = item.label.toLowerCase(), _v$12 = !!(itemIndex() === actionCycleActiveIndex()), _v$13 = !!(itemIndex() === actionCycleItems().length - 1);
|
|
8973
|
+
_v$11 !== _p$.e && setAttribute(_el$17, "data-react-grab-action-cycle-item", _p$.e = _v$11);
|
|
8974
|
+
_v$12 !== _p$.t && _el$17.classList.toggle("bg-black/5", _p$.t = _v$12);
|
|
8975
|
+
_v$13 !== _p$.a && _el$17.classList.toggle("rounded-b-[6px]", _p$.a = _v$13);
|
|
8751
8976
|
return _p$;
|
|
8752
8977
|
}, {
|
|
8753
8978
|
e: void 0,
|
|
@@ -8762,6 +8987,18 @@ var init_selection_label = __esm({
|
|
|
8762
8987
|
});
|
|
8763
8988
|
}
|
|
8764
8989
|
}), null);
|
|
8990
|
+
createRenderEffect((_p$) => {
|
|
8991
|
+
var _v$ = !!isArrowNavigationVisible(), _v$2 = {
|
|
8992
|
+
"py-1.5": !isArrowNavigationVisible(),
|
|
8993
|
+
"pt-1.5 pb-1": isArrowNavigationVisible()
|
|
8994
|
+
};
|
|
8995
|
+
_v$ !== _p$.e && _el$9.classList.toggle("min-w-[100px]", _p$.e = _v$);
|
|
8996
|
+
_p$.t = classList(_el$0, _v$2, _p$.t);
|
|
8997
|
+
return _p$;
|
|
8998
|
+
}, {
|
|
8999
|
+
e: void 0,
|
|
9000
|
+
t: void 0
|
|
9001
|
+
});
|
|
8765
9002
|
return _el$9;
|
|
8766
9003
|
}
|
|
8767
9004
|
}), null);
|
|
@@ -8821,9 +9058,9 @@ var init_selection_label = __esm({
|
|
|
8821
9058
|
}
|
|
8822
9059
|
}), null);
|
|
8823
9060
|
createRenderEffect((_p$) => {
|
|
8824
|
-
var _v$ = props.replyToPrompt ? "14px" : "0", _v$
|
|
8825
|
-
_v$ !== _p$.e && setStyleProperty(_el$14, "padding-left", _p$.e = _v$);
|
|
8826
|
-
_v$
|
|
9061
|
+
var _v$3 = props.replyToPrompt ? "14px" : "0", _v$4 = !props.onSubmit;
|
|
9062
|
+
_v$3 !== _p$.e && setStyleProperty(_el$14, "padding-left", _p$.e = _v$3);
|
|
9063
|
+
_v$4 !== _p$.t && (_el$15.readOnly = _p$.t = _v$4);
|
|
8827
9064
|
return _p$;
|
|
8828
9065
|
}, {
|
|
8829
9066
|
e: void 0,
|
|
@@ -8871,15 +9108,15 @@ var init_selection_label = __esm({
|
|
|
8871
9108
|
}
|
|
8872
9109
|
}), null);
|
|
8873
9110
|
createRenderEffect((_p$) => {
|
|
8874
|
-
var _v$
|
|
8875
|
-
_v$
|
|
8876
|
-
_v$
|
|
8877
|
-
_v$
|
|
8878
|
-
_v$
|
|
8879
|
-
_v$
|
|
8880
|
-
_v$
|
|
8881
|
-
_v$
|
|
8882
|
-
_v$
|
|
9111
|
+
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;
|
|
9112
|
+
_v$5 !== _p$.e && className(_el$, _p$.e = _v$5);
|
|
9113
|
+
_v$6 !== _p$.t && setStyleProperty(_el$, "top", _p$.t = _v$6);
|
|
9114
|
+
_v$7 !== _p$.a && setStyleProperty(_el$, "left", _p$.a = _v$7);
|
|
9115
|
+
_v$8 !== _p$.o && setStyleProperty(_el$, "transform", _p$.o = _v$8);
|
|
9116
|
+
_v$9 !== _p$.i && setStyleProperty(_el$, "pointer-events", _p$.i = _v$9);
|
|
9117
|
+
_v$0 !== _p$.n && setStyleProperty(_el$, "opacity", _p$.n = _v$0);
|
|
9118
|
+
_v$1 !== _p$.s && className(_el$2, _p$.s = _v$1);
|
|
9119
|
+
_v$10 !== _p$.h && setStyleProperty(_el$2, "display", _p$.h = _v$10);
|
|
8883
9120
|
return _p$;
|
|
8884
9121
|
}, {
|
|
8885
9122
|
e: void 0,
|
|
@@ -8940,18 +9177,18 @@ var init_state = __esm({
|
|
|
8940
9177
|
});
|
|
8941
9178
|
|
|
8942
9179
|
// src/components/icons/icon-select.tsx
|
|
8943
|
-
var _tmpl$
|
|
9180
|
+
var _tmpl$18, IconSelect;
|
|
8944
9181
|
var init_icon_select = __esm({
|
|
8945
9182
|
"src/components/icons/icon-select.tsx"() {
|
|
8946
9183
|
"use strict";
|
|
8947
9184
|
init_web();
|
|
8948
9185
|
init_web();
|
|
8949
9186
|
init_web();
|
|
8950
|
-
_tmpl$
|
|
9187
|
+
_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
9188
|
IconSelect = (props) => {
|
|
8952
9189
|
const size = () => props.size ?? 14;
|
|
8953
9190
|
return (() => {
|
|
8954
|
-
var _el$ = _tmpl$
|
|
9191
|
+
var _el$ = _tmpl$18();
|
|
8955
9192
|
createRenderEffect((_p$) => {
|
|
8956
9193
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
8957
9194
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -8970,18 +9207,18 @@ var init_icon_select = __esm({
|
|
|
8970
9207
|
});
|
|
8971
9208
|
|
|
8972
9209
|
// src/components/icons/icon-chevron.tsx
|
|
8973
|
-
var _tmpl$
|
|
9210
|
+
var _tmpl$19, IconChevron;
|
|
8974
9211
|
var init_icon_chevron = __esm({
|
|
8975
9212
|
"src/components/icons/icon-chevron.tsx"() {
|
|
8976
9213
|
"use strict";
|
|
8977
9214
|
init_web();
|
|
8978
9215
|
init_web();
|
|
8979
9216
|
init_web();
|
|
8980
|
-
_tmpl$
|
|
9217
|
+
_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
9218
|
IconChevron = (props) => {
|
|
8982
9219
|
const size = () => props.size ?? 12;
|
|
8983
9220
|
return (() => {
|
|
8984
|
-
var _el$ = _tmpl$
|
|
9221
|
+
var _el$ = _tmpl$19();
|
|
8985
9222
|
createRenderEffect((_p$) => {
|
|
8986
9223
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
8987
9224
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -9000,18 +9237,18 @@ var init_icon_chevron = __esm({
|
|
|
9000
9237
|
});
|
|
9001
9238
|
|
|
9002
9239
|
// src/components/icons/icon-clock.tsx
|
|
9003
|
-
var _tmpl$
|
|
9240
|
+
var _tmpl$20, IconClock;
|
|
9004
9241
|
var init_icon_clock = __esm({
|
|
9005
9242
|
"src/components/icons/icon-clock.tsx"() {
|
|
9006
9243
|
"use strict";
|
|
9007
9244
|
init_web();
|
|
9008
9245
|
init_web();
|
|
9009
9246
|
init_web();
|
|
9010
|
-
_tmpl$
|
|
9247
|
+
_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
9248
|
IconClock = (props) => {
|
|
9012
9249
|
const size = () => props.size ?? 14;
|
|
9013
9250
|
return (() => {
|
|
9014
|
-
var _el$ = _tmpl$
|
|
9251
|
+
var _el$ = _tmpl$20();
|
|
9015
9252
|
createRenderEffect((_p$) => {
|
|
9016
9253
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
9017
9254
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -9030,18 +9267,18 @@ var init_icon_clock = __esm({
|
|
|
9030
9267
|
});
|
|
9031
9268
|
|
|
9032
9269
|
// src/components/icons/icon-copy.tsx
|
|
9033
|
-
var _tmpl$
|
|
9270
|
+
var _tmpl$21, IconCopy;
|
|
9034
9271
|
var init_icon_copy = __esm({
|
|
9035
9272
|
"src/components/icons/icon-copy.tsx"() {
|
|
9036
9273
|
"use strict";
|
|
9037
9274
|
init_web();
|
|
9038
9275
|
init_web();
|
|
9039
9276
|
init_web();
|
|
9040
|
-
_tmpl$
|
|
9277
|
+
_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
9278
|
IconCopy = (props) => {
|
|
9042
9279
|
const size = () => props.size ?? 14;
|
|
9043
9280
|
return (() => {
|
|
9044
|
-
var _el$ = _tmpl$
|
|
9281
|
+
var _el$ = _tmpl$21();
|
|
9045
9282
|
createRenderEffect((_p$) => {
|
|
9046
9283
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
9047
9284
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -9141,7 +9378,7 @@ var init_safe_polygon = __esm({
|
|
|
9141
9378
|
});
|
|
9142
9379
|
|
|
9143
9380
|
// src/utils/freeze-updates.ts
|
|
9144
|
-
var isUpdatesPaused, getOrCache, patchedDispatchers, wrappedDispatchCache, wrappedStartTransitionCache, pendingStoreCallbacks, pendingTransitionCallbacks, pendingStateUpdates, pausedQueueStates, pausedContextStates, renderersWithPatchedDispatcher, typedFiberRoots, getFiberRoot, collectFiberRoots, mergePendingChains, pauseHookQueue, resumeHookQueue, pauseContextDependency, resumeContextDependency, forEachHookQueue, forEachContextDependency, traverseFibers, pauseFiber, resumeFiber, patchDispatcher, installDispatcherPatching, scheduleReactUpdate, invokeCallbacks, initializeFreezeSupport, freezeUpdates;
|
|
9381
|
+
var isUpdatesPaused, getOrCache, patchedDispatchers, wrappedDispatchCache, wrappedStartTransitionCache, pendingStoreCallbacks, pendingTransitionCallbacks, pendingStateUpdates, pausedQueueStates, pausedContextStates, renderersWithPatchedDispatcher, typedFiberRoots, getFiberRoot, collectFiberRoots, mergePendingChains, pauseHookQueue, extractActionsFromChain, resumeHookQueue, pauseContextDependency, resumeContextDependency, forEachHookQueue, forEachContextDependency, traverseFibers, pauseFiber, resumeFiber, patchDispatcher, installDispatcherPatching, scheduleReactUpdate, invokeCallbacks, initializeFreezeSupport, freezeUpdates;
|
|
9145
9382
|
var init_freeze_updates = __esm({
|
|
9146
9383
|
"src/utils/freeze-updates.ts"() {
|
|
9147
9384
|
"use strict";
|
|
@@ -9233,26 +9470,42 @@ var init_freeze_updates = __esm({
|
|
|
9233
9470
|
Object.defineProperty(queue, "pending", {
|
|
9234
9471
|
configurable: true,
|
|
9235
9472
|
enumerable: true,
|
|
9236
|
-
get: () => isUpdatesPaused ?
|
|
9473
|
+
get: () => isUpdatesPaused ? null : currentPendingValue,
|
|
9237
9474
|
set: (newValue) => {
|
|
9238
9475
|
if (isUpdatesPaused) {
|
|
9239
|
-
|
|
9476
|
+
if (newValue !== null) {
|
|
9477
|
+
pauseState.bufferedPending = mergePendingChains(
|
|
9478
|
+
pauseState.bufferedPending ?? null,
|
|
9479
|
+
newValue
|
|
9480
|
+
);
|
|
9481
|
+
}
|
|
9482
|
+
return;
|
|
9240
9483
|
}
|
|
9241
9484
|
currentPendingValue = newValue;
|
|
9242
9485
|
}
|
|
9243
9486
|
});
|
|
9244
9487
|
pausedQueueStates.set(queue, pauseState);
|
|
9245
9488
|
};
|
|
9489
|
+
extractActionsFromChain = (pending) => {
|
|
9490
|
+
if (!pending) return [];
|
|
9491
|
+
const actions = [];
|
|
9492
|
+
const first = pending.next;
|
|
9493
|
+
if (!first) return [];
|
|
9494
|
+
let current = first;
|
|
9495
|
+
do {
|
|
9496
|
+
if (current) {
|
|
9497
|
+
actions.push(current.action);
|
|
9498
|
+
current = current.next;
|
|
9499
|
+
}
|
|
9500
|
+
} while (current && current !== first);
|
|
9501
|
+
return actions;
|
|
9502
|
+
};
|
|
9246
9503
|
resumeHookQueue = (queue) => {
|
|
9247
9504
|
const pauseState = pausedQueueStates.get(queue);
|
|
9248
9505
|
if (!pauseState) return;
|
|
9249
9506
|
if (pauseState.originalGetSnapshot) {
|
|
9250
9507
|
queue.getSnapshot = pauseState.originalGetSnapshot;
|
|
9251
9508
|
}
|
|
9252
|
-
const mergedPending = mergePendingChains(
|
|
9253
|
-
pauseState.pendingValueAtPause ?? null,
|
|
9254
|
-
pauseState.bufferedPending ?? null
|
|
9255
|
-
);
|
|
9256
9509
|
if (pauseState.originalPendingDescriptor) {
|
|
9257
9510
|
Object.defineProperty(
|
|
9258
9511
|
queue,
|
|
@@ -9262,7 +9515,19 @@ var init_freeze_updates = __esm({
|
|
|
9262
9515
|
} else {
|
|
9263
9516
|
delete queue.pending;
|
|
9264
9517
|
}
|
|
9265
|
-
queue.pending =
|
|
9518
|
+
queue.pending = null;
|
|
9519
|
+
const dispatch = queue.dispatch;
|
|
9520
|
+
if (typeof dispatch === "function") {
|
|
9521
|
+
const pendingActions = extractActionsFromChain(
|
|
9522
|
+
pauseState.pendingValueAtPause ?? null
|
|
9523
|
+
);
|
|
9524
|
+
const bufferedActions = extractActionsFromChain(
|
|
9525
|
+
pauseState.bufferedPending ?? null
|
|
9526
|
+
);
|
|
9527
|
+
for (const action of [...pendingActions, ...bufferedActions]) {
|
|
9528
|
+
pendingStateUpdates.push(() => dispatch(action));
|
|
9529
|
+
}
|
|
9530
|
+
}
|
|
9266
9531
|
pausedQueueStates.delete(queue);
|
|
9267
9532
|
};
|
|
9268
9533
|
pauseContextDependency = (contextDependency) => {
|
|
@@ -9635,7 +9900,7 @@ var init_freeze_gsap = __esm({
|
|
|
9635
9900
|
});
|
|
9636
9901
|
|
|
9637
9902
|
// src/utils/freeze-animations.ts
|
|
9638
|
-
var FROZEN_STYLES, GLOBAL_FREEZE_STYLES, styleElement, frozenElements, lastInputElements, globalAnimationStyleElement, ensureStylesInjected, areElementsSame, freezeAllAnimations, unfreezeAllAnimations, freezeAnimations, freezeGlobalAnimations, unfreezeGlobalAnimations;
|
|
9903
|
+
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
9904
|
var init_freeze_animations = __esm({
|
|
9640
9905
|
"src/utils/freeze-animations.ts"() {
|
|
9641
9906
|
"use strict";
|
|
@@ -9655,10 +9920,15 @@ var init_freeze_animations = __esm({
|
|
|
9655
9920
|
transition: none !important;
|
|
9656
9921
|
}
|
|
9657
9922
|
`;
|
|
9923
|
+
SVG_ROOT_SELECTOR = "svg";
|
|
9658
9924
|
styleElement = null;
|
|
9659
9925
|
frozenElements = [];
|
|
9926
|
+
frozenSvgElements = [];
|
|
9660
9927
|
lastInputElements = [];
|
|
9661
9928
|
globalAnimationStyleElement = null;
|
|
9929
|
+
globalFrozenSvgElements = [];
|
|
9930
|
+
svgFreezeDepthMap = /* @__PURE__ */ new Map();
|
|
9931
|
+
frozenWaapiAnimations = [];
|
|
9662
9932
|
ensureStylesInjected = () => {
|
|
9663
9933
|
if (styleElement) return;
|
|
9664
9934
|
styleElement = createStyleElement(
|
|
@@ -9666,7 +9936,70 @@ var init_freeze_animations = __esm({
|
|
|
9666
9936
|
FROZEN_STYLES
|
|
9667
9937
|
);
|
|
9668
9938
|
};
|
|
9669
|
-
areElementsSame = (
|
|
9939
|
+
areElementsSame = (firstElements, secondElements) => firstElements.length === secondElements.length && firstElements.every(
|
|
9940
|
+
(currentElement, index) => currentElement === secondElements[index]
|
|
9941
|
+
);
|
|
9942
|
+
collectFrozenSvgElements = (elements) => {
|
|
9943
|
+
const svgElements = /* @__PURE__ */ new Set();
|
|
9944
|
+
for (const element of elements) {
|
|
9945
|
+
if (element instanceof SVGSVGElement) {
|
|
9946
|
+
svgElements.add(element);
|
|
9947
|
+
} else if (element instanceof SVGElement && element.ownerSVGElement) {
|
|
9948
|
+
svgElements.add(element.ownerSVGElement);
|
|
9949
|
+
}
|
|
9950
|
+
for (const innerSvgElement of element.querySelectorAll(SVG_ROOT_SELECTOR)) {
|
|
9951
|
+
if (innerSvgElement instanceof SVGSVGElement) {
|
|
9952
|
+
svgElements.add(innerSvgElement);
|
|
9953
|
+
}
|
|
9954
|
+
}
|
|
9955
|
+
}
|
|
9956
|
+
return [...svgElements];
|
|
9957
|
+
};
|
|
9958
|
+
callSvgAnimationMethod = (svgElement, methodName) => {
|
|
9959
|
+
const animationMethod = Reflect.get(svgElement, methodName);
|
|
9960
|
+
if (typeof animationMethod !== "function") return;
|
|
9961
|
+
animationMethod.call(svgElement);
|
|
9962
|
+
};
|
|
9963
|
+
pauseSvgAnimations = (svgElements) => {
|
|
9964
|
+
for (const svgElement of svgElements) {
|
|
9965
|
+
const currentFreezeDepth = svgFreezeDepthMap.get(svgElement) ?? 0;
|
|
9966
|
+
if (currentFreezeDepth === 0) {
|
|
9967
|
+
callSvgAnimationMethod(svgElement, "pauseAnimations");
|
|
9968
|
+
}
|
|
9969
|
+
svgFreezeDepthMap.set(svgElement, currentFreezeDepth + 1);
|
|
9970
|
+
}
|
|
9971
|
+
};
|
|
9972
|
+
resumeSvgAnimations = (svgElements) => {
|
|
9973
|
+
for (const svgElement of svgElements) {
|
|
9974
|
+
const currentFreezeDepth = svgFreezeDepthMap.get(svgElement);
|
|
9975
|
+
if (!currentFreezeDepth) continue;
|
|
9976
|
+
if (currentFreezeDepth === 1) {
|
|
9977
|
+
svgFreezeDepthMap.delete(svgElement);
|
|
9978
|
+
callSvgAnimationMethod(svgElement, "unpauseAnimations");
|
|
9979
|
+
continue;
|
|
9980
|
+
}
|
|
9981
|
+
svgFreezeDepthMap.set(svgElement, currentFreezeDepth - 1);
|
|
9982
|
+
}
|
|
9983
|
+
};
|
|
9984
|
+
collectWaapiAnimations = (elements) => {
|
|
9985
|
+
const animations = [];
|
|
9986
|
+
for (const element of elements) {
|
|
9987
|
+
for (const animation of element.getAnimations({ subtree: true })) {
|
|
9988
|
+
if (animation.playState === "running") {
|
|
9989
|
+
animations.push(animation);
|
|
9990
|
+
}
|
|
9991
|
+
}
|
|
9992
|
+
}
|
|
9993
|
+
return animations;
|
|
9994
|
+
};
|
|
9995
|
+
finishAnimations = (animations) => {
|
|
9996
|
+
for (const animation of animations) {
|
|
9997
|
+
try {
|
|
9998
|
+
animation.finish();
|
|
9999
|
+
} catch {
|
|
10000
|
+
}
|
|
10001
|
+
}
|
|
10002
|
+
};
|
|
9670
10003
|
freezeAllAnimations = (elements) => {
|
|
9671
10004
|
if (elements.length === 0) return;
|
|
9672
10005
|
if (areElementsSame(elements, lastInputElements)) return;
|
|
@@ -9674,16 +10007,27 @@ var init_freeze_animations = __esm({
|
|
|
9674
10007
|
lastInputElements = [...elements];
|
|
9675
10008
|
ensureStylesInjected();
|
|
9676
10009
|
frozenElements = elements;
|
|
10010
|
+
frozenSvgElements = collectFrozenSvgElements(frozenElements);
|
|
10011
|
+
pauseSvgAnimations(frozenSvgElements);
|
|
9677
10012
|
for (const element of frozenElements) {
|
|
9678
10013
|
element.setAttribute(FROZEN_ELEMENT_ATTRIBUTE, "");
|
|
9679
10014
|
}
|
|
10015
|
+
frozenWaapiAnimations = collectWaapiAnimations(frozenElements);
|
|
10016
|
+
for (const animation of frozenWaapiAnimations) {
|
|
10017
|
+
animation.pause();
|
|
10018
|
+
}
|
|
9680
10019
|
};
|
|
9681
10020
|
unfreezeAllAnimations = () => {
|
|
9682
|
-
if (frozenElements.length === 0)
|
|
10021
|
+
if (frozenElements.length === 0 && frozenSvgElements.length === 0 && frozenWaapiAnimations.length === 0)
|
|
10022
|
+
return;
|
|
9683
10023
|
for (const element of frozenElements) {
|
|
9684
10024
|
element.removeAttribute(FROZEN_ELEMENT_ATTRIBUTE);
|
|
9685
10025
|
}
|
|
10026
|
+
resumeSvgAnimations(frozenSvgElements);
|
|
10027
|
+
finishAnimations(frozenWaapiAnimations);
|
|
9686
10028
|
frozenElements = [];
|
|
10029
|
+
frozenSvgElements = [];
|
|
10030
|
+
frozenWaapiAnimations = [];
|
|
9687
10031
|
lastInputElements = [];
|
|
9688
10032
|
};
|
|
9689
10033
|
freezeAnimations = (elements) => {
|
|
@@ -9701,6 +10045,10 @@ var init_freeze_animations = __esm({
|
|
|
9701
10045
|
"data-react-grab-global-freeze",
|
|
9702
10046
|
GLOBAL_FREEZE_STYLES
|
|
9703
10047
|
);
|
|
10048
|
+
globalFrozenSvgElements = collectFrozenSvgElements(
|
|
10049
|
+
Array.from(document.querySelectorAll(SVG_ROOT_SELECTOR))
|
|
10050
|
+
);
|
|
10051
|
+
pauseSvgAnimations(globalFrozenSvgElements);
|
|
9704
10052
|
freezeGsap();
|
|
9705
10053
|
};
|
|
9706
10054
|
unfreezeGlobalAnimations = () => {
|
|
@@ -9710,6 +10058,7 @@ var init_freeze_animations = __esm({
|
|
|
9710
10058
|
transition: none !important;
|
|
9711
10059
|
}
|
|
9712
10060
|
`;
|
|
10061
|
+
const animations = [];
|
|
9713
10062
|
for (const animation of document.getAnimations()) {
|
|
9714
10063
|
if (animation.effect instanceof KeyframeEffect) {
|
|
9715
10064
|
const target = animation.effect.target;
|
|
@@ -9720,13 +10069,13 @@ var init_freeze_animations = __esm({
|
|
|
9720
10069
|
}
|
|
9721
10070
|
}
|
|
9722
10071
|
}
|
|
9723
|
-
|
|
9724
|
-
animation.finish();
|
|
9725
|
-
} catch {
|
|
9726
|
-
}
|
|
10072
|
+
animations.push(animation);
|
|
9727
10073
|
}
|
|
10074
|
+
finishAnimations(animations);
|
|
9728
10075
|
globalAnimationStyleElement.remove();
|
|
9729
10076
|
globalAnimationStyleElement = null;
|
|
10077
|
+
resumeSvgAnimations(globalFrozenSvgElements);
|
|
10078
|
+
globalFrozenSvgElements = [];
|
|
9730
10079
|
unfreezeGsap();
|
|
9731
10080
|
};
|
|
9732
10081
|
}
|
|
@@ -9840,7 +10189,6 @@ var init_get_element_at_position = __esm({
|
|
|
9840
10189
|
init_is_valid_grabbable_element();
|
|
9841
10190
|
init_constants();
|
|
9842
10191
|
init_freeze_pseudo_states();
|
|
9843
|
-
init_create_element_bounds();
|
|
9844
10192
|
cache = null;
|
|
9845
10193
|
resumeTimerId = null;
|
|
9846
10194
|
scheduleResume = () => {
|
|
@@ -9899,9 +10247,6 @@ var init_get_element_at_position = __esm({
|
|
|
9899
10247
|
}
|
|
9900
10248
|
}
|
|
9901
10249
|
}
|
|
9902
|
-
if (result) {
|
|
9903
|
-
createElementBounds(result);
|
|
9904
|
-
}
|
|
9905
10250
|
scheduleResume();
|
|
9906
10251
|
cache = { clientX, clientY, element: result, timestamp: now };
|
|
9907
10252
|
return result;
|
|
@@ -9915,13 +10260,13 @@ var init_get_element_at_position = __esm({
|
|
|
9915
10260
|
});
|
|
9916
10261
|
|
|
9917
10262
|
// 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,
|
|
10263
|
+
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
10264
|
var init_freeze_pseudo_states = __esm({
|
|
9920
10265
|
"src/utils/freeze-pseudo-states.ts"() {
|
|
9921
10266
|
"use strict";
|
|
9922
10267
|
init_get_element_at_position();
|
|
9923
10268
|
init_create_style_element();
|
|
9924
|
-
POINTER_EVENTS_STYLES = "
|
|
10269
|
+
POINTER_EVENTS_STYLES = "html { pointer-events: none !important; }";
|
|
9925
10270
|
MOUSE_EVENTS_TO_BLOCK = [
|
|
9926
10271
|
"mouseenter",
|
|
9927
10272
|
"mouseleave",
|
|
@@ -9960,80 +10305,62 @@ var init_freeze_pseudo_states = __esm({
|
|
|
9960
10305
|
"ring-color",
|
|
9961
10306
|
"ring-width"
|
|
9962
10307
|
];
|
|
9963
|
-
ANIMATION_CONTROLLED_PROPERTIES = [
|
|
9964
|
-
"opacity",
|
|
9965
|
-
"transform",
|
|
9966
|
-
"scale",
|
|
9967
|
-
"translate",
|
|
9968
|
-
"rotate"
|
|
9969
|
-
];
|
|
9970
10308
|
frozenHoverElements = /* @__PURE__ */ new Map();
|
|
9971
10309
|
frozenFocusElements = /* @__PURE__ */ new Map();
|
|
9972
10310
|
pointerEventsStyle = null;
|
|
9973
10311
|
stopEvent = (event) => {
|
|
9974
|
-
event.stopPropagation();
|
|
9975
10312
|
event.stopImmediatePropagation();
|
|
9976
10313
|
};
|
|
9977
10314
|
preventFocusChange = (event) => {
|
|
9978
10315
|
event.preventDefault();
|
|
9979
|
-
event.stopPropagation();
|
|
9980
10316
|
event.stopImmediatePropagation();
|
|
9981
10317
|
};
|
|
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
|
-
}
|
|
10318
|
+
collectOriginalPropertyValues = (element, properties) => {
|
|
10319
|
+
const originalPropertyValues = /* @__PURE__ */ new Map();
|
|
10320
|
+
for (const prop of properties) {
|
|
10321
|
+
const inlineValue = element.style.getPropertyValue(prop);
|
|
10322
|
+
if (inlineValue) {
|
|
10323
|
+
originalPropertyValues.set(prop, inlineValue);
|
|
10000
10324
|
}
|
|
10001
|
-
elementsToFreeze.push({ element, originalCssText, frozenStyles });
|
|
10002
10325
|
}
|
|
10003
|
-
return
|
|
10326
|
+
return originalPropertyValues;
|
|
10004
10327
|
};
|
|
10005
|
-
|
|
10328
|
+
collectPseudoStates = (selector, properties, alreadyFrozen) => {
|
|
10006
10329
|
const elementsToFreeze = [];
|
|
10007
|
-
for (const element of document.querySelectorAll(
|
|
10330
|
+
for (const element of document.querySelectorAll(selector)) {
|
|
10008
10331
|
if (!(element instanceof HTMLElement)) continue;
|
|
10009
|
-
if (
|
|
10010
|
-
const originalCssText = element.style.cssText;
|
|
10332
|
+
if (alreadyFrozen?.has(element)) continue;
|
|
10011
10333
|
const computed = getComputedStyle(element);
|
|
10012
|
-
let frozenStyles =
|
|
10013
|
-
|
|
10334
|
+
let frozenStyles = element.style.cssText;
|
|
10335
|
+
const originalPropertyValues = collectOriginalPropertyValues(
|
|
10336
|
+
element,
|
|
10337
|
+
properties
|
|
10338
|
+
);
|
|
10339
|
+
for (const prop of properties) {
|
|
10014
10340
|
const computedValue = computed.getPropertyValue(prop);
|
|
10015
10341
|
if (computedValue) {
|
|
10016
10342
|
frozenStyles += `${prop}: ${computedValue} !important; `;
|
|
10017
10343
|
}
|
|
10018
10344
|
}
|
|
10019
|
-
elementsToFreeze.push({ element,
|
|
10345
|
+
elementsToFreeze.push({ element, frozenStyles, originalPropertyValues });
|
|
10020
10346
|
}
|
|
10021
10347
|
return elementsToFreeze;
|
|
10022
10348
|
};
|
|
10023
10349
|
applyFrozenStates = (states, storageMap) => {
|
|
10024
|
-
for (const { element,
|
|
10025
|
-
storageMap.set(element,
|
|
10350
|
+
for (const { element, frozenStyles, originalPropertyValues } of states) {
|
|
10351
|
+
storageMap.set(element, originalPropertyValues);
|
|
10026
10352
|
element.style.cssText = frozenStyles;
|
|
10027
10353
|
}
|
|
10028
10354
|
};
|
|
10029
10355
|
restoreFrozenStates = (storageMap, styleProperties) => {
|
|
10030
|
-
for (const [element,
|
|
10031
|
-
|
|
10032
|
-
|
|
10356
|
+
for (const [element, originalPropertyValues] of storageMap) {
|
|
10357
|
+
for (const prop of styleProperties) {
|
|
10358
|
+
const originalValue = originalPropertyValues.get(prop);
|
|
10359
|
+
if (originalValue) {
|
|
10360
|
+
element.style.setProperty(prop, originalValue);
|
|
10361
|
+
} else {
|
|
10033
10362
|
element.style.removeProperty(prop);
|
|
10034
10363
|
}
|
|
10035
|
-
} else {
|
|
10036
|
-
element.style.cssText = originalCssText;
|
|
10037
10364
|
}
|
|
10038
10365
|
}
|
|
10039
10366
|
storageMap.clear();
|
|
@@ -10052,8 +10379,12 @@ var init_freeze_pseudo_states = __esm({
|
|
|
10052
10379
|
for (const eventType of FOCUS_EVENTS_TO_BLOCK) {
|
|
10053
10380
|
document.addEventListener(eventType, preventFocusChange, true);
|
|
10054
10381
|
}
|
|
10055
|
-
const hoverStates =
|
|
10056
|
-
const focusStates =
|
|
10382
|
+
const hoverStates = collectPseudoStates(":hover", HOVER_STYLE_PROPERTIES);
|
|
10383
|
+
const focusStates = collectPseudoStates(
|
|
10384
|
+
":focus, :focus-visible",
|
|
10385
|
+
FOCUS_STYLE_PROPERTIES,
|
|
10386
|
+
frozenFocusElements
|
|
10387
|
+
);
|
|
10057
10388
|
applyFrozenStates(hoverStates, frozenHoverElements);
|
|
10058
10389
|
applyFrozenStates(focusStates, frozenFocusElements);
|
|
10059
10390
|
pointerEventsStyle = createStyleElement(
|
|
@@ -10078,7 +10409,7 @@ var init_freeze_pseudo_states = __esm({
|
|
|
10078
10409
|
});
|
|
10079
10410
|
|
|
10080
10411
|
// src/components/tooltip.tsx
|
|
10081
|
-
var _tmpl$
|
|
10412
|
+
var _tmpl$28, tooltipCloseTimestamp, wasTooltipRecentlyVisible, Tooltip;
|
|
10082
10413
|
var init_tooltip = __esm({
|
|
10083
10414
|
"src/components/tooltip.tsx"() {
|
|
10084
10415
|
"use strict";
|
|
@@ -10090,7 +10421,7 @@ var init_tooltip = __esm({
|
|
|
10090
10421
|
init_solid();
|
|
10091
10422
|
init_cn();
|
|
10092
10423
|
init_constants();
|
|
10093
|
-
_tmpl$
|
|
10424
|
+
_tmpl$28 = /* @__PURE__ */ template(`<div style=z-index:2147483647>`);
|
|
10094
10425
|
tooltipCloseTimestamp = 0;
|
|
10095
10426
|
wasTooltipRecentlyVisible = () => {
|
|
10096
10427
|
return Date.now() - tooltipCloseTimestamp < TOOLTIP_GRACE_PERIOD_MS;
|
|
@@ -10134,7 +10465,7 @@ var init_tooltip = __esm({
|
|
|
10134
10465
|
return delayedVisible();
|
|
10135
10466
|
},
|
|
10136
10467
|
get children() {
|
|
10137
|
-
var _el$ = _tmpl$
|
|
10468
|
+
var _el$ = _tmpl$28();
|
|
10138
10469
|
insert(_el$, () => props.children);
|
|
10139
10470
|
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
10471
|
return _el$;
|
|
@@ -10163,7 +10494,7 @@ var init_toolbar_layout = __esm({
|
|
|
10163
10494
|
});
|
|
10164
10495
|
|
|
10165
10496
|
// src/components/toolbar/index.tsx
|
|
10166
|
-
var _tmpl$
|
|
10497
|
+
var _tmpl$29, _tmpl$210, _tmpl$36, Toolbar;
|
|
10167
10498
|
var init_toolbar = __esm({
|
|
10168
10499
|
"src/components/toolbar/index.tsx"() {
|
|
10169
10500
|
"use strict";
|
|
@@ -10179,6 +10510,7 @@ var init_toolbar = __esm({
|
|
|
10179
10510
|
init_web();
|
|
10180
10511
|
init_web();
|
|
10181
10512
|
init_web();
|
|
10513
|
+
init_web();
|
|
10182
10514
|
init_solid();
|
|
10183
10515
|
init_cn();
|
|
10184
10516
|
init_format_shortcut();
|
|
@@ -10196,9 +10528,9 @@ var init_toolbar = __esm({
|
|
|
10196
10528
|
init_tooltip();
|
|
10197
10529
|
init_toolbar_layout();
|
|
10198
10530
|
init_native_raf();
|
|
10199
|
-
_tmpl$
|
|
10200
|
-
_tmpl$
|
|
10201
|
-
_tmpl$
|
|
10531
|
+
_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]">`);
|
|
10532
|
+
_tmpl$210 = /* @__PURE__ */ template(`<div style=z-index:2147483647>Enable to continue`);
|
|
10533
|
+
_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
10534
|
Toolbar = (props) => {
|
|
10203
10535
|
let containerRef;
|
|
10204
10536
|
let expandableButtonsRef;
|
|
@@ -10304,7 +10636,6 @@ var init_toolbar = __esm({
|
|
|
10304
10636
|
return `left-1/2 -translate-x-1/2 ${placementClass}`;
|
|
10305
10637
|
};
|
|
10306
10638
|
const stopEventPropagation = (event) => {
|
|
10307
|
-
event.stopPropagation();
|
|
10308
10639
|
event.stopImmediatePropagation();
|
|
10309
10640
|
};
|
|
10310
10641
|
const createFreezeHandlers = (setTooltipVisible, options) => ({
|
|
@@ -10573,7 +10904,6 @@ var init_toolbar = __esm({
|
|
|
10573
10904
|
};
|
|
10574
10905
|
let didDragOccur = false;
|
|
10575
10906
|
const createDragAwareHandler = (callback) => (event) => {
|
|
10576
|
-
event.stopPropagation();
|
|
10577
10907
|
event.stopImmediatePropagation();
|
|
10578
10908
|
if (didDragOccur) {
|
|
10579
10909
|
didDragOccur = false;
|
|
@@ -11138,9 +11468,9 @@ var init_toolbar = __esm({
|
|
|
11138
11468
|
}
|
|
11139
11469
|
};
|
|
11140
11470
|
return (() => {
|
|
11141
|
-
var _el$ = _tmpl$
|
|
11471
|
+
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
11472
|
_el$.addEventListener("mouseleave", () => props.onSelectHoverChange?.(false));
|
|
11143
|
-
_el$.addEventListener("mouseenter", () => props.onSelectHoverChange?.(true));
|
|
11473
|
+
_el$.addEventListener("mouseenter", () => !isCollapsed() && props.onSelectHoverChange?.(true));
|
|
11144
11474
|
_el$.$$pointerdown = handlePointerDown;
|
|
11145
11475
|
var _ref$ = containerRef;
|
|
11146
11476
|
typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
|
|
@@ -11182,6 +11512,12 @@ var init_toolbar = __esm({
|
|
|
11182
11512
|
handlePointerDown(event);
|
|
11183
11513
|
});
|
|
11184
11514
|
spread(_el$8, mergeProps({
|
|
11515
|
+
get ["aria-label"]() {
|
|
11516
|
+
return props.isActive ? "Stop selecting element" : "Select element";
|
|
11517
|
+
},
|
|
11518
|
+
get ["aria-pressed"]() {
|
|
11519
|
+
return Boolean(props.isActive);
|
|
11520
|
+
},
|
|
11185
11521
|
get ["class"]() {
|
|
11186
11522
|
return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
|
|
11187
11523
|
}
|
|
@@ -11213,6 +11549,12 @@ var init_toolbar = __esm({
|
|
|
11213
11549
|
handlePointerDown(event);
|
|
11214
11550
|
});
|
|
11215
11551
|
spread(_el$1, mergeProps({
|
|
11552
|
+
get ["aria-label"]() {
|
|
11553
|
+
return `Open history${(props.historyItemCount ?? 0) > 0 ? ` (${props.historyItemCount ?? 0} items)` : ""}`;
|
|
11554
|
+
},
|
|
11555
|
+
get ["aria-expanded"]() {
|
|
11556
|
+
return Boolean(props.isHistoryDropdownOpen);
|
|
11557
|
+
},
|
|
11216
11558
|
get ["class"]() {
|
|
11217
11559
|
return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
|
|
11218
11560
|
}
|
|
@@ -11237,7 +11579,7 @@ var init_toolbar = __esm({
|
|
|
11237
11579
|
return props.hasUnreadHistoryItems;
|
|
11238
11580
|
},
|
|
11239
11581
|
get children() {
|
|
11240
|
-
return _tmpl$
|
|
11582
|
+
return _tmpl$29();
|
|
11241
11583
|
}
|
|
11242
11584
|
}), null);
|
|
11243
11585
|
insert(_el$0, createComponent(Tooltip, {
|
|
@@ -11292,6 +11634,12 @@ var init_toolbar = __esm({
|
|
|
11292
11634
|
handlePointerDown(event);
|
|
11293
11635
|
});
|
|
11294
11636
|
spread(_el$17, mergeProps({
|
|
11637
|
+
get ["aria-label"]() {
|
|
11638
|
+
return props.isMenuOpen ? "Close more actions menu" : "Open more actions menu";
|
|
11639
|
+
},
|
|
11640
|
+
get ["aria-expanded"]() {
|
|
11641
|
+
return Boolean(props.isMenuOpen);
|
|
11642
|
+
},
|
|
11295
11643
|
get ["class"]() {
|
|
11296
11644
|
return cn("contain-layout flex items-center justify-center cursor-pointer interactive-scale touch-hitbox", buttonSpacingClass(), hitboxConstraintClass());
|
|
11297
11645
|
}
|
|
@@ -11345,13 +11693,13 @@ var init_toolbar = __esm({
|
|
|
11345
11693
|
return isShakeTooltipVisible();
|
|
11346
11694
|
},
|
|
11347
11695
|
get children() {
|
|
11348
|
-
var _el$23 = _tmpl$
|
|
11696
|
+
var _el$23 = _tmpl$210();
|
|
11349
11697
|
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
11698
|
return _el$23;
|
|
11351
11699
|
}
|
|
11352
11700
|
}), null);
|
|
11353
11701
|
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$
|
|
11702
|
+
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
11703
|
_v$ !== _p$.e && className(_el$, _p$.e = _v$);
|
|
11356
11704
|
_v$2 !== _p$.t && setStyleProperty(_el$, "transform", _p$.t = _v$2);
|
|
11357
11705
|
_v$3 !== _p$.a && setStyleProperty(_el$, "transform-origin", _p$.a = _v$3);
|
|
@@ -11368,9 +11716,12 @@ var init_toolbar = __esm({
|
|
|
11368
11716
|
_v$12 !== _p$.w && className(_el$13, _p$.w = _v$12);
|
|
11369
11717
|
_v$13 !== _p$.m && className(_el$15, _p$.m = _v$13);
|
|
11370
11718
|
_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$
|
|
11719
|
+
_v$15 !== _p$.y && setAttribute(_el$19, "aria-label", _p$.y = _v$15);
|
|
11720
|
+
_v$16 !== _p$.g && setAttribute(_el$19, "aria-pressed", _p$.g = _v$16);
|
|
11721
|
+
_v$17 !== _p$.p && className(_el$19, _p$.p = _v$17);
|
|
11722
|
+
_v$18 !== _p$.b && className(_el$20, _p$.b = _v$18);
|
|
11723
|
+
_v$19 !== _p$.T && className(_el$21, _p$.T = _v$19);
|
|
11724
|
+
_v$20 !== _p$.A && setAttribute(_el$22, "aria-label", _p$.A = _v$20);
|
|
11374
11725
|
return _p$;
|
|
11375
11726
|
}, {
|
|
11376
11727
|
e: void 0,
|
|
@@ -11391,7 +11742,10 @@ var init_toolbar = __esm({
|
|
|
11391
11742
|
f: void 0,
|
|
11392
11743
|
y: void 0,
|
|
11393
11744
|
g: void 0,
|
|
11394
|
-
p: void 0
|
|
11745
|
+
p: void 0,
|
|
11746
|
+
b: void 0,
|
|
11747
|
+
T: void 0,
|
|
11748
|
+
A: void 0
|
|
11395
11749
|
});
|
|
11396
11750
|
return _el$;
|
|
11397
11751
|
})();
|
|
@@ -11409,6 +11763,52 @@ var init_clamp_to_viewport = __esm({
|
|
|
11409
11763
|
}
|
|
11410
11764
|
});
|
|
11411
11765
|
|
|
11766
|
+
// src/utils/get-anchored-dropdown-position.ts
|
|
11767
|
+
var getAnchoredDropdownPosition;
|
|
11768
|
+
var init_get_anchored_dropdown_position = __esm({
|
|
11769
|
+
"src/utils/get-anchored-dropdown-position.ts"() {
|
|
11770
|
+
"use strict";
|
|
11771
|
+
init_clamp_to_viewport();
|
|
11772
|
+
getAnchoredDropdownPosition = ({
|
|
11773
|
+
anchor,
|
|
11774
|
+
measuredWidth,
|
|
11775
|
+
measuredHeight,
|
|
11776
|
+
viewportWidth,
|
|
11777
|
+
viewportHeight,
|
|
11778
|
+
anchorGapPx,
|
|
11779
|
+
viewportPaddingPx,
|
|
11780
|
+
offscreenPosition
|
|
11781
|
+
}) => {
|
|
11782
|
+
if (!anchor || measuredWidth === 0 || measuredHeight === 0) {
|
|
11783
|
+
return offscreenPosition;
|
|
11784
|
+
}
|
|
11785
|
+
let rawLeft;
|
|
11786
|
+
let rawTop;
|
|
11787
|
+
if (anchor.edge === "left" || anchor.edge === "right") {
|
|
11788
|
+
rawLeft = anchor.edge === "left" ? anchor.x + anchorGapPx : anchor.x - measuredWidth - anchorGapPx;
|
|
11789
|
+
rawTop = anchor.y - measuredHeight / 2;
|
|
11790
|
+
} else {
|
|
11791
|
+
rawLeft = anchor.x - measuredWidth / 2;
|
|
11792
|
+
rawTop = anchor.edge === "top" ? anchor.y + anchorGapPx : anchor.y - measuredHeight - anchorGapPx;
|
|
11793
|
+
}
|
|
11794
|
+
return {
|
|
11795
|
+
left: clampToViewport(
|
|
11796
|
+
rawLeft,
|
|
11797
|
+
measuredWidth,
|
|
11798
|
+
viewportWidth,
|
|
11799
|
+
viewportPaddingPx
|
|
11800
|
+
),
|
|
11801
|
+
top: clampToViewport(
|
|
11802
|
+
rawTop,
|
|
11803
|
+
measuredHeight,
|
|
11804
|
+
viewportHeight,
|
|
11805
|
+
viewportPaddingPx
|
|
11806
|
+
)
|
|
11807
|
+
};
|
|
11808
|
+
};
|
|
11809
|
+
}
|
|
11810
|
+
});
|
|
11811
|
+
|
|
11412
11812
|
// src/utils/is-event-from-overlay.ts
|
|
11413
11813
|
var isEventFromOverlay;
|
|
11414
11814
|
var init_is_event_from_overlay = __esm({
|
|
@@ -11447,7 +11847,7 @@ var init_resolve_action_enabled = __esm({
|
|
|
11447
11847
|
});
|
|
11448
11848
|
|
|
11449
11849
|
// src/components/toolbar/toolbar-menu.tsx
|
|
11450
|
-
var _tmpl$
|
|
11850
|
+
var _tmpl$30, _tmpl$211, _tmpl$37, _tmpl$44, ToolbarMenu;
|
|
11451
11851
|
var init_toolbar_menu = __esm({
|
|
11452
11852
|
"src/components/toolbar/toolbar-menu.tsx"() {
|
|
11453
11853
|
"use strict";
|
|
@@ -11461,26 +11861,34 @@ var init_toolbar_menu = __esm({
|
|
|
11461
11861
|
init_web();
|
|
11462
11862
|
init_web();
|
|
11463
11863
|
init_web();
|
|
11864
|
+
init_web();
|
|
11464
11865
|
init_solid();
|
|
11465
11866
|
init_constants();
|
|
11466
|
-
|
|
11867
|
+
init_get_anchored_dropdown_position();
|
|
11467
11868
|
init_cn();
|
|
11468
11869
|
init_format_shortcut();
|
|
11469
11870
|
init_is_event_from_overlay();
|
|
11470
11871
|
init_resolve_action_enabled();
|
|
11471
11872
|
init_native_raf();
|
|
11472
|
-
|
|
11473
|
-
_tmpl$
|
|
11474
|
-
_tmpl$
|
|
11873
|
+
init_create_menu_highlight();
|
|
11874
|
+
_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">`);
|
|
11875
|
+
_tmpl$211 = /* @__PURE__ */ template(`<div><div>`);
|
|
11876
|
+
_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
11877
|
_tmpl$44 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
|
|
11476
11878
|
ToolbarMenu = (props) => {
|
|
11477
11879
|
let containerRef;
|
|
11880
|
+
const {
|
|
11881
|
+
containerRef: highlightContainerRef,
|
|
11882
|
+
highlightRef,
|
|
11883
|
+
updateHighlight,
|
|
11884
|
+
clearHighlight
|
|
11885
|
+
} = createMenuHighlight();
|
|
11478
11886
|
const [measuredWidth, setMeasuredWidth] = createSignal(0);
|
|
11479
11887
|
const [measuredHeight, setMeasuredHeight] = createSignal(0);
|
|
11480
11888
|
const [shouldMount, setShouldMount] = createSignal(false);
|
|
11481
11889
|
const [isAnimatedIn, setIsAnimatedIn] = createSignal(false);
|
|
11482
11890
|
const [lastAnchorEdge, setLastAnchorEdge] = createSignal("bottom");
|
|
11483
|
-
const [
|
|
11891
|
+
const [toggleRefreshCounter, setToggleRefreshCounter] = createSignal(0);
|
|
11484
11892
|
let exitAnimationTimeout;
|
|
11485
11893
|
let enterAnimationFrameId;
|
|
11486
11894
|
const measureContainer = () => {
|
|
@@ -11509,32 +11917,17 @@ var init_toolbar_menu = __esm({
|
|
|
11509
11917
|
}, DROPDOWN_ANIMATION_DURATION_MS);
|
|
11510
11918
|
}
|
|
11511
11919
|
});
|
|
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
11920
|
const displayPosition = createMemo((previousPosition) => {
|
|
11537
|
-
const position =
|
|
11921
|
+
const position = getAnchoredDropdownPosition({
|
|
11922
|
+
anchor: props.position,
|
|
11923
|
+
measuredWidth: measuredWidth(),
|
|
11924
|
+
measuredHeight: measuredHeight(),
|
|
11925
|
+
viewportWidth: window.innerWidth,
|
|
11926
|
+
viewportHeight: window.innerHeight,
|
|
11927
|
+
anchorGapPx: DROPDOWN_ANCHOR_GAP_PX,
|
|
11928
|
+
viewportPaddingPx: DROPDOWN_VIEWPORT_PADDING_PX,
|
|
11929
|
+
offscreenPosition: DROPDOWN_OFFSCREEN_POSITION
|
|
11930
|
+
});
|
|
11538
11931
|
if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
|
|
11539
11932
|
return position;
|
|
11540
11933
|
}
|
|
@@ -11551,7 +11944,7 @@ var init_toolbar_menu = __esm({
|
|
|
11551
11944
|
if (!resolveToolbarActionEnabled(action)) return;
|
|
11552
11945
|
action.onAction();
|
|
11553
11946
|
if (action.isActive !== void 0) {
|
|
11554
|
-
|
|
11947
|
+
setToggleRefreshCounter((previous) => previous + 1);
|
|
11555
11948
|
} else {
|
|
11556
11949
|
props.onDismiss();
|
|
11557
11950
|
}
|
|
@@ -11601,7 +11994,7 @@ var init_toolbar_menu = __esm({
|
|
|
11601
11994
|
return shouldMount();
|
|
11602
11995
|
},
|
|
11603
11996
|
get children() {
|
|
11604
|
-
var _el$ = _tmpl$
|
|
11997
|
+
var _el$ = _tmpl$30(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild, _el$4 = _el$3.firstChild;
|
|
11605
11998
|
_el$.$$contextmenu = handleMenuEvent;
|
|
11606
11999
|
_el$.$$click = handleMenuEvent;
|
|
11607
12000
|
_el$.$$mousedown = handleMenuEvent;
|
|
@@ -11609,6 +12002,8 @@ var init_toolbar_menu = __esm({
|
|
|
11609
12002
|
var _ref$ = containerRef;
|
|
11610
12003
|
typeof _ref$ === "function" ? use(_ref$, _el$) : containerRef = _el$;
|
|
11611
12004
|
setStyleProperty(_el$2, "min-width", `${TOOLBAR_MENU_MIN_WIDTH_PX}px`);
|
|
12005
|
+
use(highlightContainerRef, _el$3);
|
|
12006
|
+
use(highlightRef, _el$4);
|
|
11612
12007
|
insert(_el$3, createComponent(For, {
|
|
11613
12008
|
get each() {
|
|
11614
12009
|
return props.actions;
|
|
@@ -11617,55 +12012,61 @@ var init_toolbar_menu = __esm({
|
|
|
11617
12012
|
const isEnabled = () => resolveToolbarActionEnabled(action);
|
|
11618
12013
|
const isToggle = () => action.isActive !== void 0;
|
|
11619
12014
|
const toggleActive = () => {
|
|
11620
|
-
void
|
|
12015
|
+
void toggleRefreshCounter();
|
|
11621
12016
|
return Boolean(action.isActive?.());
|
|
11622
12017
|
};
|
|
11623
12018
|
return (() => {
|
|
11624
|
-
var _el$
|
|
11625
|
-
_el$
|
|
11626
|
-
_el$
|
|
11627
|
-
|
|
11628
|
-
|
|
12019
|
+
var _el$5 = _tmpl$37(), _el$6 = _el$5.firstChild;
|
|
12020
|
+
_el$5.$$click = (event) => handleActionClick(action, event);
|
|
12021
|
+
addEventListener(_el$5, "pointerleave", clearHighlight);
|
|
12022
|
+
_el$5.addEventListener("pointerenter", (event) => {
|
|
12023
|
+
if (isEnabled()) {
|
|
12024
|
+
updateHighlight(event.currentTarget);
|
|
12025
|
+
}
|
|
12026
|
+
});
|
|
12027
|
+
_el$5.$$pointerdown = (event) => event.stopPropagation();
|
|
12028
|
+
insert(_el$6, () => action.label);
|
|
12029
|
+
insert(_el$5, createComponent(Show, {
|
|
11629
12030
|
get when() {
|
|
11630
12031
|
return memo(() => !!!isToggle())() && action.shortcut;
|
|
11631
12032
|
},
|
|
11632
12033
|
children: (shortcutKey) => (() => {
|
|
11633
|
-
var _el$
|
|
11634
|
-
insert(_el$
|
|
11635
|
-
return _el$
|
|
12034
|
+
var _el$9 = _tmpl$44();
|
|
12035
|
+
insert(_el$9, () => formatShortcut(shortcutKey()));
|
|
12036
|
+
return _el$9;
|
|
11636
12037
|
})()
|
|
11637
12038
|
}), null);
|
|
11638
|
-
insert(_el$
|
|
12039
|
+
insert(_el$5, createComponent(Show, {
|
|
11639
12040
|
get when() {
|
|
11640
12041
|
return isToggle();
|
|
11641
12042
|
},
|
|
11642
12043
|
get children() {
|
|
11643
|
-
var _el$
|
|
12044
|
+
var _el$7 = _tmpl$211(), _el$8 = _el$7.firstChild;
|
|
11644
12045
|
createRenderEffect((_p$) => {
|
|
11645
12046
|
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$
|
|
12047
|
+
_v$8 !== _p$.e && className(_el$7, _p$.e = _v$8);
|
|
12048
|
+
_v$9 !== _p$.t && className(_el$8, _p$.t = _v$9);
|
|
11648
12049
|
return _p$;
|
|
11649
12050
|
}, {
|
|
11650
12051
|
e: void 0,
|
|
11651
12052
|
t: void 0
|
|
11652
12053
|
});
|
|
11653
|
-
return _el$
|
|
12054
|
+
return _el$7;
|
|
11654
12055
|
}
|
|
11655
12056
|
}), null);
|
|
11656
12057
|
createRenderEffect((_p$) => {
|
|
11657
12058
|
var _v$0 = action.id, _v$1 = !isEnabled();
|
|
11658
|
-
_v$0 !== _p$.e && setAttribute(_el$
|
|
11659
|
-
_v$1 !== _p$.t && (_el$
|
|
12059
|
+
_v$0 !== _p$.e && setAttribute(_el$5, "data-react-grab-menu-item", _p$.e = _v$0);
|
|
12060
|
+
_v$1 !== _p$.t && (_el$5.disabled = _p$.t = _v$1);
|
|
11660
12061
|
return _p$;
|
|
11661
12062
|
}, {
|
|
11662
12063
|
e: void 0,
|
|
11663
12064
|
t: void 0
|
|
11664
12065
|
});
|
|
11665
|
-
return _el$
|
|
12066
|
+
return _el$5;
|
|
11666
12067
|
})();
|
|
11667
12068
|
}
|
|
11668
|
-
}));
|
|
12069
|
+
}), null);
|
|
11669
12070
|
createRenderEffect((_p$) => {
|
|
11670
12071
|
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
12072
|
_v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
|
|
@@ -11694,7 +12095,7 @@ var init_toolbar_menu = __esm({
|
|
|
11694
12095
|
});
|
|
11695
12096
|
|
|
11696
12097
|
// src/components/context-menu.tsx
|
|
11697
|
-
var _tmpl$
|
|
12098
|
+
var _tmpl$31, _tmpl$212, _tmpl$38, _tmpl$45, ContextMenu;
|
|
11698
12099
|
var init_context_menu = __esm({
|
|
11699
12100
|
"src/components/context-menu.tsx"() {
|
|
11700
12101
|
"use strict";
|
|
@@ -11707,6 +12108,7 @@ var init_context_menu = __esm({
|
|
|
11707
12108
|
init_web();
|
|
11708
12109
|
init_web();
|
|
11709
12110
|
init_web();
|
|
12111
|
+
init_web();
|
|
11710
12112
|
init_solid();
|
|
11711
12113
|
init_constants();
|
|
11712
12114
|
init_cn();
|
|
@@ -11718,12 +12120,19 @@ var init_context_menu = __esm({
|
|
|
11718
12120
|
init_resolve_action_enabled();
|
|
11719
12121
|
init_is_event_from_overlay();
|
|
11720
12122
|
init_native_raf();
|
|
11721
|
-
|
|
11722
|
-
_tmpl$
|
|
11723
|
-
_tmpl$
|
|
11724
|
-
_tmpl$
|
|
12123
|
+
init_create_menu_highlight();
|
|
12124
|
+
_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">`);
|
|
12125
|
+
_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">`);
|
|
12126
|
+
_tmpl$38 = /* @__PURE__ */ template(`<span class="text-[11px] font-sans text-black/50 ml-4">`);
|
|
12127
|
+
_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
12128
|
ContextMenu = (props) => {
|
|
11726
12129
|
let containerRef;
|
|
12130
|
+
const {
|
|
12131
|
+
containerRef: highlightContainerRef,
|
|
12132
|
+
highlightRef,
|
|
12133
|
+
updateHighlight,
|
|
12134
|
+
clearHighlight
|
|
12135
|
+
} = createMenuHighlight();
|
|
11727
12136
|
const [measuredWidth, setMeasuredWidth] = createSignal(0);
|
|
11728
12137
|
const [measuredHeight, setMeasuredHeight] = createSignal(0);
|
|
11729
12138
|
const isVisible = () => props.position !== null;
|
|
@@ -11878,7 +12287,7 @@ var init_context_menu = __esm({
|
|
|
11878
12287
|
return isVisible();
|
|
11879
12288
|
},
|
|
11880
12289
|
get children() {
|
|
11881
|
-
var _el$ = _tmpl$
|
|
12290
|
+
var _el$ = _tmpl$212(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
11882
12291
|
_el$.$$contextmenu = handleMenuEvent;
|
|
11883
12292
|
_el$.$$click = handleMenuEvent;
|
|
11884
12293
|
_el$.$$mousedown = handleMenuEvent;
|
|
@@ -11918,38 +12327,46 @@ var init_context_menu = __esm({
|
|
|
11918
12327
|
}));
|
|
11919
12328
|
insert(_el$2, createComponent(BottomSection, {
|
|
11920
12329
|
get children() {
|
|
11921
|
-
var _el$4 = _tmpl$
|
|
12330
|
+
var _el$4 = _tmpl$31(), _el$5 = _el$4.firstChild;
|
|
12331
|
+
use(highlightContainerRef, _el$4);
|
|
12332
|
+
use(highlightRef, _el$5);
|
|
11922
12333
|
insert(_el$4, createComponent(For, {
|
|
11923
12334
|
get each() {
|
|
11924
12335
|
return menuItems();
|
|
11925
12336
|
},
|
|
11926
12337
|
children: (item) => (() => {
|
|
11927
|
-
var _el$
|
|
11928
|
-
_el$
|
|
11929
|
-
_el$
|
|
11930
|
-
|
|
11931
|
-
|
|
12338
|
+
var _el$6 = _tmpl$45(), _el$7 = _el$6.firstChild;
|
|
12339
|
+
_el$6.$$click = (event) => handleAction(item, event);
|
|
12340
|
+
addEventListener(_el$6, "pointerleave", clearHighlight);
|
|
12341
|
+
_el$6.addEventListener("pointerenter", (event) => {
|
|
12342
|
+
if (item.enabled) {
|
|
12343
|
+
updateHighlight(event.currentTarget);
|
|
12344
|
+
}
|
|
12345
|
+
});
|
|
12346
|
+
_el$6.$$pointerdown = (event) => event.stopPropagation();
|
|
12347
|
+
insert(_el$7, () => item.label);
|
|
12348
|
+
insert(_el$6, createComponent(Show, {
|
|
11932
12349
|
get when() {
|
|
11933
12350
|
return item.shortcut;
|
|
11934
12351
|
},
|
|
11935
12352
|
get children() {
|
|
11936
|
-
var _el$
|
|
11937
|
-
insert(_el$
|
|
11938
|
-
return _el$
|
|
12353
|
+
var _el$8 = _tmpl$38();
|
|
12354
|
+
insert(_el$8, () => formatShortcut(item.shortcut));
|
|
12355
|
+
return _el$8;
|
|
11939
12356
|
}
|
|
11940
12357
|
}), null);
|
|
11941
12358
|
createRenderEffect((_p$) => {
|
|
11942
12359
|
var _v$4 = item.label.toLowerCase(), _v$5 = !item.enabled;
|
|
11943
|
-
_v$4 !== _p$.e && setAttribute(_el$
|
|
11944
|
-
_v$5 !== _p$.t && (_el$
|
|
12360
|
+
_v$4 !== _p$.e && setAttribute(_el$6, "data-react-grab-menu-item", _p$.e = _v$4);
|
|
12361
|
+
_v$5 !== _p$.t && (_el$6.disabled = _p$.t = _v$5);
|
|
11945
12362
|
return _p$;
|
|
11946
12363
|
}, {
|
|
11947
12364
|
e: void 0,
|
|
11948
12365
|
t: void 0
|
|
11949
12366
|
});
|
|
11950
|
-
return _el$
|
|
12367
|
+
return _el$6;
|
|
11951
12368
|
})()
|
|
11952
|
-
}));
|
|
12369
|
+
}), null);
|
|
11953
12370
|
return _el$4;
|
|
11954
12371
|
}
|
|
11955
12372
|
}), null);
|
|
@@ -11973,18 +12390,18 @@ var init_context_menu = __esm({
|
|
|
11973
12390
|
});
|
|
11974
12391
|
|
|
11975
12392
|
// src/components/icons/icon-trash.tsx
|
|
11976
|
-
var _tmpl$
|
|
12393
|
+
var _tmpl$39, IconTrash;
|
|
11977
12394
|
var init_icon_trash = __esm({
|
|
11978
12395
|
"src/components/icons/icon-trash.tsx"() {
|
|
11979
12396
|
"use strict";
|
|
11980
12397
|
init_web();
|
|
11981
12398
|
init_web();
|
|
11982
12399
|
init_web();
|
|
11983
|
-
_tmpl$
|
|
12400
|
+
_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
12401
|
IconTrash = (props) => {
|
|
11985
12402
|
const size = () => props.size ?? 14;
|
|
11986
12403
|
return (() => {
|
|
11987
|
-
var _el$ = _tmpl$
|
|
12404
|
+
var _el$ = _tmpl$39();
|
|
11988
12405
|
createRenderEffect((_p$) => {
|
|
11989
12406
|
var _v$ = size(), _v$2 = size(), _v$3 = props.class;
|
|
11990
12407
|
_v$ !== _p$.e && setAttribute(_el$, "width", _p$.e = _v$);
|
|
@@ -12003,7 +12420,7 @@ var init_icon_trash = __esm({
|
|
|
12003
12420
|
});
|
|
12004
12421
|
|
|
12005
12422
|
// src/components/history-dropdown.tsx
|
|
12006
|
-
var _tmpl$
|
|
12423
|
+
var _tmpl$40, _tmpl$213, _tmpl$310, _tmpl$46, ITEM_ACTION_CLASS, formatRelativeTime, getHistoryItemDisplayName, HistoryDropdown;
|
|
12007
12424
|
var init_history_dropdown = __esm({
|
|
12008
12425
|
"src/components/history-dropdown.tsx"() {
|
|
12009
12426
|
"use strict";
|
|
@@ -12016,20 +12433,22 @@ var init_history_dropdown = __esm({
|
|
|
12016
12433
|
init_web();
|
|
12017
12434
|
init_web();
|
|
12018
12435
|
init_web();
|
|
12436
|
+
init_web();
|
|
12019
12437
|
init_solid();
|
|
12020
12438
|
init_constants();
|
|
12021
12439
|
init_safe_polygon();
|
|
12022
|
-
|
|
12440
|
+
init_get_anchored_dropdown_position();
|
|
12023
12441
|
init_cn();
|
|
12024
12442
|
init_icon_trash();
|
|
12025
12443
|
init_icon_copy();
|
|
12026
12444
|
init_icon_check();
|
|
12027
12445
|
init_tooltip();
|
|
12028
12446
|
init_native_raf();
|
|
12029
|
-
|
|
12030
|
-
_tmpl$
|
|
12031
|
-
_tmpl$
|
|
12032
|
-
_tmpl$
|
|
12447
|
+
init_create_menu_highlight();
|
|
12448
|
+
_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">`);
|
|
12449
|
+
_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">`);
|
|
12450
|
+
_tmpl$310 = /* @__PURE__ */ template(`<span class="text-[11px] leading-3 font-sans text-black/40 truncate mt-0.5">`);
|
|
12451
|
+
_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
12452
|
ITEM_ACTION_CLASS = "flex items-center justify-center cursor-pointer text-black/25 transition-colors press-scale";
|
|
12034
12453
|
formatRelativeTime = (timestamp) => {
|
|
12035
12454
|
const elapsedSeconds = Math.floor((Date.now() - timestamp) / 1e3);
|
|
@@ -12048,6 +12467,12 @@ var init_history_dropdown = __esm({
|
|
|
12048
12467
|
};
|
|
12049
12468
|
HistoryDropdown = (props) => {
|
|
12050
12469
|
let containerRef;
|
|
12470
|
+
const {
|
|
12471
|
+
containerRef: highlightContainerRef,
|
|
12472
|
+
highlightRef,
|
|
12473
|
+
updateHighlight,
|
|
12474
|
+
clearHighlight
|
|
12475
|
+
} = createMenuHighlight();
|
|
12051
12476
|
const safePolygonTracker = createSafePolygonTracker();
|
|
12052
12477
|
const getToolbarTargetRects = () => {
|
|
12053
12478
|
if (!containerRef) return null;
|
|
@@ -12107,32 +12532,17 @@ var init_history_dropdown = __esm({
|
|
|
12107
12532
|
}, {
|
|
12108
12533
|
defer: true
|
|
12109
12534
|
}));
|
|
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
12535
|
const displayPosition = createMemo((previousPosition) => {
|
|
12135
|
-
const position =
|
|
12536
|
+
const position = getAnchoredDropdownPosition({
|
|
12537
|
+
anchor: props.position,
|
|
12538
|
+
measuredWidth: measuredWidth(),
|
|
12539
|
+
measuredHeight: measuredHeight(),
|
|
12540
|
+
viewportWidth: window.innerWidth,
|
|
12541
|
+
viewportHeight: window.innerHeight,
|
|
12542
|
+
anchorGapPx: DROPDOWN_ANCHOR_GAP_PX,
|
|
12543
|
+
viewportPaddingPx: DROPDOWN_VIEWPORT_PADDING_PX,
|
|
12544
|
+
offscreenPosition: DROPDOWN_OFFSCREEN_POSITION
|
|
12545
|
+
});
|
|
12136
12546
|
if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
|
|
12137
12547
|
return position;
|
|
12138
12548
|
}
|
|
@@ -12176,7 +12586,7 @@ var init_history_dropdown = __esm({
|
|
|
12176
12586
|
return shouldMount();
|
|
12177
12587
|
},
|
|
12178
12588
|
get children() {
|
|
12179
|
-
var _el$ = _tmpl$
|
|
12589
|
+
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
12590
|
_el$.addEventListener("mouseleave", (event) => {
|
|
12181
12591
|
const targetRects = getToolbarTargetRects();
|
|
12182
12592
|
if (targetRects) {
|
|
@@ -12203,7 +12613,7 @@ var init_history_dropdown = __esm({
|
|
|
12203
12613
|
return props.items.length > 0;
|
|
12204
12614
|
},
|
|
12205
12615
|
get children() {
|
|
12206
|
-
var _el$5 = _tmpl$
|
|
12616
|
+
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
12617
|
_el$7.addEventListener("mouseleave", () => setActiveHeaderTooltip(null));
|
|
12208
12618
|
_el$7.addEventListener("mouseenter", () => setActiveHeaderTooltip("clear"));
|
|
12209
12619
|
_el$7.$$click = (event) => {
|
|
@@ -12267,26 +12677,34 @@ var init_history_dropdown = __esm({
|
|
|
12267
12677
|
return _el$5;
|
|
12268
12678
|
}
|
|
12269
12679
|
}), null);
|
|
12680
|
+
use(highlightContainerRef, _el$1);
|
|
12681
|
+
use(highlightRef, _el$10);
|
|
12270
12682
|
insert(_el$1, createComponent(For, {
|
|
12271
12683
|
get each() {
|
|
12272
12684
|
return props.items;
|
|
12273
12685
|
},
|
|
12274
12686
|
children: (item) => (() => {
|
|
12275
|
-
var _el$
|
|
12276
|
-
_el$
|
|
12277
|
-
_el$
|
|
12687
|
+
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;
|
|
12688
|
+
addEventListener(_el$11, "blur", clearHighlight);
|
|
12689
|
+
_el$11.addEventListener("focus", (event) => updateHighlight(event.currentTarget));
|
|
12690
|
+
_el$11.addEventListener("mouseleave", () => {
|
|
12691
|
+
props.onItemHover?.(null);
|
|
12692
|
+
clearHighlight();
|
|
12693
|
+
});
|
|
12694
|
+
_el$11.addEventListener("mouseenter", (event) => {
|
|
12278
12695
|
if (!props.disconnectedItemIds?.has(item.id)) {
|
|
12279
12696
|
props.onItemHover?.(item.id);
|
|
12280
12697
|
}
|
|
12698
|
+
updateHighlight(event.currentTarget);
|
|
12281
12699
|
});
|
|
12282
|
-
_el$
|
|
12700
|
+
_el$11.$$keydown = (event) => {
|
|
12283
12701
|
if (event.code === "Space" && event.currentTarget === event.target) {
|
|
12284
12702
|
event.preventDefault();
|
|
12285
12703
|
event.stopPropagation();
|
|
12286
12704
|
props.onSelectItem?.(item);
|
|
12287
12705
|
}
|
|
12288
12706
|
};
|
|
12289
|
-
_el$
|
|
12707
|
+
_el$11.$$click = (event) => {
|
|
12290
12708
|
event.stopPropagation();
|
|
12291
12709
|
props.onSelectItem?.(item);
|
|
12292
12710
|
setConfirmedCopyItemId(item.id);
|
|
@@ -12295,27 +12713,27 @@ var init_history_dropdown = __esm({
|
|
|
12295
12713
|
setConfirmedCopyItemId(null);
|
|
12296
12714
|
}, FEEDBACK_DURATION_MS);
|
|
12297
12715
|
};
|
|
12298
|
-
_el$
|
|
12299
|
-
insert(_el$
|
|
12300
|
-
insert(_el$
|
|
12716
|
+
_el$11.$$pointerdown = (event) => event.stopPropagation();
|
|
12717
|
+
insert(_el$13, () => getHistoryItemDisplayName(item));
|
|
12718
|
+
insert(_el$12, createComponent(Show, {
|
|
12301
12719
|
get when() {
|
|
12302
12720
|
return item.commentText;
|
|
12303
12721
|
},
|
|
12304
12722
|
get children() {
|
|
12305
|
-
var _el$
|
|
12306
|
-
insert(_el$
|
|
12307
|
-
return _el$
|
|
12723
|
+
var _el$14 = _tmpl$310();
|
|
12724
|
+
insert(_el$14, () => item.commentText);
|
|
12725
|
+
return _el$14;
|
|
12308
12726
|
}
|
|
12309
12727
|
}), null);
|
|
12310
|
-
insert(_el$
|
|
12311
|
-
_el$
|
|
12728
|
+
insert(_el$16, () => formatRelativeTime(item.timestamp));
|
|
12729
|
+
_el$18.$$click = (event) => {
|
|
12312
12730
|
event.stopPropagation();
|
|
12313
12731
|
props.onRemoveItem?.(item);
|
|
12314
12732
|
};
|
|
12315
|
-
insert(_el$
|
|
12733
|
+
insert(_el$18, createComponent(IconTrash, {
|
|
12316
12734
|
size: DROPDOWN_ICON_SIZE_PX
|
|
12317
12735
|
}));
|
|
12318
|
-
_el$
|
|
12736
|
+
_el$19.$$click = (event) => {
|
|
12319
12737
|
event.stopPropagation();
|
|
12320
12738
|
props.onCopyItem?.(item);
|
|
12321
12739
|
setConfirmedCopyItemId(item.id);
|
|
@@ -12324,7 +12742,7 @@ var init_history_dropdown = __esm({
|
|
|
12324
12742
|
setConfirmedCopyItemId(null);
|
|
12325
12743
|
}, FEEDBACK_DURATION_MS);
|
|
12326
12744
|
};
|
|
12327
|
-
insert(_el$
|
|
12745
|
+
insert(_el$19, createComponent(Show, {
|
|
12328
12746
|
get when() {
|
|
12329
12747
|
return confirmedCopyItemId() === item.id;
|
|
12330
12748
|
},
|
|
@@ -12344,18 +12762,18 @@ var init_history_dropdown = __esm({
|
|
|
12344
12762
|
var _v$1 = {
|
|
12345
12763
|
"opacity-40 hover:opacity-100": Boolean(props.disconnectedItemIds?.has(item.id))
|
|
12346
12764
|
}, _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$
|
|
12765
|
+
_p$.e = classList(_el$11, _v$1, _p$.e);
|
|
12766
|
+
_v$10 !== _p$.t && className(_el$18, _p$.t = _v$10);
|
|
12767
|
+
_v$11 !== _p$.a && className(_el$19, _p$.a = _v$11);
|
|
12350
12768
|
return _p$;
|
|
12351
12769
|
}, {
|
|
12352
12770
|
e: void 0,
|
|
12353
12771
|
t: void 0,
|
|
12354
12772
|
a: void 0
|
|
12355
12773
|
});
|
|
12356
|
-
return _el$
|
|
12774
|
+
return _el$11;
|
|
12357
12775
|
})()
|
|
12358
|
-
}));
|
|
12776
|
+
}), null);
|
|
12359
12777
|
createRenderEffect((_p$) => {
|
|
12360
12778
|
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
12779
|
_v$ !== _p$.e && setStyleProperty(_el$, "top", _p$.e = _v$);
|
|
@@ -12390,7 +12808,7 @@ var init_history_dropdown = __esm({
|
|
|
12390
12808
|
});
|
|
12391
12809
|
|
|
12392
12810
|
// src/components/clear-history-prompt.tsx
|
|
12393
|
-
var _tmpl$
|
|
12811
|
+
var _tmpl$41, ClearHistoryPrompt;
|
|
12394
12812
|
var init_clear_history_prompt = __esm({
|
|
12395
12813
|
"src/components/clear-history-prompt.tsx"() {
|
|
12396
12814
|
"use strict";
|
|
@@ -12404,13 +12822,13 @@ var init_clear_history_prompt = __esm({
|
|
|
12404
12822
|
init_web();
|
|
12405
12823
|
init_solid();
|
|
12406
12824
|
init_constants();
|
|
12407
|
-
|
|
12825
|
+
init_get_anchored_dropdown_position();
|
|
12408
12826
|
init_cn();
|
|
12409
12827
|
init_is_event_from_overlay();
|
|
12410
12828
|
init_is_keyboard_event_triggered_by_input();
|
|
12411
12829
|
init_discard_prompt();
|
|
12412
12830
|
init_native_raf();
|
|
12413
|
-
_tmpl$
|
|
12831
|
+
_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
12832
|
ClearHistoryPrompt = (props) => {
|
|
12415
12833
|
let containerRef;
|
|
12416
12834
|
const [measuredWidth, setMeasuredWidth] = createSignal(0);
|
|
@@ -12446,32 +12864,17 @@ var init_clear_history_prompt = __esm({
|
|
|
12446
12864
|
}, DROPDOWN_ANIMATION_DURATION_MS);
|
|
12447
12865
|
}
|
|
12448
12866
|
});
|
|
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
12867
|
const displayPosition = createMemo((previousPosition) => {
|
|
12474
|
-
const position =
|
|
12868
|
+
const position = getAnchoredDropdownPosition({
|
|
12869
|
+
anchor: props.position,
|
|
12870
|
+
measuredWidth: measuredWidth(),
|
|
12871
|
+
measuredHeight: measuredHeight(),
|
|
12872
|
+
viewportWidth: window.innerWidth,
|
|
12873
|
+
viewportHeight: window.innerHeight,
|
|
12874
|
+
anchorGapPx: DROPDOWN_ANCHOR_GAP_PX,
|
|
12875
|
+
viewportPaddingPx: DROPDOWN_VIEWPORT_PADDING_PX,
|
|
12876
|
+
offscreenPosition: DROPDOWN_OFFSCREEN_POSITION
|
|
12877
|
+
});
|
|
12475
12878
|
if (position.left !== DROPDOWN_OFFSCREEN_POSITION.left) {
|
|
12476
12879
|
return position;
|
|
12477
12880
|
}
|
|
@@ -12492,7 +12895,6 @@ var init_clear_history_prompt = __esm({
|
|
|
12492
12895
|
const isEscape = event.code === "Escape";
|
|
12493
12896
|
if (isEnter || isEscape) {
|
|
12494
12897
|
event.preventDefault();
|
|
12495
|
-
event.stopPropagation();
|
|
12496
12898
|
event.stopImmediatePropagation();
|
|
12497
12899
|
if (isEscape) {
|
|
12498
12900
|
props.onCancel();
|
|
@@ -12536,7 +12938,7 @@ var init_clear_history_prompt = __esm({
|
|
|
12536
12938
|
return shouldMount();
|
|
12537
12939
|
},
|
|
12538
12940
|
get children() {
|
|
12539
|
-
var _el$ = _tmpl$
|
|
12941
|
+
var _el$ = _tmpl$41(), _el$2 = _el$.firstChild;
|
|
12540
12942
|
_el$.$$contextmenu = handlePromptEvent;
|
|
12541
12943
|
_el$.$$click = handlePromptEvent;
|
|
12542
12944
|
_el$.$$mousedown = handlePromptEvent;
|
|
@@ -12581,7 +12983,7 @@ var init_clear_history_prompt = __esm({
|
|
|
12581
12983
|
});
|
|
12582
12984
|
|
|
12583
12985
|
// src/components/renderer.tsx
|
|
12584
|
-
var _tmpl$
|
|
12986
|
+
var _tmpl$47, ReactGrabRenderer;
|
|
12585
12987
|
var init_renderer = __esm({
|
|
12586
12988
|
"src/components/renderer.tsx"() {
|
|
12587
12989
|
"use strict";
|
|
@@ -12601,7 +13003,7 @@ var init_renderer = __esm({
|
|
|
12601
13003
|
init_context_menu();
|
|
12602
13004
|
init_history_dropdown();
|
|
12603
13005
|
init_clear_history_prompt();
|
|
12604
|
-
_tmpl$
|
|
13006
|
+
_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
13007
|
ReactGrabRenderer = (props) => {
|
|
12606
13008
|
return [createComponent(OverlayCanvas, {
|
|
12607
13009
|
get crosshairVisible() {
|
|
@@ -12644,7 +13046,7 @@ var init_renderer = __esm({
|
|
|
12644
13046
|
return props.labelInstances;
|
|
12645
13047
|
}
|
|
12646
13048
|
}), (() => {
|
|
12647
|
-
var _el$ = _tmpl$
|
|
13049
|
+
var _el$ = _tmpl$47();
|
|
12648
13050
|
setStyleProperty(_el$, "z-index", Z_INDEX_OVERLAY_CANVAS);
|
|
12649
13051
|
setStyleProperty(_el$, "box-shadow", `inset 0 0 ${FROZEN_GLOW_EDGE_PX}px ${FROZEN_GLOW_COLOR}`);
|
|
12650
13052
|
createRenderEffect((_$p) => setStyleProperty(_el$, "opacity", props.isFrozen ? 1 : 0));
|
|
@@ -12766,6 +13168,12 @@ var init_renderer = __esm({
|
|
|
12766
13168
|
get actionCycleState() {
|
|
12767
13169
|
return props.selectionActionCycleState;
|
|
12768
13170
|
},
|
|
13171
|
+
get arrowNavigationState() {
|
|
13172
|
+
return props.selectionArrowNavigationState;
|
|
13173
|
+
},
|
|
13174
|
+
get onArrowNavigationSelect() {
|
|
13175
|
+
return props.onArrowNavigationSelect;
|
|
13176
|
+
},
|
|
12769
13177
|
get filePath() {
|
|
12770
13178
|
return props.selectionFilePath;
|
|
12771
13179
|
},
|
|
@@ -13661,18 +14069,6 @@ var init_create_bounds_from_drag_rect = __esm({
|
|
|
13661
14069
|
}
|
|
13662
14070
|
});
|
|
13663
14071
|
|
|
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
14072
|
// src/utils/is-c-like-key.ts
|
|
13677
14073
|
var C_LIKE_CHARACTERS, isCLikeKey;
|
|
13678
14074
|
var init_is_c_like_key = __esm({
|
|
@@ -14260,6 +14656,7 @@ var init_manager = __esm({
|
|
|
14260
14656
|
init_create_element_bounds();
|
|
14261
14657
|
init_is_element_connected();
|
|
14262
14658
|
init_generate_snippet();
|
|
14659
|
+
init_recalculate_session_position();
|
|
14263
14660
|
init_context();
|
|
14264
14661
|
init_constants();
|
|
14265
14662
|
init_get_tag_name();
|
|
@@ -14749,19 +15146,11 @@ var init_manager = __esm({
|
|
|
14749
15146
|
if (newBounds.length > 0) {
|
|
14750
15147
|
const oldFirstBounds = session.selectionBounds[0];
|
|
14751
15148
|
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
|
-
}
|
|
15149
|
+
const updatedPosition = recalculateSessionPosition({
|
|
15150
|
+
currentPosition: session.position,
|
|
15151
|
+
previousBounds: oldFirstBounds,
|
|
15152
|
+
nextBounds: newFirstBounds
|
|
15153
|
+
});
|
|
14765
15154
|
updatedSessions.set(sessionId, {
|
|
14766
15155
|
...session,
|
|
14767
15156
|
selectionBounds: newBounds,
|
|
@@ -15057,7 +15446,7 @@ var init_log_intro = __esm({
|
|
|
15057
15446
|
init_is_extension_context();
|
|
15058
15447
|
logIntro = () => {
|
|
15059
15448
|
try {
|
|
15060
|
-
const version = "0.1.
|
|
15449
|
+
const version = "0.1.22";
|
|
15061
15450
|
const logoDataUri = `data:image/svg+xml;base64,${btoa(LOGO_SVG)}`;
|
|
15062
15451
|
console.log(
|
|
15063
15452
|
`%cReact Grab${version ? ` v${version}` : ""}%c
|
|
@@ -15863,6 +16252,8 @@ var init_core = __esm({
|
|
|
15863
16252
|
const [resolvedComponentName, setResolvedComponentName] = createSignal(void 0);
|
|
15864
16253
|
const [actionCycleItems, setActionCycleItems] = createSignal([]);
|
|
15865
16254
|
const [actionCycleActiveIndex, setActionCycleActiveIndex] = createSignal(null);
|
|
16255
|
+
const [arrowNavigationElements, setArrowNavigationElements] = createSignal([]);
|
|
16256
|
+
const [arrowNavigationActiveIndex, setArrowNavigationActiveIndex] = createSignal(0);
|
|
15866
16257
|
const arrowNavigator = createArrowNavigator(isValidGrabbableElement, createElementBounds);
|
|
15867
16258
|
const autoScroller = createAutoScroller(() => store.pointer, () => isDragging());
|
|
15868
16259
|
const isRendererActive = createMemo(() => isActivated() && !isCopying());
|
|
@@ -16182,6 +16573,7 @@ var init_core = __esm({
|
|
|
16182
16573
|
});
|
|
16183
16574
|
};
|
|
16184
16575
|
const targetElement = createMemo(() => {
|
|
16576
|
+
void store.viewportVersion;
|
|
16185
16577
|
if (!isRendererActive() || isDragging()) return null;
|
|
16186
16578
|
const element = store.detectedElement;
|
|
16187
16579
|
if (!isElementConnected(element)) return null;
|
|
@@ -16516,7 +16908,7 @@ var init_core = __esm({
|
|
|
16516
16908
|
const wasDragging = isDragging();
|
|
16517
16909
|
const previousFocused = store.previouslyFocusedElement;
|
|
16518
16910
|
actions.deactivate();
|
|
16519
|
-
|
|
16911
|
+
clearArrowNavigation();
|
|
16520
16912
|
keyboardSelectedElement = null;
|
|
16521
16913
|
isPendingContextMenuSelect = false;
|
|
16522
16914
|
if (wasDragging) {
|
|
@@ -16710,6 +17102,7 @@ var init_core = __esm({
|
|
|
16710
17102
|
};
|
|
16711
17103
|
const openContextMenu = (element, position) => {
|
|
16712
17104
|
actions.showContextMenu(position, element);
|
|
17105
|
+
clearArrowNavigation();
|
|
16713
17106
|
dismissAllPopups();
|
|
16714
17107
|
pluginRegistry.hooks.onContextMenu(element, position);
|
|
16715
17108
|
};
|
|
@@ -16915,7 +17308,6 @@ var init_core = __esm({
|
|
|
16915
17308
|
if (shouldBlockEnter) {
|
|
16916
17309
|
keyboardClaimer.claimedEvents.add(event);
|
|
16917
17310
|
event.preventDefault();
|
|
16918
|
-
event.stopPropagation();
|
|
16919
17311
|
event.stopImmediatePropagation();
|
|
16920
17312
|
return true;
|
|
16921
17313
|
}
|
|
@@ -16949,30 +17341,67 @@ var init_core = __esm({
|
|
|
16949
17341
|
}
|
|
16950
17342
|
return false;
|
|
16951
17343
|
};
|
|
17344
|
+
const clearArrowNavigation = () => {
|
|
17345
|
+
setArrowNavigationElements([]);
|
|
17346
|
+
setArrowNavigationActiveIndex(0);
|
|
17347
|
+
arrowNavigator.clearHistory();
|
|
17348
|
+
};
|
|
17349
|
+
const selectAndFocusElement = (element) => {
|
|
17350
|
+
actions.setFrozenElement(element);
|
|
17351
|
+
actions.freeze();
|
|
17352
|
+
keyboardSelectedElement = element;
|
|
17353
|
+
const bounds = createElementBounds(element);
|
|
17354
|
+
const center = getBoundsCenter(bounds);
|
|
17355
|
+
actions.setPointer(center);
|
|
17356
|
+
if (store.contextMenuPosition !== null) {
|
|
17357
|
+
actions.showContextMenu(center, element);
|
|
17358
|
+
}
|
|
17359
|
+
};
|
|
17360
|
+
const openArrowNavigationMenu = (anchorElement) => {
|
|
17361
|
+
const bounds = createElementBounds(anchorElement);
|
|
17362
|
+
const elementsAtPoint = getElementsAtPoint(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2).filter(isValidGrabbableElement).reverse();
|
|
17363
|
+
setArrowNavigationElements(elementsAtPoint);
|
|
17364
|
+
setArrowNavigationActiveIndex(Math.max(0, elementsAtPoint.indexOf(anchorElement)));
|
|
17365
|
+
};
|
|
17366
|
+
const handleArrowNavigationSelect = (index) => {
|
|
17367
|
+
const targetElement2 = arrowNavigationElements()[index];
|
|
17368
|
+
if (!targetElement2) return;
|
|
17369
|
+
setArrowNavigationActiveIndex(index);
|
|
17370
|
+
arrowNavigator.clearHistory();
|
|
17371
|
+
selectAndFocusElement(targetElement2);
|
|
17372
|
+
};
|
|
16952
17373
|
const handleArrowNavigation = (event) => {
|
|
16953
17374
|
if (!isActivated() || isPromptMode()) return false;
|
|
16954
17375
|
if (!ARROW_KEYS.has(event.key)) return false;
|
|
16955
17376
|
let currentElement = effectiveElement();
|
|
16956
17377
|
const isInitialSelection = !currentElement;
|
|
16957
17378
|
if (!currentElement) {
|
|
16958
|
-
|
|
16959
|
-
const viewportCenterY = window.innerHeight / 2;
|
|
16960
|
-
currentElement = getElementAtPosition(viewportCenterX, viewportCenterY);
|
|
17379
|
+
currentElement = getElementAtPosition(window.innerWidth / 2, window.innerHeight / 2);
|
|
16961
17380
|
}
|
|
16962
17381
|
if (!currentElement) return false;
|
|
17382
|
+
const isVertical = event.key === "ArrowUp" || event.key === "ArrowDown";
|
|
17383
|
+
if (!isVertical) {
|
|
17384
|
+
clearArrowNavigation();
|
|
17385
|
+
const nextElement2 = arrowNavigator.findNext(event.key, currentElement);
|
|
17386
|
+
if (!nextElement2 && !isInitialSelection) return false;
|
|
17387
|
+
event.preventDefault();
|
|
17388
|
+
event.stopPropagation();
|
|
17389
|
+
selectAndFocusElement(nextElement2 ?? currentElement);
|
|
17390
|
+
return true;
|
|
17391
|
+
}
|
|
17392
|
+
if (arrowNavigationElements().length === 0) {
|
|
17393
|
+
openArrowNavigationMenu(currentElement);
|
|
17394
|
+
}
|
|
16963
17395
|
const nextElement = arrowNavigator.findNext(event.key, currentElement);
|
|
16964
|
-
if (!nextElement && !isInitialSelection) return false;
|
|
16965
17396
|
const elementToSelect = nextElement ?? currentElement;
|
|
16966
17397
|
event.preventDefault();
|
|
16967
17398
|
event.stopPropagation();
|
|
16968
|
-
|
|
16969
|
-
|
|
16970
|
-
|
|
16971
|
-
|
|
16972
|
-
|
|
16973
|
-
|
|
16974
|
-
if (store.contextMenuPosition !== null) {
|
|
16975
|
-
actions.showContextMenu(selectionCenter, elementToSelect);
|
|
17399
|
+
selectAndFocusElement(elementToSelect);
|
|
17400
|
+
const newIndex = arrowNavigationElements().indexOf(elementToSelect);
|
|
17401
|
+
if (newIndex !== -1) {
|
|
17402
|
+
setArrowNavigationActiveIndex(newIndex);
|
|
17403
|
+
} else {
|
|
17404
|
+
openArrowNavigationMenu(elementToSelect);
|
|
16976
17405
|
}
|
|
16977
17406
|
return true;
|
|
16978
17407
|
};
|
|
@@ -16983,7 +17412,6 @@ var init_core = __esm({
|
|
|
16983
17412
|
const canActivateFromCopied = !isHoldingKeys() && !isPromptMode() && !isActivated() && copiedElement && isElementConnected(copiedElement) && !store.labelInstances.some((instance) => instance.status === "copied" || instance.status === "fading");
|
|
16984
17413
|
if (canActivateFromCopied) {
|
|
16985
17414
|
event.preventDefault();
|
|
16986
|
-
event.stopPropagation();
|
|
16987
17415
|
event.stopImmediatePropagation();
|
|
16988
17416
|
const center = getBoundsCenter(createElementBounds(copiedElement));
|
|
16989
17417
|
actions.setPointer(center);
|
|
@@ -16999,7 +17427,6 @@ var init_core = __esm({
|
|
|
16999
17427
|
const canActivateFromHolding = isHoldingKeys() && !isPromptMode();
|
|
17000
17428
|
if (canActivateFromHolding) {
|
|
17001
17429
|
event.preventDefault();
|
|
17002
|
-
event.stopPropagation();
|
|
17003
17430
|
event.stopImmediatePropagation();
|
|
17004
17431
|
const element = store.frozenElement || targetElement();
|
|
17005
17432
|
if (element) {
|
|
@@ -17058,6 +17485,15 @@ var init_core = __esm({
|
|
|
17058
17485
|
activeIndex: actionCycleActiveIndex(),
|
|
17059
17486
|
isVisible: actionCycleActiveIndex() !== null && actionCycleItems().length > 0
|
|
17060
17487
|
}));
|
|
17488
|
+
const arrowNavigationItems = createMemo(() => arrowNavigationElements().map((element) => ({
|
|
17489
|
+
tagName: getTagName(element) || "element",
|
|
17490
|
+
componentName: getComponentDisplayName(element) ?? void 0
|
|
17491
|
+
})));
|
|
17492
|
+
const arrowNavigationState = createMemo(() => ({
|
|
17493
|
+
items: arrowNavigationItems(),
|
|
17494
|
+
activeIndex: arrowNavigationActiveIndex(),
|
|
17495
|
+
isVisible: arrowNavigationElements().length > 0
|
|
17496
|
+
}));
|
|
17061
17497
|
createEffect(on(selectionElement, () => {
|
|
17062
17498
|
resetActionCycle();
|
|
17063
17499
|
}));
|
|
@@ -17170,7 +17606,6 @@ var init_core = __esm({
|
|
|
17170
17606
|
if ((isActivated() || isHoldingKeys()) && !isPromptMode()) {
|
|
17171
17607
|
event.preventDefault();
|
|
17172
17608
|
if (isEnterCode(event.code)) {
|
|
17173
|
-
event.stopPropagation();
|
|
17174
17609
|
event.stopImmediatePropagation();
|
|
17175
17610
|
}
|
|
17176
17611
|
}
|
|
@@ -17374,7 +17809,7 @@ var init_core = __esm({
|
|
|
17374
17809
|
const isActiveState = isTouchPointer ? isHoldingKeys() : isActivated();
|
|
17375
17810
|
if (isActiveState && !isPromptMode() && isToggleFrozen()) {
|
|
17376
17811
|
actions.unfreeze();
|
|
17377
|
-
|
|
17812
|
+
clearArrowNavigation();
|
|
17378
17813
|
}
|
|
17379
17814
|
handlePointerMove(event.clientX, event.clientY);
|
|
17380
17815
|
}, {
|
|
@@ -17401,7 +17836,6 @@ var init_core = __esm({
|
|
|
17401
17836
|
if (didHandle) {
|
|
17402
17837
|
document.documentElement.setPointerCapture(event.pointerId);
|
|
17403
17838
|
event.preventDefault();
|
|
17404
|
-
event.stopPropagation();
|
|
17405
17839
|
event.stopImmediatePropagation();
|
|
17406
17840
|
}
|
|
17407
17841
|
}, {
|
|
@@ -17412,14 +17846,24 @@ var init_core = __esm({
|
|
|
17412
17846
|
if (!event.isPrimary) return;
|
|
17413
17847
|
if (isEventFromOverlay(event, "data-react-grab-ignore-events")) return;
|
|
17414
17848
|
if (store.contextMenuPosition !== null) return;
|
|
17849
|
+
const isActive = isRendererActive() || isCopying() || isDragging();
|
|
17415
17850
|
const hasModifierKeyHeld = event.metaKey || event.ctrlKey;
|
|
17416
17851
|
handlePointerUp(event.clientX, event.clientY, hasModifierKeyHeld);
|
|
17852
|
+
if (isActive) {
|
|
17853
|
+
event.preventDefault();
|
|
17854
|
+
event.stopImmediatePropagation();
|
|
17855
|
+
}
|
|
17417
17856
|
}, {
|
|
17418
17857
|
capture: true
|
|
17419
17858
|
});
|
|
17420
17859
|
eventListenerManager.addWindowListener("contextmenu", (event) => {
|
|
17421
17860
|
if (!isRendererActive() || isCopying() || isPromptMode()) return;
|
|
17422
|
-
|
|
17861
|
+
const isFromOverlay = isEventFromOverlay(event, "data-react-grab-ignore-events");
|
|
17862
|
+
if (isFromOverlay && arrowNavigationElements().length > 0) {
|
|
17863
|
+
clearArrowNavigation();
|
|
17864
|
+
} else if (isFromOverlay) {
|
|
17865
|
+
return;
|
|
17866
|
+
}
|
|
17423
17867
|
if (store.contextMenuPosition !== null) {
|
|
17424
17868
|
event.preventDefault();
|
|
17425
17869
|
return;
|
|
@@ -17455,7 +17899,6 @@ var init_core = __esm({
|
|
|
17455
17899
|
if (store.contextMenuPosition !== null) return;
|
|
17456
17900
|
if (isRendererActive() || isCopying() || didJustDrag()) {
|
|
17457
17901
|
event.preventDefault();
|
|
17458
|
-
event.stopPropagation();
|
|
17459
17902
|
event.stopImmediatePropagation();
|
|
17460
17903
|
if (store.wasActivatedByToggle && !isCopying() && !isPromptMode()) {
|
|
17461
17904
|
if (!isHoldingKeys()) {
|
|
@@ -17526,6 +17969,18 @@ var init_core = __esm({
|
|
|
17526
17969
|
previousViewportHeight = currentViewportHeight;
|
|
17527
17970
|
handleViewportChange();
|
|
17528
17971
|
});
|
|
17972
|
+
const visualViewport = window.visualViewport;
|
|
17973
|
+
if (visualViewport) {
|
|
17974
|
+
const {
|
|
17975
|
+
signal
|
|
17976
|
+
} = eventListenerManager;
|
|
17977
|
+
visualViewport.addEventListener("resize", handleViewportChange, {
|
|
17978
|
+
signal
|
|
17979
|
+
});
|
|
17980
|
+
visualViewport.addEventListener("scroll", handleViewportChange, {
|
|
17981
|
+
signal
|
|
17982
|
+
});
|
|
17983
|
+
}
|
|
17529
17984
|
let boundsRecalcIntervalId = null;
|
|
17530
17985
|
let viewportChangeFrameId = null;
|
|
17531
17986
|
const startBoundsRecalcIntervalIfNeeded = () => {
|
|
@@ -18307,6 +18762,10 @@ var init_core = __esm({
|
|
|
18307
18762
|
get selectionActionCycleState() {
|
|
18308
18763
|
return actionCycleState();
|
|
18309
18764
|
},
|
|
18765
|
+
get selectionArrowNavigationState() {
|
|
18766
|
+
return arrowNavigationState();
|
|
18767
|
+
},
|
|
18768
|
+
onArrowNavigationSelect: handleArrowNavigationSelect,
|
|
18310
18769
|
get labelInstances() {
|
|
18311
18770
|
return computedLabelInstances();
|
|
18312
18771
|
},
|