mirta 0.1.1 → 0.1.2

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/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { Event } from '@mirta/basics';
1
+ import { OnEvent } from '@mirta/basics';
2
2
  export * from '@mirta/basics';
3
3
 
4
4
  type DeviceType = 'wired' | 'virtual' | 'zigbee';
@@ -91,9 +91,9 @@ interface Control<TValue> {
91
91
  /** Актуальное значение контрола. */
92
92
  value: TValue;
93
93
  /** Событие, происходящее когда поступило новое значение. */
94
- valueReceived: Event<ValueEventHandler<TValue>>;
94
+ onValueReceived: OnEvent<ValueEventHandler<TValue>>;
95
95
  /** Событие, происходящее когда значение изменилось. */
96
- valueChanged: Event<ValueEventHandler<TValue>>;
96
+ onValueChanged: OnEvent<ValueEventHandler<TValue>>;
97
97
  }
98
98
  type MaybeReadonlyControl<TValue, TReadonly extends boolean | undefined> = ReadonlyPropWhen<Control<TValue>, 'value', TReadonly>;
99
99
 
package/dist/index.mjs CHANGED
@@ -108,10 +108,8 @@ function createControl(context, controlId, options) {
108
108
  }
109
109
  setValue(newValue);
110
110
  },
111
- valueReceived: valueReceived
112
- .withoutRaise(),
113
- valueChanged: valueChanged
114
- .withoutRaise(),
111
+ onValueReceived: valueReceived.on,
112
+ onValueChanged: valueChanged.on,
115
113
  };
116
114
  }
117
115
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mirta",
3
3
  "description": "The powerful framework to write smart home automation scripts.",
4
- "version": "0.1.1",
4
+ "version": "0.1.2",
5
5
  "license": "Unlicense",
6
6
  "keywords": [
7
7
  "mirta",
@@ -36,9 +36,9 @@
36
36
  "url": "https://pay.cloudtips.ru/p/58512cca"
37
37
  },
38
38
  "dependencies": {
39
- "@mirta/basics": "0.1.1",
40
- "@mirta/polyfills": "0.1.1",
41
- "@mirta/globals": "0.1.1"
39
+ "@mirta/globals": "0.1.2",
40
+ "@mirta/polyfills": "0.1.2",
41
+ "@mirta/basics": "0.1.2"
42
42
  },
43
43
  "publishConfig": {
44
44
  "access": "public"