@seelen-ui/lib 2.1.3 → 2.1.8

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 (67) hide show
  1. package/esm/handlers/commands.d.ts +2 -4
  2. package/esm/handlers/commands.d.ts.map +1 -1
  3. package/esm/handlers/commands.js +2 -4
  4. package/esm/handlers/events.d.ts +0 -2
  5. package/esm/handlers/events.d.ts.map +1 -1
  6. package/esm/handlers/events.js +0 -2
  7. package/esm/state/icon_pack.d.ts +88 -16
  8. package/esm/state/icon_pack.d.ts.map +1 -1
  9. package/esm/state/icon_pack.js +148 -36
  10. package/esm/state/widget.d.ts +3 -0
  11. package/esm/state/widget.d.ts.map +1 -1
  12. package/esm/state/widget.js +1 -1
  13. package/esm/system_state/mod.d.ts +0 -1
  14. package/esm/system_state/mod.d.ts.map +1 -1
  15. package/esm/system_state/mod.js +0 -1
  16. package/esm/types/IconPack.d.ts +9 -0
  17. package/esm/types/IconPack.d.ts.map +1 -1
  18. package/esm/types/PinnedWegItemData.d.ts +10 -5
  19. package/esm/types/PinnedWegItemData.d.ts.map +1 -1
  20. package/esm/types/WegItemSubtype.d.ts +2 -0
  21. package/esm/types/WegItemSubtype.d.ts.map +1 -0
  22. package/esm/types/mod.d.ts +77 -78
  23. package/esm/types/mod.d.ts.map +1 -1
  24. package/esm/types/mod.js +77 -78
  25. package/package.json +1 -1
  26. package/script/handlers/commands.d.ts +2 -4
  27. package/script/handlers/commands.d.ts.map +1 -1
  28. package/script/handlers/commands.js +2 -4
  29. package/script/handlers/events.d.ts +0 -2
  30. package/script/handlers/events.d.ts.map +1 -1
  31. package/script/handlers/events.js +0 -2
  32. package/script/state/icon_pack.d.ts +88 -16
  33. package/script/state/icon_pack.d.ts.map +1 -1
  34. package/script/state/icon_pack.js +148 -36
  35. package/script/state/widget.d.ts +3 -0
  36. package/script/state/widget.d.ts.map +1 -1
  37. package/script/state/widget.js +1 -1
  38. package/script/system_state/mod.d.ts +0 -1
  39. package/script/system_state/mod.d.ts.map +1 -1
  40. package/script/system_state/mod.js +0 -1
  41. package/script/types/IconPack.d.ts +9 -0
  42. package/script/types/IconPack.d.ts.map +1 -1
  43. package/script/types/PinnedWegItemData.d.ts +10 -5
  44. package/script/types/PinnedWegItemData.d.ts.map +1 -1
  45. package/script/types/WegItemSubtype.d.ts +2 -0
  46. package/script/types/WegItemSubtype.d.ts.map +1 -0
  47. package/script/types/mod.d.ts +77 -78
  48. package/script/types/mod.d.ts.map +1 -1
  49. package/script/types/mod.js +77 -78
  50. package/esm/system_state/application_history.d.ts +0 -32
  51. package/esm/system_state/application_history.d.ts.map +0 -1
  52. package/esm/system_state/application_history.js +0 -15
  53. package/esm/types/ApplicationHistoryEntry.d.ts +0 -8
  54. package/esm/types/ApplicationHistoryEntry.d.ts.map +0 -1
  55. package/esm/types/ApplicationHistoryEntry.js +0 -1
  56. package/esm/types/FocusedApp.d.ts +0 -8
  57. package/esm/types/FocusedApp.d.ts.map +0 -1
  58. package/script/system_state/application_history.d.ts +0 -32
  59. package/script/system_state/application_history.d.ts.map +0 -1
  60. package/script/system_state/application_history.js +0 -19
  61. package/script/types/ApplicationHistoryEntry.d.ts +0 -8
  62. package/script/types/ApplicationHistoryEntry.d.ts.map +0 -1
  63. package/script/types/ApplicationHistoryEntry.js +0 -2
  64. package/script/types/FocusedApp.d.ts +0 -8
  65. package/script/types/FocusedApp.d.ts.map +0 -1
  66. /package/esm/types/{FocusedApp.js → WegItemSubtype.js} +0 -0
  67. /package/script/types/{FocusedApp.js → WegItemSubtype.js} +0 -0
