@tauri-controls-v2/solid 0.4.1

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 eatham532
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,16 @@
1
+ <picture>
2
+ <source media="(prefers-color-scheme: dark)" srcset="https://github.com/eatham532/tauri-controls-v2/assets/16024979/8ac8cae0-9cde-4b27-af8b-02d949ede7a2">
3
+ <img alt="Tauri Controls" src="https://github.com/eatham532/tauri-controls-v2/assets/16024979/12f46aa7-72de-4c44-aa4a-0580c73fc73a">
4
+ </picture>
5
+
6
+ ![](https://img.shields.io/bundlephobia/min/%40tauri-controls%2Fsolid)
7
+ ![](https://img.shields.io/bundlephobia/minzip/%40tauri-controls%2Fsolid)
8
+ [![](https://img.shields.io/npm/dt/%40tauri-controls%2Fsolid)](https://npmjs.com/package/tauri-controls) ![SolidJS](https://img.shields.io/badge/SolidJS-2c4f7c?logo=solid&logoColor=c8c9cb)
9
+
10
+ ## @tauri-controls-v2/solid
11
+
12
+ ```bash
13
+ pnpm add @tauri-controls-v2/solid
14
+ ```
15
+
16
+ https://github.com/eatham532/tauri-controls-v2
@@ -0,0 +1 @@
1
+ import"./tauri-controls.css";var e,t,i,n,a,l;function r(e,t=!1){return window.__TAURI_INTERNALS__.transformCallback(e,t)}async function s(e,t={},i){return window.__TAURI_INTERNALS__.invoke(e,t,i)}class o{get rid(){return function(e,t){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}(this,e)}constructor(t){e.set(this,void 0),function(e,t,i){if("function"==typeof t||!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");t.set(e,i)}(this,e,t)}async close(){return s("plugin:resources|close",{rid:this.rid})}}e=new WeakMap;class u extends o{constructor(e){super(e)}static async new(e,t,i){return s("plugin:image|new",{rgba:c(e),width:t,height:i}).then((e=>new u(e)))}static async fromBytes(e){return s("plugin:image|from_bytes",{bytes:c(e)}).then((e=>new u(e)))}static async fromPath(e){return s("plugin:image|from_path",{path:e}).then((e=>new u(e)))}async rgba(){return s("plugin:image|rgba",{rid:this.rid}).then((e=>new Uint8Array(e)))}async size(){return s("plugin:image|size",{rid:this.rid})}}function c(e){return null==e?null:"string"==typeof e?e:e instanceof Uint8Array?Array.from(e):e instanceof ArrayBuffer?Array.from(new Uint8Array(e)):e instanceof u?e.rid:e}class h{constructor(e,t){this.type="Logical",this.width=e,this.height=t}}class d{constructor(e,t){this.type="Physical",this.width=e,this.height=t}toLogical(e){return new h(this.width/e,this.height/e)}}class w{constructor(e,t){this.type="Logical",this.x=e,this.y=t}}class p{constructor(e,t){this.type="Physical",this.x=e,this.y=t}toLogical(e){return new w(this.x/e,this.y/e)}}async function b(e,t){await s("plugin:event|unlisten",{event:e,eventId:t})}async function y(e,t,i){var n;const a="string"==typeof i?.target?{kind:"AnyLabel",label:i.target}:null!==(n=i?.target)&&void 0!==n?n:{kind:"Any"};return s("plugin:event|listen",{event:e,target:a,handler:r(t)}).then((t=>async()=>b(e,t)))}async function g(e,t,i){return y(e,(i=>{b(e,i.id),t(i)}),i)}async function _(e,t){await s("plugin:event|emit",{event:e,payload:t})}async function m(e,t,i){await s("plugin:event|emit_to",{target:"string"==typeof e?{kind:"AnyLabel",label:e}:e,event:t,payload:i})}(l=t||(t={})).WINDOW_RESIZED="tauri://resize",l.WINDOW_MOVED="tauri://move",l.WINDOW_CLOSE_REQUESTED="tauri://close-requested",l.WINDOW_DESTROYED="tauri://destroyed",l.WINDOW_FOCUS="tauri://focus",l.WINDOW_BLUR="tauri://blur",l.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",l.WINDOW_THEME_CHANGED="tauri://theme-changed",l.WINDOW_CREATED="tauri://window-created",l.WEBVIEW_CREATED="tauri://webview-created",l.DRAG_ENTER="tauri://drag-enter",l.DRAG_OVER="tauri://drag-over",l.DRAG_DROP="tauri://drag-drop",l.DRAG_LEAVE="tauri://drag-leave",function(e){e.Add="Add",e.Advanced="Advanced",e.Bluetooth="Bluetooth",e.Bookmarks="Bookmarks",e.Caution="Caution",e.ColorPanel="ColorPanel",e.ColumnView="ColumnView",e.Computer="Computer",e.EnterFullScreen="EnterFullScreen",e.Everyone="Everyone",e.ExitFullScreen="ExitFullScreen",e.FlowView="FlowView",e.Folder="Folder",e.FolderBurnable="FolderBurnable",e.FolderSmart="FolderSmart",e.FollowLinkFreestanding="FollowLinkFreestanding",e.FontPanel="FontPanel",e.GoLeft="GoLeft",e.GoRight="GoRight",e.Home="Home",e.IChatTheater="IChatTheater",e.IconView="IconView",e.Info="Info",e.InvalidDataFreestanding="InvalidDataFreestanding",e.LeftFacingTriangle="LeftFacingTriangle",e.ListView="ListView",e.LockLocked="LockLocked",e.LockUnlocked="LockUnlocked",e.MenuMixedState="MenuMixedState",e.MenuOnState="MenuOnState",e.MobileMe="MobileMe",e.MultipleDocuments="MultipleDocuments",e.Network="Network",e.Path="Path",e.PreferencesGeneral="PreferencesGeneral",e.QuickLook="QuickLook",e.RefreshFreestanding="RefreshFreestanding",e.Refresh="Refresh",e.Remove="Remove",e.RevealFreestanding="RevealFreestanding",e.RightFacingTriangle="RightFacingTriangle",e.Share="Share",e.Slideshow="Slideshow",e.SmartBadge="SmartBadge",e.StatusAvailable="StatusAvailable",e.StatusNone="StatusNone",e.StatusPartiallyAvailable="StatusPartiallyAvailable",e.StatusUnavailable="StatusUnavailable",e.StopProgressFreestanding="StopProgressFreestanding",e.StopProgress="StopProgress",e.TrashEmpty="TrashEmpty",e.TrashFull="TrashFull",e.User="User",e.UserAccounts="UserAccounts",e.UserGroup="UserGroup",e.UserGuest="UserGuest"}(i||(i={})),function(e){e[e.Critical=1]="Critical",e[e.Informational=2]="Informational"}(n||(n={}));class v{constructor(e){this._preventDefault=!1,this.event=e.event,this.id=e.id}preventDefault(){this._preventDefault=!0}isPreventDefault(){return this._preventDefault}}function f(){return new D(window.__TAURI_INTERNALS__.metadata.currentWindow.label,{skip:!0})}function E(){return window.__TAURI_INTERNALS__.metadata.windows.map((e=>new D(e.label,{skip:!0})))}!function(e){e.None="none",e.Normal="normal",e.Indeterminate="indeterminate",e.Paused="paused",e.Error="error"}(a||(a={}));const A=["tauri://created","tauri://error"];class D{constructor(e,t={}){var i;this.label=e,this.listeners=Object.create(null),t?.skip||s("plugin:window|create",{options:{...t,parent:"string"==typeof t.parent?t.parent:null===(i=t.parent)||void 0===i?void 0:i.label,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){var t;return null!==(t=E().find((t=>t.label===e)))&&void 0!==t?t:null}static getCurrent(){return f()}static getAll(){return E()}static async getFocusedWindow(){for(const e of E())if(await e.isFocused())return e;return null}async listen(e,t){return this._handleTauriEvent(e,t)?()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)}:y(e,t,{target:{kind:"Window",label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)}:g(e,t,{target:{kind:"Window",label:this.label}})}async emit(e,t){if(!A.includes(e))return _(e,t);for(const i of this.listeners[e]||[])i({event:e,id:-1,payload:t})}async emitTo(e,t,i){if(!A.includes(t))return m(e,t,i);for(const e of this.listeners[t]||[])e({event:t,id:-1,payload:i})}_handleTauriEvent(e,t){return!!A.includes(e)&&(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0)}async scaleFactor(){return s("plugin:window|scale_factor",{label:this.label})}async innerPosition(){return s("plugin:window|inner_position",{label:this.label}).then((({x:e,y:t})=>new p(e,t)))}async outerPosition(){return s("plugin:window|outer_position",{label:this.label}).then((({x:e,y:t})=>new p(e,t)))}async innerSize(){return s("plugin:window|inner_size",{label:this.label}).then((({width:e,height:t})=>new d(e,t)))}async outerSize(){return s("plugin:window|outer_size",{label:this.label}).then((({width:e,height:t})=>new d(e,t)))}async isFullscreen(){return s("plugin:window|is_fullscreen",{label:this.label})}async isMinimized(){return s("plugin:window|is_minimized",{label:this.label})}async isMaximized(){return s("plugin:window|is_maximized",{label:this.label})}async isFocused(){return s("plugin:window|is_focused",{label:this.label})}async isDecorated(){return s("plugin:window|is_decorated",{label:this.label})}async isResizable(){return s("plugin:window|is_resizable",{label:this.label})}async isMaximizable(){return s("plugin:window|is_maximizable",{label:this.label})}async isMinimizable(){return s("plugin:window|is_minimizable",{label:this.label})}async isClosable(){return s("plugin:window|is_closable",{label:this.label})}async isVisible(){return s("plugin:window|is_visible",{label:this.label})}async title(){return s("plugin:window|title",{label:this.label})}async theme(){return s("plugin:window|theme",{label:this.label})}async center(){return s("plugin:window|center",{label:this.label})}async requestUserAttention(e){let t=null;return e&&(t=e===n.Critical?{type:"Critical"}:{type:"Informational"}),s("plugin:window|request_user_attention",{label:this.label,value:t})}async setResizable(e){return s("plugin:window|set_resizable",{label:this.label,value:e})}async setMaximizable(e){return s("plugin:window|set_maximizable",{label:this.label,value:e})}async setMinimizable(e){return s("plugin:window|set_minimizable",{label:this.label,value:e})}async setClosable(e){return s("plugin:window|set_closable",{label:this.label,value:e})}async setTitle(e){return s("plugin:window|set_title",{label:this.label,value:e})}async maximize(){return s("plugin:window|maximize",{label:this.label})}async unmaximize(){return s("plugin:window|unmaximize",{label:this.label})}async toggleMaximize(){return s("plugin:window|toggle_maximize",{label:this.label})}async minimize(){return s("plugin:window|minimize",{label:this.label})}async unminimize(){return s("plugin:window|unminimize",{label:this.label})}async show(){return s("plugin:window|show",{label:this.label})}async hide(){return s("plugin:window|hide",{label:this.label})}async close(){return s("plugin:window|close",{label:this.label})}async destroy(){return s("plugin:window|destroy",{label:this.label})}async setDecorations(e){return s("plugin:window|set_decorations",{label:this.label,value:e})}async setShadow(e){return s("plugin:window|set_shadow",{label:this.label,value:e})}async setEffects(e){return s("plugin:window|set_effects",{label:this.label,value:e})}async clearEffects(){return s("plugin:window|set_effects",{label:this.label,value:null})}async setAlwaysOnTop(e){return s("plugin:window|set_always_on_top",{label:this.label,value:e})}async setAlwaysOnBottom(e){return s("plugin:window|set_always_on_bottom",{label:this.label,value:e})}async setContentProtected(e){return s("plugin:window|set_content_protected",{label:this.label,value:e})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");const t={};return t[`${e.type}`]={width:e.width,height:e.height},s("plugin:window|set_size",{label:this.label,value:t})}async setMinSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");let t=null;return e&&(t={},t[`${e.type}`]={width:e.width,height:e.height}),s("plugin:window|set_min_size",{label:this.label,value:t})}async setMaxSize(e){if(e&&"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");let t=null;return e&&(t={},t[`${e.type}`]={width:e.width,height:e.height}),s("plugin:window|set_max_size",{label:this.label,value:t})}async setSizeConstraints(e){function t(e){return e?{Logical:e}:null}return s("plugin:window|set_size_constraints",{label:this.label,value:{minWidth:t(e?.minWidth),minHeight:t(e?.minHeight),maxWidth:t(e?.maxWidth),maxHeight:t(e?.maxHeight)}})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");const t={};return t[`${e.type}`]={x:e.x,y:e.y},s("plugin:window|set_position",{label:this.label,value:t})}async setFullscreen(e){return s("plugin:window|set_fullscreen",{label:this.label,value:e})}async setFocus(){return s("plugin:window|set_focus",{label:this.label})}async setIcon(e){return s("plugin:window|set_icon",{label:this.label,value:c(e)})}async setSkipTaskbar(e){return s("plugin:window|set_skip_taskbar",{label:this.label,value:e})}async setCursorGrab(e){return s("plugin:window|set_cursor_grab",{label:this.label,value:e})}async setCursorVisible(e){return s("plugin:window|set_cursor_visible",{label:this.label,value:e})}async setCursorIcon(e){return s("plugin:window|set_cursor_icon",{label:this.label,value:e})}async setCursorPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");const t={};return t[`${e.type}`]={x:e.x,y:e.y},s("plugin:window|set_cursor_position",{label:this.label,value:t})}async setIgnoreCursorEvents(e){return s("plugin:window|set_ignore_cursor_events",{label:this.label,value:e})}async startDragging(){return s("plugin:window|start_dragging",{label:this.label})}async startResizeDragging(e){return s("plugin:window|start_resize_dragging",{label:this.label,value:e})}async setProgressBar(e){return s("plugin:window|set_progress_bar",{label:this.label,value:e})}async setVisibleOnAllWorkspaces(e){return s("plugin:window|set_visible_on_all_workspaces",{label:this.label,value:e})}async setTitleBarStyle(e){return s("plugin:window|set_title_bar_style",{label:this.label,value:e})}async onResized(e){return this.listen(t.WINDOW_RESIZED,(t=>{t.payload=z(t.payload),e(t)}))}async onMoved(e){return this.listen(t.WINDOW_MOVED,(t=>{t.payload=R(t.payload),e(t)}))}async onCloseRequested(e){return this.listen(t.WINDOW_CLOSE_REQUESTED,(async t=>{const i=new v(t);await e(i),i.isPreventDefault()||await this.destroy()}))}async onDragDropEvent(e){const i=await this.listen(t.DRAG_ENTER,(t=>{e({...t,payload:{type:"enter",paths:t.payload.paths,position:R(t.payload.position)}})})),n=await this.listen(t.DRAG_OVER,(t=>{e({...t,payload:{type:"over",position:R(t.payload.position)}})})),a=await this.listen(t.DRAG_DROP,(t=>{e({...t,payload:{type:"drop",paths:t.payload.paths,position:R(t.payload.position)}})})),l=await this.listen(t.DRAG_LEAVE,(t=>{e({...t,payload:{type:"leave"}})}));return()=>{i(),a(),n(),l()}}async onFocusChanged(e){const i=await this.listen(t.WINDOW_FOCUS,(t=>{e({...t,payload:!0})})),n=await this.listen(t.WINDOW_BLUR,(t=>{e({...t,payload:!1})}));return()=>{i(),n()}}async onScaleChanged(e){return this.listen(t.WINDOW_SCALE_FACTOR_CHANGED,e)}async onThemeChanged(e){return this.listen(t.WINDOW_THEME_CHANGED,e)}}var S,L;function P(e){return null===e?null:{name:e.name,scaleFactor:e.scaleFactor,position:R(e.position),size:z(e.size)}}function R(e){return new p(e.x,e.y)}function z(e){return new d(e.width,e.height)}(function(e){e.AppearanceBased="appearanceBased",e.Light="light",e.Dark="dark",e.MediumLight="mediumLight",e.UltraDark="ultraDark",e.Titlebar="titlebar",e.Selection="selection",e.Menu="menu",e.Popover="popover",e.Sidebar="sidebar",e.HeaderView="headerView",e.Sheet="sheet",e.WindowBackground="windowBackground",e.HudWindow="hudWindow",e.FullScreenUI="fullScreenUI",e.Tooltip="tooltip",e.ContentBackground="contentBackground",e.UnderWindowBackground="underWindowBackground",e.UnderPageBackground="underPageBackground",e.Mica="mica",e.Blur="blur",e.Acrylic="acrylic",e.Tabbed="tabbed",e.TabbedDark="tabbedDark",e.TabbedLight="tabbedLight"})(S||(S={})),function(e){e.FollowsWindowActiveState="followsWindowActiveState",e.Active="active",e.Inactive="inactive"}(L||(L={}));const k=Object.freeze(Object.defineProperty({__proto__:null,CloseRequestedEvent:v,get Effect(){return S},get EffectState(){return L},LogicalPosition:w,LogicalSize:h,PhysicalPosition:p,PhysicalSize:d,get ProgressBarStatus(){return a},get UserAttentionType(){return n},Window:D,availableMonitors:async function(){return s("plugin:window|available_monitors").then((e=>e.map(P)))},currentMonitor:async function(){return s("plugin:window|current_monitor").then(P)},cursorPosition:async function(){return s("plugin:window|cursor_position").then(R)},getAllWindows:E,getCurrentWindow:f,monitorFromPoint:async function(e,t){return s("plugin:window|monitor_from_point",{x:e,y:t}).then(P)},primaryMonitor:async function(){return s("plugin:window|primary_monitor").then(P)}},Symbol.toStringTag,{value:"Module"}));var T;function W(){return new F(f(),window.__TAURI_INTERNALS__.metadata.currentWebview.label,{skip:!0})}function C(){return window.__TAURI_INTERNALS__.metadata.webviews.map((e=>new F(D.getByLabel(e.windowLabel),e.label,{skip:!0})))}!function(e){e[e.Audio=1]="Audio",e[e.Cache=2]="Cache",e[e.Config=3]="Config",e[e.Data=4]="Data",e[e.LocalData=5]="LocalData",e[e.Document=6]="Document",e[e.Download=7]="Download",e[e.Picture=8]="Picture",e[e.Public=9]="Public",e[e.Video=10]="Video",e[e.Resource=11]="Resource",e[e.Temp=12]="Temp",e[e.AppConfig=13]="AppConfig",e[e.AppData=14]="AppData",e[e.AppLocalData=15]="AppLocalData",e[e.AppCache=16]="AppCache",e[e.AppLog=17]="AppLog",e[e.Desktop=18]="Desktop",e[e.Executable=19]="Executable",e[e.Font=20]="Font",e[e.Home=21]="Home",e[e.Runtime=22]="Runtime",e[e.Template=23]="Template"}(T||(T={}));const O=["tauri://created","tauri://error"];class F{constructor(e,t,i){this.window=e,this.label=t,this.listeners=Object.create(null),i?.skip||s("plugin:webview|create_webview",{windowLabel:e.label,label:t,options:i}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){var t;return null!==(t=C().find((t=>t.label===e)))&&void 0!==t?t:null}static getCurrent(){return W()}static getAll(){return C()}async listen(e,t){return this._handleTauriEvent(e,t)?()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)}:y(e,t,{target:{kind:"Webview",label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)}:g(e,t,{target:{kind:"Webview",label:this.label}})}async emit(e,t){if(!O.includes(e))return _(e,t);for(const i of this.listeners[e]||[])i({event:e,id:-1,payload:t})}async emitTo(e,t,i){if(!O.includes(t))return m(e,t,i);for(const e of this.listeners[t]||[])e({event:t,id:-1,payload:i})}_handleTauriEvent(e,t){return!!O.includes(e)&&(e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t],!0)}async position(){return s("plugin:webview|webview_position",{label:this.label}).then((({x:e,y:t})=>new p(e,t)))}async size(){return s("plugin:webview|webview_size",{label:this.label}).then((({width:e,height:t})=>new d(e,t)))}async close(){return s("plugin:webview|close",{label:this.label})}async setSize(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `size` argument must be either a LogicalSize or a PhysicalSize instance");const t={};return t[`${e.type}`]={width:e.width,height:e.height},s("plugin:webview|set_webview_size",{label:this.label,value:t})}async setPosition(e){if(!e||"Logical"!==e.type&&"Physical"!==e.type)throw new Error("the `position` argument must be either a LogicalPosition or a PhysicalPosition instance");const t={};return t[`${e.type}`]={x:e.x,y:e.y},s("plugin:webview|set_webview_position",{label:this.label,value:t})}async setFocus(){return s("plugin:webview|set_webview_focus",{label:this.label})}async setZoom(e){return s("plugin:webview|set_webview_zoom",{label:this.label,value:e})}async reparent(e){return s("plugin:webview|reparent",{label:this.label,window:"string"==typeof e?e:e.label})}async onDragDropEvent(e){const i=await this.listen(t.DRAG_ENTER,(t=>{e({...t,payload:{type:"enter",paths:t.payload.paths,position:I(t.payload.position)}})})),n=await this.listen(t.DRAG_OVER,(t=>{e({...t,payload:{type:"over",position:I(t.payload.position)}})})),a=await this.listen(t.DRAG_DROP,(t=>{e({...t,payload:{type:"drop",paths:t.payload.paths,position:I(t.payload.position)}})})),l=await this.listen(t.DRAG_LEAVE,(t=>{e({...t,payload:{type:"leave"}})}));return()=>{i(),a(),n(),l()}}}function I(e){return new p(e.x,e.y)}function x(){return window.__TAURI_INTERNALS__.metadata.webviews.map((e=>new N(e.label,{skip:!0})))}class N{constructor(e,t={}){var i;this.label=e,this.listeners=Object.create(null),t?.skip||s("plugin:webview|create_webview_window",{options:{...t,parent:"string"==typeof t.parent?t.parent:null===(i=t.parent)||void 0===i?void 0:i.label,label:e}}).then((async()=>this.emit("tauri://created"))).catch((async e=>this.emit("tauri://error",e)))}static getByLabel(e){var t;const i=null!==(t=x().find((t=>t.label===e)))&&void 0!==t?t:null;return i?new N(i.label,{skip:!0}):null}static getCurrent(){return function(){const e=W();return new N(e.label,{skip:!0})}()}static getAll(){return x().map((e=>new N(e.label,{skip:!0})))}async listen(e,t){return this._handleTauriEvent(e,t)?()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)}:y(e,t,{target:{kind:"WebviewWindow",label:this.label}})}async once(e,t){return this._handleTauriEvent(e,t)?()=>{const i=this.listeners[e];i.splice(i.indexOf(t),1)}:g(e,t,{target:{kind:"WebviewWindow",label:this.label}})}}var U,M;U=N,M=[D,F],(Array.isArray(M)?M:[M]).forEach((e=>{Object.getOwnPropertyNames(e.prototype).forEach((t=>{var i;"object"==typeof U.prototype&&U.prototype&&t in U.prototype||Object.defineProperty(U.prototype,t,null!==(i=Object.getOwnPropertyDescriptor(e.prototype,t))&&void 0!==i?i:Object.create(null))}))}));export{k as window};
@@ -0,0 +1,78 @@
1
+ import { ComponentProps } from 'solid-js';
2
+ import { JSX } from 'solid-js';
3
+
4
+ export declare function WindowControls(props: WindowControlsProps): JSX.Element;
5
+
6
+ /**
7
+ * Interface for window controls.
8
+ * If the `platform` property is not specified, the library will automatically detect
9
+ * the operating system the app is running on and display the appropriate elements.
10
+ */
11
+ export declare interface WindowControlsProps extends ComponentProps<"div"> {
12
+ /**
13
+ * Specifies which platform's window controls to display.
14
+ * It can be one of "windows", "macos", or "gnome".
15
+ * If the `platform` property is not specified, the library will automatically detect
16
+ * the operating system the app is running on and display the appropriate elements.
17
+ */
18
+ platform?: "windows" | "macos" | "gnome";
19
+ /**
20
+ * Indicates whether the window controls should be shown or hidden.
21
+ * @default false
22
+ */
23
+ hide?: boolean;
24
+ /**
25
+ * - "display": "display: none;" making them completely invisible and not taking up any space.
26
+ * - "visibility": "visibility: hidden;" making them invisible but still occupying the same space.
27
+ * @default "display"
28
+ */
29
+ hideMethod?: "display" | "visibility";
30
+ /**
31
+ * Justify/Snap WindowControls
32
+ *
33
+ * @default false, (if not defined in WindowTitlebar automatically assigned)
34
+ */
35
+ justify?: boolean;
36
+ /**
37
+ * Specifies the Linux desktop environment for which the window controls are intended.
38
+ * This property is applicable only when the platform is set to "linux".
39
+ * @default "gnome"
40
+ */
41
+ /**
42
+ * Indicates whether to prevent the right-click context menu.
43
+ * When set to true, it will prevent the default right-click behavior.
44
+ * (only in production, default false)
45
+ */
46
+ /** `data-tauri-drag-region` */
47
+ "data-tauri-drag-region"?: boolean;
48
+ }
49
+
50
+ export declare function WindowTitlebar(props: WindowTitlebarProps): JSX.Element;
51
+
52
+ /**
53
+ * Interface for titlebar
54
+ */
55
+ export declare interface WindowTitlebarProps extends ComponentProps<"div"> {
56
+ /**
57
+ * The `controlsOrder` property is an optional property used in the `WindowControls` interface.
58
+ * It allows you to specify the order in which the window controls should be rendered relative to the children.
59
+ * (default: system)
60
+ *
61
+ * When `controlsOrder` is not specified or set to `system`, the default behavior will be as follows:
62
+ * - For platforms other than macOS, the controls will be on the right side of the children.
63
+ * - For macOS, the controls will be on the left side of the children (similar to "left" option).
64
+ *
65
+ * Possible values for `controlsOrder`:
66
+ * - "right": The window controls will be rendered to the right of the children.
67
+ * - "left": The window controls will be rendered to the left of the children. This order applies only when the platform is macOS (macOS window controls are usually located on the left side of the title bar).
68
+ * - "platform": for OS-based positioning specified in `windowControlsProps`
69
+ * @default "system"
70
+ */
71
+ controlsOrder?: "right" | "left" | "platform" | "system";
72
+ /**
73
+ * `WindowControls` props
74
+ */
75
+ windowControlsProps?: WindowControlsProps;
76
+ }
77
+
78
+ export { }
package/dist/solid.css ADDED
@@ -0,0 +1 @@
1
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-sky-300:oklch(82.8% .111 230.318);--color-sky-500:oklch(68.5% .169 237.323);--color-sky-600:oklch(58.8% .158 241.966);--color-violet-200:oklch(89.4% .057 293.283);--color-rose-700:oklch(51.4% .222 16.935);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-semibold:600;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}@layer base{.tauri-controls *,.tauri-controls :after,.tauri-controls :before,.tauri-controls ::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}.tauri-controls ::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}.tauri-controls html,.tauri-controls :host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}.tauri-controls hr{height:0;color:inherit;border-top-width:1px}.tauri-controls abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.tauri-controls h1,.tauri-controls h2,.tauri-controls h3,.tauri-controls h4,.tauri-controls h5,.tauri-controls h6{font-size:inherit;font-weight:inherit}.tauri-controls a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}.tauri-controls b,.tauri-controls strong{font-weight:bolder}.tauri-controls code,.tauri-controls kbd,.tauri-controls samp,.tauri-controls pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}.tauri-controls small{font-size:80%}.tauri-controls sub,.tauri-controls sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}.tauri-controls sub{bottom:-.25em}.tauri-controls sup{top:-.5em}.tauri-controls table{text-indent:0;border-color:inherit;border-collapse:collapse}.tauri-controls :-moz-focusring{outline:auto}.tauri-controls progress{vertical-align:baseline}.tauri-controls summary{display:list-item}.tauri-controls ol,.tauri-controls ul,.tauri-controls menu{list-style:none}.tauri-controls img,.tauri-controls svg,.tauri-controls video,.tauri-controls canvas,.tauri-controls audio,.tauri-controls iframe,.tauri-controls embed,.tauri-controls object{vertical-align:middle;display:block}.tauri-controls img,.tauri-controls video{max-width:100%;height:auto}.tauri-controls button,.tauri-controls input,.tauri-controls select,.tauri-controls optgroup,.tauri-controls textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.tauri-controls ::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}.tauri-controls :where(select:is([multiple],[size])) optgroup{font-weight:bolder}.tauri-controls :where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}.tauri-controls ::file-selector-button{margin-inline-end:4px}.tauri-controls ::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){.tauri-controls ::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){.tauri-controls ::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}.tauri-controls textarea{resize:vertical}.tauri-controls ::-webkit-search-decoration{-webkit-appearance:none}.tauri-controls ::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}.tauri-controls ::-webkit-datetime-edit{display:inline-flex}.tauri-controls ::-webkit-datetime-edit-fields-wrapper{padding:0}.tauri-controls ::-webkit-datetime-edit{padding-block:0}.tauri-controls ::-webkit-datetime-edit-year-field{padding-block:0}.tauri-controls ::-webkit-datetime-edit-month-field{padding-block:0}.tauri-controls ::-webkit-datetime-edit-day-field{padding-block:0}.tauri-controls ::-webkit-datetime-edit-hour-field{padding-block:0}.tauri-controls ::-webkit-datetime-edit-minute-field{padding-block:0}.tauri-controls ::-webkit-datetime-edit-second-field{padding-block:0}.tauri-controls ::-webkit-datetime-edit-millisecond-field{padding-block:0}.tauri-controls ::-webkit-datetime-edit-meridiem-field{padding-block:0}.tauri-controls ::-webkit-calendar-picker-indicator{line-height:1}.tauri-controls :-moz-ui-invalid{box-shadow:none}.tauri-controls button,.tauri-controls input:where([type=button],[type=reset],[type=submit]){appearance:button}.tauri-controls ::file-selector-button{appearance:button}.tauri-controls ::-webkit-inner-spin-button{height:auto}.tauri-controls ::-webkit-outer-spin-button{height:auto}.tauri-controls [hidden]:where(:not([hidden=until-found])){display:none!important}}@layer utilities{.tauri-controls .invisible{visibility:hidden}.tauri-controls .fixed{position:fixed}.tauri-controls .relative{position:relative}.tauri-controls .start{inset-inline-start:var(--spacing)}.tauri-controls .top-1{top:calc(var(--spacing) * 1)}.tauri-controls .right-1{right:calc(var(--spacing) * 1)}.tauri-controls .m-0{margin:calc(var(--spacing) * 0)}.tauri-controls .mr-2{margin-right:calc(var(--spacing) * 2)}.tauri-controls .mr-\[10px\]{margin-right:10px}.tauri-controls .ml-0{margin-left:calc(var(--spacing) * 0)}.tauri-controls .ml-3{margin-left:calc(var(--spacing) * 3)}.tauri-controls .ml-auto{margin-left:auto}.tauri-controls .flex{display:flex}.tauri-controls .hidden{display:none}.tauri-controls .inline-flex{display:inline-flex}.tauri-controls .aspect-square{aspect-ratio:1}.tauri-controls .h-2{height:calc(var(--spacing) * 2)}.tauri-controls .h-3{height:calc(var(--spacing) * 3)}.tauri-controls .h-6{height:calc(var(--spacing) * 6)}.tauri-controls .h-8{height:calc(var(--spacing) * 8)}.tauri-controls .h-10{height:calc(var(--spacing) * 10)}.tauri-controls .h-\[9px\]{height:9px}.tauri-controls .h-auto{height:auto}.tauri-controls .h-full{height:100%}.tauri-controls .h-screen{height:100vh}.tauri-controls .max-h-8{max-height:calc(var(--spacing) * 8)}.tauri-controls .w-2{width:calc(var(--spacing) * 2)}.tauri-controls .w-3{width:calc(var(--spacing) * 3)}.tauri-controls .w-6{width:calc(var(--spacing) * 6)}.tauri-controls .w-\[9px\]{width:9px}.tauri-controls .w-\[46px\]{width:46px}.tauri-controls .w-\[960px\]{width:960px}.tauri-controls .w-fit{width:fit-content}.tauri-controls .w-full{width:100%}.tauri-controls .cursor-default{cursor:default}.tauri-controls .flex-col{flex-direction:column}.tauri-controls .flex-row{flex-direction:row}.tauri-controls .content-center{align-content:center}.tauri-controls .items-center{align-items:center}.tauri-controls .justify-center{justify-content:center}:where(.tauri-controls .space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.tauri-controls .space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}:where(.tauri-controls .space-x-3>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 3) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-x-reverse)))}:where(.tauri-controls .space-x-\[13px\]>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(13px * var(--tw-space-x-reverse));margin-inline-end:calc(13px * calc(1 - var(--tw-space-x-reverse)))}.tauri-controls .self-center{align-self:center}.tauri-controls .overflow-auto{overflow:auto}.tauri-controls .overflow-hidden{overflow:hidden}.tauri-controls .rounded-full{border-radius:3.40282e38px}.tauri-controls .rounded-md{border-radius:var(--radius-md)}.tauri-controls .rounded-none{border-radius:0}.tauri-controls .rounded-sm{border-radius:var(--radius-sm)}.tauri-controls .rounded-xl{border-radius:var(--radius-xl)}.tauri-controls .rounded-t-lg{border-top-left-radius:var(--radius-lg);border-top-right-radius:var(--radius-lg)}.tauri-controls .border{border-style:var(--tw-border-style);border-width:1px}.tauri-controls .border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.tauri-controls .border-dashed{--tw-border-style:dashed;border-style:dashed}.tauri-controls .border-none{--tw-border-style:none;border-style:none}.tauri-controls .border-black\/12{border-color:#0000001f}@supports (color:color-mix(in lab,red,red)){.tauri-controls .border-black\/12{border-color:color-mix(in oklab,var(--color-black) 12%,transparent)}}.tauri-controls .border-slate-400{border-color:var(--color-slate-400)}.tauri-controls .bg-\[\#28c93f\]{background-color:#28c93f}.tauri-controls .bg-\[\#dadada\]{background-color:#dadada}.tauri-controls .bg-\[\#ff544d\]{background-color:#ff544d}.tauri-controls .bg-\[\#ffbd2e\]{background-color:#ffbd2e}.tauri-controls .bg-rose-700{background-color:var(--color-rose-700)}.tauri-controls .bg-sky-500{background-color:var(--color-sky-500)}.tauri-controls .bg-slate-200{background-color:var(--color-slate-200)}.tauri-controls .bg-slate-300{background-color:var(--color-slate-300)}.tauri-controls .bg-transparent{background-color:#0000}.tauri-controls .bg-violet-200\/20{background-color:#ddd6ff33}@supports (color:color-mix(in lab,red,red)){.tauri-controls .bg-violet-200\/20{background-color:color-mix(in oklab,var(--color-violet-200) 20%,transparent)}}.tauri-controls .bg-white{background-color:var(--color-white)}.tauri-controls .p-0{padding:calc(var(--spacing) * 0)}.tauri-controls .p-2{padding:calc(var(--spacing) * 2)}.tauri-controls .p-3{padding:calc(var(--spacing) * 3)}.tauri-controls .px-2{padding-inline:calc(var(--spacing) * 2)}.tauri-controls .px-3{padding-inline:calc(var(--spacing) * 3)}.tauri-controls .px-14{padding-inline:calc(var(--spacing) * 14)}.tauri-controls .py-1{padding-block:calc(var(--spacing) * 1)}.tauri-controls .py-6{padding-block:calc(var(--spacing) * 6)}.tauri-controls .pr-10{padding-right:calc(var(--spacing) * 10)}.tauri-controls .pb-1{padding-bottom:calc(var(--spacing) * 1)}.tauri-controls .text-center{text-align:center}.tauri-controls .font-mono{font-family:var(--font-mono)}.tauri-controls .text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.tauri-controls .font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tauri-controls .whitespace-nowrap{white-space:nowrap}.tauri-controls .text-\[\#3d3d3d\]{color:#3d3d3d}.tauri-controls .text-black{color:var(--color-black)}.tauri-controls .text-black\/60{color:#0009}@supports (color:color-mix(in lab,red,red)){.tauri-controls .text-black\/60{color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.tauri-controls .text-black\/90{color:#000000e6}@supports (color:color-mix(in lab,red,red)){.tauri-controls .text-black\/90{color:color-mix(in oklab,var(--color-black) 90%,transparent)}}.tauri-controls .text-sky-600\/70{color:#0084ccb3}@supports (color:color-mix(in lab,red,red)){.tauri-controls .text-sky-600\/70{color:color-mix(in oklab,var(--color-sky-600) 70%,transparent)}}.tauri-controls .text-white\/36{color:#ffffff5c}@supports (color:color-mix(in lab,red,red)){.tauri-controls .text-white\/36{color:color-mix(in oklab,var(--color-white) 36%,transparent)}}.tauri-controls .shadow,.tauri-controls .shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.tauri-controls .select-none{-webkit-user-select:none;user-select:none}@media(hover:hover){.tauri-controls .hover\:bg-\[\#28c93f\]:hover{background-color:#28c93f}.tauri-controls .hover\:bg-\[\#c42b1c\]:hover{background-color:#c42b1c}.tauri-controls .hover\:bg-\[\#d1d1d1\]:hover{background-color:#d1d1d1}.tauri-controls .hover\:bg-\[\#ff544d\]:hover{background-color:#ff544d}.tauri-controls .hover\:bg-\[\#ffbd2e\]:hover{background-color:#ffbd2e}.tauri-controls .hover\:bg-black\/5:hover{background-color:#0000000d}@supports (color:color-mix(in lab,red,red)){.tauri-controls .hover\:bg-black\/5:hover{background-color:color-mix(in oklab,var(--color-black) 5%,transparent)}}.tauri-controls .hover\:text-white:hover{color:var(--color-white)}}.tauri-controls .active\:bg-\[\#1e9930\]:active{background-color:#1e9930}.tauri-controls .active\:bg-\[\#bf403a\]:active{background-color:#bf403a}.tauri-controls .active\:bg-\[\#bf9122\]:active{background-color:#bf9122}.tauri-controls .active\:bg-\[\#bfbfbf\]:active{background-color:#bfbfbf}.tauri-controls .active\:bg-\[\#c42b1c\]\/90:active{background-color:#c42b1ce6}.tauri-controls .active\:bg-black\/3:active{background-color:#00000008}@supports (color:color-mix(in lab,red,red)){.tauri-controls .active\:bg-black\/3:active{background-color:color-mix(in oklab,var(--color-black) 3%,transparent)}}.tauri-controls .active\:text-black:active{color:var(--color-black)}.tauri-controls .active\:text-black\/60:active{color:#0009}@supports (color:color-mix(in lab,red,red)){.tauri-controls .active\:text-black\/60:active{color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.tauri-controls .dark\:border-none:where(.dark,.dark *){--tw-border-style:none;border-style:none}.tauri-controls .dark\:border-slate-600:where(.dark,.dark *){border-color:var(--color-slate-600)}.tauri-controls .dark\:bg-\[\#373737\]:where(.dark,.dark *){background-color:#373737}.tauri-controls .dark\:bg-slate-800:where(.dark,.dark *){background-color:var(--color-slate-800)}.tauri-controls .dark\:bg-slate-900:where(.dark,.dark *){background-color:var(--color-slate-900)}.tauri-controls .dark\:bg-slate-950\/50:where(.dark,.dark *){background-color:#02061880}@supports (color:color-mix(in lab,red,red)){.tauri-controls .dark\:bg-slate-950\/50:where(.dark,.dark *){background-color:color-mix(in oklab,var(--color-slate-950) 50%,transparent)}}.tauri-controls .dark\:text-black:where(.dark,.dark *){color:var(--color-black)}.tauri-controls .dark\:text-sky-300\/70:where(.dark,.dark *){color:#77d4ffb3}@supports (color:color-mix(in lab,red,red)){.tauri-controls .dark\:text-sky-300\/70:where(.dark,.dark *){color:color-mix(in oklab,var(--color-sky-300) 70%,transparent)}}.tauri-controls .dark\:text-white:where(.dark,.dark *){color:var(--color-white)}@media(hover:hover){.tauri-controls .dark\:hover\:bg-\[\#424242\]:where(.dark,.dark *):hover{background-color:#424242}.tauri-controls .dark\:hover\:bg-white\/6:where(.dark,.dark *):hover{background-color:#ffffff0f}@supports (color:color-mix(in lab,red,red)){.tauri-controls .dark\:hover\:bg-white\/6:where(.dark,.dark *):hover{background-color:color-mix(in oklab,var(--color-white) 6%,transparent)}}}.tauri-controls .dark\:active\:bg-\[\#565656\]:where(.dark,.dark *):active{background-color:#565656}.tauri-controls .dark\:active\:bg-white\/4:where(.dark,.dark *):active{background-color:#ffffff0a}@supports (color:color-mix(in lab,red,red)){.tauri-controls .dark\:active\:bg-white\/4:where(.dark,.dark *):active{background-color:color-mix(in oklab,var(--color-white) 4%,transparent)}}}.tauri-controls button,.tauri-controls input,.tauri-controls optgroup,.tauri-controls select,.tauri-controls textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;appearance:none;cursor:default;background-color:#0000;border:none;border-radius:0;outline:none;margin:0;padding:0}.tauri-controls *{box-sizing:border-box}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
@@ -0,0 +1 @@
1
+ import"./tauri-controls.css";import{createRenderEffect as e,createMemo as t,untrack as r,sharedConfig as n,splitProps as o,mergeProps as i,createSignal as l,createComponent as s,onMount as a,onCleanup as c,Switch as d,Match as u,createResource as f}from"solid-js";import{twMerge as h}from"tailwind-merge";const C=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable","allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"]),g=new Set(["innerHTML","textContent","innerText","children"]),p=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),w=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}}),b=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),v={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},m=e=>t((()=>e())),y="_$DX_DELEGATE";function x(e,t,r,n){let o;const i=()=>(o||(o=(()=>{const t=document.createElement("template");return t.innerHTML=e,t.content.firstChild})())).cloneNode(!0);return i.cloneNode=i,i}function k(e,t,r){A(e)||(null==r?e.removeAttribute(t):e.setAttribute(t,r))}function L(t,n={},o,i){const l={};return e((()=>{return"function"==typeof n.ref&&(e=n.ref,o=t,r((()=>e(o,undefined))));var e,o})),e((()=>function(e,t,r,n,o={},i=!1){t||(t={});for(const n in o)if(!(n in t)){if("children"===n)continue;o[n]=E(e,n,null,o[n],r,i,t)}for(const n in t){if("children"===n)continue;const l=t[n];o[n]=E(e,n,l,o[n],r,i,t)}}(t,n,o,0,l,!0))),l}function M(t,r,n,o){if(void 0===n||o||(o=[]),"function"!=typeof r)return N(t,r,o,n);e((e=>N(t,r(),e,n)),o)}function A(e){return!!n.context&&!n.done&&(!e||e.isConnected)}function $(e,t,r){const n=t.trim().split(/\s+/);for(let t=0,o=n.length;t<o;t++)e.classList.toggle(n[t],r)}function E(e,t,r,n,o,i,l){let s,a,c,d,u;if("style"===t)return function(e,t,r){if(!t)return r?k(e,"style"):t;const n=e.style;if("string"==typeof t)return n.cssText=t;let o,i;for(i in"string"==typeof r&&(n.cssText=r=void 0),r||(r={}),t||(t={}),r)null==t[i]&&n.removeProperty(i),delete r[i];for(i in t)o=t[i],o!==r[i]&&(n.setProperty(i,o),r[i]=o);return r}(e,r,n);if("classList"===t)return function(e,t,r={}){const n=Object.keys(t||{}),o=Object.keys(r);let i,l;for(i=0,l=o.length;i<l;i++){const n=o[i];n&&"undefined"!==n&&!t[n]&&($(e,n,!1),delete r[n])}for(i=0,l=n.length;i<l;i++){const o=n[i],l=!!t[o];o&&"undefined"!==o&&r[o]!==l&&l&&($(e,o,!0),r[o]=l)}return r}(e,r,n);if(r===n)return n;if("ref"===t)i||r(e);else if("on:"===t.slice(0,3)){const o=t.slice(3);n&&e.removeEventListener(o,n,"function"!=typeof n&&n),r&&e.addEventListener(o,r,"function"!=typeof r&&r)}else if("oncapture:"===t.slice(0,10)){const o=t.slice(10);n&&e.removeEventListener(o,n,!0),r&&e.addEventListener(o,r,!0)}else if("on"===t.slice(0,2)){const o=t.slice(2).toLowerCase(),i=b.has(o);if(!i&&n){const t=Array.isArray(n)?n[0]:n;e.removeEventListener(o,t)}(i||r)&&(function(e,t,r,n){if(n)Array.isArray(r)?(e[`$$${t}`]=r[0],e[`$$${t}Data`]=r[1]):e[`$$${t}`]=r;else if(Array.isArray(r)){const n=r[0];e.addEventListener(t,r[0]=t=>n.call(e,r[1],t))}else e.addEventListener(t,r,"function"!=typeof r&&r)}(e,o,r,i),i&&function(e,t=window.document){const r=t[y]||(t[y]=new Set);for(let n=0,o=e.length;n<o;n++){const o=e[n];r.has(o)||(r.add(o),t.addEventListener(o,T))}}([o]))}else if("attr:"===t.slice(0,5))k(e,t.slice(5),r);else if("bool:"===t.slice(0,5))f=e,h=t.slice(5),m=r,A(f)||(m?f.setAttribute(h,""):f.removeAttribute(h));else if((u="prop:"===t.slice(0,5))||(c=g.has(t))||!o&&((d=function(e,t){const r=w[e];return"object"==typeof r?r[t]?r.$:void 0:r}(t,e.tagName))||(a=C.has(t)))||(s=e.nodeName.includes("-")||"is"in l)){if(u)t=t.slice(5),a=!0;else if(A(e))return r;"class"===t||"className"===t?function(e,t){A(e)||(null==t?e.removeAttribute("class"):e.className=t)}(e,r):!s||a||c?e[d||t]=r:e[(x=t,x.toLowerCase().replace(/-([a-z])/g,((e,t)=>t.toUpperCase())))]=r}else{const n=o&&t.indexOf(":")>-1&&v[t.split(":")[0]];n?function(e,t,r,n){A(e)||(null==n?e.removeAttributeNS(t,r):e.setAttributeNS(t,r,n))}(e,n,t,r):k(e,p[t]||t,r)}var f,h,m,x;return r}function T(e){if(n.registry&&n.events&&n.events.find((([t,r])=>r===e)))return;let t=e.target;const r=`$$${e.type}`,o=e.target,i=e.currentTarget,l=t=>Object.defineProperty(e,"target",{configurable:!0,value:t}),s=()=>{const n=t[r];if(n&&!t.disabled){const o=t[`${r}Data`];if(void 0!==o?n.call(t,o,e):n.call(t,e),e.cancelBubble)return}return t.host&&"string"!=typeof t.host&&!t.host._$host&&t.contains(e.target)&&l(t.host),!0},a=()=>{for(;s()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:!0,get:()=>t||document}),n.registry&&!n.done&&(n.done=_$HY.done=!0),e.composedPath){const r=e.composedPath();l(r[0]);for(let e=0;e<r.length-2&&(t=r[e],s());e++){if(t._$host){t=t._$host,a();break}if(t.parentNode===i)break}}else a();l(o)}function N(t,r,n,o,i){const l=A(t);if(l){!n&&(n=[...t.childNodes]);let e=[];for(let t=0;t<n.length;t++){const r=n[t];8===r.nodeType&&"!$"===r.data.slice(0,2)?r.remove():e.push(r)}n=e}for(;"function"==typeof n;)n=n();if(r===n)return n;const s=typeof r,a=void 0!==o;if(t=a&&n[0]&&n[0].parentNode||t,"string"===s||"number"===s){if(l||"number"===s&&(r=r.toString())===n)return n;if(a){let e=n[0];e&&3===e.nodeType?e.data!==r&&(e.data=r):e=document.createTextNode(r),n=V(t,n,o,e)}else n=""!==n&&"string"==typeof n?t.firstChild.data=r:t.textContent=r}else if(null==r||"boolean"===s){if(l)return n;n=V(t,n,o)}else{if("function"===s)return e((()=>{let e=r();for(;"function"==typeof e;)e=e();n=N(t,e,n,o)})),()=>n;if(Array.isArray(r)){const s=[],c=n&&Array.isArray(n);if(P(s,r,n,i))return e((()=>n=N(t,s,n,o,!0))),()=>n;if(l){if(!s.length)return n;if(void 0===o)return n=[...t.childNodes];let e=s[0];if(e.parentNode!==t)return n;const r=[e];for(;(e=e.nextSibling)!==o;)r.push(e);return n=r}if(0===s.length){if(n=V(t,n,o),a)return n}else c?0===n.length?O(t,s,o):function(e,t,r){let n=r.length,o=t.length,i=n,l=0,s=0,a=t[o-1].nextSibling,c=null;for(;l<o||s<i;)if(t[l]!==r[s]){for(;t[o-1]===r[i-1];)o--,i--;if(o===l){const t=i<n?s?r[s-1].nextSibling:r[i-s]:a;for(;s<i;)e.insertBefore(r[s++],t)}else if(i===s)for(;l<o;)c&&c.has(t[l])||t[l].remove(),l++;else if(t[l]===r[i-1]&&r[s]===t[o-1]){const n=t[--o].nextSibling;e.insertBefore(r[s++],t[l++].nextSibling),e.insertBefore(r[--i],n),t[o]=r[i]}else{if(!c){c=new Map;let e=s;for(;e<i;)c.set(r[e],e++)}const n=c.get(t[l]);if(null!=n)if(s<n&&n<i){let a,d=l,u=1;for(;++d<o&&d<i&&null!=(a=c.get(t[d]))&&a===n+u;)u++;if(u>n-s){const o=t[l];for(;s<n;)e.insertBefore(r[s++],o)}else e.replaceChild(r[s++],t[l++])}else l++;else t[l++].remove()}}else l++,s++}(t,n,s):(n&&V(t),O(t,s));n=s}else if(r.nodeType){if(l&&r.parentNode)return n=a?[r]:r;if(Array.isArray(n)){if(a)return n=V(t,n,o,r);V(t,n,null,r)}else null!=n&&""!==n&&t.firstChild?t.replaceChild(r,t.firstChild):t.appendChild(r);n=r}}return n}function P(e,t,r,n){let o=!1;for(let i=0,l=t.length;i<l;i++){let l,s=t[i],a=r&&r[e.length];if(null!=s&&!0!==s&&!1!==s)if("object"==(l=typeof s)&&s.nodeType)e.push(s);else if(Array.isArray(s))o=P(e,s,a)||o;else if("function"===l)if(n){for(;"function"==typeof s;)s=s();o=P(e,Array.isArray(s)?s:[s],Array.isArray(a)?a:[a])||o}else e.push(s),o=!0;else{const t=String(s);a&&3===a.nodeType&&a.data===t?e.push(a):e.push(document.createTextNode(t))}}return o}function O(e,t,r=null){for(let n=0,o=t.length;n<o;n++)e.insertBefore(t[n],r)}function V(e,t,r,n){if(void 0===r)return e.textContent="";const o=n||document.createTextNode("");if(t.length){let n=!1;for(let i=t.length-1;i>=0;i--){const l=t[i];if(o!==l){const t=l.parentNode===e;n||i?t&&l.remove():t?e.replaceChild(o,l):e.insertBefore(o,r)}else n=!0}}else e.insertBefore(o,r);return[o]}var I=x("<button>");function H(e){const[t,r]=o(e,["class","children"]);return L(n=I(),i({get class(){return h("inline-flex cursor-default items-center justify-center",t.class)}},r),!1),M(n,(()=>t.children)),n;var n}var R=x('<svg width=10 height=1 viewBox="0 0 10 1"fill=none xmlns=http://www.w3.org/2000/svg><path d="M0.498047 1.00098C0.429688 1.00098 0.364583 0.987956 0.302734 0.961914C0.244141 0.935872 0.192057 0.900065 0.146484 0.854492C0.100911 0.808919 0.0651042 0.756836 0.0390625 0.698242C0.0130208 0.636393 0 0.571289 0 0.50293C0 0.43457 0.0130208 0.371094 0.0390625 0.3125C0.0651042 0.250651 0.100911 0.19694 0.146484 0.151367C0.192057 0.102539 0.244141 0.0651042 0.302734 0.0390625C0.364583 0.0130208 0.429688 0 0.498047 0H9.50195C9.57031 0 9.63379 0.0130208 9.69238 0.0390625C9.75423 0.0651042 9.80794 0.102539 9.85352 0.151367C9.89909 0.19694 9.9349 0.250651 9.96094 0.3125C9.98698 0.371094 10 0.43457 10 0.50293C10 0.571289 9.98698 0.636393 9.96094 0.698242C9.9349 0.756836 9.89909 0.808919 9.85352 0.854492C9.80794 0.900065 9.75423 0.935872 9.69238 0.961914C9.63379 0.987956 9.57031 1.00098 9.50195 1.00098H0.498047Z"fill=currentColor fill-opacity=0.8956>'),S=x('<svg width=10 height=10 viewBox="0 0 10 10"fill=none xmlns=http://www.w3.org/2000/svg><path d="M1.47461 10.001C1.2793 10.001 1.09212 9.96191 0.913086 9.88379C0.734049 9.80241 0.576172 9.69499 0.439453 9.56152C0.30599 9.4248 0.198568 9.26693 0.117188 9.08789C0.0390625 8.90885 0 8.72168 0 8.52637V1.47559C0 1.28027 0.0390625 1.0931 0.117188 0.914062C0.198568 0.735026 0.30599 0.578776 0.439453 0.445312C0.576172 0.308594 0.734049 0.201172 0.913086 0.123047C1.09212 0.0416667 1.2793 0.000976562 1.47461 0.000976562H8.52539C8.7207 0.000976562 8.90788 0.0416667 9.08691 0.123047C9.26595 0.201172 9.4222 0.308594 9.55566 0.445312C9.69238 0.578776 9.7998 0.735026 9.87793 0.914062C9.95931 1.0931 10 1.28027 10 1.47559V8.52637C10 8.72168 9.95931 8.90885 9.87793 9.08789C9.7998 9.26693 9.69238 9.4248 9.55566 9.56152C9.4222 9.69499 9.26595 9.80241 9.08691 9.88379C8.90788 9.96191 8.7207 10.001 8.52539 10.001H1.47461ZM8.50098 9C8.56934 9 8.63281 8.98698 8.69141 8.96094C8.75326 8.9349 8.80697 8.89909 8.85254 8.85352C8.89811 8.80794 8.93392 8.75586 8.95996 8.69727C8.986 8.63542 8.99902 8.57031 8.99902 8.50195V1.5C8.99902 1.43164 8.986 1.36816 8.95996 1.30957C8.93392 1.24772 8.89811 1.19401 8.85254 1.14844C8.80697 1.10286 8.75326 1.06706 8.69141 1.04102C8.63281 1.01497 8.56934 1.00195 8.50098 1.00195H1.49902C1.43066 1.00195 1.36556 1.01497 1.30371 1.04102C1.24512 1.06706 1.19303 1.10286 1.14746 1.14844C1.10189 1.19401 1.06608 1.24772 1.04004 1.30957C1.014 1.36816 1.00098 1.43164 1.00098 1.5V8.50195C1.00098 8.57031 1.014 8.63542 1.04004 8.69727C1.06608 8.75586 1.10189 8.80794 1.14746 8.85352C1.19303 8.89909 1.24512 8.9349 1.30371 8.96094C1.36556 8.98698 1.43066 9 1.49902 9H8.50098Z"fill=currentColor fill-opacity=0.8956>'),_=x('<svg width=10 height=11 viewBox="0 0 10 11"fill=none xmlns=http://www.w3.org/2000/svg><path d="M8.99902 2.98096C8.99902 2.71077 8.94531 2.45687 8.83789 2.21924C8.73047 1.97835 8.58398 1.77002 8.39844 1.59424C8.21615 1.4152 8.00293 1.27523 7.75879 1.17432C7.5179 1.07015 7.264 1.01807 6.99707 1.01807H2.08496C2.13704 0.868327 2.21029 0.731608 2.30469 0.60791C2.39909 0.484212 2.50814 0.378418 2.63184 0.290527C2.75553 0.202637 2.89062 0.135905 3.03711 0.090332C3.18685 0.0415039 3.34147 0.0170898 3.50098 0.0170898H6.99707C7.41048 0.0170898 7.79948 0.0968424 8.16406 0.256348C8.52865 0.412598 8.84603 0.625814 9.11621 0.895996C9.38965 1.16618 9.60449 1.48356 9.76074 1.84814C9.92025 2.21273 10 2.60173 10 3.01514V6.51611C10 6.67562 9.97559 6.83024 9.92676 6.97998C9.88118 7.12646 9.81445 7.26156 9.72656 7.38525C9.63867 7.50895 9.53288 7.618 9.40918 7.7124C9.28548 7.8068 9.14876 7.88005 8.99902 7.93213V2.98096ZM1.47461 10.0171C1.2793 10.0171 1.09212 9.97803 0.913086 9.8999C0.734049 9.81852 0.576172 9.7111 0.439453 9.57764C0.30599 9.44092 0.198568 9.28304 0.117188 9.104C0.0390625 8.92497 0 8.73779 0 8.54248V3.49365C0 3.29508 0.0390625 3.10791 0.117188 2.93213C0.198568 2.75309 0.30599 2.59684 0.439453 2.46338C0.576172 2.32666 0.732422 2.21924 0.908203 2.14111C1.08724 2.05973 1.27604 2.01904 1.47461 2.01904H6.52344C6.72201 2.01904 6.91081 2.05973 7.08984 2.14111C7.26888 2.21924 7.42513 2.32503 7.55859 2.4585C7.69206 2.59196 7.79785 2.74821 7.87598 2.92725C7.95736 3.10628 7.99805 3.29508 7.99805 3.49365V8.54248C7.99805 8.74105 7.95736 8.92985 7.87598 9.10889C7.79785 9.28467 7.69043 9.44092 7.55371 9.57764C7.42025 9.7111 7.264 9.81852 7.08496 9.8999C6.90918 9.97803 6.72201 10.0171 6.52344 10.0171H1.47461ZM6.49902 9.01611C6.56738 9.01611 6.63086 9.00309 6.68945 8.97705C6.7513 8.95101 6.80501 8.9152 6.85059 8.86963C6.89941 8.82406 6.93685 8.77197 6.96289 8.71338C6.98893 8.65153 7.00195 8.58643 7.00195 8.51807V3.51807C7.00195 3.44971 6.98893 3.3846 6.96289 3.32275C6.93685 3.2609 6.90104 3.20719 6.85547 3.16162C6.8099 3.11605 6.75618 3.08024 6.69434 3.0542C6.63249 3.02816 6.56738 3.01514 6.49902 3.01514H1.49902C1.43066 3.01514 1.36556 3.02816 1.30371 3.0542C1.24512 3.08024 1.19303 3.11768 1.14746 3.1665C1.10189 3.21208 1.06608 3.26579 1.04004 3.32764C1.014 3.38623 1.00098 3.44971 1.00098 3.51807V8.51807C1.00098 8.58643 1.014 8.65153 1.04004 8.71338C1.06608 8.77197 1.10189 8.82406 1.14746 8.86963C1.19303 8.9152 1.24512 8.95101 1.30371 8.97705C1.36556 9.00309 1.43066 9.01611 1.49902 9.01611H6.49902Z"fill=currentColor fill-opacity=0.8956>'),j=x('<svg width=10 height=10 viewBox="0 0 10 10"fill=none xmlns=http://www.w3.org/2000/svg><path d="M5 5.70898L0.854492 9.85449C0.756836 9.95215 0.639648 10.001 0.50293 10.001C0.359701 10.001 0.239258 9.95378 0.141602 9.85938C0.0472005 9.76172 0 9.64128 0 9.49805C0 9.36133 0.0488281 9.24414 0.146484 9.14648L4.29199 5.00098L0.146484 0.855469C0.0488281 0.757812 0 0.638997 0 0.499023C0 0.430664 0.0130208 0.36556 0.0390625 0.303711C0.0651042 0.241862 0.100911 0.189779 0.146484 0.147461C0.192057 0.101888 0.245768 0.0660807 0.307617 0.0400391C0.369466 0.0139974 0.43457 0.000976562 0.50293 0.000976562C0.639648 0.000976562 0.756836 0.0498047 0.854492 0.147461L5 4.29297L9.14551 0.147461C9.24316 0.0498047 9.36198 0.000976562 9.50195 0.000976562C9.57031 0.000976562 9.63379 0.0139974 9.69238 0.0400391C9.75423 0.0660807 9.80794 0.101888 9.85352 0.147461C9.89909 0.193034 9.9349 0.246745 9.96094 0.308594C9.98698 0.367188 10 0.430664 10 0.499023C10 0.638997 9.95117 0.757812 9.85352 0.855469L5.70801 5.00098L9.85352 9.14648C9.95117 9.24414 10 9.36133 10 9.49805C10 9.56641 9.98698 9.63151 9.96094 9.69336C9.9349 9.75521 9.89909 9.80892 9.85352 9.85449C9.8112 9.90007 9.75911 9.93587 9.69727 9.96191C9.63542 9.98796 9.57031 10.001 9.50195 10.001C9.36198 10.001 9.24316 9.95215 9.14551 9.85449L5 5.70898Z"fill=currentColor fill-opacity=0.8956>'),z=x('<svg width=6 height=6 viewBox="0 0 16 18"fill=none xmlns=http://www.w3.org/2000/svg><path d="M15.7522 4.44381L11.1543 9.04165L15.7494 13.6368C16.0898 13.9771 16.078 14.5407 15.724 14.8947L13.8907 16.728C13.5358 17.0829 12.9731 17.0938 12.6328 16.7534L8.03766 12.1583L3.44437 16.7507C3.10402 17.091 2.54132 17.0801 2.18645 16.7253L0.273257 14.8121C-0.0807018 14.4572 -0.0925004 13.8945 0.247845 13.5542L4.84024 8.96087L0.32499 4.44653C-0.0153555 4.10619 -0.00355681 3.54258 0.350402 3.18862L2.18373 1.35529C2.53859 1.00042 3.1013 0.989533 3.44164 1.32988L7.95689 5.84422L12.5556 1.24638C12.8951 0.906035 13.4587 0.917833 13.8126 1.27179L15.7267 3.18589C16.0807 3.53985 16.0925 4.10346 15.7522 4.44381Z"fill=currentColor>'),B=x('<svg width=8 height=8 viewBox="0 0 17 6"fill=none xmlns=http://www.w3.org/2000/svg><g clip-path=url(#clip0_20_2051)><path fill-rule=evenodd clip-rule=evenodd d="M1.47211 1.18042H15.4197C15.8052 1.18042 16.1179 1.50551 16.1179 1.90769V3.73242C16.1179 4.13387 15.8052 4.80006 15.4197 4.80006H1.47211C1.08665 4.80006 0.773926 4.47497 0.773926 4.07278V1.90769C0.773926 1.50551 1.08665 1.18042 1.47211 1.18042Z"fill=currentColor>'),W=x('<svg width=6 height=6 viewBox="0 0 15 15"fill=none xmlns=http://www.w3.org/2000/svg><g clip-path=url(#clip0_20_2057)><path fill-rule=evenodd clip-rule=evenodd d="M3.53068 0.433838L15.0933 12.0409C15.0933 12.0409 15.0658 5.35028 15.0658 4.01784C15.0658 1.32095 14.1813 0.433838 11.5378 0.433838C10.6462 0.433838 3.53068 0.433838 3.53068 0.433838ZM12.4409 15.5378L0.87735 3.93073C0.87735 3.93073 0.905794 10.6214 0.905794 11.9538C0.905794 14.6507 1.79024 15.5378 4.43291 15.5378C5.32535 15.5378 12.4409 15.5378 12.4409 15.5378Z"fill=currentColor>'),D=x('<svg width=8 height=8 viewBox="0 0 17 16"fill=none xmlns=http://www.w3.org/2000/svg><g clip-path=url(#clip0_20_2053)><path fill-rule=evenodd clip-rule=evenodd d="M15.5308 9.80147H10.3199V15.0095C10.3199 15.3949 9.9941 15.7076 9.59265 15.7076H7.51555C7.11337 15.7076 6.78828 15.3949 6.78828 15.0095V9.80147H1.58319C1.19774 9.80147 0.88501 9.47638 0.88501 9.07419V6.90619C0.88501 6.50401 1.19774 6.17892 1.58319 6.17892H6.78828V1.06183C6.78828 0.676375 7.11337 0.363647 7.51555 0.363647H9.59265C9.9941 0.363647 10.3199 0.676375 10.3199 1.06183V6.17892H15.5308C15.9163 6.17892 16.229 6.50401 16.229 6.90619V9.07419C16.229 9.47638 15.9163 9.80147 15.5308 9.80147Z"fill=currentColor>');const Z={minimizeWin:e=>{return L(t=R(),e,!0),t;var t},maximizeWin:e=>{return L(t=S(),e,!0),t;var t},maximizeRestoreWin:e=>{return L(t=_(),e,!0),t;var t},closeWin:e=>{return L(t=j(),e,!0),t;var t},closeMac:e=>{return L(t=z(),e,!0),t;var t},minMac:e=>{return L(t=B(),e,!0),t;var t},fullMac:e=>{return L(t=W(),e,!0),t;var t},plusMac:e=>{return L(t=D(),e,!0),t;var t}},[F,U]=l(!1),q=async()=>(await import("./index-CoMWRn1N.js")).window.getCurrentWindow();(async()=>{if(typeof window<"u"){const e=await q(),t=await e.isMaximized();U(t),await e.onResized((async()=>{const t=await e.isMaximized();U(t)}))}})();const G=async()=>{await(await q()).minimize()},X=async()=>{await(await q()).toggleMaximize()},Y=async()=>{const e=await q(),t=await e.isFullscreen();await e.setFullscreen(!t)},J=async()=>{await(await q()).close()};var K=x("<div>");function Q(e){const[t,r]=o(e,["class"]);return L(n=K(),i({get class(){return h("h-8",t.class)}},r),!1),M(n,s(H,{onClick:G,class:"max-h-8 w-[46px] cursor-default rounded-none bg-transparent text-black/90 hover:bg-black/5 active:bg-black/3 dark:text-white dark:hover:bg-white/6 dark:active:bg-white/4",get children(){return s(Z.minimizeWin,{})}}),null),M(n,s(H,{onClick:X,get class(){return h("max-h-8 w-[46px] cursor-default rounded-none bg-transparent","text-black/90 hover:bg-black/5 active:bg-black/3 dark:text-white dark:hover:bg-white/6 dark:active:bg-white/4")},get children(){return m((()=>!!F()))()?s(Z.maximizeRestoreWin,{}):s(Z.maximizeWin,{})}}),null),M(n,s(H,{onClick:J,class:"max-h-8 w-[46px] cursor-default rounded-none bg-transparent text-black/90 hover:bg-[#c42b1c] hover:text-white active:bg-[#c42b1c]/90 dark:text-white",get children(){return s(Z.closeWin,{})}}),null),n;var n}var ee=x("<div>");function te(e){const[t,r]=o(e,["class"]),[n,d]=l(!1),[u,f]=l(!1),C=e=>{"Alt"===e.key&&d(!0)},g=e=>{"Alt"===e.key&&d(!1)};return a((()=>{window.addEventListener("keydown",C),window.addEventListener("keyup",g)})),c((()=>{window.removeEventListener("keydown",C),window.removeEventListener("keyup",g)})),(p=ee()).addEventListener("mouseleave",(()=>{f(!1)})),p.addEventListener("mouseenter",(()=>{f(!0)})),L(p,i({get class(){return h("space-x-2 px-3 text-black active:text-black dark:text-black",t.class)}},r),!1),M(p,s(H,{onClick:J,class:"aspect-square h-3 w-3 cursor-default content-center items-center justify-center self-center rounded-full border border-black/12 bg-[#ff544d] text-center text-black/60 hover:bg-[#ff544d] active:bg-[#bf403a] active:text-black/60 dark:border-none",get children(){return m((()=>!!u()))()&&s(Z.closeMac,{})}}),null),M(p,s(H,{onClick:G,class:"aspect-square h-3 w-3 cursor-default content-center items-center justify-center self-center rounded-full border border-black/12 bg-[#ffbd2e] text-center text-black/60 hover:bg-[#ffbd2e] active:bg-[#bf9122] active:text-black/60 dark:border-none",get children(){return m((()=>!!u()))()&&s(Z.minMac,{})}}),null),M(p,s(H,{get onClick(){return n()?X:Y},class:"aspect-square h-3 w-3 cursor-default content-center items-center justify-center self-center rounded-full border border-black/12 bg-[#28c93f] text-center text-black/60 hover:bg-[#28c93f] active:bg-[#1e9930] active:text-black/60 dark:border-none",get children(){return m((()=>!!u()))()&&(n()?s(Z.plusMac,{}):s(Z.fullMac,{}))}}),null),p;var p}var re=x("<div>");function ne(e){const[t,r]=o(e,["class"]);return L(n=re(),i({get class(){return h("mr-[10px] h-auto items-center space-x-[13px]",t.class)}},r),!1),M(n,s(H,{onClick:G,class:"m-0 aspect-square h-6 w-6 cursor-default rounded-full bg-[#dadada] p-0 text-[#3d3d3d] hover:bg-[#d1d1d1] active:bg-[#bfbfbf] dark:bg-[#373737] dark:text-white dark:hover:bg-[#424242] dark:active:bg-[#565656]",get children(){return s(Z.minimizeWin,{class:"w-[9px]"})}}),null),M(n,s(H,{onClick:X,class:"m-0 aspect-square h-6 w-6 cursor-default rounded-full bg-[#dadada] p-0 text-[#3d3d3d] hover:bg-[#d1d1d1] active:bg-[#bfbfbf] dark:bg-[#373737] dark:text-white dark:hover:bg-[#424242] dark:active:bg-[#565656]",get children(){return m((()=>!!F()))()?s(Z.maximizeRestoreWin,{class:"h-[9px] w-[9px]"}):s(Z.maximizeWin,{class:"h-2 w-2"})}}),null),M(n,s(H,{onClick:J,class:"m-0 aspect-square h-6 w-6 cursor-default rounded-full bg-[#dadada] p-0 text-[#3d3d3d] hover:bg-[#d1d1d1] active:bg-[#bfbfbf] dark:bg-[#373737] dark:text-white dark:hover:bg-[#424242] dark:active:bg-[#565656]",get children(){return s(Z.closeWin,{class:"h-2 w-2"})}}),null),n;var n}async function oe(){return await window.__TAURI_OS_PLUGIN_INTERNALS__.os_type}function ie(e){const[r,n]=o(e,["class","hideMethod","hide","platform","justify"]),l=t((()=>r.platform??async function(){switch(await oe()){case"macos":return"macos";case"linux":return"gnome";default:return"windows"}}())),a=()=>h("tauri-controls flex",r.class,r.hide&&("display"===(r.hideMethod??"display")?"hidden":"invisible"),r.justify&&("macos"===l()?"ml-0":"ml-auto"));return s(d,{get children(){return[s(u,{get when(){return"macos"===l()},get children(){return s(te,i({get class(){return a()}},n))}}),s(u,{get when(){return"gnome"===l()},get children(){return s(ne,i({get class(){return a()}},n))}}),s(u,{when:!0,get children(){return s(Q,i({get class(){return a()}},n))}})]}})}var le=x("<div data-tauri-drag-region>");function se(e){const[r,n]=o(e,["children","controlsOrder","class","windowControlsProps"]),[l]=f(oe),a=t((()=>"left"===r.controlsOrder||"right"!==r.controlsOrder&&("platform"===r.controlsOrder?"macos"===(r.windowControlsProps?.platform??l()):"macos"===l()))),c=i(r.windowControlsProps,{justify:!1,get class(){const e=a()?"ml-0":"ml-auto";return h(r.windowControlsProps?.class,e)}}),d=s(ie,c);return L(u=le(),i({get class(){return h("tauri-controls bg-background flex flex-row overflow-hidden select-none",r.class)}},n),!1),M(u,(()=>a()?[d,r.children]:[r.children,d])),u;var u}export{ie as WindowControls,se as WindowTitlebar};
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@tauri-controls-v2/solid",
3
+ "description": "🚥 Native-looking window controls for Tauri 2.",
4
+ "private": false,
5
+ "version": "0.4.1",
6
+ "type": "module",
7
+ "license": "MIT",
8
+ "scripts": {
9
+ "start": "vite",
10
+ "dev": "vite",
11
+ "build": "tsc && vite build",
12
+ "serve": "vite preview",
13
+ "tauri": "tauri",
14
+ "tauri:dev": "tauri dev",
15
+ "lint": "eslint src",
16
+ "format": "prettier --write . --config ./prettier.config.cjs"
17
+ },
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/eatham532/tauri-controls-v2.git"
24
+ },
25
+ "keywords": [],
26
+ "author": "eatham532",
27
+ "bugs": {
28
+ "url": "https://github.com/eatham532/tauri-controls-v2/issues"
29
+ },
30
+ "homepage": "https://github.com/eatham532/tauri-controls-v2#readme",
31
+ "files": [
32
+ "dist"
33
+ ],
34
+ "exports": {
35
+ ".": {
36
+ "import": "./dist/tauri-controls.js",
37
+ "types": "./dist/index.d.ts"
38
+ }
39
+ },
40
+ "module": "./dist/tauri-controls.js",
41
+ "types": "./dist/index.d.ts",
42
+ "dependencies": {},
43
+ "devDependencies": {
44
+ "@eslint/js": "^10.0.1",
45
+ "@ianvs/prettier-plugin-sort-imports": "^4.7.1",
46
+ "@rollup/plugin-terser": "^0.4.4",
47
+ "@tailwindcss/vite": "^4.2.0",
48
+ "@tauri-apps/api": "^2.1.0",
49
+ "@tauri-apps/cli": "^2.1.0",
50
+ "@tauri-apps/plugin-os": "^2.1.0",
51
+ "@types/node": "^25.3.0",
52
+ "eslint-plugin-import": "^2.32.0",
53
+ "eslint-plugin-solid": "^0.14.5",
54
+ "postcss": "^8.5.6",
55
+ "prettier": "^3.5.2",
56
+ "prettier-plugin-tailwindcss": "^0.7.2",
57
+ "solid-js": "^1.9.5",
58
+ "tailwind-merge": "^3.0.1",
59
+ "tailwindcss": "^4.2.0",
60
+ "typescript": "^5.7.3",
61
+ "typescript-eslint": "^8.56.0",
62
+ "vite": "^7.3.1",
63
+ "vite-plugin-dts": "^4.5.4",
64
+ "vite-plugin-solid": "^2.11.10"
65
+ },
66
+ "peerDependencies": {
67
+ "solid-js": "^1.9.5",
68
+ "tailwind-merge": "^3.0.1"
69
+ }
70
+ }