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