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 +3 -3
- package/dist/index.mjs +2 -4
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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
|
-
|
|
94
|
+
onValueReceived: OnEvent<ValueEventHandler<TValue>>;
|
|
95
95
|
/** Событие, происходящее когда значение изменилось. */
|
|
96
|
-
|
|
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
|
-
|
|
112
|
-
|
|
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.
|
|
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/
|
|
40
|
-
"@mirta/polyfills": "0.1.
|
|
41
|
-
"@mirta/
|
|
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"
|