@kemu-io/hs-react 0.2.39 → 0.3.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.
Files changed (75) hide show
  1. package/cjs/WidgetWrapper.d.ts +64 -4
  2. package/cjs/components/BaseWidget.d.ts +61 -0
  3. package/cjs/components/BaseWidget.js +6 -0
  4. package/cjs/components/CheckboxField.d.ts +27 -0
  5. package/cjs/components/CheckboxField.js +3 -0
  6. package/cjs/components/CommonElements.d.ts +9 -0
  7. package/cjs/components/CommonElements.js +1 -0
  8. package/cjs/components/Field.d.ts +25 -0
  9. package/cjs/components/Field.js +9 -0
  10. package/cjs/components/FieldWithLabel.d.ts +35 -0
  11. package/cjs/components/FieldWithLabel.js +1 -0
  12. package/cjs/components/HorizontalField.d.ts +24 -0
  13. package/cjs/components/HorizontalField.js +9 -0
  14. package/cjs/components/KemuLightButton.d.ts +16 -0
  15. package/cjs/components/KemuLightButton.js +43 -0
  16. package/cjs/components/KemuPrimaryButton.d.ts +16 -0
  17. package/cjs/components/KemuPrimaryButton.js +43 -0
  18. package/cjs/components/KemuThemeWrapper.d.ts +44 -0
  19. package/cjs/components/KemuThemeWrapper.js +1 -0
  20. package/cjs/components/SettingsBar.d.ts +36 -0
  21. package/cjs/components/SettingsBar.js +8 -0
  22. package/cjs/components/SettingsDialog.d.ts +81 -0
  23. package/cjs/components/SettingsDialog.js +74 -0
  24. package/cjs/components/SvgContainer.d.ts +23 -0
  25. package/cjs/components/SvgContainer.js +9 -0
  26. package/cjs/components/WidgetBody.d.ts +20 -0
  27. package/cjs/components/WidgetBody.js +9 -0
  28. package/cjs/components/index.d.ts +318 -1
  29. package/cjs/components/index.js +1 -1
  30. package/cjs/hooks/index.d.ts +64 -4
  31. package/cjs/hooks/useOnBroadcastEvent.d.ts +64 -4
  32. package/cjs/hooks/useOnParentEvent.d.ts +64 -4
  33. package/cjs/hooks/useOnSetOutputsEvent.d.ts +64 -4
  34. package/cjs/lib/InstanceContext.d.ts +64 -4
  35. package/cjs/lib/globalContext.d.ts +64 -4
  36. package/cjs/types/context_t.d.ts +64 -4
  37. package/cjs/types/widgetUI_t.d.ts +64 -4
  38. package/mjs/WidgetWrapper.d.ts +64 -4
  39. package/mjs/components/BaseWidget.d.ts +61 -0
  40. package/mjs/components/BaseWidget.js +6 -0
  41. package/mjs/components/CheckboxField.d.ts +27 -0
  42. package/mjs/components/CheckboxField.js +3 -0
  43. package/mjs/components/CommonElements.d.ts +9 -0
  44. package/mjs/components/CommonElements.js +1 -0
  45. package/mjs/components/Field.d.ts +25 -0
  46. package/mjs/components/Field.js +9 -0
  47. package/mjs/components/FieldWithLabel.d.ts +35 -0
  48. package/mjs/components/FieldWithLabel.js +1 -0
  49. package/mjs/components/HorizontalField.d.ts +24 -0
  50. package/mjs/components/HorizontalField.js +9 -0
  51. package/mjs/components/KemuLightButton.d.ts +16 -0
  52. package/mjs/components/KemuLightButton.js +43 -0
  53. package/mjs/components/KemuPrimaryButton.d.ts +16 -0
  54. package/mjs/components/KemuPrimaryButton.js +43 -0
  55. package/mjs/components/KemuThemeWrapper.d.ts +44 -0
  56. package/mjs/components/KemuThemeWrapper.js +1 -0
  57. package/mjs/components/SettingsBar.d.ts +36 -0
  58. package/mjs/components/SettingsBar.js +8 -0
  59. package/mjs/components/SettingsDialog.d.ts +81 -0
  60. package/mjs/components/SettingsDialog.js +74 -0
  61. package/mjs/components/SvgContainer.d.ts +23 -0
  62. package/mjs/components/SvgContainer.js +9 -0
  63. package/mjs/components/WidgetBody.d.ts +20 -0
  64. package/mjs/components/WidgetBody.js +9 -0
  65. package/mjs/components/index.d.ts +318 -1
  66. package/mjs/components/index.js +1 -1
  67. package/mjs/hooks/index.d.ts +64 -4
  68. package/mjs/hooks/useOnBroadcastEvent.d.ts +64 -4
  69. package/mjs/hooks/useOnParentEvent.d.ts +64 -4
  70. package/mjs/hooks/useOnSetOutputsEvent.d.ts +64 -4
  71. package/mjs/lib/InstanceContext.d.ts +64 -4
  72. package/mjs/lib/globalContext.d.ts +64 -4
  73. package/mjs/types/context_t.d.ts +64 -4
  74. package/mjs/types/widgetUI_t.d.ts +64 -4
  75. package/package.json +3 -1
