fix: restore resize DOM after live reconciliation

Issue: #451
User-Visible: no
This commit is contained in:
Sergey Matyunin
2026-09-05 00:38:19 +03:00
parent d513f13afa
commit 046efe9613
29 changed files with 340 additions and 340 deletions
@@ -1,182 +1,182 @@
{
"schema": 1,
"fingerprint": "0986ea06640c35403b6bdadfa45887f20d5d9c1af28af7c55d6cc45baaaa4b89",
"fingerprint": "ef5a5d97bf3ee137f49700014533195c13e361a1e576611930e1691e9b897597",
"entry": "houseplan-card.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-DcwcaGuA.js",
"houseplan-assets/houseplan-card-BL0VKqIs.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 296717,
"initialViewGzipBytes": 296727,
"lazyFiles": [
"houseplan-assets/backdrop-pick-CCkpFhpB.js",
"houseplan-assets/de-B6l175Mv.js",
"houseplan-assets/editor-DakXuDoy.js",
"houseplan-assets/fr-B_PSzbu1.js",
"houseplan-assets/houseplan-editor-runtime-D-7ZZIFT.js",
"houseplan-assets/houseplan-onboarding-runtime-BHREjAeZ.js",
"houseplan-assets/hp-zigbee-topology-overlay-BPxD53tt.js",
"houseplan-assets/live-interaction-runtime-qQpeQbgb.js",
"houseplan-assets/zigbee-topology-CSEeJmM7.js",
"houseplan-assets/zigbee-topology-runtime-DLrjnlUM.js"
"houseplan-assets/backdrop-pick-3--jwtiu.js",
"houseplan-assets/de-BdA6QNeW.js",
"houseplan-assets/editor-CxD1MzZV.js",
"houseplan-assets/fr-BKs-Jkxs.js",
"houseplan-assets/houseplan-editor-runtime-Hmf_xZ7m.js",
"houseplan-assets/houseplan-onboarding-runtime-BaA82WmZ.js",
"houseplan-assets/hp-zigbee-topology-overlay-CrVCE5XW.js",
"houseplan-assets/live-interaction-runtime-lggEtuED.js",
"houseplan-assets/zigbee-topology-iEvoOICM.js",
"houseplan-assets/zigbee-topology-runtime-CZ-n5ilU.js"
],
"lazyGzipBytes": 239513,
"lazyGzipBytes": 239616,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-CCkpFhpB.js",
"houseplan-assets/editor-DakXuDoy.js",
"houseplan-assets/houseplan-editor-runtime-D-7ZZIFT.js",
"houseplan-assets/zigbee-topology-CSEeJmM7.js"
"houseplan-assets/backdrop-pick-3--jwtiu.js",
"houseplan-assets/editor-CxD1MzZV.js",
"houseplan-assets/houseplan-editor-runtime-Hmf_xZ7m.js",
"houseplan-assets/zigbee-topology-iEvoOICM.js"
],
"lazyEditorGzipBytes": 177195,
"lazyEditorGzipBytes": 177269,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-CCkpFhpB.js",
"houseplan-assets/houseplan-onboarding-runtime-BHREjAeZ.js"
"houseplan-assets/backdrop-pick-3--jwtiu.js",
"houseplan-assets/houseplan-onboarding-runtime-BaA82WmZ.js"
],
"lazyOnboardingGzipBytes": 14235,
"lazyOnboardingGzipBytes": 14240,
"lazyLocaleFiles": [
"houseplan-assets/de-B6l175Mv.js",
"houseplan-assets/fr-B_PSzbu1.js"
"houseplan-assets/de-BdA6QNeW.js",
"houseplan-assets/fr-BKs-Jkxs.js"
],
"lazyLocaleGzipBytes": 49101,
"lazyLocaleGzipBytes": 49121,
"files": [
{
"path": "houseplan-assets/backdrop-pick-CCkpFhpB.js",
"sha256": "a26775761811e33b1b97e5daa2f77fb5540dbb668674c19985e5ca37a8fa26d8",
"path": "houseplan-assets/backdrop-pick-3--jwtiu.js",
"sha256": "09661250c6c0e13c040a6748f200d29cc9e38ee5ea76970c61551bd598e3d2bd",
"rawBytes": 21417,
"gzipBytes": 7279,
"gzipBytes": 7283,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DcwcaGuA.js"
"houseplan-assets/houseplan-card-BL0VKqIs.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-B6l175Mv.js",
"sha256": "98c941158d3d4e9e92b9ecc65c2fc46a4fdbb31793c26b35c803009d95c7220a",
"path": "houseplan-assets/de-BdA6QNeW.js",
"sha256": "0492698526e3618b755b023b22f922a92ffb89fff3144653b224a69605544244",
"rawBytes": 82182,
"gzipBytes": 24820,
"gzipBytes": 24830,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-DakXuDoy.js",
"sha256": "91f30e040786a474a308cdd4941e78bd19f6546582b5bd300ba9b5862e501778",
"path": "houseplan-assets/editor-CxD1MzZV.js",
"sha256": "67857fdb93e7d25c4d39948d8ac678b1ff97beef92db98a7baeea7732e19f528",
"rawBytes": 3831,
"gzipBytes": 1579,
"gzipBytes": 1584,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DcwcaGuA.js"
"houseplan-assets/houseplan-card-BL0VKqIs.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-B_PSzbu1.js",
"sha256": "e4228f39a05aeee20f29e5f451856567ee3d999c5f5873642588c6007dfcbd51",
"path": "houseplan-assets/fr-BKs-Jkxs.js",
"sha256": "046058752a3f71a01dbb4b17dc6ecefc04d3c866af1cc8705b3af136cddfbf89",
"rawBytes": 84312,
"gzipBytes": 24281,
"gzipBytes": 24291,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-DcwcaGuA.js",
"sha256": "131be189127910a4b81640a708e96967156db2b1da71721e1433f99c96a230e4",
"path": "houseplan-assets/houseplan-card-BL0VKqIs.js",
"sha256": "d86d0acddcc1d0437b14c144deca50fef492ecab089a4f0f512c901ba2ab5d42",
"rawBytes": 1053904,
"gzipBytes": 295923,
"gzipBytes": 295930,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-B6l175Mv.js",
"houseplan-assets/editor-DakXuDoy.js",
"houseplan-assets/fr-B_PSzbu1.js",
"houseplan-assets/houseplan-editor-runtime-D-7ZZIFT.js",
"houseplan-assets/houseplan-onboarding-runtime-BHREjAeZ.js",
"houseplan-assets/hp-zigbee-topology-overlay-BPxD53tt.js",
"houseplan-assets/live-interaction-runtime-qQpeQbgb.js"
"houseplan-assets/de-BdA6QNeW.js",
"houseplan-assets/editor-CxD1MzZV.js",
"houseplan-assets/fr-BKs-Jkxs.js",
"houseplan-assets/houseplan-editor-runtime-Hmf_xZ7m.js",
"houseplan-assets/houseplan-onboarding-runtime-BaA82WmZ.js",
"houseplan-assets/hp-zigbee-topology-overlay-CrVCE5XW.js",
"houseplan-assets/live-interaction-runtime-lggEtuED.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-D-7ZZIFT.js",
"sha256": "00f6538a9d791e70430decac98fb5198e549ddee9297bc9a910cb0fcedaea5b1",
"rawBytes": 618846,
"gzipBytes": 163492,
"path": "houseplan-assets/houseplan-editor-runtime-Hmf_xZ7m.js",
"sha256": "ede5aa1553c5fdf0c9db4d06cfd360ed61db2c12a77d43741d90c1799df72dcc",
"rawBytes": 619056,
"gzipBytes": 163554,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-CCkpFhpB.js",
"houseplan-assets/houseplan-card-DcwcaGuA.js",
"houseplan-assets/zigbee-topology-CSEeJmM7.js"
"houseplan-assets/backdrop-pick-3--jwtiu.js",
"houseplan-assets/houseplan-card-BL0VKqIs.js",
"houseplan-assets/zigbee-topology-iEvoOICM.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-DLrjnlUM.js"
"houseplan-assets/zigbee-topology-runtime-CZ-n5ilU.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-BHREjAeZ.js",
"sha256": "4692b89b920fff75254e179560459acb473830ffc84a8834fbdc02e6e030b91a",
"path": "houseplan-assets/houseplan-onboarding-runtime-BaA82WmZ.js",
"sha256": "4611eefcde2a723a5ed449ef05886f64e54944fd84dba4d6a37c7a8f7ca92eaf",
"rawBytes": 28088,
"gzipBytes": 6956,
"gzipBytes": 6957,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-CCkpFhpB.js",
"houseplan-assets/houseplan-card-DcwcaGuA.js"
"houseplan-assets/backdrop-pick-3--jwtiu.js",
"houseplan-assets/houseplan-card-BL0VKqIs.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-BPxD53tt.js",
"sha256": "c2b121b24b17e25b10f876c2d0ebf7d8e960c45092754de333c895974b3e2c2f",
"rawBytes": 6011,
"gzipBytes": 2374,
"path": "houseplan-assets/hp-zigbee-topology-overlay-CrVCE5XW.js",
"sha256": "61a3c17e910f1cf2f2f3870dd0bce7e38f1bba8aff7d1bef838394207cc1fa4f",
"rawBytes": 6006,
"gzipBytes": 2376,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DcwcaGuA.js",
"houseplan-assets/zigbee-topology-CSEeJmM7.js",
"houseplan-assets/zigbee-topology-runtime-DLrjnlUM.js"
"houseplan-assets/houseplan-card-BL0VKqIs.js",
"houseplan-assets/zigbee-topology-iEvoOICM.js",
"houseplan-assets/zigbee-topology-runtime-CZ-n5ilU.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-qQpeQbgb.js",
"sha256": "7521ea6d15ed155a618d0b6cebcb38ad9ac6690458c71819c8473f370f33dcea",
"path": "houseplan-assets/live-interaction-runtime-lggEtuED.js",
"sha256": "b9a6b81d8de15608afa74cbf7bf4326e72a0c55e8b67c5c2014ccda8c8a3f105",
"rawBytes": 5196,
"gzipBytes": 2125,
"gzipBytes": 2128,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DcwcaGuA.js"
"houseplan-assets/houseplan-card-BL0VKqIs.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-CSEeJmM7.js",
"sha256": "59519e84495cff0246b42aeb322894bfe4590916b517ccac558b8ebcbeaaee25",
"path": "houseplan-assets/zigbee-topology-iEvoOICM.js",
"sha256": "90cdb5a950f34faa82733d04ea056bc36f010b3c0dc6be67a46b77f66f6d1909",
"rawBytes": 12382,
"gzipBytes": 4845,
"gzipBytes": 4848,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DcwcaGuA.js"
"houseplan-assets/houseplan-card-BL0VKqIs.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-DLrjnlUM.js",
"sha256": "9e59b41ec8cf487f0cfbf2ae7fdee1d8d350394a6885b350e31fe1e2b713e28e",
"path": "houseplan-assets/zigbee-topology-runtime-CZ-n5ilU.js",
"sha256": "9f7fcfeefa803da5a072d38770448d49fdc67cb2f97036ef6314486aeed49f26",
"rawBytes": 3941,
"gzipBytes": 1762,
"gzipBytes": 1765,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DcwcaGuA.js",
"houseplan-assets/zigbee-topology-CSEeJmM7.js"
"houseplan-assets/houseplan-card-BL0VKqIs.js",
"houseplan-assets/zigbee-topology-iEvoOICM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "8cf93caf1f12234784b9125d0928bbf41b8ee75621264b11f04d394bd52b31b9",
"sha256": "eee711af5b32a40d46a8e19deb75a3da4a8b0bc93302f8b5b3cd52ac362174ed",
"rawBytes": 1183,
"gzipBytes": 794,
"gzipBytes": 797,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-DcwcaGuA.js"
"houseplan-assets/houseplan-card-BL0VKqIs.js"
],
"dynamicImports": []
}
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="0986ea06640c35403b6bdadfa45887f20d5d9c1af28af7c55d6cc45baaaa4b89";import{v as e,l as o,z as t,dt as s,A as a,du as i,dv as l,dw as n,E as r,c}from"./houseplan-card-DcwcaGuA.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ef5a5d97bf3ee137f49700014533195c13e361a1e576611930e1691e9b897597";import{v as e,l as o,z as t,dt as s,A as a,du as i,dv as l,dw as n,E as r,c}from"./houseplan-card-BL0VKqIs.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
.hass=${this.hass}
.data=${this._formData}
.schema=${e}
File diff suppressed because one or more lines are too long
@@ -1,36 +0,0 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="0986ea06640c35403b6bdadfa45887f20d5d9c1af28af7c55d6cc45baaaa4b89";import{v as e,A as t,dx as i,w as s,c as o,l as r,u as a}from"./houseplan-card-DcwcaGuA.js";import{a as n,r as h,t as d}from"./zigbee-topology-CSEeJmM7.js";import{zigbeeTopologyRuntimeSnapshot as p,subscribeZigbeeTopology as c}from"./zigbee-topology-runtime-DLrjnlUM.js";const l={revision:0,topologies:[],states:{}};class v extends e{constructor(){super(...arguments),this.devices=[],this.currentSpace="",this._runtime=l,this._hovered="",this._pointerOver=e=>{if(!this._mouseAllowed(e))return void this._clear();const t=this._deviceFromEvent(e),i=t?.dataset.id||"";i&&i!==this._hovered&&(this._hovered=i,this.requestUpdate())},this._pointerOut=e=>{const t=this._deviceFromEvent(e);if(!t||t.dataset.id!==this._hovered)return;const i=e.relatedTarget instanceof Element?e.relatedTarget.closest('[data-hp="device"]'):null;i?.dataset.id!==this._hovered&&this._clear()},this._pointerDown=e=>{"mouse"!==e.pointerType&&this._clear()}}connectedCallback(){super.connectedCallback();const e=this.getRootNode();e.host&&"undefined"!=typeof MutationObserver&&(this._hoverGateObserver=new MutationObserver(()=>{e.host.hasAttribute("data-pointer-hover")||this._clear()}),this._hoverGateObserver.observe(e.host,{attributes:!0,attributeFilter:["data-pointer-hover"]})),queueMicrotask(()=>this._connectParent())}disconnectedCallback(){this._release?.(),this._release=void 0,this._disconnectParent(),this._hoverGateObserver?.disconnect(),this._hoverGateObserver=void 0,this._hovered="",super.disconnectedCallback()}updated(e){e.has("hass")&&(this._release?.(),this._runtime=p(this.hass),this._mappedMemo=void 0,this._release=c(this.hass,()=>{this._runtime=p(this.hass),this._mappedMemo=void 0,this.requestUpdate()})),(e.has("currentSpace")||e.has("devices")||e.has("registry"))&&(this._mappedMemo=void 0,this.devices.some(e=>e.id===this._hovered&&e.space===this.currentSpace)||(this._hovered=""))}_connectParent(){const e=this.parentElement;e&&e!==this._parent&&(this._disconnectParent(),this._parent=e,e.addEventListener("pointerover",this._pointerOver),e.addEventListener("pointerout",this._pointerOut),e.addEventListener("pointerdown",this._pointerDown,!0))}_disconnectParent(){this._parent?.removeEventListener("pointerover",this._pointerOver),this._parent?.removeEventListener("pointerout",this._pointerOut),this._parent?.removeEventListener("pointerdown",this._pointerDown,!0),this._parent=void 0}_deviceFromEvent(e){for(const t of e.composedPath())if(t instanceof HTMLElement&&"device"===t.dataset.hp)return t;return null}_mouseAllowed(e){const t=this.getRootNode();return"mouse"===e.pointerType&&t.host?.hasAttribute?.("data-pointer-hover")}_clear(){this._hovered&&(this._hovered="",this.requestUpdate())}_position(e){const t=[...this._parent?.querySelectorAll(".dev[data-id]")||[]].find(t=>t.dataset.id===e);if(!t)return null;const i=Number.parseFloat(t.style.left),s=Number.parseFloat(t.style.top),o=t.getBoundingClientRect();return Number.isFinite(i)&&Number.isFinite(s)?{x:i,y:s,width:o.width,height:o.height}:null}render(){if(!this._hovered||!this.registry||!this._runtime.topologies.length)return t;const e=this._mappedMemo,a=e&&e.runtime===this._runtime&&e.devices===this.devices&&e.registry===this.registry?e.mapped:n(this._runtime.topologies,this.devices,this.registry);e&&a===e.mapped||(this._mappedMemo={runtime:this._runtime,devices:this.devices,registry:this.registry,mapped:a});const p=h(a,this.currentSpace,this._hovered),c=this._position(this._hovered);if(!c)return t;const l=p.lines.map(e=>({...e,point:this._position(e.neighborMarkerId)})).filter(e=>!!e.point);return o`
${l.length?s`<svg viewBox="0 0 100 100" preserveAspectRatio="none"
aria-hidden="true" data-hp="zigbee-topology-lines">
${l.map(e=>s`<line x1=${c.x} y1=${c.y}
x2=${e.point.x} y2=${e.point.y}
stroke=${void 0===e.lqi?"rgba(145,155,165,.85)":i(e.lqi)}
stroke-width=${void 0===e.lqi?2:2.2}
stroke-dasharray=${void 0===e.lqi?"5 5":t} opacity=".9"></line>`)}
</svg>`:t}
${l.map(e=>o`<div class="halo" data-hp="zigbee-topology-neighbor"
data-id=${e.neighborMarkerId} style="left:${e.point.x}%;top:${e.point.y}%;width:${1.22*e.point.width}px;height:${1.22*e.point.height}px"></div>`)}
${p.remoteCount?o`<div class="remote" data-hp="zigbee-topology-remote"
style="left:${c.x}%;top:${c.y}%">${d(r(this.hass),"remote_count",{n:p.remoteCount})}</div>`:t}
`}}v.properties={hass:{attribute:!1},devices:{attribute:!1},registry:{attribute:!1},currentSpace:{type:String,attribute:"current-space"},viewKey:{attribute:!1}},v.styles=a`
:host { position: absolute; inset: 0; z-index: 5; display: block; pointer-events: none; }
svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
line { vector-effect: non-scaling-stroke; stroke-linecap: round; }
.halo {
position: absolute; width: calc(var(--device-base-size, 4cqw) * 1.22);
height: calc(var(--device-base-size, 4cqw) * 1.22); transform: translate(-50%, -50%);
box-sizing: border-box; border: 2px solid rgba(120, 190, 220, .82); border-radius: 50%;
box-shadow: 0 0 0 4px rgba(120, 190, 220, .16);
}
.remote {
position: absolute; transform: translate(12px, calc(-100% - 12px));
border: 1px solid rgba(255,255,255,.7); border-radius: 999px;
padding: 3px 7px; color: #fff; background: rgba(28,31,36,.88);
box-shadow: 0 2px 7px rgba(0,0,0,.28); white-space: nowrap;
font: 600 11px/1.2 system-ui, sans-serif;
}
@media (forced-colors: active) {
line { stroke: Highlight !important; }
.halo { border-color: Highlight; box-shadow: none; }
.remote { color: CanvasText; background: Canvas; border-color: CanvasText; }
}
`,customElements.get("hp-zigbee-topology-overlay")||customElements.define("hp-zigbee-topology-overlay",v);export{v as HpZigbeeTopologyOverlay};
@@ -0,0 +1,36 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ef5a5d97bf3ee137f49700014533195c13e361a1e576611930e1691e9b897597";import{v as e,A as t,dx as i,w as s,c as o,l as r,u as n}from"./houseplan-card-BL0VKqIs.js";import{a,r as h,t as d}from"./zigbee-topology-iEvoOICM.js";import{zigbeeTopologyRuntimeSnapshot as p,subscribeZigbeeTopology as c}from"./zigbee-topology-runtime-CZ-n5ilU.js";const l={revision:0,topologies:[],states:{}};class v extends e{constructor(){super(...arguments),this.devices=[],this.currentSpace="",this._runtime=l,this._hovered="",this._pointerOver=e=>{if(!this._mouseAllowed(e))return void this._clear();const t=this._deviceFromEvent(e),i=t?.dataset.id||"";i&&i!==this._hovered&&(this._hovered=i,this.requestUpdate())},this._pointerOut=e=>{const t=this._deviceFromEvent(e);if(!t||t.dataset.id!==this._hovered)return;const i=e.relatedTarget instanceof Element?e.relatedTarget.closest('[data-hp="device"]'):null;i?.dataset.id!==this._hovered&&this._clear()},this._pointerDown=e=>{"mouse"!==e.pointerType&&this._clear()}}connectedCallback(){super.connectedCallback();const e=this.getRootNode();e.host&&"undefined"!=typeof MutationObserver&&(this._hoverGateObserver=new MutationObserver(()=>{e.host.hasAttribute("data-pointer-hover")||this._clear()}),this._hoverGateObserver.observe(e.host,{attributes:!0,attributeFilter:["data-pointer-hover"]})),queueMicrotask(()=>this._connectParent())}disconnectedCallback(){this._release?.(),this._release=void 0,this._disconnectParent(),this._hoverGateObserver?.disconnect(),this._hoverGateObserver=void 0,this._hovered="",super.disconnectedCallback()}updated(e){e.has("hass")&&(this._release?.(),this._runtime=p(this.hass),this._mappedMemo=void 0,this._release=c(this.hass,()=>{this._runtime=p(this.hass),this._mappedMemo=void 0,this.requestUpdate()})),(e.has("currentSpace")||e.has("devices")||e.has("registry"))&&(this._mappedMemo=void 0,this.devices.some(e=>e.id===this._hovered&&e.space===this.currentSpace)||(this._hovered=""))}_connectParent(){const e=this.parentElement;e&&e!==this._parent&&(this._disconnectParent(),this._parent=e,e.addEventListener("pointerover",this._pointerOver),e.addEventListener("pointerout",this._pointerOut),e.addEventListener("pointerdown",this._pointerDown,!0))}_disconnectParent(){this._parent?.removeEventListener("pointerover",this._pointerOver),this._parent?.removeEventListener("pointerout",this._pointerOut),this._parent?.removeEventListener("pointerdown",this._pointerDown,!0),this._parent=void 0}_deviceFromEvent(e){for(const t of e.composedPath())if(t instanceof HTMLElement&&"device"===t.dataset.hp)return t;return null}_mouseAllowed(e){const t=this.getRootNode();return"mouse"===e.pointerType&&t.host?.hasAttribute?.("data-pointer-hover")}_clear(){this._hovered&&(this._hovered="",this.requestUpdate())}_position(e){const t=[...this._parent?.querySelectorAll(".dev[data-id]")||[]].find(t=>t.dataset.id===e);if(!t)return null;const i=Number.parseFloat(t.style.left),s=Number.parseFloat(t.style.top),o=t.getBoundingClientRect();return Number.isFinite(i)&&Number.isFinite(s)?{x:i,y:s,width:o.width,height:o.height}:null}render(){if(!this._hovered||!this.registry||!this._runtime.topologies.length)return t;const e=this._mappedMemo,n=e&&e.runtime===this._runtime&&e.devices===this.devices&&e.registry===this.registry?e.mapped:a(this._runtime.topologies,this.devices,this.registry);e&&n===e.mapped||(this._mappedMemo={runtime:this._runtime,devices:this.devices,registry:this.registry,mapped:n});const p=h(n,this.currentSpace,this._hovered),c=this._position(this._hovered);if(!c)return t;const l=p.lines.map(e=>({...e,point:this._position(e.neighborMarkerId)})).filter(e=>!!e.point);return o`
${l.length?s`<svg viewBox="0 0 100 100" preserveAspectRatio="none"
aria-hidden="true" data-hp="zigbee-topology-lines">
${l.map(e=>s`<line x1=${c.x} y1=${c.y}
x2=${e.point.x} y2=${e.point.y}
stroke=${void 0===e.lqi?"rgba(145,155,165,.85)":i(e.lqi)}
stroke-width=${void 0===e.lqi?2:2.2}
stroke-dasharray=${void 0===e.lqi?"5 5":t} opacity=".9"></line>`)}
</svg>`:t}
${l.map(e=>o`<div class="halo" data-hp="zigbee-topology-neighbor"
data-id=${e.neighborMarkerId} style="left:${e.point.x}%;top:${e.point.y}%;width:${1.22*e.point.width}px;height:${1.22*e.point.height}px"></div>`)}
${p.remoteCount?o`<div class="remote" data-hp="zigbee-topology-remote"
style="left:${c.x}%;top:${c.y}%">${d(r(this.hass),"remote_count",{n:p.remoteCount})}</div>`:t}
`}}v.properties={hass:{attribute:!1},devices:{attribute:!1},registry:{attribute:!1},currentSpace:{type:String,attribute:"current-space"},viewKey:{attribute:!1}},v.styles=n`
:host { position: absolute; inset: 0; z-index: 5; display: block; pointer-events: none; }
svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
line { vector-effect: non-scaling-stroke; stroke-linecap: round; }
.halo {
position: absolute; width: calc(var(--device-base-size, 4cqw) * 1.22);
height: calc(var(--device-base-size, 4cqw) * 1.22); transform: translate(-50%, -50%);
box-sizing: border-box; border: 2px solid rgba(120, 190, 220, .82); border-radius: 50%;
box-shadow: 0 0 0 4px rgba(120, 190, 220, .16);
}
.remote {
position: absolute; transform: translate(12px, calc(-100% - 12px));
border: 1px solid rgba(255,255,255,.7); border-radius: 999px;
padding: 3px 7px; color: #fff; background: rgba(28,31,36,.88);
box-shadow: 0 2px 7px rgba(0,0,0,.28); white-space: nowrap;
font: 600 11px/1.2 system-ui, sans-serif;
}
@media (forced-colors: active) {
line { stroke: Highlight !important; }
.halo { border-color: Highlight; box-shadow: none; }
.remote { color: CanvasText; background: Canvas; border-color: CanvasText; }
}
`,customElements.get("hp-zigbee-topology-overlay")||customElements.define("hp-zigbee-topology-overlay",v);export{v as HpZigbeeTopologyOverlay};
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="0986ea06640c35403b6bdadfa45887f20d5d9c1af28af7c55d6cc45baaaa4b89";import{n as t,b as n}from"./zigbee-topology-CSEeJmM7.js";import{I as e}from"./houseplan-card-DcwcaGuA.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{f as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ef5a5d97bf3ee137f49700014533195c13e361a1e576611930e1691e9b897597";import{n as t,b as n}from"./zigbee-topology-iEvoOICM.js";import{I as e}from"./houseplan-card-BL0VKqIs.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{f as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="0986ea06640c35403b6bdadfa45887f20d5d9c1af28af7c55d6cc45baaaa4b89";try{await import("./houseplan-assets/houseplan-card-DcwcaGuA.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale entry: the main chunk is unavailable",e)}
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ef5a5d97bf3ee137f49700014533195c13e361a1e576611930e1691e9b897597";try{await import("./houseplan-assets/houseplan-card-BL0VKqIs.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale entry: the main chunk is unavailable",e)}
+85 -85
View File
@@ -1,182 +1,182 @@
{
"schema": 1,
"fingerprint": "0986ea06640c35403b6bdadfa45887f20d5d9c1af28af7c55d6cc45baaaa4b89",
"fingerprint": "ef5a5d97bf3ee137f49700014533195c13e361a1e576611930e1691e9b897597",
"entry": "houseplan-card.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-DcwcaGuA.js",
"houseplan-assets/houseplan-card-BL0VKqIs.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 296717,
"initialViewGzipBytes": 296727,
"lazyFiles": [
"houseplan-assets/backdrop-pick-CCkpFhpB.js",
"houseplan-assets/de-B6l175Mv.js",
"houseplan-assets/editor-DakXuDoy.js",
"houseplan-assets/fr-B_PSzbu1.js",
"houseplan-assets/houseplan-editor-runtime-D-7ZZIFT.js",
"houseplan-assets/houseplan-onboarding-runtime-BHREjAeZ.js",
"houseplan-assets/hp-zigbee-topology-overlay-BPxD53tt.js",
"houseplan-assets/live-interaction-runtime-qQpeQbgb.js",
"houseplan-assets/zigbee-topology-CSEeJmM7.js",
"houseplan-assets/zigbee-topology-runtime-DLrjnlUM.js"
"houseplan-assets/backdrop-pick-3--jwtiu.js",
"houseplan-assets/de-BdA6QNeW.js",
"houseplan-assets/editor-CxD1MzZV.js",
"houseplan-assets/fr-BKs-Jkxs.js",
"houseplan-assets/houseplan-editor-runtime-Hmf_xZ7m.js",
"houseplan-assets/houseplan-onboarding-runtime-BaA82WmZ.js",
"houseplan-assets/hp-zigbee-topology-overlay-CrVCE5XW.js",
"houseplan-assets/live-interaction-runtime-lggEtuED.js",
"houseplan-assets/zigbee-topology-iEvoOICM.js",
"houseplan-assets/zigbee-topology-runtime-CZ-n5ilU.js"
],
"lazyGzipBytes": 239513,
"lazyGzipBytes": 239616,
"lazyEditorFiles": [
"houseplan-assets/backdrop-pick-CCkpFhpB.js",
"houseplan-assets/editor-DakXuDoy.js",
"houseplan-assets/houseplan-editor-runtime-D-7ZZIFT.js",
"houseplan-assets/zigbee-topology-CSEeJmM7.js"
"houseplan-assets/backdrop-pick-3--jwtiu.js",
"houseplan-assets/editor-CxD1MzZV.js",
"houseplan-assets/houseplan-editor-runtime-Hmf_xZ7m.js",
"houseplan-assets/zigbee-topology-iEvoOICM.js"
],
"lazyEditorGzipBytes": 177195,
"lazyEditorGzipBytes": 177269,
"lazyOnboardingFiles": [
"houseplan-assets/backdrop-pick-CCkpFhpB.js",
"houseplan-assets/houseplan-onboarding-runtime-BHREjAeZ.js"
"houseplan-assets/backdrop-pick-3--jwtiu.js",
"houseplan-assets/houseplan-onboarding-runtime-BaA82WmZ.js"
],
"lazyOnboardingGzipBytes": 14235,
"lazyOnboardingGzipBytes": 14240,
"lazyLocaleFiles": [
"houseplan-assets/de-B6l175Mv.js",
"houseplan-assets/fr-B_PSzbu1.js"
"houseplan-assets/de-BdA6QNeW.js",
"houseplan-assets/fr-BKs-Jkxs.js"
],
"lazyLocaleGzipBytes": 49101,
"lazyLocaleGzipBytes": 49121,
"files": [
{
"path": "houseplan-assets/backdrop-pick-CCkpFhpB.js",
"sha256": "a26775761811e33b1b97e5daa2f77fb5540dbb668674c19985e5ca37a8fa26d8",
"path": "houseplan-assets/backdrop-pick-3--jwtiu.js",
"sha256": "09661250c6c0e13c040a6748f200d29cc9e38ee5ea76970c61551bd598e3d2bd",
"rawBytes": 21417,
"gzipBytes": 7279,
"gzipBytes": 7283,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DcwcaGuA.js"
"houseplan-assets/houseplan-card-BL0VKqIs.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/de-B6l175Mv.js",
"sha256": "98c941158d3d4e9e92b9ecc65c2fc46a4fdbb31793c26b35c803009d95c7220a",
"path": "houseplan-assets/de-BdA6QNeW.js",
"sha256": "0492698526e3618b755b023b22f922a92ffb89fff3144653b224a69605544244",
"rawBytes": 82182,
"gzipBytes": 24820,
"gzipBytes": 24830,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/editor-DakXuDoy.js",
"sha256": "91f30e040786a474a308cdd4941e78bd19f6546582b5bd300ba9b5862e501778",
"path": "houseplan-assets/editor-CxD1MzZV.js",
"sha256": "67857fdb93e7d25c4d39948d8ac678b1ff97beef92db98a7baeea7732e19f528",
"rawBytes": 3831,
"gzipBytes": 1579,
"gzipBytes": 1584,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DcwcaGuA.js"
"houseplan-assets/houseplan-card-BL0VKqIs.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/fr-B_PSzbu1.js",
"sha256": "e4228f39a05aeee20f29e5f451856567ee3d999c5f5873642588c6007dfcbd51",
"path": "houseplan-assets/fr-BKs-Jkxs.js",
"sha256": "046058752a3f71a01dbb4b17dc6ecefc04d3c866af1cc8705b3af136cddfbf89",
"rawBytes": 84312,
"gzipBytes": 24281,
"gzipBytes": 24291,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-DcwcaGuA.js",
"sha256": "131be189127910a4b81640a708e96967156db2b1da71721e1433f99c96a230e4",
"path": "houseplan-assets/houseplan-card-BL0VKqIs.js",
"sha256": "d86d0acddcc1d0437b14c144deca50fef492ecab089a4f0f512c901ba2ab5d42",
"rawBytes": 1053904,
"gzipBytes": 295923,
"gzipBytes": 295930,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/de-B6l175Mv.js",
"houseplan-assets/editor-DakXuDoy.js",
"houseplan-assets/fr-B_PSzbu1.js",
"houseplan-assets/houseplan-editor-runtime-D-7ZZIFT.js",
"houseplan-assets/houseplan-onboarding-runtime-BHREjAeZ.js",
"houseplan-assets/hp-zigbee-topology-overlay-BPxD53tt.js",
"houseplan-assets/live-interaction-runtime-qQpeQbgb.js"
"houseplan-assets/de-BdA6QNeW.js",
"houseplan-assets/editor-CxD1MzZV.js",
"houseplan-assets/fr-BKs-Jkxs.js",
"houseplan-assets/houseplan-editor-runtime-Hmf_xZ7m.js",
"houseplan-assets/houseplan-onboarding-runtime-BaA82WmZ.js",
"houseplan-assets/hp-zigbee-topology-overlay-CrVCE5XW.js",
"houseplan-assets/live-interaction-runtime-lggEtuED.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-D-7ZZIFT.js",
"sha256": "00f6538a9d791e70430decac98fb5198e549ddee9297bc9a910cb0fcedaea5b1",
"rawBytes": 618846,
"gzipBytes": 163492,
"path": "houseplan-assets/houseplan-editor-runtime-Hmf_xZ7m.js",
"sha256": "ede5aa1553c5fdf0c9db4d06cfd360ed61db2c12a77d43741d90c1799df72dcc",
"rawBytes": 619056,
"gzipBytes": 163554,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-CCkpFhpB.js",
"houseplan-assets/houseplan-card-DcwcaGuA.js",
"houseplan-assets/zigbee-topology-CSEeJmM7.js"
"houseplan-assets/backdrop-pick-3--jwtiu.js",
"houseplan-assets/houseplan-card-BL0VKqIs.js",
"houseplan-assets/zigbee-topology-iEvoOICM.js"
],
"dynamicImports": [
"houseplan-assets/zigbee-topology-runtime-DLrjnlUM.js"
"houseplan-assets/zigbee-topology-runtime-CZ-n5ilU.js"
]
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-BHREjAeZ.js",
"sha256": "4692b89b920fff75254e179560459acb473830ffc84a8834fbdc02e6e030b91a",
"path": "houseplan-assets/houseplan-onboarding-runtime-BaA82WmZ.js",
"sha256": "4611eefcde2a723a5ed449ef05886f64e54944fd84dba4d6a37c7a8f7ca92eaf",
"rawBytes": 28088,
"gzipBytes": 6956,
"gzipBytes": 6957,
"isEntry": false,
"imports": [
"houseplan-assets/backdrop-pick-CCkpFhpB.js",
"houseplan-assets/houseplan-card-DcwcaGuA.js"
"houseplan-assets/backdrop-pick-3--jwtiu.js",
"houseplan-assets/houseplan-card-BL0VKqIs.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/hp-zigbee-topology-overlay-BPxD53tt.js",
"sha256": "c2b121b24b17e25b10f876c2d0ebf7d8e960c45092754de333c895974b3e2c2f",
"rawBytes": 6011,
"gzipBytes": 2374,
"path": "houseplan-assets/hp-zigbee-topology-overlay-CrVCE5XW.js",
"sha256": "61a3c17e910f1cf2f2f3870dd0bce7e38f1bba8aff7d1bef838394207cc1fa4f",
"rawBytes": 6006,
"gzipBytes": 2376,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DcwcaGuA.js",
"houseplan-assets/zigbee-topology-CSEeJmM7.js",
"houseplan-assets/zigbee-topology-runtime-DLrjnlUM.js"
"houseplan-assets/houseplan-card-BL0VKqIs.js",
"houseplan-assets/zigbee-topology-iEvoOICM.js",
"houseplan-assets/zigbee-topology-runtime-CZ-n5ilU.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/live-interaction-runtime-qQpeQbgb.js",
"sha256": "7521ea6d15ed155a618d0b6cebcb38ad9ac6690458c71819c8473f370f33dcea",
"path": "houseplan-assets/live-interaction-runtime-lggEtuED.js",
"sha256": "b9a6b81d8de15608afa74cbf7bf4326e72a0c55e8b67c5c2014ccda8c8a3f105",
"rawBytes": 5196,
"gzipBytes": 2125,
"gzipBytes": 2128,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DcwcaGuA.js"
"houseplan-assets/houseplan-card-BL0VKqIs.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-CSEeJmM7.js",
"sha256": "59519e84495cff0246b42aeb322894bfe4590916b517ccac558b8ebcbeaaee25",
"path": "houseplan-assets/zigbee-topology-iEvoOICM.js",
"sha256": "90cdb5a950f34faa82733d04ea056bc36f010b3c0dc6be67a46b77f66f6d1909",
"rawBytes": 12382,
"gzipBytes": 4845,
"gzipBytes": 4848,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DcwcaGuA.js"
"houseplan-assets/houseplan-card-BL0VKqIs.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/zigbee-topology-runtime-DLrjnlUM.js",
"sha256": "9e59b41ec8cf487f0cfbf2ae7fdee1d8d350394a6885b350e31fe1e2b713e28e",
"path": "houseplan-assets/zigbee-topology-runtime-CZ-n5ilU.js",
"sha256": "9f7fcfeefa803da5a072d38770448d49fdc67cb2f97036ef6314486aeed49f26",
"rawBytes": 3941,
"gzipBytes": 1762,
"gzipBytes": 1765,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-DcwcaGuA.js",
"houseplan-assets/zigbee-topology-CSEeJmM7.js"
"houseplan-assets/houseplan-card-BL0VKqIs.js",
"houseplan-assets/zigbee-topology-iEvoOICM.js"
],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "8cf93caf1f12234784b9125d0928bbf41b8ee75621264b11f04d394bd52b31b9",
"sha256": "eee711af5b32a40d46a8e19deb75a3da4a8b0bc93302f8b5b3cd52ac362174ed",
"rawBytes": 1183,
"gzipBytes": 794,
"gzipBytes": 797,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-DcwcaGuA.js"
"houseplan-assets/houseplan-card-BL0VKqIs.js"
],
"dynamicImports": []
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="0986ea06640c35403b6bdadfa45887f20d5d9c1af28af7c55d6cc45baaaa4b89";import{v as e,l as o,z as t,dt as s,A as a,du as i,dv as l,dw as n,E as r,c}from"./houseplan-card-DcwcaGuA.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ef5a5d97bf3ee137f49700014533195c13e361a1e576611930e1691e9b897597";import{v as e,l as o,z as t,dt as s,A as a,du as i,dv as l,dw as n,E as r,c}from"./houseplan-card-BL0VKqIs.js";class h extends e{constructor(){super(...arguments),this._spaces=null,this._spacesLoading=!1,this._spacesAuthoritative=!1}setConfig(e){this._config=e}async _loadSpaces(){if(!this._spaces&&!this._spacesLoading&&this.hass){this._spacesLoading=!0;try{const e=await this.hass.callWS({type:"houseplan/config/get"});this._spaces=(e?.config?.spaces||[]).map(e=>({value:e.id,label:e.title||e.id})),this._spacesAuthoritative=!0}catch{this._spaces=[],this._spacesAuthoritative=!1}finally{this._spacesLoading=!1}}}get _lang(){return o(this.hass,this._config?.language)}get _floorToken(){const e=this._config?.floor;return"number"==typeof e?`__houseplan_yaml_floor_index__:${String(e)}`:null}get _formData(){const e={...this._config},o=this._floorToken;return o?e.floor=o:Object.prototype.hasOwnProperty.call(e,"floor")||(e.floor=""),e}get _schema(){const e=this._spaces||[],o=this._lang,a=[{value:"",label:t(o,"editor.floor_none")}],i=this._floorToken;i&&a.push({value:i,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const l="string"==typeof this._config?.floor?this._config.floor:"";l&&!e.some(e=>e.value===l)&&a.push({value:l,label:l}),a.push(...e);const n="string"==typeof this._config?.default_floor?this._config.default_floor:"",r=[...e];return n&&!e.some(e=>e.value===n)&&r.unshift({value:n,label:n}),[{name:"title",selector:{text:{}}},{name:"floor",selector:{select:{mode:"dropdown",options:a}}},e.length?{name:"default_floor",selector:{select:{mode:"dropdown",options:r}}}:{name:"default_floor",selector:{text:{}}},{name:"language",selector:{select:{mode:"dropdown",options:s(t(o,"editor.lang_auto"),this._config?.language)}}},{name:"icon_size",selector:{number:{min:1,max:6,step:.1,mode:"box"}}},{name:"show_temperature",selector:{boolean:{}}},{name:"live_states",selector:{boolean:{}}},{name:"show_signal",selector:{boolean:{}}},{name:"kiosk",selector:{boolean:{}}},{name:"cycle",selector:{number:{min:0,max:3600,step:5,mode:"box"}}}]}render(){if(!this.hass||!this._config)return a;const e=i(this,l,o(this.hass,this._config.language));if("cold"===e)return n();if("warm"===e)return r;this._loadSpaces();const s=this._lang,h={title:t(s,"editor.title"),floor:t(s,"editor.floor"),default_floor:t(s,"editor.default_floor"),language:t(s,"editor.language"),icon_size:t(s,"editor.icon_size"),show_temperature:t(s,"editor.show_temperature"),live_states:t(s,"editor.live_states"),show_signal:t(s,"editor.show_signal"),kiosk:t(s,"editor.kiosk"),cycle:t(s,"editor.cycle")},f=this._schema,_=function(e,o,t){if(!t||null===o)return null;const s="string"==typeof e?.default_floor?e.default_floor:"";return!s||o.some(e=>e.value===s)?null:s}(this._config,this._spaces,this._spacesAuthoritative),d=e=>c`<ha-form
.hass=${this.hass}
.data=${this._formData}
.schema=${e}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,36 +0,0 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="0986ea06640c35403b6bdadfa45887f20d5d9c1af28af7c55d6cc45baaaa4b89";import{v as e,A as t,dx as i,w as s,c as o,l as r,u as a}from"./houseplan-card-DcwcaGuA.js";import{a as n,r as h,t as d}from"./zigbee-topology-CSEeJmM7.js";import{zigbeeTopologyRuntimeSnapshot as p,subscribeZigbeeTopology as c}from"./zigbee-topology-runtime-DLrjnlUM.js";const l={revision:0,topologies:[],states:{}};class v extends e{constructor(){super(...arguments),this.devices=[],this.currentSpace="",this._runtime=l,this._hovered="",this._pointerOver=e=>{if(!this._mouseAllowed(e))return void this._clear();const t=this._deviceFromEvent(e),i=t?.dataset.id||"";i&&i!==this._hovered&&(this._hovered=i,this.requestUpdate())},this._pointerOut=e=>{const t=this._deviceFromEvent(e);if(!t||t.dataset.id!==this._hovered)return;const i=e.relatedTarget instanceof Element?e.relatedTarget.closest('[data-hp="device"]'):null;i?.dataset.id!==this._hovered&&this._clear()},this._pointerDown=e=>{"mouse"!==e.pointerType&&this._clear()}}connectedCallback(){super.connectedCallback();const e=this.getRootNode();e.host&&"undefined"!=typeof MutationObserver&&(this._hoverGateObserver=new MutationObserver(()=>{e.host.hasAttribute("data-pointer-hover")||this._clear()}),this._hoverGateObserver.observe(e.host,{attributes:!0,attributeFilter:["data-pointer-hover"]})),queueMicrotask(()=>this._connectParent())}disconnectedCallback(){this._release?.(),this._release=void 0,this._disconnectParent(),this._hoverGateObserver?.disconnect(),this._hoverGateObserver=void 0,this._hovered="",super.disconnectedCallback()}updated(e){e.has("hass")&&(this._release?.(),this._runtime=p(this.hass),this._mappedMemo=void 0,this._release=c(this.hass,()=>{this._runtime=p(this.hass),this._mappedMemo=void 0,this.requestUpdate()})),(e.has("currentSpace")||e.has("devices")||e.has("registry"))&&(this._mappedMemo=void 0,this.devices.some(e=>e.id===this._hovered&&e.space===this.currentSpace)||(this._hovered=""))}_connectParent(){const e=this.parentElement;e&&e!==this._parent&&(this._disconnectParent(),this._parent=e,e.addEventListener("pointerover",this._pointerOver),e.addEventListener("pointerout",this._pointerOut),e.addEventListener("pointerdown",this._pointerDown,!0))}_disconnectParent(){this._parent?.removeEventListener("pointerover",this._pointerOver),this._parent?.removeEventListener("pointerout",this._pointerOut),this._parent?.removeEventListener("pointerdown",this._pointerDown,!0),this._parent=void 0}_deviceFromEvent(e){for(const t of e.composedPath())if(t instanceof HTMLElement&&"device"===t.dataset.hp)return t;return null}_mouseAllowed(e){const t=this.getRootNode();return"mouse"===e.pointerType&&t.host?.hasAttribute?.("data-pointer-hover")}_clear(){this._hovered&&(this._hovered="",this.requestUpdate())}_position(e){const t=[...this._parent?.querySelectorAll(".dev[data-id]")||[]].find(t=>t.dataset.id===e);if(!t)return null;const i=Number.parseFloat(t.style.left),s=Number.parseFloat(t.style.top),o=t.getBoundingClientRect();return Number.isFinite(i)&&Number.isFinite(s)?{x:i,y:s,width:o.width,height:o.height}:null}render(){if(!this._hovered||!this.registry||!this._runtime.topologies.length)return t;const e=this._mappedMemo,a=e&&e.runtime===this._runtime&&e.devices===this.devices&&e.registry===this.registry?e.mapped:n(this._runtime.topologies,this.devices,this.registry);e&&a===e.mapped||(this._mappedMemo={runtime:this._runtime,devices:this.devices,registry:this.registry,mapped:a});const p=h(a,this.currentSpace,this._hovered),c=this._position(this._hovered);if(!c)return t;const l=p.lines.map(e=>({...e,point:this._position(e.neighborMarkerId)})).filter(e=>!!e.point);return o`
${l.length?s`<svg viewBox="0 0 100 100" preserveAspectRatio="none"
aria-hidden="true" data-hp="zigbee-topology-lines">
${l.map(e=>s`<line x1=${c.x} y1=${c.y}
x2=${e.point.x} y2=${e.point.y}
stroke=${void 0===e.lqi?"rgba(145,155,165,.85)":i(e.lqi)}
stroke-width=${void 0===e.lqi?2:2.2}
stroke-dasharray=${void 0===e.lqi?"5 5":t} opacity=".9"></line>`)}
</svg>`:t}
${l.map(e=>o`<div class="halo" data-hp="zigbee-topology-neighbor"
data-id=${e.neighborMarkerId} style="left:${e.point.x}%;top:${e.point.y}%;width:${1.22*e.point.width}px;height:${1.22*e.point.height}px"></div>`)}
${p.remoteCount?o`<div class="remote" data-hp="zigbee-topology-remote"
style="left:${c.x}%;top:${c.y}%">${d(r(this.hass),"remote_count",{n:p.remoteCount})}</div>`:t}
`}}v.properties={hass:{attribute:!1},devices:{attribute:!1},registry:{attribute:!1},currentSpace:{type:String,attribute:"current-space"},viewKey:{attribute:!1}},v.styles=a`
:host { position: absolute; inset: 0; z-index: 5; display: block; pointer-events: none; }
svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
line { vector-effect: non-scaling-stroke; stroke-linecap: round; }
.halo {
position: absolute; width: calc(var(--device-base-size, 4cqw) * 1.22);
height: calc(var(--device-base-size, 4cqw) * 1.22); transform: translate(-50%, -50%);
box-sizing: border-box; border: 2px solid rgba(120, 190, 220, .82); border-radius: 50%;
box-shadow: 0 0 0 4px rgba(120, 190, 220, .16);
}
.remote {
position: absolute; transform: translate(12px, calc(-100% - 12px));
border: 1px solid rgba(255,255,255,.7); border-radius: 999px;
padding: 3px 7px; color: #fff; background: rgba(28,31,36,.88);
box-shadow: 0 2px 7px rgba(0,0,0,.28); white-space: nowrap;
font: 600 11px/1.2 system-ui, sans-serif;
}
@media (forced-colors: active) {
line { stroke: Highlight !important; }
.halo { border-color: Highlight; box-shadow: none; }
.remote { color: CanvasText; background: Canvas; border-color: CanvasText; }
}
`,customElements.get("hp-zigbee-topology-overlay")||customElements.define("hp-zigbee-topology-overlay",v);export{v as HpZigbeeTopologyOverlay};
@@ -0,0 +1,36 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ef5a5d97bf3ee137f49700014533195c13e361a1e576611930e1691e9b897597";import{v as e,A as t,dx as i,w as s,c as o,l as r,u as n}from"./houseplan-card-BL0VKqIs.js";import{a,r as h,t as d}from"./zigbee-topology-iEvoOICM.js";import{zigbeeTopologyRuntimeSnapshot as p,subscribeZigbeeTopology as c}from"./zigbee-topology-runtime-CZ-n5ilU.js";const l={revision:0,topologies:[],states:{}};class v extends e{constructor(){super(...arguments),this.devices=[],this.currentSpace="",this._runtime=l,this._hovered="",this._pointerOver=e=>{if(!this._mouseAllowed(e))return void this._clear();const t=this._deviceFromEvent(e),i=t?.dataset.id||"";i&&i!==this._hovered&&(this._hovered=i,this.requestUpdate())},this._pointerOut=e=>{const t=this._deviceFromEvent(e);if(!t||t.dataset.id!==this._hovered)return;const i=e.relatedTarget instanceof Element?e.relatedTarget.closest('[data-hp="device"]'):null;i?.dataset.id!==this._hovered&&this._clear()},this._pointerDown=e=>{"mouse"!==e.pointerType&&this._clear()}}connectedCallback(){super.connectedCallback();const e=this.getRootNode();e.host&&"undefined"!=typeof MutationObserver&&(this._hoverGateObserver=new MutationObserver(()=>{e.host.hasAttribute("data-pointer-hover")||this._clear()}),this._hoverGateObserver.observe(e.host,{attributes:!0,attributeFilter:["data-pointer-hover"]})),queueMicrotask(()=>this._connectParent())}disconnectedCallback(){this._release?.(),this._release=void 0,this._disconnectParent(),this._hoverGateObserver?.disconnect(),this._hoverGateObserver=void 0,this._hovered="",super.disconnectedCallback()}updated(e){e.has("hass")&&(this._release?.(),this._runtime=p(this.hass),this._mappedMemo=void 0,this._release=c(this.hass,()=>{this._runtime=p(this.hass),this._mappedMemo=void 0,this.requestUpdate()})),(e.has("currentSpace")||e.has("devices")||e.has("registry"))&&(this._mappedMemo=void 0,this.devices.some(e=>e.id===this._hovered&&e.space===this.currentSpace)||(this._hovered=""))}_connectParent(){const e=this.parentElement;e&&e!==this._parent&&(this._disconnectParent(),this._parent=e,e.addEventListener("pointerover",this._pointerOver),e.addEventListener("pointerout",this._pointerOut),e.addEventListener("pointerdown",this._pointerDown,!0))}_disconnectParent(){this._parent?.removeEventListener("pointerover",this._pointerOver),this._parent?.removeEventListener("pointerout",this._pointerOut),this._parent?.removeEventListener("pointerdown",this._pointerDown,!0),this._parent=void 0}_deviceFromEvent(e){for(const t of e.composedPath())if(t instanceof HTMLElement&&"device"===t.dataset.hp)return t;return null}_mouseAllowed(e){const t=this.getRootNode();return"mouse"===e.pointerType&&t.host?.hasAttribute?.("data-pointer-hover")}_clear(){this._hovered&&(this._hovered="",this.requestUpdate())}_position(e){const t=[...this._parent?.querySelectorAll(".dev[data-id]")||[]].find(t=>t.dataset.id===e);if(!t)return null;const i=Number.parseFloat(t.style.left),s=Number.parseFloat(t.style.top),o=t.getBoundingClientRect();return Number.isFinite(i)&&Number.isFinite(s)?{x:i,y:s,width:o.width,height:o.height}:null}render(){if(!this._hovered||!this.registry||!this._runtime.topologies.length)return t;const e=this._mappedMemo,n=e&&e.runtime===this._runtime&&e.devices===this.devices&&e.registry===this.registry?e.mapped:a(this._runtime.topologies,this.devices,this.registry);e&&n===e.mapped||(this._mappedMemo={runtime:this._runtime,devices:this.devices,registry:this.registry,mapped:n});const p=h(n,this.currentSpace,this._hovered),c=this._position(this._hovered);if(!c)return t;const l=p.lines.map(e=>({...e,point:this._position(e.neighborMarkerId)})).filter(e=>!!e.point);return o`
${l.length?s`<svg viewBox="0 0 100 100" preserveAspectRatio="none"
aria-hidden="true" data-hp="zigbee-topology-lines">
${l.map(e=>s`<line x1=${c.x} y1=${c.y}
x2=${e.point.x} y2=${e.point.y}
stroke=${void 0===e.lqi?"rgba(145,155,165,.85)":i(e.lqi)}
stroke-width=${void 0===e.lqi?2:2.2}
stroke-dasharray=${void 0===e.lqi?"5 5":t} opacity=".9"></line>`)}
</svg>`:t}
${l.map(e=>o`<div class="halo" data-hp="zigbee-topology-neighbor"
data-id=${e.neighborMarkerId} style="left:${e.point.x}%;top:${e.point.y}%;width:${1.22*e.point.width}px;height:${1.22*e.point.height}px"></div>`)}
${p.remoteCount?o`<div class="remote" data-hp="zigbee-topology-remote"
style="left:${c.x}%;top:${c.y}%">${d(r(this.hass),"remote_count",{n:p.remoteCount})}</div>`:t}
`}}v.properties={hass:{attribute:!1},devices:{attribute:!1},registry:{attribute:!1},currentSpace:{type:String,attribute:"current-space"},viewKey:{attribute:!1}},v.styles=n`
:host { position: absolute; inset: 0; z-index: 5; display: block; pointer-events: none; }
svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
line { vector-effect: non-scaling-stroke; stroke-linecap: round; }
.halo {
position: absolute; width: calc(var(--device-base-size, 4cqw) * 1.22);
height: calc(var(--device-base-size, 4cqw) * 1.22); transform: translate(-50%, -50%);
box-sizing: border-box; border: 2px solid rgba(120, 190, 220, .82); border-radius: 50%;
box-shadow: 0 0 0 4px rgba(120, 190, 220, .16);
}
.remote {
position: absolute; transform: translate(12px, calc(-100% - 12px));
border: 1px solid rgba(255,255,255,.7); border-radius: 999px;
padding: 3px 7px; color: #fff; background: rgba(28,31,36,.88);
box-shadow: 0 2px 7px rgba(0,0,0,.28); white-space: nowrap;
font: 600 11px/1.2 system-ui, sans-serif;
}
@media (forced-colors: active) {
line { stroke: Highlight !important; }
.halo { border-color: Highlight; box-shadow: none; }
.remote { color: CanvasText; background: Canvas; border-color: CanvasText; }
}
`,customElements.get("hp-zigbee-topology-overlay")||customElements.define("hp-zigbee-topology-overlay",v);export{v as HpZigbeeTopologyOverlay};
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="0986ea06640c35403b6bdadfa45887f20d5d9c1af28af7c55d6cc45baaaa4b89";import{n as t,b as n}from"./zigbee-topology-CSEeJmM7.js";import{I as e}from"./houseplan-card-DcwcaGuA.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{f as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ef5a5d97bf3ee137f49700014533195c13e361a1e576611930e1691e9b897597";import{n as t,b as n}from"./zigbee-topology-iEvoOICM.js";import{I as e}from"./houseplan-card-BL0VKqIs.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{f as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
+1 -1
View File
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="0986ea06640c35403b6bdadfa45887f20d5d9c1af28af7c55d6cc45baaaa4b89";try{await import("./houseplan-assets/houseplan-card-DcwcaGuA.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale entry: the main chunk is unavailable",e)}
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="ef5a5d97bf3ee137f49700014533195c13e361a1e576611930e1691e9b897597";try{await import("./houseplan-assets/houseplan-card-BL0VKqIs.js")}catch(e){if(!customElements.get("houseplan-card")){const l=String(navigator.language||"en").toLowerCase();const m=l.startsWith("ru")?"House Plan обновился — перезагрузите страницу (Ctrl+F5).":l.startsWith("de")?"House Plan wurde aktualisiert — bitte laden Sie die Seite neu (Strg+F5).":l.startsWith("fr")?"House Plan a été mis à jour — veuillez recharger la page (Ctrl+F5).":"House Plan was updated — please reload the page (Ctrl+F5).";customElements.define("houseplan-card",class extends HTMLElement{setConfig(){}getCardSize(){return 1}connectedCallback(){this.style.cssText="display:block;box-sizing:border-box;padding:16px;border:1px solid var(--divider-color,#e0e0e0);border-radius:var(--ha-card-border-radius,12px);background:var(--card-background-color,#fff);color:var(--primary-text-color,#212121);font:14px/1.4 var(--paper-font-body1_-_font-family,sans-serif)";this.textContent=m}})}console.error("[houseplan] stale entry: the main chunk is unavailable",e)}
+8 -8
View File
@@ -1190,6 +1190,7 @@ export class HouseplanEditorRuntime {
}>();
private _resizePreviewNodes: MultiWallNodeMap | null = null;
private _resizeBaselineLimits: JunctionLimitViolation[] = [];
private _resizeBaseFrameStable = true;
private _supportExpiryTimer?: number;
private _supportPreviewGeneration = 0;
private _decorAssetGuardReplace: boolean | null = null;
@@ -1219,19 +1220,16 @@ export class HouseplanEditorRuntime {
ResizePreview, ResizeLiveLabel[], SpaceGeometryState, ResizeWallUnion, ResizeWallArtifact
>();
}
public _routeLiveEditorUpdate(name?: PropertyKey, oldValue?: unknown): boolean {
return routeHouseplanEditorUpdate(this.host, name, oldValue);
const live = routeHouseplanEditorUpdate(this.host, name, oldValue);
if (!live && this.host._resize.preview) this._resizeBaseFrameStable = false;
return live;
}
public _commitLiveEditor(): void { commitHouseplanEditor(this.host); }
public _disposeLiveEditor(): void { disposeHouseplanEditor(this.host); }
public _queuePointerMove(key: string, run: () => void): void { queueHouseplanPointerMove(this.host, key, run); }
public _flushPointerMove(key: string): void { flushHouseplanPointerMove(this.host, key); }
public _cancelPointerMove(key?: string): void { cancelHouseplanPointerMove(this.host, key); }
public _help(key: Extract<I18nKey, `${string}.help`>): TemplateResult | typeof nothing {
const ariaKey = `${key}.aria` as I18nKey;
const lang = langOf(this.host.hass, this.host._config?.language);
@@ -3756,6 +3754,7 @@ public _rszCandidateRenderable(preview: { space: string; sp: any } | null): bool
public _rszEdgeDown(ev: PointerEvent, roomId: string, edge: number): void {
if (this.host._tool !== 'resize' || this.host._resize.dragging) return;
this._resizeBaseFrameStable = true;
ev.stopPropagation();
ev.preventDefault();
const rooms = this._rszRooms();
@@ -3801,10 +3800,10 @@ public _rszDisabledKey(ev: KeyboardEvent, reason: SafeResizeReason): void {
}
public _rszMove(ev: PointerEvent): void {
if (!this.host._resize.ownsPointer(ev.pointerId)) return;
ev.stopPropagation();
queueHouseplanPointerMove(this.host, 'resize', () => this._rszMoveNow(ev));
}
private _rszMoveNow(ev: PointerEvent): void {
if (!this.host._resize.ownsPointer(ev.pointerId)) return;
ev.stopPropagation();
@@ -3905,7 +3904,8 @@ public _rszCancelDrag(pointerId?: number): void {
// Retain the canonical frame only when the drag was actually painted in
// the isolated plan-editor layer. Programmatic/non-editor callers still
// need a full render to replace their preview DOM.
if (result.restoreEpoch !== null && this.host._mode === 'plan') this.host._terminalFrame = 1;
if (result.restoreEpoch !== null && this.host._mode === 'plan'
&& this._resizeBaseFrameStable) this.host._terminalFrame = 1;
this.host.requestUpdate();
}