@htmlos-next/ui 0.0.9 → 0.0.11

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