@@ -124,6 +124,17 @@ export type WidgetPort = {
124
124
  * processor execution.
125
125
  */
126
126
  triggerPort?: boolean;
127
+ /**
128
+ * A path to a markdown file that will be rendered as the ports documentation.
129
+ * If provided it will override the default 'description' property. Useful if the documentation of this port requires more than a simple text.
130
+ *
131
+ * The path can be relative to the service's `docs` folder. For example:
132
+ *
133
+ * ```
134
+ * docs/ports/inputA.md
135
+ * ```
136
+ */
137
+ mdHelp?: string;
127
138
  };
128
139
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
129
140
  export type TargetOutput = {
@@ -148,6 +159,9 @@ export type TargetOutput = {
148
159
  /** id of the variant that defined the output */
149
160
  variantId?: string;
150
161
  };
162
+ export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
163
+ [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
164
+ }[Keys];
151
165
  export type WidgetPortStr = Omit<WidgetPort, "type"> & {
152
166
  type: string;
153
167
  };
@@ -177,7 +191,20 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
177
191
  inputs?: P[];
178
192
  outputs?: P[];
179
193
  };
180
- export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
194
+ /**
195
+ * A list of supported Linux distributions. This can be extended in the future.
196
+ * Use 'generic' for distribution-agnostic services.
197
+ */
198
+ export type LinuxDistribution =
199
+ /** For distribution-agnostic services that run on most Linux systems. */
200
+ "generic"
201
+ /** Includes Debian, Ubuntu, Linux Mint, etc. (uses APT) */
202
+ | "debian"
203
+ /** Includes RHEL, Fedora, CentOS, etc. (uses YUM/DNF) */
204
+ | "rhel"
205
+ /** Includes Arch Linux, Manjaro, etc. (uses Pacman) */
206
+ | "arch";
207
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64" | `linux-${LinuxDistribution}-x64` | `linux-${LinuxDistribution}-arm64`;
181
208
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
182
209
  /** the unique name defined by the service */
183
210
  name: string;
@@ -187,7 +214,17 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
187
214
  title?: string;
188
215
  /** a shorten title to be used in the canvas */
189
216
  shortTitle?: string;
217
+ /** generic description shown when a service is selected from the Hub Services Grid */
190
218
  description: string;
219
+ /**
220
+ * Relative to the markdown file that will be rendered when the user clicks on the 'help' icon for this service.
221
+ * The description is meant to be short and include video/sample images or a link to the description page. Eg:
222
+ *
223
+ * ```
224
+ * docs/help.md
225
+ * ```
226
+ **/
227
+ mdHelp?: string;
191
228
  processor: ProcessorType;
