@seelen-ui/lib 2.5.3 → 2.5.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 (171) hide show
  1. package/esm/gen/types/FancyToolbarSettings.d.ts +10 -2
  2. package/esm/gen/types/FancyToolbarSettings.d.ts.map +1 -1
  3. package/esm/gen/types/{PinnedWegItemData.d.ts → OldWegItemData.d.ts} +5 -10
  4. package/esm/gen/types/OldWegItemData.d.ts.map +1 -0
  5. package/esm/gen/types/{WegItemSubtype.d.ts → OldWegItemSubtype.d.ts} +2 -2
  6. package/esm/gen/types/OldWegItemSubtype.d.ts.map +1 -0
  7. package/esm/gen/types/OldWegItemSubtype.js +8 -0
  8. package/esm/gen/types/Relaunch.d.ts +20 -0
  9. package/esm/gen/types/Relaunch.d.ts.map +1 -0
  10. package/esm/gen/types/Resource.d.ts +12 -5
  11. package/esm/gen/types/Resource.d.ts.map +1 -1
  12. package/esm/gen/types/ResourceMetadata.d.ts +4 -0
  13. package/esm/gen/types/ResourceMetadata.d.ts.map +1 -1
  14. package/esm/gen/types/ResourcePendingUpdate.d.ts +20 -0
  15. package/esm/gen/types/ResourcePendingUpdate.d.ts.map +1 -0
  16. package/esm/gen/types/SeelenCommandArgument.d.ts +13 -2
  17. package/esm/gen/types/SeelenCommandArgument.d.ts.map +1 -1
  18. package/esm/gen/types/SeelenCommandReturn.d.ts +14 -0
  19. package/esm/gen/types/SeelenCommandReturn.d.ts.map +1 -1
  20. package/esm/gen/types/SeelenEventPayload.d.ts +10 -3
  21. package/esm/gen/types/SeelenEventPayload.d.ts.map +1 -1
  22. package/esm/gen/types/SeelenSession.d.ts +15 -0
  23. package/esm/gen/types/SeelenSession.d.ts.map +1 -0
  24. package/esm/gen/types/SeelenWegSettings.d.ts +4 -0
  25. package/esm/gen/types/SeelenWegSettings.d.ts.map +1 -1
  26. package/esm/gen/types/Settings.d.ts +9 -0
  27. package/esm/gen/types/Settings.d.ts.map +1 -1
  28. package/esm/gen/types/Slug.d.ts +9 -0
  29. package/esm/gen/types/Slug.d.ts.map +1 -0
  30. package/esm/gen/types/Slug.js +2 -0
  31. package/esm/gen/types/TrashBinInfo.d.ts +11 -0
  32. package/esm/gen/types/TrashBinInfo.d.ts.map +1 -0
  33. package/esm/gen/types/TrashBinInfo.js +2 -0
  34. package/esm/gen/types/UserAppWindow.d.ts +9 -0
  35. package/esm/gen/types/UserAppWindow.d.ts.map +1 -1
  36. package/esm/gen/types/WegItem.d.ts +9 -5
  37. package/esm/gen/types/WegItem.d.ts.map +1 -1
  38. package/esm/gen/types/WegItemData.d.ts +32 -0
  39. package/esm/gen/types/WegItemData.d.ts.map +1 -0
  40. package/esm/gen/types/WegItemData.js +1 -0
  41. package/esm/gen/types/WegItemType.d.ts +3 -3
  42. package/esm/gen/types/WegItemType.d.ts.map +1 -1
  43. package/esm/gen/types/WegItemType.js +2 -2
  44. package/esm/gen/types/mod.d.ts +246 -242
  45. package/esm/gen/types/mod.d.ts.map +1 -1
  46. package/esm/gen/types/mod.js +246 -242
  47. package/esm/src/handlers/commands.d.ts +7 -1
  48. package/esm/src/handlers/commands.d.ts.map +1 -1
  49. package/esm/src/handlers/commands.js +6 -0
  50. package/esm/src/handlers/events.d.ts +5 -3
  51. package/esm/src/handlers/events.d.ts.map +1 -1
  52. package/esm/src/handlers/events.js +4 -2
  53. package/esm/src/state/icon_pack.d.ts.map +1 -1
  54. package/esm/src/state/icon_pack.js +11 -2
  55. package/esm/src/state/mod.d.ts +0 -2
  56. package/esm/src/state/mod.d.ts.map +1 -1
  57. package/esm/src/state/mod.js +0 -2
  58. package/esm/src/state/widget/interfaces.d.ts +6 -0
  59. package/esm/src/state/widget/interfaces.d.ts.map +1 -1
  60. package/esm/src/state/widget/mod.d.ts +6 -3
  61. package/esm/src/state/widget/mod.d.ts.map +1 -1
  62. package/esm/src/state/widget/mod.js +38 -28
  63. package/esm/src/state/widget/performance.d.ts +2 -0
  64. package/esm/src/state/widget/performance.d.ts.map +1 -0
  65. package/esm/src/state/widget/performance.js +18 -0
  66. package/esm/src/state/widget/sizing.js +2 -2
  67. package/esm/src/system_state/ui_colors.d.ts +0 -2
  68. package/esm/src/system_state/ui_colors.d.ts.map +1 -1
  69. package/esm/src/system_state/ui_colors.js +0 -8
  70. package/package.json +1 -1
  71. package/script/gen/types/FancyToolbarSettings.d.ts +10 -2
  72. package/script/gen/types/FancyToolbarSettings.d.ts.map +1 -1
  73. package/script/gen/types/{PinnedWegItemData.d.ts → OldWegItemData.d.ts} +5 -10
  74. package/script/gen/types/OldWegItemData.d.ts.map +1 -0
  75. package/script/gen/types/{WegItemSubtype.d.ts → OldWegItemSubtype.d.ts} +2 -2
  76. package/script/gen/types/OldWegItemSubtype.d.ts.map +1 -0
  77. package/script/gen/types/OldWegItemSubtype.js +11 -0
  78. package/script/gen/types/Relaunch.d.ts +20 -0
  79. package/script/gen/types/Relaunch.d.ts.map +1 -0
  80. package/script/gen/types/Resource.d.ts +12 -5
  81. package/script/gen/types/Resource.d.ts.map +1 -1
  82. package/script/gen/types/ResourceMetadata.d.ts +4 -0
  83. package/script/gen/types/ResourceMetadata.d.ts.map +1 -1
  84. package/script/gen/types/ResourcePendingUpdate.d.ts +20 -0
  85. package/script/gen/types/ResourcePendingUpdate.d.ts.map +1 -0
  86. package/script/gen/types/SeelenCommandArgument.d.ts +13 -2
  87. package/script/gen/types/SeelenCommandArgument.d.ts.map +1 -1
  88. package/script/gen/types/SeelenCommandReturn.d.ts +14 -0
  89. package/script/gen/types/SeelenCommandReturn.d.ts.map +1 -1
  90. package/script/gen/types/SeelenEventPayload.d.ts +10 -3
  91. package/script/gen/types/SeelenEventPayload.d.ts.map +1 -1
  92. package/script/gen/types/SeelenSession.d.ts +15 -0
  93. package/script/gen/types/SeelenSession.d.ts.map +1 -0
  94. package/script/gen/types/SeelenWegSettings.d.ts +4 -0
  95. package/script/gen/types/SeelenWegSettings.d.ts.map +1 -1
  96. package/script/gen/types/Settings.d.ts +9 -0
  97. package/script/gen/types/Settings.d.ts.map +1 -1
  98. package/script/gen/types/Slug.d.ts +9 -0
  99. package/script/gen/types/Slug.d.ts.map +1 -0
  100. package/script/gen/types/Slug.js +3 -0
  101. package/script/gen/types/TrashBinInfo.d.ts +11 -0
  102. package/script/gen/types/TrashBinInfo.d.ts.map +1 -0
  103. package/script/gen/types/TrashBinInfo.js +3 -0
  104. package/script/gen/types/UserAppWindow.d.ts +9 -0
  105. package/script/gen/types/UserAppWindow.d.ts.map +1 -1
  106. package/script/gen/types/WegItem.d.ts +9 -5
  107. package/script/gen/types/WegItem.d.ts.map +1 -1
  108. package/script/gen/types/WegItemData.d.ts +32 -0
  109. package/script/gen/types/WegItemData.d.ts.map +1 -0
  110. package/script/gen/types/WegItemData.js +2 -0
  111. package/script/gen/types/WegItemType.d.ts +3 -3
  112. package/script/gen/types/WegItemType.d.ts.map +1 -1
  113. package/script/gen/types/WegItemType.js +2 -2
  114. package/script/gen/types/mod.d.ts +246 -242
  115. package/script/gen/types/mod.d.ts.map +1 -1
  116. package/script/gen/types/mod.js +246 -242
  117. package/script/src/handlers/commands.d.ts +7 -1
  118. package/script/src/handlers/commands.d.ts.map +1 -1
  119. package/script/src/handlers/commands.js +6 -0
  120. package/script/src/handlers/events.d.ts +5 -3
  121. package/script/src/handlers/events.d.ts.map +1 -1
  122. package/script/src/handlers/events.js +4 -2
  123. package/script/src/state/icon_pack.d.ts.map +1 -1
  124. package/script/src/state/icon_pack.js +11 -2
  125. package/script/src/state/mod.d.ts +0 -2
  126. package/script/src/state/mod.d.ts.map +1 -1
  127. package/script/src/state/mod.js +0 -2
  128. package/script/src/state/widget/interfaces.d.ts +6 -0
  129. package/script/src/state/widget/interfaces.d.ts.map +1 -1
  130. package/script/src/state/widget/mod.d.ts +6 -3
  131. package/script/src/state/widget/mod.d.ts.map +1 -1
  132. package/script/src/state/widget/mod.js +38 -28
  133. package/script/src/state/widget/performance.d.ts +2 -0
  134. package/script/src/state/widget/performance.d.ts.map +1 -0
  135. package/script/src/state/widget/performance.js +21 -0
  136. package/script/src/state/widget/sizing.js +2 -2
  137. package/script/src/system_state/ui_colors.d.ts +0 -2
  138. package/script/src/system_state/ui_colors.d.ts.map +1 -1
  139. package/script/src/system_state/ui_colors.js +0 -8
  140. package/esm/gen/types/PinnedWegItemData.d.ts.map +0 -1
  141. package/esm/gen/types/SeelenCommandStateGetWegItemsArgs.d.ts +0 -5
  142. package/esm/gen/types/SeelenCommandStateGetWegItemsArgs.d.ts.map +0 -1
  143. package/esm/gen/types/WegAppGroupItem.d.ts +0 -12
  144. package/esm/gen/types/WegAppGroupItem.d.ts.map +0 -1
  145. package/esm/gen/types/WegItemSubtype.d.ts.map +0 -1
  146. package/esm/gen/types/WegItemSubtype.js +0 -8
  147. package/esm/src/state/weg_items.d.ts +0 -14
  148. package/esm/src/state/weg_items.d.ts.map +0 -1
  149. package/esm/src/state/weg_items.js +0 -23
  150. package/esm/src/state/wm_layout.d.ts +0 -2
  151. package/esm/src/state/wm_layout.d.ts.map +0 -1
  152. package/script/gen/types/PinnedWegItemData.d.ts.map +0 -1
  153. package/script/gen/types/SeelenCommandStateGetWegItemsArgs.d.ts +0 -5
  154. package/script/gen/types/SeelenCommandStateGetWegItemsArgs.d.ts.map +0 -1
  155. package/script/gen/types/WegAppGroupItem.d.ts +0 -12
  156. package/script/gen/types/WegAppGroupItem.d.ts.map +0 -1
  157. package/script/gen/types/WegItemSubtype.d.ts.map +0 -1
  158. package/script/gen/types/WegItemSubtype.js +0 -11
  159. package/script/src/state/weg_items.d.ts +0 -14
  160. package/script/src/state/weg_items.d.ts.map +0 -1
  161. package/script/src/state/weg_items.js +0 -27
  162. package/script/src/state/wm_layout.d.ts +0 -2
  163. package/script/src/state/wm_layout.d.ts.map +0 -1
  164. /package/esm/gen/types/{PinnedWegItemData.js → OldWegItemData.js} +0 -0
  165. /package/esm/gen/types/{SeelenCommandStateGetWegItemsArgs.js → Relaunch.js} +0 -0
  166. /package/esm/{src/state/wm_layout.js → gen/types/ResourcePendingUpdate.js} +0 -0
  167. /package/esm/gen/types/{WegAppGroupItem.js → SeelenSession.js} +0 -0
  168. /package/script/gen/types/{PinnedWegItemData.js → OldWegItemData.js} +0 -0
  169. /package/script/gen/types/{SeelenCommandStateGetWegItemsArgs.js → Relaunch.js} +0 -0
  170. /package/script/{src/state/wm_layout.js → gen/types/ResourcePendingUpdate.js} +0 -0
  171. /package/script/gen/types/{WegAppGroupItem.js → SeelenSession.js} +0 -0
