@edgestation/sdk 0.5.0 → 0.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/README.md CHANGED
@@ -33,12 +33,15 @@ my-widget/
33
33
  "name": "My widget",
34
34
  "minAppVersion": "0.1.0",
35
35
  "main": "dist/main.js",
36
- "size": { "w": 2, "h": 1 }
36
+ "size": { "w": 2, "h": 1 },
37
+ "permissions": ["system"]
37
38
  }
38
39
  ```
39
40
 
40
41
  `minAppVersion` is the oldest EdgeStation that can run the widget: set it to the version of this package you build with (they are released together), and older apps show an error card instead of a broken widget.
41
42
 
43
+ `permissions` lists the parts of the `api` the widget uses. The examples below call `api.system()`, so they need `system`.
44
+
42
45
  ### Plain JavaScript or TypeScript
43
46
 
44
47
  ```js
@@ -38,6 +38,11 @@ export interface TextSetting extends SettingBase {
38
38
  default?: string;
39
39
  /** A hint that shows while the field is empty. */
40
40
  placeholder?: string;
41
+ /**
42
+ * Hides the value in the settings, as in a password field. Use it for a token or a key.
43
+ * EdgeStation saves the value as plain text in its settings file.
44
+ */
45
+ secret?: boolean;
41
46
  }
42
47
  /** The saved setting values of one placement, by key. */
43
48
  export type WidgetSettingValues = Record<string, string>;
@@ -111,6 +111,10 @@
111
111
  "type": { "const": "text" },
112
112
  "default": { "type": "string", "description": "Value until the user types one." },
113
113
  "placeholder": { "type": "string", "description": "Hint shown while the field is empty." },
114
+ "secret": {
115
+ "type": "boolean",
116
+ "description": "Hides the value in the settings, as in a password field. It is still saved as plain text."
117
+ },
114
118
  "when": { "$ref": "#/definitions/when" }
115
119
  }
116
120
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgestation/sdk",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Types and build helpers to write widgets for EdgeStation, the secondary display dashboard made for the Corsair Xeneon Edge, in plain JavaScript, Svelte, React or Vue.",
5
5
  "keywords": [
6
6
  "edgestation",