192
229
  /** Id of the user that published the service */
193
230
  author: string;
@@ -269,6 +306,32 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
269
306
  * and be visually distinct.
270
307
  */
271
308
  variants?: ServiceWidgetVariant<P>[];
309
+ /**
310
+ * The default variant info. If provided, it allows overriding the default info
311
+ * of the service. Useful when the default variant behaviour does not match the service description.
312
+ */
313
+ defaultVariantInfo?: {
314
+ /**
315
+ * The title of the default variant. If provided, it will override the `title` property.
316
+ */
317
+ title?: string;
318
+ /**
319
+ * The short title of the default variant. If provided, it will override the `shortTitle` property.
320
+ */
321
+ shortTitle?: string;
322
+ /**
323
+ * The description of the default variant. If provided, it will override the `description` property.
324
+ */
325
+ description?: string;
326
+ /**
327
+ * The color of the default variant. If provided, it will override the `color` property.
328
+ */
329
+ color?: string;
330
+ /**
331
+ * The SVG icon of the default variant. If provided, it will override the `svgIcon` property.
332
+ */
333
+ svgIcon?: string;
334
+ };
272
335
  /**
273
336
  * A list of relative paths to folders containing extra services that are part of this service. Eg:
274
337
  * ```json
@@ -341,9 +404,6 @@ export type ProcessedManifest<B extends Buffer | ArrayBuffer = Buffer> = Omit<Pa
341
404
  version: string;
342
405
  };
343
406
  };
344
- export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
345
- [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
346
- }[Keys];
347
407
  export type DefineDynamicPortsArgs = RequireAtLeastOne<{
348
408
  /**
349
409
  * Set to null to remove any previously defined ports or
@@ -124,6 +124,17 @@ export type WidgetPort = {
124
124
  * processor execution.
125
125
  */
126
126
  triggerPort?: boolean;
127
+ /**
128
+ * A path to a markdown file that will be rendered as the ports documentation.
129
+ * If provided it will override the default 'description' property. Useful if the documentation of this port requires more than a simple text.
130
+ *
131
+ * The path can be relative to the service's `docs` folder. For example:
132
+ *
133
+ * ```
134
+ * docs/ports/inputA.md
135
+ * ```
136
+ */
137
+ mdHelp?: string;
127
138
  };
128
139
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
129
140
  export type TargetOutput = {
@@ -148,6 +159,9 @@ export type TargetOutput = {
148
159
  /** id of the variant that defined the output */
149
160
  variantId?: string;
150
161
  };
162
+ export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
163
+ [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
164
+ }[Keys];
151
165
  export type WidgetPortStr = Omit<WidgetPort, "type"> & {
152
166
  type: string;
153
167
  };
@@ -177,7 +191,20 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
177
191
  inputs?: P[];
178
192
  outputs?: P[];
179
193
  };
180
- export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
194
+ /**
195
+ * A list of supported Linux distributions. This can be extended in the future.
196
+ * Use 'generic' for distribution-agnostic services.
197
+ */
198
+ export type LinuxDistribution =
199
+ /** For distribution-agnostic services that run on most Linux systems. */
200
+ "generic"
201
+ /** Includes Debian, Ubuntu, Linux Mint, etc. (uses APT) */
202
+ | "debian"
203
+ /** Includes RHEL, Fedora, CentOS, etc. (uses YUM/DNF) */
204
+ | "rhel"
205
+ /** Includes Arch Linux, Manjaro, etc. (uses Pacman) */
206
+ | "arch";
207
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64" | `linux-${LinuxDistribution}-x64` | `linux-${LinuxDistribution}-arm64`;
181
208
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
182
209
  /** the unique name defined by the service */
183
210
  name: string;
@@ -187,7 +214,17 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
187
214
  title?: string;
188
215
  /** a shorten title to be used in the canvas */
189
216
  shortTitle?: string;
217
+ /** generic description shown when a service is selected from the Hub Services Grid */
190
218
  description: string;
