@htmlos-next/ui 0.0.13 → 0.0.15

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