@htmlos-next/ui 0.0.15 → 0.0.16

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarTitle.d.ts","sourceRoot":"","sources":["../../../src/components/ToolbarTitle/ToolbarTitle.tsx"],"names":[],"mappings":"AAGA,UAAU,iBAAiB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAkC3D"}
1
+ {"version":3,"file":"ToolbarTitle.d.ts","sourceRoot":"","sources":["../../../src/components/ToolbarTitle/ToolbarTitle.tsx"],"names":[],"mappings":"AAEA,UAAU,iBAAiB;IACzB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CAM3D"}
@@ -1,10 +1,10 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(`:root{--accent: #0088ff;--button-primary-bg: var(--accent);--button-primary-bg-hover: color-mix(in srgb, var(--accent), black 15%);--button-primary-bg-active: color-mix(in srgb, var(--accent), black 30%);--button-secondary-bg-hover: color-mix(in srgb, var(--accent), white 90%);--button-secondary-bg-active: color-mix(in srgb, var(--accent), white 90%);--button-disabled-bg: color-mix(in srgb, var(--accent), white 60%);--text-disabled: color-mix(in srgb, var(--text-primary), white 40%);--icon-color: var(--accent);--border-color: #0000001a;--surface-bg: #ffffff7a;--surface-bg-hover: #ffffffa1;--surface-bg-active: #ffffffd5;--card-bg: #e5e5e5;--card-bg-secondary: #f5f5f5;--overlay-bg: rgba(0, 0, 0, .4);--muted-bg: rgba(0, 0, 0, .06);--text-primary: #000000;--text-secondary: #8b8b8b;--text-inverse: #ffffff;--sidebar-width: 200px}[data-theme=dark]{--button-secondary-bg-hover: #252628;--button-secondary-bg-active: #2b2f35;--button-disabled-bg: color-mix(in srgb, var(--accent), black 60%);--text-disabled: color-mix(in srgb, var(--text-primary), black 40%);--surface-bg: #1e1e1e7a;--surface-bg-hover: #2a2a2aa1;--surface-bg-active: #3a3a3ad5;--card-bg: #1d1d1d;--card-bg-secondary: #2a2a2a;--overlay-bg: rgba(255, 255, 255, .4);--muted-bg: rgba(255, 255, 255, .12);--text-primary: #ffffff;--text-inverse: #000000;--text-secondary: #b3b3b3}body{color:var(--text-primary);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[device-type=mobile] body{background-color:var(--card-bg-secondary)!important}*,*:before,*:after{box-sizing:border-box;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:rgba(0,0,0,0)}._sidebar_yoln4_1{width:var(--sidebar-width);background-color:var(--surface-bg);position:absolute;top:0;bottom:5px;height:auto;left:5px;border-radius:9px;transition:left .3s;display:flex;flex-direction:column;z-index:999;border:solid 1px var(--border-color);transform:translate(0)}._sidebarCollapsed_yoln4_18{left:calc(-1 * var(--sidebar-width) - 10px)}[device-type=mobile] ._sidebar_yoln4_1._sidebarMobile_yoln4_22{position:absolute;inset:0;width:auto;height:auto;border-radius:0;transition:transform .25s ease;background-color:var(--card-bg)}[device-type=mobile] ._sidebar_yoln4_1._sidebarMobile_yoln4_22._sidebarMobileHidden_yoln4_35{transform:translate(-105%)}._sidebarContent_yoln4_39{height:100%;padding:0 4px;display:flex;flex-direction:column;overflow-y:auto;gap:2px}._sidebarFooter_yoln4_48{padding:4px}._sidebarTitle_azx8n_1{font-size:.8rem;font-weight:600;margin:8px 8px 8px 4px;color:var(--text-secondary)}[device-type=mobile] ._sidebarTitle_azx8n_1{font-size:1.2rem}._sidebarItem_1e3ru_1{padding:6px;transition:background-color .1s;border-radius:8px;color:var(--text-primary);cursor:pointer;display:flex;flex-direction:row;justify-content:start;align-items:center;gap:8px}[device-type=mobile] ._sidebarItem_1e3ru_1{font-size:1.4rem}._sidebarItem_1e3ru_1:hover{background-color:var(--surface-bg-hover)}._sidebarItem_1e3ru_1._selected_1e3ru_22{background-color:var(--surface-bg-active);color:var(--icon-color)}._sidebarMainBtn_65l8c_1{width:calc(100% - 8px);background-color:var(--button-primary-bg);border:none;outline:none;color:var(--text-inverse);border-radius:5px;height:32px;margin:4px;font-weight:600;font-size:.9rem;transition:background-color .2s;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:8px;cursor:pointer}[device-type=mobile] ._sidebarMainBtn_65l8c_1{font-size:1.4rem;height:48px}._sidebarMainBtn_65l8c_1:hover{background-color:var(--button-primary-bg-hover)}._sidebarMainBtn_65l8c_1:active{background-color:var(--button-primary-bg-active)}._popupContainer_vz8rg_1{position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--overlay-bg);z-index:9999;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);opacity:1;transition:.2s;pointer-events:auto}._popupClosed_vz8rg_18{opacity:0;pointer-events:none}._popup_vz8rg_1{background-color:var(--card-bg);border-radius:8px;padding:12px;width:300px;height:auto;display:flex;flex-direction:column;justify-content:space-between;gap:12px}._popupIconContainer_vz8rg_35{display:flex;justify-content:center}._popupIcon_vz8rg_35{color:var(--icon-color)}._popupContent_vz8rg_44{display:flex;flex-direction:column;gap:8px}._popupTitle_4z5vb_1{margin:0;text-align:center;font-size:large;font-weight:700}[device-type=mobile] ._popupTitle_4z5vb_1{font-size:1.4rem}._popupDescription_4ewx1_1{text-align:center}[device-type=mobile] ._popupDescription_4ewx1_1{font-size:1.4rem}._popupInput_1b42s_1{width:100%;height:32px;background-color:var(--muted-bg);border:none;border-radius:5px;padding:4px 8px;font-size:1rem;color:var(--text-primary)}[device-type=mobile] ._popupInput_1b42s_1{font-size:1.4rem;height:48px}._popupActions_84v2b_1{display:flex;gap:8px}._popupBtn_ouvtc_1{width:100%;height:32px;border:none;border-radius:5px;font-weight:600;font-size:.9rem;background-color:var(--button-primary-bg);transition:background-color .2s;color:var(--text-inverse);cursor:pointer}[device-type=mobile] ._popupBtn_ouvtc_1{font-size:1.4rem;height:48px}._popupBtn_ouvtc_1:hover{background-color:var(--button-primary-bg-hover)}._popupBtn_ouvtc_1:active{background-color:var(--button-primary-bg-active)}._popupBtn_ouvtc_1._secondary_ouvtc_27{background-color:transparent;color:var(--text-primary);border:solid 1px var(--button-primary-bg);font-weight:400}._popupBtn_ouvtc_1._secondary_ouvtc_27:hover{background-color:var(--button-secondary-bg-hover)}._popupBtn_ouvtc_1._secondary_ouvtc_27:active{background-color:var(--button-secondary-bg-active)}._toolbar_11x84_1{position:absolute;top:0;left:calc(var(--sidebar-width) + 10px);width:calc(100% - calc(var(--sidebar-width) + 15px));height:32px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;z-index:990;transition:top .3s,left .3s,width .3s}._toolbarCollapsed_11x84_18{top:-100%}[device-type=mobile] ._toolbar_11x84_1{top:5px;height:48px}._toolbarExpanded_11x84_27{left:5px;width:calc(100% - 10px)}._toolbarTitle_11x84_32{margin:0;font-size:1rem;font-weight:600}._toolbarActions_11x84_38{background-color:var(--surface-bg);border-radius:16px;display:flex;flex-direction:row}._toolbarActions_11x84_38 button{width:32px;height:32px;background-color:transparent;border:none;outline:none;color:var(--icon-color);cursor:pointer}._toolbarTitle_mpzr6_1{margin:0;display:flex;justify-content:center;align-items:center;flex:1 1 auto;min-width:0;max-width:100%;overflow-y:hidden;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}._toolbarTitle_mpzr6_1::-webkit-scrollbar{display:none}._toolbarTitle_mpzr6_1._overflowing_mpzr6_22{justify-content:flex-start}._toolbarTitleContent_mpzr6_26{display:inline-block;width:max-content;max-width:none;white-space:nowrap;overflow-wrap:normal;word-break:keep-all}[device-type=mobile] ._toolbarTitle_mpzr6_1{font-size:1.4rem}._toolbarActions_l0jv2_1{background-color:var(--surface-bg);border-radius:16px;display:flex;flex-direction:row}[device-type=mobile] ._toolbarActions_l0jv2_1{border-radius:24px}._toolbarActions_l0jv2_1 button{background-color:transparent}._toolbarBtn_8jy1b_1{width:32px;height:32px;border:none;outline:none;padding:0;display:flex;justify-content:center;align-items:center;background-color:var(--surface-bg);border-radius:16px;color:var(--icon-color);transition:background-color .2s;cursor:pointer}._toolbarBtn_8jy1b_1:hover{background-color:var(--surface-bg-hover)}._toolbarBtn_8jy1b_1:active{background-color:var(--surface-bg-active)}[device-type=mobile] ._toolbarBtn_8jy1b_1{width:48px;height:48px;border-radius:24px}._sidebarIcon_1lib1_1{rotate:0deg;transition:rotate .3s}._sidebarIconExpanded_1lib1_6{rotate:180deg}._content_to68z_1{position:absolute;top:0;left:calc(var(--sidebar-width) + 10px);height:100%;width:calc(100% - calc(var(--sidebar-width) + 15px));transition:left .3s,width .3s;display:flex;flex-direction:column;justify-content:start;align-items:start;overflow:auto;padding-bottom:5px}._contentExpanded_to68z_18{left:5px;width:calc(100% - 10px)}._toolbarPresent_to68z_23{top:37px;height:calc(100% - 37px)}[device-type=mobile] ._content_to68z_1._toolbarPresent_to68z_23{top:58px;height:calc(100% - 58px)}._contentNoMargin_to68z_33{padding:0;left:calc(var(--sidebar-width))}._contentExpanded_to68z_18._contentNoMargin_to68z_33{left:0;width:100%}._contextMenu_v1bev_1{background-color:var(--surface-bg-active);position:fixed;border-radius:9px;z-index:9999;border:solid 1px var(--border-color);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);padding:4px;display:flex;flex-direction:column;opacity:0;visibility:hidden;pointer-events:none;transform-origin:var(--origin, top left);transform:scale(.8) translate(var(--tx-start)) translateY(var(--ty-start));transition:opacity .12s ease-out,transform .12s cubic-bezier(.4,0,.2,1),visibility .12s}._contextMenuOpen_v1bev_27{opacity:1;visibility:visible;pointer-events:auto;transform:scale(1) translate(0) translateY(0)}._listItem_1vjhk_1{padding:10px;transition:background-color .1s;border-radius:8px;color:var(--text-primary);cursor:pointer;display:flex;flex-direction:row;justify-content:start;align-items:center;gap:8px;width:100%}._listItem_1vjhk_1>svg{flex:0 0 auto}[device-type=mobile] ._listItem_1vjhk_1{font-size:1.4rem}._listItem_1vjhk_1:hover{background-color:var(--surface-bg-hover)}._listItem_1vjhk_1._selected_1vjhk_27{background-color:var(--surface-bg-active)}._emptyView_1synn_1{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;color:var(--text-secondary)}._card_zjz9h_1{background-color:var(--surface-bg);border-radius:9px;display:flex;flex-direction:column;border:solid 1px var(--border-color);padding:14px;margin:0 8px;width:calc(100% - 16px);gap:8px}._textInput_on5q4_1{width:100%;height:32px;background-color:var(--muted-bg);border:none;border-radius:5px;padding:4px 8px;font-size:.9rem;color:var(--text-primary);transition:background-color .2s}._textInput_on5q4_1:focus{outline:none;background-color:var(--surface-bg)}._textInput_on5q4_1:disabled{opacity:.5;cursor:not-allowed}._textInput_on5q4_1::placeholder{color:var(--text-secondary)}[device-type=mobile] ._textInput_on5q4_1{font-size:1.4rem;height:48px}._selectInput_3f04b_1{height:32px;background-color:var(--muted-bg);border:none;border-radius:5px;padding:4px 32px 4px 8px;font-size:.9rem;color:var(--text-primary);cursor:pointer;transition:background-color .2s;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6L8 10L12 6" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:right 8px center}._selectInput_3f04b_1:hover{background-color:var(--surface-bg-hover)}._selectInput_3f04b_1:focus{outline:none;background-color:var(--surface-bg)}._selectInput_3f04b_1:disabled{opacity:.5;cursor:not-allowed}[device-type=mobile] ._selectInput_3f04b_1{font-size:1.4rem;height:48px}._button_g5rur_1{width:100%;height:32px;border:none;border-radius:5px;font-weight:600;font-size:.9rem;background-color:var(--button-primary-bg);transition:background-color .2s;color:var(--text-inverse);cursor:pointer}[device-type=mobile] ._button_g5rur_1{font-size:1.4rem;height:48px}._button_g5rur_1:hover{background-color:var(--button-primary-bg-hover)}._button_g5rur_1:active{background-color:var(--button-primary-bg-active)}._button_g5rur_1._secondary_g5rur_27{background-color:transparent;color:var(--text-primary);border:solid 1px var(--button-primary-bg);font-weight:400}._button_g5rur_1._secondary_g5rur_27:hover{background-color:var(--button-secondary-bg-hover)}._button_g5rur_1._secondary_g5rur_27:active{background-color:var(--button-secondary-bg-active)}._button_g5rur_1:disabled{background-color:var(--button-disabled-bg);color:var(--text-disabled);cursor:not-allowed;opacity:.6}._balloon_1jdjr_1{position:fixed;z-index:1000;display:flex;flex-direction:column;width:256px;padding:14px;gap:8px;border-radius:9px;background-color:var(--surface-bg);border:solid 1px var(--border-color);align-items:center;box-sizing:border-box;transform-origin:50% calc(100% + 8px);transform:translate(-50%,calc(-100% - 8px)) scale(.1);filter:opacity(0);transition:.3s;pointer-events:none;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}._balloonOpen_1jdjr_22{transform:translate(-50%,calc(-100% - 8px)) scale(1);filter:opacity(1);pointer-events:auto}._balloon_1jdjr_1:after{content:"";position:absolute;bottom:-6px;left:50%;transform:translate(-50%) rotate(45deg);width:10px;height:10px;background-color:var(--surface-bg);border-right:solid 1px var(--border-color);border-bottom:solid 1px var(--border-color);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}[device-type=mobile] ._balloon_1jdjr_1{font-size:1.4rem}`)),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),a=require("react"),H=require("lucide-react"),B=a.createContext({isMobile:!1}),b=()=>a.useContext(B);function V({isMobile:e,sidebar:t,children:o,accentColor:n="#0088ff"}){return a.useLayoutEffect(()=>{n&&document.documentElement.style.setProperty("--accent",n)},[n]),s.jsx(B.Provider,{value:{isMobile:e},children:s.jsxs("div",{children:[s.jsx("aside",{children:t}),s.jsx("main",{children:o})]})})}const W="_sidebar_yoln4_1",F="_sidebarCollapsed_yoln4_18",q="_sidebarMobile_yoln4_22",K="_sidebarMobileHidden_yoln4_35",G="_sidebarContent_yoln4_39",J="_sidebarFooter_yoln4_48",d={sidebar:W,sidebarCollapsed:F,sidebarMobile:q,sidebarMobileHidden:K,sidebarContent:G,sidebarFooter:J};function Q({open:e,footer:t,children:o}){const{isMobile:n}=b();return s.jsxs("div",{className:`
1
+ (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(`:root{--accent: #0088ff;--button-primary-bg: var(--accent);--button-primary-bg-hover: color-mix(in srgb, var(--accent), black 15%);--button-primary-bg-active: color-mix(in srgb, var(--accent), black 30%);--button-secondary-bg-hover: color-mix(in srgb, var(--accent), white 90%);--button-secondary-bg-active: color-mix(in srgb, var(--accent), white 90%);--button-disabled-bg: color-mix(in srgb, var(--accent), white 60%);--text-disabled: color-mix(in srgb, var(--text-primary), white 40%);--icon-color: var(--accent);--border-color: #0000001a;--surface-bg: #ffffff7a;--surface-bg-hover: #ffffffa1;--surface-bg-active: #ffffffd5;--card-bg: #e5e5e5;--card-bg-secondary: #f5f5f5;--overlay-bg: rgba(0, 0, 0, .4);--muted-bg: rgba(0, 0, 0, .06);--text-primary: #000000;--text-secondary: #8b8b8b;--text-inverse: #ffffff;--sidebar-width: 200px}[data-theme=dark]{--button-secondary-bg-hover: #252628;--button-secondary-bg-active: #2b2f35;--button-disabled-bg: color-mix(in srgb, var(--accent), black 60%);--text-disabled: color-mix(in srgb, var(--text-primary), black 40%);--surface-bg: #1e1e1e7a;--surface-bg-hover: #2a2a2aa1;--surface-bg-active: #3a3a3ad5;--card-bg: #1d1d1d;--card-bg-secondary: #2a2a2a;--overlay-bg: rgba(255, 255, 255, .4);--muted-bg: rgba(255, 255, 255, .12);--text-primary: #ffffff;--text-inverse: #000000;--text-secondary: #b3b3b3}body{color:var(--text-primary);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[device-type=mobile] body{background-color:var(--card-bg-secondary)!important}*,*:before,*:after{box-sizing:border-box;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:rgba(0,0,0,0)}._sidebar_yoln4_1{width:var(--sidebar-width);background-color:var(--surface-bg);position:absolute;top:0;bottom:5px;height:auto;left:5px;border-radius:9px;transition:left .3s;display:flex;flex-direction:column;z-index:999;border:solid 1px var(--border-color);transform:translate(0)}._sidebarCollapsed_yoln4_18{left:calc(-1 * var(--sidebar-width) - 10px)}[device-type=mobile] ._sidebar_yoln4_1._sidebarMobile_yoln4_22{position:absolute;inset:0;width:auto;height:auto;border-radius:0;transition:transform .25s ease;background-color:var(--card-bg)}[device-type=mobile] ._sidebar_yoln4_1._sidebarMobile_yoln4_22._sidebarMobileHidden_yoln4_35{transform:translate(-105%)}._sidebarContent_yoln4_39{height:100%;padding:0 4px;display:flex;flex-direction:column;overflow-y:auto;gap:2px}._sidebarFooter_yoln4_48{padding:4px}._sidebarTitle_azx8n_1{font-size:.8rem;font-weight:600;margin:8px 8px 8px 4px;color:var(--text-secondary)}[device-type=mobile] ._sidebarTitle_azx8n_1{font-size:1.2rem}._sidebarItem_1e3ru_1{padding:6px;transition:background-color .1s;border-radius:8px;color:var(--text-primary);cursor:pointer;display:flex;flex-direction:row;justify-content:start;align-items:center;gap:8px}[device-type=mobile] ._sidebarItem_1e3ru_1{font-size:1.4rem}._sidebarItem_1e3ru_1:hover{background-color:var(--surface-bg-hover)}._sidebarItem_1e3ru_1._selected_1e3ru_22{background-color:var(--surface-bg-active);color:var(--icon-color)}._sidebarMainBtn_65l8c_1{width:calc(100% - 8px);background-color:var(--button-primary-bg);border:none;outline:none;color:var(--text-inverse);border-radius:5px;height:32px;margin:4px;font-weight:600;font-size:.9rem;transition:background-color .2s;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:8px;cursor:pointer}[device-type=mobile] ._sidebarMainBtn_65l8c_1{font-size:1.4rem;height:48px}._sidebarMainBtn_65l8c_1:hover{background-color:var(--button-primary-bg-hover)}._sidebarMainBtn_65l8c_1:active{background-color:var(--button-primary-bg-active)}._popupContainer_vz8rg_1{position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--overlay-bg);z-index:9999;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);opacity:1;transition:.2s;pointer-events:auto}._popupClosed_vz8rg_18{opacity:0;pointer-events:none}._popup_vz8rg_1{background-color:var(--card-bg);border-radius:8px;padding:12px;width:300px;height:auto;display:flex;flex-direction:column;justify-content:space-between;gap:12px}._popupIconContainer_vz8rg_35{display:flex;justify-content:center}._popupIcon_vz8rg_35{color:var(--icon-color)}._popupContent_vz8rg_44{display:flex;flex-direction:column;gap:8px}._popupTitle_4z5vb_1{margin:0;text-align:center;font-size:large;font-weight:700}[device-type=mobile] ._popupTitle_4z5vb_1{font-size:1.4rem}._popupDescription_4ewx1_1{text-align:center}[device-type=mobile] ._popupDescription_4ewx1_1{font-size:1.4rem}._popupInput_1b42s_1{width:100%;height:32px;background-color:var(--muted-bg);border:none;border-radius:5px;padding:4px 8px;font-size:1rem;color:var(--text-primary)}[device-type=mobile] ._popupInput_1b42s_1{font-size:1.4rem;height:48px}._popupActions_84v2b_1{display:flex;gap:8px}._popupBtn_ouvtc_1{width:100%;height:32px;border:none;border-radius:5px;font-weight:600;font-size:.9rem;background-color:var(--button-primary-bg);transition:background-color .2s;color:var(--text-inverse);cursor:pointer}[device-type=mobile] ._popupBtn_ouvtc_1{font-size:1.4rem;height:48px}._popupBtn_ouvtc_1:hover{background-color:var(--button-primary-bg-hover)}._popupBtn_ouvtc_1:active{background-color:var(--button-primary-bg-active)}._popupBtn_ouvtc_1._secondary_ouvtc_27{background-color:transparent;color:var(--text-primary);border:solid 1px var(--button-primary-bg);font-weight:400}._popupBtn_ouvtc_1._secondary_ouvtc_27:hover{background-color:var(--button-secondary-bg-hover)}._popupBtn_ouvtc_1._secondary_ouvtc_27:active{background-color:var(--button-secondary-bg-active)}._toolbar_11x84_1{position:absolute;top:0;left:calc(var(--sidebar-width) + 10px);width:calc(100% - calc(var(--sidebar-width) + 15px));height:32px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;z-index:990;transition:top .3s,left .3s,width .3s}._toolbarCollapsed_11x84_18{top:-100%}[device-type=mobile] ._toolbar_11x84_1{top:5px;height:48px}._toolbarExpanded_11x84_27{left:5px;width:calc(100% - 10px)}._toolbarTitle_11x84_32{margin:0;font-size:1rem;font-weight:600}._toolbarActions_11x84_38{background-color:var(--surface-bg);border-radius:16px;display:flex;flex-direction:row}._toolbarActions_11x84_38 button{width:32px;height:32px;background-color:transparent;border:none;outline:none;color:var(--icon-color);cursor:pointer}._toolbarTitle_m7x4e_1{margin:0;display:flex;justify-content:center;align-items:center;flex:1 1 auto;min-width:0;max-width:100%;overflow-y:hidden;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}._toolbarTitle_m7x4e_1::-webkit-scrollbar{display:none}._toolbarTitleContent_m7x4e_22{display:inline-block;width:max-content;max-width:none;white-space:nowrap;overflow-wrap:normal;word-break:keep-all}[device-type=mobile] ._toolbarTitle_m7x4e_1{font-size:1.4rem}._toolbarActions_l0jv2_1{background-color:var(--surface-bg);border-radius:16px;display:flex;flex-direction:row}[device-type=mobile] ._toolbarActions_l0jv2_1{border-radius:24px}._toolbarActions_l0jv2_1 button{background-color:transparent}._toolbarBtn_8jy1b_1{width:32px;height:32px;border:none;outline:none;padding:0;display:flex;justify-content:center;align-items:center;background-color:var(--surface-bg);border-radius:16px;color:var(--icon-color);transition:background-color .2s;cursor:pointer}._toolbarBtn_8jy1b_1:hover{background-color:var(--surface-bg-hover)}._toolbarBtn_8jy1b_1:active{background-color:var(--surface-bg-active)}[device-type=mobile] ._toolbarBtn_8jy1b_1{width:48px;height:48px;border-radius:24px}._sidebarIcon_1lib1_1{rotate:0deg;transition:rotate .3s}._sidebarIconExpanded_1lib1_6{rotate:180deg}._content_to68z_1{position:absolute;top:0;left:calc(var(--sidebar-width) + 10px);height:100%;width:calc(100% - calc(var(--sidebar-width) + 15px));transition:left .3s,width .3s;display:flex;flex-direction:column;justify-content:start;align-items:start;overflow:auto;padding-bottom:5px}._contentExpanded_to68z_18{left:5px;width:calc(100% - 10px)}._toolbarPresent_to68z_23{top:37px;height:calc(100% - 37px)}[device-type=mobile] ._content_to68z_1._toolbarPresent_to68z_23{top:58px;height:calc(100% - 58px)}._contentNoMargin_to68z_33{padding:0;left:calc(var(--sidebar-width))}._contentExpanded_to68z_18._contentNoMargin_to68z_33{left:0;width:100%}._contextMenu_v1bev_1{background-color:var(--surface-bg-active);position:fixed;border-radius:9px;z-index:9999;border:solid 1px var(--border-color);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);padding:4px;display:flex;flex-direction:column;opacity:0;visibility:hidden;pointer-events:none;transform-origin:var(--origin, top left);transform:scale(.8) translate(var(--tx-start)) translateY(var(--ty-start));transition:opacity .12s ease-out,transform .12s cubic-bezier(.4,0,.2,1),visibility .12s}._contextMenuOpen_v1bev_27{opacity:1;visibility:visible;pointer-events:auto;transform:scale(1) translate(0) translateY(0)}._listItem_1vjhk_1{padding:10px;transition:background-color .1s;border-radius:8px;color:var(--text-primary);cursor:pointer;display:flex;flex-direction:row;justify-content:start;align-items:center;gap:8px;width:100%}._listItem_1vjhk_1>svg{flex:0 0 auto}[device-type=mobile] ._listItem_1vjhk_1{font-size:1.4rem}._listItem_1vjhk_1:hover{background-color:var(--surface-bg-hover)}._listItem_1vjhk_1._selected_1vjhk_27{background-color:var(--surface-bg-active)}._emptyView_1synn_1{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;color:var(--text-secondary)}._card_zjz9h_1{background-color:var(--surface-bg);border-radius:9px;display:flex;flex-direction:column;border:solid 1px var(--border-color);padding:14px;margin:0 8px;width:calc(100% - 16px);gap:8px}._textInput_on5q4_1{width:100%;height:32px;background-color:var(--muted-bg);border:none;border-radius:5px;padding:4px 8px;font-size:.9rem;color:var(--text-primary);transition:background-color .2s}._textInput_on5q4_1:focus{outline:none;background-color:var(--surface-bg)}._textInput_on5q4_1:disabled{opacity:.5;cursor:not-allowed}._textInput_on5q4_1::placeholder{color:var(--text-secondary)}[device-type=mobile] ._textInput_on5q4_1{font-size:1.4rem;height:48px}._selectInput_3f04b_1{height:32px;background-color:var(--muted-bg);border:none;border-radius:5px;padding:4px 32px 4px 8px;font-size:.9rem;color:var(--text-primary);cursor:pointer;transition:background-color .2s;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6L8 10L12 6" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:right 8px center}._selectInput_3f04b_1:hover{background-color:var(--surface-bg-hover)}._selectInput_3f04b_1:focus{outline:none;background-color:var(--surface-bg)}._selectInput_3f04b_1:disabled{opacity:.5;cursor:not-allowed}[device-type=mobile] ._selectInput_3f04b_1{font-size:1.4rem;height:48px}._button_g5rur_1{width:100%;height:32px;border:none;border-radius:5px;font-weight:600;font-size:.9rem;background-color:var(--button-primary-bg);transition:background-color .2s;color:var(--text-inverse);cursor:pointer}[device-type=mobile] ._button_g5rur_1{font-size:1.4rem;height:48px}._button_g5rur_1:hover{background-color:var(--button-primary-bg-hover)}._button_g5rur_1:active{background-color:var(--button-primary-bg-active)}._button_g5rur_1._secondary_g5rur_27{background-color:transparent;color:var(--text-primary);border:solid 1px var(--button-primary-bg);font-weight:400}._button_g5rur_1._secondary_g5rur_27:hover{background-color:var(--button-secondary-bg-hover)}._button_g5rur_1._secondary_g5rur_27:active{background-color:var(--button-secondary-bg-active)}._button_g5rur_1:disabled{background-color:var(--button-disabled-bg);color:var(--text-disabled);cursor:not-allowed;opacity:.6}._balloon_1jdjr_1{position:fixed;z-index:1000;display:flex;flex-direction:column;width:256px;padding:14px;gap:8px;border-radius:9px;background-color:var(--surface-bg);border:solid 1px var(--border-color);align-items:center;box-sizing:border-box;transform-origin:50% calc(100% + 8px);transform:translate(-50%,calc(-100% - 8px)) scale(.1);filter:opacity(0);transition:.3s;pointer-events:none;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}._balloonOpen_1jdjr_22{transform:translate(-50%,calc(-100% - 8px)) scale(1);filter:opacity(1);pointer-events:auto}._balloon_1jdjr_1:after{content:"";position:absolute;bottom:-6px;left:50%;transform:translate(-50%) rotate(45deg);width:10px;height:10px;background-color:var(--surface-bg);border-right:solid 1px var(--border-color);border-bottom:solid 1px var(--border-color);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}[device-type=mobile] ._balloon_1jdjr_1{font-size:1.4rem}`)),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),c=require("react"),V=require("lucide-react"),S=c.createContext({isMobile:!1}),b=()=>c.useContext(S);function F({isMobile:t,sidebar:e,children:o,accentColor:n="#0088ff"}){return c.useLayoutEffect(()=>{n&&document.documentElement.style.setProperty("--accent",n)},[n]),s.jsx(S.Provider,{value:{isMobile:t},children:s.jsxs("div",{children:[s.jsx("aside",{children:e}),s.jsx("main",{children:o})]})})}const L="_sidebar_yoln4_1",q="_sidebarCollapsed_yoln4_18",W="_sidebarMobile_yoln4_22",K="_sidebarMobileHidden_yoln4_35",G="_sidebarContent_yoln4_39",J="_sidebarFooter_yoln4_48",d={sidebar:L,sidebarCollapsed:q,sidebarMobile:W,sidebarMobileHidden:K,sidebarContent:G,sidebarFooter:J};function Q({open:t,footer:e,children:o}){const{isMobile:n}=b();return s.jsxs("div",{className:`
3
3
  ${d.sidebar}
4
- ${e?"":d.sidebarCollapsed}
4
+ ${t?"":d.sidebarCollapsed}
5
5
  ${n?d.sidebarMobile:""}
6
- ${!e&&n?d.sidebarMobileHidden:""}`,children:[s.jsx("div",{className:d.sidebarContent,children:o}),t&&s.jsx("div",{className:d.sidebarFooter,children:t})]})}const U="_sidebarTitle_azx8n_1",X={sidebarTitle:U};function Y({children:e}){return s.jsx("h2",{className:X.sidebarTitle,children:e})}const Z="_sidebarItem_1e3ru_1",tt="_selected_1e3ru_22",M={sidebarItem:Z,selected:tt};function et({onClick:e,onContextMenu:t,selected:o=!1,children:n}){const r=a.useRef(null),c=i=>{r.current=setTimeout(()=>{t&&(i.preventDefault(),t(i))},500)},l=()=>{r.current&&clearTimeout(r.current)};return s.jsx("div",{className:`${M.sidebarItem} ${o?M.selected:""}`,onClick:e,onContextMenu:i=>{i.preventDefault(),t&&t(i)},onTouchStart:c,onTouchEnd:l,onTouchMove:l,children:n})}const ot="_sidebarMainBtn_65l8c_1",nt={sidebarMainBtn:ot};function st({onClick:e,children:t}){return s.jsx("button",{className:nt.sidebarMainBtn,onClick:e,children:t})}const rt="_popupContainer_vz8rg_1",it="_popupClosed_vz8rg_18",lt="_popup_vz8rg_1",ct="_popupContent_vz8rg_44",f={popupContainer:rt,popupClosed:it,popup:lt,popupContent:ct};function at({open:e=!1,children:t}){return s.jsx("div",{className:`${f.popupContainer} ${e?"":f.popupClosed}`,children:s.jsx("div",{className:f.popup,children:s.jsx("div",{className:f.popupContent,children:t})})})}const ut="_popupTitle_4z5vb_1",pt={popupTitle:ut};function dt({children:e}){return s.jsx("span",{className:pt.popupTitle,children:e})}const bt="_popupDescription_4ewx1_1",_t={popupDescription:bt};function ft({children:e}){return s.jsx("span",{className:_t.popupDescription,children:e})}const xt="_popupInput_1b42s_1",mt={popupInput:xt},yt=a.forwardRef(({placeholder:e="Enter text...",value:t,onChange:o,onSubmit:n,autoFocus:r},c)=>{const l=a.useRef(null),i=c||l;return a.useEffect(()=>{r&&i.current&&i.current.focus()},[r,i]),s.jsx("input",{ref:i,type:"text",className:mt.popupInput,placeholder:e,value:t,onChange:u=>o?.(u.target.value),onKeyDown:u=>{u.key==="Enter"&&n&&n(t||"")}})}),vt="_popupActions_84v2b_1",ht={popupActions:vt};function $t({orientation:e="vertical",children:t}){return s.jsx("div",{className:ht.popupActions,style:{flexDirection:e=="vertical"?"column":"row"},children:t})}const jt="_popupBtn_ouvtc_1",Tt="_secondary_ouvtc_27",I={popupBtn:jt,secondary:Tt};function gt({type:e="primary",onClick:t,children:o}){return s.jsx("button",{className:`${I.popupBtn} ${e=="secondary"?I.secondary:""}`,onClick:t,children:o})}const Mt="_toolbar_11x84_1",It="_toolbarCollapsed_11x84_18",Ct="_toolbarExpanded_11x84_27",x={toolbar:Mt,toolbarCollapsed:It,toolbarExpanded:Ct};function Nt({expanded:e=!0,collapsed:t=!1,children:o}){const{isMobile:n}=b();return s.jsx("div",{className:`${x.toolbar} ${e||n?x.toolbarExpanded:""} ${n?x.toolbarMobile:""} ${t?x.toolbarCollapsed:""}`,children:o})}const wt="_toolbarTitle_mpzr6_1",Et="_overflowing_mpzr6_22",Bt="_toolbarTitleContent_mpzr6_26",y={toolbarTitle:wt,overflowing:Et,toolbarTitleContent:Bt};function St({children:e}){const t=a.useRef(null),[o,n]=a.useState(!1);return a.useEffect(()=>{const r=()=>{if(!t.current)return;const{scrollWidth:l,clientWidth:i}=t.current;n(l>i+1)};r();const c=new ResizeObserver(r);return t.current&&c.observe(t.current),window.addEventListener("resize",r),()=>{c.disconnect(),window.removeEventListener("resize",r)}},[e]),s.jsx("h3",{ref:t,className:`${y.toolbarTitle} ${o?y.overflowing:""}`,children:s.jsx("span",{className:y.toolbarTitleContent,children:e})})}const zt="_toolbarActions_l0jv2_1",Pt={toolbarActions:zt};function Rt({children:e}){return s.jsx("div",{className:Pt.toolbarActions,children:e})}const Dt="_toolbarBtn_8jy1b_1",At={toolbarBtn:Dt};function S({onClick:e,children:t}){return s.jsx("button",{onClick:o=>{o.preventDefault(),e&&e(o)},className:At.toolbarBtn,children:t})}const Ot="_sidebarIcon_1lib1_1",kt="_sidebarIconExpanded_1lib1_6",C={sidebarIcon:Ot,sidebarIconExpanded:kt};function Lt({onToggleSidebar:e,expanded:t=!1}){const{isMobile:o}=b();return s.jsx(S,{onClick:e,children:s.jsx(H.Menu,{size:o?24:18,className:`${C.sidebarIcon} ${t?C.sidebarIconExpanded:""}`})})}const Ht="_content_to68z_1",Vt="_contentExpanded_to68z_18",Wt="_toolbarPresent_to68z_23",Ft="_contentNoMargin_to68z_33",m={content:Ht,contentExpanded:Vt,toolbarPresent:Wt,contentNoMargin:Ft};function qt({expanded:e=!0,toolbar:t=!0,margin:o="default",children:n}){return s.jsx("div",{className:`${m.content} ${e?m.contentExpanded:""} ${t?m.toolbarPresent:""} ${o==="none"?m.contentNoMargin:""}`,children:n})}const Kt="_contextMenu_v1bev_1",Gt="_contextMenuOpen_v1bev_27",Jt="_contextMenuMobile_v1bev_36",v={contextMenu:Kt,contextMenuOpen:Gt,contextMenuMobile:Jt};function Qt({open:e,x:t=20,y:o=20,from:n="auto",children:r}){const{isMobile:c}=b(),l=a.useRef(null),[i,u]=a.useState("top-left"),[p,h]=a.useState({top:o,left:t,bottom:"auto",right:"auto"});a.useLayoutEffect(()=>{if(!(!e||!l.current))if(n==="auto"){const _=l.current.getBoundingClientRect(),k=window.innerWidth,L=window.innerHeight;let $=t,j=o,T="top",g="left";t+_.width>k&&($=t-_.width,g="right"),o+_.height>L&&(j=o-_.height,T="bottom"),u(`${T}-${g}`),h({top:Math.max(5,j),left:Math.max(5,$),bottom:"auto",right:"auto"})}else u(n),h({top:n.includes("top")?o:"auto",bottom:n.includes("bottom")?o:"auto",left:n.includes("left")?t:"auto",right:n.includes("right")?t:"auto"})},[e,t,o,n]);const P={"top-left":{tx:"-10%",ty:"-10%",origin:"top left"},"top-right":{tx:"10%",ty:"-10%",origin:"top right"},"bottom-left":{tx:"-10%",ty:"10%",origin:"bottom left"},"bottom-right":{tx:"10%",ty:"10%",origin:"bottom right"}},{tx:R,ty:D,origin:A}=P[i],O={position:"fixed",top:typeof p.top=="number"?`${p.top}px`:"auto",bottom:typeof p.bottom=="number"?`${p.bottom}px`:"auto",left:typeof p.left=="number"?`${p.left}px`:"auto",right:typeof p.right=="number"?`${p.right}px`:"auto","--tx-start":R,"--ty-start":D,"--origin":A};return s.jsx("div",{ref:l,className:`
7
- ${v.contextMenu}
8
- ${e?v.contextMenuOpen:""}
9
- ${c?v.contextMenuMobile:""}
10
- `,style:O,children:r})}const Ut="_listItem_1vjhk_1",Xt="_selected_1vjhk_27",N={listItem:Ut,selected:Xt};function Yt({onClick:e,onContextMenu:t,selected:o=!1,children:n}){const r=a.useRef(null),c=i=>{r.current=setTimeout(()=>{t&&(i.preventDefault(),t(i))},500)},l=()=>{r.current&&clearTimeout(r.current)};return s.jsx("div",{className:`${N.listItem} ${o?N.selected:""}`,onClick:e,onContextMenu:i=>{i.preventDefault(),t&&t(i)},onTouchStart:c,onTouchEnd:l,onTouchMove:l,children:n})}function z({icon:e,size:t="default",color:o="default",className:n}){const{isMobile:r}=b(),c=t==="default"?r?24:18:t,l=o==="selected"?"var(--icon-color)":o;return o==="default"?s.jsx(e,{size:c,className:n,strokeWidth:r?2.5:2}):s.jsx(e,{size:c,color:l,className:n,strokeWidth:r?2.5:2})}const Zt="_emptyView_1synn_1",te={emptyView:Zt};function ee({icon:e,label:t}){const{isMobile:o}=b(),n=o?64:48;return s.jsxs("div",{className:te.emptyView,children:[s.jsx(z,{icon:e,size:n,color:"var(--text-secondary)"}),s.jsx("h2",{children:t})]})}const oe="_card_zjz9h_1",ne={card:oe};function se({children:e}){return s.jsx("div",{className:ne.card,children:e})}const re="_textInput_on5q4_1",ie={textInput:re},le=a.forwardRef(({placeholder:e,value:t,onChange:o,onFocus:n,onBlur:r,disabled:c=!1,type:l="text",className:i},u)=>s.jsx("input",{ref:u,type:l,className:`${ie.textInput} ${i||""}`,placeholder:e,value:t,onChange:p=>o?.(p.target.value),onFocus:n,onBlur:r,disabled:c})),ce="_selectInput_3f04b_1",ae={selectInput:ce},ue=a.forwardRef(({className:e,children:t,...o},n)=>s.jsx("select",{ref:n,className:`${ae.selectInput} ${e||""}`,...o,children:t})),pe="_button_g5rur_1",de="_secondary_g5rur_27",w={button:pe,secondary:de};function be({disabled:e=!1,type:t="primary",onClick:o,children:n,style:r}){return s.jsx("button",{className:`${w.button} ${t=="secondary"?w.secondary:""}`,onClick:o,disabled:e,style:r,children:n})}const _e="_balloon_1jdjr_1",fe="_balloonOpen_1jdjr_22",E={balloon:_e,balloonOpen:fe};function xe({open:e,x:t,y:o,children:n,className:r,style:c,...l}){const i={};typeof t=="number"&&(i.left=t),typeof o=="number"&&(i.top=o);const u=[E.balloon,e?E.balloonOpen:"",r??""].filter(Boolean).join(" ");return s.jsx("div",{...l,className:u,style:{...c,...i},children:n})}exports.AppShell=V;exports.Balloon=xe;exports.Button=be;exports.Card=se;exports.Content=qt;exports.ContextMenu=Qt;exports.EmptyView=ee;exports.Icon=z;exports.ListItem=Yt;exports.Popup=at;exports.PopupActions=$t;exports.PopupButton=gt;exports.PopupDescription=ft;exports.PopupInput=yt;exports.PopupTitle=dt;exports.SelectInput=ue;exports.Sidebar=Q;exports.SidebarButton=st;exports.SidebarItem=et;exports.SidebarTitle=Y;exports.TextInput=le;exports.Toolbar=Nt;exports.ToolbarActions=Rt;exports.ToolbarButton=S;exports.ToolbarExpandSidebarButton=Lt;exports.ToolbarTitle=St;
6
+ ${!t&&n?d.sidebarMobileHidden:""}`,children:[s.jsx("div",{className:d.sidebarContent,children:o}),e&&s.jsx("div",{className:d.sidebarFooter,children:e})]})}const U="_sidebarTitle_azx8n_1",X={sidebarTitle:U};function Y({children:t}){return s.jsx("h2",{className:X.sidebarTitle,children:t})}const Z="_sidebarItem_1e3ru_1",tt="_selected_1e3ru_22",M={sidebarItem:Z,selected:tt};function et({onClick:t,onContextMenu:e,selected:o=!1,children:n}){const r=c.useRef(null),a=i=>{r.current=setTimeout(()=>{e&&(i.preventDefault(),e(i))},500)},l=()=>{r.current&&clearTimeout(r.current)};return s.jsx("div",{className:`${M.sidebarItem} ${o?M.selected:""}`,onClick:t,onContextMenu:i=>{i.preventDefault(),e&&e(i)},onTouchStart:a,onTouchEnd:l,onTouchMove:l,children:n})}const ot="_sidebarMainBtn_65l8c_1",nt={sidebarMainBtn:ot};function st({onClick:t,children:e}){return s.jsx("button",{className:nt.sidebarMainBtn,onClick:t,children:e})}const it="_popupContainer_vz8rg_1",rt="_popupClosed_vz8rg_18",lt="_popup_vz8rg_1",at="_popupContent_vz8rg_44",f={popupContainer:it,popupClosed:rt,popup:lt,popupContent:at};function ct({open:t=!1,children:e}){return s.jsx("div",{className:`${f.popupContainer} ${t?"":f.popupClosed}`,children:s.jsx("div",{className:f.popup,children:s.jsx("div",{className:f.popupContent,children:e})})})}const ut="_popupTitle_4z5vb_1",pt={popupTitle:ut};function dt({children:t}){return s.jsx("span",{className:pt.popupTitle,children:t})}const bt="_popupDescription_4ewx1_1",_t={popupDescription:bt};function ft({children:t}){return s.jsx("span",{className:_t.popupDescription,children:t})}const xt="_popupInput_1b42s_1",mt={popupInput:xt},yt=c.forwardRef(({placeholder:t="Enter text...",value:e,onChange:o,onSubmit:n,autoFocus:r},a)=>{const l=c.useRef(null),i=a||l;return c.useEffect(()=>{r&&i.current&&i.current.focus()},[r,i]),s.jsx("input",{ref:i,type:"text",className:mt.popupInput,placeholder:t,value:e,onChange:u=>o?.(u.target.value),onKeyDown:u=>{u.key==="Enter"&&n&&n(e||"")}})}),ht="_popupActions_84v2b_1",$t={popupActions:ht};function vt({orientation:t="vertical",children:e}){return s.jsx("div",{className:$t.popupActions,style:{flexDirection:t=="vertical"?"column":"row"},children:e})}const jt="_popupBtn_ouvtc_1",Tt="_secondary_ouvtc_27",g={popupBtn:jt,secondary:Tt};function Mt({type:t="primary",onClick:e,children:o}){return s.jsx("button",{className:`${g.popupBtn} ${t=="secondary"?g.secondary:""}`,onClick:e,children:o})}const gt="_toolbar_11x84_1",It="_toolbarCollapsed_11x84_18",Ct="_toolbarExpanded_11x84_27",x={toolbar:gt,toolbarCollapsed:It,toolbarExpanded:Ct};function Nt({expanded:t=!0,collapsed:e=!1,children:o}){const{isMobile:n}=b();return s.jsx("div",{className:`${x.toolbar} ${t||n?x.toolbarExpanded:""} ${n?x.toolbarMobile:""} ${e?x.toolbarCollapsed:""}`,children:o})}const Bt="_toolbarTitle_m7x4e_1",Et="_toolbarTitleContent_m7x4e_22",I={toolbarTitle:Bt,toolbarTitleContent:Et};function St({children:t}){return s.jsx("h3",{className:I.toolbarTitle,children:s.jsx("span",{className:I.toolbarTitleContent,children:t})})}const wt="_toolbarActions_l0jv2_1",Pt={toolbarActions:wt};function zt({children:t}){return s.jsx("div",{className:Pt.toolbarActions,children:t})}const Rt="_toolbarBtn_8jy1b_1",Dt={toolbarBtn:Rt};function w({onClick:t,children:e}){return s.jsx("button",{onClick:o=>{o.preventDefault(),t&&t(o)},className:Dt.toolbarBtn,children:e})}const At="_sidebarIcon_1lib1_1",Ot="_sidebarIconExpanded_1lib1_6",C={sidebarIcon:At,sidebarIconExpanded:Ot};function kt({onToggleSidebar:t,expanded:e=!1}){const{isMobile:o}=b();return s.jsx(w,{onClick:t,children:s.jsx(V.Menu,{size:o?24:18,className:`${C.sidebarIcon} ${e?C.sidebarIconExpanded:""}`})})}const Ht="_content_to68z_1",Vt="_contentExpanded_to68z_18",Ft="_toolbarPresent_to68z_23",Lt="_contentNoMargin_to68z_33",m={content:Ht,contentExpanded:Vt,toolbarPresent:Ft,contentNoMargin:Lt};function qt({expanded:t=!0,toolbar:e=!0,margin:o="default",children:n}){return s.jsx("div",{className:`${m.content} ${t?m.contentExpanded:""} ${e?m.toolbarPresent:""} ${o==="none"?m.contentNoMargin:""}`,children:n})}const Wt="_contextMenu_v1bev_1",Kt="_contextMenuOpen_v1bev_27",Gt="_contextMenuMobile_v1bev_36",y={contextMenu:Wt,contextMenuOpen:Kt,contextMenuMobile:Gt};function Jt({open:t,x:e=20,y:o=20,from:n="auto",children:r}){const{isMobile:a}=b(),l=c.useRef(null),[i,u]=c.useState("top-left"),[p,h]=c.useState({top:o,left:e,bottom:"auto",right:"auto"});c.useLayoutEffect(()=>{if(!(!t||!l.current))if(n==="auto"){const _=l.current.getBoundingClientRect(),k=window.innerWidth,H=window.innerHeight;let $=e,v=o,j="top",T="left";e+_.width>k&&($=e-_.width,T="right"),o+_.height>H&&(v=o-_.height,j="bottom"),u(`${j}-${T}`),h({top:Math.max(5,v),left:Math.max(5,$),bottom:"auto",right:"auto"})}else u(n),h({top:n.includes("top")?o:"auto",bottom:n.includes("bottom")?o:"auto",left:n.includes("left")?e:"auto",right:n.includes("right")?e:"auto"})},[t,e,o,n]);const z={"top-left":{tx:"-10%",ty:"-10%",origin:"top left"},"top-right":{tx:"10%",ty:"-10%",origin:"top right"},"bottom-left":{tx:"-10%",ty:"10%",origin:"bottom left"},"bottom-right":{tx:"10%",ty:"10%",origin:"bottom right"}},{tx:R,ty:D,origin:A}=z[i],O={position:"fixed",top:typeof p.top=="number"?`${p.top}px`:"auto",bottom:typeof p.bottom=="number"?`${p.bottom}px`:"auto",left:typeof p.left=="number"?`${p.left}px`:"auto",right:typeof p.right=="number"?`${p.right}px`:"auto","--tx-start":R,"--ty-start":D,"--origin":A};return s.jsx("div",{ref:l,className:`
7
+ ${y.contextMenu}
8
+ ${t?y.contextMenuOpen:""}
9
+ ${a?y.contextMenuMobile:""}
10
+ `,style:O,children:r})}const Qt="_listItem_1vjhk_1",Ut="_selected_1vjhk_27",N={listItem:Qt,selected:Ut};function Xt({onClick:t,onContextMenu:e,selected:o=!1,children:n}){const r=c.useRef(null),a=i=>{r.current=setTimeout(()=>{e&&(i.preventDefault(),e(i))},500)},l=()=>{r.current&&clearTimeout(r.current)};return s.jsx("div",{className:`${N.listItem} ${o?N.selected:""}`,onClick:t,onContextMenu:i=>{i.preventDefault(),e&&e(i)},onTouchStart:a,onTouchEnd:l,onTouchMove:l,children:n})}function P({icon:t,size:e="default",color:o="default",className:n}){const{isMobile:r}=b(),a=e==="default"?r?24:18:e,l=o==="selected"?"var(--icon-color)":o;return o==="default"?s.jsx(t,{size:a,className:n,strokeWidth:r?2.5:2}):s.jsx(t,{size:a,color:l,className:n,strokeWidth:r?2.5:2})}const Yt="_emptyView_1synn_1",Zt={emptyView:Yt};function te({icon:t,label:e}){const{isMobile:o}=b(),n=o?64:48;return s.jsxs("div",{className:Zt.emptyView,children:[s.jsx(P,{icon:t,size:n,color:"var(--text-secondary)"}),s.jsx("h2",{children:e})]})}const ee="_card_zjz9h_1",oe={card:ee};function ne({children:t}){return s.jsx("div",{className:oe.card,children:t})}const se="_textInput_on5q4_1",ie={textInput:se},re=c.forwardRef(({placeholder:t,value:e,onChange:o,onFocus:n,onBlur:r,disabled:a=!1,type:l="text",className:i},u)=>s.jsx("input",{ref:u,type:l,className:`${ie.textInput} ${i||""}`,placeholder:t,value:e,onChange:p=>o?.(p.target.value),onFocus:n,onBlur:r,disabled:a})),le="_selectInput_3f04b_1",ae={selectInput:le},ce=c.forwardRef(({className:t,children:e,...o},n)=>s.jsx("select",{ref:n,className:`${ae.selectInput} ${t||""}`,...o,children:e})),ue="_button_g5rur_1",pe="_secondary_g5rur_27",B={button:ue,secondary:pe};function de({disabled:t=!1,type:e="primary",onClick:o,children:n,style:r}){return s.jsx("button",{className:`${B.button} ${e=="secondary"?B.secondary:""}`,onClick:o,disabled:t,style:r,children:n})}const be="_balloon_1jdjr_1",_e="_balloonOpen_1jdjr_22",E={balloon:be,balloonOpen:_e};function fe({open:t,x:e,y:o,children:n,className:r,style:a,...l}){const i={};typeof e=="number"&&(i.left=e),typeof o=="number"&&(i.top=o);const u=[E.balloon,t?E.balloonOpen:"",r??""].filter(Boolean).join(" ");return s.jsx("div",{...l,className:u,style:{...a,...i},children:n})}exports.AppShell=F;exports.Balloon=fe;exports.Button=de;exports.Card=ne;exports.Content=qt;exports.ContextMenu=Jt;exports.EmptyView=te;exports.Icon=P;exports.ListItem=Xt;exports.Popup=ct;exports.PopupActions=vt;exports.PopupButton=Mt;exports.PopupDescription=ft;exports.PopupInput=yt;exports.PopupTitle=dt;exports.SelectInput=ce;exports.Sidebar=Q;exports.SidebarButton=st;exports.SidebarItem=et;exports.SidebarTitle=Y;exports.TextInput=re;exports.Toolbar=Nt;exports.ToolbarActions=zt;exports.ToolbarButton=w;exports.ToolbarExpandSidebarButton=kt;exports.ToolbarTitle=St;
package/dist/htmlos-ui.js CHANGED
@@ -1,22 +1,22 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(`:root{--accent: #0088ff;--button-primary-bg: var(--accent);--button-primary-bg-hover: color-mix(in srgb, var(--accent), black 15%);--button-primary-bg-active: color-mix(in srgb, var(--accent), black 30%);--button-secondary-bg-hover: color-mix(in srgb, var(--accent), white 90%);--button-secondary-bg-active: color-mix(in srgb, var(--accent), white 90%);--button-disabled-bg: color-mix(in srgb, var(--accent), white 60%);--text-disabled: color-mix(in srgb, var(--text-primary), white 40%);--icon-color: var(--accent);--border-color: #0000001a;--surface-bg: #ffffff7a;--surface-bg-hover: #ffffffa1;--surface-bg-active: #ffffffd5;--card-bg: #e5e5e5;--card-bg-secondary: #f5f5f5;--overlay-bg: rgba(0, 0, 0, .4);--muted-bg: rgba(0, 0, 0, .06);--text-primary: #000000;--text-secondary: #8b8b8b;--text-inverse: #ffffff;--sidebar-width: 200px}[data-theme=dark]{--button-secondary-bg-hover: #252628;--button-secondary-bg-active: #2b2f35;--button-disabled-bg: color-mix(in srgb, var(--accent), black 60%);--text-disabled: color-mix(in srgb, var(--text-primary), black 40%);--surface-bg: #1e1e1e7a;--surface-bg-hover: #2a2a2aa1;--surface-bg-active: #3a3a3ad5;--card-bg: #1d1d1d;--card-bg-secondary: #2a2a2a;--overlay-bg: rgba(255, 255, 255, .4);--muted-bg: rgba(255, 255, 255, .12);--text-primary: #ffffff;--text-inverse: #000000;--text-secondary: #b3b3b3}body{color:var(--text-primary);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[device-type=mobile] body{background-color:var(--card-bg-secondary)!important}*,*:before,*:after{box-sizing:border-box;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:rgba(0,0,0,0)}._sidebar_yoln4_1{width:var(--sidebar-width);background-color:var(--surface-bg);position:absolute;top:0;bottom:5px;height:auto;left:5px;border-radius:9px;transition:left .3s;display:flex;flex-direction:column;z-index:999;border:solid 1px var(--border-color);transform:translate(0)}._sidebarCollapsed_yoln4_18{left:calc(-1 * var(--sidebar-width) - 10px)}[device-type=mobile] ._sidebar_yoln4_1._sidebarMobile_yoln4_22{position:absolute;inset:0;width:auto;height:auto;border-radius:0;transition:transform .25s ease;background-color:var(--card-bg)}[device-type=mobile] ._sidebar_yoln4_1._sidebarMobile_yoln4_22._sidebarMobileHidden_yoln4_35{transform:translate(-105%)}._sidebarContent_yoln4_39{height:100%;padding:0 4px;display:flex;flex-direction:column;overflow-y:auto;gap:2px}._sidebarFooter_yoln4_48{padding:4px}._sidebarTitle_azx8n_1{font-size:.8rem;font-weight:600;margin:8px 8px 8px 4px;color:var(--text-secondary)}[device-type=mobile] ._sidebarTitle_azx8n_1{font-size:1.2rem}._sidebarItem_1e3ru_1{padding:6px;transition:background-color .1s;border-radius:8px;color:var(--text-primary);cursor:pointer;display:flex;flex-direction:row;justify-content:start;align-items:center;gap:8px}[device-type=mobile] ._sidebarItem_1e3ru_1{font-size:1.4rem}._sidebarItem_1e3ru_1:hover{background-color:var(--surface-bg-hover)}._sidebarItem_1e3ru_1._selected_1e3ru_22{background-color:var(--surface-bg-active);color:var(--icon-color)}._sidebarMainBtn_65l8c_1{width:calc(100% - 8px);background-color:var(--button-primary-bg);border:none;outline:none;color:var(--text-inverse);border-radius:5px;height:32px;margin:4px;font-weight:600;font-size:.9rem;transition:background-color .2s;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:8px;cursor:pointer}[device-type=mobile] ._sidebarMainBtn_65l8c_1{font-size:1.4rem;height:48px}._sidebarMainBtn_65l8c_1:hover{background-color:var(--button-primary-bg-hover)}._sidebarMainBtn_65l8c_1:active{background-color:var(--button-primary-bg-active)}._popupContainer_vz8rg_1{position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--overlay-bg);z-index:9999;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);opacity:1;transition:.2s;pointer-events:auto}._popupClosed_vz8rg_18{opacity:0;pointer-events:none}._popup_vz8rg_1{background-color:var(--card-bg);border-radius:8px;padding:12px;width:300px;height:auto;display:flex;flex-direction:column;justify-content:space-between;gap:12px}._popupIconContainer_vz8rg_35{display:flex;justify-content:center}._popupIcon_vz8rg_35{color:var(--icon-color)}._popupContent_vz8rg_44{display:flex;flex-direction:column;gap:8px}._popupTitle_4z5vb_1{margin:0;text-align:center;font-size:large;font-weight:700}[device-type=mobile] ._popupTitle_4z5vb_1{font-size:1.4rem}._popupDescription_4ewx1_1{text-align:center}[device-type=mobile] ._popupDescription_4ewx1_1{font-size:1.4rem}._popupInput_1b42s_1{width:100%;height:32px;background-color:var(--muted-bg);border:none;border-radius:5px;padding:4px 8px;font-size:1rem;color:var(--text-primary)}[device-type=mobile] ._popupInput_1b42s_1{font-size:1.4rem;height:48px}._popupActions_84v2b_1{display:flex;gap:8px}._popupBtn_ouvtc_1{width:100%;height:32px;border:none;border-radius:5px;font-weight:600;font-size:.9rem;background-color:var(--button-primary-bg);transition:background-color .2s;color:var(--text-inverse);cursor:pointer}[device-type=mobile] ._popupBtn_ouvtc_1{font-size:1.4rem;height:48px}._popupBtn_ouvtc_1:hover{background-color:var(--button-primary-bg-hover)}._popupBtn_ouvtc_1:active{background-color:var(--button-primary-bg-active)}._popupBtn_ouvtc_1._secondary_ouvtc_27{background-color:transparent;color:var(--text-primary);border:solid 1px var(--button-primary-bg);font-weight:400}._popupBtn_ouvtc_1._secondary_ouvtc_27:hover{background-color:var(--button-secondary-bg-hover)}._popupBtn_ouvtc_1._secondary_ouvtc_27:active{background-color:var(--button-secondary-bg-active)}._toolbar_11x84_1{position:absolute;top:0;left:calc(var(--sidebar-width) + 10px);width:calc(100% - calc(var(--sidebar-width) + 15px));height:32px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;z-index:990;transition:top .3s,left .3s,width .3s}._toolbarCollapsed_11x84_18{top:-100%}[device-type=mobile] ._toolbar_11x84_1{top:5px;height:48px}._toolbarExpanded_11x84_27{left:5px;width:calc(100% - 10px)}._toolbarTitle_11x84_32{margin:0;font-size:1rem;font-weight:600}._toolbarActions_11x84_38{background-color:var(--surface-bg);border-radius:16px;display:flex;flex-direction:row}._toolbarActions_11x84_38 button{width:32px;height:32px;background-color:transparent;border:none;outline:none;color:var(--icon-color);cursor:pointer}._toolbarTitle_mpzr6_1{margin:0;display:flex;justify-content:center;align-items:center;flex:1 1 auto;min-width:0;max-width:100%;overflow-y:hidden;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}._toolbarTitle_mpzr6_1::-webkit-scrollbar{display:none}._toolbarTitle_mpzr6_1._overflowing_mpzr6_22{justify-content:flex-start}._toolbarTitleContent_mpzr6_26{display:inline-block;width:max-content;max-width:none;white-space:nowrap;overflow-wrap:normal;word-break:keep-all}[device-type=mobile] ._toolbarTitle_mpzr6_1{font-size:1.4rem}._toolbarActions_l0jv2_1{background-color:var(--surface-bg);border-radius:16px;display:flex;flex-direction:row}[device-type=mobile] ._toolbarActions_l0jv2_1{border-radius:24px}._toolbarActions_l0jv2_1 button{background-color:transparent}._toolbarBtn_8jy1b_1{width:32px;height:32px;border:none;outline:none;padding:0;display:flex;justify-content:center;align-items:center;background-color:var(--surface-bg);border-radius:16px;color:var(--icon-color);transition:background-color .2s;cursor:pointer}._toolbarBtn_8jy1b_1:hover{background-color:var(--surface-bg-hover)}._toolbarBtn_8jy1b_1:active{background-color:var(--surface-bg-active)}[device-type=mobile] ._toolbarBtn_8jy1b_1{width:48px;height:48px;border-radius:24px}._sidebarIcon_1lib1_1{rotate:0deg;transition:rotate .3s}._sidebarIconExpanded_1lib1_6{rotate:180deg}._content_to68z_1{position:absolute;top:0;left:calc(var(--sidebar-width) + 10px);height:100%;width:calc(100% - calc(var(--sidebar-width) + 15px));transition:left .3s,width .3s;display:flex;flex-direction:column;justify-content:start;align-items:start;overflow:auto;padding-bottom:5px}._contentExpanded_to68z_18{left:5px;width:calc(100% - 10px)}._toolbarPresent_to68z_23{top:37px;height:calc(100% - 37px)}[device-type=mobile] ._content_to68z_1._toolbarPresent_to68z_23{top:58px;height:calc(100% - 58px)}._contentNoMargin_to68z_33{padding:0;left:calc(var(--sidebar-width))}._contentExpanded_to68z_18._contentNoMargin_to68z_33{left:0;width:100%}._contextMenu_v1bev_1{background-color:var(--surface-bg-active);position:fixed;border-radius:9px;z-index:9999;border:solid 1px var(--border-color);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);padding:4px;display:flex;flex-direction:column;opacity:0;visibility:hidden;pointer-events:none;transform-origin:var(--origin, top left);transform:scale(.8) translate(var(--tx-start)) translateY(var(--ty-start));transition:opacity .12s ease-out,transform .12s cubic-bezier(.4,0,.2,1),visibility .12s}._contextMenuOpen_v1bev_27{opacity:1;visibility:visible;pointer-events:auto;transform:scale(1) translate(0) translateY(0)}._listItem_1vjhk_1{padding:10px;transition:background-color .1s;border-radius:8px;color:var(--text-primary);cursor:pointer;display:flex;flex-direction:row;justify-content:start;align-items:center;gap:8px;width:100%}._listItem_1vjhk_1>svg{flex:0 0 auto}[device-type=mobile] ._listItem_1vjhk_1{font-size:1.4rem}._listItem_1vjhk_1:hover{background-color:var(--surface-bg-hover)}._listItem_1vjhk_1._selected_1vjhk_27{background-color:var(--surface-bg-active)}._emptyView_1synn_1{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;color:var(--text-secondary)}._card_zjz9h_1{background-color:var(--surface-bg);border-radius:9px;display:flex;flex-direction:column;border:solid 1px var(--border-color);padding:14px;margin:0 8px;width:calc(100% - 16px);gap:8px}._textInput_on5q4_1{width:100%;height:32px;background-color:var(--muted-bg);border:none;border-radius:5px;padding:4px 8px;font-size:.9rem;color:var(--text-primary);transition:background-color .2s}._textInput_on5q4_1:focus{outline:none;background-color:var(--surface-bg)}._textInput_on5q4_1:disabled{opacity:.5;cursor:not-allowed}._textInput_on5q4_1::placeholder{color:var(--text-secondary)}[device-type=mobile] ._textInput_on5q4_1{font-size:1.4rem;height:48px}._selectInput_3f04b_1{height:32px;background-color:var(--muted-bg);border:none;border-radius:5px;padding:4px 32px 4px 8px;font-size:.9rem;color:var(--text-primary);cursor:pointer;transition:background-color .2s;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6L8 10L12 6" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:right 8px center}._selectInput_3f04b_1:hover{background-color:var(--surface-bg-hover)}._selectInput_3f04b_1:focus{outline:none;background-color:var(--surface-bg)}._selectInput_3f04b_1:disabled{opacity:.5;cursor:not-allowed}[device-type=mobile] ._selectInput_3f04b_1{font-size:1.4rem;height:48px}._button_g5rur_1{width:100%;height:32px;border:none;border-radius:5px;font-weight:600;font-size:.9rem;background-color:var(--button-primary-bg);transition:background-color .2s;color:var(--text-inverse);cursor:pointer}[device-type=mobile] ._button_g5rur_1{font-size:1.4rem;height:48px}._button_g5rur_1:hover{background-color:var(--button-primary-bg-hover)}._button_g5rur_1:active{background-color:var(--button-primary-bg-active)}._button_g5rur_1._secondary_g5rur_27{background-color:transparent;color:var(--text-primary);border:solid 1px var(--button-primary-bg);font-weight:400}._button_g5rur_1._secondary_g5rur_27:hover{background-color:var(--button-secondary-bg-hover)}._button_g5rur_1._secondary_g5rur_27:active{background-color:var(--button-secondary-bg-active)}._button_g5rur_1:disabled{background-color:var(--button-disabled-bg);color:var(--text-disabled);cursor:not-allowed;opacity:.6}._balloon_1jdjr_1{position:fixed;z-index:1000;display:flex;flex-direction:column;width:256px;padding:14px;gap:8px;border-radius:9px;background-color:var(--surface-bg);border:solid 1px var(--border-color);align-items:center;box-sizing:border-box;transform-origin:50% calc(100% + 8px);transform:translate(-50%,calc(-100% - 8px)) scale(.1);filter:opacity(0);transition:.3s;pointer-events:none;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}._balloonOpen_1jdjr_22{transform:translate(-50%,calc(-100% - 8px)) scale(1);filter:opacity(1);pointer-events:auto}._balloon_1jdjr_1:after{content:"";position:absolute;bottom:-6px;left:50%;transform:translate(-50%) rotate(45deg);width:10px;height:10px;background-color:var(--surface-bg);border-right:solid 1px var(--border-color);border-bottom:solid 1px var(--border-color);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}[device-type=mobile] ._balloon_1jdjr_1{font-size:1.4rem}`)),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
- import { jsx as s, jsxs as x } from "react/jsx-runtime";
3
- import { createContext as V, useContext as q, useLayoutEffect as j, useRef as b, forwardRef as g, useEffect as O, useState as $ } from "react";
1
+ (function(){"use strict";try{if(typeof document<"u"){var r=document.createElement("style");r.appendChild(document.createTextNode(`:root{--accent: #0088ff;--button-primary-bg: var(--accent);--button-primary-bg-hover: color-mix(in srgb, var(--accent), black 15%);--button-primary-bg-active: color-mix(in srgb, var(--accent), black 30%);--button-secondary-bg-hover: color-mix(in srgb, var(--accent), white 90%);--button-secondary-bg-active: color-mix(in srgb, var(--accent), white 90%);--button-disabled-bg: color-mix(in srgb, var(--accent), white 60%);--text-disabled: color-mix(in srgb, var(--text-primary), white 40%);--icon-color: var(--accent);--border-color: #0000001a;--surface-bg: #ffffff7a;--surface-bg-hover: #ffffffa1;--surface-bg-active: #ffffffd5;--card-bg: #e5e5e5;--card-bg-secondary: #f5f5f5;--overlay-bg: rgba(0, 0, 0, .4);--muted-bg: rgba(0, 0, 0, .06);--text-primary: #000000;--text-secondary: #8b8b8b;--text-inverse: #ffffff;--sidebar-width: 200px}[data-theme=dark]{--button-secondary-bg-hover: #252628;--button-secondary-bg-active: #2b2f35;--button-disabled-bg: color-mix(in srgb, var(--accent), black 60%);--text-disabled: color-mix(in srgb, var(--text-primary), black 40%);--surface-bg: #1e1e1e7a;--surface-bg-hover: #2a2a2aa1;--surface-bg-active: #3a3a3ad5;--card-bg: #1d1d1d;--card-bg-secondary: #2a2a2a;--overlay-bg: rgba(255, 255, 255, .4);--muted-bg: rgba(255, 255, 255, .12);--text-primary: #ffffff;--text-inverse: #000000;--text-secondary: #b3b3b3}body{color:var(--text-primary);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}[device-type=mobile] body{background-color:var(--card-bg-secondary)!important}*,*:before,*:after{box-sizing:border-box;-webkit-tap-highlight-color:transparent;-webkit-tap-highlight-color:rgba(0,0,0,0)}._sidebar_yoln4_1{width:var(--sidebar-width);background-color:var(--surface-bg);position:absolute;top:0;bottom:5px;height:auto;left:5px;border-radius:9px;transition:left .3s;display:flex;flex-direction:column;z-index:999;border:solid 1px var(--border-color);transform:translate(0)}._sidebarCollapsed_yoln4_18{left:calc(-1 * var(--sidebar-width) - 10px)}[device-type=mobile] ._sidebar_yoln4_1._sidebarMobile_yoln4_22{position:absolute;inset:0;width:auto;height:auto;border-radius:0;transition:transform .25s ease;background-color:var(--card-bg)}[device-type=mobile] ._sidebar_yoln4_1._sidebarMobile_yoln4_22._sidebarMobileHidden_yoln4_35{transform:translate(-105%)}._sidebarContent_yoln4_39{height:100%;padding:0 4px;display:flex;flex-direction:column;overflow-y:auto;gap:2px}._sidebarFooter_yoln4_48{padding:4px}._sidebarTitle_azx8n_1{font-size:.8rem;font-weight:600;margin:8px 8px 8px 4px;color:var(--text-secondary)}[device-type=mobile] ._sidebarTitle_azx8n_1{font-size:1.2rem}._sidebarItem_1e3ru_1{padding:6px;transition:background-color .1s;border-radius:8px;color:var(--text-primary);cursor:pointer;display:flex;flex-direction:row;justify-content:start;align-items:center;gap:8px}[device-type=mobile] ._sidebarItem_1e3ru_1{font-size:1.4rem}._sidebarItem_1e3ru_1:hover{background-color:var(--surface-bg-hover)}._sidebarItem_1e3ru_1._selected_1e3ru_22{background-color:var(--surface-bg-active);color:var(--icon-color)}._sidebarMainBtn_65l8c_1{width:calc(100% - 8px);background-color:var(--button-primary-bg);border:none;outline:none;color:var(--text-inverse);border-radius:5px;height:32px;margin:4px;font-weight:600;font-size:.9rem;transition:background-color .2s;display:flex;flex-direction:row;justify-content:center;align-items:center;gap:8px;cursor:pointer}[device-type=mobile] ._sidebarMainBtn_65l8c_1{font-size:1.4rem;height:48px}._sidebarMainBtn_65l8c_1:hover{background-color:var(--button-primary-bg-hover)}._sidebarMainBtn_65l8c_1:active{background-color:var(--button-primary-bg-active)}._popupContainer_vz8rg_1{position:fixed;top:0;left:0;width:100%;height:100%;background-color:var(--overlay-bg);z-index:9999;display:flex;justify-content:center;align-items:center;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);opacity:1;transition:.2s;pointer-events:auto}._popupClosed_vz8rg_18{opacity:0;pointer-events:none}._popup_vz8rg_1{background-color:var(--card-bg);border-radius:8px;padding:12px;width:300px;height:auto;display:flex;flex-direction:column;justify-content:space-between;gap:12px}._popupIconContainer_vz8rg_35{display:flex;justify-content:center}._popupIcon_vz8rg_35{color:var(--icon-color)}._popupContent_vz8rg_44{display:flex;flex-direction:column;gap:8px}._popupTitle_4z5vb_1{margin:0;text-align:center;font-size:large;font-weight:700}[device-type=mobile] ._popupTitle_4z5vb_1{font-size:1.4rem}._popupDescription_4ewx1_1{text-align:center}[device-type=mobile] ._popupDescription_4ewx1_1{font-size:1.4rem}._popupInput_1b42s_1{width:100%;height:32px;background-color:var(--muted-bg);border:none;border-radius:5px;padding:4px 8px;font-size:1rem;color:var(--text-primary)}[device-type=mobile] ._popupInput_1b42s_1{font-size:1.4rem;height:48px}._popupActions_84v2b_1{display:flex;gap:8px}._popupBtn_ouvtc_1{width:100%;height:32px;border:none;border-radius:5px;font-weight:600;font-size:.9rem;background-color:var(--button-primary-bg);transition:background-color .2s;color:var(--text-inverse);cursor:pointer}[device-type=mobile] ._popupBtn_ouvtc_1{font-size:1.4rem;height:48px}._popupBtn_ouvtc_1:hover{background-color:var(--button-primary-bg-hover)}._popupBtn_ouvtc_1:active{background-color:var(--button-primary-bg-active)}._popupBtn_ouvtc_1._secondary_ouvtc_27{background-color:transparent;color:var(--text-primary);border:solid 1px var(--button-primary-bg);font-weight:400}._popupBtn_ouvtc_1._secondary_ouvtc_27:hover{background-color:var(--button-secondary-bg-hover)}._popupBtn_ouvtc_1._secondary_ouvtc_27:active{background-color:var(--button-secondary-bg-active)}._toolbar_11x84_1{position:absolute;top:0;left:calc(var(--sidebar-width) + 10px);width:calc(100% - calc(var(--sidebar-width) + 15px));height:32px;display:flex;flex-direction:row;justify-content:space-between;align-items:center;z-index:990;transition:top .3s,left .3s,width .3s}._toolbarCollapsed_11x84_18{top:-100%}[device-type=mobile] ._toolbar_11x84_1{top:5px;height:48px}._toolbarExpanded_11x84_27{left:5px;width:calc(100% - 10px)}._toolbarTitle_11x84_32{margin:0;font-size:1rem;font-weight:600}._toolbarActions_11x84_38{background-color:var(--surface-bg);border-radius:16px;display:flex;flex-direction:row}._toolbarActions_11x84_38 button{width:32px;height:32px;background-color:transparent;border:none;outline:none;color:var(--icon-color);cursor:pointer}._toolbarTitle_m7x4e_1{margin:0;display:flex;justify-content:center;align-items:center;flex:1 1 auto;min-width:0;max-width:100%;overflow-y:hidden;overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:none;-ms-overflow-style:none}._toolbarTitle_m7x4e_1::-webkit-scrollbar{display:none}._toolbarTitleContent_m7x4e_22{display:inline-block;width:max-content;max-width:none;white-space:nowrap;overflow-wrap:normal;word-break:keep-all}[device-type=mobile] ._toolbarTitle_m7x4e_1{font-size:1.4rem}._toolbarActions_l0jv2_1{background-color:var(--surface-bg);border-radius:16px;display:flex;flex-direction:row}[device-type=mobile] ._toolbarActions_l0jv2_1{border-radius:24px}._toolbarActions_l0jv2_1 button{background-color:transparent}._toolbarBtn_8jy1b_1{width:32px;height:32px;border:none;outline:none;padding:0;display:flex;justify-content:center;align-items:center;background-color:var(--surface-bg);border-radius:16px;color:var(--icon-color);transition:background-color .2s;cursor:pointer}._toolbarBtn_8jy1b_1:hover{background-color:var(--surface-bg-hover)}._toolbarBtn_8jy1b_1:active{background-color:var(--surface-bg-active)}[device-type=mobile] ._toolbarBtn_8jy1b_1{width:48px;height:48px;border-radius:24px}._sidebarIcon_1lib1_1{rotate:0deg;transition:rotate .3s}._sidebarIconExpanded_1lib1_6{rotate:180deg}._content_to68z_1{position:absolute;top:0;left:calc(var(--sidebar-width) + 10px);height:100%;width:calc(100% - calc(var(--sidebar-width) + 15px));transition:left .3s,width .3s;display:flex;flex-direction:column;justify-content:start;align-items:start;overflow:auto;padding-bottom:5px}._contentExpanded_to68z_18{left:5px;width:calc(100% - 10px)}._toolbarPresent_to68z_23{top:37px;height:calc(100% - 37px)}[device-type=mobile] ._content_to68z_1._toolbarPresent_to68z_23{top:58px;height:calc(100% - 58px)}._contentNoMargin_to68z_33{padding:0;left:calc(var(--sidebar-width))}._contentExpanded_to68z_18._contentNoMargin_to68z_33{left:0;width:100%}._contextMenu_v1bev_1{background-color:var(--surface-bg-active);position:fixed;border-radius:9px;z-index:9999;border:solid 1px var(--border-color);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);padding:4px;display:flex;flex-direction:column;opacity:0;visibility:hidden;pointer-events:none;transform-origin:var(--origin, top left);transform:scale(.8) translate(var(--tx-start)) translateY(var(--ty-start));transition:opacity .12s ease-out,transform .12s cubic-bezier(.4,0,.2,1),visibility .12s}._contextMenuOpen_v1bev_27{opacity:1;visibility:visible;pointer-events:auto;transform:scale(1) translate(0) translateY(0)}._listItem_1vjhk_1{padding:10px;transition:background-color .1s;border-radius:8px;color:var(--text-primary);cursor:pointer;display:flex;flex-direction:row;justify-content:start;align-items:center;gap:8px;width:100%}._listItem_1vjhk_1>svg{flex:0 0 auto}[device-type=mobile] ._listItem_1vjhk_1{font-size:1.4rem}._listItem_1vjhk_1:hover{background-color:var(--surface-bg-hover)}._listItem_1vjhk_1._selected_1vjhk_27{background-color:var(--surface-bg-active)}._emptyView_1synn_1{display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:100%;color:var(--text-secondary)}._card_zjz9h_1{background-color:var(--surface-bg);border-radius:9px;display:flex;flex-direction:column;border:solid 1px var(--border-color);padding:14px;margin:0 8px;width:calc(100% - 16px);gap:8px}._textInput_on5q4_1{width:100%;height:32px;background-color:var(--muted-bg);border:none;border-radius:5px;padding:4px 8px;font-size:.9rem;color:var(--text-primary);transition:background-color .2s}._textInput_on5q4_1:focus{outline:none;background-color:var(--surface-bg)}._textInput_on5q4_1:disabled{opacity:.5;cursor:not-allowed}._textInput_on5q4_1::placeholder{color:var(--text-secondary)}[device-type=mobile] ._textInput_on5q4_1{font-size:1.4rem;height:48px}._selectInput_3f04b_1{height:32px;background-color:var(--muted-bg);border:none;border-radius:5px;padding:4px 32px 4px 8px;font-size:.9rem;color:var(--text-primary);cursor:pointer;transition:background-color .2s;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 6L8 10L12 6" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');background-repeat:no-repeat;background-position:right 8px center}._selectInput_3f04b_1:hover{background-color:var(--surface-bg-hover)}._selectInput_3f04b_1:focus{outline:none;background-color:var(--surface-bg)}._selectInput_3f04b_1:disabled{opacity:.5;cursor:not-allowed}[device-type=mobile] ._selectInput_3f04b_1{font-size:1.4rem;height:48px}._button_g5rur_1{width:100%;height:32px;border:none;border-radius:5px;font-weight:600;font-size:.9rem;background-color:var(--button-primary-bg);transition:background-color .2s;color:var(--text-inverse);cursor:pointer}[device-type=mobile] ._button_g5rur_1{font-size:1.4rem;height:48px}._button_g5rur_1:hover{background-color:var(--button-primary-bg-hover)}._button_g5rur_1:active{background-color:var(--button-primary-bg-active)}._button_g5rur_1._secondary_g5rur_27{background-color:transparent;color:var(--text-primary);border:solid 1px var(--button-primary-bg);font-weight:400}._button_g5rur_1._secondary_g5rur_27:hover{background-color:var(--button-secondary-bg-hover)}._button_g5rur_1._secondary_g5rur_27:active{background-color:var(--button-secondary-bg-active)}._button_g5rur_1:disabled{background-color:var(--button-disabled-bg);color:var(--text-disabled);cursor:not-allowed;opacity:.6}._balloon_1jdjr_1{position:fixed;z-index:1000;display:flex;flex-direction:column;width:256px;padding:14px;gap:8px;border-radius:9px;background-color:var(--surface-bg);border:solid 1px var(--border-color);align-items:center;box-sizing:border-box;transform-origin:50% calc(100% + 8px);transform:translate(-50%,calc(-100% - 8px)) scale(.1);filter:opacity(0);transition:.3s;pointer-events:none;-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}._balloonOpen_1jdjr_22{transform:translate(-50%,calc(-100% - 8px)) scale(1);filter:opacity(1);pointer-events:auto}._balloon_1jdjr_1:after{content:"";position:absolute;bottom:-6px;left:50%;transform:translate(-50%) rotate(45deg);width:10px;height:10px;background-color:var(--surface-bg);border-right:solid 1px var(--border-color);border-bottom:solid 1px var(--border-color);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px)}[device-type=mobile] ._balloon_1jdjr_1{font-size:1.4rem}`)),document.head.appendChild(r)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
2
+ import { jsx as s, jsxs as $ } from "react/jsx-runtime";
3
+ import { createContext as W, useContext as L, useLayoutEffect as j, useRef as y, forwardRef as v, useEffect as q, useState as I } from "react";
4
4
  import { Menu as K } from "lucide-react";
5
- const P = V({ isMobile: !1 }), d = () => q(P);
6
- function ne({
7
- isMobile: e,
8
- sidebar: t,
5
+ const P = W({ isMobile: !1 }), d = () => L(P);
6
+ function oe({
7
+ isMobile: t,
8
+ sidebar: e,
9
9
  children: o,
10
10
  accentColor: n = "#0088ff"
11
11
  }) {
12
12
  return j(() => {
13
13
  n && document.documentElement.style.setProperty("--accent", n);
14
- }, [n]), /* @__PURE__ */ s(P.Provider, { value: { isMobile: e }, children: /* @__PURE__ */ x("div", { children: [
15
- /* @__PURE__ */ s("aside", { children: t }),
14
+ }, [n]), /* @__PURE__ */ s(P.Provider, { value: { isMobile: t }, children: /* @__PURE__ */ $("div", { children: [
15
+ /* @__PURE__ */ s("aside", { children: e }),
16
16
  /* @__PURE__ */ s("main", { children: o })
17
17
  ] }) });
18
18
  }
19
- const G = "_sidebar_yoln4_1", J = "_sidebarCollapsed_yoln4_18", Q = "_sidebarMobile_yoln4_22", U = "_sidebarMobileHidden_yoln4_35", X = "_sidebarContent_yoln4_39", Y = "_sidebarFooter_yoln4_48", p = {
19
+ const G = "_sidebar_yoln4_1", J = "_sidebarCollapsed_yoln4_18", Q = "_sidebarMobile_yoln4_22", U = "_sidebarMobileHidden_yoln4_35", X = "_sidebarContent_yoln4_39", Y = "_sidebarFooter_yoln4_48", u = {
20
20
  sidebar: G,
21
21
  sidebarCollapsed: J,
22
22
  sidebarMobile: Q,
@@ -24,19 +24,19 @@ const G = "_sidebar_yoln4_1", J = "_sidebarCollapsed_yoln4_18", Q = "_sidebarMob
24
24
  sidebarContent: X,
25
25
  sidebarFooter: Y
26
26
  };
27
- function se({ open: e, footer: t, children: o }) {
27
+ function ne({ open: t, footer: e, children: o }) {
28
28
  const { isMobile: n } = d();
29
- return /* @__PURE__ */ x(
29
+ return /* @__PURE__ */ $(
30
30
  "div",
31
31
  {
32
32
  className: `
33
- ${p.sidebar}
34
- ${e ? "" : p.sidebarCollapsed}
35
- ${n ? p.sidebarMobile : ""}
36
- ${!e && n ? p.sidebarMobileHidden : ""}`,
33
+ ${u.sidebar}
34
+ ${t ? "" : u.sidebarCollapsed}
35
+ ${n ? u.sidebarMobile : ""}
36
+ ${!t && n ? u.sidebarMobileHidden : ""}`,
37
37
  children: [
38
- /* @__PURE__ */ s("div", { className: p.sidebarContent, children: o }),
39
- t && /* @__PURE__ */ s("div", { className: p.sidebarFooter, children: t })
38
+ /* @__PURE__ */ s("div", { className: u.sidebarContent, children: o }),
39
+ e && /* @__PURE__ */ s("div", { className: u.sidebarFooter, children: e })
40
40
  ]
41
41
  }
42
42
  );
@@ -44,22 +44,22 @@ function se({ open: e, footer: t, children: o }) {
44
44
  const Z = "_sidebarTitle_azx8n_1", tt = {
45
45
  sidebarTitle: Z
46
46
  };
47
- function re({ children: e }) {
48
- return /* @__PURE__ */ s("h2", { className: tt.sidebarTitle, children: e });
47
+ function se({ children: t }) {
48
+ return /* @__PURE__ */ s("h2", { className: tt.sidebarTitle, children: t });
49
49
  }
50
- const et = "_sidebarItem_1e3ru_1", ot = "_selected_1e3ru_22", w = {
50
+ const et = "_sidebarItem_1e3ru_1", ot = "_selected_1e3ru_22", N = {
51
51
  sidebarItem: et,
52
52
  selected: ot
53
53
  };
54
54
  function ie({
55
- onClick: e,
56
- onContextMenu: t,
55
+ onClick: t,
56
+ onContextMenu: e,
57
57
  selected: o = !1,
58
58
  children: n
59
59
  }) {
60
- const r = b(null), c = (i) => {
60
+ const r = y(null), c = (i) => {
61
61
  r.current = setTimeout(() => {
62
- t && (i.preventDefault(), t(i));
62
+ e && (i.preventDefault(), e(i));
63
63
  }, 500);
64
64
  }, l = () => {
65
65
  r.current && clearTimeout(r.current);
@@ -67,10 +67,10 @@ function ie({
67
67
  return /* @__PURE__ */ s(
68
68
  "div",
69
69
  {
70
- className: `${w.sidebarItem} ${o ? w.selected : ""}`,
71
- onClick: e,
70
+ className: `${N.sidebarItem} ${o ? N.selected : ""}`,
71
+ onClick: t,
72
72
  onContextMenu: (i) => {
73
- i.preventDefault(), t && t(i);
73
+ i.preventDefault(), e && e(i);
74
74
  },
75
75
  onTouchStart: c,
76
76
  onTouchEnd: l,
@@ -82,42 +82,42 @@ function ie({
82
82
  const nt = "_sidebarMainBtn_65l8c_1", st = {
83
83
  sidebarMainBtn: nt
84
84
  };
85
- function le({ onClick: e, children: t }) {
86
- return /* @__PURE__ */ s("button", { className: st.sidebarMainBtn, onClick: e, children: t });
85
+ function re({ onClick: t, children: e }) {
86
+ return /* @__PURE__ */ s("button", { className: st.sidebarMainBtn, onClick: t, children: e });
87
87
  }
88
- const rt = "_popupContainer_vz8rg_1", it = "_popupClosed_vz8rg_18", lt = "_popup_vz8rg_1", ct = "_popupContent_vz8rg_44", f = {
89
- popupContainer: rt,
90
- popupClosed: it,
88
+ const it = "_popupContainer_vz8rg_1", rt = "_popupClosed_vz8rg_18", lt = "_popup_vz8rg_1", ct = "_popupContent_vz8rg_44", _ = {
89
+ popupContainer: it,
90
+ popupClosed: rt,
91
91
  popup: lt,
92
92
  popupContent: ct
93
93
  };
94
- function ce({ open: e = !1, children: t }) {
94
+ function le({ open: t = !1, children: e }) {
95
95
  return /* @__PURE__ */ s(
96
96
  "div",
97
97
  {
98
- className: `${f.popupContainer} ${e ? "" : f.popupClosed}`,
99
- children: /* @__PURE__ */ s("div", { className: f.popup, children: /* @__PURE__ */ s("div", { className: f.popupContent, children: t }) })
98
+ className: `${_.popupContainer} ${t ? "" : _.popupClosed}`,
99
+ children: /* @__PURE__ */ s("div", { className: _.popup, children: /* @__PURE__ */ s("div", { className: _.popupContent, children: e }) })
100
100
  }
101
101
  );
102
102
  }
103
- const at = "_popupTitle_4z5vb_1", ut = {
103
+ const at = "_popupTitle_4z5vb_1", pt = {
104
104
  popupTitle: at
105
105
  };
106
- function ae({ children: e }) {
107
- return /* @__PURE__ */ s("span", { className: ut.popupTitle, children: e });
106
+ function ce({ children: t }) {
107
+ return /* @__PURE__ */ s("span", { className: pt.popupTitle, children: t });
108
108
  }
109
- const pt = "_popupDescription_4ewx1_1", dt = {
110
- popupDescription: pt
109
+ const ut = "_popupDescription_4ewx1_1", dt = {
110
+ popupDescription: ut
111
111
  };
112
- function ue({ children: e }) {
113
- return /* @__PURE__ */ s("span", { className: dt.popupDescription, children: e });
112
+ function ae({ children: t }) {
113
+ return /* @__PURE__ */ s("span", { className: dt.popupDescription, children: t });
114
114
  }
115
115
  const bt = "_popupInput_1b42s_1", _t = {
116
116
  popupInput: bt
117
- }, pe = g(
118
- ({ placeholder: e = "Enter text...", value: t, onChange: o, onSubmit: n, autoFocus: r }, c) => {
119
- const l = b(null), i = c || l;
120
- return O(() => {
117
+ }, pe = v(
118
+ ({ placeholder: t = "Enter text...", value: e, onChange: o, onSubmit: n, autoFocus: r }, c) => {
119
+ const l = y(null), i = c || l;
120
+ return q(() => {
121
121
  r && i.current && i.current.focus();
122
122
  }, [r, i]), /* @__PURE__ */ s(
123
123
  "input",
@@ -125,11 +125,11 @@ const bt = "_popupInput_1b42s_1", _t = {
125
125
  ref: i,
126
126
  type: "text",
127
127
  className: _t.popupInput,
128
- placeholder: e,
129
- value: t,
128
+ placeholder: t,
129
+ value: e,
130
130
  onChange: (a) => o?.(a.target.value),
131
131
  onKeyDown: (a) => {
132
- a.key === "Enter" && n && n(t || "");
132
+ a.key === "Enter" && n && n(e || "");
133
133
  }
134
134
  }
135
135
  );
@@ -137,139 +137,119 @@ const bt = "_popupInput_1b42s_1", _t = {
137
137
  ), ft = "_popupActions_84v2b_1", mt = {
138
138
  popupActions: ft
139
139
  };
140
- function de({
141
- orientation: e = "vertical",
142
- children: t
140
+ function ue({
141
+ orientation: t = "vertical",
142
+ children: e
143
143
  }) {
144
144
  return /* @__PURE__ */ s(
145
145
  "div",
146
146
  {
147
147
  className: mt.popupActions,
148
148
  style: {
149
- flexDirection: e == "vertical" ? "column" : "row"
149
+ flexDirection: t == "vertical" ? "column" : "row"
150
150
  },
151
- children: t
151
+ children: e
152
152
  }
153
153
  );
154
154
  }
155
- const vt = "_popupBtn_ouvtc_1", yt = "_secondary_ouvtc_27", E = {
156
- popupBtn: vt,
157
- secondary: yt
155
+ const yt = "_popupBtn_ouvtc_1", ht = "_secondary_ouvtc_27", E = {
156
+ popupBtn: yt,
157
+ secondary: ht
158
158
  };
159
- function be({
160
- type: e = "primary",
161
- onClick: t,
159
+ function de({
160
+ type: t = "primary",
161
+ onClick: e,
162
162
  children: o
163
163
  }) {
164
164
  return /* @__PURE__ */ s(
165
165
  "button",
166
166
  {
167
- className: `${E.popupBtn} ${e == "secondary" ? E.secondary : ""}`,
168
- onClick: t,
167
+ className: `${E.popupBtn} ${t == "secondary" ? E.secondary : ""}`,
168
+ onClick: e,
169
169
  children: o
170
170
  }
171
171
  );
172
172
  }
173
- const ht = "_toolbar_11x84_1", $t = "_toolbarCollapsed_11x84_18", xt = "_toolbarExpanded_11x84_27", m = {
174
- toolbar: ht,
175
- toolbarCollapsed: $t,
173
+ const $t = "_toolbar_11x84_1", vt = "_toolbarCollapsed_11x84_18", xt = "_toolbarExpanded_11x84_27", f = {
174
+ toolbar: $t,
175
+ toolbarCollapsed: vt,
176
176
  toolbarExpanded: xt
177
177
  };
178
- function _e({
179
- expanded: e = !0,
180
- collapsed: t = !1,
178
+ function be({
179
+ expanded: t = !0,
180
+ collapsed: e = !1,
181
181
  children: o
182
182
  }) {
183
183
  const { isMobile: n } = d();
184
184
  return /* @__PURE__ */ s(
185
185
  "div",
186
186
  {
187
- className: `${m.toolbar} ${e || n ? m.toolbarExpanded : ""} ${n ? m.toolbarMobile : ""} ${t ? m.toolbarCollapsed : ""}`,
187
+ className: `${f.toolbar} ${t || n ? f.toolbarExpanded : ""} ${n ? f.toolbarMobile : ""} ${e ? f.toolbarCollapsed : ""}`,
188
188
  children: o
189
189
  }
190
190
  );
191
191
  }
192
- const gt = "_toolbarTitle_mpzr6_1", Mt = "_overflowing_mpzr6_22", Tt = "_toolbarTitleContent_mpzr6_26", y = {
193
- toolbarTitle: gt,
194
- overflowing: Mt,
192
+ const Mt = "_toolbarTitle_m7x4e_1", Tt = "_toolbarTitleContent_m7x4e_22", B = {
193
+ toolbarTitle: Mt,
195
194
  toolbarTitleContent: Tt
196
195
  };
197
- function fe({ children: e }) {
198
- const t = b(null), [o, n] = $(!1);
199
- return O(() => {
200
- const r = () => {
201
- if (!t.current) return;
202
- const { scrollWidth: l, clientWidth: i } = t.current;
203
- n(l > i + 1);
204
- };
205
- r();
206
- const c = new ResizeObserver(r);
207
- return t.current && c.observe(t.current), window.addEventListener("resize", r), () => {
208
- c.disconnect(), window.removeEventListener("resize", r);
209
- };
210
- }, [e]), /* @__PURE__ */ s(
211
- "h3",
212
- {
213
- ref: t,
214
- className: `${y.toolbarTitle} ${o ? y.overflowing : ""}`,
215
- children: /* @__PURE__ */ s("span", { className: y.toolbarTitleContent, children: e })
216
- }
217
- );
196
+ function _e({ children: t }) {
197
+ return /* @__PURE__ */ s("h3", { className: B.toolbarTitle, children: /* @__PURE__ */ s("span", { className: B.toolbarTitleContent, children: t }) });
218
198
  }
219
- const Ct = "_toolbarActions_l0jv2_1", It = {
220
- toolbarActions: Ct
199
+ const gt = "_toolbarActions_l0jv2_1", Ct = {
200
+ toolbarActions: gt
221
201
  };
222
- function me({ children: e }) {
223
- return /* @__PURE__ */ s("div", { className: It.toolbarActions, children: e });
202
+ function fe({ children: t }) {
203
+ return /* @__PURE__ */ s("div", { className: Ct.toolbarActions, children: t });
224
204
  }
225
- const Nt = "_toolbarBtn_8jy1b_1", wt = {
226
- toolbarBtn: Nt
205
+ const It = "_toolbarBtn_8jy1b_1", Nt = {
206
+ toolbarBtn: It
227
207
  };
228
- function Et({ onClick: e, children: t }) {
208
+ function Et({ onClick: t, children: e }) {
229
209
  return /* @__PURE__ */ s(
230
210
  "button",
231
211
  {
232
212
  onClick: (o) => {
233
- o.preventDefault(), e && e(o);
213
+ o.preventDefault(), t && t(o);
234
214
  },
235
- className: wt.toolbarBtn,
236
- children: t
215
+ className: Nt.toolbarBtn,
216
+ children: e
237
217
  }
238
218
  );
239
219
  }
240
- const zt = "_sidebarIcon_1lib1_1", Bt = "_sidebarIconExpanded_1lib1_6", z = {
241
- sidebarIcon: zt,
242
- sidebarIconExpanded: Bt
220
+ const Bt = "_sidebarIcon_1lib1_1", zt = "_sidebarIconExpanded_1lib1_6", z = {
221
+ sidebarIcon: Bt,
222
+ sidebarIconExpanded: zt
243
223
  };
244
- function ve({
245
- onToggleSidebar: e,
246
- expanded: t = !1
224
+ function me({
225
+ onToggleSidebar: t,
226
+ expanded: e = !1
247
227
  }) {
248
228
  const { isMobile: o } = d();
249
- return /* @__PURE__ */ s(Et, { onClick: e, children: /* @__PURE__ */ s(
229
+ return /* @__PURE__ */ s(Et, { onClick: t, children: /* @__PURE__ */ s(
250
230
  K,
251
231
  {
252
232
  size: o ? 24 : 18,
253
- className: `${z.sidebarIcon} ${t ? z.sidebarIconExpanded : ""}`
233
+ className: `${z.sidebarIcon} ${e ? z.sidebarIconExpanded : ""}`
254
234
  }
255
235
  ) });
256
236
  }
257
- const St = "_content_to68z_1", Dt = "_contentExpanded_to68z_18", jt = "_toolbarPresent_to68z_23", Ot = "_contentNoMargin_to68z_33", v = {
258
- content: St,
259
- contentExpanded: Dt,
260
- toolbarPresent: jt,
261
- contentNoMargin: Ot
237
+ const wt = "_content_to68z_1", St = "_contentExpanded_to68z_18", Dt = "_toolbarPresent_to68z_23", jt = "_contentNoMargin_to68z_33", m = {
238
+ content: wt,
239
+ contentExpanded: St,
240
+ toolbarPresent: Dt,
241
+ contentNoMargin: jt
262
242
  };
263
243
  function ye({
264
- expanded: e = !0,
265
- toolbar: t = !0,
244
+ expanded: t = !0,
245
+ toolbar: e = !0,
266
246
  margin: o = "default",
267
247
  children: n
268
248
  }) {
269
249
  return /* @__PURE__ */ s(
270
250
  "div",
271
251
  {
272
- className: `${v.content} ${e ? v.contentExpanded : ""} ${t ? v.toolbarPresent : ""} ${o === "none" ? v.contentNoMargin : ""}`,
252
+ className: `${m.content} ${t ? m.contentExpanded : ""} ${e ? m.toolbarPresent : ""} ${o === "none" ? m.contentNoMargin : ""}`,
273
253
  children: n
274
254
  }
275
255
  );
@@ -280,53 +260,53 @@ const Pt = "_contextMenu_v1bev_1", At = "_contextMenuOpen_v1bev_27", Rt = "_cont
280
260
  contextMenuMobile: Rt
281
261
  };
282
262
  function he({
283
- open: e,
284
- x: t = 20,
263
+ open: t,
264
+ x: e = 20,
285
265
  y: o = 20,
286
266
  from: n = "auto",
287
267
  children: r
288
268
  }) {
289
- const { isMobile: c } = d(), l = b(null), [i, a] = $("top-left"), [u, M] = $({
269
+ const { isMobile: c } = d(), l = y(null), [i, a] = I("top-left"), [p, x] = I({
290
270
  top: o,
291
- left: t,
271
+ left: e,
292
272
  bottom: "auto",
293
273
  right: "auto"
294
274
  });
295
275
  j(() => {
296
- if (!(!e || !l.current))
276
+ if (!(!t || !l.current))
297
277
  if (n === "auto") {
298
- const _ = l.current.getBoundingClientRect(), F = window.innerWidth, L = window.innerHeight;
299
- let T = t, C = o, I = "top", N = "left";
300
- t + _.width > F && (T = t - _.width, N = "right"), o + _.height > L && (C = o - _.height, I = "bottom"), a(
301
- `${I}-${N}`
302
- ), M({
303
- top: Math.max(5, C),
304
- left: Math.max(5, T),
278
+ const b = l.current.getBoundingClientRect(), F = window.innerWidth, V = window.innerHeight;
279
+ let M = e, T = o, g = "top", C = "left";
280
+ e + b.width > F && (M = e - b.width, C = "right"), o + b.height > V && (T = o - b.height, g = "bottom"), a(
281
+ `${g}-${C}`
282
+ ), x({
283
+ top: Math.max(5, T),
284
+ left: Math.max(5, M),
305
285
  bottom: "auto",
306
286
  right: "auto"
307
287
  });
308
288
  } else
309
- a(n), M({
289
+ a(n), x({
310
290
  top: n.includes("top") ? o : "auto",
311
291
  bottom: n.includes("bottom") ? o : "auto",
312
- left: n.includes("left") ? t : "auto",
313
- right: n.includes("right") ? t : "auto"
292
+ left: n.includes("left") ? e : "auto",
293
+ right: n.includes("right") ? e : "auto"
314
294
  });
315
- }, [e, t, o, n]);
295
+ }, [t, e, o, n]);
316
296
  const A = {
317
297
  "top-left": { tx: "-10%", ty: "-10%", origin: "top left" },
318
298
  "top-right": { tx: "10%", ty: "-10%", origin: "top right" },
319
299
  "bottom-left": { tx: "-10%", ty: "10%", origin: "bottom left" },
320
300
  "bottom-right": { tx: "10%", ty: "10%", origin: "bottom right" }
321
- }, { tx: R, ty: k, origin: H } = A[i], W = {
301
+ }, { tx: R, ty: O, origin: k } = A[i], H = {
322
302
  position: "fixed",
323
- top: typeof u.top == "number" ? `${u.top}px` : "auto",
324
- bottom: typeof u.bottom == "number" ? `${u.bottom}px` : "auto",
325
- left: typeof u.left == "number" ? `${u.left}px` : "auto",
326
- right: typeof u.right == "number" ? `${u.right}px` : "auto",
303
+ top: typeof p.top == "number" ? `${p.top}px` : "auto",
304
+ bottom: typeof p.bottom == "number" ? `${p.bottom}px` : "auto",
305
+ left: typeof p.left == "number" ? `${p.left}px` : "auto",
306
+ right: typeof p.right == "number" ? `${p.right}px` : "auto",
327
307
  "--tx-start": R,
328
- "--ty-start": k,
329
- "--origin": H
308
+ "--ty-start": O,
309
+ "--origin": k
330
310
  };
331
311
  return /* @__PURE__ */ s(
332
312
  "div",
@@ -334,27 +314,27 @@ function he({
334
314
  ref: l,
335
315
  className: `
336
316
  ${h.contextMenu}
337
- ${e ? h.contextMenuOpen : ""}
317
+ ${t ? h.contextMenuOpen : ""}
338
318
  ${c ? h.contextMenuMobile : ""}
339
319
  `,
340
- style: W,
320
+ style: H,
341
321
  children: r
342
322
  }
343
323
  );
344
324
  }
345
- const kt = "_listItem_1vjhk_1", Ht = "_selected_1vjhk_27", B = {
346
- listItem: kt,
347
- selected: Ht
325
+ const Ot = "_listItem_1vjhk_1", kt = "_selected_1vjhk_27", w = {
326
+ listItem: Ot,
327
+ selected: kt
348
328
  };
349
329
  function $e({
350
- onClick: e,
351
- onContextMenu: t,
330
+ onClick: t,
331
+ onContextMenu: e,
352
332
  selected: o = !1,
353
333
  children: n
354
334
  }) {
355
- const r = b(null), c = (i) => {
335
+ const r = y(null), c = (i) => {
356
336
  r.current = setTimeout(() => {
357
- t && (i.preventDefault(), t(i));
337
+ e && (i.preventDefault(), e(i));
358
338
  }, 500);
359
339
  }, l = () => {
360
340
  r.current && clearTimeout(r.current);
@@ -362,10 +342,10 @@ function $e({
362
342
  return /* @__PURE__ */ s(
363
343
  "div",
364
344
  {
365
- className: `${B.listItem} ${o ? B.selected : ""}`,
366
- onClick: e,
345
+ className: `${w.listItem} ${o ? w.selected : ""}`,
346
+ onClick: t,
367
347
  onContextMenu: (i) => {
368
- i.preventDefault(), t && t(i);
348
+ i.preventDefault(), e && e(i);
369
349
  },
370
350
  onTouchStart: c,
371
351
  onTouchEnd: l,
@@ -374,22 +354,22 @@ function $e({
374
354
  }
375
355
  );
376
356
  }
377
- function Wt({
378
- icon: e,
379
- size: t = "default",
357
+ function Ht({
358
+ icon: t,
359
+ size: e = "default",
380
360
  color: o = "default",
381
361
  className: n
382
362
  }) {
383
- const { isMobile: r } = d(), c = t === "default" ? r ? 24 : 18 : t, l = o === "selected" ? "var(--icon-color)" : o;
363
+ const { isMobile: r } = d(), c = e === "default" ? r ? 24 : 18 : e, l = o === "selected" ? "var(--icon-color)" : o;
384
364
  return o === "default" ? /* @__PURE__ */ s(
385
- e,
365
+ t,
386
366
  {
387
367
  size: c,
388
368
  className: n,
389
369
  strokeWidth: r ? 2.5 : 2
390
370
  }
391
371
  ) : /* @__PURE__ */ s(
392
- e,
372
+ t,
393
373
  {
394
374
  size: c,
395
375
  color: l,
@@ -398,28 +378,28 @@ function Wt({
398
378
  }
399
379
  );
400
380
  }
401
- const Ft = "_emptyView_1synn_1", Lt = {
381
+ const Ft = "_emptyView_1synn_1", Vt = {
402
382
  emptyView: Ft
403
383
  };
404
- function xe({ icon: e, label: t }) {
384
+ function ve({ icon: t, label: e }) {
405
385
  const { isMobile: o } = d(), n = o ? 64 : 48;
406
- return /* @__PURE__ */ x("div", { className: Lt.emptyView, children: [
407
- /* @__PURE__ */ s(Wt, { icon: e, size: n, color: "var(--text-secondary)" }),
408
- /* @__PURE__ */ s("h2", { children: t })
386
+ return /* @__PURE__ */ $("div", { className: Vt.emptyView, children: [
387
+ /* @__PURE__ */ s(Ht, { icon: t, size: n, color: "var(--text-secondary)" }),
388
+ /* @__PURE__ */ s("h2", { children: e })
409
389
  ] });
410
390
  }
411
- const Vt = "_card_zjz9h_1", qt = {
412
- card: Vt
391
+ const Wt = "_card_zjz9h_1", Lt = {
392
+ card: Wt
413
393
  };
414
- function ge({ children: e }) {
415
- return /* @__PURE__ */ s("div", { className: qt.card, children: e });
394
+ function xe({ children: t }) {
395
+ return /* @__PURE__ */ s("div", { className: Lt.card, children: t });
416
396
  }
417
- const Kt = "_textInput_on5q4_1", Gt = {
418
- textInput: Kt
419
- }, Me = g(
397
+ const qt = "_textInput_on5q4_1", Kt = {
398
+ textInput: qt
399
+ }, Me = v(
420
400
  ({
421
- placeholder: e,
422
- value: t,
401
+ placeholder: t,
402
+ value: e,
423
403
  onChange: o,
424
404
  onFocus: n,
425
405
  onBlur: r,
@@ -431,34 +411,34 @@ const Kt = "_textInput_on5q4_1", Gt = {
431
411
  {
432
412
  ref: a,
433
413
  type: l,
434
- className: `${Gt.textInput} ${i || ""}`,
435
- placeholder: e,
436
- value: t,
437
- onChange: (u) => o?.(u.target.value),
414
+ className: `${Kt.textInput} ${i || ""}`,
415
+ placeholder: t,
416
+ value: e,
417
+ onChange: (p) => o?.(p.target.value),
438
418
  onFocus: n,
439
419
  onBlur: r,
440
420
  disabled: c
441
421
  }
442
422
  )
443
- ), Jt = "_selectInput_3f04b_1", Qt = {
444
- selectInput: Jt
445
- }, Te = g(
446
- ({ className: e, children: t, ...o }, n) => /* @__PURE__ */ s(
423
+ ), Gt = "_selectInput_3f04b_1", Jt = {
424
+ selectInput: Gt
425
+ }, Te = v(
426
+ ({ className: t, children: e, ...o }, n) => /* @__PURE__ */ s(
447
427
  "select",
448
428
  {
449
429
  ref: n,
450
- className: `${Qt.selectInput} ${e || ""}`,
430
+ className: `${Jt.selectInput} ${t || ""}`,
451
431
  ...o,
452
- children: t
432
+ children: e
453
433
  }
454
434
  )
455
- ), Ut = "_button_g5rur_1", Xt = "_secondary_g5rur_27", S = {
456
- button: Ut,
457
- secondary: Xt
435
+ ), Qt = "_button_g5rur_1", Ut = "_secondary_g5rur_27", S = {
436
+ button: Qt,
437
+ secondary: Ut
458
438
  };
459
- function Ce({
460
- disabled: e = !1,
461
- type: t = "primary",
439
+ function ge({
440
+ disabled: t = !1,
441
+ type: e = "primary",
462
442
  onClick: o,
463
443
  children: n,
464
444
  style: r
@@ -466,21 +446,21 @@ function Ce({
466
446
  return /* @__PURE__ */ s(
467
447
  "button",
468
448
  {
469
- className: `${S.button} ${t == "secondary" ? S.secondary : ""}`,
449
+ className: `${S.button} ${e == "secondary" ? S.secondary : ""}`,
470
450
  onClick: o,
471
- disabled: e,
451
+ disabled: t,
472
452
  style: r,
473
453
  children: n
474
454
  }
475
455
  );
476
456
  }
477
- const Yt = "_balloon_1jdjr_1", Zt = "_balloonOpen_1jdjr_22", D = {
478
- balloon: Yt,
479
- balloonOpen: Zt
457
+ const Xt = "_balloon_1jdjr_1", Yt = "_balloonOpen_1jdjr_22", D = {
458
+ balloon: Xt,
459
+ balloonOpen: Yt
480
460
  };
481
- function Ie({
482
- open: e,
483
- x: t,
461
+ function Ce({
462
+ open: t,
463
+ x: e,
484
464
  y: o,
485
465
  children: n,
486
466
  className: r,
@@ -488,10 +468,10 @@ function Ie({
488
468
  ...l
489
469
  }) {
490
470
  const i = {};
491
- typeof t == "number" && (i.left = t), typeof o == "number" && (i.top = o);
471
+ typeof e == "number" && (i.left = e), typeof o == "number" && (i.top = o);
492
472
  const a = [
493
473
  D.balloon,
494
- e ? D.balloonOpen : "",
474
+ t ? D.balloonOpen : "",
495
475
  r ?? ""
496
476
  ].filter(Boolean).join(" ");
497
477
  return /* @__PURE__ */ s(
@@ -505,30 +485,30 @@ function Ie({
505
485
  );
506
486
  }
507
487
  export {
508
- ne as AppShell,
509
- Ie as Balloon,
510
- Ce as Button,
511
- ge as Card,
488
+ oe as AppShell,
489
+ Ce as Balloon,
490
+ ge as Button,
491
+ xe as Card,
512
492
  ye as Content,
513
493
  he as ContextMenu,
514
- xe as EmptyView,
515
- Wt as Icon,
494
+ ve as EmptyView,
495
+ Ht as Icon,
516
496
  $e as ListItem,
517
- ce as Popup,
518
- de as PopupActions,
519
- be as PopupButton,
520
- ue as PopupDescription,
497
+ le as Popup,
498
+ ue as PopupActions,
499
+ de as PopupButton,
500
+ ae as PopupDescription,
521
501
  pe as PopupInput,
522
- ae as PopupTitle,
502
+ ce as PopupTitle,
523
503
  Te as SelectInput,
524
- se as Sidebar,
525
- le as SidebarButton,
504
+ ne as Sidebar,
505
+ re as SidebarButton,
526
506
  ie as SidebarItem,
527
- re as SidebarTitle,
507
+ se as SidebarTitle,
528
508
  Me as TextInput,
529
- _e as Toolbar,
530
- me as ToolbarActions,
509
+ be as Toolbar,
510
+ fe as ToolbarActions,
531
511
  Et as ToolbarButton,
532
- ve as ToolbarExpandSidebarButton,
533
- fe as ToolbarTitle
512
+ me as ToolbarExpandSidebarButton,
513
+ _e as ToolbarTitle
534
514
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlos-next/ui",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "license": "MIT",
5
5
  "author": "JCionx",
6
6
  "description": "Default component library for htmlOS NEXT.",