219
+ /**
220
+ * Relative to the markdown file that will be rendered when the user clicks on the 'help' icon for this service.
221
+ * The description is meant to be short and include video/sample images or a link to the description page. Eg:
222
+ *
223
+ * ```
224
+ * docs/help.md
225
+ * ```
226
+ **/
227
+ mdHelp?: string;
191
228
  processor: ProcessorType;
192
229
  /** Id of the user that published the service */
193
230
  author: string;
@@ -269,6 +306,32 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
269
306
  * and be visually distinct.
270
307
  */
271
308
  variants?: ServiceWidgetVariant<P>[];
309
+ /**
310
+ * The default variant info. If provided, it allows overriding the default info
311
+ * of the service. Useful when the default variant behaviour does not match the service description.
312
+ */
313
+ defaultVariantInfo?: {
314
+ /**
315
+ * The title of the default variant. If provided, it will override the `title` property.
316
+ */
317
+ title?: string;
318
+ /**
319
+ * The short title of the default variant. If provided, it will override the `shortTitle` property.
320
+ */
321
+ shortTitle?: string;
322
+ /**
323
+ * The description of the default variant. If provided, it will override the `description` property.
324
+ */
325
+ description?: string;
326
+ /**
327
+ * The color of the default variant. If provided, it will override the `color` property.
328
+ */
329
+ color?: string;
330
+ /**
331
+ * The SVG icon of the default variant. If provided, it will override the `svgIcon` property.
332
+ */
333
+ svgIcon?: string;
334
+ };
272
335
  /**
273
336
  * A list of relative paths to folders containing extra services that are part of this service. Eg:
274
337
  * ```json
@@ -341,9 +404,6 @@ export type ProcessedManifest<B extends Buffer | ArrayBuffer = Buffer> = Omit<Pa
341
404
  version: string;
342
405
  };
343
406
  };
344
- export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
345
- [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
346
- }[Keys];
347
407
  export type DefineDynamicPortsArgs = RequireAtLeastOne<{
348
408
  /**
349
409
  * Set to null to remove any previously defined ports or
@@ -124,6 +124,17 @@ export type WidgetPort = {
124
124
  * processor execution.
125
125
  */
126
126
  triggerPort?: boolean;
127
+ /**
128
+ * A path to a markdown file that will be rendered as the ports documentation.
129
+ * If provided it will override the default 'description' property. Useful if the documentation of this port requires more than a simple text.
130
+ *
131
+ * The path can be relative to the service's `docs` folder. For example:
132
+ *
133
+ * ```
134
+ * docs/ports/inputA.md
135
+ * ```
136
+ */
137
+ mdHelp?: string;
127
138
  };
128
139
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
129
140
  export type TargetOutput = {
@@ -148,6 +159,9 @@ export type TargetOutput = {
148
159
  /** id of the variant that defined the output */
149
160
  variantId?: string;
150
161
  };
162
+ export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
163
+ [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
164
+ }[Keys];
151
165
  export type WidgetPortStr = Omit<WidgetPort, "type"> & {
152
166
  type: string;
153
167
  };
@@ -177,7 +191,20 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
177
191
  inputs?: P[];
178
192
  outputs?: P[];
179
193
  };
180
- export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
194
+ /**
195
+ * A list of supported Linux distributions. This can be extended in the future.
196
+ * Use 'generic' for distribution-agnostic services.
197
+ */
198
+ export type LinuxDistribution =
199
+ /** For distribution-agnostic services that run on most Linux systems. */
200
+ "generic"
201
+ /** Includes Debian, Ubuntu, Linux Mint, etc. (uses APT) */
202
+ | "debian"
203
+ /** Includes RHEL, Fedora, CentOS, etc. (uses YUM/DNF) */
204
+ | "rhel"
205
+ /** Includes Arch Linux, Manjaro, etc. (uses Pacman) */
206
+ | "arch";
207
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64" | `linux-${LinuxDistribution}-x64` | `linux-${LinuxDistribution}-arm64`;
181
208
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
182
209
  /** the unique name defined by the service */
