@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.
Files changed (131) hide show
  1. package/LICENSE +202 -0
  2. package/esm/_dnt.shims.d.ts +5 -0
  3. package/esm/_dnt.shims.d.ts.map +1 -0
  4. package/esm/_dnt.shims.js +61 -0
  5. package/esm/handlers/events.d.ts +53 -0
  6. package/esm/handlers/events.d.ts.map +1 -0
  7. package/esm/handlers/events.js +54 -0
  8. package/esm/handlers/index.d.ts +11 -0
  9. package/esm/handlers/index.d.ts.map +1 -0
  10. package/esm/handlers/index.js +16 -0
  11. package/esm/handlers/invokers.d.ts +75 -0
  12. package/esm/handlers/invokers.d.ts.map +1 -0
  13. package/esm/handlers/invokers.js +77 -0
  14. package/esm/lib.d.ts +5 -0
  15. package/esm/lib.d.ts.map +1 -0
  16. package/esm/lib.js +4 -0
  17. package/esm/package.json +3 -0
  18. package/esm/state/icon_pack.d.ts +6 -0
  19. package/esm/state/icon_pack.d.ts.map +1 -0
  20. package/esm/state/icon_pack.js +5 -0
  21. package/esm/state/index.d.ts +24 -0
  22. package/esm/state/index.d.ts.map +1 -0
  23. package/esm/state/index.js +28 -0
  24. package/esm/state/placeholder.d.ts +91 -0
  25. package/esm/state/placeholder.d.ts.map +1 -0
  26. package/esm/state/placeholder.js +33 -0
  27. package/esm/state/plugin.d.ts +17 -0
  28. package/esm/state/plugin.d.ts.map +1 -0
  29. package/esm/state/plugin.js +31 -0
  30. package/esm/state/profile.d.ts +16 -0
  31. package/esm/state/profile.d.ts.map +1 -0
  32. package/esm/state/profile.js +13 -0
  33. package/esm/state/settings.d.ts +175 -0
  34. package/esm/state/settings.d.ts.map +1 -0
  35. package/esm/state/settings.js +195 -0
  36. package/esm/state/settings_by_app.d.ts +44 -0
  37. package/esm/state/settings_by_app.d.ts.map +1 -0
  38. package/esm/state/settings_by_app.js +48 -0
  39. package/esm/state/settings_by_monitor.d.ts +43 -0
  40. package/esm/state/settings_by_monitor.d.ts.map +1 -0
  41. package/esm/state/settings_by_monitor.js +46 -0
  42. package/esm/state/theme.d.ts +31 -0
  43. package/esm/state/theme.d.ts.map +1 -0
  44. package/esm/state/theme.js +1 -0
  45. package/esm/state/weg_items.d.ts +36 -0
  46. package/esm/state/weg_items.d.ts.map +1 -0
  47. package/esm/state/weg_items.js +8 -0
  48. package/esm/state/widget.d.ts +4 -0
  49. package/esm/state/widget.d.ts.map +1 -0
  50. package/esm/state/widget.js +3 -0
  51. package/esm/state/wm_layout.d.ts +56 -0
  52. package/esm/state/wm_layout.d.ts.map +1 -0
  53. package/esm/state/wm_layout.js +18 -0
  54. package/esm/system_state/index.d.ts +19 -0
  55. package/esm/system_state/index.d.ts.map +1 -0
  56. package/esm/system_state/index.js +40 -0
  57. package/esm/utils/hooks.d.ts +2 -0
  58. package/esm/utils/hooks.d.ts.map +1 -0
  59. package/esm/utils/hooks.js +43 -0
  60. package/esm/utils/index.d.ts +17 -0
  61. package/esm/utils/index.d.ts.map +1 -0
  62. package/esm/utils/index.js +57 -0
  63. package/esm/utils/layered_hitbox.d.ts +2 -0
  64. package/esm/utils/layered_hitbox.d.ts.map +1 -0
  65. package/esm/utils/layered_hitbox.js +55 -0
  66. package/package.json +26 -0
  67. package/readme.md +7 -0
  68. package/script/_dnt.shims.d.ts +5 -0
  69. package/script/_dnt.shims.d.ts.map +1 -0
  70. package/script/_dnt.shims.js +65 -0
  71. package/script/handlers/events.d.ts +53 -0
  72. package/script/handlers/events.d.ts.map +1 -0
  73. package/script/handlers/events.js +57 -0
  74. package/script/handlers/index.d.ts +11 -0
  75. package/script/handlers/index.d.ts.map +1 -0
  76. package/script/handlers/index.js +33 -0
  77. package/script/handlers/invokers.d.ts +75 -0
  78. package/script/handlers/invokers.d.ts.map +1 -0
  79. package/script/handlers/invokers.js +81 -0
  80. package/script/lib.d.ts +5 -0
  81. package/script/lib.d.ts.map +1 -0
  82. package/script/lib.js +20 -0
  83. package/script/package.json +3 -0
  84. package/script/state/icon_pack.d.ts +6 -0
  85. package/script/state/icon_pack.d.ts.map +1 -0
  86. package/script/state/icon_pack.js +9 -0
  87. package/script/state/index.d.ts +24 -0
  88. package/script/state/index.d.ts.map +1 -0
  89. package/script/state/index.js +47 -0
  90. package/script/state/placeholder.d.ts +91 -0
  91. package/script/state/placeholder.d.ts.map +1 -0
  92. package/script/state/placeholder.js +36 -0
  93. package/script/state/plugin.d.ts +17 -0
  94. package/script/state/plugin.d.ts.map +1 -0
  95. package/script/state/plugin.js +36 -0
  96. package/script/state/profile.d.ts +16 -0
  97. package/script/state/profile.d.ts.map +1 -0
  98. package/script/state/profile.js +17 -0
  99. package/script/state/settings.d.ts +175 -0
  100. package/script/state/settings.d.ts.map +1 -0
  101. package/script/state/settings.js +234 -0
  102. package/script/state/settings_by_app.d.ts +44 -0
  103. package/script/state/settings_by_app.d.ts.map +1 -0
  104. package/script/state/settings_by_app.js +53 -0
  105. package/script/state/settings_by_monitor.d.ts +43 -0
  106. package/script/state/settings_by_monitor.d.ts.map +1 -0
  107. package/script/state/settings_by_monitor.js +56 -0
  108. package/script/state/theme.d.ts +31 -0
  109. package/script/state/theme.d.ts.map +1 -0
  110. package/script/state/theme.js +2 -0
  111. package/script/state/weg_items.d.ts +36 -0
  112. package/script/state/weg_items.d.ts.map +1 -0
  113. package/script/state/weg_items.js +11 -0
  114. package/script/state/widget.d.ts +4 -0
  115. package/script/state/widget.d.ts.map +1 -0
  116. package/script/state/widget.js +7 -0
  117. package/script/state/wm_layout.d.ts +56 -0
  118. package/script/state/wm_layout.d.ts.map +1 -0
  119. package/script/state/wm_layout.js +21 -0
  120. package/script/system_state/index.d.ts +19 -0
  121. package/script/system_state/index.d.ts.map +1 -0
  122. package/script/system_state/index.js +44 -0
  123. package/script/utils/hooks.d.ts +2 -0
  124. package/script/utils/hooks.d.ts.map +1 -0
  125. package/script/utils/hooks.js +44 -0
  126. package/script/utils/index.d.ts +17 -0
  127. package/script/utils/index.d.ts.map +1 -0
  128. package/script/utils/index.js +78 -0
  129. package/script/utils/layered_hitbox.d.ts +2 -0
  130. package/script/utils/layered_hitbox.d.ts.map +1 -0
  131. package/script/utils/layered_hitbox.js +58 -0
