@seelen-ui/lib 2.5.3 → 2.5.8-next.2604111036

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 (237) hide show
  1. package/esm/gen/types/ClipboardData.d.ts +15 -0
  2. package/esm/gen/types/ClipboardData.d.ts.map +1 -0
  3. package/esm/gen/types/ClipboardEntry.d.ts +24 -0
  4. package/esm/gen/types/ClipboardEntry.d.ts.map +1 -0
  5. package/esm/gen/types/ClipboardEntryContent.d.ts +16 -0
  6. package/esm/gen/types/ClipboardEntryContent.d.ts.map +1 -0
  7. package/esm/gen/types/FancyToolbarSettings.d.ts +10 -2
  8. package/esm/gen/types/FancyToolbarSettings.d.ts.map +1 -1
  9. package/esm/gen/types/{PinnedWegItemData.d.ts → OldWegItemData.d.ts} +5 -10
  10. package/esm/gen/types/OldWegItemData.d.ts.map +1 -0
  11. package/esm/gen/types/{WegItemSubtype.d.ts → OldWegItemSubtype.d.ts} +2 -2
  12. package/esm/gen/types/OldWegItemSubtype.d.ts.map +1 -0
  13. package/esm/gen/types/OldWegItemSubtype.js +8 -0
  14. package/esm/gen/types/Relaunch.d.ts +20 -0
  15. package/esm/gen/types/Relaunch.d.ts.map +1 -0
  16. package/esm/gen/types/Relaunch.js +1 -0
  17. package/esm/gen/types/Resource.d.ts +12 -5
  18. package/esm/gen/types/Resource.d.ts.map +1 -1
  19. package/esm/gen/types/ResourceId.d.ts +6 -2
  20. package/esm/gen/types/ResourceId.d.ts.map +1 -1
  21. package/esm/gen/types/ResourceMetadata.d.ts +4 -0
  22. package/esm/gen/types/ResourceMetadata.d.ts.map +1 -1
  23. package/esm/gen/types/ResourcePendingUpdate.d.ts +20 -0
  24. package/esm/gen/types/ResourcePendingUpdate.d.ts.map +1 -0
  25. package/esm/gen/types/ResourcePendingUpdate.js +1 -0
  26. package/esm/gen/types/SeelenCommandArgument.d.ts +26 -2
  27. package/esm/gen/types/SeelenCommandArgument.d.ts.map +1 -1
  28. package/esm/gen/types/SeelenCommandClipboardDeleteEntryArgs.d.ts +4 -0
  29. package/esm/gen/types/SeelenCommandClipboardDeleteEntryArgs.d.ts.map +1 -0
  30. package/esm/gen/types/SeelenCommandClipboardDeleteEntryArgs.js +2 -0
  31. package/esm/gen/types/SeelenCommandClipboardPasteArgs.d.ts +4 -0
  32. package/esm/gen/types/SeelenCommandClipboardPasteArgs.d.ts.map +1 -0
  33. package/esm/gen/types/SeelenCommandClipboardPasteArgs.js +2 -0
  34. package/esm/gen/types/SeelenCommandClipboardSetContentArgs.d.ts +4 -0
  35. package/esm/gen/types/SeelenCommandClipboardSetContentArgs.d.ts.map +1 -0
  36. package/esm/gen/types/SeelenCommandClipboardSetContentArgs.js +2 -0
  37. package/esm/gen/types/SeelenCommandReturn.d.ts +25 -0
  38. package/esm/gen/types/SeelenCommandReturn.d.ts.map +1 -1
  39. package/esm/gen/types/SeelenEventPayload.d.ts +13 -3
  40. package/esm/gen/types/SeelenEventPayload.d.ts.map +1 -1
  41. package/esm/gen/types/SeelenSession.d.ts +15 -0
  42. package/esm/gen/types/SeelenSession.d.ts.map +1 -0
  43. package/esm/gen/types/SeelenSession.js +2 -0
  44. package/esm/gen/types/SeelenWegSettings.d.ts +4 -0
  45. package/esm/gen/types/SeelenWegSettings.d.ts.map +1 -1
  46. package/esm/gen/types/Settings.d.ts +9 -0
  47. package/esm/gen/types/Settings.d.ts.map +1 -1
  48. package/esm/gen/types/SluHotkeyAction.d.ts +2 -0
  49. package/esm/gen/types/SluHotkeyAction.d.ts.map +1 -1
  50. package/esm/gen/types/Slug.d.ts +9 -0
  51. package/esm/gen/types/Slug.d.ts.map +1 -0
  52. package/esm/gen/types/Slug.js +2 -0
  53. package/esm/gen/types/TrashBinInfo.d.ts +11 -0
  54. package/esm/gen/types/TrashBinInfo.d.ts.map +1 -0
  55. package/esm/gen/types/TrashBinInfo.js +2 -0
  56. package/esm/gen/types/UserAppWindow.d.ts +9 -0
  57. package/esm/gen/types/UserAppWindow.d.ts.map +1 -1
  58. package/esm/gen/types/WegItem.d.ts +9 -5
  59. package/esm/gen/types/WegItem.d.ts.map +1 -1
  60. package/esm/gen/types/WegItemData.d.ts +32 -0
  61. package/esm/gen/types/WegItemData.d.ts.map +1 -0
  62. package/esm/gen/types/WegItemData.js +1 -0
  63. package/esm/gen/types/WegItemType.d.ts +3 -3
  64. package/esm/gen/types/WegItemType.d.ts.map +1 -1
  65. package/esm/gen/types/WegItemType.js +2 -2
  66. package/esm/gen/types/mod.d.ts +252 -242
  67. package/esm/gen/types/mod.d.ts.map +1 -1
  68. package/esm/gen/types/mod.js +252 -242
  69. package/esm/src/handlers/commands.d.ts +12 -1
  70. package/esm/src/handlers/commands.d.ts.map +1 -1
  71. package/esm/src/handlers/commands.js +11 -0
  72. package/esm/src/handlers/events.d.ts +6 -3
  73. package/esm/src/handlers/events.d.ts.map +1 -1
  74. package/esm/src/handlers/events.js +5 -2
  75. package/esm/src/state/icon_pack.d.ts.map +1 -1
  76. package/esm/src/state/icon_pack.js +11 -2
  77. package/esm/src/state/mod.d.ts +0 -2
  78. package/esm/src/state/mod.d.ts.map +1 -1
  79. package/esm/src/state/mod.js +0 -2
  80. package/esm/src/state/theme/theming.d.ts +1 -0
  81. package/esm/src/state/theme/theming.d.ts.map +1 -1
  82. package/esm/src/state/theme/theming.js +21 -1
  83. package/esm/src/state/widget/interfaces.d.ts +17 -0
  84. package/esm/src/state/widget/interfaces.d.ts.map +1 -1
  85. package/esm/src/state/widget/mod.d.ts +15 -9
  86. package/esm/src/state/widget/mod.d.ts.map +1 -1
  87. package/esm/src/state/widget/mod.js +87 -94
  88. package/esm/src/state/widget/performance.d.ts +2 -0
  89. package/esm/src/state/widget/performance.d.ts.map +1 -0
  90. package/esm/src/state/widget/performance.js +18 -0
  91. package/esm/src/state/widget/sizing.d.ts +14 -3
  92. package/esm/src/state/widget/sizing.d.ts.map +1 -1
  93. package/esm/src/state/widget/sizing.js +61 -18
  94. package/esm/src/system_state/ui_colors.d.ts +0 -2
  95. package/esm/src/system_state/ui_colors.d.ts.map +1 -1
  96. package/esm/src/system_state/ui_colors.js +0 -8
  97. package/esm/src/utils/async.d.ts +12 -0
  98. package/esm/src/utils/async.d.ts.map +1 -1
  99. package/esm/src/utils/async.js +46 -0
  100. package/esm/src/utils/mod.d.ts +1 -0
  101. package/esm/src/utils/mod.d.ts.map +1 -1
  102. package/esm/src/utils/mod.js +4 -0
  103. package/package.json +1 -1
  104. package/script/gen/types/ClipboardData.d.ts +15 -0
  105. package/script/gen/types/ClipboardData.d.ts.map +1 -0
  106. package/script/gen/types/ClipboardEntry.d.ts +24 -0
  107. package/script/gen/types/ClipboardEntry.d.ts.map +1 -0
  108. package/script/gen/types/ClipboardEntryContent.d.ts +16 -0
  109. package/script/gen/types/ClipboardEntryContent.d.ts.map +1 -0
  110. package/script/gen/types/FancyToolbarSettings.d.ts +10 -2
  111. package/script/gen/types/FancyToolbarSettings.d.ts.map +1 -1
  112. package/script/gen/types/{PinnedWegItemData.d.ts → OldWegItemData.d.ts} +5 -10
  113. package/script/gen/types/OldWegItemData.d.ts.map +1 -0
  114. package/script/gen/types/{WegItemSubtype.d.ts → OldWegItemSubtype.d.ts} +2 -2
  115. package/script/gen/types/OldWegItemSubtype.d.ts.map +1 -0
  116. package/script/gen/types/OldWegItemSubtype.js +11 -0
  117. package/script/gen/types/Relaunch.d.ts +20 -0
  118. package/script/gen/types/Relaunch.d.ts.map +1 -0
  119. package/script/gen/types/Relaunch.js +2 -0
  120. package/script/gen/types/Resource.d.ts +12 -5
  121. package/script/gen/types/Resource.d.ts.map +1 -1
  122. package/script/gen/types/ResourceId.d.ts +6 -2
  123. package/script/gen/types/ResourceId.d.ts.map +1 -1
  124. package/script/gen/types/ResourceMetadata.d.ts +4 -0
  125. package/script/gen/types/ResourceMetadata.d.ts.map +1 -1
  126. package/script/gen/types/ResourcePendingUpdate.d.ts +20 -0
  127. package/script/gen/types/ResourcePendingUpdate.d.ts.map +1 -0
  128. package/script/gen/types/ResourcePendingUpdate.js +2 -0
  129. package/script/gen/types/SeelenCommandArgument.d.ts +26 -2
  130. package/script/gen/types/SeelenCommandArgument.d.ts.map +1 -1
  131. package/script/gen/types/SeelenCommandClipboardDeleteEntryArgs.d.ts +4 -0
  132. package/script/gen/types/SeelenCommandClipboardDeleteEntryArgs.d.ts.map +1 -0
  133. package/script/gen/types/SeelenCommandClipboardDeleteEntryArgs.js +3 -0
  134. package/script/gen/types/SeelenCommandClipboardPasteArgs.d.ts +4 -0
  135. package/script/gen/types/SeelenCommandClipboardPasteArgs.d.ts.map +1 -0
  136. package/script/gen/types/SeelenCommandClipboardPasteArgs.js +3 -0
  137. package/script/gen/types/SeelenCommandClipboardSetContentArgs.d.ts +4 -0
  138. package/script/gen/types/SeelenCommandClipboardSetContentArgs.d.ts.map +1 -0
  139. package/script/gen/types/SeelenCommandClipboardSetContentArgs.js +3 -0
  140. package/script/gen/types/SeelenCommandReturn.d.ts +25 -0
  141. package/script/gen/types/SeelenCommandReturn.d.ts.map +1 -1
  142. package/script/gen/types/SeelenEventPayload.d.ts +13 -3
  143. package/script/gen/types/SeelenEventPayload.d.ts.map +1 -1
  144. package/script/gen/types/SeelenSession.d.ts +15 -0
  145. package/script/gen/types/SeelenSession.d.ts.map +1 -0
  146. package/script/gen/types/SeelenSession.js +3 -0
  147. package/script/gen/types/SeelenWegSettings.d.ts +4 -0
  148. package/script/gen/types/SeelenWegSettings.d.ts.map +1 -1
  149. package/script/gen/types/Settings.d.ts +9 -0
  150. package/script/gen/types/Settings.d.ts.map +1 -1
  151. package/script/gen/types/SluHotkeyAction.d.ts +2 -0
  152. package/script/gen/types/SluHotkeyAction.d.ts.map +1 -1
  153. package/script/gen/types/Slug.d.ts +9 -0
  154. package/script/gen/types/Slug.d.ts.map +1 -0
  155. package/script/gen/types/Slug.js +3 -0
  156. package/script/gen/types/TrashBinInfo.d.ts +11 -0
  157. package/script/gen/types/TrashBinInfo.d.ts.map +1 -0
  158. package/script/gen/types/TrashBinInfo.js +3 -0
  159. package/script/gen/types/UserAppWindow.d.ts +9 -0
  160. package/script/gen/types/UserAppWindow.d.ts.map +1 -1
  161. package/script/gen/types/WegItem.d.ts +9 -5
  162. package/script/gen/types/WegItem.d.ts.map +1 -1
  163. package/script/gen/types/WegItemData.d.ts +32 -0
  164. package/script/gen/types/WegItemData.d.ts.map +1 -0
  165. package/script/gen/types/WegItemData.js +2 -0
  166. package/script/gen/types/WegItemType.d.ts +3 -3
  167. package/script/gen/types/WegItemType.d.ts.map +1 -1
  168. package/script/gen/types/WegItemType.js +2 -2
  169. package/script/gen/types/mod.d.ts +252 -242
  170. package/script/gen/types/mod.d.ts.map +1 -1
  171. package/script/gen/types/mod.js +252 -242
  172. package/script/src/handlers/commands.d.ts +12 -1
  173. package/script/src/handlers/commands.d.ts.map +1 -1
  174. package/script/src/handlers/commands.js +11 -0
  175. package/script/src/handlers/events.d.ts +6 -3
  176. package/script/src/handlers/events.d.ts.map +1 -1
  177. package/script/src/handlers/events.js +5 -2
  178. package/script/src/state/icon_pack.d.ts.map +1 -1
  179. package/script/src/state/icon_pack.js +11 -2
  180. package/script/src/state/mod.d.ts +0 -2
  181. package/script/src/state/mod.d.ts.map +1 -1
  182. package/script/src/state/mod.js +0 -2
  183. package/script/src/state/theme/theming.d.ts +1 -0
  184. package/script/src/state/theme/theming.d.ts.map +1 -1
  185. package/script/src/state/theme/theming.js +22 -1
  186. package/script/src/state/widget/interfaces.d.ts +17 -0
  187. package/script/src/state/widget/interfaces.d.ts.map +1 -1
  188. package/script/src/state/widget/mod.d.ts +15 -9
  189. package/script/src/state/widget/mod.d.ts.map +1 -1
  190. package/script/src/state/widget/mod.js +86 -93
  191. package/script/src/state/widget/performance.d.ts +2 -0
  192. package/script/src/state/widget/performance.d.ts.map +1 -0
  193. package/script/src/state/widget/performance.js +21 -0
  194. package/script/src/state/widget/sizing.d.ts +14 -3
  195. package/script/src/state/widget/sizing.d.ts.map +1 -1
  196. package/script/src/state/widget/sizing.js +62 -19
  197. package/script/src/system_state/ui_colors.d.ts +0 -2
  198. package/script/src/system_state/ui_colors.d.ts.map +1 -1
  199. package/script/src/system_state/ui_colors.js +0 -8
  200. package/script/src/utils/async.d.ts +12 -0
  201. package/script/src/utils/async.d.ts.map +1 -1
  202. package/script/src/utils/async.js +49 -0
  203. package/script/src/utils/mod.d.ts +1 -0
  204. package/script/src/utils/mod.d.ts.map +1 -1
  205. package/script/src/utils/mod.js +5 -0
  206. package/esm/gen/types/PinnedWegItemData.d.ts.map +0 -1
  207. package/esm/gen/types/SeelenCommandStateGetWegItemsArgs.d.ts +0 -5
  208. package/esm/gen/types/SeelenCommandStateGetWegItemsArgs.d.ts.map +0 -1
  209. package/esm/gen/types/WegAppGroupItem.d.ts +0 -12
  210. package/esm/gen/types/WegAppGroupItem.d.ts.map +0 -1
  211. package/esm/gen/types/WegItemSubtype.d.ts.map +0 -1
  212. package/esm/gen/types/WegItemSubtype.js +0 -8
  213. package/esm/src/state/weg_items.d.ts +0 -14
  214. package/esm/src/state/weg_items.d.ts.map +0 -1
  215. package/esm/src/state/weg_items.js +0 -23
  216. package/esm/src/state/wm_layout.d.ts +0 -2
  217. package/esm/src/state/wm_layout.d.ts.map +0 -1
  218. package/script/gen/types/PinnedWegItemData.d.ts.map +0 -1
  219. package/script/gen/types/SeelenCommandStateGetWegItemsArgs.d.ts +0 -5
  220. package/script/gen/types/SeelenCommandStateGetWegItemsArgs.d.ts.map +0 -1
  221. package/script/gen/types/WegAppGroupItem.d.ts +0 -12
  222. package/script/gen/types/WegAppGroupItem.d.ts.map +0 -1
  223. package/script/gen/types/WegItemSubtype.d.ts.map +0 -1
  224. package/script/gen/types/WegItemSubtype.js +0 -11
  225. package/script/src/state/weg_items.d.ts +0 -14
  226. package/script/src/state/weg_items.d.ts.map +0 -1
  227. package/script/src/state/weg_items.js +0 -27
  228. package/script/src/state/wm_layout.d.ts +0 -2
  229. package/script/src/state/wm_layout.d.ts.map +0 -1
  230. /package/esm/gen/types/{PinnedWegItemData.js → ClipboardData.js} +0 -0
  231. /package/esm/gen/types/{SeelenCommandStateGetWegItemsArgs.js → ClipboardEntry.js} +0 -0
  232. /package/esm/gen/types/{WegAppGroupItem.js → ClipboardEntryContent.js} +0 -0
  233. /package/esm/{src/state/wm_layout.js → gen/types/OldWegItemData.js} +0 -0
  234. /package/script/gen/types/{PinnedWegItemData.js → ClipboardData.js} +0 -0
  235. /package/script/gen/types/{SeelenCommandStateGetWegItemsArgs.js → ClipboardEntry.js} +0 -0
  236. /package/script/gen/types/{WegAppGroupItem.js → ClipboardEntryContent.js} +0 -0
  237. /package/script/{src/state/wm_layout.js → gen/types/OldWegItemData.js} +0 -0
