@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 +1 -1
- package/runner.d.ts +7 -5
- package/runner.js +2 -2
package/package.json
CHANGED
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
|
|
138
|
-
|
|
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.
|
|
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>) => ()
|
|
208
|
+
onVariableChange: (varName: string, cb: (evt: Omit<VarValueChangeEvt, "isUIElement">) => void | Promise<void>) => import("emittery").UnsubscribeFunction;
|
|
207
209
|
};
|
|
208
210
|
|
|
209
211
|
export {
|