@htmlos-next/ui 0.0.12 → 0.0.14

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