@@ -1,21 +1,57 @@
1
- import { PhysicalSize } from "@tauri-apps/api/dpi";
2
1
  import { Alignment } from "../../../gen/types/mod.js";
2
+ import { Mutex } from "../../utils/async.js";
3
+ import { fitIntoMonitor } from "./positioning.js";
4
+ class OptimisiticFrame {
5
+ x = 0;
6
+ y = 0;
7
+ width = 0;
8
+ height = 0;
9
+ async init(widget) {
10
+ const { width, height } = await widget.window.outerSize();
11
+ const { x, y } = await widget.window.outerPosition();
12
+ this.width = width;
13
+ this.height = height;
14
+ this.x = x;
15
+ this.y = y;
16
+ widget.window.onResized((e) => {
17
+ OPTIMISTIC_FRAME.runExclusive((ref) => {
18
+ ref.width = e.payload.width;
19
+ ref.height = e.payload.height;
20
+ });
21
+ });
22
+ widget.window.onMoved((e) => {
23
+ OPTIMISTIC_FRAME.runExclusive((ref) => {
24
+ ref.x = e.payload.x;
25
+ ref.y = e.payload.y;
26
+ });
27
+ });
28
+ }
29
+ }
30
+ export const OPTIMISTIC_FRAME = new Mutex(new OptimisiticFrame());
3
31
  export class WidgetAutoSizer {
4
32
  widget;
5
33
  element;
34
+ fitOnScreen;
6
35
  /** From which side the widget will grow */
7
- originX = Alignment.Start;
36
+ originX;
8
37
  /** From which side the widget will grow */
9
- originY = Alignment.Start;
10
- constructor(widget, element) {
38
+ originY;
39
+ constructor(widget, element, fitOnScreen) {
11
40
  this.widget = widget;
12
41
  this.element = element;
42
+ this.fitOnScreen = fitOnScreen;
13
43
  this.execute = this.execute.bind(this);
14
44
  this.setup();
15
45
  }
16
46
  setup() {
17
47
  // Disable resizing by the user
18
- this.widget.webview.setResizable(false);
48
+ this.widget.window.setResizable(false);
49
+ this.widget.onTrigger(({ alignX, alignY }) => {
50
+ OPTIMISTIC_FRAME.runExclusive(() => {
51
+ this.originX = alignX;
52
+ this.originY = alignY;
53
+ });
54
+ });
19
55
  const observer = new ResizeObserver(this.execute);
20
56
  observer.observe(this.element, {
21
57
  box: "border-box",
@@ -25,8 +61,9 @@ export class WidgetAutoSizer {
25
61
  };
26
62
  }
27
63
  async execute() {
28
- const { x, y, width, height } = this.widget.frame;
29
- const frame = {
64
+ const guard = await OPTIMISTIC_FRAME.acquire();
65
+ const { x, y, width, height } = guard.value;
66
+ let frame = {
30
67
  x,
31
68
  y,
32
69
  width: Math.ceil(this.element.scrollWidth * globalThis.window.devicePixelRatio),
@@ -36,9 +73,12 @@ export class WidgetAutoSizer {
36
73
  const heightDiff = frame.height - height;
37
74
  // Only update if the difference is more than 1px (avoid infinite loops from decimal differences)
38
75
  if (widthDiff === 0 && heightDiff === 0) {
76
+ guard.release();
39
77
  return;
40
78
  }
41
- console.trace(`Auto resize from ${width}x${height} to ${frame.width}x${frame.height}`);
79
+ /* console.debug(
80
+ `Auto resizing from ${width}x${height} to ${frame.width}x${frame.height} using ${this.originX}/${this.originY} origin`,
81
+ ); */
42
82
  if (this.originX === Alignment.Center) {
43
83
  frame.x -= widthDiff / 2;
44
84
  }
@@ -51,16 +91,19 @@ export class WidgetAutoSizer {
51
91
  else if (this.originY === Alignment.End) {
52
92
  frame.y -= heightDiff;
53
93
  }
54
- // only update size no position on this case
55
- if (frame.x === x && frame.y === y) {
56
- await this.widget.webview.setSize(new PhysicalSize(frame.width, frame.height));
57
- return;
94
+ if (this.fitOnScreen) {
95
+ frame = fitIntoMonitor(frame);
96
+ }
97
+ try {
98
+ await this.widget.__unsafe_setPosition({
99
+ left: frame.x,
100
+ top: frame.y,
101
+ right: frame.x + frame.width,
102
+ bottom: frame.y + frame.height,
103
+ }, guard.value);
104
+ }
105
+ finally {
106
+ guard.release();
58
107
  }
59
- await this.widget.setPosition({
60
- left: frame.x,
61
- top: frame.y,
62
- right: frame.x + frame.width,
63
- bottom: frame.y + frame.height,
64
- });
65
108
  }
66
109
  }
@@ -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,G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AC,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
  /**
@@ -5,4 +5,16 @@ export interface DebouncedFunction<T extends (...args: any[]) => any> {
5
5
  pending(): boolean;
6
6
  }
7
7
  export declare function debounce<T extends (...args: any[]) => any>(fn: T, delay: number): DebouncedFunction<T>;
8
+ export declare class Mutex<T> {
9
+ private _rawValue;
10
+ constructor(_rawValue: T);
11
+ private lock;
12
+ acquire(): Promise<Guard<T>>;
13
+ runExclusive<U>(fn: (v: T) => U): Promise<U>;
14
+ }
15
+ export declare class Guard<T> {
16
+ value: T;
17
+ release: () => void;
18
+ constructor(value: T, release: () => void);
19
+ }
8
20
  //# sourceMappingURL=async.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../src/src/utils/async.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG;IAClE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC/B,MAAM,IAAI,IAAI,CAAC;IACf,KAAK,IAAI,IAAI,CAAC;IACd,OAAO,IAAI,OAAO,CAAC;CACpB;AAGD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,EAAE,EAAE,CAAC,EACL,KAAK,EAAE,MAAM,GACZ,iBAAiB,CAAC,CAAC,CAAC,CA6CtB"}
1
+ {"version":3,"file":"async.d.ts","sourceRoot":"","sources":["../../../src/src/utils/async.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG;IAClE,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IAC/B,MAAM,IAAI,IAAI,CAAC;IACf,KAAK,IAAI,IAAI,CAAC;IACd,OAAO,IAAI,OAAO,CAAC;CACpB;AAGD,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,EACxD,EAAE,EAAE,CAAC,EACL,KAAK,EAAE,MAAM,GACZ,iBAAiB,CAAC,CAAC,CAAC,CA6CtB;AAED,qBAAa,KAAK,CAAC,CAAC;IACN,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,CAAC;IAEhC,OAAO,CAAC,IAAI,CAII;IAEV,OAAO,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IA0B5B,YAAY,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;CAQnD;AAED,qBAAa,KAAK,CAAC,CAAC;IAET,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,MAAM,IAAI;gBADnB,KAAK,EAAE,CAAC,EACR,OAAO,EAAE,MAAM,IAAI;CAE7B"}
@@ -37,3 +37,49 @@ export function debounce(fn, delay) {
37
37
  };
38
38
  return debounced;
39
39
  }
40
+ export class Mutex {
41
+ _rawValue;
42
+ constructor(_rawValue) {
43
+ this._rawValue = _rawValue;
44
+ }
45
+ lock = null;
46
+ async acquire() {
47
+ if (this.lock) {
48
+ await this.lock.__promise;
49
+ }
50
+ // deno-lint-ignore no-explicit-any
51
+ let __resolve;
52
+ // deno-lint-ignore no-explicit-any
53
+ let __reject;
54
+ const __promise = new Promise((resolve, reject) => {
55
+ __resolve = resolve;
56
+ __reject = reject;
57
+ });
58
+ this.lock = {
59
+ __promise,
60
+ __resolve,
61
+ __reject,
62
+ };
63
+ return new Guard(this._rawValue, () => {
64
+ this.lock = null;
65
+ __resolve();
66
+ });
67
+ }
68
+ async runExclusive(fn) {
69
+ const guard = await this.acquire();
70
+ try {
71
+ return await fn(guard.value);
72
+ }
73
+ finally {
74
+ guard.release();
75
+ }
76
+ }
77
+ }
78
+ export class Guard {
79
+ value;
80
+ release;
81
+ constructor(value, release) {
82
+ this.value = value;
83
+ this.release = release;
84
+ }
85
+ }
@@ -4,4 +4,5 @@ export declare class Rect {
4
4
  right: number;
5
5
  bottom: number;
6
6
  }
7
+ export declare function isSeelenUIRuntime(): boolean;
7
8
  //# sourceMappingURL=mod.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/utils/mod.ts"],"names":[],"mappings":"AAAA,qBAAa,IAAI;IACf,IAAI,SAAK;IACT,GAAG,SAAK;IACR,KAAK,SAAK;IACV,MAAM,SAAK;CACZ"}
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../src/src/utils/mod.ts"],"names":[],"mappings":"AAAA,qBAAa,IAAI;IACf,IAAI,SAAK;IACT,GAAG,SAAK;IACR,KAAK,SAAK;IACV,MAAM,SAAK;CACZ;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAG3C"}
@@ -4,3 +4,7 @@ export class Rect {
4
4
  right = 0;
5
5
  bottom = 0;
6
6
  }
7
+ export function isSeelenUIRuntime() {
8
+ // deno-lint-ignore no-explicit-any
9
+ return !!globalThis.window.__SLU_WIDGET;
10
+ }
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-next.2604111036",
4
4
  "description": "Seelen UI Library for Widgets",
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1,15 @@
1
+ import type { ClipboardEntry } from "./ClipboardEntry.js";
2
+ /**
3
+ * Full clipboard state — emitted as a single payload on every relevant change.
4
+ */
5
+ export type ClipboardData = {
6
+ /**
7
+ * Whether the user has enabled clipboard history in Windows Settings.
8
+ */
9
+ isHistoryEnabled: boolean;
10
+ /**
11
+ * All clipboard history entries, newest first.
12
+ */
13
+ history: Array<ClipboardEntry>;
14
+ };
15
+ //# sourceMappingURL=ClipboardData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClipboardData.d.ts","sourceRoot":"","sources":["../../../src/gen/types/ClipboardData.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC5B;;OAEG;IACH,gBAAgB,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;CAAE,CAAC"}
@@ -0,0 +1,24 @@
1
+ import type { ClipboardEntryContent } from "./ClipboardEntryContent.js";
2
+ /**
3
+ * A single entry in the Windows clipboard history.
4
+ */
5
+ export type ClipboardEntry = {
6
+ /**
7
+ * Unique identifier assigned by Windows.
8
+ */
9
+ id: string;
10
+ /**
11
+ * Windows FILETIME (100-ns ticks since 1601-01-01).
12
+ */
13
+ timestamp: number;
14
+ /**
15
+ * Display name of the application that placed the entry on the clipboard.
16
+ */
17
+ sourceAppName: string | null;
18
+ /**
19
+ * Base64-encoded WebP image of the app logo.
20
+ */
21
+ sourceAppLogo: string | null;
22
+ content: ClipboardEntryContent;
23
+ };
24
+ //# sourceMappingURL=ClipboardEntry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClipboardEntry.d.ts","sourceRoot":"","sources":["../../../src/gen/types/ClipboardEntry.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAExE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAC7B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B;;OAEG;IACH,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,qBAAqB,CAAC;CAAE,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Content of a clipboard entry.
3
+ */
4
+ export type ClipboardEntryContent = {
5
+ text: string | null;
6
+ html: string | null;
7
+ rtf: string | null;
8
+ applicationLink: string | null;
9
+ webLink: string | null;
10
+ /**
11
+ * Base64-encoded WebP image.
12
+ */
13
+ bitmap: string | null;
14
+ files: Array<string> | null;
15
+ };
16
+ //# sourceMappingURL=ClipboardEntryContent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClipboardEntryContent.d.ts","sourceRoot":"","sources":["../../../src/gen/types/ClipboardEntryContent.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3J;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;CAAE,CAAC"}
@@ -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"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -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,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE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AEG;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"}
@@ -1,6 +1,10 @@
1
1
  /**
2
- * For local resources this will be an visual id composed of the creator username and the resource name. e.g. `@username/resource-name`
3
- * For downloaded resources this will be an UUID.
2
+ * Identifies a resource across its lifecycle.
3
+ *
4
+ * - [`ResourceId::Local`] — used during development and for bundled resources.
5
+ * Human-readable `@creator/name` format; never assigned a UUID until published.
6
+ * - [`ResourceId::Remote`] — assigned by the marketplace when a resource is published.
7
+ * All downloaded resources are identified by UUID, not by their original local ID.
4
8
  */
5
9
  export type ResourceId = string & {
6
10
  __brand: 'ResourceId';
@@ -1 +1 @@
1
- {"version":3,"file":"ResourceId.d.ts","sourceRoot":"","sources":["../../../src/gen/types/ResourceId.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,YAAY,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"ResourceId.d.ts","sourceRoot":"","sources":["../../../src/gen/types/ResourceId.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,YAAY,CAAA;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,M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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"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,7 @@
1
1
  import type { SeelenCommandActivateNotificationArgs } from "./SeelenCommandActivateNotificationArgs.js";
2
+ import type { SeelenCommandClipboardDeleteEntryArgs } from "./SeelenCommandClipboardDeleteEntryArgs.js";
3
+ import type { SeelenCommandClipboardPasteArgs } from "./SeelenCommandClipboardPasteArgs.js";
4
+ import type { SeelenCommandClipboardSetContentArgs } from "./SeelenCommandClipboardSetContentArgs.js";
2
5
  import type { SeelenCommandClosePopupArgs } from "./SeelenCommandClosePopupArgs.js";
3
6
  import type { SeelenCommandConfirmBluetoothDevicePairingArgs } from "./SeelenCommandConfirmBluetoothDevicePairingArgs.js";
4
7
  import type { SeelenCommandCreatePopupArgs } from "./SeelenCommandCreatePopupArgs.js";
@@ -37,7 +40,6 @@ import type { SeelenCommandSetSelfPositionArgs } from "./SeelenCommandSetSelfPos
37
40
  import type { SeelenCommandSetVolumeLevelArgs } from "./SeelenCommandSetVolumeLevelArgs.js";
38
41
  import type { SeelenCommandSimulatePermArgs } from "./SeelenCommandSimulatePermArgs.js";
39
42
  import type { SeelenCommandStateGetSettingsArgs } from "./SeelenCommandStateGetSettingsArgs.js";
40
- import type { SeelenCommandStateGetWegItemsArgs } from "./SeelenCommandStateGetWegItemsArgs.js";
41
43
  import type { SeelenCommandStateSetCustomIconPackArgs } from "./SeelenCommandStateSetCustomIconPackArgs.js";
42
44
  import type { SeelenCommandStateWriteSettingsArgs } from "./SeelenCommandStateWriteSettingsArgs.js";
43
45
  import type { SeelenCommandStateWriteToolbarItemsArgs } from "./SeelenCommandStateWriteToolbarItemsArgs.js";
@@ -134,7 +136,7 @@ export type SeelenCommandArgument = {
134
136
  } | {
135
137
  "state_get_themes": null;
136
138
  } | {
137
- "state_get_weg_items": SeelenCommandStateGetWegItemsArgs;
139
+ "state_get_weg_items": null;
138
140
  } | {
139
141
  "state_write_weg_items": SeelenCommandStateWriteWegItemsArgs;
140
142
  } | {
@@ -173,6 +175,8 @@ export type SeelenCommandArgument = {
173
175
  "get_self_window_handle": null;
174
176
  } | {
175
177
  "set_self_position": SeelenCommandSetSelfPositionArgs;
178
+ } | {
179
+ "bring_self_to_top": null;
176
180
  } | {
177
181
  "write_data_file": SeelenCommandWriteFileArgs;
178
182
  } | {
@@ -307,5 +311,25 @@ export type SeelenCommandArgument = {
307
311
  "get_start_menu_items": null;
308
312
  } | {
309
313
  "get_native_start_menu": null;
314
+ } | {
315
+ "get_trash_bin_info": null;
316
+ } | {
317
+ "trash_bin_empty": null;
318
+ } | {
319
+ "get_seelen_session": null;
320
+ } | {
321
+ "seelen_login": null;
322
+ } | {
323
+ "seelen_logout": null;
324
+ } | {
325
+ "clipboard_get_data": null;
326
+ } | {
327
+ "clipboard_delete_entry": SeelenCommandClipboardDeleteEntryArgs;
328
+ } | {
329
+ "clipboard_clear_history": null;
330
+ } | {
331
+ "clipboard_set_content": SeelenCommandClipboardSetContentArgs;
332
+ } | {
333
+ "clipboard_paste": SeelenCommandClipboardPasteArgs;
310
334
  };
311
335
  //# sourceMappingURL=SeelenCommandArgument.d.ts.map