@@ -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,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MonitorConfiguration = exports.WorkspaceConfiguration = exports.WorkspaceIdentifier = exports.WorkspaceIdentifierType = exports.SeelenWallSettingsByMonitor = exports.WindowManagerSettingsByMonitor = exports.SeelenWegSettingsByMonitor = exports.FancyToolbarSettingsByMonitor = void 0;
4
+ class FancyToolbarSettingsByMonitor {
5
+ enabled = true;
6
+ }
7
+ exports.FancyToolbarSettingsByMonitor = FancyToolbarSettingsByMonitor;
8
+ class SeelenWegSettingsByMonitor {
9
+ enabled = true;
10
+ }
11
+ exports.SeelenWegSettingsByMonitor = SeelenWegSettingsByMonitor;
12
+ class WindowManagerSettingsByMonitor {
13
+ enabled = true;
14
+ padding = null;
15
+ margin = null;
16
+ gap = null;
17
+ layout = null;
18
+ }
19
+ exports.WindowManagerSettingsByMonitor = WindowManagerSettingsByMonitor;
20
+ class SeelenWallSettingsByMonitor {
21
+ enabled = true;
22
+ backgrounds = null;
23
+ }
24
+ exports.SeelenWallSettingsByMonitor = SeelenWallSettingsByMonitor;
25
+ var WorkspaceIdentifierType;
26
+ (function (WorkspaceIdentifierType) {
27
+ WorkspaceIdentifierType["Name"] = "name";
28
+ WorkspaceIdentifierType["Index"] = "index";
29
+ })(WorkspaceIdentifierType || (exports.WorkspaceIdentifierType = WorkspaceIdentifierType = {}));
30
+ class WorkspaceIdentifier {
31
+ id;
32
+ kind;
33
+ constructor(id, kind) {
34
+ this.id = id;
35
+ this.kind = kind;
36
+ }
37
+ }
38
+ exports.WorkspaceIdentifier = WorkspaceIdentifier;
39
+ class WorkspaceConfiguration {
40
+ identifier;
41
+ layout = null;
42
+ backgrounds = null;
43
+ constructor(identifier) {
44
+ this.identifier = identifier;
45
+ }
46
+ }
47
+ exports.WorkspaceConfiguration = WorkspaceConfiguration;
48
+ class MonitorConfiguration {
49
+ tb = new FancyToolbarSettingsByMonitor();
50
+ wall = new SeelenWallSettingsByMonitor();
51
+ weg = new SeelenWegSettingsByMonitor();
52
+ wm = new WindowManagerSettingsByMonitor();
53
+ /** list of settings by workspace on this monitor */
54
+ workspacesV2 = [];
55
+ }
56
+ exports.MonitorConfiguration = MonitorConfiguration;
@@ -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,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SwItemType = void 0;
4
+ var SwItemType;
5
+ (function (SwItemType) {
6
+ SwItemType["Pinned"] = "Pinned";
7
+ SwItemType["TemporalApp"] = "TemporalPin";
8
+ SwItemType["Separator"] = "Separator";
9
+ SwItemType["Media"] = "Media";
10
+ SwItemType["Start"] = "StartMenu";
11
+ })(SwItemType || (exports.SwItemType = SwItemType = {}));
@@ -0,0 +1,4 @@
1
+ export declare class Widget {
2
+ id: string;
3
+ }
4
+ //# sourceMappingURL=widget.d.ts.map
@@ -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,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Widget = void 0;
4
+ class Widget {
5
+ id = '';
6
+ }
7
+ exports.Widget = Widget;
@@ -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,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NoFallbackBehavior = exports.NodeSubtype = exports.NodeType = void 0;
4
+ var NodeType;
5
+ (function (NodeType) {
6
+ NodeType["Vertical"] = "Vertical";
7
+ NodeType["Horizontal"] = "Horizontal";
8
+ NodeType["Leaf"] = "Leaf";
9
+ NodeType["Stack"] = "Stack";
10
+ NodeType["Fallback"] = "Fallback";
11
+ })(NodeType || (exports.NodeType = NodeType = {}));
12
+ var NodeSubtype;
13
+ (function (NodeSubtype) {
14
+ NodeSubtype["Temporal"] = "Temporal";
15
+ NodeSubtype["Permanent"] = "Permanent";
16
+ })(NodeSubtype || (exports.NodeSubtype = NodeSubtype = {}));
17
+ var NoFallbackBehavior;
18
+ (function (NoFallbackBehavior) {
19
+ NoFallbackBehavior["Float"] = "Float";
20
+ NoFallbackBehavior["Unmanaged"] = "Unmanaged";
21
+ })(NoFallbackBehavior || (exports.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,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UIColors = void 0;
4
+ const index_js_1 = require("../handlers/index.js");
5
+ const _UIColors = (0, index_js_1.Obtainable)(index_js_1.SeelenCommand.GetSystemColors, index_js_1.SeelenEvent.ColorsChanged);
6
+ class UIColors {
7
+ static default() {
8
+ return {
9
+ background: '#ffffff',
10
+ foreground: '#000000',
11
+ accent_darkest: '#990000',
12
+ accent_darker: '#aa0000',
13
+ accent_dark: '#bb0000',
14
+ accent: '#cc0000',
15
+ accent_light: '#dd0000',
16
+ accent_lighter: '#ee0000',
17
+ accent_lightest: '#ff0000',
18
+ complement: null,
19
+ };
20
+ }
21
+ static async getAsync() {
22
+ return await _UIColors.getAsync();
23
+ }
24
+ static async onChange(cb) {
25
+ return await _UIColors.onChange(cb);
26
+ }
27
+ static setAssCssVariables(colors) {
28
+ for (const [key, value] of Object.entries(colors)) {
29
+ if (typeof value !== 'string') {
30
+ continue;
31
+ }
32
+ const hex = value.replace('#', '').slice(0, 6);
33
+ const color = parseInt(hex, 16);
34
+ const r = (color >> 16) & 255;
35
+ const g = (color >> 8) & 255;
36
+ const b = color & 255;
37
+ // replace rust snake case with kebab case
38
+ const name = key.replace('_', '-');
39
+ document.documentElement.style.setProperty(`--config-${name}-color`, value.slice(0, 7));
40
+ document.documentElement.style.setProperty(`--config-${name}-color-rgb`, `${r}, ${g}, ${b}`);
41
+ }
42
+ }
43
+ }
44
+ exports.UIColors = UIColors;
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=hooks.d.ts.map
@@ -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,44 @@
1
+ "use strict";
2
+ // import type { getCurrentWindow } from '@tauri-apps/api/window';
3
+ // import { useEffect, useRef } from 'npm:react';
4
+ /*
5
+ export function useWindowFocusChange(cb: (focused: boolean) => void) {
6
+ useEffect(() => {
7
+ const promise = getCurrentWindow().onFocusChanged((event) => {
8
+ cb(event.payload);
9
+ });
10
+ return () => {
11
+ promise.then((unlisten) => unlisten());
12
+ };
13
+ }, []);
14
+ }
15
+
16
+ export function useInterval(cb: () => void, ms: number, deps: any[] = []) {
17
+ const ref = useRef<number | null>(null);
18
+ const clearLastInterval = () => {
19
+ if (ref.current) {
20
+ clearInterval(ref.current);
21
+ }
22
+ };
23
+ useEffect(() => {
24
+ clearLastInterval();
25
+ ref.current = setInterval(cb, ms);
26
+ return clearLastInterval;
27
+ }, [ms, ...deps]);
28
+ }
29
+
30
+ export function useTimeout(cb: () => void, ms: number, deps: any[] = []) {
31
+ const ref = useRef<number | null>(null);
32
+ const clearLastTimeout = () => {
33
+ if (ref.current) {
34
+ clearTimeout(ref.current);
35
+ }
36
+ };
37
+ useEffect(() => {
38
+ clearLastTimeout();
39
+ ref.current = setTimeout(cb, ms);
40
+ return clearLastTimeout;
41
+ }, [ms, ...deps]);
42
+ }
43
+ */
44
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,78 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.Rect = void 0;
18
+ exports.getRootElement = getRootElement;
19
+ exports.disableWebviewShortcutsAndContextMenu = disableWebviewShortcutsAndContextMenu;
20
+ exports.getCurrentWidget = getCurrentWidget;
21
+ const window_1 = require("@tauri-apps/api/window");
22
+ __exportStar(require("./hooks.js"), exports);
23
+ __exportStar(require("./layered_hitbox.js"), exports);
24
+ function getRootElement() {
25
+ const element = document.getElementById('root');
26
+ if (!element) {
27
+ throw new Error('Root element not found');
28
+ }
29
+ return element;
30
+ }
31
+ class Rect {
32
+ left = 0;
33
+ top = 0;
34
+ right = 0;
35
+ bottom = 0;
36
+ }
37
+ exports.Rect = Rect;
38
+ function disableWebviewShortcutsAndContextMenu() {
39
+ globalThis.addEventListener('keydown', function (event) {
40
+ // prevent refresh
41
+ if (event.key === 'F5') {
42
+ event.preventDefault();
43
+ }
44
+ // prevent close
45
+ if (event.altKey && event.key === 'F4') {
46
+ event.preventDefault();
47
+ }
48
+ // others
49
+ if (event.ctrlKey) {
50
+ switch (event.key) {
51
+ case 'r': // reload
52
+ case 'f': // search
53
+ case 'g': // find
54
+ case 'p': // print
55
+ case 'j': // downloads
56
+ case 'u': // source
57
+ event.preventDefault();
58
+ break;
59
+ }
60
+ }
61
+ });
62
+ globalThis.addEventListener('contextmenu', (e) => e.preventDefault(), {
63
+ capture: true,
64
+ });
65
+ globalThis.addEventListener('drop', (e) => e.preventDefault());
66
+ globalThis.addEventListener('dragover', (e) => e.preventDefault());
67
+ }
68
+ // label schema: user/resource__query__monitor:display5
69
+ function getCurrentWidget() {
70
+ const { label } = (0, window_1.getCurrentWindow)();
71
+ const parsedLabel = label.replace('__query__', '?').replace(':', '=');
72
+ const query = new URLSearchParams(parsedLabel);
73
+ return {
74
+ id: `@${parsedLabel.split('?')[0]}`,
75
+ label,
76
+ attachedMonitor: query.get('monitor'),
77
+ };
78
+ }
@@ -0,0 +1,2 @@
1
+ export declare function declareDocumentAsLayeredHitbox(): Promise<void>;
2
+ //# sourceMappingURL=layered_hitbox.d.ts.map
@@ -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,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.declareDocumentAsLayeredHitbox = declareDocumentAsLayeredHitbox;
4
+ const webviewWindow_1 = require("@tauri-apps/api/webviewWindow");
5
+ const index_js_1 = require("../handlers/index.js");
6
+ async function declareDocumentAsLayeredHitbox() {
7
+ const webview = (0, webviewWindow_1.getCurrentWebviewWindow)();
8
+ const { x, y } = await webview.outerPosition();
9
+ const { width, height } = await webview.outerSize();
10
+ const webviewRect = { x, y, width, height };
11
+ let ignoring_cursor_events = true;
12
+ let is_layered_enabled = true;
13
+ await webview.setIgnoreCursorEvents(true);
14
+ webview.onMoved((e) => {
15
+ webviewRect.x = e.payload.x;
16
+ webviewRect.y = e.payload.y;
17
+ });
18
+ webview.onResized((e) => {
19
+ webviewRect.width = e.payload.width;
20
+ webviewRect.height = e.payload.height;
21
+ });
22
+ webview.listen(index_js_1.SeelenEvent.HandleLayeredHitboxes, (event) => {
23
+ is_layered_enabled = event.payload;
24
+ });
25
+ webview.listen(index_js_1.SeelenEvent.GlobalMouseMove, (event) => {
26
+ if (!is_layered_enabled) {
27
+ return;
28
+ }
29
+ const [mouseX, mouseY] = event.payload;
30
+ const { x: windowX, y: windowY, width: windowWidth, height: windowHeight, } = webviewRect;
31
+ // check if the mouse is inside the window
32
+ const isHoverWindow = mouseX >= windowX &&
33
+ mouseX <= windowX + windowWidth &&
34
+ mouseY >= windowY &&
35
+ mouseY <= windowY + windowHeight;
36
+ if (!isHoverWindow) {
37
+ return;
38
+ }
39
+ const adjustedX = (mouseX - windowX) / globalThis.devicePixelRatio;
40
+ const adjustedY = (mouseY - windowY) / globalThis.devicePixelRatio;
41
+ const isOverBody = document.elementFromPoint(adjustedX, adjustedY) == document.body;
42
+ if (isOverBody && !ignoring_cursor_events) {
43
+ ignoring_cursor_events = true;
44
+ webview.setIgnoreCursorEvents(true);
45
+ }
46
+ if (!isOverBody && ignoring_cursor_events) {
47
+ ignoring_cursor_events = false;
48
+ webview.setIgnoreCursorEvents(false);
49
+ }
50
+ });
51
+ globalThis.addEventListener('touchstart', (e) => {
52
+ const isOverBody = e.target == document.body;
53
+ if (isOverBody && !ignoring_cursor_events) {
54
+ ignoring_cursor_events = true;
55
+ webview.setIgnoreCursorEvents(true);
56
+ }
57
+ });
58
+ }