183
210
  name: string;
@@ -187,7 +214,17 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
187
214
  title?: string;
188
215
  /** a shorten title to be used in the canvas */
189
216
  shortTitle?: string;
217
+ /** generic description shown when a service is selected from the Hub Services Grid */
190
218
  description: string;
219
+ /**
220
+ * Relative to the markdown file that will be rendered when the user clicks on the 'help' icon for this service.
221
+ * The description is meant to be short and include video/sample images or a link to the description page. Eg:
222
+ *
223
+ * ```
224
+ * docs/help.md
225
+ * ```
226
+ **/
227
+ mdHelp?: string;
191
228
  processor: ProcessorType;
192
229
  /** Id of the user that published the service */
193
230
  author: string;
@@ -269,6 +306,32 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
269
306
  * and be visually distinct.
270
307
  */
271
308
  variants?: ServiceWidgetVariant<P>[];
309
+ /**
310
+ * The default variant info. If provided, it allows overriding the default info
311
+ * of the service. Useful when the default variant behaviour does not match the service description.
312
+ */
313
+ defaultVariantInfo?: {
314
+ /**
315
+ * The title of the default variant. If provided, it will override the `title` property.
316
+ */
317
+ title?: string;
318
+ /**
319
+ * The short title of the default variant. If provided, it will override the `shortTitle` property.
320
+ */
321
+ shortTitle?: string;
322
+ /**
323
+ * The description of the default variant. If provided, it will override the `description` property.
324
+ */
325
+ description?: string;
326
+ /**
327
+ * The color of the default variant. If provided, it will override the `color` property.
328
+ */
329
+ color?: string;
330
+ /**
331
+ * The SVG icon of the default variant. If provided, it will override the `svgIcon` property.
332
+ */
333
+ svgIcon?: string;
334
+ };
272
335
  /**
273
336
  * A list of relative paths to folders containing extra services that are part of this service. Eg:
274
337
  * ```json
@@ -341,9 +404,6 @@ export type ProcessedManifest<B extends Buffer | ArrayBuffer = Buffer> = Omit<Pa
341
404
  version: string;
342
405
  };
343
406
  };
344
- export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
345
- [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
346
- }[Keys];
347
407
  export type DefineDynamicPortsArgs = RequireAtLeastOne<{
348
408
  /**
349
409
  * Set to null to remove any previously defined ports or
@@ -124,6 +124,17 @@ export type WidgetPort = {
124
124
  * processor execution.
125
125
  */
126
126
  triggerPort?: boolean;
127
+ /**
128
+ * A path to a markdown file that will be rendered as the ports documentation.
129
+ * If provided it will override the default 'description' property. Useful if the documentation of this port requires more than a simple text.
130
+ *
131
+ * The path can be relative to the service's `docs` folder. For example:
132
+ *
133
+ * ```
134
+ * docs/ports/inputA.md
135
+ * ```
136
+ */
137
+ mdHelp?: string;
127
138
  };
128
139
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
129
140
  export type TargetOutput = {
@@ -148,6 +159,9 @@ export type TargetOutput = {
148
159
  /** id of the variant that defined the output */
149
160
  variantId?: string;
150
161
  };
162
+ export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
163
+ [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
164
+ }[Keys];
151
165
  export type WidgetPortStr = Omit<WidgetPort, "type"> & {
152
166
  type: string;
153
167
  };
@@ -177,7 +191,20 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
177
191
  inputs?: P[];
178
192
  outputs?: P[];
179
193
  };
