@kemu-io/hs-react 0.2.37 → 0.2.39

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.
@@ -12,6 +12,7 @@ export type Point = {
12
12
  };
13
13
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
14
14
  format: string;
15
+ fileName?: string;
15
16
  data: D;
16
17
  };
17
18
  declare enum DataType {
@@ -119,6 +120,12 @@ export type WidgetPort = {
119
120
  jsonShape?: JsonTypeShape;
120
121
  /** help description markdown */
121
122
  description?: string;
123
+ /**
124
+ * If true, the port will be highlighted in the UI
125
+ * to indicate events on this port will start the
126
+ * processor execution.
127
+ */
128
+ triggerPort?: boolean;
122
129
  };
123
130
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
124
131
  export type TargetOutput = {
@@ -172,6 +179,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
172
179
  inputs?: P[];
173
180
  outputs?: P[];
174
181
  };
182
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
175
183
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
176
184
  /** the unique name defined by the service */
177
185
  name: string;
@@ -183,6 +191,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
183
191
  shortTitle?: string;
184
192
  description: string;
185
193
  processor: ProcessorType;
194
+ /** Id of the user that published the service */
195
+ author: string;
196
+ /** id of the item in the marketplace */
197
+ publicationId?: string;
186
198
  /**
187
199
  * if true, it indicates other services can subscribe
188
200
  * to events emitted by this service. Only services
@@ -290,6 +302,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
290
302
  requiredSecrets?: {
291
303
  [name: string]: ServiceSecret;
292
304
  };
305
+ /**
306
+ * A list of platforms that this service supports.
307
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
308
+ */
309
+ supportedPlatforms?: ValidPlatformArch[];
293
310
  };
