@camstack/types 1.2.145 → 1.2.146
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.js +10 -3
- package/dist/index.mjs +10 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -35575,10 +35575,17 @@ var CONTAINER_CHILD_ROLE_PRIORITY = [
|
|
|
35575
35575
|
"leak-sensor",
|
|
35576
35576
|
"vibration-sensor",
|
|
35577
35577
|
"tamper-sensor",
|
|
35578
|
-
"sound-sensor"
|
|
35579
|
-
"binary-sensor",
|
|
35580
|
-
"binary-helper"
|
|
35578
|
+
"sound-sensor"
|
|
35581
35579
|
];
|
|
35580
|
+
/**
|
|
35581
|
+
* NOT in the list, deliberately: `binary-sensor` and `binary-helper`. They are
|
|
35582
|
+
* GENERIC — they say "this reports a boolean", not what the container is — and
|
|
35583
|
+
* ranking them above type priority is a live regression, not a hypothetical:
|
|
35584
|
+
* container 1837 holds a real `lock` (features `['lock-open']`) alongside a
|
|
35585
|
+
* child named "Actuator" whose only role is `binary-sensor`, and the generic
|
|
35586
|
+
* role beat the lock. A role earns a place here by naming a SUBJECT (a contact,
|
|
35587
|
+
* a leak, smoke), never by naming a datatype.
|
|
35588
|
+
*/
|
|
35582
35589
|
function roleRank(role) {
|
|
35583
35590
|
if (role === void 0) return CONTAINER_CHILD_ROLE_PRIORITY.length;
|
|
35584
35591
|
const i = CONTAINER_CHILD_ROLE_PRIORITY.indexOf(role);
|
package/dist/index.mjs
CHANGED
|
@@ -35567,10 +35567,17 @@ var CONTAINER_CHILD_ROLE_PRIORITY = [
|
|
|
35567
35567
|
"leak-sensor",
|
|
35568
35568
|
"vibration-sensor",
|
|
35569
35569
|
"tamper-sensor",
|
|
35570
|
-
"sound-sensor"
|
|
35571
|
-
"binary-sensor",
|
|
35572
|
-
"binary-helper"
|
|
35570
|
+
"sound-sensor"
|
|
35573
35571
|
];
|
|
35572
|
+
/**
|
|
35573
|
+
* NOT in the list, deliberately: `binary-sensor` and `binary-helper`. They are
|
|
35574
|
+
* GENERIC — they say "this reports a boolean", not what the container is — and
|
|
35575
|
+
* ranking them above type priority is a live regression, not a hypothetical:
|
|
35576
|
+
* container 1837 holds a real `lock` (features `['lock-open']`) alongside a
|
|
35577
|
+
* child named "Actuator" whose only role is `binary-sensor`, and the generic
|
|
35578
|
+
* role beat the lock. A role earns a place here by naming a SUBJECT (a contact,
|
|
35579
|
+
* a leak, smoke), never by naming a datatype.
|
|
35580
|
+
*/
|
|
35574
35581
|
function roleRank(role) {
|
|
35575
35582
|
if (role === void 0) return CONTAINER_CHILD_ROLE_PRIORITY.length;
|
|
35576
35583
|
const i = CONTAINER_CHILD_ROLE_PRIORITY.indexOf(role);
|