@@ -161,7 +161,15 @@ export class IconPackManager {
161
161
  return null;
162
162
  }
163
163
  const lowerPath = path?.toLowerCase();
164
- const extension = lowerPath?.split(".").pop();
164
+ // Extract extension only when there's an actual dot after the last path separator,
165
+ // to avoid treating directory names without dots as extensions.
166
+ const lastDot = lowerPath?.lastIndexOf(".");
167
+ const lastSlash = lowerPath?.lastIndexOf("\\") ?? -1;
168
+ const extension = (lastDot !== undefined && lastDot > lastSlash) ? lowerPath.slice(lastDot + 1) : undefined;
169
+ // Add the starting path to __seen so that direct A→B→A cycles are caught in 2 hops.
170
+ if (lowerPath) {
171
+ __seen.add(lowerPath);
172
+ }
165
173
  for (const pack of this.activeIconPacks) {
166
174
  let entry;
167
175
  if (umid) {
@@ -178,7 +186,8 @@ export class IconPackManager {
178
186
  // only search for filename in case of executable files
179
187
  if (extension === "exe") {
180
188
  const filename = lowerPath.split("\\").pop();
181
- if (filename && e.path.endsWith(filename)) {
189
+ // Use separator-aware check to avoid partial name matches (e.g. "mysteam.exe" != "steam.exe")
190
+ if (filename && (e.path === filename || e.path.endsWith("\\" + filename))) {
182
191
  return true;
183
192
  }
184
193
  }
@@ -1,7 +1,5 @@
1
1
  export * from "./theme/mod.js";
2
2
  export * from "./settings/mod.js";
3
- export * from "./weg_items.js";
4
- export * from "./wm_layout.js";
5
3
  export * from "./icon_pack.js";
6
4
  export * from "./plugin/mod.js";
7
5
  export * from "./widget/mod.js";
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/state/mod.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/state/mod.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
@@ -1,7 +1,5 @@
1
1
  export * from "./theme/mod.js";
2
2
  export * from "./settings/mod.js";
3
- export * from "./weg_items.js";
4
- export * from "./wm_layout.js";
5
3
  export * from "./icon_pack.js";
6
4
  export * from "./plugin/mod.js";
7
5
  export * from "./widget/mod.js";
@@ -27,6 +27,12 @@ export interface InitWidgetOptions {
27
27
  * @default widget.preset === "Desktop"
28
28
  */
29
29
  saveAndRestoreLastRect?: boolean;
30
+ /**
31
+ * Will disable the css animations on the widget when performace mode is set to Extreme
32
+ *
33
+ * @default true
34
+ */
35
+ disableCssAnimations?: boolean;
30
36
  }
31
37
  export interface ReadyWidgetOptions {
32
38
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/src/state/widget/interfaces.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gEAAgE;IAChE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,0CAA0C;IAC1C,MAAM,EAAE;QAAE,QAAQ,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,MAAM;KAAE,CAAC;CAC/C;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACvC;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB"}
1
+ {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../../src/src/state/widget/interfaces.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,kEAAkE;IAClE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,gEAAgE;IAChE,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,0CAA0C;IAC1C,MAAM,EAAE;QAAE,QAAQ,EAAE,GAAG,IAAI,MAAM,CAAC,CAAC,EAAE,MAAM;KAAE,CAAC;CAC/C;AAED,MAAM,WAAW,iBAAiB;IAChC;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACvC;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB"}
@@ -1,6 +1,7 @@
1
1
  import { type Frame, type Rect, type ThirdPartyWidgetSettings, type Widget as IWidget, type WidgetId, type WidgetTriggerPayload } from "../../../gen/types/mod.js";
2
- import { type WebviewWindow } from "@tauri-apps/api/webviewWindow";
3
2
  import type { InitWidgetOptions, ReadyWidgetOptions, WidgetInformation } from "./interfaces.js";
3
+ import { type Webview } from "@tauri-apps/api/webview";
4
+ import { type Window } from "@tauri-apps/api/window";
4
5
  /**
5
6
  * Represents the widget instance running in the current webview
6
7
  */
@@ -18,8 +19,10 @@ export declare class Widget {
18
19
  readonly def: IWidget;
19
20
  /** decoded widget instance information */
20
21
  readonly decoded: WidgetInformation;
21
- /** current webview window */
22
- readonly webview: WebviewWindow;
22
+ /** current webview where the widget is running */
23
+ readonly webview: Webview;
24
+ /** current window where the widget is running */
25
+ readonly window: Window;
23
26
  private autoSizer?;
24
27
  private runtimeState;
25
28
  private constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../src/src/state/widget/mod.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,IAAI,EACT,KAAK,wBAAwB,EAC7B,KAAK,MAAM,IAAI,OAAO,EAEtB,KAAK,QAAQ,EAIb,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAA2B,KAAK,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAM5F,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAkBhG;;GAEG;AACH,qBAAa,MAAM;IACjB;;;OAGG;IACH,MAAM,CAAC,UAAU,IAAI,MAAM;IAU3B,iCAAiC;IACjC,MAAM,KAAK,IAAI,IAAI,MAAM,CAExB;IAED,gBAAgB;IAChB,SAAgB,EAAE,EAAE,QAAQ,CAAC;IAC7B,wBAAwB;IACxB,SAAgB,GAAG,EAAE,OAAO,CAAC;IAC7B,0CAA0C;IAC1C,SAAgB,OAAO,EAAE,iBAAiB,CAAC;IAC3C,6BAA6B;IAC7B,SAAgB,OAAO,EAAE,aAAa,CAAC;IAEvC,OAAO,CAAC,SAAS,CAAC,CAAkB;IAEpC,OAAO,CAAC,YAAY,CAalB;IAEF,OAAO;IAiBP,kDAAkD;IAClD,IAAI,QAAQ,IAAI,MAAM,CAErB;IAED,0DAA0D;IAC1D,IA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AI,CAAC;IAwB5D,SAAS,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,GAAG,IAAI;IAMhE,6EAA6E;IACtE,WAAW,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAgBhC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAKlC,uCAAuC;IAC1B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAU5B,IAAI,CAAC,oBAAoB,CAAC,EAAE,OAAO,GAAG,IAAI;CAMlD;AAWD,eAAO,MAAM,sBAAsB,EAAE,QAAyC,CAAC;AAC/E,eAAO,MAAM,mBAAmB,EAAE,QAAsC,CAAC;AACzE,eAAO,MAAM,iBAAiB,EAAE,QAAoC,CAAC;AACrE,eAAO,MAAM,qBAAqB,EAAE,QAA8C,CAAC;AACnF,eAAO,MAAM,2BAA2B,EAAE,QAA+C,CAAC;AAC1F,eAAO,MAAM,kBAAkB,EAAE,QAAkD,CAAC"}
@@ -1,13 +1,14 @@
1
1
  import * as dntShim from "../../../_dnt.shims.js";
2
2
  import { WidgetPreset, WidgetStatus, } from "../../../gen/types/mod.js";
3
3
  import { invoke, SeelenCommand, SeelenEvent } from "../../handlers/mod.js";
4
- import { getCurrentWebviewWindow } from "@tauri-apps/api/webviewWindow";
5
4
  import { decodeBase64Url } from "../../../deps/jsr.io/@std/encoding/1.0.10/mod.js";
6
5
  import { debounce } from "../../utils/async.js";
7
6
  import { WidgetAutoSizer } from "./sizing.js";
8
7
  import { adjustPositionByPlacement, fitIntoMonitor, initMonitorsState } from "./positioning.js";
9
8
  import { startThemingTool } from "../theme/theming.js";
9
+ import { disableAnimationsOnPerformanceMode } from "./performance.js";
10
10
  import { getCurrentWebview } from "@tauri-apps/api/webview";
11
+ import { getCurrentWindow } from "@tauri-apps/api/window";
11
12
  /**
12
13
  * Represents the widget instance running in the current webview
13
14
  */
@@ -33,8 +34,10 @@ export class Widget {
33
34
  def;
34
35
  /** decoded widget instance information */
35
36
  decoded;
36
- /** current webview window */
37
+ /** current webview where the widget is running */
37
38
  webview;
39
+ /** current window where the widget is running */
40
+ window;
38
41
  autoSizer;
39
42
  runtimeState = {
40
43
  hwnd: 0,
@@ -52,7 +55,8 @@ export class Widget {
52
55
  };
53
56
  constructor(widget) {
54
57
  this.def = widget;
55
- this.webview = getCurrentWebviewWindow();
58
+ this.webview = getCurrentWebview();
59
+ this.window = getCurrentWindow();
56
60
  const [id, query] = getDecodedWebviewLabel();
57
61
  const params = new URLSearchParams(query);
58
62
  const paramsObj = Object.freeze(Object.fromEntries(params));
@@ -87,41 +91,41 @@ export class Widget {
87
91
  }
88
92
  applyInvisiblePreset() {
89
93
  return [
90
- this.webview.setDecorations(false), // no title bar
91
- this.webview.setShadow(false), // no shadows
94
+ this.window.setDecorations(false), // no title bar
95
+ this.window.setShadow(false), // no shadows
92
96
  // hide from native shell
93
- this.webview.setSkipTaskbar(true),
97
+ this.window.setSkipTaskbar(true),
94
98
  // as a (desktop/overlay) widget we don't wanna allow nothing of these
95
- this.webview.setMinimizable(false),
96
- this.webview.setMaximizable(false),
97
- this.webview.setClosable(false),
99
+ this.window.setMinimizable(false),
100
+ this.window.setMaximizable(false),
101
+ this.window.setClosable(false),
98
102
  ];
99
103
  }
100
104
  /** Will apply the recommended settings for a desktop widget */
101
105
  async applyDesktopPreset() {
102
- await Promise.all([...this.applyInvisiblePreset(), this.webview.setAlwaysOnBottom(true)]);
106
+ await Promise.all([...this.applyInvisiblePreset(), this.window.setAlwaysOnBottom(true)]);
103
107
  }
104
108
  /** Will apply the recommended settings for an overlay widget */
105
109
  async applyOverlayPreset() {
106
- await Promise.all([...this.applyInvisiblePreset(), this.webview.setAlwaysOnTop(true)]);
110
+ await Promise.all([...this.applyInvisiblePreset(), this.window.setAlwaysOnTop(true)]);
107
111
  }
108
112
  /** Will apply the recommended settings for a popup widget */
109
113
  async applyPopupPreset() {
110
- await Promise.all([...this.applyInvisiblePreset(), this.webview.setAlwaysOnTop(true)]);
111
- const hideWebview = debounce(() => {
114
+ await Promise.all([...this.applyInvisiblePreset(), this.window.setAlwaysOnTop(true)]);
115
+ const hideWidget = debounce(() => {
112
116
  this.hide(true);
113
117
  }, 100);
114
- this.webview.onFocusChanged(({ payload: focused }) => {
118
+ this.window.onFocusChanged(({ payload: focused }) => {
115
119
  if (focused) {
116
- hideWebview.cancel();
120
+ hideWidget.cancel();
117
121
  }
118
122
  else {
119
- hideWebview();
123
+ hideWidget();
120
124
  }
121
125
  });
122
126
  this.onTrigger(async ({ desiredPosition, alignX, alignY }) => {
123
127
  // avoid flickering when clicking a button that triggers the widget
124
- hideWebview.cancel();
128
+ hideWidget.cancel();
125
129
  if (this.autoSizer && alignX && alignY) {
126
130
  this.autoSizer.originX = alignX;
127
131
  this.autoSizer.originY = alignY;
@@ -170,13 +174,13 @@ export class Widget {
170
174
  bottom: safeFrame.y + safeFrame.height,
171
175
  });
172
176
  }
173
- this.webview.onMoved(debounce((e) => {
177
+ this.window.onMoved(debounce((e) => {
174
178
  const { x, y } = e.payload;
175
179
  storage.setItem(`x`, x.toString());
176
180
  storage.setItem(`y`, y.toString());
177
181
  console.info(`Widget position saved: ${x} ${y}`);
178
182
  }, 500));
179
- this.webview.onResized(debounce((e) => {
183
+ this.window.onResized(debounce((e) => {
180
184
  const { width, height } = e.payload;
181
185
  storage.setItem(`width`, width.toString());
182
186
  storage.setItem(`height`, height.toString());
@@ -216,14 +220,20 @@ export class Widget {
216
220
  }
217
221
  await startThemingTool();
218
222
  await initMonitorsState();
223
+ if (options.disableCssAnimations ?? true) {
224
+ await disableAnimationsOnPerformanceMode();
225
+ }
226
+ else {
227
+ console.trace("Animations won't be disabled because widget configuration");
228
+ }
219
229
  // state initialization
220
- this.runtimeState.size = await this.webview.outerSize();
221
- this.runtimeState.position = await this.webview.outerPosition();
222
- this.webview.onResized((e) => {
230
+ this.runtimeState.size = await this.window.outerSize();
231
+ this.runtimeState.position = await this.window.outerPosition();
232
+ this.window.onResized((e) => {
223
233
  this.runtimeState.size.width = e.payload.width;
224
234
  this.runtimeState.size.height = e.payload.height;
225
235
  });
226
- this.webview.onMoved((e) => {
236
+ this.window.onMoved((e) => {
227
237
  this.runtimeState.position.x = e.payload.x;
228
238
  this.runtimeState.position.y = e.payload.y;
229
239
  });
@@ -245,7 +255,7 @@ export class Widget {
245
255
  }
246
256
  this.runtimeState.ready = true;
247
257
  await this.autoSizer?.execute();
248
- if (show && !(await this.webview.isVisible())) {
258
+ if (show && !(await this.window.isVisible())) {
249
259
  await this.show();
250
260
  await this.focus();
251
261
  }
@@ -274,7 +284,7 @@ export class Widget {
274
284
  }
275
285
  async show() {
276
286
  debouncedClose.cancel();
277
- await this.webview.show();
287
+ await this.window.show();
278
288
  }
279
289
  /** Will force foreground the widget */
280
290
  async focus() {
@@ -287,14 +297,14 @@ export class Widget {
287
297
  });
288
298
  }
289
299
  hide(closeAfterInactivity) {
290
- Widget.self.webview.hide();
300
+ this.window.hide();
291
301
  if (closeAfterInactivity) {
292
302
  debouncedClose();
293
303
  }
294
304
  }
295
305
  }
296
306
  const debouncedClose = debounce(() => {
297
- Widget.self.webview.close();
307
+ Widget.self.window.close();
298
308
  }, 30_000);
299
309
  export const SeelenSettingsWidgetId = "@seelen/settings";
300
310
  export const SeelenPopupWidgetId = "@seelen/popup";
@@ -303,7 +313,7 @@ export const SeelenToolbarWidgetId = "@seelen/fancy-toolbar";
303
313
  export const SeelenWindowManagerWidgetId = "@seelen/window-manager";
304
314
  export const SeelenWallWidgetId = "@seelen/wallpaper-manager";
305
315
  function getDecodedWebviewLabel() {
306
- const encondedLabel = getCurrentWebviewWindow().label;
316
+ const encondedLabel = getCurrentWebview().label;
307
317
  const decodedLabel = new TextDecoder().decode(decodeBase64Url(encondedLabel));
308
318
  const [id, query] = decodedLabel.split("?");
309
319
  if (!id) {
@@ -0,0 +1,2 @@
1
+ export declare function disableAnimationsOnPerformanceMode(): Promise<void>;
2
+ //# sourceMappingURL=performance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performance.d.ts","sourceRoot":"","sources":["../../../../src/src/state/widget/performance.ts"],"names":[],"mappings":"AAGA,wBAAsB,kCAAkC,IAAI,OAAO,CAAC,IAAI,CAAC,CAMxE"}
@@ -0,0 +1,18 @@
1
+ import { PerformanceMode } from "../../../gen/types/mod.js";
2
+ import { invoke, SeelenCommand, SeelenEvent, subscribe } from "../../handlers/mod.js";
3
+ export async function disableAnimationsOnPerformanceMode() {
4
+ const initial = await invoke(SeelenCommand.StateGetPerformanceMode);
5
+ setDisableAnimations(initial);
6
+ subscribe(SeelenEvent.StatePerformanceModeChanged, (e) => {
7
+ setDisableAnimations(e.payload);
8
+ });
9
+ }
10
+ function setDisableAnimations(mode) {
11
+ const root = document.documentElement;
12
+ if (mode === PerformanceMode.Extreme) {
13
+ root.setAttribute("data-animations-off", "");
14
+ }
15
+ else {
16
+ root.removeAttribute("data-animations-off");
17
+ }
18
+ }
@@ -15,7 +15,7 @@ export class WidgetAutoSizer {
15
15
  }
16
16
  setup() {
17
17
  // Disable resizing by the user
18
- this.widget.webview.setResizable(false);
18
+ this.widget.window.setResizable(false);
19
19
  const observer = new ResizeObserver(this.execute);
20
20
  observer.observe(this.element, {
21
21
  box: "border-box",
@@ -53,7 +53,7 @@ export class WidgetAutoSizer {
53
53
  }
54
54
  // only update size no position on this case
55
55
  if (frame.x === x && frame.y === y) {
56
- await this.widget.webview.setSize(new PhysicalSize(frame.width, frame.height));
56
+ await this.widget.window.setSize(new PhysicalSize(frame.width, frame.height));
57
57
  return;
58
58
  }
59
59
  await this.widget.setPosition({
@@ -23,8 +23,6 @@ export declare class Color {
23
23
  * the name will be parsed to lower kebab case and remove non-alphanumeric characters
24
24
  * this will create some css variables as:\
25
25
  * `--color-{name}` -> #RRGGBBAA\
26
- * `--color-{name}-rgb` -> R, G, B
27
- * `--color-{name}-rgba` -> R, G, B, A
28
26
  */
29
27
  setAsCssVariable(name: string): void;
30
28
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ui_colors.d.ts","sourceRoot":"","sources":["../../../src/src/system_state/ui_colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGnF,OAAO,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAErF,qBAAa,QAAQ;IACA,KAAK,EAAE,SAAS;gBAAhB,KAAK,EAAE,SAAS;IAEnC,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;IAIpC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;IAIvE,MAAM,CAAC,OAAO,IAAI,QAAQ;IAe1B,iBAAiB,IAAI,IAAI;CAmC1B;AAED,MAAM,WAAW,KAAM,SAAQ,MAAM;CAAG;AAExC,qBAAa,KAAK;gBACJ,GAAG,EAAE,MAAM;IAOvB,qCAAqC;IACrC,MAAM,CAAC,MAAM,IAAI,KAAK;IAStB,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK;IAyBlC,WAAW,IAAI,MAAM;IAUrB,OAAO,CAAC,oBAAoB;IAY5B,OAAO,CAAC,oBAAoB;IAkB5B;;;;;;;OAOG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAapC;;;;;OAKG;IACH,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM;IAYzC,aAAa,IAAI,KAAK;CAQvB"}
1
+ {"version":3,"file":"ui_colors.d.ts","sourceRoot":"","sources":["../../../src/src/system_state/ui_colors.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAGnF,OAAO,KAAK,EAAE,KAAK,IAAI,MAAM,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAErF,qBAAa,QAAQ;IACA,KAAK,EAAE,SAAS;gBAAhB,KAAK,EAAE,SAAS;IAEnC,MAAM,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC;IAIpC,MAAM,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC,OAAO,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,YAAY,CAAC;IAIvE,MAAM,CAAC,OAAO,IAAI,QAAQ;IAe1B,iBAAiB,IAAI,IAAI;CA2B1B;AAED,MAAM,WAAW,KAAM,SAAQ,MAAM;CAAG;AAExC,qBAAa,KAAK;gBACJ,GAAG,EAAE,MAAM;IAOvB,qCAAqC;IACrC,MAAM,CAAC,MAAM,IAAI,KAAK;IAStB,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK;IAyBlC,WAAW,IAAI,MAAM;IAUrB,OAAO,CAAC,oBAAoB;IAY5B,OAAO,CAAC,oBAAoB;IAkB5B;;;;;OAKG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAWpC;;;;;OAKG;IACH,aAAa,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM;IAYzC,aAAa,IAAI,KAAK;CAQvB"}
@@ -42,10 +42,6 @@ export class UIColors {
42
42
  oldStyles.addVariable(`--config-${name}-color-rgb`, `${r}, ${g}, ${b}`);
43
43
  if (name.startsWith("accent")) {
44
44
  newStyles.addVariable(`--system-${name}-color`, value.slice(0, 7));
45
- newStyles.addVariable(`--system-${name}-color-rgb`, `${r}, ${g}, ${b}`);
46
- const complement = color.complementary();
47
- newStyles.addVariable(`--system-${name}-complementary-color`, complement.toHexString());
48
- newStyles.addVariable(`--system-${name}-complementary-color-rgb`, `${complement.r}, ${complement.g}, ${complement.b}`);
49
45
  }
50
46
  }
51
47
  oldStyles.applyToDocument();
@@ -128,8 +124,6 @@ export class Color {
128
124
  * the name will be parsed to lower kebab case and remove non-alphanumeric characters
129
125
  * this will create some css variables as:\
130
126
  * `--color-{name}` -> #RRGGBBAA\
131
- * `--color-{name}-rgb` -> R, G, B
132
- * `--color-{name}-rgba` -> R, G, B, A
133
127
  */
134
128
  setAsCssVariable(name) {
135
129
  const parsedName = name
@@ -138,8 +132,6 @@ export class Color {
138
132
  .toLowerCase();
139
133
  this.insertIntoStyleSheet({
140
134
  [`--color-${parsedName}`]: this.toHexString(),
141
- [`--color-${parsedName}-rgb`]: `${this.r}, ${this.g}, ${this.b}`,
142
- [`--color-${parsedName}-rgba`]: `${this.r}, ${this.g}, ${this.b}, ${this.a}`,
143
135
  });
144
136
  }
145
137
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seelen-ui/lib",
3
- "version": "2.5.3",
3
+ "version": "2.5.8",
4
4
  "description": "Seelen UI Library for Widgets",
5
5
  "repository": {
6
6
  "type": "git",
@@ -6,9 +6,17 @@ export type FancyToolbarSettings = {
6
6
  */
7
7
  enabled: boolean;
8
8
  /**
9
- * height of the fancy toolbar
9
+ * item size in px
10
10
  */
11
- height: number;
11
+ itemSize: number;
12
+ /**
13
+ * Toolbar margin in px
14
+ */
15
+ margin: number;
16
+ /**
17
+ * Toolbar padding in px
18
+ */
19
+ padding: number;
12
20
  /**
13
21
  * position of the toolbar
14
22
  */
@@ -1 +1 @@
1
- {"version":3,"file":"FancyToolbarSettings.d.ts","sourceRoot":"","sources":["../../../src/gen/types/FancyToolbarSettings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,MAAM,oBAAoB,GAAG;IACnC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CAAE,CAAC"}
1
+ {"version":3,"file":"FancyToolbarSettings.d.ts","sourceRoot":"","sources":["../../../src/gen/types/FancyToolbarSettings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAE9C,MAAM,MAAM,oBAAoB,GAAG;IACnC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;CAAE,CAAC"}
@@ -1,7 +1,6 @@
1
+ import type { OldWegItemSubtype } from "./OldWegItemSubtype.js";
1
2
  import type { RelaunchArguments } from "./RelaunchArguments.js";
2
- import type { WegAppGroupItem } from "./WegAppGroupItem.js";
3
- import type { WegItemSubtype } from "./WegItemSubtype.js";
4
- export type PinnedWegItemData = {
3
+ export type OldWegItemData = {
5
4
  /**
6
5
  * internal UUID to differentiate items
7
6
  */
@@ -9,13 +8,13 @@ export type PinnedWegItemData = {
9
8
  /**
10
9
  * Subtype of the item (mandatory, but is optional for backward compatibility)
11
10
  */
12
- subtype: WegItemSubtype;
11
+ subtype: OldWegItemSubtype;
13
12
  /**
14
13
  * Application user model id.
15
14
  */
16
15
  umid: string | null;
17
16
  /**
18
- * path to file, forder or program.
17
+ * path to file, folder or program.
19
18
  */
20
19
  path: string;
21
20
  /**
@@ -34,13 +33,9 @@ export type PinnedWegItemData = {
34
33
  * display name of the item
35
34
  */
36
35
  displayName: string;
37
- /**
38
- * Window handles in the app group, in case of pinned file/dir always will be empty
39
- */
40
- windows: Array<WegAppGroupItem>;
41
36
  /**
42
37
  * This intention is to prevent pinned state change, when this is neccesary
43
38
  */
44
39
  pinDisabled: boolean;
45
40
  };
46
- //# sourceMappingURL=PinnedWegItemData.d.ts.map
41
+ //# sourceMappingURL=OldWegItemData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OldWegItemData.d.ts","sourceRoot":"","sources":["../../../src/gen/types/OldWegItemData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,MAAM,cAAc,GAAG;IAC7B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,OAAO,EAAE,iBAAiB,CAAC;IAC3B;;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,YAAY,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACvC;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;CAAE,CAAC"}
@@ -1,7 +1,7 @@
1
- export declare enum WegItemSubtype {
1
+ export declare enum OldWegItemSubtype {
2
2
  "File" = "File",
3
3
  "Folder" = "Folder",
4
4
  "App" = "App",
5
5
  "UnknownV2_1_6" = "UnknownV2_1_6"
6
6
  }
7
- //# sourceMappingURL=WegItemSubtype.d.ts.map
7
+ //# sourceMappingURL=OldWegItemSubtype.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OldWegItemSubtype.d.ts","sourceRoot":"","sources":["../../../src/gen/types/OldWegItemSubtype.ts"],"names":[],"mappings":"AAEA,oBAAY,iBAAiB;IAAG,MAAM,SAAS;IAAE,QAAQ,WAAW;IAAE,KAAK,QAAQ;IAAE,eAAe,kBAAkB;CAAE"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.OldWegItemSubtype = void 0;
5
+ var OldWegItemSubtype;
6
+ (function (OldWegItemSubtype) {
7
+ OldWegItemSubtype["File"] = "File";
8
+ OldWegItemSubtype["Folder"] = "Folder";
9
+ OldWegItemSubtype["App"] = "App";
10
+ OldWegItemSubtype["UnknownV2_1_6"] = "UnknownV2_1_6";
11
+ })(OldWegItemSubtype || (exports.OldWegItemSubtype = OldWegItemSubtype = {}));
@@ -0,0 +1,20 @@
1
+ import type { RelaunchArguments } from "./RelaunchArguments.js";
2
+ export type Relaunch = {
3
+ /**
4
+ * program to be executed
5
+ */
6
+ command: string;
7
+ /**
8
+ * arguments to be passed to the relaunch program
9
+ */
10
+ args: RelaunchArguments | null;
11
+ /**
12
+ * path where ejecute the relaunch command
13
+ */
14
+ workingDir: string | null;
15
+ /**
16
+ * custom relaunch/window icon
17
+ */
18
+ icon: string | null;
19
+ };
20
+ //# sourceMappingURL=Relaunch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Relaunch.d.ts","sourceRoot":"","sources":["../../../src/gen/types/Relaunch.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAEhE,MAAM,MAAM,QAAQ,GAAG;IACvB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,IAAI,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC/B;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAAE,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import type { ResourceAttribute } from "./ResourceAttribute.js";
2
- import type { ResourceId } from "./ResourceId.js";
3
2
  import type { ResourceKind } from "./ResourceKind.js";
4
3
  import type { ResourceMetadata } from "./ResourceMetadata.js";
4
+ import type { ResourcePendingUpdate } from "./ResourcePendingUpdate.js";
5
5
  import type { ResourceStatus } from "./ResourceStatus.js";
6
+ import type { Slug } from "./Slug.js";
6
7
  /**
7
8
  * Represents a resource in the cloud, uploaded by a user
8
9
  */
@@ -20,11 +21,9 @@ export type Resource = {
20
21
  */
21
22
  creatorId: string;
22
23
  /**
23
- * Visual id composed of creator username and resource name.\
24
- * Warning: as username and resource name could be changed, this id is not stable.\
25
- * Use it for display purposes only
24
+ * slug to shown in the url, could be changed.
26
25
  */
27
- friendlyId: ResourceId;
26
+ slug: Slug;
28
27
  kind: ResourceKind;
29
28
  metadata: ResourceMetadata;
30
29
  createdAt: string;
@@ -65,5 +64,13 @@ export type Resource = {
65
64
  * number of downloads
66
65
  */
67
66
  downloads: number;
67
+ /**
68
+ * Pending update waiting for reviewer approval (only present on Published resources)
69
+ */
70
+ pendingUpdate: ResourcePendingUpdate | null;
71
+ /**
72
+ * Reason a pending update was rejected (visible to creator after rejection)
73
+ */
74
+ rejectedPendingReason: string | null;
68
75
  };
69
76
  //# sourceMappingURL=Resource.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Resource.d.ts","sourceRoot":"","sources":["../../../src/gen/types/Resource.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAA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,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEtC;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACvB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,IAAI,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,EAAE,gBAAgB,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IACjG;;OAEG;IACH,MAAM,EAAE,cAAc,CAAC;IACvB;;OAEG;IACH,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;OAEG;IACH,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACrC;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,aAAa,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC5C;;OAEG;IACH,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;CAAE,CAAC"}
@@ -31,6 +31,10 @@ export type ResourceMetadata = {
31
31
  * match the current app version, the resource will be shown with a warning message
32
32
  */
33
33
  appTargetVersion: [number, number, number] | null;
34
+ /**
35
+ * Whether the resource is premium content that requires active subscription to access.
36
+ */
37
+ premium: boolean;
34
38
  /**
35
39
  * Extra metadata for the resource
36
40
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceMetadata.d.ts","sourceRoot":"","sources":["../../../src/gen/types/ResourceMetadata.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,MAAM,gBAAgB,GAAG;IAC/B;;OAEG;IACH,WAAW,EAAE,YAAY,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,YAAY,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpB;;;;OAIG;IACH,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAClD;;OAEG;IACH,MAAM,EAAE;SAAG,GAAG,IAAI,MAAM,GAAG,MAAM;KAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IACtF;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC;CAAE,CAAC"}
1
+ {"version":3,"file":"ResourceMetadata.d.ts","sourceRoot":"","sources":["../../../src/gen/types/ResourceMetadata.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,MAAM,gBAAgB,GAAG;IAC/B;;OAEG;IACH,WAAW,EAAE,YAAY,CAAC;IAC1B;;OAEG;IACH,WAAW,EAAE,YAAY,CAAC;IAC1B;;OAEG;IACH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB;;OAEG;IACH,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACpB;;;;OAIG;IACH,gBAAgB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAClD;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE;SAAG,GAAG,IAAI,MAAM,GAAG,MAAM;KAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,OAAO,CAAC;IACtF;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC;CAAE,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { ResourceMetadata } from "./ResourceMetadata.js";
2
+ /**
3
+ * Represents a pending update submitted by the creator of a Published resource.
4
+ * The live resource remains unchanged until the update is approved or rejected.
5
+ */
6
+ export type ResourcePendingUpdate = {
7
+ /**
8
+ * Proposed new metadata (applied to the resource on approve)
9
+ */
10
+ metadata: ResourceMetadata;
11
+ /**
12
+ * ID of the pending resource data document in the type-specific collection
13
+ */
14
+ dataId: string;
15
+ /**
16
+ * When the pending update was submitted
17
+ */
18
+ updatedAt: string;
19
+ };
20
+ //# sourceMappingURL=ResourcePendingUpdate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResourcePendingUpdate.d.ts","sourceRoot":"","sources":["../../../src/gen/types/ResourcePendingUpdate.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG;IACpC;;OAEG;IACH,QAAQ,EAAE,gBAAgB,CAAC;IAC3B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CAAE,CAAC"}