294
311
  export type ServiceWidgetInfo = {
295
312
  name: string;
@@ -62,7 +62,7 @@ export type WrapperProps = {
62
62
  * export default createWidgetUI(MyWidgetUI, packageJson.name, packageJson.version);
63
63
  * ```
64
64
  */
65
- declare const ResizableContainer: (props: ResizableContainerProps & WrapperProps) => import("react/jsx-runtime").JSX.Element;
65
+ declare const ResizableContainer: (props: ResizableContainerProps & WrapperProps) => import("react/jsx-runtime.js").JSX.Element;
66
66
 
67
67
  export {
68
68
  ResizableContainer as default,
@@ -3,6 +3,11 @@ export type WrapperProps = {
3
3
  cHeight?: number | string;
4
4
  noPadding?: boolean;
5
5
  noBorderRadius?: boolean;
6
+ /**
7
+ * Overrides the default widget color from the manifest.
8
+ * If not set, the widget will use the color defined in its manifest file.
9
+ */
10
+ overrideColor?: string;
6
11
  };
7
12
  export type WidthLessProps = Omit<WrapperProps, "cWidth" | "cHeight"> & {
8
13
  width?: number | string;
@@ -11,7 +16,7 @@ export type WidthLessProps = Omit<WrapperProps, "cWidth" | "cHeight"> & {
11
16
  className?: string;
12
17
  style?: React.CSSProperties;
13
18
  };
14
- declare const Wrap: (p: WidthLessProps) => import("react/jsx-runtime").JSX.Element;
19
+ declare const Wrap: (p: WidthLessProps) => import("react/jsx-runtime.js").JSX.Element;
15
20
 
16
21
  export {
17
22
  Wrap as default,
@@ -1,12 +1,13 @@
1
1
  "use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});const jsx_runtime_1=require("react/jsx-runtime"),styled_1=__importDefault(require("@emotion/styled")),constants_js_1=require("../constants.js"),react_1=require("react"),InstanceContext_js_1=require("../lib/InstanceContext.js"),WidgetContainer=styled_1.default.div`
2
2
  width: ${({cWidth:e})=>"number"==typeof e?`${e}px`:e||"64px"};
3
3
  height: ${({cHeight:e})=>"number"==typeof e?`${e}px`:e||"64px"};
4
- background-color: ${({manifest:e,disabled:t,serviceOnline:s})=>t||!s?"#bbb":e.color};
4
+ background-color: ${({manifest:e,disabled:t,serviceOnline:r,overrideColor:i})=>t||!r?"#bbb":i||e.color};
5
5
  ${({noBorderRadius:e})=>e?"":"border-radius: 8px;"}
6
6
  ${({noPadding:e})=>e?"":"padding: 6px;"}
7
7
 
8
8
  /* Add a shadow when the widget is selected */
9
9
  .${constants_js_1.WIDGET_SELECTED_CLS} & {
10
- box-shadow: 0px 0px 7px 1px ${({manifest:e,disabled:t,serviceOnline:s})=>t||!s?"#bbb":e.color};
10
+ box-shadow: 0px 0px 7px 1px
11
+ ${({manifest:e,disabled:t,serviceOnline:r,overrideColor:i})=>t||!r?"#bbb":i||e.color};
11
12
  }
12
- `,Wrap=e=>{const t=(0,react_1.useContext)(InstanceContext_js_1.WidgetInstanceContext).getWidgetProps(),{className:s,width:r,height:n,...i}=e;return(0,jsx_runtime_1.jsx)(WidgetContainer,{cWidth:r,cHeight:n,...i,...t,className:`k-hs-wrap ${s||""}`,children:e.children})};exports.default=Wrap;
13
+ `,Wrap=e=>{const t=(0,react_1.useContext)(InstanceContext_js_1.WidgetInstanceContext).getWidgetProps(),{className:r,width:i,height:n,...o}=e,s=t.variantId?t.manifest.variants?.find((e=>e.id===t.variantId)):null,a=s?s.color||t.manifest.color:void 0;return(0,jsx_runtime_1.jsx)(WidgetContainer,{cWidth:i,cHeight:n,...o,...t,className:`k-hs-wrap ${r||""}`,overrideColor:e.overrideColor||a,children:e.children})};exports.default=Wrap;
@@ -62,12 +62,17 @@ export type WrapperProps = {
62
62
  * export default createWidgetUI(MyWidgetUI, packageJson.name, packageJson.version);
63
63
  * ```
64
64
  */
65
- export declare const ResizableContainer: (props: ResizableContainerProps & WrapperProps) => import("react/jsx-runtime").JSX.Element;
65
+ export declare const ResizableContainer: (props: ResizableContainerProps & WrapperProps) => import("react/jsx-runtime.js").JSX.Element;
66
66
  type WrapperProps$1 = {
67
67
  cWidth?: number | string;
68
68
  cHeight?: number | string;
69
69
  noPadding?: boolean;
70
70
  noBorderRadius?: boolean;
71
+ /**
72
+ * Overrides the default widget color from the manifest.
73
+ * If not set, the widget will use the color defined in its manifest file.
74
+ */
75
+ overrideColor?: string;
71
76
  };
72
77
  export type WidthLessProps = Omit<WrapperProps$1, "cWidth" | "cHeight"> & {
73
78
  width?: number | string;
@@ -76,7 +81,7 @@ export type WidthLessProps = Omit<WrapperProps$1, "cWidth" | "cHeight"> & {
76
81
  className?: string;
77
82
  style?: React$1.CSSProperties;
78
83
  };
79
- declare const Wrap: (p: WidthLessProps) => import("react/jsx-runtime").JSX.Element;
84
+ declare const Wrap: (p: WidthLessProps) => import("react/jsx-runtime.js").JSX.Element;
80
85
 
81
86
  export {
82
87
  Wrap as WidgetContainer,
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -117,6 +118,12 @@ export type WidgetPort = {
117
118
  jsonShape?: JsonTypeShape;
118
119
  /** help description markdown */
119
120
  description?: string;
121
+ /**
122
+ * If true, the port will be highlighted in the UI
123
+ * to indicate events on this port will start the
124
+ * processor execution.
125
+ */
126
+ triggerPort?: boolean;
120
127
  };
121
128
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
122
129
  export type TargetOutput = {
@@ -170,6 +177,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
170
177
  inputs?: P[];
171
178
  outputs?: P[];
172
179
  };
180
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
173
181
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
174
182
  /** the unique name defined by the service */
175
183
  name: string;
@@ -181,6 +189,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
181
189
  shortTitle?: string;
182
190
  description: string;
183
191
  processor: ProcessorType;
192
+ /** Id of the user that published the service */
193
+ author: string;
194
+ /** id of the item in the marketplace */
195
+ publicationId?: string;
184
196
  /**
185
197
  * if true, it indicates other services can subscribe
186
198
  * to events emitted by this service. Only services
@@ -288,6 +300,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
288
300
  requiredSecrets?: {
289
301
  [name: string]: ServiceSecret;
290
302
  };
303
+ /**
304
+ * A list of platforms that this service supports.
305
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
306
+ */
307
+ supportedPlatforms?: ValidPlatformArch[];
291
308
  };
292
309
  export type ServiceWidgetInfo = {
293
310
  name: string;
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -117,6 +118,12 @@ export type WidgetPort = {
117
118
  jsonShape?: JsonTypeShape;
118
119
  /** help description markdown */
119
120
  description?: string;
121
+ /**
122
+ * If true, the port will be highlighted in the UI
123
+ * to indicate events on this port will start the
124
+ * processor execution.
125
+ */
126
+ triggerPort?: boolean;
120
127
  };
121
128
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
122
129
  export type TargetOutput = {
@@ -170,6 +177,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
170
177
  inputs?: P[];
171
178
  outputs?: P[];
172
179
  };
180
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
173
181
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
174
182
  /** the unique name defined by the service */
175
183
  name: string;
@@ -181,6 +189,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
181
189
  shortTitle?: string;
182
190
  description: string;
183
191
  processor: ProcessorType;
192
+ /** Id of the user that published the service */
193
+ author: string;
194
+ /** id of the item in the marketplace */
195
+ publicationId?: string;
184
196
  /**
185
197
  * if true, it indicates other services can subscribe
186
198
  * to events emitted by this service. Only services
@@ -288,6 +300,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
288
300
  requiredSecrets?: {
289
301
  [name: string]: ServiceSecret;
290
302
  };
303
+ /**
304
+ * A list of platforms that this service supports.
305
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
306
+ */
307
+ supportedPlatforms?: ValidPlatformArch[];
291
308
  };
292
309
  export type ServiceWidgetInfo = {
293
310
  name: string;
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -117,6 +118,12 @@ export type WidgetPort = {
117
118
  jsonShape?: JsonTypeShape;
118
119
  /** help description markdown */
119
120
  description?: string;
121
+ /**
122
+ * If true, the port will be highlighted in the UI
123
+ * to indicate events on this port will start the
124
+ * processor execution.
125
+ */
126
+ triggerPort?: boolean;
120
127
  };
121
128
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
122
129
  export type TargetOutput = {
@@ -170,6 +177,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
170
177
  inputs?: P[];
171
178
  outputs?: P[];
172
179
  };
180
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
173
181
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
174
182
  /** the unique name defined by the service */
175
183
  name: string;
@@ -181,6 +189,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
181
189
  shortTitle?: string;
182
190
  description: string;
183
191
  processor: ProcessorType;
192
+ /** Id of the user that published the service */
193
+ author: string;
194
+ /** id of the item in the marketplace */
195
+ publicationId?: string;
184
196
  /**
185
197
  * if true, it indicates other services can subscribe
186
198
  * to events emitted by this service. Only services
@@ -288,6 +300,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
288
300
  requiredSecrets?: {
289
301
  [name: string]: ServiceSecret;
290
302
  };
303
+ /**
304
+ * A list of platforms that this service supports.
305
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
306
+ */
307
+ supportedPlatforms?: ValidPlatformArch[];
291
308
  };
292
309
  export type ServiceWidgetInfo = {
293
310
  name: string;
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -117,6 +118,12 @@ export type WidgetPort = {
117
118
  jsonShape?: JsonTypeShape;
118
119
  /** help description markdown */
119
120
  description?: string;
121
+ /**
122
+ * If true, the port will be highlighted in the UI
123
+ * to indicate events on this port will start the
124
+ * processor execution.
125
+ */
126
+ triggerPort?: boolean;
120
127
  };
121
128
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
122
129
  export type TargetOutput = {
@@ -170,6 +177,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
170
177
  inputs?: P[];
171
178
  outputs?: P[];
172
179
  };
180
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
173
181
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
174
182
  /** the unique name defined by the service */
175
183
  name: string;
@@ -181,6 +189,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
181
189
  shortTitle?: string;
182
190
  description: string;
183
191
  processor: ProcessorType;
192
+ /** Id of the user that published the service */
193
+ author: string;
194
+ /** id of the item in the marketplace */
195
+ publicationId?: string;
184
196
  /**
185
197
  * if true, it indicates other services can subscribe
186
198
  * to events emitted by this service. Only services
@@ -288,6 +300,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
288
300
  requiredSecrets?: {
289
301
  [name: string]: ServiceSecret;
290
302
  };
303
+ /**
304
+ * A list of platforms that this service supports.
305
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
306
+ */
307
+ supportedPlatforms?: ValidPlatformArch[];
291
308
  };
292
309
  export type ServiceWidgetInfo = {
293
310
  name: string;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const react_1=require("react"),globalContext_js_1=require("../lib/globalContext.js"),useReactiveWidgetState=(t,e)=>{const a=(0,globalContext_js_1.getContext)(),{state:r,getState:s,setState:o}=a.useWidgetState();return[{...t,...r},(0,react_1.useCallback)((async(a,r=!0)=>{let i=a;const n={...t,...s()};if("function"==typeof a&&(i=await a(n)),e){if(!e(n,i))return}return o(i,r)}),[s,t])]};exports.default=useReactiveWidgetState;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const react_1=require("react"),globalContext_js_1=require("../lib/globalContext.js"),useReactiveWidgetState=(t,e)=>{const a=(0,globalContext_js_1.getContext)(),{state:r,getState:s,setState:o}=a.useWidgetState();return[{...t,...r},(0,react_1.useCallback)((async(a,r=!0)=>{let i=a;const n={...t,...s()};if("function"==typeof a&&(i=await a(n)),e){if(!e(n,i))return}return o(i,r)}),[s])]};exports.default=useReactiveWidgetState;
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -117,6 +118,12 @@ export type WidgetPort = {
117
118
  jsonShape?: JsonTypeShape;
118
119
  /** help description markdown */
119
120
  description?: string;
121
+ /**
122
+ * If true, the port will be highlighted in the UI
123
+ * to indicate events on this port will start the
124
+ * processor execution.
125
+ */
126
+ triggerPort?: boolean;
120
127
  };
121
128
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
122
129
  export type TargetOutput = {
@@ -170,6 +177,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
170
177
  inputs?: P[];
171
178
  outputs?: P[];
172
179
  };
180
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
173
181
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
174
182
  /** the unique name defined by the service */
175
183
  name: string;
@@ -181,6 +189,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
181
189
  shortTitle?: string;
182
190
  description: string;
183
191
  processor: ProcessorType;
192
+ /** Id of the user that published the service */
193
+ author: string;
194
+ /** id of the item in the marketplace */
195
+ publicationId?: string;
184
196
  /**
185
197
  * if true, it indicates other services can subscribe
186
198
  * to events emitted by this service. Only services
@@ -288,6 +300,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
288
300
  requiredSecrets?: {
289
301
  [name: string]: ServiceSecret;
290
302
  };
303
+ /**
304
+ * A list of platforms that this service supports.
305
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
306
+ */
307
+ supportedPlatforms?: ValidPlatformArch[];
291
308
  };
292
309
  export type ServiceWidgetInfo = {
293
310
  name: string;
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -109,6 +110,12 @@ export type WidgetPort = {
109
110
  jsonShape?: JsonTypeShape;
110
111
  /** help description markdown */
111
112
  description?: string;
113
+ /**
114
+ * If true, the port will be highlighted in the UI
115
+ * to indicate events on this port will start the
116
+ * processor execution.
117
+ */
118
+ triggerPort?: boolean;
112
119
  };
113
120
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
114
121
  export type TargetOutput = {
@@ -162,6 +169,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
162
169
  inputs?: P[];
163
170
  outputs?: P[];
164
171
  };
172
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
165
173
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
166
174
  /** the unique name defined by the service */
167
175
  name: string;
@@ -173,6 +181,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
173
181
  shortTitle?: string;
174
182
  description: string;
175
183
  processor: ProcessorType;
184
+ /** Id of the user that published the service */
185
+ author: string;
186
+ /** id of the item in the marketplace */
187
+ publicationId?: string;
176
188
  /**
177
189
  * if true, it indicates other services can subscribe
178
190
  * to events emitted by this service. Only services
@@ -280,6 +292,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
280
292
  requiredSecrets?: {
281
293
  [name: string]: ServiceSecret;
282
294
  };
295
+ /**
296
+ * A list of platforms that this service supports.
297
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
298
+ */
299
+ supportedPlatforms?: ValidPlatformArch[];
283
300
  };
284
301
  export type ServiceWidgetInfo = {
285
302
  name: string;
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -109,6 +110,12 @@ export type WidgetPort = {
109
110
  jsonShape?: JsonTypeShape;
110
111
  /** help description markdown */
111
112
  description?: string;
113
+ /**
114
+ * If true, the port will be highlighted in the UI
115
+ * to indicate events on this port will start the
116
+ * processor execution.
117
+ */
118
+ triggerPort?: boolean;
112
119
  };
113
120
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
114
121
  export type TargetOutput = {
@@ -162,6 +169,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
162
169
  inputs?: P[];
163
170
  outputs?: P[];
164
171
  };
172
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
165
173
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
166
174
  /** the unique name defined by the service */
167
175
  name: string;
@@ -173,6 +181,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
173
181
  shortTitle?: string;
174
182
  description: string;
175
183
  processor: ProcessorType;
184
+ /** Id of the user that published the service */
185
+ author: string;
186
+ /** id of the item in the marketplace */
187
+ publicationId?: string;
176
188
  /**
177
189
  * if true, it indicates other services can subscribe
178
190
  * to events emitted by this service. Only services
@@ -280,6 +292,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
280
292
  requiredSecrets?: {
281
293
  [name: string]: ServiceSecret;
282
294
  };
295
+ /**
296
+ * A list of platforms that this service supports.
297
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
298
+ */
299
+ supportedPlatforms?: ValidPlatformArch[];
283
300
  };
284
301
  export type ServiceWidgetInfo = {
285
302
  name: string;
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -117,6 +118,12 @@ export type WidgetPort = {
117
118
  jsonShape?: JsonTypeShape;
118
119
  /** help description markdown */
119
120
  description?: string;
121
+ /**
122
+ * If true, the port will be highlighted in the UI
123
+ * to indicate events on this port will start the
124
+ * processor execution.
125
+ */
126
+ triggerPort?: boolean;
120
127
  };
121
128
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
122
129
  export type TargetOutput = {
@@ -170,6 +177,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
170
177
  inputs?: P[];
171
178
  outputs?: P[];
172
179
  };
180
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
173
181
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
174
182
  /** the unique name defined by the service */
175
183
  name: string;
@@ -181,6 +189,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
181
189
  shortTitle?: string;
182
190
  description: string;
183
191
  processor: ProcessorType;
192
+ /** Id of the user that published the service */
193
+ author: string;
194
+ /** id of the item in the marketplace */
195
+ publicationId?: string;
184
196
  /**
185
197
  * if true, it indicates other services can subscribe
186
198
  * to events emitted by this service. Only services
@@ -288,6 +300,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
288
300
  requiredSecrets?: {
289
301
  [name: string]: ServiceSecret;
290
302
  };
303
+ /**
304
+ * A list of platforms that this service supports.
305
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
306
+ */
307
+ supportedPlatforms?: ValidPlatformArch[];
291
308
  };
292
309
  export type ServiceWidgetInfo = {
293
310
  name: string;
@@ -12,6 +12,7 @@ export type Point = {
12
12
  };
13
13
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
14
14
  format: string;
15
+ fileName?: string;
15
16
  data: D;
16
17
  };
17
18
  declare enum DataType {
@@ -119,6 +120,12 @@ export type WidgetPort = {
119
120
  jsonShape?: JsonTypeShape;
120
121
  /** help description markdown */
121
122
  description?: string;
123
+ /**
124
+ * If true, the port will be highlighted in the UI
125
+ * to indicate events on this port will start the
126
+ * processor execution.
127
+ */
128
+ triggerPort?: boolean;
122
129
  };
123
130
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
124
131
  export type TargetOutput = {
@@ -172,6 +179,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
172
179
  inputs?: P[];
173
180
  outputs?: P[];
174
181
  };
182
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
175
183
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
176
184
  /** the unique name defined by the service */
177
185
  name: string;
@@ -183,6 +191,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
183
191
  shortTitle?: string;
184
192
  description: string;
185
193
  processor: ProcessorType;
194
+ /** Id of the user that published the service */
195
+ author: string;
196
+ /** id of the item in the marketplace */
197
+ publicationId?: string;
186
198
  /**
187
199
  * if true, it indicates other services can subscribe
188
200
  * to events emitted by this service. Only services
@@ -290,6 +302,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
290
302
  requiredSecrets?: {
291
303
  [name: string]: ServiceSecret;
292
304
  };
305
+ /**
306
+ * A list of platforms that this service supports.
307
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
308
+ */
309
+ supportedPlatforms?: ValidPlatformArch[];
293
310
  };
294
311
  export type ServiceWidgetInfo = {
295
312
  name: string;
@@ -62,7 +62,7 @@ export type WrapperProps = {
62
62
  * export default createWidgetUI(MyWidgetUI, packageJson.name, packageJson.version);
63
63
  * ```
64
64
  */
65
- declare const ResizableContainer: (props: ResizableContainerProps & WrapperProps) => import("react/jsx-runtime").JSX.Element;
65
+ declare const ResizableContainer: (props: ResizableContainerProps & WrapperProps) => import("react/jsx-runtime.js").JSX.Element;
66
66
 
67
67
  export {
68
68
  ResizableContainer as default,
@@ -3,6 +3,11 @@ export type WrapperProps = {
3
3
  cHeight?: number | string;
4
4
  noPadding?: boolean;
5
5
  noBorderRadius?: boolean;
6
+ /**
7
+ * Overrides the default widget color from the manifest.
8
+ * If not set, the widget will use the color defined in its manifest file.
9
+ */
10
+ overrideColor?: string;
6
11
  };
7
12
  export type WidthLessProps = Omit<WrapperProps, "cWidth" | "cHeight"> & {
8
13
  width?: number | string;
@@ -11,7 +16,7 @@ export type WidthLessProps = Omit<WrapperProps, "cWidth" | "cHeight"> & {
11
16
  className?: string;
12
17
  style?: React.CSSProperties;
13
18
  };
14
- declare const Wrap: (p: WidthLessProps) => import("react/jsx-runtime").JSX.Element;
19
+ declare const Wrap: (p: WidthLessProps) => import("react/jsx-runtime.js").JSX.Element;
15
20
 
16
21
  export {
17
22
  Wrap as default,
@@ -1,12 +1,13 @@
1
1
  import{jsx as _jsx}from"react/jsx-runtime";import styled from"@emotion/styled";import{WIDGET_SELECTED_CLS}from"../constants.js";import{useContext}from"react";import{WidgetInstanceContext}from"../lib/InstanceContext.js";const WidgetContainer=styled.div`
2
2
  width: ${({cWidth:e})=>"number"==typeof e?`${e}px`:e||"64px"};
3
3
  height: ${({cHeight:e})=>"number"==typeof e?`${e}px`:e||"64px"};
4
- background-color: ${({manifest:e,disabled:t,serviceOnline:i})=>t||!i?"#bbb":e.color};
4
+ background-color: ${({manifest:e,disabled:t,serviceOnline:o,overrideColor:r})=>t||!o?"#bbb":r||e.color};
5
5
  ${({noBorderRadius:e})=>e?"":"border-radius: 8px;"}
6
6
  ${({noPadding:e})=>e?"":"padding: 6px;"}
7
7
 
8
8
  /* Add a shadow when the widget is selected */
9
9
  .${WIDGET_SELECTED_CLS} & {
10
- box-shadow: 0px 0px 7px 1px ${({manifest:e,disabled:t,serviceOnline:i})=>t||!i?"#bbb":e.color};
10
+ box-shadow: 0px 0px 7px 1px
11
+ ${({manifest:e,disabled:t,serviceOnline:o,overrideColor:r})=>t||!o?"#bbb":r||e.color};
11
12
  }
12
- `,Wrap=e=>{const t=useContext(WidgetInstanceContext).getWidgetProps(),{className:i,width:o,height:n,...r}=e;return _jsx(WidgetContainer,{cWidth:o,cHeight:n,...r,...t,className:`k-hs-wrap ${i||""}`,children:e.children})};export default Wrap;
13
+ `,Wrap=e=>{const t=useContext(WidgetInstanceContext).getWidgetProps(),{className:o,width:r,height:i,...n}=e,d=t.variantId?t.manifest.variants?.find((e=>e.id===t.variantId)):null,s=d?d.color||t.manifest.color:void 0;return _jsx(WidgetContainer,{cWidth:r,cHeight:i,...n,...t,className:`k-hs-wrap ${o||""}`,overrideColor:e.overrideColor||s,children:e.children})};export default Wrap;
@@ -62,12 +62,17 @@ export type WrapperProps = {
62
62
  * export default createWidgetUI(MyWidgetUI, packageJson.name, packageJson.version);
63
63
  * ```
64
64
  */
65
- export declare const ResizableContainer: (props: ResizableContainerProps & WrapperProps) => import("react/jsx-runtime").JSX.Element;
65
+ export declare const ResizableContainer: (props: ResizableContainerProps & WrapperProps) => import("react/jsx-runtime.js").JSX.Element;
66
66
  type WrapperProps$1 = {
67
67
  cWidth?: number | string;
68
68
  cHeight?: number | string;
69
69
  noPadding?: boolean;
70
70
  noBorderRadius?: boolean;
71
+ /**
72
+ * Overrides the default widget color from the manifest.
73
+ * If not set, the widget will use the color defined in its manifest file.
74
+ */
75
+ overrideColor?: string;
71
76
  };
72
77
  export type WidthLessProps = Omit<WrapperProps$1, "cWidth" | "cHeight"> & {
73
78
  width?: number | string;
@@ -76,7 +81,7 @@ export type WidthLessProps = Omit<WrapperProps$1, "cWidth" | "cHeight"> & {
76
81
  className?: string;
77
82
  style?: React$1.CSSProperties;
78
83
  };
79
- declare const Wrap: (p: WidthLessProps) => import("react/jsx-runtime").JSX.Element;
84
+ declare const Wrap: (p: WidthLessProps) => import("react/jsx-runtime.js").JSX.Element;
80
85
 
81
86
  export {
82
87
  Wrap as WidgetContainer,
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -117,6 +118,12 @@ export type WidgetPort = {
117
118
  jsonShape?: JsonTypeShape;
118
119
  /** help description markdown */
119
120
  description?: string;
121
+ /**
122
+ * If true, the port will be highlighted in the UI
123
+ * to indicate events on this port will start the
124
+ * processor execution.
125
+ */
126
+ triggerPort?: boolean;
120
127
  };
121
128
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
122
129
  export type TargetOutput = {
@@ -170,6 +177,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
170
177
  inputs?: P[];
171
178
  outputs?: P[];
172
179
  };
180
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
173
181
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
174
182
  /** the unique name defined by the service */
175
183
  name: string;
@@ -181,6 +189,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
181
189
  shortTitle?: string;
182
190
  description: string;
183
191
  processor: ProcessorType;
192
+ /** Id of the user that published the service */
193
+ author: string;
194
+ /** id of the item in the marketplace */
195
+ publicationId?: string;
184
196
  /**
185
197
  * if true, it indicates other services can subscribe
186
198
  * to events emitted by this service. Only services
@@ -288,6 +300,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
288
300
  requiredSecrets?: {
289
301
  [name: string]: ServiceSecret;
290
302
  };
303
+ /**
304
+ * A list of platforms that this service supports.
305
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
306
+ */
307
+ supportedPlatforms?: ValidPlatformArch[];
291
308
  };
292
309
  export type ServiceWidgetInfo = {
293
310
  name: string;
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -117,6 +118,12 @@ export type WidgetPort = {
117
118
  jsonShape?: JsonTypeShape;
118
119
  /** help description markdown */
119
120
  description?: string;
121
+ /**
122
+ * If true, the port will be highlighted in the UI
123
+ * to indicate events on this port will start the
124
+ * processor execution.
125
+ */
126
+ triggerPort?: boolean;
120
127
  };
121
128
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
122
129
  export type TargetOutput = {
@@ -170,6 +177,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
170
177
  inputs?: P[];
171
178
  outputs?: P[];
172
179
  };
180
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
173
181
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
174
182
  /** the unique name defined by the service */
175
183
  name: string;
@@ -181,6 +189,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
181
189
  shortTitle?: string;
182
190
  description: string;
183
191
  processor: ProcessorType;
192
+ /** Id of the user that published the service */
193
+ author: string;
194
+ /** id of the item in the marketplace */
195
+ publicationId?: string;
184
196
  /**
185
197
  * if true, it indicates other services can subscribe
186
198
  * to events emitted by this service. Only services
@@ -288,6 +300,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
288
300
  requiredSecrets?: {
289
301
  [name: string]: ServiceSecret;
290
302
  };
303
+ /**
304
+ * A list of platforms that this service supports.
305
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
306
+ */
307
+ supportedPlatforms?: ValidPlatformArch[];
291
308
  };
292
309
  export type ServiceWidgetInfo = {
293
310
  name: string;
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -117,6 +118,12 @@ export type WidgetPort = {
117
118
  jsonShape?: JsonTypeShape;
118
119
  /** help description markdown */
119
120
  description?: string;
121
+ /**
122
+ * If true, the port will be highlighted in the UI
123
+ * to indicate events on this port will start the
124
+ * processor execution.
125
+ */
126
+ triggerPort?: boolean;
120
127
  };
121
128
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
122
129
  export type TargetOutput = {
@@ -170,6 +177,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
170
177
  inputs?: P[];
171
178
  outputs?: P[];
172
179
  };
180
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
173
181
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
174
182
  /** the unique name defined by the service */
175
183
  name: string;
@@ -181,6 +189,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
181
189
  shortTitle?: string;
182
190
  description: string;
183
191
  processor: ProcessorType;
192
+ /** Id of the user that published the service */
193
+ author: string;
194
+ /** id of the item in the marketplace */
195
+ publicationId?: string;
184
196
  /**
185
197
  * if true, it indicates other services can subscribe
186
198
  * to events emitted by this service. Only services
@@ -288,6 +300,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
288
300
  requiredSecrets?: {
289
301
  [name: string]: ServiceSecret;
290
302
  };
303
+ /**
304
+ * A list of platforms that this service supports.
305
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
306
+ */
307
+ supportedPlatforms?: ValidPlatformArch[];
291
308
  };
292
309
  export type ServiceWidgetInfo = {
293
310
  name: string;
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -117,6 +118,12 @@ export type WidgetPort = {
117
118
  jsonShape?: JsonTypeShape;
118
119
  /** help description markdown */
119
120
  description?: string;
121
+ /**
122
+ * If true, the port will be highlighted in the UI
123
+ * to indicate events on this port will start the
124
+ * processor execution.
125
+ */
126
+ triggerPort?: boolean;
120
127
  };
121
128
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
122
129
  export type TargetOutput = {
@@ -170,6 +177,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
170
177
  inputs?: P[];
171
178
  outputs?: P[];
172
179
  };
180
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
173
181
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
174
182
  /** the unique name defined by the service */
175
183
  name: string;
@@ -181,6 +189,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
181
189
  shortTitle?: string;
182
190
  description: string;
183
191
  processor: ProcessorType;
192
+ /** Id of the user that published the service */
193
+ author: string;
194
+ /** id of the item in the marketplace */
195
+ publicationId?: string;
184
196
  /**
185
197
  * if true, it indicates other services can subscribe
186
198
  * to events emitted by this service. Only services
@@ -288,6 +300,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
288
300
  requiredSecrets?: {
289
301
  [name: string]: ServiceSecret;
290
302
  };
303
+ /**
304
+ * A list of platforms that this service supports.
305
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
306
+ */
307
+ supportedPlatforms?: ValidPlatformArch[];
291
308
  };
292
309
  export type ServiceWidgetInfo = {
293
310
  name: string;
@@ -1 +1 @@
1
- import{useCallback}from"react";import{getContext}from"../lib/globalContext.js";const useReactiveWidgetState=(t,e)=>{const a=getContext(),{state:o,getState:i,setState:n}=a.useWidgetState();return[{...t,...o},useCallback((async(a,o=!0)=>{let r=a;const s={...t,...i()};if("function"==typeof a&&(r=await a(s)),e){if(!e(s,r))return}return n(r,o)}),[i,t])]};export default useReactiveWidgetState;
1
+ import{useCallback}from"react";import{getContext}from"../lib/globalContext.js";const useReactiveWidgetState=(t,e)=>{const a=getContext(),{state:o,getState:i,setState:n}=a.useWidgetState();return[{...t,...o},useCallback((async(a,o=!0)=>{let r=a;const s={...t,...i()};if("function"==typeof a&&(r=await a(s)),e){if(!e(s,r))return}return n(r,o)}),[i])]};export default useReactiveWidgetState;
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -117,6 +118,12 @@ export type WidgetPort = {
117
118
  jsonShape?: JsonTypeShape;
118
119
  /** help description markdown */
119
120
  description?: string;
121
+ /**
122
+ * If true, the port will be highlighted in the UI
123
+ * to indicate events on this port will start the
124
+ * processor execution.
125
+ */
126
+ triggerPort?: boolean;
120
127
  };
121
128
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
122
129
  export type TargetOutput = {
@@ -170,6 +177,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
170
177
  inputs?: P[];
171
178
  outputs?: P[];
172
179
  };
180
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
173
181
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
174
182
  /** the unique name defined by the service */
175
183
  name: string;
@@ -181,6 +189,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
181
189
  shortTitle?: string;
182
190
  description: string;
183
191
  processor: ProcessorType;
192
+ /** Id of the user that published the service */
193
+ author: string;
194
+ /** id of the item in the marketplace */
195
+ publicationId?: string;
184
196
  /**
185
197
  * if true, it indicates other services can subscribe
186
198
  * to events emitted by this service. Only services
@@ -288,6 +300,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
288
300
  requiredSecrets?: {
289
301
  [name: string]: ServiceSecret;
290
302
  };
303
+ /**
304
+ * A list of platforms that this service supports.
305
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
306
+ */
307
+ supportedPlatforms?: ValidPlatformArch[];
291
308
  };
292
309
  export type ServiceWidgetInfo = {
293
310
  name: string;
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -109,6 +110,12 @@ export type WidgetPort = {
109
110
  jsonShape?: JsonTypeShape;
110
111
  /** help description markdown */
111
112
  description?: string;
113
+ /**
114
+ * If true, the port will be highlighted in the UI
115
+ * to indicate events on this port will start the
116
+ * processor execution.
117
+ */
118
+ triggerPort?: boolean;
112
119
  };
113
120
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
114
121
  export type TargetOutput = {
@@ -162,6 +169,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
162
169
  inputs?: P[];
163
170
  outputs?: P[];
164
171
  };
172
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
165
173
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
166
174
  /** the unique name defined by the service */
167
175
  name: string;
@@ -173,6 +181,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
173
181
  shortTitle?: string;
174
182
  description: string;
175
183
  processor: ProcessorType;
184
+ /** Id of the user that published the service */
185
+ author: string;
186
+ /** id of the item in the marketplace */
187
+ publicationId?: string;
176
188
  /**
177
189
  * if true, it indicates other services can subscribe
178
190
  * to events emitted by this service. Only services
@@ -280,6 +292,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
280
292
  requiredSecrets?: {
281
293
  [name: string]: ServiceSecret;
282
294
  };
295
+ /**
296
+ * A list of platforms that this service supports.
297
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
298
+ */
299
+ supportedPlatforms?: ValidPlatformArch[];
283
300
  };
284
301
  export type ServiceWidgetInfo = {
285
302
  name: string;
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -109,6 +110,12 @@ export type WidgetPort = {
109
110
  jsonShape?: JsonTypeShape;
110
111
  /** help description markdown */
111
112
  description?: string;
113
+ /**
114
+ * If true, the port will be highlighted in the UI
115
+ * to indicate events on this port will start the
116
+ * processor execution.
117
+ */
118
+ triggerPort?: boolean;
112
119
  };
113
120
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
114
121
  export type TargetOutput = {
@@ -162,6 +169,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
162
169
  inputs?: P[];
163
170
  outputs?: P[];
164
171
  };
172
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
165
173
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
166
174
  /** the unique name defined by the service */
167
175
  name: string;
@@ -173,6 +181,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
173
181
  shortTitle?: string;
174
182
  description: string;
175
183
  processor: ProcessorType;
184
+ /** Id of the user that published the service */
185
+ author: string;
186
+ /** id of the item in the marketplace */
187
+ publicationId?: string;
176
188
  /**
177
189
  * if true, it indicates other services can subscribe
178
190
  * to events emitted by this service. Only services
@@ -280,6 +292,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
280
292
  requiredSecrets?: {
281
293
  [name: string]: ServiceSecret;
282
294
  };
295
+ /**
296
+ * A list of platforms that this service supports.
297
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
298
+ */
299
+ supportedPlatforms?: ValidPlatformArch[];
283
300
  };
284
301
  export type ServiceWidgetInfo = {
285
302
  name: string;
@@ -10,6 +10,7 @@ export type Point = {
10
10
  };
11
11
  export type BinaryFile<D extends ArrayBuffer | Uint8Array | Uint8ClampedArray | Buffer = ArrayBuffer> = {
12
12
  format: string;
13
+ fileName?: string;
13
14
  data: D;
14
15
  };
15
16
  declare enum DataType {
@@ -117,6 +118,12 @@ export type WidgetPort = {
117
118
  jsonShape?: JsonTypeShape;
118
119
  /** help description markdown */
119
120
  description?: string;
121
+ /**
122
+ * If true, the port will be highlighted in the UI
123
+ * to indicate events on this port will start the
124
+ * processor execution.
125
+ */
126
+ triggerPort?: boolean;
120
127
  };
121
128
  export type WidgetState<T extends Record<string, any> = Record<string, unknown>> = T;
122
129
  export type TargetOutput = {
@@ -170,6 +177,7 @@ export type ServiceWidgetVariant<P extends WidgetPort | WidgetPortStr> = {
170
177
  inputs?: P[];
171
178
  outputs?: P[];
172
179
  };
180
+ export type ValidPlatformArch = "win-x64" | "win-x86" | "win-arm" | "win-arm64" | "osx-x64" | "osx-arm64";
173
181
  export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
174
182
  /** the unique name defined by the service */
175
183
  name: string;
@@ -181,6 +189,10 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
181
189
  shortTitle?: string;
182
190
  description: string;
183
191
  processor: ProcessorType;
192
+ /** Id of the user that published the service */
193
+ author: string;
194
+ /** id of the item in the marketplace */
195
+ publicationId?: string;
184
196
  /**
185
197
  * if true, it indicates other services can subscribe
186
198
  * to events emitted by this service. Only services
@@ -288,6 +300,11 @@ export type ServiceManifest<P extends WidgetPort | WidgetPortStr> = {
288
300
  requiredSecrets?: {
289
301
  [name: string]: ServiceSecret;
290
302
  };
303
+ /**
304
+ * A list of platforms that this service supports.
305
+ * If not provided, it will default to 'win-x86', 'win-x64', 'osx-x64' and 'osx-arm64'.
306
+ */
307
+ supportedPlatforms?: ValidPlatformArch[];
291
308
  };
292
309
  export type ServiceWidgetInfo = {
293
310
  name: string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kemu-io/hs-react",
3
3
  "type": "module",
4
- "version": "0.2.37",
4
+ "version": "0.2.39",
5
5
  "description": "Kemu Hub Service library for React",
6
6
  "author": "Kemu Pty Ltd",
7
7
  "main": "cjs/WidgetWrapper.js",