180
- export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
194
+ /**
195
+ * A list of supported Linux distributions. This can be extended in the future.
196
+ * Use 'generic' for distribution-agnostic services.
197
+ */
198
+ export type LinuxDistribution =
199
+ /** For distribution-agnostic services that run on most Linux systems. */
200
+ "generic"
201
+ /** Includes Debian, Ubuntu, Linux Mint, etc. (uses APT) */
202
+ | "debian"
203
+ /** Includes RHEL, Fedora, CentOS, etc. (uses YUM/DNF) */
204
+ | "rhel"
205
+ /** Includes Arch Linux, Manjaro, etc. (uses Pacman) */
206
+ | "arch";
207
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64" | `linux-${LinuxDistribution}-x64` | `linux-${LinuxDistribution}-arm64`;
181
208
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
182
209
  /** the unique name defined by the service */
183
210
  name: string;
@@ -187,7 +214,17 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
187
214
  title?: string;
188
215
  /** a shorten title to be used in the canvas */
189
216
  shortTitle?: string;
217
+ /** generic description shown when a service is selected from the Hub Services Grid */
190
218
  description: string;
219
+ /**
220
+ * Relative to the markdown file that will be rendered when the user clicks on the 'help' icon for this service.
221
+ * The description is meant to be short and include video/sample images or a link to the description page. Eg:
222
+ *
223
+ * ```
224
+ * docs/help.md
225
+ * ```
226
+ **/
227
+ mdHelp?: string;
191
228
  processor: ProcessorType;
192
229
  /** Id of the user that published the service */
193
230
  author: string;
@@ -269,6 +306,32 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
269
306
  * and be visually distinct.
270
307
  */
271
308
  variants?: ServiceWidgetVariant<P>[];
309
+ /**
310
+ * The default variant info. If provided, it allows overriding the default info
311
+ * of the service. Useful when the default variant behaviour does not match the service description.
312
+ */
313
+ defaultVariantInfo?: {
314
+ /**
315
+ * The title of the default variant. If provided, it will override the `title` property.
316
+ */
317
+ title?: string;
318
+ /**
319
+ * The short title of the default variant. If provided, it will override the `shortTitle` property.
320
+ */
321
+ shortTitle?: string;
322
+ /**
323
+ * The description of the default variant. If provided, it will override the `description` property.
324
+ */
325
+ description?: string;
326
+ /**
327
+ * The color of the default variant. If provided, it will override the `color` property.
328
+ */
329
+ color?: string;
330
+ /**
331
+ * The SVG icon of the default variant. If provided, it will override the `svgIcon` property.
332
+ */
333
+ svgIcon?: string;
334
+ };
272
335
  /**
273
336
  * A list of relative paths to folders containing extra services that are part of this service. Eg:
274
337
  * ```json
@@ -341,9 +404,6 @@ export type ProcessedManifest<B extends Buffer | ArrayBuffer = Buffer> = Omit<Pa
341
404
  version: string;
342
405
  };
343
406
  };
344
- export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
345
- [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
346
- }[Keys];
347
407
  export type DefineDynamicPortsArgs = RequireAtLeastOne<{
348
408
  /**
349
409
  * Set to null to remove any previously defined ports or
@@ -116,6 +116,17 @@ export type WidgetPort = {
116
116
  * processor execution.
117
117
  */
118
118
  triggerPort?: boolean;
119
+ /**
120
+ * A path to a markdown file that will be rendered as the ports documentation.
121
+ * If provided it will override the default 'description' property. Useful if the documentation of this port requires more than a simple text.
122
+ *
123
+ * The path can be relative to the service's `docs` folder. For example:
124
+ *
125
+ * ```
126
+ * docs/ports/inputA.md
127
+ * ```
128
+ */
129
+ mdHelp?: string;
119
130
  };
120
131
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
121
132
  export type TargetOutput = {
@@ -140,6 +151,9 @@ export type TargetOutput = {
140
151
  /** id of the variant that defined the output */
141
152
  variantId?: string;
142
153
  };
154
+ export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
155
+ [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
156
+ }[Keys];
143
157
  export type WidgetPortStr = Omit<WidgetPort, "type"> & {
144
158
  type: string;
145
159
  };
@@ -169,7 +183,20 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
169
183
  inputs?: P[];
170
184
  outputs?: P[];
171
185
  };