@@ -20,6 +20,8 @@ class IconPackManager {
20
20
  _iconPacks;
21
21
  _actives;
22
22
  callbacks = new Set();
23
+ unlistenerSettings = null;
24
+ unlistenerIcons = null;
23
25
  constructor(iconPackPath, _iconPacks, _actives) {
24
26
  this.iconPackPath = iconPackPath;
25
27
  this._iconPacks = _iconPacks;
@@ -28,17 +30,9 @@ class IconPackManager {
28
30
  get iconPacks() {
29
31
  return this._iconPacks;
30
32
  }
31
- set iconPacks(packs) {
32
- this._iconPacks = packs;
33
- this.callbacks.forEach((cb) => cb());
34
- }
35
33
  get actives() {
36
34
  return this._actives;
37
35
  }
38
- set actives(actives) {
39
- this._actives = actives;
40
- this.callbacks.forEach((cb) => cb());
41
- }
42
36
  /**
43
37
  * Creates an instance of IconPackManager. This intance will be updated when
44
38
  * the list of icon packs or the settings changes, so just having one global instance is enough.
@@ -46,65 +40,176 @@ class IconPackManager {
46
40
  * @returns A new instance of IconPackManager
47
41
  */
48
42
  static async create() {
49
- const manager = new IconPackManager(await api_1.path.resolve(await api_1.path.appDataDir(), 'icons'), await IconPackList.getAsync(), (await mod_js_2.Settings.getAsync()).inner.iconPacks);
50
- IconPackList.onChange((list) => {
51
- manager.iconPacks = list;
52
- });
53
- mod_js_2.Settings.onChange((settings) => {
54
- manager.actives = settings.inner.iconPacks;
55
- });
56
- return manager;
43
+ const instance = new IconPackManager(await api_1.path.resolve(await api_1.path.appDataDir(), 'icons'), await IconPackList.getAsync(), (await mod_js_2.Settings.getAsync()).inner.iconPacks);
44
+ return instance;
57
45
  }
58
46
  /**
59
- * Register a callback to be called when the list of active icon packs changes
47
+ * Registers a callback to be invoked when the list of active icon packs changes.
48
+ * This method also sets up listeners to detect changes in the icon pack list and
49
+ * the active icon packs settings. If no callbacks are registered beforehand, the
50
+ * listeners are initialized. When no callbacks remain registered, the listeners are stopped.
51
+ *
52
+ * @param {() => void} cb - The callback to be invoked when the list of active icon packs changes.
53
+ * This callback takes no arguments and returns no value.
54
+ * @returns {Promise<UnlistenFn>} A promise that resolves to an `UnlistenFn` function. When invoked,
55
+ * this function unregisters the callback and stops listening for changes
56
+ * if no other callbacks are registered.
60
57
  *
61
- * @param cb The callback to be called when the list of icon packs changes
62
58
  * @example
63
59
  * const manager = await IconPackManager.create();
64
- * manager.onChange(() => {
60
+ * const unlisten = await manager.onChange(() => {
65
61
  * console.log("Icon packs changed: ", manager.actives);
66
62
  * });
63
+ *
64
+ * // Later, to stop listening for changes:
65
+ * unlisten();
66
+ *
67
+ * @remarks
68
+ * - The `this` context inside the callback refers to the `IconPackManager` instance, provided the callback
69
+ * is not rebound to another context (e.g., using `bind`, `call`, or `apply`).
70
+ * - If the callback is defined as an arrow function, `this` will be lexically bound to the surrounding context.
71
+ * - If the callback is a regular function, ensure it is bound correctly to avoid `this` being `undefined` (in strict mode)
72
+ * or the global object (in non-strict mode).
73
+ *
74
+ * @see {@link IconPackManager} for the class this method belongs to.
75
+ * @see {@link UnlistenFn} for the type of the function returned by this method.
67
76
  */
68
- onChange(cb) {
77
+ async onChange(cb) {
69
78
  this.callbacks.add(cb);
79
+ if (!this.unlistenerIcons && !this.unlistenerSettings) {
80
+ this.unlistenerIcons = await IconPackList.onChange((list) => {
81
+ this._iconPacks = list;
82
+ this.callbacks.forEach((cb) => cb());
83
+ });
84
+ this.unlistenerSettings = await mod_js_2.Settings.onChange((settings) => {
85
+ this._actives = settings.inner.iconPacks;
86
+ this.callbacks.forEach((cb) => cb());
87
+ });
88
+ }
89
+ return () => {
90
+ this.callbacks.delete(cb);
91
+ if (this.callbacks.size === 0) {
92
+ this.unlistenerIcons?.();
93
+ this.unlistenerSettings?.();
94
+ }
95
+ };
70
96
  }
71
97
  /**
72
- * Return the icon URL for an app or file, in case of no icon available will return `null`
98
+ * Returns the icon path for an app or file. If no icon is available, returns `null`.
99
+ *
100
+ * The search for icons follows this priority order:
101
+ * 1. UMID (App User Model Id)
102
+ * 2. Full path or filename (for executable files like .exe or .lnk)
103
+ * 3. File extension (for non-executable files like .png, .jpg, .txt)
104
+ *
105
+ * Icon packs are searched in the order of their priority. An icon from a higher-priority pack
106
+ * will override an icon from a lower-priority pack, even if the latter matches the search criteria.
107
+ *
108
+ * @param {Object} args - Arguments for retrieving the icon path.
109
+ * @param {string} [args.path] - The full path to the app or file.
110
+ * @param {string} [args.umid] - The UMID of the app.
111
+ * @returns {string | null} - The path to the icon, or `null` if no icon is found.
73
112
  *
74
- * @param filePath The path to the app could be umid, full path.
75
113
  * @example
76
- * const iconUrl = instance.getIcon({
114
+ * // Example 1: Get icon by full path
115
+ * const iconPath = instance.getIconPath({
77
116
  * path: "C:\\Program Files\\Steam\\steam.exe"
78
117
  * });
79
- * const iconUrl = instance.getIcon({
118
+ *
119
+ * // Example 2: Get icon by UMID
120
+ * const iconPath = instance.getIconPath({
80
121
  * umid: "Seelen.SeelenUI_p6yyn03m1894e!App"
81
122
  * });
82
123
  */
83
- getIcon({ path, umid }) {
124
+ getIconPath({ path, umid }) {
125
+ // If neither path nor UMID is provided, return null
84
126
  if (!path && !umid) {
85
127
  return null;
86
128
  }
129
+ // Create an ordered list of icon packs based on their priority
130
+ const orderedPacks = [];
87
131
  for (const active of this.actives.toReversed()) {
88
132
  const pack = this._iconPacks.asArray().find((p) => p.metadata.filename === active);
89
- if (!pack) {
90
- continue;
133
+ if (pack) {
134
+ orderedPacks.push(pack);
91
135
  }
92
- let icon;
93
- if (umid) {
94
- icon = pack.apps[umid];
136
+ }
137
+ // Search by UMID first (highest priority)
138
+ if (umid) {
139
+ for (const pack of orderedPacks) {
140
+ const subPath = pack.apps[umid];
141
+ if (subPath) {
142
+ return `${this.iconPackPath}\\${pack.metadata.filename}\\${subPath}`;
143
+ }
95
144
  }
96
- if (!icon && path) {
97
- const filename = path?.split(/[/\\]/g).pop();
98
- icon = filename ? pack.apps[filename] || pack.apps[path] : pack.apps[path];
145
+ }
146
+ // If no UMID is provided, search by path
147
+ if (!path) {
148
+ return null;
149
+ }
150
+ const lowercasedPath = path.toLowerCase();
151
+ const isExecutable = lowercasedPath.endsWith('.exe') || lowercasedPath.endsWith('.lnk');
152
+ // For non-executable files, search by file extension
153
+ if (!isExecutable) {
154
+ const extension = lowercasedPath.split('.').pop();
155
+ if (!extension) {
156
+ return null;
99
157
  }
100
- if (icon) {
101
- return (0, core_1.convertFileSrc)(this.iconPackPath + '\\' + pack.metadata.filename + '\\' + icon);
158
+ for (const pack of orderedPacks) {
159
+ const subPath = pack.files[extension];
160
+ if (subPath) {
161
+ return `${this.iconPackPath}\\${pack.metadata.filename}\\${subPath}`;
162
+ }
102
163
  }
164
+ return null;
165
+ }
166
+ // For executable files, search by full path or filename
167
+ const filename = path.split(/[/\\]/g).pop();
168
+ if (!filename) {
169
+ return null;
103
170
  }
171
+ for (const pack of orderedPacks) {
172
+ const subPath = pack.apps[path] || pack.apps[filename];
173
+ if (subPath) {
174
+ return `${this.iconPackPath}\\${pack.metadata.filename}\\${subPath}`;
175
+ }
176
+ }
177
+ // If no icon is found in any icon pack, return null
104
178
  return null;
105
179
  }
106
180
  /**
107
- * Return the icon Path for an app or file, in case of no icon available will return `null`.
181
+ * Returns the icon Url/Src for an app or file. If no icon is available, returns `null`.
182
+ *
183
+ * The search for icons follows this priority order:
184
+ * 1. UMID (App User Model Id)
185
+ * 2. Full path or filename (for executable files like .exe or .lnk)
186
+ * 3. File extension (for non-executable files like .png, .jpg, .txt)
187
+ *
188
+ * Icon packs are searched in the order of their priority. An icon from a higher-priority pack
189
+ * will override an icon from a lower-priority pack, even if the latter matches the search criteria.
190
+ *
191
+ * @param {Object} args - Arguments for retrieving the icon path.
192
+ * @param {string} [args.path] - The full path to the app or file.
193
+ * @param {string} [args.umid] - The UMID of the app.
194
+ * @returns {string | null} - The path to the icon, or `null` if no icon is found.
195
+ *
196
+ * @example
197
+ * // Example 1: Get icon by full path
198
+ * const iconSrc = instance.getIconPath({
199
+ * path: "C:\\Program Files\\Steam\\steam.exe"
200
+ * });
201
+ *
202
+ * // Example 2: Get icon by UMID
203
+ * const iconSrc = instance.getIconPath({
204
+ * umid: "Seelen.SeelenUI_p6yyn03m1894e!App"
205
+ * });
206
+ */
207
+ getIcon({ path, umid }) {
208
+ const iconPath = this.getIconPath({ path, umid });
209
+ return iconPath ? (0, core_1.convertFileSrc)(iconPath) : null;
210
+ }
211
+ /**
212
+ * Return the icon Path for an app or file, in case of no icon available will return `null`.\
108
213
  * This method doesn't take in care icon packs, just extracts the inherited icon into system's icon pack.
109
214
  *
110
215
  * @param filePath The path to the app could be umid o full path
@@ -119,5 +224,12 @@ class IconPackManager {
119
224
  static extractIcon(obj) {
120
225
  return (0, mod_js_1.invoke)(mod_js_1.SeelenCommand.GetIcon, obj);
121
226
  }
227
+ /**
228
+ * This will delete all stored icons on the system icon pack.\
229
+ * All icons should be regenerated after calling this method.
230
+ */
231
+ static clearCachedIcons() {
232
+ return (0, mod_js_1.invoke)(mod_js_1.SeelenCommand.StateDeleteCachedIcons);
233
+ }
122
234
  }
123
235
  exports.IconPackManager = IconPackManager;
@@ -2,6 +2,9 @@ import type { Widget, WidgetId } from '../types/mod.js';
2
2
  import { SeelenCommand, SeelenEvent } from '../handlers/mod.js';
3
3
  import { List } from '../utils/List.js';
4
4
  declare global {
5
+ interface Window {
6
+ __TAURI_INTERNALS__?: unknown;
7
+ }
5
8
  interface ArgsByCommand {
6
9
  [SeelenCommand.StateGetWidgets]: null;
7
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"widget.d.ts","sourceRoot":"","sources":["../../src/state/widget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAKxC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,aAAa;QACrB,CAAC,aAAa,CAAC,eAAe,CAAC,EAAE,IAAI,CAAC;KACvC;IACD,UAAU,eAAe;QACvB,CAAC,aAAa,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;KAC3C;IACD,UAAU,cAAc;QACtB,CAAC,WAAW,CAAC,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;KAC7C;CACF;AAED,eAAO,MAAM,iBAAiB,EAAE,QAAwB,CAAC;AACzD,eAAO,MAAM,qBAAqB,EAAE,QAAkC,CAAC;AAC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,CAAC;AACzD,eAAO,MAAM,qBAAqB,EAAE,QAAkC,CAAC;AACvE,eAAO,MAAM,2BAA2B,EAAE,QAAmC,CAAC;AAC9E,eAAO,MAAM,sBAAsB,EAAE,QAA6B,CAAC;AACnE,eAAO,MAAM,kBAAkB,EAAE,QAAsC,CAAC;AAExE,qBAAa,UAAW,SAAQ,IAAI,CAAC,MAAM,CAAC;IAC1C,MAAM,CAAC,QAAQ,CAAC,QAAQ,iDAA8D;IACtF,MAAM,CAAC,QAAQ,CAAC,QAAQ,iGAAgE;CACzF;AAED,UAAU,iBAAiB;IACzB,EAAE,EAAE,QAAQ,CAAC;IACb,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAC1C;AAmBD,mEAAmE;AACnE,wBAAgB,gBAAgB,IAAI,QAAQ,CAAC,iBAAiB,CAAC,CAa9D"}
@@ -34,7 +34,7 @@ function _getCurrentWidget() {
34
34
  }
35
35
  /** If called on backend context, will return an empty structure */
36
36
  function getCurrentWidget() {
37
- if (!globalThis.window) {
37
+ if (!globalThis.window || !globalThis.window.__TAURI_INTERNALS__) {
38
38
  return {
39
39
  id: '',
40
40
  label: '',
@@ -1,4 +1,3 @@
1
- export * from './application_history.js';
2
1
  export * from './monitors.js';
3
2
  export * from './ui_colors.js';
4
3
  export * from './language.js';
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/system_state/mod.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/system_state/mod.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC"}
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./application_history.js"), exports);
18
17
  __exportStar(require("./monitors.js"), exports);
19
18
  __exportStar(require("./ui_colors.js"), exports);
20
19
  __exportStar(require("./language.js"), exports);
@@ -5,11 +5,20 @@ export type IconPack = {
5
5
  metadata: ResourceMetadata;
6
6
  /**
7
7
  * Key can be user model id, filename or a full path.
8
+ * In case of path this should be an executable or a lnk file, otherwise use `files`.
8
9
  *
9
10
  * Value is the path to the icon relative to the icon pack folder.
10
11
  */
11
12
  apps: {
12
13
  [key in string]?: string;
13
14
  };
15
+ /**
16
+ * Intended to store file icons by extension
17
+ *
18
+ * Key is the extension, value is the relative path to the icon
19
+ */
20
+ files: {
21
+ [key in string]?: string;
22
+ };
14
23
  };
15
24
  //# sourceMappingURL=IconPack.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconPack.d.ts","sourceRoot":"","sources":["../../src/types/IconPack.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,MAAM,QAAQ,GAAG;IAAE,EAAE,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpE;;;;OAIG;IACH,IAAI,EAAE;SAAG,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,MAAM;KAAE,CAAC;CAAE,CAAC"}
1
+ {"version":3,"file":"IconPack.d.ts","sourceRoot":"","sources":["../../src/types/IconPack.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,MAAM,QAAQ,GAAG;IAAE,EAAE,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpE;;;;;OAKG;IACH,IAAI,EAAE;SAAG,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,MAAM;KAAE,CAAC;IACnC;;;;OAIG;IACH,KAAK,EAAE;SAAG,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,MAAM;KAAE,CAAC;CAAE,CAAC"}
@@ -1,15 +1,20 @@
1
1
  import type { WegAppGroupItem } from "./WegAppGroupItem.js";
2
+ import type { WegItemSubtype } from "./WegItemSubtype.js";
2
3
  export type PinnedWegItemData = {
3
4
  /**
4
5
  * internal UUID to differentiate items
5
6
  */
6
7
  id: string;
8
+ /**
9
+ * Subtype of the item (mandatory, but is optional for backward compatibility)
10
+ */
11
+ subtype: WegItemSubtype;
7
12
  /**
8
13
  * Application user model id.
9
14
  */
10
15
  umid: string | null;
11
16
  /**
12
- * Direct path to file, forder or program.
17
+ * path to file, forder or program.
13
18
  */
14
19
  path: string;
15
20
  /**
@@ -17,13 +22,13 @@ export type PinnedWegItemData = {
17
22
  */
18
23
  relaunchCommand: string;
19
24
  /**
20
- * display name of the item
25
+ * path where ejecute the relaunch command
21
26
  */
22
- displayName: string;
27
+ relaunchIn: string | null;
23
28
  /**
24
- * true if self.path is a folder
29
+ * display name of the item
25
30
  */
26
- isDir: boolean;
31
+ displayName: string;
27
32
  /**
28
33
  * Window handles in the app group, in case of pinned file/dir always will be empty
29
34
  */
@@ -1 +1 @@
1
- {"version":3,"file":"PinnedWegItemData.d.ts","sourceRoot":"","sources":["../../src/types/PinnedWegItemData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,MAAM,iBAAiB,GAAG;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAChC;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;CAAE,CAAC"}
1
+ {"version":3,"file":"PinnedWegItemData.d.ts","sourceRoot":"","sources":["../../src/types/PinnedWegItemData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,MAAM,MAAM,iBAAiB,GAAG;IAChC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,OAAO,EAAE,cAAc,CAAC;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;IAChC;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;CAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export type WegItemSubtype = "File" | "Folder" | "App" | "UnknownV2_1_6";
2
+ //# sourceMappingURL=WegItemSubtype.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WegItemSubtype.d.ts","sourceRoot":"","sources":["../../src/types/WegItemSubtype.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,GAAG,eAAe,CAAC"}
@@ -1,99 +1,98 @@
1
- export * from './SeelenWegMode.js';
2
- export * from './SettingsByWidget.js';
3
- export * from './ResourceMetadata.js';
4
- export * from './AppConfig.js';
5
- export * from './WsdGroupEntry.js';
6
- export * from './Profile.js';
1
+ export * from './WegItemSubtype.js';
2
+ export * from './WorkspaceIdentifierType.js';
3
+ export * from './VirtualDesktopStrategy.js';
4
+ export * from './User.js';
5
+ export * from './SeelenLauncherMonitor.js';
7
6
  export * from './SeelenLauncherSettings.js';
8
- export * from './SeelenLauncherRunner.js';
9
- export * from './TrayToolbarItem.js';
10
- export * from './WmNode.js';
7
+ export * from './AhkVar.js';
8
+ export * from './PluginId.js';
9
+ export * from './WindowManagerSettingsByMonitor.js';
10
+ export * from './AppIdentifier.js';
11
11
  export * from './MonitorConfiguration.js';
12
- export * from './WmLeafNode.js';
13
- export * from './SeelenWallWallpaper.js';
14
- export * from './WegTemporalItemsVisibility.js';
15
- export * from './FancyToolbarSettings.js';
16
12
  export * from './WorkspaceConfiguration.js';
17
- export * from './WidgetSettingsDeclarationList.js';
13
+ export * from './ResourceMetadata.js';
14
+ export * from './SeelenWegSide.js';
18
15
  export * from './Plugin.js';
19
- export * from './WindowManagerSettingsByMonitor.js';
20
- export * from './ToolbarItem.js';
21
- export * from './AppExtraFlag.js';
22
16
  export * from './WmStackNode.js';
23
- export * from './WsdItemInputNumber.js';
24
- export * from './WorkspaceToolbarItem.js';
25
- export * from './IconPack.js';
17
+ export * from './PowerToolbarItem.js';
18
+ export * from './WmLeafNode.js';
19
+ export * from './WmNode.js';
26
20
  export * from './NotificationsToolbarItem.js';
21
+ export * from './WsdItemInputNumber.js';
27
22
  export * from './WsdItemSelectSubtype.js';
28
- export * from './ResourceStatus.js';
29
- export * from './WindowManagerSettings.js';
30
- export * from './PowerToolbarItem.js';
31
- export * from './Theme.js';
32
- export * from './WsdItemSwitch.js';
33
- export * from './UserToolbarItem.js';
34
- export * from './MatchingStrategy.js';
35
- export * from './StyleValue.js';
36
- export * from './WsdItemSelect.js';
37
- export * from './WorkspaceIdentifierType.js';
38
- export * from './WsdItemSelectOption.js';
39
- export * from './HideMode.js';
40
- export * from './WegItems.js';
41
- export * from './ThemeId.js';
42
- export * from './ResourceText.js';
43
- export * from './GenericToolbarItem.js';
23
+ export * from './SeelenWallSettings.js';
24
+ export * from './WsdGroupEntry.js';
25
+ export * from './SeelenWegMode.js';
26
+ export * from './Placeholder.js';
27
+ export * from './DeviceToolbarItem.js';
28
+ export * from './ToolbarItem.js';
44
29
  export * from './Resource.js';
45
- export * from './AppIdentifierType.js';
30
+ export * from './Rect.js';
31
+ export * from './WegAppGroupItem.js';
32
+ export * from './NoFallbackBehavior.js';
33
+ export * from './NetworkToolbarItem.js';
34
+ export * from './AppConfig.js';
35
+ export * from './PinnedWegItemData.js';
46
36
  export * from './WmHorizontalNode.js';
47
- export * from './SeelenWegSide.js';
48
- export * from './Settings.js';
37
+ export * from './IconPackId.js';
38
+ export * from './WorkspaceIdentifier.js';
49
39
  export * from './WmFallbackNode.js';
50
- export * from './SeelenLauncherMonitor.js';
51
40
  export * from './MediaToolbarItem.js';
52
- export * from './User.js';
53
- export * from './WegItem.js';
54
- export * from './DateToolbarItem.js';
55
- export * from './TextToolbarItem.js';
56
- export * from './NetworkToolbarItem.js';
57
- export * from './WmVerticalNode.js';
58
- export * from './SeelenWegSettingsByMonitor.js';
59
- export * from './VirtualDesktopStrategy.js';
60
- export * from './WsdItem.js';
61
- export * from './UpdaterSettings.js';
62
- export * from './PinnedWegItemData.js';
63
- export * from './AhkVarList.js';
64
- export * from './FocusedApp.js';
65
- export * from './WindowManagerLayout.js';
66
41
  export * from './ProfileSettings.js';
42
+ export * from './WorkspaceToolbarItemMode.js';
43
+ export * from './NodeSubtype.js';
67
44
  export * from './ResourceKind.js';
45
+ export * from './WidgetId.js';
46
+ export * from './UserToolbarItem.js';
47
+ export * from './FolderType.js';
48
+ export * from './MatchingStrategy.js';
49
+ export * from './Profile.js';
50
+ export * from './File.js';
51
+ export * from './HideMode.js';
52
+ export * from './ResourceText.js';
53
+ export * from './StyleValue.js';
54
+ export * from './WsdItemSelectOption.js';
55
+ export * from './SettingsByWidget.js';
56
+ export * from './TextToolbarItem.js';
68
57
  export * from './FolderChangedArgs.js';
69
- export * from './SeelenWallSettings.js';
70
- export * from './DeviceToolbarItem.js';
71
- export * from './AppIdentifier.js';
72
- export * from './Placeholder.js';
58
+ export * from './SeelenLauncherRunner.js';
59
+ export * from './Settings.js';
60
+ export * from './SeelenWallSettingsByMonitor.js';
61
+ export * from './AppExtraFlag.js';
62
+ export * from './WindowManagerLayout.js';
63
+ export * from './WsdItemSwitch.js';
64
+ export * from './AhkVarList.js';
65
+ export * from './WegPinnedItemsVisibility.js';
66
+ export * from './WsdItemInputText.js';
67
+ export * from './TrayToolbarItem.js';
68
+ export * from './ResourceStatus.js';
69
+ export * from './SeelenWegSettings.js';
70
+ export * from './Border.js';
71
+ export * from './FloatingWindowSettings.js';
72
+ export * from './WindowManagerSettings.js';
73
73
  export * from './WsdGroup.js';
74
+ export * from './UpdaterSettings.js';
74
75
  export * from './ResourceId.js';
75
- export * from './WorkspaceIdentifier.js';
76
- export * from './AhkVar.js';
77
- export * from './WegAppGroupItem.js';
78
- export * from './SeelenWegSettings.js';
76
+ export * from './WegTemporalItemsVisibility.js';
77
+ export * from './DateToolbarItem.js';
79
78
  export * from './FancyToolbarSettingsByMonitor.js';
79
+ export * from './WsdItemSelect.js';
80
+ export * from './SeelenWegSettingsByMonitor.js';
81
+ export * from './AppIdentifierType.js';
80
82
  export * from './ToolbarItem2.js';
81
- export * from './NoFallbackBehavior.js';
82
- export * from './SettingsToolbarItem.js';
83
- export * from './File.js';
84
- export * from './NodeSubtype.js';
85
- export * from './Rect.js';
86
- export * from './IconPackId.js';
87
- export * from './FloatingWindowSettings.js';
83
+ export * from './GenericToolbarItem.js';
84
+ export * from './WegItems.js';
85
+ export * from './WorkspaceToolbarItem.js';
86
+ export * from './ThemeId.js';
87
+ export * from './Theme.js';
88
88
  export * from './UpdateChannel.js';
89
- export * from './SeelenWallSettingsByMonitor.js';
90
- export * from './WsdItemInputText.js';
91
- export * from './WegPinnedItemsVisibility.js';
92
- export * from './ApplicationHistoryEntry.js';
93
- export * from './FolderType.js';
94
- export * from './WorkspaceToolbarItemMode.js';
89
+ export * from './WsdItem.js';
90
+ export * from './FancyToolbarSettings.js';
91
+ export * from './WidgetSettingsDeclarationList.js';
95
92
  export * from './Widget.js';
96
- export * from './WidgetId.js';
97
- export * from './PluginId.js';
98
- export * from './Border.js';
93
+ export * from './IconPack.js';
94
+ export * from './SettingsToolbarItem.js';
95
+ export * from './SeelenWallWallpaper.js';
96
+ export * from './WmVerticalNode.js';
97
+ export * from './WegItem.js';
99
98
  //# sourceMappingURL=mod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../src/types/mod.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,iBAAiB,CAAC;AAChC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iCAAiC,CAAC;AAChD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,aAAa,CAAC;AAC5B,cAAc,qCAAqC,CAAC;AACpD,cAAc,kBAAkB,CAAC;AACjC,cAA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