@seelen-ui/lib 0.1.2-next.20241204071255
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 +202 -0
- package/esm/_dnt.shims.d.ts +5 -0
- package/esm/_dnt.shims.d.ts.map +1 -0
- package/esm/_dnt.shims.js +61 -0
- package/esm/handlers/events.d.ts +53 -0
- package/esm/handlers/events.d.ts.map +1 -0
- package/esm/handlers/events.js +54 -0
- package/esm/handlers/index.d.ts +11 -0
- package/esm/handlers/index.d.ts.map +1 -0
- package/esm/handlers/index.js +16 -0
- package/esm/handlers/invokers.d.ts +75 -0
- package/esm/handlers/invokers.d.ts.map +1 -0
- package/esm/handlers/invokers.js +77 -0
- package/esm/lib.d.ts +5 -0
- package/esm/lib.d.ts.map +1 -0
- package/esm/lib.js +4 -0
- package/esm/package.json +3 -0
- package/esm/state/icon_pack.d.ts +6 -0
- package/esm/state/icon_pack.d.ts.map +1 -0
- package/esm/state/icon_pack.js +5 -0
- package/esm/state/index.d.ts +24 -0
- package/esm/state/index.d.ts.map +1 -0
- package/esm/state/index.js +28 -0
- package/esm/state/placeholder.d.ts +91 -0
- package/esm/state/placeholder.d.ts.map +1 -0
- package/esm/state/placeholder.js +33 -0
- package/esm/state/plugin.d.ts +17 -0
- package/esm/state/plugin.d.ts.map +1 -0
- package/esm/state/plugin.js +31 -0
- package/esm/state/profile.d.ts +16 -0
- package/esm/state/profile.d.ts.map +1 -0
- package/esm/state/profile.js +13 -0
- package/esm/state/settings.d.ts +175 -0
- package/esm/state/settings.d.ts.map +1 -0
- package/esm/state/settings.js +195 -0
- package/esm/state/settings_by_app.d.ts +44 -0
- package/esm/state/settings_by_app.d.ts.map +1 -0
- package/esm/state/settings_by_app.js +48 -0
- package/esm/state/settings_by_monitor.d.ts +43 -0
- package/esm/state/settings_by_monitor.d.ts.map +1 -0
- package/esm/state/settings_by_monitor.js +46 -0
- package/esm/state/theme.d.ts +31 -0
- package/esm/state/theme.d.ts.map +1 -0
- package/esm/state/theme.js +1 -0
- package/esm/state/weg_items.d.ts +36 -0
- package/esm/state/weg_items.d.ts.map +1 -0
- package/esm/state/weg_items.js +8 -0
- package/esm/state/widget.d.ts +4 -0
- package/esm/state/widget.d.ts.map +1 -0
- package/esm/state/widget.js +3 -0
- package/esm/state/wm_layout.d.ts +56 -0
- package/esm/state/wm_layout.d.ts.map +1 -0
- package/esm/state/wm_layout.js +18 -0
- package/esm/system_state/index.d.ts +19 -0
- package/esm/system_state/index.d.ts.map +1 -0
- package/esm/system_state/index.js +40 -0
- package/esm/utils/hooks.d.ts +2 -0
- package/esm/utils/hooks.d.ts.map +1 -0
- package/esm/utils/hooks.js +43 -0
- package/esm/utils/index.d.ts +17 -0
- package/esm/utils/index.d.ts.map +1 -0
- package/esm/utils/index.js +57 -0
- package/esm/utils/layered_hitbox.d.ts +2 -0
- package/esm/utils/layered_hitbox.d.ts.map +1 -0
- package/esm/utils/layered_hitbox.js +55 -0
- package/package.json +26 -0
- package/readme.md +7 -0
- package/script/_dnt.shims.d.ts +5 -0
- package/script/_dnt.shims.d.ts.map +1 -0
- package/script/_dnt.shims.js +65 -0
- package/script/handlers/events.d.ts +53 -0
- package/script/handlers/events.d.ts.map +1 -0
- package/script/handlers/events.js +57 -0
- package/script/handlers/index.d.ts +11 -0
- package/script/handlers/index.d.ts.map +1 -0
- package/script/handlers/index.js +33 -0
- package/script/handlers/invokers.d.ts +75 -0
- package/script/handlers/invokers.d.ts.map +1 -0
- package/script/handlers/invokers.js +81 -0
- package/script/lib.d.ts +5 -0
- package/script/lib.d.ts.map +1 -0
- package/script/lib.js +20 -0
- package/script/package.json +3 -0
- package/script/state/icon_pack.d.ts +6 -0
- package/script/state/icon_pack.d.ts.map +1 -0
- package/script/state/icon_pack.js +9 -0
- package/script/state/index.d.ts +24 -0
- package/script/state/index.d.ts.map +1 -0
- package/script/state/index.js +47 -0
- package/script/state/placeholder.d.ts +91 -0
- package/script/state/placeholder.d.ts.map +1 -0
- package/script/state/placeholder.js +36 -0
- package/script/state/plugin.d.ts +17 -0
- package/script/state/plugin.d.ts.map +1 -0
- package/script/state/plugin.js +36 -0
- package/script/state/profile.d.ts +16 -0
- package/script/state/profile.d.ts.map +1 -0
- package/script/state/profile.js +17 -0
- package/script/state/settings.d.ts +175 -0
- package/script/state/settings.d.ts.map +1 -0
- package/script/state/settings.js +234 -0
- package/script/state/settings_by_app.d.ts +44 -0
- package/script/state/settings_by_app.d.ts.map +1 -0
- package/script/state/settings_by_app.js +53 -0
- package/script/state/settings_by_monitor.d.ts +43 -0
- package/script/state/settings_by_monitor.d.ts.map +1 -0
- package/script/state/settings_by_monitor.js +56 -0
- package/script/state/theme.d.ts +31 -0
- package/script/state/theme.d.ts.map +1 -0
- package/script/state/theme.js +2 -0
- package/script/state/weg_items.d.ts +36 -0
- package/script/state/weg_items.d.ts.map +1 -0
- package/script/state/weg_items.js +11 -0
- package/script/state/widget.d.ts +4 -0
- package/script/state/widget.d.ts.map +1 -0
- package/script/state/widget.js +7 -0
- package/script/state/wm_layout.d.ts +56 -0
- package/script/state/wm_layout.d.ts.map +1 -0
- package/script/state/wm_layout.js +21 -0
- package/script/system_state/index.d.ts +19 -0
- package/script/system_state/index.d.ts.map +1 -0
- package/script/system_state/index.js +44 -0
- package/script/utils/hooks.d.ts +2 -0
- package/script/utils/hooks.d.ts.map +1 -0
- package/script/utils/hooks.js +44 -0
- package/script/utils/index.d.ts +17 -0
- package/script/utils/index.d.ts.map +1 -0
- package/script/utils/index.js +78 -0
- package/script/utils/layered_hitbox.d.ts +2 -0
- package/script/utils/layered_hitbox.d.ts.map +1 -0
- package/script/utils/layered_hitbox.js +58 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings_by_app.d.ts","sourceRoot":"","sources":["../../src/state/settings_by_app.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,iBAAiB;IAC3B,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,oBAAY,gBAAgB;IAC1B,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,iBAAiB,CAAC;IACxB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE,aAAa,EAAE,CAAC;IACrB,EAAE,EAAE,aAAa,EAAE,CAAC;CACrB;AAED,qBAAa,aAAa;IACxB,MAAM,CAAC,WAAW,IAAI,aAAa;CAUpC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,UAAU,EAAE,aAAa,CAAC;IAC1B,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,qBAAa,gBAAgB;IAC3B,MAAM,CAAC,WAAW,IAAI,gBAAgB;CAWvC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
export var AppExtraFlag;
|
|
2
|
+
(function (AppExtraFlag) {
|
|
3
|
+
AppExtraFlag["Float"] = "float";
|
|
4
|
+
AppExtraFlag["Force"] = "force";
|
|
5
|
+
AppExtraFlag["Unmanage"] = "unmanage";
|
|
6
|
+
AppExtraFlag["Pinned"] = "pinned";
|
|
7
|
+
AppExtraFlag["Hidden"] = "hidden";
|
|
8
|
+
})(AppExtraFlag || (AppExtraFlag = {}));
|
|
9
|
+
export var AppIdentifierType;
|
|
10
|
+
(function (AppIdentifierType) {
|
|
11
|
+
AppIdentifierType["Exe"] = "Exe";
|
|
12
|
+
AppIdentifierType["Class"] = "Class";
|
|
13
|
+
AppIdentifierType["Title"] = "Title";
|
|
14
|
+
AppIdentifierType["Path"] = "Path";
|
|
15
|
+
})(AppIdentifierType || (AppIdentifierType = {}));
|
|
16
|
+
export var MatchingStrategy;
|
|
17
|
+
(function (MatchingStrategy) {
|
|
18
|
+
MatchingStrategy["Equals"] = "Equals";
|
|
19
|
+
MatchingStrategy["StartsWith"] = "StartsWith";
|
|
20
|
+
MatchingStrategy["EndsWith"] = "EndsWith";
|
|
21
|
+
MatchingStrategy["Contains"] = "Contains";
|
|
22
|
+
MatchingStrategy["Regex"] = "Regex";
|
|
23
|
+
})(MatchingStrategy || (MatchingStrategy = {}));
|
|
24
|
+
export class AppIdentifier {
|
|
25
|
+
static placeholder() {
|
|
26
|
+
return {
|
|
27
|
+
id: 'new-app.exe',
|
|
28
|
+
kind: AppIdentifierType.Exe,
|
|
29
|
+
matchingStrategy: MatchingStrategy.Equals,
|
|
30
|
+
negation: false,
|
|
31
|
+
and: [],
|
|
32
|
+
or: [],
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export class AppConfiguration {
|
|
37
|
+
static placeholder() {
|
|
38
|
+
return {
|
|
39
|
+
name: 'New App',
|
|
40
|
+
category: null,
|
|
41
|
+
boundWorkspace: null,
|
|
42
|
+
boundMonitor: null,
|
|
43
|
+
identifier: AppIdentifier.placeholder(),
|
|
44
|
+
isBundled: false,
|
|
45
|
+
options: [],
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { Rect } from '../utils/index.js';
|
|
2
|
+
import type { SeelenWallWallpaper } from './settings.js';
|
|
3
|
+
export declare class FancyToolbarSettingsByMonitor {
|
|
4
|
+
enabled: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare class SeelenWegSettingsByMonitor {
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare class WindowManagerSettingsByMonitor {
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
padding: number | null;
|
|
12
|
+
margin: Rect | null;
|
|
13
|
+
gap: number | null;
|
|
14
|
+
layout: string | null;
|
|
15
|
+
}
|
|
16
|
+
export declare class SeelenWallSettingsByMonitor {
|
|
17
|
+
enabled: boolean;
|
|
18
|
+
backgrounds: SeelenWallWallpaper[] | null;
|
|
19
|
+
}
|
|
20
|
+
export declare enum WorkspaceIdentifierType {
|
|
21
|
+
Name = "name",
|
|
22
|
+
Index = "index"
|
|
23
|
+
}
|
|
24
|
+
export declare class WorkspaceIdentifier {
|
|
25
|
+
id: string;
|
|
26
|
+
kind: WorkspaceIdentifierType;
|
|
27
|
+
constructor(id: string, kind: WorkspaceIdentifierType);
|
|
28
|
+
}
|
|
29
|
+
export declare class WorkspaceConfiguration {
|
|
30
|
+
identifier: WorkspaceIdentifier;
|
|
31
|
+
layout: string | null;
|
|
32
|
+
backgrounds: SeelenWallWallpaper[] | null;
|
|
33
|
+
constructor(identifier: WorkspaceIdentifier);
|
|
34
|
+
}
|
|
35
|
+
export declare class MonitorConfiguration {
|
|
36
|
+
tb: FancyToolbarSettingsByMonitor;
|
|
37
|
+
wall: SeelenWallSettingsByMonitor;
|
|
38
|
+
weg: SeelenWegSettingsByMonitor;
|
|
39
|
+
wm: WindowManagerSettingsByMonitor;
|
|
40
|
+
/** list of settings by workspace on this monitor */
|
|
41
|
+
workspacesV2: WorkspaceConfiguration[];
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=settings_by_monitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings_by_monitor.d.ts","sourceRoot":"","sources":["../../src/state/settings_by_monitor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD,qBAAa,6BAA6B;IACxC,OAAO,EAAE,OAAO,CAAQ;CACzB;AAED,qBAAa,0BAA0B;IACrC,OAAO,EAAE,OAAO,CAAQ;CACzB;AAED,qBAAa,8BAA8B;IACzC,OAAO,EAAE,OAAO,CAAQ;IACxB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC9B,MAAM,EAAE,IAAI,GAAG,IAAI,CAAQ;IAC3B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC1B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAQ;CAC9B;AAED,qBAAa,2BAA2B;IACtC,OAAO,EAAE,OAAO,CAAQ;IACxB,WAAW,EAAE,mBAAmB,EAAE,GAAG,IAAI,CAAQ;CAClD;AAED,oBAAY,uBAAuB;IACjC,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AAED,qBAAa,mBAAmB;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,uBAAuB,CAAC;gBAElB,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,uBAAuB;CAItD;AAED,qBAAa,sBAAsB;IACjC,UAAU,EAAE,mBAAmB,CAAC;IAChC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC7B,WAAW,EAAE,mBAAmB,EAAE,GAAG,IAAI,CAAQ;gBAErC,UAAU,EAAE,mBAAmB;CAG5C;AAED,qBAAa,oBAAoB;IAC/B,EAAE,EAAE,6BAA6B,CAAuC;IACxE,IAAI,EAAE,2BAA2B,CAAqC;IACtE,GAAG,EAAE,0BAA0B,CAAoC;IACnE,EAAE,EAAE,8BAA8B,CAAwC;IAC1E,oDAAoD;IACpD,YAAY,EAAE,sBAAsB,EAAE,CAAM;CAC7C"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export class FancyToolbarSettingsByMonitor {
|
|
2
|
+
enabled = true;
|
|
3
|
+
}
|
|
4
|
+
export class SeelenWegSettingsByMonitor {
|
|
5
|
+
enabled = true;
|
|
6
|
+
}
|
|
7
|
+
export class WindowManagerSettingsByMonitor {
|
|
8
|
+
enabled = true;
|
|
9
|
+
padding = null;
|
|
10
|
+
margin = null;
|
|
11
|
+
gap = null;
|
|
12
|
+
layout = null;
|
|
13
|
+
}
|
|
14
|
+
export class SeelenWallSettingsByMonitor {
|
|
15
|
+
enabled = true;
|
|
16
|
+
backgrounds = null;
|
|
17
|
+
}
|
|
18
|
+
export var WorkspaceIdentifierType;
|
|
19
|
+
(function (WorkspaceIdentifierType) {
|
|
20
|
+
WorkspaceIdentifierType["Name"] = "name";
|
|
21
|
+
WorkspaceIdentifierType["Index"] = "index";
|
|
22
|
+
})(WorkspaceIdentifierType || (WorkspaceIdentifierType = {}));
|
|
23
|
+
export class WorkspaceIdentifier {
|
|
24
|
+
id;
|
|
25
|
+
kind;
|
|
26
|
+
constructor(id, kind) {
|
|
27
|
+
this.id = id;
|
|
28
|
+
this.kind = kind;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export class WorkspaceConfiguration {
|
|
32
|
+
identifier;
|
|
33
|
+
layout = null;
|
|
34
|
+
backgrounds = null;
|
|
35
|
+
constructor(identifier) {
|
|
36
|
+
this.identifier = identifier;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
export class MonitorConfiguration {
|
|
40
|
+
tb = new FancyToolbarSettingsByMonitor();
|
|
41
|
+
wall = new SeelenWallSettingsByMonitor();
|
|
42
|
+
weg = new SeelenWegSettingsByMonitor();
|
|
43
|
+
wm = new WindowManagerSettingsByMonitor();
|
|
44
|
+
/** list of settings by workspace on this monitor */
|
|
45
|
+
workspacesV2 = [];
|
|
46
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface ThemeCssByApp {
|
|
2
|
+
/** Css Styles for the dock/taskbar */
|
|
3
|
+
weg: string;
|
|
4
|
+
/** Css Styles for the window manager */
|
|
5
|
+
toolbar: string;
|
|
6
|
+
/** Css Styles for the window manager */
|
|
7
|
+
wm: string;
|
|
8
|
+
/** Css Styles for the app launcher */
|
|
9
|
+
launcher: string;
|
|
10
|
+
/** Css Styles for the wall */
|
|
11
|
+
wall: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ThemeInfo {
|
|
14
|
+
/** Display name of the theme */
|
|
15
|
+
displayName: string;
|
|
16
|
+
/** Author of the theme */
|
|
17
|
+
author: string;
|
|
18
|
+
/** Description of the theme */
|
|
19
|
+
description: string;
|
|
20
|
+
/** Filename of the theme, is overridden by the program on load */
|
|
21
|
+
filename: string;
|
|
22
|
+
/** Tags to be used in search */
|
|
23
|
+
tags: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface Theme {
|
|
26
|
+
/** Metadata about the theme */
|
|
27
|
+
info: ThemeInfo;
|
|
28
|
+
/** Css Styles of the theme */
|
|
29
|
+
styles: ThemeCssByApp & Record<string, string>;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../src/state/theme.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,aAAa;IAC5B,sCAAsC;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,wCAAwC;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,sCAAsC;IACtC,QAAQ,EAAE,MAAM,CAAC;IACjB,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,SAAS;IACxB,gCAAgC;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,gCAAgC;IAChC,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,+BAA+B;IAC/B,IAAI,EAAE,SAAS,CAAC;IAChB,8BAA8B;IAC9B,MAAM,EAAE,aAAa,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare enum SwItemType {
|
|
2
|
+
Pinned = "Pinned",
|
|
3
|
+
TemporalApp = "TemporalPin",
|
|
4
|
+
Separator = "Separator",
|
|
5
|
+
Media = "Media",
|
|
6
|
+
Start = "StartMenu"
|
|
7
|
+
}
|
|
8
|
+
export interface PinnedWegItem {
|
|
9
|
+
type: SwItemType.Pinned;
|
|
10
|
+
path: string;
|
|
11
|
+
execution_command: string;
|
|
12
|
+
is_dir: boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface TemporalPinnedWegItem {
|
|
15
|
+
type: SwItemType.TemporalApp;
|
|
16
|
+
path: string;
|
|
17
|
+
execution_command: string;
|
|
18
|
+
is_dir: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface SeparatorWegItem {
|
|
21
|
+
type: SwItemType.Separator;
|
|
22
|
+
id: string;
|
|
23
|
+
}
|
|
24
|
+
export interface MediaWegItem {
|
|
25
|
+
type: SwItemType.Media;
|
|
26
|
+
}
|
|
27
|
+
export interface StartWegItem {
|
|
28
|
+
type: SwItemType.Start;
|
|
29
|
+
}
|
|
30
|
+
export type WegItem = PinnedWegItem | TemporalPinnedWegItem | SeparatorWegItem | MediaWegItem | StartWegItem;
|
|
31
|
+
export interface WegItems {
|
|
32
|
+
left: WegItem[];
|
|
33
|
+
center: WegItem[];
|
|
34
|
+
right: WegItem[];
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=weg_items.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"weg_items.d.ts","sourceRoot":"","sources":["../../src/state/weg_items.ts"],"names":[],"mappings":"AAAA,oBAAY,UAAU;IACpB,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,KAAK,cAAc;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,UAAU,CAAC,WAAW,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,UAAU,CAAC,SAAS,CAAC;IAC3B,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC;CACxB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC;CACxB;AAED,MAAM,MAAM,OAAO,GACf,aAAa,GACb,qBAAqB,GACrB,gBAAgB,GAChB,YAAY,GACZ,YAAY,CAAC;AAEjB,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,OAAO,EAAE,CAAC;IAChB,MAAM,EAAE,OAAO,EAAE,CAAC;IAClB,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export var SwItemType;
|
|
2
|
+
(function (SwItemType) {
|
|
3
|
+
SwItemType["Pinned"] = "Pinned";
|
|
4
|
+
SwItemType["TemporalApp"] = "TemporalPin";
|
|
5
|
+
SwItemType["Separator"] = "Separator";
|
|
6
|
+
SwItemType["Media"] = "Media";
|
|
7
|
+
SwItemType["Start"] = "StartMenu";
|
|
8
|
+
})(SwItemType || (SwItemType = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../../src/state/widget.ts"],"names":[],"mappings":"AAAA,qBAAa,MAAM;IACjB,EAAE,EAAE,MAAM,CAAM;CACjB"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export declare enum NodeType {
|
|
2
|
+
Vertical = "Vertical",
|
|
3
|
+
Horizontal = "Horizontal",
|
|
4
|
+
Leaf = "Leaf",
|
|
5
|
+
Stack = "Stack",
|
|
6
|
+
Fallback = "Fallback"
|
|
7
|
+
}
|
|
8
|
+
export declare enum NodeSubtype {
|
|
9
|
+
Temporal = "Temporal",
|
|
10
|
+
Permanent = "Permanent"
|
|
11
|
+
}
|
|
12
|
+
export declare enum NoFallbackBehavior {
|
|
13
|
+
Float = "Float",
|
|
14
|
+
Unmanaged = "Unmanaged"
|
|
15
|
+
}
|
|
16
|
+
export interface WManagerLayoutInfo {
|
|
17
|
+
displayName: string;
|
|
18
|
+
author: string;
|
|
19
|
+
description: string;
|
|
20
|
+
filename: string;
|
|
21
|
+
}
|
|
22
|
+
export interface WmNodeBase {
|
|
23
|
+
subtype: NodeSubtype;
|
|
24
|
+
priority: number;
|
|
25
|
+
growFactor: number;
|
|
26
|
+
condition: string | null;
|
|
27
|
+
}
|
|
28
|
+
export interface WmVerticalNode extends WmNodeBase {
|
|
29
|
+
type: NodeType.Vertical;
|
|
30
|
+
children: WmNode[];
|
|
31
|
+
}
|
|
32
|
+
export interface WmHorizontalNode extends WmNodeBase {
|
|
33
|
+
type: NodeType.Horizontal;
|
|
34
|
+
children: WmNode[];
|
|
35
|
+
}
|
|
36
|
+
export interface WmLeafNode extends WmNodeBase {
|
|
37
|
+
type: NodeType.Leaf;
|
|
38
|
+
handle: number | null;
|
|
39
|
+
}
|
|
40
|
+
export interface WmStackNode extends WmNodeBase {
|
|
41
|
+
type: NodeType.Stack;
|
|
42
|
+
active: number | null;
|
|
43
|
+
handles: number[];
|
|
44
|
+
}
|
|
45
|
+
export interface WmFallbackNode extends WmNodeBase {
|
|
46
|
+
type: NodeType.Fallback;
|
|
47
|
+
active: number | null;
|
|
48
|
+
handles: number[];
|
|
49
|
+
}
|
|
50
|
+
export type WmNode = WmVerticalNode | WmHorizontalNode | WmLeafNode | WmStackNode | WmFallbackNode;
|
|
51
|
+
export interface WindowManagerLayout {
|
|
52
|
+
info: WManagerLayoutInfo;
|
|
53
|
+
structure: WmNode;
|
|
54
|
+
noFallbackBehavior: NoFallbackBehavior;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=wm_layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wm_layout.d.ts","sourceRoot":"","sources":["../../src/state/wm_layout.ts"],"names":[],"mappings":"AAAA,oBAAY,QAAQ;IAClB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAED,oBAAY,WAAW;IACrB,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AAED,oBAAY,kBAAkB;IAC5B,KAAK,UAAU;IACf,SAAS,cAAc;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACxB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,gBAAiB,SAAQ,UAAU;IAClD,IAAI,EAAE,QAAQ,CAAC,UAAU,CAAC;IAC1B,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,UAAW,SAAQ,UAAU;IAC5C,IAAI,EAAE,QAAQ,CAAC,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC7C,IAAI,EAAE,QAAQ,CAAC,KAAK,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,IAAI,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,MAAM,MAAM,GACd,cAAc,GACd,gBAAgB,GAChB,UAAU,GACV,WAAW,GACX,cAAc,CAAC;AAEnB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,kBAAkB,CAAC;CACxC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export var NodeType;
|
|
2
|
+
(function (NodeType) {
|
|
3
|
+
NodeType["Vertical"] = "Vertical";
|
|
4
|
+
NodeType["Horizontal"] = "Horizontal";
|
|
5
|
+
NodeType["Leaf"] = "Leaf";
|
|
6
|
+
NodeType["Stack"] = "Stack";
|
|
7
|
+
NodeType["Fallback"] = "Fallback";
|
|
8
|
+
})(NodeType || (NodeType = {}));
|
|
9
|
+
export var NodeSubtype;
|
|
10
|
+
(function (NodeSubtype) {
|
|
11
|
+
NodeSubtype["Temporal"] = "Temporal";
|
|
12
|
+
NodeSubtype["Permanent"] = "Permanent";
|
|
13
|
+
})(NodeSubtype || (NodeSubtype = {}));
|
|
14
|
+
export var NoFallbackBehavior;
|
|
15
|
+
(function (NoFallbackBehavior) {
|
|
16
|
+
NoFallbackBehavior["Float"] = "Float";
|
|
17
|
+
NoFallbackBehavior["Unmanaged"] = "Unmanaged";
|
|
18
|
+
})(NoFallbackBehavior || (NoFallbackBehavior = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface UIColors {
|
|
2
|
+
background: string;
|
|
3
|
+
foreground: string;
|
|
4
|
+
accent_darkest: string;
|
|
5
|
+
accent_darker: string;
|
|
6
|
+
accent_dark: string;
|
|
7
|
+
accent: string;
|
|
8
|
+
accent_light: string;
|
|
9
|
+
accent_lighter: string;
|
|
10
|
+
accent_lightest: string;
|
|
11
|
+
complement: string | null;
|
|
12
|
+
}
|
|
13
|
+
export declare class UIColors {
|
|
14
|
+
static default(): UIColors;
|
|
15
|
+
static getAsync(): Promise<UIColors>;
|
|
16
|
+
static onChange(cb: (value: UIColors) => void): Promise<() => void>;
|
|
17
|
+
static setAssCssVariables(colors: UIColors): void;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/system_state/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,QAAQ;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAGD,qBAAa,QAAQ;IACnB,MAAM,CAAC,OAAO,IAAI,QAAQ;WAeb,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;WAI7B,QAAQ,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC;IAIzE,MAAM,CAAC,kBAAkB,CAAC,MAAM,EAAE,QAAQ;CAgB3C"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Obtainable, SeelenCommand, SeelenEvent } from '../handlers/index.js';
|
|
2
|
+
const _UIColors = Obtainable(SeelenCommand.GetSystemColors, SeelenEvent.ColorsChanged);
|
|
3
|
+
export class UIColors {
|
|
4
|
+
static default() {
|
|
5
|
+
return {
|
|
6
|
+
background: '#ffffff',
|
|
7
|
+
foreground: '#000000',
|
|
8
|
+
accent_darkest: '#990000',
|
|
9
|
+
accent_darker: '#aa0000',
|
|
10
|
+
accent_dark: '#bb0000',
|
|
11
|
+
accent: '#cc0000',
|
|
12
|
+
accent_light: '#dd0000',
|
|
13
|
+
accent_lighter: '#ee0000',
|
|
14
|
+
accent_lightest: '#ff0000',
|
|
15
|
+
complement: null,
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
static async getAsync() {
|
|
19
|
+
return await _UIColors.getAsync();
|
|
20
|
+
}
|
|
21
|
+
static async onChange(cb) {
|
|
22
|
+
return await _UIColors.onChange(cb);
|
|
23
|
+
}
|
|
24
|
+
static setAssCssVariables(colors) {
|
|
25
|
+
for (const [key, value] of Object.entries(colors)) {
|
|
26
|
+
if (typeof value !== 'string') {
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
const hex = value.replace('#', '').slice(0, 6);
|
|
30
|
+
const color = parseInt(hex, 16);
|
|
31
|
+
const r = (color >> 16) & 255;
|
|
32
|
+
const g = (color >> 8) & 255;
|
|
33
|
+
const b = color & 255;
|
|
34
|
+
// replace rust snake case with kebab case
|
|
35
|
+
const name = key.replace('_', '-');
|
|
36
|
+
document.documentElement.style.setProperty(`--config-${name}-color`, value.slice(0, 7));
|
|
37
|
+
document.documentElement.style.setProperty(`--config-${name}-color-rgb`, `${r}, ${g}, ${b}`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/utils/hooks.ts"],"names":[],"mappings":"AA2CA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// import type { getCurrentWindow } from '@tauri-apps/api/window';
|
|
2
|
+
// import { useEffect, useRef } from 'npm:react';
|
|
3
|
+
/*
|
|
4
|
+
export function useWindowFocusChange(cb: (focused: boolean) => void) {
|
|
5
|
+
useEffect(() => {
|
|
6
|
+
const promise = getCurrentWindow().onFocusChanged((event) => {
|
|
7
|
+
cb(event.payload);
|
|
8
|
+
});
|
|
9
|
+
return () => {
|
|
10
|
+
promise.then((unlisten) => unlisten());
|
|
11
|
+
};
|
|
12
|
+
}, []);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export function useInterval(cb: () => void, ms: number, deps: any[] = []) {
|
|
16
|
+
const ref = useRef<number | null>(null);
|
|
17
|
+
const clearLastInterval = () => {
|
|
18
|
+
if (ref.current) {
|
|
19
|
+
clearInterval(ref.current);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
clearLastInterval();
|
|
24
|
+
ref.current = setInterval(cb, ms);
|
|
25
|
+
return clearLastInterval;
|
|
26
|
+
}, [ms, ...deps]);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function useTimeout(cb: () => void, ms: number, deps: any[] = []) {
|
|
30
|
+
const ref = useRef<number | null>(null);
|
|
31
|
+
const clearLastTimeout = () => {
|
|
32
|
+
if (ref.current) {
|
|
33
|
+
clearTimeout(ref.current);
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
useEffect(() => {
|
|
37
|
+
clearLastTimeout();
|
|
38
|
+
ref.current = setTimeout(cb, ms);
|
|
39
|
+
return clearLastTimeout;
|
|
40
|
+
}, [ms, ...deps]);
|
|
41
|
+
}
|
|
42
|
+
*/
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './hooks.js';
|
|
2
|
+
export * from './layered_hitbox.js';
|
|
3
|
+
export declare function getRootElement(): HTMLElement | null;
|
|
4
|
+
export declare class Rect {
|
|
5
|
+
left: number;
|
|
6
|
+
top: number;
|
|
7
|
+
right: number;
|
|
8
|
+
bottom: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function disableWebviewShortcutsAndContextMenu(): void;
|
|
11
|
+
interface WidgetInformation {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
attachedMonitor: string | null;
|
|
15
|
+
}
|
|
16
|
+
export declare function getCurrentWidget(): WidgetInformation;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAEA,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AAEpC,wBAAgB,cAAc,IAAI,WAAW,GAAG,IAAI,CAMnD;AAED,qBAAa,IAAI;IACf,IAAI,SAAK;IACT,GAAG,SAAK;IACR,KAAK,SAAK;IACV,MAAM,SAAK;CACZ;AAED,wBAAgB,qCAAqC,SA+BpD;AAED,UAAU,iBAAiB;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAGD,wBAAgB,gBAAgB,IAAI,iBAAiB,CASpD"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { getCurrentWindow } from '@tauri-apps/api/window';
|
|
2
|
+
export * from './hooks.js';
|
|
3
|
+
export * from './layered_hitbox.js';
|
|
4
|
+
export function getRootElement() {
|
|
5
|
+
const element = document.getElementById('root');
|
|
6
|
+
if (!element) {
|
|
7
|
+
throw new Error('Root element not found');
|
|
8
|
+
}
|
|
9
|
+
return element;
|
|
10
|
+
}
|
|
11
|
+
export class Rect {
|
|
12
|
+
left = 0;
|
|
13
|
+
top = 0;
|
|
14
|
+
right = 0;
|
|
15
|
+
bottom = 0;
|
|
16
|
+
}
|
|
17
|
+
export function disableWebviewShortcutsAndContextMenu() {
|
|
18
|
+
globalThis.addEventListener('keydown', function (event) {
|
|
19
|
+
// prevent refresh
|
|
20
|
+
if (event.key === 'F5') {
|
|
21
|
+
event.preventDefault();
|
|
22
|
+
}
|
|
23
|
+
// prevent close
|
|
24
|
+
if (event.altKey && event.key === 'F4') {
|
|
25
|
+
event.preventDefault();
|
|
26
|
+
}
|
|
27
|
+
// others
|
|
28
|
+
if (event.ctrlKey) {
|
|
29
|
+
switch (event.key) {
|
|
30
|
+
case 'r': // reload
|
|
31
|
+
case 'f': // search
|
|
32
|
+
case 'g': // find
|
|
33
|
+
case 'p': // print
|
|
34
|
+
case 'j': // downloads
|
|
35
|
+
case 'u': // source
|
|
36
|
+
event.preventDefault();
|
|
37
|
+
break;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
globalThis.addEventListener('contextmenu', (e) => e.preventDefault(), {
|
|
42
|
+
capture: true,
|
|
43
|
+
});
|
|
44
|
+
globalThis.addEventListener('drop', (e) => e.preventDefault());
|
|
45
|
+
globalThis.addEventListener('dragover', (e) => e.preventDefault());
|
|
46
|
+
}
|
|
47
|
+
// label schema: user/resource__query__monitor:display5
|
|
48
|
+
export function getCurrentWidget() {
|
|
49
|
+
const { label } = getCurrentWindow();
|
|
50
|
+
const parsedLabel = label.replace('__query__', '?').replace(':', '=');
|
|
51
|
+
const query = new URLSearchParams(parsedLabel);
|
|
52
|
+
return {
|
|
53
|
+
id: `@${parsedLabel.split('?')[0]}`,
|
|
54
|
+
label,
|
|
55
|
+
attachedMonitor: query.get('monitor'),
|
|
56
|
+
};
|
|
57
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layered_hitbox.d.ts","sourceRoot":"","sources":["../../src/utils/layered_hitbox.ts"],"names":[],"mappings":"AAIA,wBAAsB,8BAA8B,kBAwEnD"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow';
|
|
2
|
+
import { SeelenEvent } from '../handlers/index.js';
|
|
3
|
+
export async function declareDocumentAsLayeredHitbox() {
|
|
4
|
+
const webview = getCurrentWebviewWindow();
|
|
5
|
+
const { x, y } = await webview.outerPosition();
|
|
6
|
+
const { width, height } = await webview.outerSize();
|
|
7
|
+
const webviewRect = { x, y, width, height };
|
|
8
|
+
let ignoring_cursor_events = true;
|
|
9
|
+
let is_layered_enabled = true;
|
|
10
|
+
await webview.setIgnoreCursorEvents(true);
|
|
11
|
+
webview.onMoved((e) => {
|
|
12
|
+
webviewRect.x = e.payload.x;
|
|
13
|
+
webviewRect.y = e.payload.y;
|
|
14
|
+
});
|
|
15
|
+
webview.onResized((e) => {
|
|
16
|
+
webviewRect.width = e.payload.width;
|
|
17
|
+
webviewRect.height = e.payload.height;
|
|
18
|
+
});
|
|
19
|
+
webview.listen(SeelenEvent.HandleLayeredHitboxes, (event) => {
|
|
20
|
+
is_layered_enabled = event.payload;
|
|
21
|
+
});
|
|
22
|
+
webview.listen(SeelenEvent.GlobalMouseMove, (event) => {
|
|
23
|
+
if (!is_layered_enabled) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
const [mouseX, mouseY] = event.payload;
|
|
27
|
+
const { x: windowX, y: windowY, width: windowWidth, height: windowHeight, } = webviewRect;
|
|
28
|
+
// check if the mouse is inside the window
|
|
29
|
+
const isHoverWindow = mouseX >= windowX &&
|
|
30
|
+
mouseX <= windowX + windowWidth &&
|
|
31
|
+
mouseY >= windowY &&
|
|
32
|
+
mouseY <= windowY + windowHeight;
|
|
33
|
+
if (!isHoverWindow) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
const adjustedX = (mouseX - windowX) / globalThis.devicePixelRatio;
|
|
37
|
+
const adjustedY = (mouseY - windowY) / globalThis.devicePixelRatio;
|
|
38
|
+
const isOverBody = document.elementFromPoint(adjustedX, adjustedY) == document.body;
|
|
39
|
+
if (isOverBody && !ignoring_cursor_events) {
|
|
40
|
+
ignoring_cursor_events = true;
|
|
41
|
+
webview.setIgnoreCursorEvents(true);
|
|
42
|
+
}
|
|
43
|
+
if (!isOverBody && ignoring_cursor_events) {
|
|
44
|
+
ignoring_cursor_events = false;
|
|
45
|
+
webview.setIgnoreCursorEvents(false);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
globalThis.addEventListener('touchstart', (e) => {
|
|
49
|
+
const isOverBody = e.target == document.body;
|
|
50
|
+
if (isOverBody && !ignoring_cursor_events) {
|
|
51
|
+
ignoring_cursor_events = true;
|
|
52
|
+
webview.setIgnoreCursorEvents(true);
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@seelen-ui/lib",
|
|
3
|
+
"version": "0.1.2-next.20241204071255",
|
|
4
|
+
"description": "Seelen UI Library for Widgets",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/Seelen-Inc/slu-lib.git"
|
|
8
|
+
},
|
|
9
|
+
"license": "Apache-2.0",
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/Seelen-Inc/slu-lib/issues"
|
|
12
|
+
},
|
|
13
|
+
"main": "./script/lib.js",
|
|
14
|
+
"module": "./esm/lib.js",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": "./esm/lib.js",
|
|
18
|
+
"require": "./script/lib.js"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@deno/shim-crypto": "~0.3.1",
|
|
23
|
+
"@tauri-apps/api": "^2.1.1"
|
|
24
|
+
},
|
|
25
|
+
"_generatedBy": "dnt@dev"
|
|
26
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Seelen UI Library
|
|
2
|
+
This library is to create Widgets for the [Seelen UI](https://github.com/eythaann/seelen-ui) App.
|
|
3
|
+
|
|
4
|
+
## Links
|
|
5
|
+
- [Github](https://github.com/Seelen-Inc/slu-lib)
|
|
6
|
+
- [NPM](https://npmjs.com/package/@seelen-ui/lib)
|
|
7
|
+
- [JSR](https://jsr.io/@seelen-ui/lib)
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { crypto, type Crypto, type SubtleCrypto, type AlgorithmIdentifier, type Algorithm, type RsaOaepParams, type BufferSource, type AesCtrParams, type AesCbcParams, type AesGcmParams, type CryptoKey, type KeyAlgorithm, type KeyType, type KeyUsage, type EcdhKeyDeriveParams, type HkdfParams, type HashAlgorithmIdentifier, type Pbkdf2Params, type AesDerivedKeyParams, type HmacImportParams, type JsonWebKey, type RsaOtherPrimesInfo, type KeyFormat, type RsaHashedKeyGenParams, type RsaKeyGenParams, type BigInteger, type EcKeyGenParams, type NamedCurve, type CryptoKeyPair, type AesKeyGenParams, type HmacKeyGenParams, type RsaHashedImportParams, type EcKeyImportParams, type AesKeyAlgorithm, type RsaPssParams, type EcdsaParams } from "@deno/shim-crypto";
|
|
2
|
+
export declare const dntGlobalThis: Omit<typeof globalThis, "crypto"> & {
|
|
3
|
+
crypto: import("@deno/shim-crypto").Crypto;
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=_dnt.shims.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_dnt.shims.d.ts","sourceRoot":"","sources":["../src/_dnt.shims.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,KAAK,SAAS,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,mBAAmB,EAAE,KAAK,UAAU,EAAE,KAAK,uBAAuB,EAAE,KAAK,YAAY,EAAE,KAAK,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAE,KAAK,kBAAkB,EAAE,KAAK,SAAS,EAAE,KAAK,qBAAqB,EAAE,KAAK,eAAe,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAKrvB,eAAO,MAAM,aAAa;;CAA2C,CAAC"}
|