@rokkit/states 1.1.18 → 1.1.19

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.
@@ -8,11 +8,18 @@ declare class AlertsStore {
8
8
  timeout: number;
9
9
  actions?: unknown;
10
10
  }[];
11
+ /**
12
+ * Push a new alert. Returns the alert id.
13
+ * @param {{ type?: string, text?: string, dismissible?: boolean, timeout?: number, actions?: unknown }} [alert]
14
+ * @returns {string}
15
+ */
11
16
  push({ type, text, dismissible, timeout, actions }?: {
12
- type?: string | undefined;
13
- dismissible?: boolean | undefined;
14
- timeout?: number | undefined;
15
- }): `${string}-${string}-${string}-${string}-${string}`;
17
+ type?: string;
18
+ text?: string;
19
+ dismissible?: boolean;
20
+ timeout?: number;
21
+ actions?: unknown;
22
+ }): string;
16
23
  /**
17
24
  * Dismiss an alert by id, cancelling its timer if any.
18
25
  * @param {string} id
@@ -27,6 +27,7 @@ declare class MessagesStore {
27
27
  filter: any;
28
28
  grid: any;
29
29
  uploadProgress: any;
30
+ uploadTarget: any;
30
31
  floatingNav: any;
31
32
  mode: any;
32
33
  command: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rokkit/states",
3
- "version": "1.1.18",
3
+ "version": "1.1.19",
4
4
  "description": "Contains generic data manipulation functions that can be used in various components.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,8 +39,8 @@
39
39
  }
40
40
  },
41
41
  "dependencies": {
42
- "@rokkit/core": "1.1.18",
43
- "@rokkit/data": "1.1.18",
42
+ "@rokkit/core": "1.1.19",
43
+ "@rokkit/data": "1.1.19",
44
44
  "d3-array": "^3.2.4",
45
45
  "ramda": "^0.32.0",
46
46
  "svelte": "^5.53.5"
@@ -8,11 +8,6 @@ class AlertsStore {
8
8
  return this.#items
9
9
  }
10
10
 
11
- /**
12
- * Push a new alert. Returns the alert id.
13
- * @param {{ type?: string, text?: string, dismissible?: boolean, timeout?: number, actions?: unknown }} alert
14
- * @returns {string}
15
- */
16
11
  #scheduleTimer(id, timeout) {
17
12
  if (timeout > 0) {
18
13
  this.#timers.set(
@@ -22,7 +17,11 @@ class AlertsStore {
22
17
  }
23
18
  }
24
19
 
25
-
20
+ /**
21
+ * Push a new alert. Returns the alert id.
22
+ * @param {{ type?: string, text?: string, dismissible?: boolean, timeout?: number, actions?: unknown }} [alert]
23
+ * @returns {string}
24
+ */
26
25
  push({
27
26
  type = 'info',
28
27
  text,
@@ -43,6 +43,9 @@ const defaultMessages = {
43
43
  retry: 'Retry',
44
44
  remove: 'Remove'
45
45
  },
46
+ uploadTarget: {
47
+ dropzone: 'File upload drop zone'
48
+ },
46
49
  floatingNav: { label: 'Page navigation', pin: 'Pin navigation', unpin: 'Unpin navigation' },
47
50
  mode: { system: 'System', light: 'Light', dark: 'Dark' },
48
51
  command: {
@@ -102,6 +105,7 @@ class MessagesStore {
102
105
  filter = $state({ ...defaultMessages.filter })
103
106
  grid = $state({ ...defaultMessages.grid })
104
107
  uploadProgress = $state({ ...defaultMessages.uploadProgress })
108
+ uploadTarget = $state({ ...defaultMessages.uploadTarget })
105
109
  floatingNav = $state({ ...defaultMessages.floatingNav })
106
110
  mode = $state({ ...defaultMessages.mode })
107
111
  command = $state({ ...defaultMessages.command })