172
- export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
186
+ /**
187
+ * A list of supported Linux distributions. This can be extended in the future.
188
+ * Use 'generic' for distribution-agnostic services.
189
+ */
190
+ export type LinuxDistribution =
191
+ /** For distribution-agnostic services that run on most Linux systems. */
192
+ "generic"
193
+ /** Includes Debian, Ubuntu, Linux Mint, etc. (uses APT) */
194
+ | "debian"
195
+ /** Includes RHEL, Fedora, CentOS, etc. (uses YUM/DNF) */
196
+ | "rhel"
197
+ /** Includes Arch Linux, Manjaro, etc. (uses Pacman) */
198
+ | "arch";
199
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64" | `linux-${LinuxDistribution}-x64` | `linux-${LinuxDistribution}-arm64`;
173
200
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
174
201
  /** the unique name defined by the service */
175
202
  name: string;
@@ -179,7 +206,17 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
179
206
  title?: string;
180
207
  /** a shorten title to be used in the canvas */
181
208
  shortTitle?: string;
209
+ /** generic description shown when a service is selected from the Hub Services Grid */
182
210
  description: string;
211
+ /**
212
+ * Relative to the markdown file that will be rendered when the user clicks on the 'help' icon for this service.
213
+ * The description is meant to be short and include video/sample images or a link to the description page. Eg:
214
+ *
215
+ * ```
216
+ * docs/help.md
217
+ * ```
218
+ **/
219
+ mdHelp?: string;
183
220
  processor: ProcessorType;
184
221
  /** Id of the user that published the service */
185
222
  author: string;
@@ -261,6 +298,32 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
261
298
  * and be visually distinct.
262
299
  */
263
300
  variants?: ServiceWidgetVariant<P>[];
301
+ /**
302
+ * The default variant info. If provided, it allows overriding the default info
303
+ * of the service. Useful when the default variant behaviour does not match the service description.
304
+ */
305
+ defaultVariantInfo?: {
306
+ /**
307
+ * The title of the default variant. If provided, it will override the `title` property.
308
+ */
309
+ title?: string;
310
+ /**
311
+ * The short title of the default variant. If provided, it will override the `shortTitle` property.
312
+ */
313
+ shortTitle?: string;
314
+ /**
315
+ * The description of the default variant. If provided, it will override the `description` property.
316
+ */
317
+ description?: string;
318
+ /**
319
+ * The color of the default variant. If provided, it will override the `color` property.
320
+ */
321
+ color?: string;
322
+ /**
323
+ * The SVG icon of the default variant. If provided, it will override the `svgIcon` property.
324
+ */
325
+ svgIcon?: string;
326
+ };
264
327
  /**
265
328
  * A list of relative paths to folders containing extra services that are part of this service. Eg:
266
329
  * ```json
@@ -333,9 +396,6 @@ export type ProcessedManifest<B extends Buffer | ArrayBuffer = Buffer> = Omit<Pa
333
396
  version: string;
334
397
  };
335
398
  };
336
- export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
337
- [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
338
- }[Keys];
339
399
  export type DefineDynamicPortsArgs = RequireAtLeastOne<{
340
400
  /**
341
401
  * Set to null to remove any previously defined ports or
@@ -116,6 +116,17 @@ export type WidgetPort = {
116
116
  * processor execution.
117
117
  */
118
118
  triggerPort?: boolean;
119
+ /**
120
+ * A path to a markdown file that will be rendered as the ports documentation.
121
+ * If provided it will override the default 'description' property. Useful if the documentation of this port requires more than a simple text.
122
+ *
123
+ * The path can be relative to the service's `docs` folder. For example:
124
+ *
125
+ * ```
126
+ * docs/ports/inputA.md
127
+ * ```
128
+ */
129
+ mdHelp?: string;
119
130
  };
