mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
@@ -1,125 +1,125 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "b4ba5baf06ec1abf83649f9b5611b92b935e58d54158c6eb4476d412e71f242b",
|
||||
"fingerprint": "de90e261f2d232a878f7eefc7544ce938d9651f352139e3ce2e1df461f88ead8",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-BGHWJhG-.js",
|
||||
"houseplan-assets/houseplan-card-DMVvG6h7.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 275795,
|
||||
"initialViewGzipBytes": 275788,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-YagMeews.js",
|
||||
"houseplan-assets/de-BgnDBk9_.js",
|
||||
"houseplan-assets/editor-B-i7d_fa.js",
|
||||
"houseplan-assets/fr-CHRDAlq_.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CiHb9hUW.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-asE73Ooz.js"
|
||||
"houseplan-assets/backdrop-pick-CofgbLZw.js",
|
||||
"houseplan-assets/de-Dneq39EZ.js",
|
||||
"houseplan-assets/editor-CGUyHfKM.js",
|
||||
"houseplan-assets/fr-V27I-L0w.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-B0xo8c4i.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CnVNiHau.js"
|
||||
],
|
||||
"lazyGzipBytes": 191494,
|
||||
"lazyGzipBytes": 191479,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-YagMeews.js",
|
||||
"houseplan-assets/editor-B-i7d_fa.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CiHb9hUW.js"
|
||||
"houseplan-assets/backdrop-pick-CofgbLZw.js",
|
||||
"houseplan-assets/editor-CGUyHfKM.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-B0xo8c4i.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 139736,
|
||||
"lazyEditorGzipBytes": 139727,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-YagMeews.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-asE73Ooz.js"
|
||||
"houseplan-assets/backdrop-pick-CofgbLZw.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CnVNiHau.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 9454,
|
||||
"lazyOnboardingGzipBytes": 9449,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-BgnDBk9_.js",
|
||||
"houseplan-assets/fr-CHRDAlq_.js"
|
||||
"houseplan-assets/de-Dneq39EZ.js",
|
||||
"houseplan-assets/fr-V27I-L0w.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 45262,
|
||||
"lazyLocaleGzipBytes": 45255,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-YagMeews.js",
|
||||
"sha256": "c8b2ce1daed814c2eeb1decbe0829e124e9ab4b7d996836925f85dbf956b319e",
|
||||
"path": "houseplan-assets/backdrop-pick-CofgbLZw.js",
|
||||
"sha256": "ea2e9d5221b2ecedc43e282f4995a181875c9d48731d85d0a727524db66bb847",
|
||||
"rawBytes": 6967,
|
||||
"gzipBytes": 2958,
|
||||
"gzipBytes": 2952,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BGHWJhG-.js"
|
||||
"houseplan-assets/houseplan-card-DMVvG6h7.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-BgnDBk9_.js",
|
||||
"sha256": "9e3c38ccabd0d892e54e9f67844e2a8aa8258449e58e94aba2dd8eaa3be4a00a",
|
||||
"path": "houseplan-assets/de-Dneq39EZ.js",
|
||||
"sha256": "70f0c054c510d3d9b070f8f4ed91842431a1e177259600dc61d0f9d883507ac6",
|
||||
"rawBytes": 74963,
|
||||
"gzipBytes": 22841,
|
||||
"gzipBytes": 22838,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-B-i7d_fa.js",
|
||||
"sha256": "d97b29999b0e6f071b432c223fe3032027525b64612e901e44644fbd8a3a7af6",
|
||||
"path": "houseplan-assets/editor-CGUyHfKM.js",
|
||||
"sha256": "479429b01cfd395cb40c72bd559f472fac4077f97d26f19213f792ebb9597bb9",
|
||||
"rawBytes": 3831,
|
||||
"gzipBytes": 1586,
|
||||
"gzipBytes": 1584,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BGHWJhG-.js"
|
||||
"houseplan-assets/houseplan-card-DMVvG6h7.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-CHRDAlq_.js",
|
||||
"sha256": "e07dadedfbe7d76eac1b6dccb17b9ab9ae65e7c234f9754c6bd9b36bd6e896c0",
|
||||
"path": "houseplan-assets/fr-V27I-L0w.js",
|
||||
"sha256": "0fc13adf9ab64742b5044d3dea32d0edebc89960a4e96a978e5a826ae40282c9",
|
||||
"rawBytes": 77091,
|
||||
"gzipBytes": 22421,
|
||||
"gzipBytes": 22417,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-BGHWJhG-.js",
|
||||
"sha256": "141037436a8135e2464bd1146e5eb75111eff7bcaa68fb7e24520eebe4d0c305",
|
||||
"rawBytes": 971365,
|
||||
"gzipBytes": 274998,
|
||||
"path": "houseplan-assets/houseplan-card-DMVvG6h7.js",
|
||||
"sha256": "740f00a335cce779d185f7f855885932ff989eb93cb2f49e56b21a0768ab3cea",
|
||||
"rawBytes": 971326,
|
||||
"gzipBytes": 274992,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-BgnDBk9_.js",
|
||||
"houseplan-assets/editor-B-i7d_fa.js",
|
||||
"houseplan-assets/fr-CHRDAlq_.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CiHb9hUW.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-asE73Ooz.js"
|
||||
"houseplan-assets/de-Dneq39EZ.js",
|
||||
"houseplan-assets/editor-CGUyHfKM.js",
|
||||
"houseplan-assets/fr-V27I-L0w.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-B0xo8c4i.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CnVNiHau.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-CiHb9hUW.js",
|
||||
"sha256": "f45742e37f3eaa8176b9001ba33fb601e27eee299ccf3d0f539253a181e578ab",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-B0xo8c4i.js",
|
||||
"sha256": "cf448ee2c5f9f375f11b39920f805b8585ae9d01babe540c77a6f5ad1cc86b8e",
|
||||
"rawBytes": 523581,
|
||||
"gzipBytes": 135192,
|
||||
"gzipBytes": 135191,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-YagMeews.js",
|
||||
"houseplan-assets/houseplan-card-BGHWJhG-.js"
|
||||
"houseplan-assets/backdrop-pick-CofgbLZw.js",
|
||||
"houseplan-assets/houseplan-card-DMVvG6h7.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-asE73Ooz.js",
|
||||
"sha256": "536304d3b2877ed85e8afc4518aaf896691bcfe6e8dad5d9fde245f3c3f81f5e",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-CnVNiHau.js",
|
||||
"sha256": "de0d43bf21b9e55b6ac471d2f4c9af1d5a5770e30289fa45dfef35fd3968452f",
|
||||
"rawBytes": 26195,
|
||||
"gzipBytes": 6496,
|
||||
"gzipBytes": 6497,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-YagMeews.js",
|
||||
"houseplan-assets/houseplan-card-BGHWJhG-.js"
|
||||
"houseplan-assets/backdrop-pick-CofgbLZw.js",
|
||||
"houseplan-assets/houseplan-card-DMVvG6h7.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "4faca52c747736e4e54f85f95acc75af508b63e3ab1820ee4c09fc0ba88f208f",
|
||||
"sha256": "e565827af9fe58c0a67b685624fd31b8979a3e7dde6acc47e0a3abcddb42ad8b",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 797,
|
||||
"gzipBytes": 796,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BGHWJhG-.js"
|
||||
"houseplan-assets/houseplan-card-DMVvG6h7.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
}
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+5
-5
@@ -1,14 +1,14 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b4ba5baf06ec1abf83649f9b5611b92b935e58d54158c6eb4476d412e71f242b";import{c as e,l as o,t,cZ as s,A as a,c_ as i,c$ as l,d0 as n,E as r,b as c}from"./houseplan-card-BGHWJhG-.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__="de90e261f2d232a878f7eefc7544ce938d9651f352139e3ce2e1df461f88ead8";import{c as e,l as o,t,cZ as s,A as a,c_ as i,c$ as l,d0 as n,E as r,b as c}from"./houseplan-card-DMVvG6h7.js";class f 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,f={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")},h=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}
|
||||
.computeLabel=${e=>h[e.name]||e.name}
|
||||
.computeLabel=${e=>f[e.name]||e.name}
|
||||
@value-changed=${this._valueChanged}
|
||||
></ha-form>`;return c`
|
||||
${d(f.slice(0,3))}
|
||||
${d(h.slice(0,3))}
|
||||
${_?c`<div class="default-floor-error" role="alert"
|
||||
style="color:var(--error-color,#db4437);margin:-4px 0 12px;overflow-wrap:anywhere">
|
||||
${t(s,"editor.default_floor_missing",{id:_})}
|
||||
</div>`:a}
|
||||
${d(f.slice(3))}
|
||||
`}_valueChanged(e){const o={...this._config,...e.detail.value};""===o.floor?delete o.floor:o.floor===this._floorToken&&(o.floor=this._config?.floor);const t=new Event("config-changed",{bubbles:!0,composed:!0});t.detail={config:o},this.dispatchEvent(t)}}h.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",h);
|
||||
${d(h.slice(3))}
|
||||
`}_valueChanged(e){const o={...this._config,...e.detail.value};""===o.floor?delete o.floor:o.floor===this._floorToken&&(o.floor=this._config?.floor);const t=new Event("config-changed",{bubbles:!0,composed:!0});t.detail={config:o},this.dispatchEvent(t)}}f.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",f);
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+5
-5
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b4ba5baf06ec1abf83649f9b5611b92b935e58d54158c6eb4476d412e71f242b";import{bT as t,bU as s,bV as e,bW as o,aq as a,bX as l,c0 as i,bY as h,bZ as c,b_ as n,b$ as r,A as p,b as _,cR as d,ap as u,ar as g,cS as m}from"./houseplan-card-BGHWJhG-.js";import{i as b,c as $,e as v,r as f,a as y,b as w,s as D,t as S}from"./backdrop-pick-YagMeews.js";const k=1e3,C=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},M="b4ba5baf06ec1abf83649f9b5611b92b935e58d54158c6eb4476d412e71f242b";class F{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_openSpaceDialog(p,_){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===p){const i=this.host._serverCfg.spaces.find(t=>t.id===_);if(!i)return;const h=t(i),c=i.settings?.custom_fill&&"object"==typeof i.settings.custom_fill?s(i.settings.custom_fill):null,n="none"===h.fill?{...c||e,a:0}:c;return void(this.host._spaceDialog={mode:p,spaceId:_,title:i.title,planUrl:i.plan_url||null,planFile:null,source:i.plan_url?"file":"draw",showBorders:h.showBorders,showNames:h.showNames,zeroWallStyle:l(i),displayTouched:!0,hideDecor:h.hideDecor,hideOpenings:h.hideOpenings,roomColor:h.color,roomOpacity:h.opacity,fillMode:"none"===h.fill?"custom":h.fill,customFill:n,glowEnabled:h.glow,bgColor:h.bgColor,bgMode:"static"===i.settings?.bg_mode||"daynight"===i.settings?.bg_mode?i.settings.bg_mode:null,northDeg:a({},i.settings),sunRays:"boolean"==typeof i.settings?.sun_rays?i.settings.sun_rays:null,tempMin:h.tempMin,tempMax:h.tempMax,showLqi:h.showLqi??this.host._config?.show_signal??!0,cardFontScale:h.cardFontScale,labelTemp:h.labelTemp,labelHum:h.labelHum,labelLqi:h.labelLqi,labelLight:h.labelLight,cellCm:Number(i.cell_cm)>0?Number(i.cell_cm):5,cellCmInput:o(Number(i.cell_cm)>0?Number(i.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const d=i(this.host._imperial);this.host._spaceDialog={mode:p,title:"",planUrl:null,planFile:null,...b(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:r,roomOpacity:n,fillMode:"custom",customFill:{...e,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:c,tempMax:h,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:d,cellCmInput:o(d,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await $(e);if("reject"===o.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===o.kind)return void(this.host._backdropGuard=o.state);const a=await v(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return f(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??p}_useServerPlan(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,planUrl:t,planFile:null,pickSaved:!1,savedAspect:void 0},this.host._aspectJob=this._readPlanAspect(t))}async _readPlanAspect(t){for(let s=0;s<40;s++){const s=this.host._display(t);if(s){const e=await new Promise(t=>{const e=new Image;e.onload=()=>t(e.naturalWidth&&e.naturalHeight?e.naturalWidth/e.naturalHeight:0),e.onerror=()=>t(0),e.src=s}),o=this.host._spaceDialog;return o&&o.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...o,savedAspect:e},e):0}if(await new Promise(t=>setTimeout(t,150)),this.host._spaceDialog?.planUrl!==t)return 0}return 0}async _deleteServerPlan(t){if(confirm(this.host._t("confirm.delete_plan",{name:t})))try{await this.host.hass.callWS({type:"houseplan/plans/delete",name:t});const s=this.host._spaceDialog;s?.saved&&(this.host._spaceDialog={...s,saved:s.saved.filter(s=>s.name!==t)})}catch(t){this.host._showToast(this.host._t("toast.plan_delete_failed",{err:this.host._errText(t)}))}}_renderServerPlans(t){if(t.savedBusy)return _`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return _`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return _`<div class="savedplans">
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="de90e261f2d232a878f7eefc7544ce938d9651f352139e3ce2e1df461f88ead8";import{bT as t,bU as s,bV as e,bW as o,aq as a,bX as l,c0 as i,bY as h,bZ as c,b_ as n,b$ as r,A as p,b as _,cR as d,ap as u,ar as g,cS as m}from"./houseplan-card-DMVvG6h7.js";import{i as b,c as $,e as v,r as f,a as y,b as w,s as D,t as S}from"./backdrop-pick-CofgbLZw.js";const k=1e3,C=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},M="de90e261f2d232a878f7eefc7544ce938d9651f352139e3ce2e1df461f88ead8";class F{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_openSpaceDialog(p,_){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===p){const i=this.host._serverCfg.spaces.find(t=>t.id===_);if(!i)return;const h=t(i),c=i.settings?.custom_fill&&"object"==typeof i.settings.custom_fill?s(i.settings.custom_fill):null,n="none"===h.fill?{...c||e,a:0}:c;return void(this.host._spaceDialog={mode:p,spaceId:_,title:i.title,planUrl:i.plan_url||null,planFile:null,source:i.plan_url?"file":"draw",showBorders:h.showBorders,showNames:h.showNames,zeroWallStyle:l(i),displayTouched:!0,hideDecor:h.hideDecor,hideOpenings:h.hideOpenings,roomColor:h.color,roomOpacity:h.opacity,fillMode:"none"===h.fill?"custom":h.fill,customFill:n,glowEnabled:h.glow,bgColor:h.bgColor,bgMode:"static"===i.settings?.bg_mode||"daynight"===i.settings?.bg_mode?i.settings.bg_mode:null,northDeg:a({},i.settings),sunRays:"boolean"==typeof i.settings?.sun_rays?i.settings.sun_rays:null,tempMin:h.tempMin,tempMax:h.tempMax,showLqi:h.showLqi??this.host._config?.show_signal??!0,cardFontScale:h.cardFontScale,labelTemp:h.labelTemp,labelHum:h.labelHum,labelLqi:h.labelLqi,labelLight:h.labelLight,cellCm:Number(i.cell_cm)>0?Number(i.cell_cm):5,cellCmInput:o(Number(i.cell_cm)>0?Number(i.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const d=i(this.host._imperial);this.host._spaceDialog={mode:p,title:"",planUrl:null,planFile:null,...b(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:r,roomOpacity:n,fillMode:"custom",customFill:{...e,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:c,tempMax:h,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:d,cellCmInput:o(d,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await $(e);if("reject"===o.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===o.kind)return void(this.host._backdropGuard=o.state);const a=await v(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return f(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??p}_useServerPlan(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,planUrl:t,planFile:null,pickSaved:!1,savedAspect:void 0},this.host._aspectJob=this._readPlanAspect(t))}async _readPlanAspect(t){for(let s=0;s<40;s++){const s=this.host._display(t);if(s){const e=await new Promise(t=>{const e=new Image;e.onload=()=>t(e.naturalWidth&&e.naturalHeight?e.naturalWidth/e.naturalHeight:0),e.onerror=()=>t(0),e.src=s}),o=this.host._spaceDialog;return o&&o.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...o,savedAspect:e},e):0}if(await new Promise(t=>setTimeout(t,150)),this.host._spaceDialog?.planUrl!==t)return 0}return 0}async _deleteServerPlan(t){if(confirm(this.host._t("confirm.delete_plan",{name:t})))try{await this.host.hass.callWS({type:"houseplan/plans/delete",name:t});const s=this.host._spaceDialog;s?.saved&&(this.host._spaceDialog={...s,saved:s.saved.filter(s=>s.name!==t)})}catch(t){this.host._showToast(this.host._t("toast.plan_delete_failed",{err:this.host._errText(t)}))}}_renderServerPlans(t){if(t.savedBusy)return _`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return _`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return _`<div class="savedplans">
|
||||
${s.map(s=>{return _`
|
||||
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
|
||||
<img src=${this.host._display(s.url)} alt="" loading="lazy" decoding="async" />
|
||||
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b4ba5baf06ec1abf83649f9b5611b92b935e58d54158c6eb4476d412e71f242b";try{await import("./houseplan-assets/houseplan-card-BGHWJhG-.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__="de90e261f2d232a878f7eefc7544ce938d9651f352139e3ce2e1df461f88ead8";try{await import("./houseplan-assets/houseplan-card-DMVvG6h7.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)}
|
||||
|
||||
Vendored
+56
-56
@@ -1,125 +1,125 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "b4ba5baf06ec1abf83649f9b5611b92b935e58d54158c6eb4476d412e71f242b",
|
||||
"fingerprint": "de90e261f2d232a878f7eefc7544ce938d9651f352139e3ce2e1df461f88ead8",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-BGHWJhG-.js",
|
||||
"houseplan-assets/houseplan-card-DMVvG6h7.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 275795,
|
||||
"initialViewGzipBytes": 275788,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-YagMeews.js",
|
||||
"houseplan-assets/de-BgnDBk9_.js",
|
||||
"houseplan-assets/editor-B-i7d_fa.js",
|
||||
"houseplan-assets/fr-CHRDAlq_.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CiHb9hUW.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-asE73Ooz.js"
|
||||
"houseplan-assets/backdrop-pick-CofgbLZw.js",
|
||||
"houseplan-assets/de-Dneq39EZ.js",
|
||||
"houseplan-assets/editor-CGUyHfKM.js",
|
||||
"houseplan-assets/fr-V27I-L0w.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-B0xo8c4i.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CnVNiHau.js"
|
||||
],
|
||||
"lazyGzipBytes": 191494,
|
||||
"lazyGzipBytes": 191479,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-YagMeews.js",
|
||||
"houseplan-assets/editor-B-i7d_fa.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CiHb9hUW.js"
|
||||
"houseplan-assets/backdrop-pick-CofgbLZw.js",
|
||||
"houseplan-assets/editor-CGUyHfKM.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-B0xo8c4i.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 139736,
|
||||
"lazyEditorGzipBytes": 139727,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-YagMeews.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-asE73Ooz.js"
|
||||
"houseplan-assets/backdrop-pick-CofgbLZw.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CnVNiHau.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 9454,
|
||||
"lazyOnboardingGzipBytes": 9449,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-BgnDBk9_.js",
|
||||
"houseplan-assets/fr-CHRDAlq_.js"
|
||||
"houseplan-assets/de-Dneq39EZ.js",
|
||||
"houseplan-assets/fr-V27I-L0w.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 45262,
|
||||
"lazyLocaleGzipBytes": 45255,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-YagMeews.js",
|
||||
"sha256": "c8b2ce1daed814c2eeb1decbe0829e124e9ab4b7d996836925f85dbf956b319e",
|
||||
"path": "houseplan-assets/backdrop-pick-CofgbLZw.js",
|
||||
"sha256": "ea2e9d5221b2ecedc43e282f4995a181875c9d48731d85d0a727524db66bb847",
|
||||
"rawBytes": 6967,
|
||||
"gzipBytes": 2958,
|
||||
"gzipBytes": 2952,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BGHWJhG-.js"
|
||||
"houseplan-assets/houseplan-card-DMVvG6h7.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-BgnDBk9_.js",
|
||||
"sha256": "9e3c38ccabd0d892e54e9f67844e2a8aa8258449e58e94aba2dd8eaa3be4a00a",
|
||||
"path": "houseplan-assets/de-Dneq39EZ.js",
|
||||
"sha256": "70f0c054c510d3d9b070f8f4ed91842431a1e177259600dc61d0f9d883507ac6",
|
||||
"rawBytes": 74963,
|
||||
"gzipBytes": 22841,
|
||||
"gzipBytes": 22838,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-B-i7d_fa.js",
|
||||
"sha256": "d97b29999b0e6f071b432c223fe3032027525b64612e901e44644fbd8a3a7af6",
|
||||
"path": "houseplan-assets/editor-CGUyHfKM.js",
|
||||
"sha256": "479429b01cfd395cb40c72bd559f472fac4077f97d26f19213f792ebb9597bb9",
|
||||
"rawBytes": 3831,
|
||||
"gzipBytes": 1586,
|
||||
"gzipBytes": 1584,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BGHWJhG-.js"
|
||||
"houseplan-assets/houseplan-card-DMVvG6h7.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-CHRDAlq_.js",
|
||||
"sha256": "e07dadedfbe7d76eac1b6dccb17b9ab9ae65e7c234f9754c6bd9b36bd6e896c0",
|
||||
"path": "houseplan-assets/fr-V27I-L0w.js",
|
||||
"sha256": "0fc13adf9ab64742b5044d3dea32d0edebc89960a4e96a978e5a826ae40282c9",
|
||||
"rawBytes": 77091,
|
||||
"gzipBytes": 22421,
|
||||
"gzipBytes": 22417,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-BGHWJhG-.js",
|
||||
"sha256": "141037436a8135e2464bd1146e5eb75111eff7bcaa68fb7e24520eebe4d0c305",
|
||||
"rawBytes": 971365,
|
||||
"gzipBytes": 274998,
|
||||
"path": "houseplan-assets/houseplan-card-DMVvG6h7.js",
|
||||
"sha256": "740f00a335cce779d185f7f855885932ff989eb93cb2f49e56b21a0768ab3cea",
|
||||
"rawBytes": 971326,
|
||||
"gzipBytes": 274992,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-BgnDBk9_.js",
|
||||
"houseplan-assets/editor-B-i7d_fa.js",
|
||||
"houseplan-assets/fr-CHRDAlq_.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CiHb9hUW.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-asE73Ooz.js"
|
||||
"houseplan-assets/de-Dneq39EZ.js",
|
||||
"houseplan-assets/editor-CGUyHfKM.js",
|
||||
"houseplan-assets/fr-V27I-L0w.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-B0xo8c4i.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CnVNiHau.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-CiHb9hUW.js",
|
||||
"sha256": "f45742e37f3eaa8176b9001ba33fb601e27eee299ccf3d0f539253a181e578ab",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-B0xo8c4i.js",
|
||||
"sha256": "cf448ee2c5f9f375f11b39920f805b8585ae9d01babe540c77a6f5ad1cc86b8e",
|
||||
"rawBytes": 523581,
|
||||
"gzipBytes": 135192,
|
||||
"gzipBytes": 135191,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-YagMeews.js",
|
||||
"houseplan-assets/houseplan-card-BGHWJhG-.js"
|
||||
"houseplan-assets/backdrop-pick-CofgbLZw.js",
|
||||
"houseplan-assets/houseplan-card-DMVvG6h7.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-asE73Ooz.js",
|
||||
"sha256": "536304d3b2877ed85e8afc4518aaf896691bcfe6e8dad5d9fde245f3c3f81f5e",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-CnVNiHau.js",
|
||||
"sha256": "de0d43bf21b9e55b6ac471d2f4c9af1d5a5770e30289fa45dfef35fd3968452f",
|
||||
"rawBytes": 26195,
|
||||
"gzipBytes": 6496,
|
||||
"gzipBytes": 6497,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-YagMeews.js",
|
||||
"houseplan-assets/houseplan-card-BGHWJhG-.js"
|
||||
"houseplan-assets/backdrop-pick-CofgbLZw.js",
|
||||
"houseplan-assets/houseplan-card-DMVvG6h7.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "4faca52c747736e4e54f85f95acc75af508b63e3ab1820ee4c09fc0ba88f208f",
|
||||
"sha256": "e565827af9fe58c0a67b685624fd31b8979a3e7dde6acc47e0a3abcddb42ad8b",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 797,
|
||||
"gzipBytes": 796,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BGHWJhG-.js"
|
||||
"houseplan-assets/houseplan-card-DMVvG6h7.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+5
-5
@@ -1,14 +1,14 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b4ba5baf06ec1abf83649f9b5611b92b935e58d54158c6eb4476d412e71f242b";import{c as e,l as o,t,cZ as s,A as a,c_ as i,c$ as l,d0 as n,E as r,b as c}from"./houseplan-card-BGHWJhG-.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__="de90e261f2d232a878f7eefc7544ce938d9651f352139e3ce2e1df461f88ead8";import{c as e,l as o,t,cZ as s,A as a,c_ as i,c$ as l,d0 as n,E as r,b as c}from"./houseplan-card-DMVvG6h7.js";class f 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,f={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")},h=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}
|
||||
.computeLabel=${e=>h[e.name]||e.name}
|
||||
.computeLabel=${e=>f[e.name]||e.name}
|
||||
@value-changed=${this._valueChanged}
|
||||
></ha-form>`;return c`
|
||||
${d(f.slice(0,3))}
|
||||
${d(h.slice(0,3))}
|
||||
${_?c`<div class="default-floor-error" role="alert"
|
||||
style="color:var(--error-color,#db4437);margin:-4px 0 12px;overflow-wrap:anywhere">
|
||||
${t(s,"editor.default_floor_missing",{id:_})}
|
||||
</div>`:a}
|
||||
${d(f.slice(3))}
|
||||
`}_valueChanged(e){const o={...this._config,...e.detail.value};""===o.floor?delete o.floor:o.floor===this._floorToken&&(o.floor=this._config?.floor);const t=new Event("config-changed",{bubbles:!0,composed:!0});t.detail={config:o},this.dispatchEvent(t)}}h.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",h);
|
||||
${d(h.slice(3))}
|
||||
`}_valueChanged(e){const o={...this._config,...e.detail.value};""===o.floor?delete o.floor:o.floor===this._floorToken&&(o.floor=this._config?.floor);const t=new Event("config-changed",{bubbles:!0,composed:!0});t.detail={config:o},this.dispatchEvent(t)}}f.properties={hass:{attribute:!1},_config:{state:!0},_spaces:{state:!0}},customElements.get("houseplan-card-editor")||customElements.define("houseplan-card-editor",f);
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+5
-5
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b4ba5baf06ec1abf83649f9b5611b92b935e58d54158c6eb4476d412e71f242b";import{bT as t,bU as s,bV as e,bW as o,aq as a,bX as l,c0 as i,bY as h,bZ as c,b_ as n,b$ as r,A as p,b as _,cR as d,ap as u,ar as g,cS as m}from"./houseplan-card-BGHWJhG-.js";import{i as b,c as $,e as v,r as f,a as y,b as w,s as D,t as S}from"./backdrop-pick-YagMeews.js";const k=1e3,C=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},M="b4ba5baf06ec1abf83649f9b5611b92b935e58d54158c6eb4476d412e71f242b";class F{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_openSpaceDialog(p,_){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===p){const i=this.host._serverCfg.spaces.find(t=>t.id===_);if(!i)return;const h=t(i),c=i.settings?.custom_fill&&"object"==typeof i.settings.custom_fill?s(i.settings.custom_fill):null,n="none"===h.fill?{...c||e,a:0}:c;return void(this.host._spaceDialog={mode:p,spaceId:_,title:i.title,planUrl:i.plan_url||null,planFile:null,source:i.plan_url?"file":"draw",showBorders:h.showBorders,showNames:h.showNames,zeroWallStyle:l(i),displayTouched:!0,hideDecor:h.hideDecor,hideOpenings:h.hideOpenings,roomColor:h.color,roomOpacity:h.opacity,fillMode:"none"===h.fill?"custom":h.fill,customFill:n,glowEnabled:h.glow,bgColor:h.bgColor,bgMode:"static"===i.settings?.bg_mode||"daynight"===i.settings?.bg_mode?i.settings.bg_mode:null,northDeg:a({},i.settings),sunRays:"boolean"==typeof i.settings?.sun_rays?i.settings.sun_rays:null,tempMin:h.tempMin,tempMax:h.tempMax,showLqi:h.showLqi??this.host._config?.show_signal??!0,cardFontScale:h.cardFontScale,labelTemp:h.labelTemp,labelHum:h.labelHum,labelLqi:h.labelLqi,labelLight:h.labelLight,cellCm:Number(i.cell_cm)>0?Number(i.cell_cm):5,cellCmInput:o(Number(i.cell_cm)>0?Number(i.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const d=i(this.host._imperial);this.host._spaceDialog={mode:p,title:"",planUrl:null,planFile:null,...b(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:r,roomOpacity:n,fillMode:"custom",customFill:{...e,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:c,tempMax:h,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:d,cellCmInput:o(d,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await $(e);if("reject"===o.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===o.kind)return void(this.host._backdropGuard=o.state);const a=await v(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return f(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??p}_useServerPlan(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,planUrl:t,planFile:null,pickSaved:!1,savedAspect:void 0},this.host._aspectJob=this._readPlanAspect(t))}async _readPlanAspect(t){for(let s=0;s<40;s++){const s=this.host._display(t);if(s){const e=await new Promise(t=>{const e=new Image;e.onload=()=>t(e.naturalWidth&&e.naturalHeight?e.naturalWidth/e.naturalHeight:0),e.onerror=()=>t(0),e.src=s}),o=this.host._spaceDialog;return o&&o.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...o,savedAspect:e},e):0}if(await new Promise(t=>setTimeout(t,150)),this.host._spaceDialog?.planUrl!==t)return 0}return 0}async _deleteServerPlan(t){if(confirm(this.host._t("confirm.delete_plan",{name:t})))try{await this.host.hass.callWS({type:"houseplan/plans/delete",name:t});const s=this.host._spaceDialog;s?.saved&&(this.host._spaceDialog={...s,saved:s.saved.filter(s=>s.name!==t)})}catch(t){this.host._showToast(this.host._t("toast.plan_delete_failed",{err:this.host._errText(t)}))}}_renderServerPlans(t){if(t.savedBusy)return _`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return _`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return _`<div class="savedplans">
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="de90e261f2d232a878f7eefc7544ce938d9651f352139e3ce2e1df461f88ead8";import{bT as t,bU as s,bV as e,bW as o,aq as a,bX as l,c0 as i,bY as h,bZ as c,b_ as n,b$ as r,A as p,b as _,cR as d,ap as u,ar as g,cS as m}from"./houseplan-card-DMVvG6h7.js";import{i as b,c as $,e as v,r as f,a as y,b as w,s as D,t as S}from"./backdrop-pick-CofgbLZw.js";const k=1e3,C=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},M="de90e261f2d232a878f7eefc7544ce938d9651f352139e3ce2e1df461f88ead8";class F{constructor(t){this.host=t,this._toggleServerPlans=async()=>{const t=this.host._spaceDialog;if(t)if(t.pickSaved)this.host._spaceDialog={...t,pickSaved:!1};else{this.host._spaceDialog={...t,pickSaved:!0,savedBusy:!0};try{const t=await this.host.hass.callWS({type:"houseplan/plans/list"}),s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:t?.plans||[],savedBusy:!1})}catch(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,saved:[],savedBusy:!1}),this.host._showToast(this.host._t("toast.plans_list_failed",{err:this.host._errText(t)}))}}}}_openSpaceDialog(p,_){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===p){const i=this.host._serverCfg.spaces.find(t=>t.id===_);if(!i)return;const h=t(i),c=i.settings?.custom_fill&&"object"==typeof i.settings.custom_fill?s(i.settings.custom_fill):null,n="none"===h.fill?{...c||e,a:0}:c;return void(this.host._spaceDialog={mode:p,spaceId:_,title:i.title,planUrl:i.plan_url||null,planFile:null,source:i.plan_url?"file":"draw",showBorders:h.showBorders,showNames:h.showNames,zeroWallStyle:l(i),displayTouched:!0,hideDecor:h.hideDecor,hideOpenings:h.hideOpenings,roomColor:h.color,roomOpacity:h.opacity,fillMode:"none"===h.fill?"custom":h.fill,customFill:n,glowEnabled:h.glow,bgColor:h.bgColor,bgMode:"static"===i.settings?.bg_mode||"daynight"===i.settings?.bg_mode?i.settings.bg_mode:null,northDeg:a({},i.settings),sunRays:"boolean"==typeof i.settings?.sun_rays?i.settings.sun_rays:null,tempMin:h.tempMin,tempMax:h.tempMax,showLqi:h.showLqi??this.host._config?.show_signal??!0,cardFontScale:h.cardFontScale,labelTemp:h.labelTemp,labelHum:h.labelHum,labelLqi:h.labelLqi,labelLight:h.labelLight,cellCm:Number(i.cell_cm)>0?Number(i.cell_cm):5,cellCmInput:o(Number(i.cell_cm)>0?Number(i.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const d=i(this.host._imperial);this.host._spaceDialog={mode:p,title:"",planUrl:null,planFile:null,...b(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:r,roomOpacity:n,fillMode:"custom",customFill:{...e,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:c,tempMax:h,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:d,cellCmInput:o(d,this.host._imperial),cellCmTouched:!1,busy:!1}}async _pickPlanFile(t){const s=t.target,e=s.files?.[0];if(!e||!this.host._spaceDialog)return;s.value="";const o=await $(e);if("reject"===o.kind)return void this.host._showToast(this.host._t("toast.plan_formats"));if("guard"===o.kind)return void(this.host._backdropGuard=o.state);const a=await v(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return f(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??p}_useServerPlan(t){const s=this.host._spaceDialog;s&&(this.host._spaceDialog={...s,planUrl:t,planFile:null,pickSaved:!1,savedAspect:void 0},this.host._aspectJob=this._readPlanAspect(t))}async _readPlanAspect(t){for(let s=0;s<40;s++){const s=this.host._display(t);if(s){const e=await new Promise(t=>{const e=new Image;e.onload=()=>t(e.naturalWidth&&e.naturalHeight?e.naturalWidth/e.naturalHeight:0),e.onerror=()=>t(0),e.src=s}),o=this.host._spaceDialog;return o&&o.planUrl===t&&Number.isFinite(e)&&e>0?(this.host._spaceDialog={...o,savedAspect:e},e):0}if(await new Promise(t=>setTimeout(t,150)),this.host._spaceDialog?.planUrl!==t)return 0}return 0}async _deleteServerPlan(t){if(confirm(this.host._t("confirm.delete_plan",{name:t})))try{await this.host.hass.callWS({type:"houseplan/plans/delete",name:t});const s=this.host._spaceDialog;s?.saved&&(this.host._spaceDialog={...s,saved:s.saved.filter(s=>s.name!==t)})}catch(t){this.host._showToast(this.host._t("toast.plan_delete_failed",{err:this.host._errText(t)}))}}_renderServerPlans(t){if(t.savedBusy)return _`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return _`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return _`<div class="savedplans">
|
||||
${s.map(s=>{return _`
|
||||
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
|
||||
<img src=${this.host._display(s.url)} alt="" loading="lazy" decoding="async" />
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="b4ba5baf06ec1abf83649f9b5611b92b935e58d54158c6eb4476d412e71f242b";try{await import("./houseplan-assets/houseplan-card-BGHWJhG-.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__="de90e261f2d232a878f7eefc7544ce938d9651f352139e3ce2e1df461f88ead8";try{await import("./houseplan-assets/houseplan-card-DMVvG6h7.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)}
|
||||
|
||||
+13
-9
@@ -28,7 +28,8 @@ import {
|
||||
type LightSegment, polygonSegments, splitAtIntersections, visibilityPolygon,
|
||||
} from './light-visibility';
|
||||
import {
|
||||
recutWallBodiesGeometry, wallBodiesGeometry, type WallEntry,
|
||||
recutWallBodiesGeometry, wallBodiesGeometry,
|
||||
type WallBodiesGeometryResult, type WallEntry,
|
||||
} from './wall-thickness';
|
||||
import type { DevItem, RoomCfg, SpaceModel } from './types';
|
||||
import type { VirtualLightSnapshot } from './virtual-light-state';
|
||||
@@ -83,7 +84,7 @@ export interface LightBarrierScene {
|
||||
occluders: LightSegment[];
|
||||
floor: number[][][];
|
||||
fingerprint: string;
|
||||
masonryGeometry: any;
|
||||
masonryGeometry: unknown;
|
||||
opaqueBodies: number[][][];
|
||||
}
|
||||
|
||||
@@ -114,6 +115,12 @@ export interface GlowRuntimeState {
|
||||
sourceSeq: number;
|
||||
}
|
||||
|
||||
type GlowHass = Record<string, unknown> & { states: Record<string, unknown> };
|
||||
|
||||
type SharedWallGeometry = Pick<WallBodiesGeometryResult,
|
||||
'status' | 'roomGeom' | 'roomComponents' | 'openingIndex' | 'depthUnits'
|
||||
| 'openingPadUnits'> & { sourceFingerprint?: string };
|
||||
|
||||
export function createGlowRuntimeState(): GlowRuntimeState {
|
||||
return {
|
||||
clipCache: new Map(),
|
||||
@@ -155,7 +162,7 @@ export function writeGlowClip(
|
||||
|
||||
/** The exact spatial-source decision shared by both public cards. */
|
||||
export function resolveGlowCandidates(input: {
|
||||
hass: any;
|
||||
hass: GlowHass;
|
||||
devices: readonly DevItem[];
|
||||
virtualLights?: VirtualLightSnapshot | null;
|
||||
spaceId: string;
|
||||
@@ -210,7 +217,7 @@ export function resolveGlowCandidates(input: {
|
||||
* opening. The fingerprint is intentionally available before structural work.
|
||||
*/
|
||||
export function resolveLightBarrierRevision(input: {
|
||||
rawSpaceConfig: any;
|
||||
rawSpaceConfig: unknown;
|
||||
space: SpaceModel;
|
||||
openings: readonly GeometryOpeningProjection[];
|
||||
cellCm: number;
|
||||
@@ -264,7 +271,6 @@ export function resolveLightBarrierRevision(input: {
|
||||
* different barrier algorithm.
|
||||
*/
|
||||
export function buildLightBarrierScene(input: {
|
||||
rawSpaceConfig: any;
|
||||
space: SpaceModel;
|
||||
revision: LightBarrierRevision;
|
||||
walls: readonly WallEntry[];
|
||||
@@ -273,7 +279,7 @@ export function buildLightBarrierScene(input: {
|
||||
cellCm: number;
|
||||
gridPitch: number;
|
||||
coordScale: number;
|
||||
sharedWallGeometry?: any;
|
||||
sharedWallGeometry?: SharedWallGeometry | null;
|
||||
physicalBodies: (partitionCuts: PartitionOpeningCut[], cacheKey: string) => number[][][];
|
||||
}): LightBarrierScene {
|
||||
const { revision } = input;
|
||||
@@ -310,9 +316,7 @@ export function buildLightBarrierScene(input: {
|
||||
: []);
|
||||
const opaqueBodies = input.physicalBodies(partitionCuts, cacheKey);
|
||||
const occluders: LightSegment[] = [];
|
||||
const sharedFingerprint = (input.sharedWallGeometry as {
|
||||
sourceFingerprint?: string;
|
||||
} | null | undefined)?.sourceFingerprint;
|
||||
const sharedFingerprint = input.sharedWallGeometry?.sourceFingerprint;
|
||||
const recut = input.sharedWallGeometry
|
||||
&& sharedFingerprint === revision.geometryFingerprint
|
||||
? recutWallBodiesGeometry(input.sharedWallGeometry, roomPassages, opaqueBodies)
|
||||
|
||||
@@ -10270,7 +10270,6 @@ export class HouseplanCard extends LitElement {
|
||||
return pooled.value.value;
|
||||
}
|
||||
const value = buildLightBarrierScene({
|
||||
rawSpaceConfig: raw,
|
||||
space,
|
||||
revision,
|
||||
walls: this._spaceWalls,
|
||||
|
||||
+3
-2
@@ -573,7 +573,6 @@ export function renderSpaceStatic(o: StaticRenderOpts): TemplateResult | null {
|
||||
space.id,
|
||||
revision.fingerprint,
|
||||
() => buildLightBarrierScene({
|
||||
rawSpaceConfig: spCfg,
|
||||
space,
|
||||
revision,
|
||||
walls,
|
||||
@@ -588,7 +587,9 @@ export function renderSpaceStatic(o: StaticRenderOpts): TemplateResult | null {
|
||||
).all,
|
||||
}),
|
||||
);
|
||||
const configuredRadius = Number((o.cfg.settings as any)?.glow_radius_cm);
|
||||
const configuredRadius = Number(
|
||||
(o.cfg.settings as { glow_radius_cm?: unknown }).glow_radius_cm,
|
||||
);
|
||||
const defaultRadiusCm = Number.isFinite(configuredRadius) && configuredRadius > 0
|
||||
? configuredRadius : 300;
|
||||
const candidates = resolveGlowCandidates({
|
||||
|
||||
Reference in New Issue
Block a user