fix: keep lazy editor build portable

Issue: #337
User-Visible: no
This commit is contained in:
Matysh
2026-08-28 08:29:44 +03:00
parent 59be9c8565
commit df450c9c5e
18 changed files with 142 additions and 113 deletions
@@ -1,96 +1,96 @@
{
"schema": 1,
"fingerprint": "f111431804c4c42c6e35286f29720d089bc8b77ffc364a6517f7a3510fcb11c8",
"fingerprint": "8e6599b6df97336743ce3679c5cb470f3fbdd7f9938031e18c183aafbc1bc99d",
"entry": "houseplan-card.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-Cs2QHIcW.js",
"houseplan-assets/houseplan-card-Dkqrn1Gf.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 255385,
"lazyFiles": [
"houseplan-assets/editor-BC5jpMNv.js",
"houseplan-assets/houseplan-editor-runtime-DUuA4F8c.js",
"houseplan-assets/houseplan-onboarding-runtime-Bj55plb1.js",
"houseplan-assets/space-deletion-CJ8Co_o8.js"
"houseplan-assets/editor-nxh2RavO.js",
"houseplan-assets/houseplan-editor-runtime-pmkXpWgM.js",
"houseplan-assets/houseplan-onboarding-runtime-D8Xw4TIp.js",
"houseplan-assets/space-deletion-CxhzkCZ-.js"
],
"lazyGzipBytes": 138414,
"lazyGzipBytes": 138411,
"lazyEditorFiles": [
"houseplan-assets/editor-BC5jpMNv.js",
"houseplan-assets/houseplan-editor-runtime-DUuA4F8c.js",
"houseplan-assets/space-deletion-CJ8Co_o8.js"
"houseplan-assets/editor-nxh2RavO.js",
"houseplan-assets/houseplan-editor-runtime-pmkXpWgM.js",
"houseplan-assets/space-deletion-CxhzkCZ-.js"
],
"lazyEditorGzipBytes": 131768,
"lazyEditorGzipBytes": 131765,
"lazyOnboardingFiles": [
"houseplan-assets/houseplan-onboarding-runtime-Bj55plb1.js",
"houseplan-assets/space-deletion-CJ8Co_o8.js"
"houseplan-assets/houseplan-onboarding-runtime-D8Xw4TIp.js",
"houseplan-assets/space-deletion-CxhzkCZ-.js"
],
"lazyOnboardingGzipBytes": 7200,
"lazyOnboardingGzipBytes": 7199,
"files": [
{
"path": "houseplan-assets/editor-BC5jpMNv.js",
"sha256": "f10e45b5a98ab0efc6ceb3c4e08acc4f57a9cb5f99d178b723077a2cb011e05b",
"path": "houseplan-assets/editor-nxh2RavO.js",
"sha256": "31d3b868b707870acac4b6a590392c659f1c8a105eaa9f93100dc8cbca412bcc",
"rawBytes": 3699,
"gzipBytes": 1534,
"gzipBytes": 1529,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-Cs2QHIcW.js"
"houseplan-assets/houseplan-card-Dkqrn1Gf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-Cs2QHIcW.js",
"sha256": "caa02ba0654e191f72d9b7c9b139c078bb6edb84df4b3e2ec263be492009ecd2",
"rawBytes": 908483,
"gzipBytes": 255201,
"path": "houseplan-assets/houseplan-card-Dkqrn1Gf.js",
"sha256": "5a952defec4dc81f58b4d521d7b96fd01320a40561c708eac4d68fa1435843c6",
"rawBytes": 908487,
"gzipBytes": 255204,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/editor-BC5jpMNv.js",
"houseplan-assets/houseplan-editor-runtime-DUuA4F8c.js",
"houseplan-assets/houseplan-onboarding-runtime-Bj55plb1.js"
"houseplan-assets/editor-nxh2RavO.js",
"houseplan-assets/houseplan-editor-runtime-pmkXpWgM.js",
"houseplan-assets/houseplan-onboarding-runtime-D8Xw4TIp.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-DUuA4F8c.js",
"sha256": "0e053b445f87c6c7fdb2b681863e148976ab703221f4988d93f80ca825bd4051",
"rawBytes": 504648,
"gzipBytes": 129680,
"path": "houseplan-assets/houseplan-editor-runtime-pmkXpWgM.js",
"sha256": "34a909cd7878ea28b70873c9c8d4fcd1ab35f448a50b83e6f383ac0fee9a0548",
"rawBytes": 504658,
"gzipBytes": 129683,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-Cs2QHIcW.js",
"houseplan-assets/space-deletion-CJ8Co_o8.js"
"houseplan-assets/houseplan-card-Dkqrn1Gf.js",
"houseplan-assets/space-deletion-CxhzkCZ-.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-Bj55plb1.js",
"sha256": "32b8812031403d65f909ca236f431a3eeefc9bde9a07499ee123925331f75982",
"path": "houseplan-assets/houseplan-onboarding-runtime-D8Xw4TIp.js",
"sha256": "335283735608e582ed75c30afb0f74698ac18baf02c78c842248dfbec7a0a87b",
"rawBytes": 26356,
"gzipBytes": 6646,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-Cs2QHIcW.js",
"houseplan-assets/space-deletion-CJ8Co_o8.js"
"houseplan-assets/houseplan-card-Dkqrn1Gf.js",
"houseplan-assets/space-deletion-CxhzkCZ-.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/space-deletion-CJ8Co_o8.js",
"sha256": "59ab0af663f25f859d7bbe3a8893cd00757a40117ca4b9e08d6846f0b2dfd3fc",
"path": "houseplan-assets/space-deletion-CxhzkCZ-.js",
"sha256": "35845b98110f5542da56ec8e3a2a8a42afb5e84f6672f46a7fe5fbfe04d0e2f9",
"rawBytes": 911,
"gzipBytes": 554,
"gzipBytes": 553,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "53623e0fa5ef93003fc02a66b9932d847c8c68b5345233f9ed6c61f1e470d86a",
"sha256": "c1218a459eebfbcce7220c236e61be6f9519988ce9ed9e5c6355539b521e1a52",
"rawBytes": 190,
"gzipBytes": 184,
"gzipBytes": 181,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-Cs2QHIcW.js"
"houseplan-assets/houseplan-card-Dkqrn1Gf.js"
],
"dynamicImports": []
}
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="f111431804c4c42c6e35286f29720d089bc8b77ffc364a6517f7a3510fcb11c8";import{c as e,l as o,t,d2 as s,A as a,b as l}from"./houseplan-card-Cs2QHIcW.js";class i 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")}],l=this._floorToken;l&&a.push({value:l,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const i="string"==typeof this._config?.floor?this._config.floor:"";i&&!e.some(e=>e.value===i)&&a.push({value:i,label:i}),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;this._loadSpaces();const e=this._lang,o={title:t(e,"editor.title"),floor:t(e,"editor.floor"),default_floor:t(e,"editor.default_floor"),language:t(e,"editor.language"),icon_size:t(e,"editor.icon_size"),show_temperature:t(e,"editor.show_temperature"),live_states:t(e,"editor.live_states"),show_signal:t(e,"editor.show_signal"),kiosk:t(e,"editor.kiosk"),cycle:t(e,"editor.cycle")},s=this._schema,i=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),n=e=>l`<ha-form
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="8e6599b6df97336743ce3679c5cb470f3fbdd7f9938031e18c183aafbc1bc99d";import{c as e,l as o,t,d2 as s,A as a,b as l}from"./houseplan-card-Dkqrn1Gf.js";class i 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")}],l=this._floorToken;l&&a.push({value:l,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const i="string"==typeof this._config?.floor?this._config.floor:"";i&&!e.some(e=>e.value===i)&&a.push({value:i,label:i}),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;this._loadSpaces();const e=this._lang,o={title:t(e,"editor.title"),floor:t(e,"editor.floor"),default_floor:t(e,"editor.default_floor"),language:t(e,"editor.language"),icon_size:t(e,"editor.icon_size"),show_temperature:t(e,"editor.show_temperature"),live_states:t(e,"editor.live_states"),show_signal:t(e,"editor.show_signal"),kiosk:t(e,"editor.kiosk"),cycle:t(e,"editor.cycle")},s=this._schema,i=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),n=e=>l`<ha-form
.hass=${this.hass}
.data=${this._formData}
.schema=${e}
@@ -1 +1 @@
function e(e,o){return{id:e,title:o,plan_url:null,view_box:[0,0,1,1],rooms:[],wall_segments:[]}}function o(e="file"){const o="draw"===e;return{source:e,showBorders:o,showNames:o,displayTouched:!1}}function r(e,o){if(e.displayTouched)return{...e,source:o};const r="draw"===o;return{...e,source:o,showBorders:r,showNames:r}}function s(e,o,r){return{...e,[o]:r,displayTouched:!0}}function t(e,o,r){const s=(e?.spaces||[]).find(e=>e?.id===r),t=new Set((s?.rooms||[]).map(e=>String(e?.id||"")).filter(Boolean)),n=[...new Set((e?.markers||[]).filter(e=>!0!==e?.removed&&"string"==typeof e?.id).filter(e=>e.space===r||"string"==typeof e.room_id&&t.has(e.room_id)||o?.[e.id]?.s===r).map(e=>e.id))].sort((e,o)=>e.localeCompare(o));return{markerIds:n,count:n.length}}globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="f111431804c4c42c6e35286f29720d089bc8b77ffc364a6517f7a3510fcb11c8";export{t as a,e as c,o as i,r as s,s as t};
function e(e,o){return{id:e,title:o,plan_url:null,view_box:[0,0,1,1],rooms:[],wall_segments:[]}}function o(e="file"){const o="draw"===e;return{source:e,showBorders:o,showNames:o,displayTouched:!1}}function r(e,o){if(e.displayTouched)return{...e,source:o};const r="draw"===o;return{...e,source:o,showBorders:r,showNames:r}}function s(e,o,r){return{...e,[o]:r,displayTouched:!0}}function t(e,o,r){const s=(e?.spaces||[]).find(e=>e?.id===r),t=new Set((s?.rooms||[]).map(e=>String(e?.id||"")).filter(Boolean)),n=[...new Set((e?.markers||[]).filter(e=>!0!==e?.removed&&"string"==typeof e?.id).filter(e=>e.space===r||"string"==typeof e.room_id&&t.has(e.room_id)||o?.[e.id]?.s===r).map(e=>e.id))].sort((e,o)=>e.localeCompare(o));return{markerIds:n,count:n.length}}globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="8e6599b6df97336743ce3679c5cb470f3fbdd7f9938031e18c183aafbc1bc99d";export{t as a,e as c,o as i,r as s,s as t};
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="f111431804c4c42c6e35286f29720d089bc8b77ffc364a6517f7a3510fcb11c8";export{d3 as HouseplanCard}from"./houseplan-assets/houseplan-card-Cs2QHIcW.js";
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="8e6599b6df97336743ce3679c5cb470f3fbdd7f9938031e18c183aafbc1bc99d";export{d3 as HouseplanCard}from"./houseplan-assets/houseplan-card-Dkqrn1Gf.js";
+41 -41
View File
@@ -1,96 +1,96 @@
{
"schema": 1,
"fingerprint": "f111431804c4c42c6e35286f29720d089bc8b77ffc364a6517f7a3510fcb11c8",
"fingerprint": "8e6599b6df97336743ce3679c5cb470f3fbdd7f9938031e18c183aafbc1bc99d",
"entry": "houseplan-card.js",
"initialViewFiles": [
"houseplan-assets/houseplan-card-Cs2QHIcW.js",
"houseplan-assets/houseplan-card-Dkqrn1Gf.js",
"houseplan-card.js"
],
"initialViewGzipBytes": 255385,
"lazyFiles": [
"houseplan-assets/editor-BC5jpMNv.js",
"houseplan-assets/houseplan-editor-runtime-DUuA4F8c.js",
"houseplan-assets/houseplan-onboarding-runtime-Bj55plb1.js",
"houseplan-assets/space-deletion-CJ8Co_o8.js"
"houseplan-assets/editor-nxh2RavO.js",
"houseplan-assets/houseplan-editor-runtime-pmkXpWgM.js",
"houseplan-assets/houseplan-onboarding-runtime-D8Xw4TIp.js",
"houseplan-assets/space-deletion-CxhzkCZ-.js"
],
"lazyGzipBytes": 138414,
"lazyGzipBytes": 138411,
"lazyEditorFiles": [
"houseplan-assets/editor-BC5jpMNv.js",
"houseplan-assets/houseplan-editor-runtime-DUuA4F8c.js",
"houseplan-assets/space-deletion-CJ8Co_o8.js"
"houseplan-assets/editor-nxh2RavO.js",
"houseplan-assets/houseplan-editor-runtime-pmkXpWgM.js",
"houseplan-assets/space-deletion-CxhzkCZ-.js"
],
"lazyEditorGzipBytes": 131768,
"lazyEditorGzipBytes": 131765,
"lazyOnboardingFiles": [
"houseplan-assets/houseplan-onboarding-runtime-Bj55plb1.js",
"houseplan-assets/space-deletion-CJ8Co_o8.js"
"houseplan-assets/houseplan-onboarding-runtime-D8Xw4TIp.js",
"houseplan-assets/space-deletion-CxhzkCZ-.js"
],
"lazyOnboardingGzipBytes": 7200,
"lazyOnboardingGzipBytes": 7199,
"files": [
{
"path": "houseplan-assets/editor-BC5jpMNv.js",
"sha256": "f10e45b5a98ab0efc6ceb3c4e08acc4f57a9cb5f99d178b723077a2cb011e05b",
"path": "houseplan-assets/editor-nxh2RavO.js",
"sha256": "31d3b868b707870acac4b6a590392c659f1c8a105eaa9f93100dc8cbca412bcc",
"rawBytes": 3699,
"gzipBytes": 1534,
"gzipBytes": 1529,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-Cs2QHIcW.js"
"houseplan-assets/houseplan-card-Dkqrn1Gf.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-card-Cs2QHIcW.js",
"sha256": "caa02ba0654e191f72d9b7c9b139c078bb6edb84df4b3e2ec263be492009ecd2",
"rawBytes": 908483,
"gzipBytes": 255201,
"path": "houseplan-assets/houseplan-card-Dkqrn1Gf.js",
"sha256": "5a952defec4dc81f58b4d521d7b96fd01320a40561c708eac4d68fa1435843c6",
"rawBytes": 908487,
"gzipBytes": 255204,
"isEntry": false,
"imports": [],
"dynamicImports": [
"houseplan-assets/editor-BC5jpMNv.js",
"houseplan-assets/houseplan-editor-runtime-DUuA4F8c.js",
"houseplan-assets/houseplan-onboarding-runtime-Bj55plb1.js"
"houseplan-assets/editor-nxh2RavO.js",
"houseplan-assets/houseplan-editor-runtime-pmkXpWgM.js",
"houseplan-assets/houseplan-onboarding-runtime-D8Xw4TIp.js"
]
},
{
"path": "houseplan-assets/houseplan-editor-runtime-DUuA4F8c.js",
"sha256": "0e053b445f87c6c7fdb2b681863e148976ab703221f4988d93f80ca825bd4051",
"rawBytes": 504648,
"gzipBytes": 129680,
"path": "houseplan-assets/houseplan-editor-runtime-pmkXpWgM.js",
"sha256": "34a909cd7878ea28b70873c9c8d4fcd1ab35f448a50b83e6f383ac0fee9a0548",
"rawBytes": 504658,
"gzipBytes": 129683,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-Cs2QHIcW.js",
"houseplan-assets/space-deletion-CJ8Co_o8.js"
"houseplan-assets/houseplan-card-Dkqrn1Gf.js",
"houseplan-assets/space-deletion-CxhzkCZ-.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/houseplan-onboarding-runtime-Bj55plb1.js",
"sha256": "32b8812031403d65f909ca236f431a3eeefc9bde9a07499ee123925331f75982",
"path": "houseplan-assets/houseplan-onboarding-runtime-D8Xw4TIp.js",
"sha256": "335283735608e582ed75c30afb0f74698ac18baf02c78c842248dfbec7a0a87b",
"rawBytes": 26356,
"gzipBytes": 6646,
"isEntry": false,
"imports": [
"houseplan-assets/houseplan-card-Cs2QHIcW.js",
"houseplan-assets/space-deletion-CJ8Co_o8.js"
"houseplan-assets/houseplan-card-Dkqrn1Gf.js",
"houseplan-assets/space-deletion-CxhzkCZ-.js"
],
"dynamicImports": []
},
{
"path": "houseplan-assets/space-deletion-CJ8Co_o8.js",
"sha256": "59ab0af663f25f859d7bbe3a8893cd00757a40117ca4b9e08d6846f0b2dfd3fc",
"path": "houseplan-assets/space-deletion-CxhzkCZ-.js",
"sha256": "35845b98110f5542da56ec8e3a2a8a42afb5e84f6672f46a7fe5fbfe04d0e2f9",
"rawBytes": 911,
"gzipBytes": 554,
"gzipBytes": 553,
"isEntry": false,
"imports": [],
"dynamicImports": []
},
{
"path": "houseplan-card.js",
"sha256": "53623e0fa5ef93003fc02a66b9932d847c8c68b5345233f9ed6c61f1e470d86a",
"sha256": "c1218a459eebfbcce7220c236e61be6f9519988ce9ed9e5c6355539b521e1a52",
"rawBytes": 190,
"gzipBytes": 184,
"gzipBytes": 181,
"isEntry": true,
"imports": [
"houseplan-assets/houseplan-card-Cs2QHIcW.js"
"houseplan-assets/houseplan-card-Dkqrn1Gf.js"
],
"dynamicImports": []
}
@@ -1,4 +1,4 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="f111431804c4c42c6e35286f29720d089bc8b77ffc364a6517f7a3510fcb11c8";import{c as e,l as o,t,d2 as s,A as a,b as l}from"./houseplan-card-Cs2QHIcW.js";class i 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")}],l=this._floorToken;l&&a.push({value:l,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const i="string"==typeof this._config?.floor?this._config.floor:"";i&&!e.some(e=>e.value===i)&&a.push({value:i,label:i}),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;this._loadSpaces();const e=this._lang,o={title:t(e,"editor.title"),floor:t(e,"editor.floor"),default_floor:t(e,"editor.default_floor"),language:t(e,"editor.language"),icon_size:t(e,"editor.icon_size"),show_temperature:t(e,"editor.show_temperature"),live_states:t(e,"editor.live_states"),show_signal:t(e,"editor.show_signal"),kiosk:t(e,"editor.kiosk"),cycle:t(e,"editor.cycle")},s=this._schema,i=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),n=e=>l`<ha-form
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="8e6599b6df97336743ce3679c5cb470f3fbdd7f9938031e18c183aafbc1bc99d";import{c as e,l as o,t,d2 as s,A as a,b as l}from"./houseplan-card-Dkqrn1Gf.js";class i 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")}],l=this._floorToken;l&&a.push({value:l,label:t(o,"editor.floor_index",{index:String(this._config?.floor)})});const i="string"==typeof this._config?.floor?this._config.floor:"";i&&!e.some(e=>e.value===i)&&a.push({value:i,label:i}),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;this._loadSpaces();const e=this._lang,o={title:t(e,"editor.title"),floor:t(e,"editor.floor"),default_floor:t(e,"editor.default_floor"),language:t(e,"editor.language"),icon_size:t(e,"editor.icon_size"),show_temperature:t(e,"editor.show_temperature"),live_states:t(e,"editor.live_states"),show_signal:t(e,"editor.show_signal"),kiosk:t(e,"editor.kiosk"),cycle:t(e,"editor.cycle")},s=this._schema,i=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),n=e=>l`<ha-form
.hass=${this.hass}
.data=${this._formData}
.schema=${e}
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
function e(e,o){return{id:e,title:o,plan_url:null,view_box:[0,0,1,1],rooms:[],wall_segments:[]}}function o(e="file"){const o="draw"===e;return{source:e,showBorders:o,showNames:o,displayTouched:!1}}function r(e,o){if(e.displayTouched)return{...e,source:o};const r="draw"===o;return{...e,source:o,showBorders:r,showNames:r}}function s(e,o,r){return{...e,[o]:r,displayTouched:!0}}function t(e,o,r){const s=(e?.spaces||[]).find(e=>e?.id===r),t=new Set((s?.rooms||[]).map(e=>String(e?.id||"")).filter(Boolean)),n=[...new Set((e?.markers||[]).filter(e=>!0!==e?.removed&&"string"==typeof e?.id).filter(e=>e.space===r||"string"==typeof e.room_id&&t.has(e.room_id)||o?.[e.id]?.s===r).map(e=>e.id))].sort((e,o)=>e.localeCompare(o));return{markerIds:n,count:n.length}}globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="f111431804c4c42c6e35286f29720d089bc8b77ffc364a6517f7a3510fcb11c8";export{t as a,e as c,o as i,r as s,s as t};
function e(e,o){return{id:e,title:o,plan_url:null,view_box:[0,0,1,1],rooms:[],wall_segments:[]}}function o(e="file"){const o="draw"===e;return{source:e,showBorders:o,showNames:o,displayTouched:!1}}function r(e,o){if(e.displayTouched)return{...e,source:o};const r="draw"===o;return{...e,source:o,showBorders:r,showNames:r}}function s(e,o,r){return{...e,[o]:r,displayTouched:!0}}function t(e,o,r){const s=(e?.spaces||[]).find(e=>e?.id===r),t=new Set((s?.rooms||[]).map(e=>String(e?.id||"")).filter(Boolean)),n=[...new Set((e?.markers||[]).filter(e=>!0!==e?.removed&&"string"==typeof e?.id).filter(e=>e.space===r||"string"==typeof e.room_id&&t.has(e.room_id)||o?.[e.id]?.s===r).map(e=>e.id))].sort((e,o)=>e.localeCompare(o));return{markerIds:n,count:n.length}}globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="8e6599b6df97336743ce3679c5cb470f3fbdd7f9938031e18c183aafbc1bc99d";export{t as a,e as c,o as i,r as s,s as t};
+1 -1
View File
@@ -1 +1 @@
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="f111431804c4c42c6e35286f29720d089bc8b77ffc364a6517f7a3510fcb11c8";export{d3 as HouseplanCard}from"./houseplan-assets/houseplan-card-Cs2QHIcW.js";
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="8e6599b6df97336743ce3679c5cb470f3fbdd7f9938031e18c183aafbc1bc99d";export{d3 as HouseplanCard}from"./houseplan-assets/houseplan-card-Dkqrn1Gf.js";
+4 -2
View File
@@ -6918,8 +6918,10 @@ export class HouseplanCard extends LitElement {
}
/** #329 П1-П5 over one space. Pure input, no side effects. */
private _junctionLimitViolations(config: any, spaceId: string): JunctionLimitViolation[] {
return this._editorRuntimeOrThrow()._junctionLimitViolations(config, spaceId);
private _junctionLimitViolations(
config: any, spaceId: string, sharedGeometry?: any,
): JunctionLimitViolation[] {
return this._editorRuntimeOrThrow()._junctionLimitViolations(config, spaceId, sharedGeometry);
}
/** Localised refusal text for the first violation a write introduces. */
+12 -6
View File
@@ -84,6 +84,7 @@ import {
intervalCmAt, wallBodyNeedsSolid, wallHatchNeedsSolid, wallHatchStepUnits,
HATCH_BASE_STEP_UNITS, type OpeningTunnelGeometry, type OpeningWallIndex,
type LinearWallSegment, type WallEntry, type WallInterval,
type MultiWallNodeMap,
innerEdgeSpan, ownEdgeOffsets, thicknessCmAt,
} from './wall-thickness';
import {
@@ -932,7 +933,10 @@ export interface HouseplanEditorHostPort {
_importQueue: string[];
_importTotal: number;
_infoCard: DevItem | null;
_innerRoomContour: (space: SpaceModel, roomId: string, openCuts?: number[][], roomWalls?: any, multiWallNodes?: import("C:/Users/Sergey/Downloads/dev/houseplan-dev/houseplan-card-src/src/wall-thickness").MultiWallNodeMap | null | undefined) => number[][] | null;
_innerRoomContour: (space: SpaceModel, roomId: string, openCuts?: number[][], roomWalls?: any, multiWallNodes?: MultiWallNodeMap | null | undefined) => number[][] | null;
_junctionLimitViolations: (
config: unknown, spaceId: string, sharedGeometry?: unknown,
) => JunctionLimitViolation[];
_isVacDev: (d: DevItem) => boolean;
_kiosk: boolean;
_kioskDialog: boolean;
@@ -1025,7 +1029,9 @@ export interface HouseplanEditorHostPort {
_renderPlanHass: any;
_reportedPreflightFingerprint: string | null;
_resign: () => void;
_resize: ResizeController<ResizePreview, ResizeLiveLabel[], SpaceGeometryState, { status: "ok" | "degraded-extra"; d: string; paths: readonly { id: string; d: string; fillRule: "evenodd"; }[]; components: readonly import("C:/Users/Sergey/Downloads/dev/houseplan-dev/houseplan-card-src/src/wall-thickness").WallGeometryComponent[]; roomGeom: any; roomComponents: readonly import("C:/Users/Sergey/Downloads/dev/houseplan-dev/houseplan-card-src/src/wall-thickness").WallGeometryComponent[]; openingIndex: OpeningWallIndex | null; multiWallNodes: import("C:/Users/Sergey/Downloads/dev/houseplan-dev/houseplan-card-src/src/wall-thickness").MultiWallNodeMap | null; paperD: string; depthUnits: number; openingPadUnits?: number; fillRule: "evenodd" | "nonzero"; } | null, import("C:/Users/Sergey/Downloads/dev/houseplan-dev/houseplan-card-src/src/wall-thickness").WallBodiesGeometryResult>;
_resize: ResizeController<
ResizePreview, ResizeLiveLabel[], SpaceGeometryState, ResizeWallUnion, ResizeWallArtifact
>;
_restoreZoom: () => void;
_resumeDraftBySpace: Record<string, string>;
_rlResize: { id: string; space: string; k0: number; cx: number; cy: number; d0: number; } | null;
@@ -1115,7 +1121,7 @@ export interface HouseplanEditorHostPort {
hass: any;
isConnected: boolean;
renderRoot: HTMLElement | DocumentFragment;
requestUpdate: (name?: PropertyKey, oldValue?: unknown, options?: import("C:/Users/Sergey/Downloads/dev/houseplan-dev/houseplan-card-src/node_modules/lit-element/development/lit-element").PropertyDeclaration, useNewValue?: boolean, newValue?: unknown) => void;
requestUpdate: (name?: PropertyKey, oldValue?: unknown) => void;
updateComplete: Promise<boolean>;
}
@@ -2008,7 +2014,7 @@ public _junctionLimitLabel(violation: JunctionLimitViolation): string {
public _junctionLimitsIntroduced(
candidate: any, previousConfig: any, spaceId: string,
candidateGeometry?: any,
candidateGeometry?: unknown,
): JunctionLimitViolation[] {
// The baseline must be the previous document AS THE CANDIDATE SEES IT: a
// legacy space carries no wall catalogue at all, so comparing it raw with
@@ -2033,7 +2039,7 @@ public _junctionLimitsIntroduced(
const baseline = Number(previousConfig?.model_version || 0) >= WALL_SEGMENT_MODEL_VERSION
? previousConfig
: commitWallSegmentModel(previousConfig).config;
inherited = this._junctionLimitViolations(baseline, spaceId);
inherited = this.host._junctionLimitViolations(baseline, spaceId);
} catch {
// An unmigratable baseline proves nothing about inheritance; never
// refuse the write on that basis.
@@ -2046,7 +2052,7 @@ public _junctionLimitsIntroduced(
}
}
let next: JunctionLimitViolation[] = [];
try { next = this._junctionLimitViolations(candidate, spaceId, candidateGeometry); }
try { next = this.host._junctionLimitViolations(candidate, spaceId, candidateGeometry); }
catch {
// #331 §2.5: candidate judgment fails closed; only an unprovable
// baseline above is allowed to fail open.
+17
View File
@@ -103,3 +103,20 @@ test('lazy runtime boundary keeps the eager entry independent and does not grow
);
assert.ok(anyCount <= 1123, `src any count grew from 1123 to ${anyCount}`);
});
test('source type references stay portable across build hosts', () => {
const sources = [];
const visit = (directory) => {
for (const name of readdirSync(directory)) {
const path = join(directory, name);
if (statSync(path).isDirectory()) visit(path);
else if (/\.ts$/.test(name)) sources.push(readFileSync(path, 'utf8'));
}
};
visit(join(repoRoot, 'src'));
assert.doesNotMatch(
sources.join('\n'),
/import\(["'][A-Za-z]:[\\/]/,
'type imports must not capture an absolute Windows workspace path',
);
});
+5 -1
View File
@@ -168,7 +168,11 @@ test('release ZIP inspection is portable and does not depend on tar', () => {
assert.equal(archived.status, 0, archived.stderr || archived.stdout);
const entries = readZipEntries(zip, ['manifest.json', 'frontend/houseplan-card.js']);
assert.equal(typeof JSON.parse(entries.get('manifest.json').toString('utf8')).version, 'string');
assert.ok(entries.get('frontend/houseplan-card.js').length > 1_000);
const entry = entries.get('frontend/houseplan-card.js');
// #337 deliberately turns the public entry into a tiny bootstrap; the
// manifest-driven verifier owns completeness of its hashed asset tree.
assert.ok(entry.length > 100);
assert.match(entry.toString('utf8'), /__HOUSEPLAN_BUILD_FINGERPRINT__/);
const committedResult = spawnSync('git', ['show', 'HEAD:dist/houseplan-card.js'], {
cwd: root,
// The production bundle is larger than Node's spawnSync default buffer.