mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-03 21:28:59 +00:00
fix: Shift listeners die with every palette exit, not only placement (#369 r2-H1)
The r2 reviewer proved two real exits leaked the window keydown/keyup listeners of the furniture preview — Escape (the card closes the palette by direct assignment, bypassing the runtime paths) and disconnectedCallback (only _clearFurniturePreview ran). The arrow-field listener pins the whole editor runtime and, through it, the card: the exact leak class this disconnectedCallback already names two cases above. Both sites now call _furnShiftDetach alongside the preview cleanup, the smoke gained the Escape regression (re-arm attaches again, Escape closes the palette AND brings removes level with adds), and the idempotent double detach in _furnPlace (r2 Low) is gone. Issue: #369 User-Visible: no
This commit is contained in:
@@ -1,113 +1,113 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "9d1ef63c16898a5ad64347d13dadb395be1ab36684d07ba3003999acdd7ae2f0",
|
||||
"fingerprint": "85e7ae377037b95fd5b83256bfa219e51d7803958451f6464ebda60012fb992c",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-BF5KeOWK.js",
|
||||
"houseplan-assets/houseplan-card-DixNXV2a.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 273692,
|
||||
"initialViewGzipBytes": 273721,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-DOgU9ksB.js",
|
||||
"houseplan-assets/de-BnpO3LyC.js",
|
||||
"houseplan-assets/editor-wjI-HBUi.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-D09bpo0y.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CrDii5Wp.js"
|
||||
"houseplan-assets/backdrop-pick-CvepstVV.js",
|
||||
"houseplan-assets/de-BM8NCrN8.js",
|
||||
"houseplan-assets/editor-DXpLF1rD.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-D0P8ibWI.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-B0QF2bj1.js"
|
||||
],
|
||||
"lazyGzipBytes": 168944,
|
||||
"lazyGzipBytes": 168963,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-DOgU9ksB.js",
|
||||
"houseplan-assets/editor-wjI-HBUi.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-D09bpo0y.js"
|
||||
"houseplan-assets/backdrop-pick-CvepstVV.js",
|
||||
"houseplan-assets/editor-DXpLF1rD.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-D0P8ibWI.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 139659,
|
||||
"lazyEditorGzipBytes": 139669,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-DOgU9ksB.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CrDii5Wp.js"
|
||||
"houseplan-assets/backdrop-pick-CvepstVV.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-B0QF2bj1.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 9450,
|
||||
"lazyOnboardingGzipBytes": 9452,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-BnpO3LyC.js"
|
||||
"houseplan-assets/de-BM8NCrN8.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 22790,
|
||||
"lazyLocaleGzipBytes": 22798,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-DOgU9ksB.js",
|
||||
"sha256": "cac9d00b4ab6519e6e51f2c018c7d3519d7ef014b3138615b665ce30c3929303",
|
||||
"path": "houseplan-assets/backdrop-pick-CvepstVV.js",
|
||||
"sha256": "65ed051c27c29cf09b6d749a776c5800b69ea1d14e36938615256d0024a1e145",
|
||||
"rawBytes": 6967,
|
||||
"gzipBytes": 2955,
|
||||
"gzipBytes": 2956,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BF5KeOWK.js"
|
||||
"houseplan-assets/houseplan-card-DixNXV2a.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-BnpO3LyC.js",
|
||||
"sha256": "a3bc5a3dde4fe1e7f0f6c0dfdefb441bbe2956c5db09a3765bd42fe000dd7fa5",
|
||||
"path": "houseplan-assets/de-BM8NCrN8.js",
|
||||
"sha256": "f8f403962be68c64e940567d287986f3835f59b1ebbdc19646ada9bbd5d8ab04",
|
||||
"rawBytes": 74836,
|
||||
"gzipBytes": 22790,
|
||||
"gzipBytes": 22798,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-wjI-HBUi.js",
|
||||
"sha256": "b6786af0efb1e4fd1345c15b6b8d798e184b51280aaa355373e1425fb78ac7ff",
|
||||
"path": "houseplan-assets/editor-DXpLF1rD.js",
|
||||
"sha256": "fdc4c87382df8f2a107d09ffe9b64ce7f6c6286d6da98b1a165f330f425526cb",
|
||||
"rawBytes": 3831,
|
||||
"gzipBytes": 1584,
|
||||
"gzipBytes": 1586,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BF5KeOWK.js"
|
||||
"houseplan-assets/houseplan-card-DixNXV2a.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-BF5KeOWK.js",
|
||||
"sha256": "05868bbfc1527c31500e2a34f56aed445f7d61245b9c3e19595ecd4502c563b1",
|
||||
"rawBytes": 964100,
|
||||
"gzipBytes": 272938,
|
||||
"path": "houseplan-assets/houseplan-card-DixNXV2a.js",
|
||||
"sha256": "7641bc6da5f2fbc6d28dec1ec387c212e6ecc350bcb62ad7dd0379fc4aafb1ad",
|
||||
"rawBytes": 964180,
|
||||
"gzipBytes": 272965,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-BnpO3LyC.js",
|
||||
"houseplan-assets/editor-wjI-HBUi.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-D09bpo0y.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CrDii5Wp.js"
|
||||
"houseplan-assets/de-BM8NCrN8.js",
|
||||
"houseplan-assets/editor-DXpLF1rD.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-D0P8ibWI.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-B0QF2bj1.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-D09bpo0y.js",
|
||||
"sha256": "cb340214483d050ea67ed65f0e64fce554b1d5c0f07d9d55e252626d7a901a43",
|
||||
"rawBytes": 522950,
|
||||
"gzipBytes": 135120,
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-D0P8ibWI.js",
|
||||
"sha256": "09a45a472cf44fd6b06a0ae633167c13c6c0a9a34e7231d74e42adc081d42df4",
|
||||
"rawBytes": 522926,
|
||||
"gzipBytes": 135127,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-DOgU9ksB.js",
|
||||
"houseplan-assets/houseplan-card-BF5KeOWK.js"
|
||||
"houseplan-assets/backdrop-pick-CvepstVV.js",
|
||||
"houseplan-assets/houseplan-card-DixNXV2a.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-CrDii5Wp.js",
|
||||
"sha256": "c8948cb9ece23a4bda00fa97681759af433d728d86a196714e4b2e7d77217c59",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-B0QF2bj1.js",
|
||||
"sha256": "6d5f232a64ac14cb753720f2072980afddbc2ee782edd8fa1f5d3aabc9a4797d",
|
||||
"rawBytes": 26195,
|
||||
"gzipBytes": 6495,
|
||||
"gzipBytes": 6496,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-DOgU9ksB.js",
|
||||
"houseplan-assets/houseplan-card-BF5KeOWK.js"
|
||||
"houseplan-assets/backdrop-pick-CvepstVV.js",
|
||||
"houseplan-assets/houseplan-card-DixNXV2a.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "3b1f6293aaa285ef182c07e09eb96a96bfe41d45b1840298a3b6809a3ec910ae",
|
||||
"sha256": "761e7cb26d6b198817e11d7e73a1fa8c602f129e6b91de424360c81d063d1e07",
|
||||
"rawBytes": 1089,
|
||||
"gzipBytes": 754,
|
||||
"gzipBytes": 756,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BF5KeOWK.js"
|
||||
"houseplan-assets/houseplan-card-DixNXV2a.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__="9d1ef63c16898a5ad64347d13dadb395be1ab36684d07ba3003999acdd7ae2f0";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-BF5KeOWK.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")},_=this._schema,f=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__="85e7ae377037b95fd5b83256bfa219e51d7803958451f6464ebda60012fb992c";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-DixNXV2a.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}
|
||||
.computeLabel=${e=>h[e.name]||e.name}
|
||||
@value-changed=${this._valueChanged}
|
||||
></ha-form>`;return c`
|
||||
${d(_.slice(0,3))}
|
||||
${f?c`<div class="default-floor-error" role="alert"
|
||||
${d(f.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:f})}
|
||||
${t(s,"editor.default_floor_missing",{id:_})}
|
||||
</div>`:a}
|
||||
${d(_.slice(3))}
|
||||
${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);
|
||||
+3
-3
File diff suppressed because one or more lines are too long
+3
-3
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 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="9d1ef63c16898a5ad64347d13dadb395be1ab36684d07ba3003999acdd7ae2f0";try{await import("./houseplan-assets/houseplan-card-BF5KeOWK.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).":"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__="85e7ae377037b95fd5b83256bfa219e51d7803958451f6464ebda60012fb992c";try{await import("./houseplan-assets/houseplan-card-DixNXV2a.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).":"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)}
|
||||
|
||||
@@ -90,6 +90,23 @@ const out = await page.evaluate(async () => {
|
||||
out.shiftAfterDetachIsInert = !c._furnPreviewInput;
|
||||
window.dispatchEvent(new KeyboardEvent('keyup', { key: 'Shift', bubbles: true }));
|
||||
|
||||
// r2-H1: Escape с armed-символом тоже снимает слушатели (путь мимо place)
|
||||
c._editorSecondary.openPalette?.();
|
||||
c._decorTool = 'furniture';
|
||||
c._furnPalette = null; c._furnCategory = null;
|
||||
c.requestUpdate(); await c.updateComplete;
|
||||
pal()?.querySelector('.furnitem[data-category="sofa"]')?.click();
|
||||
await c.updateComplete;
|
||||
pal()?.querySelector('.furnitem[data-symbol="sofa"]')?.click();
|
||||
await c.updateComplete;
|
||||
const addsBeforeEscape = shiftAdds;
|
||||
out.rearmAttachesAgain = shiftAdds === shiftRemoves + 2;
|
||||
window.dispatchEvent(new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }));
|
||||
c._onKey?.(new KeyboardEvent('keydown', { key: 'Escape' }));
|
||||
await c.updateComplete;
|
||||
out.escapeClosesPalette = !c._furnPalette && c._decorTool === 'select';
|
||||
out.escapeDetachesListeners = shiftRemoves === addsBeforeEscape;
|
||||
|
||||
window.addEventListener = addReal;
|
||||
window.removeEventListener = removeReal;
|
||||
// прибрать поставленный диван
|
||||
|
||||
Vendored
+51
-51
@@ -1,113 +1,113 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "9d1ef63c16898a5ad64347d13dadb395be1ab36684d07ba3003999acdd7ae2f0",
|
||||
"fingerprint": "85e7ae377037b95fd5b83256bfa219e51d7803958451f6464ebda60012fb992c",
|
||||
"entry": "houseplan-card.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-BF5KeOWK.js",
|
||||
"houseplan-assets/houseplan-card-DixNXV2a.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 273692,
|
||||
"initialViewGzipBytes": 273721,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-DOgU9ksB.js",
|
||||
"houseplan-assets/de-BnpO3LyC.js",
|
||||
"houseplan-assets/editor-wjI-HBUi.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-D09bpo0y.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CrDii5Wp.js"
|
||||
"houseplan-assets/backdrop-pick-CvepstVV.js",
|
||||
"houseplan-assets/de-BM8NCrN8.js",
|
||||
"houseplan-assets/editor-DXpLF1rD.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-D0P8ibWI.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-B0QF2bj1.js"
|
||||
],
|
||||
"lazyGzipBytes": 168944,
|
||||
"lazyGzipBytes": 168963,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-DOgU9ksB.js",
|
||||
"houseplan-assets/editor-wjI-HBUi.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-D09bpo0y.js"
|
||||
"houseplan-assets/backdrop-pick-CvepstVV.js",
|
||||
"houseplan-assets/editor-DXpLF1rD.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-D0P8ibWI.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 139659,
|
||||
"lazyEditorGzipBytes": 139669,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-DOgU9ksB.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CrDii5Wp.js"
|
||||
"houseplan-assets/backdrop-pick-CvepstVV.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-B0QF2bj1.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 9450,
|
||||
"lazyOnboardingGzipBytes": 9452,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-BnpO3LyC.js"
|
||||
"houseplan-assets/de-BM8NCrN8.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 22790,
|
||||
"lazyLocaleGzipBytes": 22798,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-DOgU9ksB.js",
|
||||
"sha256": "cac9d00b4ab6519e6e51f2c018c7d3519d7ef014b3138615b665ce30c3929303",
|
||||
"path": "houseplan-assets/backdrop-pick-CvepstVV.js",
|
||||
"sha256": "65ed051c27c29cf09b6d749a776c5800b69ea1d14e36938615256d0024a1e145",
|
||||
"rawBytes": 6967,
|
||||
"gzipBytes": 2955,
|
||||
"gzipBytes": 2956,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BF5KeOWK.js"
|
||||
"houseplan-assets/houseplan-card-DixNXV2a.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-BnpO3LyC.js",
|
||||
"sha256": "a3bc5a3dde4fe1e7f0f6c0dfdefb441bbe2956c5db09a3765bd42fe000dd7fa5",
|
||||
"path": "houseplan-assets/de-BM8NCrN8.js",
|
||||
"sha256": "f8f403962be68c64e940567d287986f3835f59b1ebbdc19646ada9bbd5d8ab04",
|
||||
"rawBytes": 74836,
|
||||
"gzipBytes": 22790,
|
||||
"gzipBytes": 22798,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-wjI-HBUi.js",
|
||||
"sha256": "b6786af0efb1e4fd1345c15b6b8d798e184b51280aaa355373e1425fb78ac7ff",
|
||||
"path": "houseplan-assets/editor-DXpLF1rD.js",
|
||||
"sha256": "fdc4c87382df8f2a107d09ffe9b64ce7f6c6286d6da98b1a165f330f425526cb",
|
||||
"rawBytes": 3831,
|
||||
"gzipBytes": 1584,
|
||||
"gzipBytes": 1586,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BF5KeOWK.js"
|
||||
"houseplan-assets/houseplan-card-DixNXV2a.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-BF5KeOWK.js",
|
||||
"sha256": "05868bbfc1527c31500e2a34f56aed445f7d61245b9c3e19595ecd4502c563b1",
|
||||
"rawBytes": 964100,
|
||||
"gzipBytes": 272938,
|
||||
"path": "houseplan-assets/houseplan-card-DixNXV2a.js",
|
||||
"sha256": "7641bc6da5f2fbc6d28dec1ec387c212e6ecc350bcb62ad7dd0379fc4aafb1ad",
|
||||
"rawBytes": 964180,
|
||||
"gzipBytes": 272965,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-BnpO3LyC.js",
|
||||
"houseplan-assets/editor-wjI-HBUi.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-D09bpo0y.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-CrDii5Wp.js"
|
||||
"houseplan-assets/de-BM8NCrN8.js",
|
||||
"houseplan-assets/editor-DXpLF1rD.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-D0P8ibWI.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-B0QF2bj1.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-D09bpo0y.js",
|
||||
"sha256": "cb340214483d050ea67ed65f0e64fce554b1d5c0f07d9d55e252626d7a901a43",
|
||||
"rawBytes": 522950,
|
||||
"gzipBytes": 135120,
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-D0P8ibWI.js",
|
||||
"sha256": "09a45a472cf44fd6b06a0ae633167c13c6c0a9a34e7231d74e42adc081d42df4",
|
||||
"rawBytes": 522926,
|
||||
"gzipBytes": 135127,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-DOgU9ksB.js",
|
||||
"houseplan-assets/houseplan-card-BF5KeOWK.js"
|
||||
"houseplan-assets/backdrop-pick-CvepstVV.js",
|
||||
"houseplan-assets/houseplan-card-DixNXV2a.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-CrDii5Wp.js",
|
||||
"sha256": "c8948cb9ece23a4bda00fa97681759af433d728d86a196714e4b2e7d77217c59",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-B0QF2bj1.js",
|
||||
"sha256": "6d5f232a64ac14cb753720f2072980afddbc2ee782edd8fa1f5d3aabc9a4797d",
|
||||
"rawBytes": 26195,
|
||||
"gzipBytes": 6495,
|
||||
"gzipBytes": 6496,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-DOgU9ksB.js",
|
||||
"houseplan-assets/houseplan-card-BF5KeOWK.js"
|
||||
"houseplan-assets/backdrop-pick-CvepstVV.js",
|
||||
"houseplan-assets/houseplan-card-DixNXV2a.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "3b1f6293aaa285ef182c07e09eb96a96bfe41d45b1840298a3b6809a3ec910ae",
|
||||
"sha256": "761e7cb26d6b198817e11d7e73a1fa8c602f129e6b91de424360c81d063d1e07",
|
||||
"rawBytes": 1089,
|
||||
"gzipBytes": 754,
|
||||
"gzipBytes": 756,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-BF5KeOWK.js"
|
||||
"houseplan-assets/houseplan-card-DixNXV2a.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__="9d1ef63c16898a5ad64347d13dadb395be1ab36684d07ba3003999acdd7ae2f0";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-BF5KeOWK.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")},_=this._schema,f=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__="85e7ae377037b95fd5b83256bfa219e51d7803958451f6464ebda60012fb992c";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-DixNXV2a.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}
|
||||
.computeLabel=${e=>h[e.name]||e.name}
|
||||
@value-changed=${this._valueChanged}
|
||||
></ha-form>`;return c`
|
||||
${d(_.slice(0,3))}
|
||||
${f?c`<div class="default-floor-error" role="alert"
|
||||
${d(f.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:f})}
|
||||
${t(s,"editor.default_floor_missing",{id:_})}
|
||||
</div>`:a}
|
||||
${d(_.slice(3))}
|
||||
${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);
|
||||
+3
-3
File diff suppressed because one or more lines are too long
+3
-3
File diff suppressed because one or more lines are too long
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="9d1ef63c16898a5ad64347d13dadb395be1ab36684d07ba3003999acdd7ae2f0";try{await import("./houseplan-assets/houseplan-card-BF5KeOWK.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).":"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__="85e7ae377037b95fd5b83256bfa219e51d7803958451f6464ebda60012fb992c";try{await import("./houseplan-assets/houseplan-card-DixNXV2a.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).":"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)}
|
||||
|
||||
@@ -2695,6 +2695,9 @@ export class HouseplanCard extends LitElement {
|
||||
this._clearPlanSnapHover();
|
||||
this._clearOpeningPlacement(true);
|
||||
this._editorRuntime?._clearFurniturePreview();
|
||||
// #369(д) r2-H1: the Shift listeners hold the runtime (and the card) in
|
||||
// their closure — a disconnected card must not stay pinned to window.
|
||||
this._editorRuntime?._furnShiftDetach();
|
||||
this._touchContacts.clear();
|
||||
this._touchSequenceMultitouch = false;
|
||||
this._touchClickBlockUntil = 0;
|
||||
@@ -2801,6 +2804,7 @@ export class HouseplanCard extends LitElement {
|
||||
// to Select in one step, regardless of whether a symbol was armed.
|
||||
else if (this._decorTool === 'furniture') {
|
||||
this._editorRuntime?._clearFurniturePreview();
|
||||
this._editorRuntime?._furnShiftDetach(); // #369(д) r2-H1
|
||||
this._furnPalette = null;
|
||||
this._furnCategory = null;
|
||||
this._decorTool = 'select';
|
||||
|
||||
@@ -4753,7 +4753,6 @@ public _furnPlace(raw: number[], free = false, pointerType = 'mouse'): void {
|
||||
// …and the editor goes back to the tool that can move what was just placed
|
||||
this.host._decorTool = 'select';
|
||||
this.host._furnPalette = null;
|
||||
this._furnShiftDetach();
|
||||
this.host._furnCategory = null;
|
||||
this._furnShiftDetach();
|
||||
this._clearFurniturePreview();
|
||||
|
||||
Reference in New Issue
Block a user