120
131
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
121
132
  export type TargetOutput = {
@@ -140,6 +151,9 @@ export type TargetOutput = {
140
151
  /** id of the variant that defined the output */
141
152
  variantId?: string;
142
153
  };
154
+ export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
155
+ [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
156
+ }[Keys];
143
157
  export type WidgetPortStr = Omit<WidgetPort, "type"> & {
144
158
  type: string;
145
159
  };
@@ -169,7 +183,20 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
169
183
  inputs?: P[];
170
184
  outputs?: P[];
171
185
  };
172
- export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
186
+ /**
187
+ * A list of supported Linux distributions. This can be extended in the future.
188
+ * Use 'generic' for distribution-agnostic services.
189
+ */
190
+ export type LinuxDistribution =
191
+ /** For distribution-agnostic services that run on most Linux systems. */
192
+ "generic"
193
+ /** Includes Debian, Ubuntu, Linux Mint, etc. (uses APT) */
194
+ | "debian"
195
+ /** Includes RHEL, Fedora, CentOS, etc. (uses YUM/DNF) */
196
+ | "rhel"
197
+ /** Includes Arch Linux, Manjaro, etc. (uses Pacman) */
198
+ | "arch";
199
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64" | `linux-${LinuxDistribution}-x64` | `linux-${LinuxDistribution}-arm64`;
173
200
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
174
201
  /** the unique name defined by the service */
175
202
  name: string;
@@ -179,7 +206,17 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
179
206
  title?: string;
180
207
  /** a shorten title to be used in the canvas */
181
208
  shortTitle?: string;
209
+ /** generic description shown when a service is selected from the Hub Services Grid */
182
210
  description: string;
211
+ /**
212
+ * Relative to the markdown file that will be rendered when the user clicks on the 'help' icon for this service.
213
+ * The description is meant to be short and include video/sample images or a link to the description page. Eg:
214
+ *
215
+ * ```
216
+ * docs/help.md
217
+ * ```
218
+ **/
219
+ mdHelp?: string;
183
220
  processor: ProcessorType;
184
221
  /** Id of the user that published the service */
185
222
  author: string;
@@ -261,6 +298,32 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
261
298
  * and be visually distinct.
262
299
  */
263
300
  variants?: ServiceWidgetVariant<P>[];
301
+ /**
302
+ * The default variant info. If provided, it allows overriding the default info
303
+ * of the service. Useful when the default variant behaviour does not match the service description.
304
+ */
305
+ defaultVariantInfo?: {
306
+ /**
307
+ * The title of the default variant. If provided, it will override the `title` property.
308
+ */
309
+ title?: string;
310
+ /**
311
+ * The short title of the default variant. If provided, it will override the `shortTitle` property.
312
+ */
313
+ shortTitle?: string;
314
+ /**
315
+ * The description of the default variant. If provided, it will override the `description` property.
316
+ */
317
+ description?: string;
318
+ /**
319
+ * The color of the default variant. If provided, it will override the `color` property.
320
+ */
321
+ color?: string;
322
+ /**
323
+ * The SVG icon of the default variant. If provided, it will override the `svgIcon` property.
324
+ */
325
+ svgIcon?: string;
326
+ };
264
327
  /**
265
328
  * A list of relative paths to folders containing extra services that are part of this service. Eg:
266
329
  * ```json
@@ -333,9 +396,6 @@ export type ProcessedManifest<B extends Buffer | ArrayBuffer = Buffer> = Omit<Pa
333
396
  version: string;
334
397
  };
335
398
  };
336
- export type RequireAtLeastOne<T, Keys extends keyof T = keyof T> = Pick<T, Exclude<keyof T, Keys>> & {
337
- [K in Keys]-?: Required<Pick<T, K>> & Partial<Pick<T, Exclude<Keys, K>>>;
338
- }[Keys];
339
399
  export type DefineDynamicPortsArgs = RequireAtLeastOne<{
340
400
  /**
341
401
  * Set to null to remove any previously defined ports or