@croffledev/croffle-types 1.4.4 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api/window.d.ts CHANGED
@@ -4,5 +4,10 @@ export interface WindowApi {
4
4
  close(): Promise<void>;
5
5
  exitApp(): Promise<void>;
6
6
  checkForUpdates(): Promise<void>;
7
+ /**
8
+ * @deprecated Since 1.2.2 the close behavior is a user setting. This call now writes
9
+ * `general.closeBehavior` (`true` → `tray`, `false` → `quit`). Use `settings.update` instead.
10
+ * Will be removed in 1.3.
11
+ */
7
12
  setCloseToTrayMode(enabled: boolean): Promise<void>;
8
13
  }
package/enums.d.ts CHANGED
@@ -23,6 +23,8 @@ export declare enum AppEventType {
23
23
  WINDOW_SHOW = 'window:show',
24
24
  WINDOW_HIDE = 'window:hide',
25
25
  WINDOW_EXIT = 'window:exit',
26
+ /** Close was requested while `closeBehavior` is `ask`; the host UI asks the user. */
27
+ WINDOW_CLOSE_REQUESTED = 'window:closeRequested',
26
28
 
27
29
  // Electron updater (host UI)
28
30
  UPDATE_AVAILABLE = 'update:available',
@@ -26,6 +26,13 @@ export declare enum CalendarTimeFormat {
26
26
  H24 = '24h',
27
27
  }
28
28
 
29
+ /** What the window close button does. `ASK` shows a one-time prompt and stores the answer. */
30
+ export declare enum AppCloseBehavior {
31
+ ASK = 'ask',
32
+ TRAY = 'tray',
33
+ QUIT = 'quit',
34
+ }
35
+
29
36
  export type AppSettings = {
30
37
  general: {
31
38
  language: AppSettingLanguage;
@@ -33,6 +40,8 @@ export type AppSettings = {
33
40
  autoUpdate: boolean;
34
41
  startOnSystemBoot: boolean;
35
42
  startMinimized: boolean;
43
+ /** Close button behavior. Defaults to `ask` until the user answers the first-close prompt. */
44
+ closeBehavior: AppCloseBehavior;
36
45
  };
37
46
  appearance: {
38
47
  /** Accent color hue in degrees (0–360). Drives --croffle-accent-hue. */
@@ -12,7 +12,16 @@ export type Schedule = {
12
12
  colorLabel: string;
13
13
  tags: Tag[];
14
14
  priority: 'low' | 'medium' | 'high';
15
- /** null/undefined = use app-wide notifications.defaultReminderMinutes */
15
+ /**
16
+ * Reminder offsets in minutes before the schedule starts, ascending.
17
+ * `null` = follow the app-wide notifications.defaultReminderMinutes.
18
+ * `[]` = no reminder at all.
19
+ */
20
+ reminders: number[] | null;
21
+ /**
22
+ * @deprecated Mirror of the first entry in `reminders`, kept for extensions
23
+ * written against 1.2.0. Removed in 1.3 — read `reminders` instead.
24
+ */
16
25
  reminderMinutes?: number | null;
17
26
  createdAt: Date;
18
27
  updatedAt: Date;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@croffledev/croffle-types",
3
- "version": "1.4.4",
3
+ "version": "1.6.0",
4
4
  "description": "Croffle project type definitions.",
5
5
  "license": "MIT",
6
6
  "type": "module",