@todesktop/shared 7.118.0 → 7.119.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/lib/plugin.d.ts CHANGED
@@ -21,7 +21,7 @@ export declare type ToDesktopPlugin = {
21
21
  export declare type PluginPreferences = {
22
22
  [id: string]: PluginPreference;
23
23
  };
24
- export declare type PluginPreference = NumberSpec | TextSpec;
24
+ export declare type PluginPreference = NumberSpec | TextSpec | CheckboxSpec;
25
25
  export declare type TextSpec = PreferenceSpec<"text", {
26
26
  validator?: AjvJSONSchemaType;
27
27
  value?: string;
@@ -32,6 +32,10 @@ export declare type NumberSpec = PreferenceSpec<"number", {
32
32
  value?: number;
33
33
  placeholder?: number;
34
34
  }>;
35
+ export declare type CheckboxSpec = PreferenceSpec<"checkbox", {
36
+ validator?: AjvJSONSchemaType;
37
+ value?: boolean;
38
+ }>;
35
39
  interface PreferenceSpec<T, V> {
36
40
  name: string;
37
41
  description: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@todesktop/shared",
3
- "version": "7.118.0",
3
+ "version": "7.119.0",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",
package/src/plugin.ts CHANGED
@@ -25,7 +25,7 @@ export type PluginPreferences = {
25
25
  [id: string]: PluginPreference;
26
26
  };
27
27
 
28
- export type PluginPreference = NumberSpec | TextSpec;
28
+ export type PluginPreference = NumberSpec | TextSpec | CheckboxSpec;
29
29
 
30
30
  export type TextSpec = PreferenceSpec<
31
31
  "text",
@@ -45,6 +45,14 @@ export type NumberSpec = PreferenceSpec<
45
45
  }
46
46
  >;
47
47
 
48
+ export type CheckboxSpec = PreferenceSpec<
49
+ "checkbox",
50
+ {
51
+ validator?: AjvJSONSchemaType;
52
+ value?: boolean;
53
+ }
54
+ >;
55
+
48
56
  interface PreferenceSpec<T, V> {
49
57
  name: string;
50
58
  description: string;