@kemu-io/edge-runtime 1.1.0 → 1.2.1

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kemu-io/edge-runtime",
3
3
  "type": "module",
4
- "version": "1.1.0",
4
+ "version": "1.2.1",
5
5
  "description": "Kemu Edge runtime for running Kemu recipes",
6
6
  "author": "Kemu Pty Ltd",
7
7
  "main": "runner.js",
package/runner.d.ts CHANGED
@@ -134,13 +134,15 @@ export type VariableDefinition = {
134
134
  storeValueInRecipe: boolean;
135
135
  /** the id of the widget that registered the variable */
136
136
  createdByWidgetId: string;
137
- /** indicates if the variable is a reference to a widget's custom field */
138
- isCustomFieldVar: boolean;
137
+ /** indicates if the variable is a reference to a widget's UI element */
138
+ isUIElement: boolean;
139
139
  /** the current value of the variable */
140
140
  value?: SupportedTypes;
141
141
  };
142
- export type VarValueChangeEvt = Readonly<Pick<VariableDefinition, "type" | "value"> & {
142
+ export type VarValueChangeEvt = Readonly<Pick<VariableDefinition, "type" | "value" | "isUIElement"> & {
143
143
  varName: string;
144
+ setByWidgetType: WidgetType;
145
+ setByWidgetId: string;
144
146
  }>;
145
147
  export type SendToInputWidgetFn = (inputName: string, data: PartialData | number | string | boolean | Array<any>) => Promise<void>;
146
148
  export declare const utils: {
@@ -199,11 +201,11 @@ declare const _default: {
199
201
  terminate: () => Promise<void>;
200
202
  /**
201
203
  * Sets a listener to changes in the value of a variable.
202
- * @param varName the name of the variable to listen to. Set it to `*` to listen to all variable changes.
204
+ * @param varName the name of the variable to listen to.
203
205
  * @param cb the callback function to be invoked.
204
206
  * @returns a function to remove the listener.
205
207
  */
206
- onVariableChange: (varName: string, cb: (evt: VarValueChangeEvt) => void | Promise<void>) => () => void;
208
+ onVariableChange: (varName: string, cb: (evt: Omit<VarValueChangeEvt, "isUIElement">) => void | Promise<void>) => import("emittery").UnsubscribeFunction;
207
209
  };
208
210
 
209
211
  export {