mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-29 03:09:36 +00:00
@@ -1,125 +1,125 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "bea7a66e32ddb16ddf86373a31f7f7187c77087e60cd40b1af83bc4dc63b84ee",
|
||||
"fingerprint": "3b3266f5c1877e9391391f251beca97edd3e900ec4e8b5c76e1104f30c9bc546",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-CAJGhl9a.js",
|
||||
"houseplan-assets/houseplan-card-C8w37GDk.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 294862,
|
||||
"initialViewGzipBytes": 294865,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-DKi7O-33.js",
|
||||
"houseplan-assets/de-sKrd9mey.js",
|
||||
"houseplan-assets/editor-DJpGQNMT.js",
|
||||
"houseplan-assets/fr-pbogmEhD.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CqfpB4F2.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DFYoQZvw.js"
|
||||
"houseplan-assets/backdrop-pick-vUmKfDDT.js",
|
||||
"houseplan-assets/de-BjgDA_-V.js",
|
||||
"houseplan-assets/editor-DE8oZkN6.js",
|
||||
"houseplan-assets/fr-BJ_QuGU7.js",
|
||||
"houseplan-assets/houseplan-editor-runtime--Pbh6-7a.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-krqWbC8A.js"
|
||||
],
|
||||
"lazyGzipBytes": 223565,
|
||||
"lazyGzipBytes": 223581,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-DKi7O-33.js",
|
||||
"houseplan-assets/editor-DJpGQNMT.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CqfpB4F2.js"
|
||||
"houseplan-assets/backdrop-pick-vUmKfDDT.js",
|
||||
"houseplan-assets/editor-DE8oZkN6.js",
|
||||
"houseplan-assets/houseplan-editor-runtime--Pbh6-7a.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 167511,
|
||||
"lazyEditorGzipBytes": 167513,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-DKi7O-33.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DFYoQZvw.js"
|
||||
"houseplan-assets/backdrop-pick-vUmKfDDT.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-krqWbC8A.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 14236,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-sKrd9mey.js",
|
||||
"houseplan-assets/fr-pbogmEhD.js"
|
||||
"houseplan-assets/de-BjgDA_-V.js",
|
||||
"houseplan-assets/fr-BJ_QuGU7.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 49099,
|
||||
"lazyLocaleGzipBytes": 49112,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-DKi7O-33.js",
|
||||
"sha256": "c2cd0abaf7601b7f5785d3a56b2496c3567ebd6163493cceee90ba606c73d777",
|
||||
"path": "houseplan-assets/backdrop-pick-vUmKfDDT.js",
|
||||
"sha256": "f789275a2e1a8044a4edd4f18470514139f3e7d8f6828605dc37811ca84a714e",
|
||||
"rawBytes": 21418,
|
||||
"gzipBytes": 7281,
|
||||
"gzipBytes": 7280,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-CAJGhl9a.js"
|
||||
"houseplan-assets/houseplan-card-C8w37GDk.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-sKrd9mey.js",
|
||||
"sha256": "89db148dfa494553b7ee47577bbf6005b9b7cf7797a1d7b5f54dbe454023dd8e",
|
||||
"path": "houseplan-assets/de-BjgDA_-V.js",
|
||||
"sha256": "f7a91fd53b06aa187f70988f89bed5e3431d4bb544b51346f9db7912826fa534",
|
||||
"rawBytes": 82182,
|
||||
"gzipBytes": 24819,
|
||||
"gzipBytes": 24826,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-DJpGQNMT.js",
|
||||
"sha256": "cb758f3991f6a7fe4aa3927c8e99be63f6ac065869be54fb13e62d03af53a3de",
|
||||
"path": "houseplan-assets/editor-DE8oZkN6.js",
|
||||
"sha256": "6d8d8b1f353f6747801909b0221de10847036a7a077a1b45453b122f010bf03e",
|
||||
"rawBytes": 3826,
|
||||
"gzipBytes": 1580,
|
||||
"gzipBytes": 1581,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-CAJGhl9a.js"
|
||||
"houseplan-assets/houseplan-card-C8w37GDk.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-pbogmEhD.js",
|
||||
"sha256": "5c67654a7ad4eb826242f463267d3d825c6de87634e5e49c8131fedd8bf79dc0",
|
||||
"path": "houseplan-assets/fr-BJ_QuGU7.js",
|
||||
"sha256": "5164aed80408d9ea4cc81ae467221f991b517a4d65efb74afd73499fa163f32e",
|
||||
"rawBytes": 84312,
|
||||
"gzipBytes": 24280,
|
||||
"gzipBytes": 24286,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-CAJGhl9a.js",
|
||||
"sha256": "5aa26a1b0c9563d7f3333fe73285882c8ffb92473092defc93896930a45b1b63",
|
||||
"rawBytes": 1047324,
|
||||
"gzipBytes": 294068,
|
||||
"path": "houseplan-assets/houseplan-card-C8w37GDk.js",
|
||||
"sha256": "cac6e48f53e8a00900cfca465d7d1692b44a700a0438075e83f669d5fc367089",
|
||||
"rawBytes": 1047374,
|
||||
"gzipBytes": 294069,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-sKrd9mey.js",
|
||||
"houseplan-assets/editor-DJpGQNMT.js",
|
||||
"houseplan-assets/fr-pbogmEhD.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CqfpB4F2.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DFYoQZvw.js"
|
||||
"houseplan-assets/de-BjgDA_-V.js",
|
||||
"houseplan-assets/editor-DE8oZkN6.js",
|
||||
"houseplan-assets/fr-BJ_QuGU7.js",
|
||||
"houseplan-assets/houseplan-editor-runtime--Pbh6-7a.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-krqWbC8A.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-CqfpB4F2.js",
|
||||
"sha256": "757ffb370808136785f422f87700ba503df72c574a089262821a5936bc90e52e",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime--Pbh6-7a.js",
|
||||
"sha256": "605aa48f413ea7e97c30019d7da80c8b4048f2758c1afb8180f337475842772c",
|
||||
"rawBytes": 601994,
|
||||
"gzipBytes": 158650,
|
||||
"gzipBytes": 158652,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-DKi7O-33.js",
|
||||
"houseplan-assets/houseplan-card-CAJGhl9a.js"
|
||||
"houseplan-assets/backdrop-pick-vUmKfDDT.js",
|
||||
"houseplan-assets/houseplan-card-C8w37GDk.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-DFYoQZvw.js",
|
||||
"sha256": "1109e83ac014dadd2fbc28bcc2d3006249daf3511bbb2a04674f4060788f3bb4",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-krqWbC8A.js",
|
||||
"sha256": "c8e02dc7958910578b39c227a1adcce9f6b272a22e0e403ea587859fc679067d",
|
||||
"rawBytes": 28088,
|
||||
"gzipBytes": 6955,
|
||||
"gzipBytes": 6956,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-DKi7O-33.js",
|
||||
"houseplan-assets/houseplan-card-CAJGhl9a.js"
|
||||
"houseplan-assets/backdrop-pick-vUmKfDDT.js",
|
||||
"houseplan-assets/houseplan-card-C8w37GDk.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "5af9f9b23349cdc8bc2369aa0c48c61c3552381b895c59df683385835789290b",
|
||||
"sha256": "4182a1debed64bb2c2b337fc8ca10aa0cd3ea4c6530c597404505c277104a623",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 794,
|
||||
"gzipBytes": 796,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-CAJGhl9a.js"
|
||||
"houseplan-assets/houseplan-card-C8w37GDk.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
}
|
||||
|
||||
+7
-7
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="bea7a66e32ddb16ddf86373a31f7f7187c77087e60cd40b1af83bc4dc63b84ee";import{k as e,l as o,t,dm as s,A as a,dn as i,dp as l,dq as n,E as r,c}from"./houseplan-card-CAJGhl9a.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__="3b3266f5c1877e9391391f251beca97edd3e900ec4e8b5c76e1104f30c9bc546";import{k as e,l as o,t,dm as s,A as a,dn as i,dp as l,dq as n,E as r,c}from"./houseplan-card-C8w37GDk.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}
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+8
-8
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__="bea7a66e32ddb16ddf86373a31f7f7187c77087e60cd40b1af83bc4dc63b84ee";import{l as t,aQ as s,A as e,t as o,c as a,cd as l,ce as i,cf as h,cg as c,aN as n,ch as r,cm as p,ci as d,cj as _,ck as u,cl as g,dc as m,aM as b,aO as $,dd as v}from"./houseplan-card-CAJGhl9a.js";import{i as f,c as y,e as w,r as D,a as k,b as S,d as C,t as M}from"./backdrop-pick-DKi7O-33.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="bea7a66e32ddb16ddf86373a31f7f7187c77087e60cd40b1af83bc4dc63b84ee";class L{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)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="3b3266f5c1877e9391391f251beca97edd3e900ec4e8b5c76e1104f30c9bc546";import{l as t,aQ as s,A as e,t as o,c as a,cd as l,ce as i,cf as h,cg as c,aN as n,ch as r,cm as p,ci as d,cj as _,ck as u,cl as g,dc as m,aM as b,aO as $,dd as v}from"./houseplan-card-C8w37GDk.js";import{i as f,c as y,e as w,r as D,a as k,b as S,d as C,t as M}from"./backdrop-pick-vUmKfDDT.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="3b3266f5c1877e9391391f251beca97edd3e900ec4e8b5c76e1104f30c9bc546";class L{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)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
|
||||
.text=${o(h,l)} .ariaLabel=${o(h,i)}></hp-help>`:e}_openSpaceDialog(t,s){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===t){const e=this.host._serverCfg.spaces.find(t=>t.id===s);if(!e)return;const o=l(e),a=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?i(e.settings.custom_fill):null,p="none"===o.fill?{...a||h,a:0}:a;return void(this.host._spaceDialog={mode:t,spaceId:s,title:e.title,planUrl:e.plan_url||null,planFile:null,source:e.plan_url?"file":"draw",showBorders:o.showBorders,showNames:o.showNames,zeroWallStyle:r(e),displayTouched:!0,hideDecor:o.hideDecor,hideOpenings:o.hideOpenings,roomColor:o.color,roomOpacity:o.opacity,fillMode:"none"===o.fill?"custom":o.fill,customFill:p,glowEnabled:o.glow,bgColor:o.bgColor,bgMode:"static"===e.settings?.bg_mode||"daynight"===e.settings?.bg_mode?e.settings.bg_mode:null,northDeg:n({},e.settings),sunRays:"boolean"==typeof e.settings?.sun_rays?e.settings.sun_rays:null,tempMin:o.tempMin,tempMax:o.tempMax,showLqi:o.showLqi??this.host._config?.show_signal??!0,cardFontScale:o.cardFontScale,labelTemp:o.labelTemp,labelHum:o.labelHum,labelLqi:o.labelLqi,labelLight:o.labelLight,cellCm:Number(e.cell_cm)>0?Number(e.cell_cm):5,cellCmInput:c(Number(e.cell_cm)>0?Number(e.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const e=p(this.host._imperial);this.host._spaceDialog={mode:t,title:"",planUrl:null,planFile:null,...f(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:g,roomOpacity:u,fillMode:"custom",customFill:{...h,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:_,tempMax:d,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,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 y(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 w(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return D(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??e}_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){const s=this.host._spaceDialog,e=s?.saved?.find(s=>s.name===t);if(!s||!e||e.used_by.length||e.url===s.planUrl)return;const o=await this.host._confirmDanger({key:"delete-plan",kind:"destructive",title:this.host._t("confirm.delete_plan_title"),message:this.host._t("confirm.delete_plan_body"),objectName:t,confirmLabel:this.host._t("btn.delete"),cancelLabel:this.host._t("btn.cancel")}),a=this.host._spaceDialog,l=a?.saved?.find(s=>s.name===t);if(o&&a&&l&&l.url===e.url&&l.modified===e.modified&&!l.used_by.length&&l.url!==a.planUrl)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 a`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return a`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return a`<div class="savedplans">
|
||||
${s.map(s=>{return a`
|
||||
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
|
||||
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="bea7a66e32ddb16ddf86373a31f7f7187c77087e60cd40b1af83bc4dc63b84ee";try{await import("./houseplan-assets/houseplan-card-CAJGhl9a.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__="3b3266f5c1877e9391391f251beca97edd3e900ec4e8b5c76e1104f30c9bc546";try{await import("./houseplan-assets/houseplan-card-C8w37GDk.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)}
|
||||
|
||||
@@ -111,6 +111,22 @@ const out = await page.evaluate(async () => {
|
||||
result.keyboardUsesSameCommand = c._roomFocus?.roomId === 'room-a'
|
||||
&& (root.activeElement === label || document.activeElement === label);
|
||||
|
||||
const editorLabelsArePassive = [];
|
||||
for (const mode of ['devices', 'decor']) {
|
||||
c._mode = mode;
|
||||
c.requestUpdate();
|
||||
await c.updateComplete;
|
||||
const editorLabel = root.querySelector('.roomlabel[data-id="room-a"]');
|
||||
editorLabelsArePassive.push(editorLabel
|
||||
&& !editorLabel.hasAttribute('role')
|
||||
&& !editorLabel.hasAttribute('tabindex')
|
||||
&& !editorLabel.hasAttribute('aria-label'));
|
||||
}
|
||||
result.editorsDoNotExposeRoomAction = editorLabelsArePassive.every(Boolean);
|
||||
c._mode = 'view';
|
||||
c.requestUpdate();
|
||||
await c.updateComplete;
|
||||
|
||||
c._resetZoom(); await waitCamera();
|
||||
c._clearRoomFocus(true);
|
||||
const currentLabel = root.querySelector('.roomlabel[data-id="room-a"]');
|
||||
|
||||
Vendored
+55
-55
@@ -1,125 +1,125 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "bea7a66e32ddb16ddf86373a31f7f7187c77087e60cd40b1af83bc4dc63b84ee",
|
||||
"fingerprint": "3b3266f5c1877e9391391f251beca97edd3e900ec4e8b5c76e1104f30c9bc546",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-CAJGhl9a.js",
|
||||
"houseplan-assets/houseplan-card-C8w37GDk.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 294862,
|
||||
"initialViewGzipBytes": 294865,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-DKi7O-33.js",
|
||||
"houseplan-assets/de-sKrd9mey.js",
|
||||
"houseplan-assets/editor-DJpGQNMT.js",
|
||||
"houseplan-assets/fr-pbogmEhD.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CqfpB4F2.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DFYoQZvw.js"
|
||||
"houseplan-assets/backdrop-pick-vUmKfDDT.js",
|
||||
"houseplan-assets/de-BjgDA_-V.js",
|
||||
"houseplan-assets/editor-DE8oZkN6.js",
|
||||
"houseplan-assets/fr-BJ_QuGU7.js",
|
||||
"houseplan-assets/houseplan-editor-runtime--Pbh6-7a.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-krqWbC8A.js"
|
||||
],
|
||||
"lazyGzipBytes": 223565,
|
||||
"lazyGzipBytes": 223581,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-DKi7O-33.js",
|
||||
"houseplan-assets/editor-DJpGQNMT.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CqfpB4F2.js"
|
||||
"houseplan-assets/backdrop-pick-vUmKfDDT.js",
|
||||
"houseplan-assets/editor-DE8oZkN6.js",
|
||||
"houseplan-assets/houseplan-editor-runtime--Pbh6-7a.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 167511,
|
||||
"lazyEditorGzipBytes": 167513,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-DKi7O-33.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DFYoQZvw.js"
|
||||
"houseplan-assets/backdrop-pick-vUmKfDDT.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-krqWbC8A.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 14236,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-sKrd9mey.js",
|
||||
"houseplan-assets/fr-pbogmEhD.js"
|
||||
"houseplan-assets/de-BjgDA_-V.js",
|
||||
"houseplan-assets/fr-BJ_QuGU7.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 49099,
|
||||
"lazyLocaleGzipBytes": 49112,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-DKi7O-33.js",
|
||||
"sha256": "c2cd0abaf7601b7f5785d3a56b2496c3567ebd6163493cceee90ba606c73d777",
|
||||
"path": "houseplan-assets/backdrop-pick-vUmKfDDT.js",
|
||||
"sha256": "f789275a2e1a8044a4edd4f18470514139f3e7d8f6828605dc37811ca84a714e",
|
||||
"rawBytes": 21418,
|
||||
"gzipBytes": 7281,
|
||||
"gzipBytes": 7280,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-CAJGhl9a.js"
|
||||
"houseplan-assets/houseplan-card-C8w37GDk.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-sKrd9mey.js",
|
||||
"sha256": "89db148dfa494553b7ee47577bbf6005b9b7cf7797a1d7b5f54dbe454023dd8e",
|
||||
"path": "houseplan-assets/de-BjgDA_-V.js",
|
||||
"sha256": "f7a91fd53b06aa187f70988f89bed5e3431d4bb544b51346f9db7912826fa534",
|
||||
"rawBytes": 82182,
|
||||
"gzipBytes": 24819,
|
||||
"gzipBytes": 24826,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-DJpGQNMT.js",
|
||||
"sha256": "cb758f3991f6a7fe4aa3927c8e99be63f6ac065869be54fb13e62d03af53a3de",
|
||||
"path": "houseplan-assets/editor-DE8oZkN6.js",
|
||||
"sha256": "6d8d8b1f353f6747801909b0221de10847036a7a077a1b45453b122f010bf03e",
|
||||
"rawBytes": 3826,
|
||||
"gzipBytes": 1580,
|
||||
"gzipBytes": 1581,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-CAJGhl9a.js"
|
||||
"houseplan-assets/houseplan-card-C8w37GDk.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-pbogmEhD.js",
|
||||
"sha256": "5c67654a7ad4eb826242f463267d3d825c6de87634e5e49c8131fedd8bf79dc0",
|
||||
"path": "houseplan-assets/fr-BJ_QuGU7.js",
|
||||
"sha256": "5164aed80408d9ea4cc81ae467221f991b517a4d65efb74afd73499fa163f32e",
|
||||
"rawBytes": 84312,
|
||||
"gzipBytes": 24280,
|
||||
"gzipBytes": 24286,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-CAJGhl9a.js",
|
||||
"sha256": "5aa26a1b0c9563d7f3333fe73285882c8ffb92473092defc93896930a45b1b63",
|
||||
"rawBytes": 1047324,
|
||||
"gzipBytes": 294068,
|
||||
"path": "houseplan-assets/houseplan-card-C8w37GDk.js",
|
||||
"sha256": "cac6e48f53e8a00900cfca465d7d1692b44a700a0438075e83f669d5fc367089",
|
||||
"rawBytes": 1047374,
|
||||
"gzipBytes": 294069,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-sKrd9mey.js",
|
||||
"houseplan-assets/editor-DJpGQNMT.js",
|
||||
"houseplan-assets/fr-pbogmEhD.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-CqfpB4F2.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DFYoQZvw.js"
|
||||
"houseplan-assets/de-BjgDA_-V.js",
|
||||
"houseplan-assets/editor-DE8oZkN6.js",
|
||||
"houseplan-assets/fr-BJ_QuGU7.js",
|
||||
"houseplan-assets/houseplan-editor-runtime--Pbh6-7a.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-krqWbC8A.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-CqfpB4F2.js",
|
||||
"sha256": "757ffb370808136785f422f87700ba503df72c574a089262821a5936bc90e52e",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime--Pbh6-7a.js",
|
||||
"sha256": "605aa48f413ea7e97c30019d7da80c8b4048f2758c1afb8180f337475842772c",
|
||||
"rawBytes": 601994,
|
||||
"gzipBytes": 158650,
|
||||
"gzipBytes": 158652,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-DKi7O-33.js",
|
||||
"houseplan-assets/houseplan-card-CAJGhl9a.js"
|
||||
"houseplan-assets/backdrop-pick-vUmKfDDT.js",
|
||||
"houseplan-assets/houseplan-card-C8w37GDk.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-DFYoQZvw.js",
|
||||
"sha256": "1109e83ac014dadd2fbc28bcc2d3006249daf3511bbb2a04674f4060788f3bb4",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-krqWbC8A.js",
|
||||
"sha256": "c8e02dc7958910578b39c227a1adcce9f6b272a22e0e403ea587859fc679067d",
|
||||
"rawBytes": 28088,
|
||||
"gzipBytes": 6955,
|
||||
"gzipBytes": 6956,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-DKi7O-33.js",
|
||||
"houseplan-assets/houseplan-card-CAJGhl9a.js"
|
||||
"houseplan-assets/backdrop-pick-vUmKfDDT.js",
|
||||
"houseplan-assets/houseplan-card-C8w37GDk.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "5af9f9b23349cdc8bc2369aa0c48c61c3552381b895c59df683385835789290b",
|
||||
"sha256": "4182a1debed64bb2c2b337fc8ca10aa0cd3ea4c6530c597404505c277104a623",
|
||||
"rawBytes": 1183,
|
||||
"gzipBytes": 794,
|
||||
"gzipBytes": 796,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-CAJGhl9a.js"
|
||||
"houseplan-assets/houseplan-card-C8w37GDk.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
}
|
||||
|
||||
Vendored
+7
-7
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,4 +1,4 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="bea7a66e32ddb16ddf86373a31f7f7187c77087e60cd40b1af83bc4dc63b84ee";import{k as e,l as o,t,dm as s,A as a,dn as i,dp as l,dq as n,E as r,c}from"./houseplan-card-CAJGhl9a.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__="3b3266f5c1877e9391391f251beca97edd3e900ec4e8b5c76e1104f30c9bc546";import{k as e,l as o,t,dm as s,A as a,dn as i,dp as l,dq as n,E as r,c}from"./houseplan-card-C8w37GDk.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}
|
||||
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+8
-8
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__="bea7a66e32ddb16ddf86373a31f7f7187c77087e60cd40b1af83bc4dc63b84ee";import{l as t,aQ as s,A as e,t as o,c as a,cd as l,ce as i,cf as h,cg as c,aN as n,ch as r,cm as p,ci as d,cj as _,ck as u,cl as g,dc as m,aM as b,aO as $,dd as v}from"./houseplan-card-CAJGhl9a.js";import{i as f,c as y,e as w,r as D,a as k,b as S,d as C,t as M}from"./backdrop-pick-DKi7O-33.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="bea7a66e32ddb16ddf86373a31f7f7187c77087e60cd40b1af83bc4dc63b84ee";class L{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)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="3b3266f5c1877e9391391f251beca97edd3e900ec4e8b5c76e1104f30c9bc546";import{l as t,aQ as s,A as e,t as o,c as a,cd as l,ce as i,cf as h,cg as c,aN as n,ch as r,cm as p,ci as d,cj as _,ck as u,cl as g,dc as m,aM as b,aO as $,dd as v}from"./houseplan-card-C8w37GDk.js";import{i as f,c as y,e as w,r as D,a as k,b as S,d as C,t as M}from"./backdrop-pick-vUmKfDDT.js";const F=1e3,x=t=>{if(!t.trim())return null;const s=Number(t.replace(",","."));return Number.isFinite(s)?s:null},T="3b3266f5c1877e9391391f251beca97edd3e900ec4e8b5c76e1104f30c9bc546";class L{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)}))}}}}_help(l){const i=`${l}.aria`,h=t(this.host.hass,this.host._config?.language);return s(h,l)&&s(h,i)?a`<hp-help data-help-key=${l}
|
||||
.text=${o(h,l)} .ariaLabel=${o(h,i)}></hp-help>`:e}_openSpaceDialog(t,s){if(!this.host._serverStorage||!this.host._serverCfg)return void this.host._showToast(this.host._t("toast.integration_missing"));if("edit"===t){const e=this.host._serverCfg.spaces.find(t=>t.id===s);if(!e)return;const o=l(e),a=e.settings?.custom_fill&&"object"==typeof e.settings.custom_fill?i(e.settings.custom_fill):null,p="none"===o.fill?{...a||h,a:0}:a;return void(this.host._spaceDialog={mode:t,spaceId:s,title:e.title,planUrl:e.plan_url||null,planFile:null,source:e.plan_url?"file":"draw",showBorders:o.showBorders,showNames:o.showNames,zeroWallStyle:r(e),displayTouched:!0,hideDecor:o.hideDecor,hideOpenings:o.hideOpenings,roomColor:o.color,roomOpacity:o.opacity,fillMode:"none"===o.fill?"custom":o.fill,customFill:p,glowEnabled:o.glow,bgColor:o.bgColor,bgMode:"static"===e.settings?.bg_mode||"daynight"===e.settings?.bg_mode?e.settings.bg_mode:null,northDeg:n({},e.settings),sunRays:"boolean"==typeof e.settings?.sun_rays?e.settings.sun_rays:null,tempMin:o.tempMin,tempMax:o.tempMax,showLqi:o.showLqi??this.host._config?.show_signal??!0,cardFontScale:o.cardFontScale,labelTemp:o.labelTemp,labelHum:o.labelHum,labelLqi:o.labelLqi,labelLight:o.labelLight,cellCm:Number(e.cell_cm)>0?Number(e.cell_cm):5,cellCmInput:c(Number(e.cell_cm)>0?Number(e.cell_cm):5,this.host._imperial),cellCmTouched:!1,busy:!1})}const e=p(this.host._imperial);this.host._spaceDialog={mode:t,title:"",planUrl:null,planFile:null,...f(),hideDecor:!1,hideOpenings:!1,zeroWallStyle:"dashed",roomColor:g,roomOpacity:u,fillMode:"custom",customFill:{...h,a:0},glowEnabled:!0,bgColor:null,bgMode:"daynight",northDeg:null,sunRays:null,tempMin:_,tempMax:d,showLqi:this.host._config?.show_signal??!0,cardFontScale:1,labelTemp:!1,labelHum:!1,labelLqi:!1,labelLight:!1,cellCm:e,cellCmInput:c(e,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 y(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 w(e,o.ext,e.name);this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:a})}_renderBackdropGuard(){return D(this.host,t=>{this.host._spaceDialog&&(this.host._spaceDialog={...this.host._spaceDialog,planFile:t})},()=>{this.host._backdropGuard=null},this.host.hass)??e}_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){const s=this.host._spaceDialog,e=s?.saved?.find(s=>s.name===t);if(!s||!e||e.used_by.length||e.url===s.planUrl)return;const o=await this.host._confirmDanger({key:"delete-plan",kind:"destructive",title:this.host._t("confirm.delete_plan_title"),message:this.host._t("confirm.delete_plan_body"),objectName:t,confirmLabel:this.host._t("btn.delete"),cancelLabel:this.host._t("btn.cancel")}),a=this.host._spaceDialog,l=a?.saved?.find(s=>s.name===t);if(o&&a&&l&&l.url===e.url&&l.modified===e.modified&&!l.used_by.length&&l.url!==a.planUrl)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 a`<div class="savedplans muted">${this.host._t("space.loading")}</div>`;const s=t.saved||[];if(!s.length)return a`<div class="savedplans muted">${this.host._t("space.no_saved")}</div>`;return a`<div class="savedplans">
|
||||
${s.map(s=>{return a`
|
||||
<div class="savedplan ${s.url===t.planUrl?"cur":""}">
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="bea7a66e32ddb16ddf86373a31f7f7187c77087e60cd40b1af83bc4dc63b84ee";try{await import("./houseplan-assets/houseplan-card-CAJGhl9a.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__="3b3266f5c1877e9391391f251beca97edd3e900ec4e8b5c76e1104f30c9bc546";try{await import("./houseplan-assets/houseplan-card-C8w37GDk.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)}
|
||||
|
||||
+2
-1
@@ -3728,7 +3728,8 @@ require hands on real hardware — they remain for the human pass.
|
||||
Скрытая/безымянная подпись не создаёт невидимый tab stop.
|
||||
- [ ] Pure proofs: `node --test test/room-fit.test.mjs`; полный cycle:
|
||||
`npm run typecheck`, `npm test`, `npm run build`. Browser matrix и
|
||||
мутации room ownership выполняются перед бетой.
|
||||
мутации room ownership и session-only zoom persistence выполняются перед
|
||||
бетой.
|
||||
|
||||
## Ядра фронтенда растут только осознанно (#425, заменяет #34)
|
||||
|
||||
|
||||
@@ -1518,6 +1518,21 @@ const MUTANT_DEFINITIONS = [
|
||||
+ 'this._cameraTransition.target?.viewBox || view, disp))',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'room-fit-persists-zoom',
|
||||
guard: 'node demo/smoke_room_fit.mjs',
|
||||
because: 'room focus is session-only and must not leak its zoom into LS_ZOOM on '
|
||||
+ 'completion or cancellation (#152 AC15)',
|
||||
patches: [{
|
||||
file: 'src/houseplan-card.ts',
|
||||
find: " if (state.reason !== 'room') this._saveZoom();",
|
||||
replace: ' this._saveZoom();',
|
||||
}, {
|
||||
file: 'src/houseplan-card.ts',
|
||||
find: " if (presentedZoom !== undefined && reason !== 'room') this._saveZoom();",
|
||||
replace: ' if (presentedZoom !== undefined) this._saveZoom();',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'camera-anchor-from-presented',
|
||||
guard: 'node demo/smoke_smooth_zoom.mjs',
|
||||
|
||||
@@ -6943,7 +6943,7 @@ export class HouseplanCard extends LitElement {
|
||||
this._roomPointer,
|
||||
ev.pointerId,
|
||||
this._space,
|
||||
this._roomOwner(ev),
|
||||
this._roomPointer ? this._roomOwner(ev) : null,
|
||||
this._suppressClick || !!this._pinchStart || this._panLock !== null
|
||||
|| this._holdFired || this._touchSequenceMultitouch,
|
||||
);
|
||||
@@ -12800,11 +12800,11 @@ export class HouseplanCard extends LitElement {
|
||||
const areaLinkInteractive = !this._markup;
|
||||
return html`<div class="roomlabel ${rows.length ? 'card' : ''}"
|
||||
data-hp="room-label" data-id=${r.id || nothing} data-area=${r.area || nothing}
|
||||
role=${!this._markup ? 'button' : nothing}
|
||||
tabindex=${!this._markup ? '0' : nothing}
|
||||
aria-label=${!this._markup ? this._t('room.fit_action', { name: r.name || '' }) : nothing}
|
||||
role=${this._mode === 'view' ? 'button' : nothing}
|
||||
tabindex=${this._mode === 'view' ? '0' : nothing}
|
||||
aria-label=${this._mode === 'view' ? this._t('room.fit_action', { name: r.name || '' }) : nothing}
|
||||
style="left:${left}%;top:${top}%;color:${disp.color};opacity:${op};--rl-scale:${k};--rl-space:${disp.cardFontScale};--rl-name:${clampScale(r.settings?.name_scale)};--rl-meta:${clampScale(r.settings?.label_scale)}"
|
||||
@keydown=${!this._markup && r.id
|
||||
@keydown=${this._mode === 'view' && r.id
|
||||
? (e: KeyboardEvent) => this._roomLabelKey(e, r.id!) : nothing}
|
||||
@pointerdown=${this._markup
|
||||
? (e: PointerEvent) => this._labelDown(e, r, space.id) : nothing}
|
||||
|
||||
Reference in New Issue
Block a user