mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-03 21:28:59 +00:00
fix: mount the House Plan panel the way Home Assistant does
HA assigns panel/hass/narrow/route before the top-level-await entry has defined the element, so the values landed as own properties that shadowed the accessors and the card never received hass. And <ha-panel-custom> has no height, so the percentage host height collapsed the stage to 0 px. Adopt pre-upgrade properties through the accessors and size the panel from the viewport minus HA's safe-area padding. The smoke now reproduces HA's real mount order and container; two mutants guard both contracts. The bundle is rebuilt from these sources. Issue: #488 User-Visible: yes
This commit is contained in:
@@ -1,108 +1,108 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "8dabbc2e02695c9064d7fdd4b9cdf2a251007d667078458249f55d20402a8174",
|
||||
"fingerprint": "5f43665c1745c737721f5a2d23f5d69a0b39999ff5f7f83b1f1f3be3e7bf6bb2",
|
||||
"entry": "houseplan-card.js",
|
||||
"panelEntry": "houseplan-panel.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js",
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 289933,
|
||||
"initialViewGzipBytes": 289935,
|
||||
"initialPanelFiles": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js",
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js",
|
||||
"houseplan-card.js",
|
||||
"houseplan-panel.js"
|
||||
],
|
||||
"initialPanelGzipBytes": 291890,
|
||||
"initialPanelGzipBytes": 292212,
|
||||
"initialPanelOnlyFiles": [
|
||||
"houseplan-panel.js"
|
||||
],
|
||||
"initialPanelOnlyGzipBytes": 1957,
|
||||
"initialPanelOnlyGzipBytes": 2277,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-C1Nq4P9Y.js",
|
||||
"houseplan-assets/de-B2xCz0Y2.js",
|
||||
"houseplan-assets/editor-IhKLQpZc.js",
|
||||
"houseplan-assets/fr-DiZ0MsmF.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js",
|
||||
"houseplan-assets/guard-C2lVSPan.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-B3A0GoIU.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-N3TpXIwN.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-CDt3rR2N.js",
|
||||
"houseplan-assets/iso-scene-render-B2S8l3JB.js",
|
||||
"houseplan-assets/live-interaction-runtime-iTa3Xqvq.js",
|
||||
"houseplan-assets/pdf-export-Dmz9UctW.js",
|
||||
"houseplan-assets/zigbee-topology-CZaP3VEx.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-COLrfV4a.js"
|
||||
"houseplan-assets/backdrop-pick-J6fCYaHM.js",
|
||||
"houseplan-assets/de-Bga8Ux3v.js",
|
||||
"houseplan-assets/editor-CtqkaRwO.js",
|
||||
"houseplan-assets/fr-BogMTEit.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js",
|
||||
"houseplan-assets/guard-fimgAnIa.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-DAKM3tap.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DfQVHPrT.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-BuYNZNtq.js",
|
||||
"houseplan-assets/iso-scene-render-DT9Sy2Qo.js",
|
||||
"houseplan-assets/live-interaction-runtime-B-4cuOJF.js",
|
||||
"houseplan-assets/pdf-export-DSBBIj7d.js",
|
||||
"houseplan-assets/zigbee-topology-CHP6NFHf.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-pDoaJY9w.js"
|
||||
],
|
||||
"lazyGzipBytes": 383241,
|
||||
"lazyGzipBytes": 383248,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-C1Nq4P9Y.js",
|
||||
"houseplan-assets/editor-IhKLQpZc.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js",
|
||||
"houseplan-assets/guard-C2lVSPan.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-B3A0GoIU.js",
|
||||
"houseplan-assets/zigbee-topology-CZaP3VEx.js"
|
||||
"houseplan-assets/backdrop-pick-J6fCYaHM.js",
|
||||
"houseplan-assets/editor-CtqkaRwO.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js",
|
||||
"houseplan-assets/guard-fimgAnIa.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-DAKM3tap.js",
|
||||
"houseplan-assets/zigbee-topology-CHP6NFHf.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 195232,
|
||||
"lazyEditorGzipBytes": 195235,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-C1Nq4P9Y.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-N3TpXIwN.js"
|
||||
"houseplan-assets/backdrop-pick-J6fCYaHM.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DfQVHPrT.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 14328,
|
||||
"lazyOnboardingGzipBytes": 14330,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-B2xCz0Y2.js",
|
||||
"houseplan-assets/fr-DiZ0MsmF.js"
|
||||
"houseplan-assets/de-Bga8Ux3v.js",
|
||||
"houseplan-assets/fr-BogMTEit.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 50246,
|
||||
"lazyLocaleGzipBytes": 50244,
|
||||
"lazyIsometricFiles": [
|
||||
"houseplan-assets/guard-C2lVSPan.js",
|
||||
"houseplan-assets/iso-scene-render-B2S8l3JB.js"
|
||||
"houseplan-assets/guard-fimgAnIa.js",
|
||||
"houseplan-assets/iso-scene-render-DT9Sy2Qo.js"
|
||||
],
|
||||
"lazyIsometricGzipBytes": 13458,
|
||||
"lazyIsometricGzipBytes": 13457,
|
||||
"lazyFurnitureArtFiles": [
|
||||
"houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js"
|
||||
"houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js"
|
||||
],
|
||||
"lazyFurnitureArtGzipBytes": 10252,
|
||||
"lazyFurnitureArtGzipBytes": 10254,
|
||||
"lazyPdfFiles": [
|
||||
"houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js",
|
||||
"houseplan-assets/pdf-export-Dmz9UctW.js"
|
||||
"houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js",
|
||||
"houseplan-assets/pdf-export-DSBBIj7d.js"
|
||||
],
|
||||
"lazyPdfGzipBytes": 120332,
|
||||
"lazyPdfGzipBytes": 120335,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-C1Nq4P9Y.js",
|
||||
"sha256": "dda27a953418c018d47cbd64b71af2dda10dd5d036538a2ce621ef58c860131e",
|
||||
"path": "houseplan-assets/backdrop-pick-J6fCYaHM.js",
|
||||
"sha256": "44dc1426098eebb794867ea330700bcbf7e097facbfdb5d9c5621d1b2552d40f",
|
||||
"rawBytes": 21592,
|
||||
"gzipBytes": 7358,
|
||||
"gzipBytes": 7360,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-B2xCz0Y2.js",
|
||||
"sha256": "bb80b9f8d3b10ffdb1563573657fa892ab726fa9c6795cc010b9bb6e068e489c",
|
||||
"path": "houseplan-assets/de-Bga8Ux3v.js",
|
||||
"sha256": "95ecb28407345cb3b927b18cefd3ac4f69503f55eb5fe8bf85fbd45bd2e8bf23",
|
||||
"rawBytes": 84250,
|
||||
"gzipBytes": 25377,
|
||||
"gzipBytes": 25375,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-IhKLQpZc.js",
|
||||
"sha256": "c9c18bc9007007e444f11378e2db99ade47495e5c7c4d4ff4db47347ceb167cd",
|
||||
"path": "houseplan-assets/editor-CtqkaRwO.js",
|
||||
"sha256": "f0e32aa21bfac77969725266daa6753d5864923f446d9033eec7030ecd6683cf",
|
||||
"rawBytes": 3837,
|
||||
"gzipBytes": 1590,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-DiZ0MsmF.js",
|
||||
"sha256": "5f7355fbb790735da981ab00499aa311f7faf5aa8f9a941ccc3a2a35da6b0cd1",
|
||||
"path": "houseplan-assets/fr-BogMTEit.js",
|
||||
"sha256": "5e3752d83e39e4bb32acbcc96e281bd0f365ce03855c50027aa3ddc16ba7389d",
|
||||
"rawBytes": 86269,
|
||||
"gzipBytes": 24869,
|
||||
"isEntry": false,
|
||||
@@ -110,161 +110,161 @@
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js",
|
||||
"sha256": "31ea8e24963afbf4cc05b2213411c09f2c7c53946637b27f6710cb3eb470d322",
|
||||
"path": "houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js",
|
||||
"sha256": "e855a418303b4d5510e205be6d20ed09636244f14edd8d7812f685e92069caa3",
|
||||
"rawBytes": 33655,
|
||||
"gzipBytes": 10252,
|
||||
"gzipBytes": 10254,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/guard-C2lVSPan.js",
|
||||
"sha256": "f57ddc549f9be6eeaa229a640002526fedc539f044900b0e8a10f3594276e531",
|
||||
"path": "houseplan-assets/guard-fimgAnIa.js",
|
||||
"sha256": "fc23c1ad1f496a6b04f55343040ed7a7872ab5a4954d72f926926874537b149f",
|
||||
"rawBytes": 518,
|
||||
"gzipBytes": 371,
|
||||
"gzipBytes": 369,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-DEeKwv6C.js",
|
||||
"sha256": "15b1ab1f41ad11a6ecb6ce91523657fc930412d2b8f9c4fabe5151baf08133d0",
|
||||
"path": "houseplan-assets/houseplan-card-C2c_QzzI.js",
|
||||
"sha256": "1a5570783c355c5646d1a52b7abc749861d12d6a2357361de8e5308871462ba9",
|
||||
"rawBytes": 1042320,
|
||||
"gzipBytes": 289129,
|
||||
"gzipBytes": 289130,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-B2xCz0Y2.js",
|
||||
"houseplan-assets/editor-IhKLQpZc.js",
|
||||
"houseplan-assets/fr-DiZ0MsmF.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-B3A0GoIU.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-N3TpXIwN.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-CDt3rR2N.js",
|
||||
"houseplan-assets/iso-scene-render-B2S8l3JB.js",
|
||||
"houseplan-assets/live-interaction-runtime-iTa3Xqvq.js",
|
||||
"houseplan-assets/pdf-export-Dmz9UctW.js"
|
||||
"houseplan-assets/de-Bga8Ux3v.js",
|
||||
"houseplan-assets/editor-CtqkaRwO.js",
|
||||
"houseplan-assets/fr-BogMTEit.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-DAKM3tap.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DfQVHPrT.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-BuYNZNtq.js",
|
||||
"houseplan-assets/iso-scene-render-DT9Sy2Qo.js",
|
||||
"houseplan-assets/live-interaction-runtime-B-4cuOJF.js",
|
||||
"houseplan-assets/pdf-export-DSBBIj7d.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-B3A0GoIU.js",
|
||||
"sha256": "346e6cde25f6863916281d5d9078114d8255d40fea9a48abfe0a260a85f99fa9",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-DAKM3tap.js",
|
||||
"sha256": "f99d2720ea192ed591194c862afed4dcf22eee62fe6df8c94845f24284f57ad7",
|
||||
"rawBytes": 631884,
|
||||
"gzipBytes": 168234,
|
||||
"gzipBytes": 168232,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-C1Nq4P9Y.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js",
|
||||
"houseplan-assets/guard-C2lVSPan.js",
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js",
|
||||
"houseplan-assets/zigbee-topology-CZaP3VEx.js"
|
||||
"houseplan-assets/backdrop-pick-J6fCYaHM.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js",
|
||||
"houseplan-assets/guard-fimgAnIa.js",
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js",
|
||||
"houseplan-assets/zigbee-topology-CHP6NFHf.js"
|
||||
],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/zigbee-topology-runtime-COLrfV4a.js"
|
||||
"houseplan-assets/zigbee-topology-runtime-pDoaJY9w.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-N3TpXIwN.js",
|
||||
"sha256": "a275ce721c74bfaf1babe91f40948413d76e6cc132a00ce35f9d38f223b7efba",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-DfQVHPrT.js",
|
||||
"sha256": "3d0b5bae6870ba6a677a3503124cf63675b2aeedf62390c9ec95801a95bd0dce",
|
||||
"rawBytes": 28071,
|
||||
"gzipBytes": 6970,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-C1Nq4P9Y.js",
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/backdrop-pick-J6fCYaHM.js",
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/hp-zigbee-topology-overlay-CDt3rR2N.js",
|
||||
"sha256": "d92a6d30d93ca7b6fb5ab873a469862893d8b4661c63b680fc38e790c8925b03",
|
||||
"path": "houseplan-assets/hp-zigbee-topology-overlay-BuYNZNtq.js",
|
||||
"sha256": "fdf2e525dfe703bc502511758b5b8582cdf1c9583861772cf1c8e1a026c52977",
|
||||
"rawBytes": 11034,
|
||||
"gzipBytes": 3732,
|
||||
"gzipBytes": 3735,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js",
|
||||
"houseplan-assets/zigbee-topology-CZaP3VEx.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-COLrfV4a.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js",
|
||||
"houseplan-assets/zigbee-topology-CHP6NFHf.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-pDoaJY9w.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/iso-scene-render-B2S8l3JB.js",
|
||||
"sha256": "9ccb3b2fc1f9f0a222f831611815d649981658e8bd41f2672ab3d8e09da35617",
|
||||
"path": "houseplan-assets/iso-scene-render-DT9Sy2Qo.js",
|
||||
"sha256": "fa7efb2dd9253a66ccc2c29f7d830494d633decbb4f7ac8f4b20944f472e2b0e",
|
||||
"rawBytes": 38562,
|
||||
"gzipBytes": 13087,
|
||||
"gzipBytes": 13088,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/guard-C2lVSPan.js",
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/guard-fimgAnIa.js",
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/live-interaction-runtime-iTa3Xqvq.js",
|
||||
"sha256": "dc6912a8ed3b0b9dee80d3b504728d8fed8733a52ca179af760daaf849d491a8",
|
||||
"path": "houseplan-assets/live-interaction-runtime-B-4cuOJF.js",
|
||||
"sha256": "a0c2904ac245578336e884e10475f65c64ed3c65db4809294ab4e75e8800dce8",
|
||||
"rawBytes": 5196,
|
||||
"gzipBytes": 2128,
|
||||
"gzipBytes": 2130,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/pdf-export-Dmz9UctW.js",
|
||||
"sha256": "d0ebeab685fa8d64f4a53c6cf3d0a079a02ba230fc0e68a42cd2a80b8eb658f4",
|
||||
"path": "houseplan-assets/pdf-export-DSBBIj7d.js",
|
||||
"sha256": "23e55dfc043e02f794b69cbd7a01f8a803b8130f47a30af7f061fd1fe9542207",
|
||||
"rawBytes": 237163,
|
||||
"gzipBytes": 110080,
|
||||
"gzipBytes": 110081,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js",
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js",
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/zigbee-topology-CZaP3VEx.js",
|
||||
"sha256": "90ad4577b9b0cbfcc2b7c654c9e2f6c5caea028f4669acf1971cf63108c36534",
|
||||
"path": "houseplan-assets/zigbee-topology-CHP6NFHf.js",
|
||||
"sha256": "4383511636c4748f1a45e7ecae73c4667d7fbb2eb45b6531e84e3addf6cfeb4e",
|
||||
"rawBytes": 18961,
|
||||
"gzipBytes": 7427,
|
||||
"gzipBytes": 7430,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/zigbee-topology-runtime-COLrfV4a.js",
|
||||
"sha256": "6aa78fc9472bb0b02d3dc508a261b91e978652a463c29790848283b12f74f18b",
|
||||
"path": "houseplan-assets/zigbee-topology-runtime-pDoaJY9w.js",
|
||||
"sha256": "ce177325aa69a8b599ef6ebb72c1127dd2ba7e1fa004b8ad95f4f4647a59c480",
|
||||
"rawBytes": 3941,
|
||||
"gzipBytes": 1766,
|
||||
"gzipBytes": 1765,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js",
|
||||
"houseplan-assets/zigbee-topology-CZaP3VEx.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js",
|
||||
"houseplan-assets/zigbee-topology-CHP6NFHf.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "173cf7315cdd654750f812a4e8ac95c1777a725cd4b91b372b02829062267ee6",
|
||||
"sha256": "a095b5f8b6c3e9c3a851629f1afb23453ddf3cf320e2343a6644b32be516a248",
|
||||
"rawBytes": 1205,
|
||||
"gzipBytes": 804,
|
||||
"gzipBytes": 805,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-panel.js",
|
||||
"sha256": "db260f0fbb15ffa5f12c0ffb4dbbc702882e0d14766142230d782b86d1323d86",
|
||||
"rawBytes": 5337,
|
||||
"gzipBytes": 1957,
|
||||
"sha256": "016277aceba1f57be58b3eb55ce8cb0f63c882853e479aa2efb1fff4a5994e03",
|
||||
"rawBytes": 6004,
|
||||
"gzipBytes": 2277,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-card.js"
|
||||
|
||||
+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__="8dabbc2e02695c9064d7fdd4b9cdf2a251007d667078458249f55d20402a8174";import{t as e,l as o,x as t,dX as s,A as a,dY as i,dZ as l,d_ as n,dM as r,b as c}from"./houseplan-card-DEeKwv6C.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__="5f43665c1745c737721f5a2d23f5d69a0b39999ff5f7f83b1f1f3be3e7bf6bb2";import{t as e,l as o,x as t,dX as s,A as a,dY as i,dZ as l,d_ as n,dM as r,b as c}from"./houseplan-card-C2c_QzzI.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
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="8dabbc2e02695c9064d7fdd4b9cdf2a251007d667078458249f55d20402a8174";import{dK as r,dL as t,dM as s}from"./houseplan-card-DEeKwv6C.js";const e={},a=r(class extends t{constructor(){super(...arguments),this.ot=e}render(r,t){return t()}update(r,[t,e]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((r,t)=>r===this.ot[t]))return s}else if(this.ot===t)return s;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,e)}});export{a as i};
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5f43665c1745c737721f5a2d23f5d69a0b39999ff5f7f83b1f1f3be3e7bf6bb2";import{dK as r,dL as t,dM as s}from"./houseplan-card-C2c_QzzI.js";const e={},a=r(class extends t{constructor(){super(...arguments),this.ot=e}render(r,t){return t()}update(r,[t,e]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((r,t)=>r===this.ot[t]))return s}else if(this.ot===t)return s;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,e)}});export{a as i};
|
||||
+6
-6
File diff suppressed because one or more lines are too long
+3
-3
File diff suppressed because one or more lines are too long
+4
-4
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
File diff suppressed because one or more lines are too long
+1
-1
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
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="8dabbc2e02695c9064d7fdd4b9cdf2a251007d667078458249f55d20402a8174";import{n as t,b as n}from"./zigbee-topology-CZaP3VEx.js";import{F as e}from"./houseplan-card-DEeKwv6C.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{f as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5f43665c1745c737721f5a2d23f5d69a0b39999ff5f7f83b1f1f3be3e7bf6bb2";import{n as t,b as n}from"./zigbee-topology-CHP6NFHf.js";import{F as e}from"./houseplan-card-C2c_QzzI.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function f(t){if(!0!==t?.user?.is_admin)throw a("permission")}function p(n){const e=i(n);return e?c(e,"zha",async()=>{if(f(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(f(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,p=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{p=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const f=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&p?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof f&&b.push(f),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{p as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
|
||||
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="8dabbc2e02695c9064d7fdd4b9cdf2a251007d667078458249f55d20402a8174";try{await import("./houseplan-assets/houseplan-card-DEeKwv6C.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 houseplan-card.js: the implementation chunk is unavailable",e)}
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5f43665c1745c737721f5a2d23f5d69a0b39999ff5f7f83b1f1f3be3e7bf6bb2";try{await import("./houseplan-assets/houseplan-card-C2c_QzzI.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 houseplan-card.js: the implementation chunk is unavailable",e)}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -7,6 +7,95 @@ const coldBefore = await page.evaluate(() => ({
|
||||
coldStartsWithoutPanelDefinition: !customElements.get('houseplan-panel'),
|
||||
coldStartsWithoutCardDefinition: !customElements.get('houseplan-card'),
|
||||
}));
|
||||
|
||||
// #488: reproduce Home Assistant's real mount, not the harness' convenient one.
|
||||
// <ha-panel-custom> is a display:block element with safe-area padding and NO
|
||||
// height, and HA assigns panel/hass/narrow/route to the element as soon as the
|
||||
// module script fires `load` — before the top-level `await import()` in the
|
||||
// entry has let the class define itself. Both facts left /houseplan empty.
|
||||
const haSequence = await page.evaluate(async () => {
|
||||
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
const frame = () => new Promise((resolve) => requestAnimationFrame(resolve));
|
||||
const waitFor = async (probe, label, timeout = 9000) => {
|
||||
const end = performance.now() + timeout;
|
||||
while (performance.now() < end) {
|
||||
const value = probe();
|
||||
if (value) return value;
|
||||
await sleep(25);
|
||||
}
|
||||
throw new Error(`panel smoke timed out: ${label}`);
|
||||
};
|
||||
history.replaceState(null, '', '/houseplan');
|
||||
const root = document.documentElement;
|
||||
root.style.setProperty('--safe-area-inset-top', '10px');
|
||||
root.style.setProperty('--safe-area-inset-bottom', '6px');
|
||||
const host = document.getElementById('host');
|
||||
host.replaceChildren();
|
||||
host.style.cssText = 'width:100%;margin:0;padding:0;';
|
||||
// ha-panel-custom twin: exactly the inline styles HA's _createPanel sets.
|
||||
const wrapper = document.createElement('div');
|
||||
wrapper.style.cssText = 'display:block;box-sizing:border-box;'
|
||||
+ 'padding-top:var(--safe-area-inset-top);padding-bottom:var(--safe-area-inset-bottom);';
|
||||
host.append(wrapper);
|
||||
|
||||
const hass = { ...window.__mkHass(), user: { id: 'writer', name: 'Writer', is_admin: false } };
|
||||
const panel = document.createElement('houseplan-panel');
|
||||
const assignedBeforeDefinition = !customElements.get('houseplan-panel');
|
||||
// HA's setCustomPanelProperties order.
|
||||
panel.panel = { component_name: 'houseplan-panel' };
|
||||
panel.hass = hass;
|
||||
panel.narrow = true;
|
||||
panel.route = { path: '/houseplan' };
|
||||
wrapper.append(panel);
|
||||
|
||||
await new Promise((resolve, reject) => {
|
||||
const script = document.createElement('script');
|
||||
script.type = 'module';
|
||||
script.async = true;
|
||||
script.onload = () => resolve();
|
||||
script.onerror = () => reject(new Error('panel module failed to load'));
|
||||
script.src = '/assets/houseplan-panel.js';
|
||||
document.body.append(script);
|
||||
});
|
||||
await customElements.whenDefined('houseplan-panel');
|
||||
const card = await waitFor(() => panel.shadowRoot?.querySelector('houseplan-card'), 'HA-sequence child');
|
||||
await waitFor(() => card.hass === hass, 'HA-sequence hass reaches the card');
|
||||
await waitFor(() => card._loadOk && card._model?.length && card._booting === false, 'HA-sequence view');
|
||||
await card.updateComplete;
|
||||
await frame(); await frame();
|
||||
|
||||
const shadowing = ['panel', 'hass', 'narrow', 'route']
|
||||
.filter((key) => Object.prototype.hasOwnProperty.call(panel, key));
|
||||
const laterHass = { ...hass, themes: { darkMode: true } };
|
||||
panel.hass = laterHass;
|
||||
panel.narrow = false;
|
||||
await card.updateComplete;
|
||||
const cardRoot = card.shadowRoot || card.renderRoot;
|
||||
const panelRect = panel.getBoundingClientRect();
|
||||
const wrapperRect = wrapper.getBoundingClientRect();
|
||||
const appbarRect = panel.shadowRoot.querySelector('.appbar').getBoundingClientRect();
|
||||
const headerRect = cardRoot.querySelector('.hdr').getBoundingClientRect();
|
||||
const stageRect = cardRoot.querySelector('.stage').getBoundingClientRect();
|
||||
const result = {
|
||||
haSequenceAssignsBeforeDefinition: assignedBeforeDefinition,
|
||||
haSequenceLeavesNoShadowingOwnProperties: shadowing.length === 0,
|
||||
haSequenceForwardsInitialHass: !!card.hass,
|
||||
haSequenceForwardsLaterHass: card.hass === laterHass,
|
||||
haSequenceAdoptsNarrowThroughAccessor: panel.narrow === false && !panel.hasAttribute('narrow'),
|
||||
haSequenceAdoptsRouteAndPanel: panel.route?.path === '/houseplan'
|
||||
&& panel.panel?.component_name === 'houseplan-panel',
|
||||
autoHeightHostFillsViewportMinusInsets: Math.abs(panelRect.height - (innerHeight - 16)) <= 1
|
||||
&& Math.abs(wrapperRect.height - innerHeight) <= 1,
|
||||
autoHeightHostKeepsPositiveStage: stageRect.height > 0 && stageRect.width > 0
|
||||
&& Math.abs(stageRect.height + headerRect.height + appbarRect.height - panelRect.height) <= 1,
|
||||
};
|
||||
panel.remove();
|
||||
wrapper.remove();
|
||||
root.style.removeProperty('--safe-area-inset-top');
|
||||
root.style.removeProperty('--safe-area-inset-bottom');
|
||||
await frame();
|
||||
return result;
|
||||
});
|
||||
const result = await page.evaluate(async () => {
|
||||
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
||||
const frame = () => new Promise((resolve) => requestAnimationFrame(resolve));
|
||||
@@ -431,6 +520,7 @@ const narrowUserActivation = await page.evaluate(() => ({
|
||||
|
||||
const finalResult = {
|
||||
...coldBefore,
|
||||
...haSequence,
|
||||
...result,
|
||||
...resized,
|
||||
...narrowReadOnly,
|
||||
|
||||
Vendored
+122
-122
@@ -1,108 +1,108 @@
|
||||
{
|
||||
"schema": 1,
|
||||
"fingerprint": "8dabbc2e02695c9064d7fdd4b9cdf2a251007d667078458249f55d20402a8174",
|
||||
"fingerprint": "5f43665c1745c737721f5a2d23f5d69a0b39999ff5f7f83b1f1f3be3e7bf6bb2",
|
||||
"entry": "houseplan-card.js",
|
||||
"panelEntry": "houseplan-panel.js",
|
||||
"initialViewFiles": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js",
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js",
|
||||
"houseplan-card.js"
|
||||
],
|
||||
"initialViewGzipBytes": 289933,
|
||||
"initialViewGzipBytes": 289935,
|
||||
"initialPanelFiles": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js",
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js",
|
||||
"houseplan-card.js",
|
||||
"houseplan-panel.js"
|
||||
],
|
||||
"initialPanelGzipBytes": 291890,
|
||||
"initialPanelGzipBytes": 292212,
|
||||
"initialPanelOnlyFiles": [
|
||||
"houseplan-panel.js"
|
||||
],
|
||||
"initialPanelOnlyGzipBytes": 1957,
|
||||
"initialPanelOnlyGzipBytes": 2277,
|
||||
"lazyFiles": [
|
||||
"houseplan-assets/backdrop-pick-C1Nq4P9Y.js",
|
||||
"houseplan-assets/de-B2xCz0Y2.js",
|
||||
"houseplan-assets/editor-IhKLQpZc.js",
|
||||
"houseplan-assets/fr-DiZ0MsmF.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js",
|
||||
"houseplan-assets/guard-C2lVSPan.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-B3A0GoIU.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-N3TpXIwN.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-CDt3rR2N.js",
|
||||
"houseplan-assets/iso-scene-render-B2S8l3JB.js",
|
||||
"houseplan-assets/live-interaction-runtime-iTa3Xqvq.js",
|
||||
"houseplan-assets/pdf-export-Dmz9UctW.js",
|
||||
"houseplan-assets/zigbee-topology-CZaP3VEx.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-COLrfV4a.js"
|
||||
"houseplan-assets/backdrop-pick-J6fCYaHM.js",
|
||||
"houseplan-assets/de-Bga8Ux3v.js",
|
||||
"houseplan-assets/editor-CtqkaRwO.js",
|
||||
"houseplan-assets/fr-BogMTEit.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js",
|
||||
"houseplan-assets/guard-fimgAnIa.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-DAKM3tap.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DfQVHPrT.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-BuYNZNtq.js",
|
||||
"houseplan-assets/iso-scene-render-DT9Sy2Qo.js",
|
||||
"houseplan-assets/live-interaction-runtime-B-4cuOJF.js",
|
||||
"houseplan-assets/pdf-export-DSBBIj7d.js",
|
||||
"houseplan-assets/zigbee-topology-CHP6NFHf.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-pDoaJY9w.js"
|
||||
],
|
||||
"lazyGzipBytes": 383241,
|
||||
"lazyGzipBytes": 383248,
|
||||
"lazyEditorFiles": [
|
||||
"houseplan-assets/backdrop-pick-C1Nq4P9Y.js",
|
||||
"houseplan-assets/editor-IhKLQpZc.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js",
|
||||
"houseplan-assets/guard-C2lVSPan.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-B3A0GoIU.js",
|
||||
"houseplan-assets/zigbee-topology-CZaP3VEx.js"
|
||||
"houseplan-assets/backdrop-pick-J6fCYaHM.js",
|
||||
"houseplan-assets/editor-CtqkaRwO.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js",
|
||||
"houseplan-assets/guard-fimgAnIa.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-DAKM3tap.js",
|
||||
"houseplan-assets/zigbee-topology-CHP6NFHf.js"
|
||||
],
|
||||
"lazyEditorGzipBytes": 195232,
|
||||
"lazyEditorGzipBytes": 195235,
|
||||
"lazyOnboardingFiles": [
|
||||
"houseplan-assets/backdrop-pick-C1Nq4P9Y.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-N3TpXIwN.js"
|
||||
"houseplan-assets/backdrop-pick-J6fCYaHM.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DfQVHPrT.js"
|
||||
],
|
||||
"lazyOnboardingGzipBytes": 14328,
|
||||
"lazyOnboardingGzipBytes": 14330,
|
||||
"lazyLocaleFiles": [
|
||||
"houseplan-assets/de-B2xCz0Y2.js",
|
||||
"houseplan-assets/fr-DiZ0MsmF.js"
|
||||
"houseplan-assets/de-Bga8Ux3v.js",
|
||||
"houseplan-assets/fr-BogMTEit.js"
|
||||
],
|
||||
"lazyLocaleGzipBytes": 50246,
|
||||
"lazyLocaleGzipBytes": 50244,
|
||||
"lazyIsometricFiles": [
|
||||
"houseplan-assets/guard-C2lVSPan.js",
|
||||
"houseplan-assets/iso-scene-render-B2S8l3JB.js"
|
||||
"houseplan-assets/guard-fimgAnIa.js",
|
||||
"houseplan-assets/iso-scene-render-DT9Sy2Qo.js"
|
||||
],
|
||||
"lazyIsometricGzipBytes": 13458,
|
||||
"lazyIsometricGzipBytes": 13457,
|
||||
"lazyFurnitureArtFiles": [
|
||||
"houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js"
|
||||
"houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js"
|
||||
],
|
||||
"lazyFurnitureArtGzipBytes": 10252,
|
||||
"lazyFurnitureArtGzipBytes": 10254,
|
||||
"lazyPdfFiles": [
|
||||
"houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js",
|
||||
"houseplan-assets/pdf-export-Dmz9UctW.js"
|
||||
"houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js",
|
||||
"houseplan-assets/pdf-export-DSBBIj7d.js"
|
||||
],
|
||||
"lazyPdfGzipBytes": 120332,
|
||||
"lazyPdfGzipBytes": 120335,
|
||||
"files": [
|
||||
{
|
||||
"path": "houseplan-assets/backdrop-pick-C1Nq4P9Y.js",
|
||||
"sha256": "dda27a953418c018d47cbd64b71af2dda10dd5d036538a2ce621ef58c860131e",
|
||||
"path": "houseplan-assets/backdrop-pick-J6fCYaHM.js",
|
||||
"sha256": "44dc1426098eebb794867ea330700bcbf7e097facbfdb5d9c5621d1b2552d40f",
|
||||
"rawBytes": 21592,
|
||||
"gzipBytes": 7358,
|
||||
"gzipBytes": 7360,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/de-B2xCz0Y2.js",
|
||||
"sha256": "bb80b9f8d3b10ffdb1563573657fa892ab726fa9c6795cc010b9bb6e068e489c",
|
||||
"path": "houseplan-assets/de-Bga8Ux3v.js",
|
||||
"sha256": "95ecb28407345cb3b927b18cefd3ac4f69503f55eb5fe8bf85fbd45bd2e8bf23",
|
||||
"rawBytes": 84250,
|
||||
"gzipBytes": 25377,
|
||||
"gzipBytes": 25375,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/editor-IhKLQpZc.js",
|
||||
"sha256": "c9c18bc9007007e444f11378e2db99ade47495e5c7c4d4ff4db47347ceb167cd",
|
||||
"path": "houseplan-assets/editor-CtqkaRwO.js",
|
||||
"sha256": "f0e32aa21bfac77969725266daa6753d5864923f446d9033eec7030ecd6683cf",
|
||||
"rawBytes": 3837,
|
||||
"gzipBytes": 1590,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/fr-DiZ0MsmF.js",
|
||||
"sha256": "5f7355fbb790735da981ab00499aa311f7faf5aa8f9a941ccc3a2a35da6b0cd1",
|
||||
"path": "houseplan-assets/fr-BogMTEit.js",
|
||||
"sha256": "5e3752d83e39e4bb32acbcc96e281bd0f365ce03855c50027aa3ddc16ba7389d",
|
||||
"rawBytes": 86269,
|
||||
"gzipBytes": 24869,
|
||||
"isEntry": false,
|
||||
@@ -110,161 +110,161 @@
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js",
|
||||
"sha256": "31ea8e24963afbf4cc05b2213411c09f2c7c53946637b27f6710cb3eb470d322",
|
||||
"path": "houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js",
|
||||
"sha256": "e855a418303b4d5510e205be6d20ed09636244f14edd8d7812f685e92069caa3",
|
||||
"rawBytes": 33655,
|
||||
"gzipBytes": 10252,
|
||||
"gzipBytes": 10254,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/guard-C2lVSPan.js",
|
||||
"sha256": "f57ddc549f9be6eeaa229a640002526fedc539f044900b0e8a10f3594276e531",
|
||||
"path": "houseplan-assets/guard-fimgAnIa.js",
|
||||
"sha256": "fc23c1ad1f496a6b04f55343040ed7a7872ab5a4954d72f926926874537b149f",
|
||||
"rawBytes": 518,
|
||||
"gzipBytes": 371,
|
||||
"gzipBytes": 369,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-card-DEeKwv6C.js",
|
||||
"sha256": "15b1ab1f41ad11a6ecb6ce91523657fc930412d2b8f9c4fabe5151baf08133d0",
|
||||
"path": "houseplan-assets/houseplan-card-C2c_QzzI.js",
|
||||
"sha256": "1a5570783c355c5646d1a52b7abc749861d12d6a2357361de8e5308871462ba9",
|
||||
"rawBytes": 1042320,
|
||||
"gzipBytes": 289129,
|
||||
"gzipBytes": 289130,
|
||||
"isEntry": false,
|
||||
"imports": [],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/de-B2xCz0Y2.js",
|
||||
"houseplan-assets/editor-IhKLQpZc.js",
|
||||
"houseplan-assets/fr-DiZ0MsmF.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-B3A0GoIU.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-N3TpXIwN.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-CDt3rR2N.js",
|
||||
"houseplan-assets/iso-scene-render-B2S8l3JB.js",
|
||||
"houseplan-assets/live-interaction-runtime-iTa3Xqvq.js",
|
||||
"houseplan-assets/pdf-export-Dmz9UctW.js"
|
||||
"houseplan-assets/de-Bga8Ux3v.js",
|
||||
"houseplan-assets/editor-CtqkaRwO.js",
|
||||
"houseplan-assets/fr-BogMTEit.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js",
|
||||
"houseplan-assets/houseplan-editor-runtime-DAKM3tap.js",
|
||||
"houseplan-assets/houseplan-onboarding-runtime-DfQVHPrT.js",
|
||||
"houseplan-assets/hp-zigbee-topology-overlay-BuYNZNtq.js",
|
||||
"houseplan-assets/iso-scene-render-DT9Sy2Qo.js",
|
||||
"houseplan-assets/live-interaction-runtime-B-4cuOJF.js",
|
||||
"houseplan-assets/pdf-export-DSBBIj7d.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-B3A0GoIU.js",
|
||||
"sha256": "346e6cde25f6863916281d5d9078114d8255d40fea9a48abfe0a260a85f99fa9",
|
||||
"path": "houseplan-assets/houseplan-editor-runtime-DAKM3tap.js",
|
||||
"sha256": "f99d2720ea192ed591194c862afed4dcf22eee62fe6df8c94845f24284f57ad7",
|
||||
"rawBytes": 631884,
|
||||
"gzipBytes": 168234,
|
||||
"gzipBytes": 168232,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-C1Nq4P9Y.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js",
|
||||
"houseplan-assets/guard-C2lVSPan.js",
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js",
|
||||
"houseplan-assets/zigbee-topology-CZaP3VEx.js"
|
||||
"houseplan-assets/backdrop-pick-J6fCYaHM.js",
|
||||
"houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js",
|
||||
"houseplan-assets/guard-fimgAnIa.js",
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js",
|
||||
"houseplan-assets/zigbee-topology-CHP6NFHf.js"
|
||||
],
|
||||
"dynamicImports": [
|
||||
"houseplan-assets/zigbee-topology-runtime-COLrfV4a.js"
|
||||
"houseplan-assets/zigbee-topology-runtime-pDoaJY9w.js"
|
||||
]
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-N3TpXIwN.js",
|
||||
"sha256": "a275ce721c74bfaf1babe91f40948413d76e6cc132a00ce35f9d38f223b7efba",
|
||||
"path": "houseplan-assets/houseplan-onboarding-runtime-DfQVHPrT.js",
|
||||
"sha256": "3d0b5bae6870ba6a677a3503124cf63675b2aeedf62390c9ec95801a95bd0dce",
|
||||
"rawBytes": 28071,
|
||||
"gzipBytes": 6970,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/backdrop-pick-C1Nq4P9Y.js",
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/backdrop-pick-J6fCYaHM.js",
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/hp-zigbee-topology-overlay-CDt3rR2N.js",
|
||||
"sha256": "d92a6d30d93ca7b6fb5ab873a469862893d8b4661c63b680fc38e790c8925b03",
|
||||
"path": "houseplan-assets/hp-zigbee-topology-overlay-BuYNZNtq.js",
|
||||
"sha256": "fdf2e525dfe703bc502511758b5b8582cdf1c9583861772cf1c8e1a026c52977",
|
||||
"rawBytes": 11034,
|
||||
"gzipBytes": 3732,
|
||||
"gzipBytes": 3735,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js",
|
||||
"houseplan-assets/zigbee-topology-CZaP3VEx.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-COLrfV4a.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js",
|
||||
"houseplan-assets/zigbee-topology-CHP6NFHf.js",
|
||||
"houseplan-assets/zigbee-topology-runtime-pDoaJY9w.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/iso-scene-render-B2S8l3JB.js",
|
||||
"sha256": "9ccb3b2fc1f9f0a222f831611815d649981658e8bd41f2672ab3d8e09da35617",
|
||||
"path": "houseplan-assets/iso-scene-render-DT9Sy2Qo.js",
|
||||
"sha256": "fa7efb2dd9253a66ccc2c29f7d830494d633decbb4f7ac8f4b20944f472e2b0e",
|
||||
"rawBytes": 38562,
|
||||
"gzipBytes": 13087,
|
||||
"gzipBytes": 13088,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/guard-C2lVSPan.js",
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/guard-fimgAnIa.js",
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/live-interaction-runtime-iTa3Xqvq.js",
|
||||
"sha256": "dc6912a8ed3b0b9dee80d3b504728d8fed8733a52ca179af760daaf849d491a8",
|
||||
"path": "houseplan-assets/live-interaction-runtime-B-4cuOJF.js",
|
||||
"sha256": "a0c2904ac245578336e884e10475f65c64ed3c65db4809294ab4e75e8800dce8",
|
||||
"rawBytes": 5196,
|
||||
"gzipBytes": 2128,
|
||||
"gzipBytes": 2130,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/pdf-export-Dmz9UctW.js",
|
||||
"sha256": "d0ebeab685fa8d64f4a53c6cf3d0a079a02ba230fc0e68a42cd2a80b8eb658f4",
|
||||
"path": "houseplan-assets/pdf-export-DSBBIj7d.js",
|
||||
"sha256": "23e55dfc043e02f794b69cbd7a01f8a803b8130f47a30af7f061fd1fe9542207",
|
||||
"rawBytes": 237163,
|
||||
"gzipBytes": 110080,
|
||||
"gzipBytes": 110081,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/furniture-plan-art.generated-C1fq1Jko.js",
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/furniture-plan-art.generated-Kah2ASIa.js",
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/zigbee-topology-CZaP3VEx.js",
|
||||
"sha256": "90ad4577b9b0cbfcc2b7c654c9e2f6c5caea028f4669acf1971cf63108c36534",
|
||||
"path": "houseplan-assets/zigbee-topology-CHP6NFHf.js",
|
||||
"sha256": "4383511636c4748f1a45e7ecae73c4667d7fbb2eb45b6531e84e3addf6cfeb4e",
|
||||
"rawBytes": 18961,
|
||||
"gzipBytes": 7427,
|
||||
"gzipBytes": 7430,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-assets/zigbee-topology-runtime-COLrfV4a.js",
|
||||
"sha256": "6aa78fc9472bb0b02d3dc508a261b91e978652a463c29790848283b12f74f18b",
|
||||
"path": "houseplan-assets/zigbee-topology-runtime-pDoaJY9w.js",
|
||||
"sha256": "ce177325aa69a8b599ef6ebb72c1127dd2ba7e1fa004b8ad95f4f4647a59c480",
|
||||
"rawBytes": 3941,
|
||||
"gzipBytes": 1766,
|
||||
"gzipBytes": 1765,
|
||||
"isEntry": false,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js",
|
||||
"houseplan-assets/zigbee-topology-CZaP3VEx.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js",
|
||||
"houseplan-assets/zigbee-topology-CHP6NFHf.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-card.js",
|
||||
"sha256": "173cf7315cdd654750f812a4e8ac95c1777a725cd4b91b372b02829062267ee6",
|
||||
"sha256": "a095b5f8b6c3e9c3a851629f1afb23453ddf3cf320e2343a6644b32be516a248",
|
||||
"rawBytes": 1205,
|
||||
"gzipBytes": 804,
|
||||
"gzipBytes": 805,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-assets/houseplan-card-DEeKwv6C.js"
|
||||
"houseplan-assets/houseplan-card-C2c_QzzI.js"
|
||||
],
|
||||
"dynamicImports": []
|
||||
},
|
||||
{
|
||||
"path": "houseplan-panel.js",
|
||||
"sha256": "db260f0fbb15ffa5f12c0ffb4dbbc702882e0d14766142230d782b86d1323d86",
|
||||
"rawBytes": 5337,
|
||||
"gzipBytes": 1957,
|
||||
"sha256": "016277aceba1f57be58b3eb55ce8cb0f63c882853e479aa2efb1fff4a5994e03",
|
||||
"rawBytes": 6004,
|
||||
"gzipBytes": 2277,
|
||||
"isEntry": true,
|
||||
"imports": [
|
||||
"houseplan-card.js"
|
||||
|
||||
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__="8dabbc2e02695c9064d7fdd4b9cdf2a251007d667078458249f55d20402a8174";import{t as e,l as o,x as t,dX as s,A as a,dY as i,dZ as l,d_ as n,dM as r,b as c}from"./houseplan-card-DEeKwv6C.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__="5f43665c1745c737721f5a2d23f5d69a0b39999ff5f7f83b1f1f3be3e7bf6bb2";import{t as e,l as o,x as t,dX as s,A as a,dY as i,dZ as l,d_ as n,dM as r,b as c}from"./houseplan-card-C2c_QzzI.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
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="8dabbc2e02695c9064d7fdd4b9cdf2a251007d667078458249f55d20402a8174";import{dK as r,dL as t,dM as s}from"./houseplan-card-DEeKwv6C.js";const e={},a=r(class extends t{constructor(){super(...arguments),this.ot=e}render(r,t){return t()}update(r,[t,e]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((r,t)=>r===this.ot[t]))return s}else if(this.ot===t)return s;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,e)}});export{a as i};
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5f43665c1745c737721f5a2d23f5d69a0b39999ff5f7f83b1f1f3be3e7bf6bb2";import{dK as r,dL as t,dM as s}from"./houseplan-card-C2c_QzzI.js";const e={},a=r(class extends t{constructor(){super(...arguments),this.ot=e}render(r,t){return t()}update(r,[t,e]){if(Array.isArray(t)){if(Array.isArray(this.ot)&&this.ot.length===t.length&&t.every((r,t)=>r===this.ot[t]))return s}else if(this.ot===t)return s;return this.ot=Array.isArray(t)?Array.from(t):t,this.render(t,e)}});export{a as i};
|
||||
Vendored
+6
-6
File diff suppressed because one or more lines are too long
+3
-3
File diff suppressed because one or more lines are too long
+4
-4
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
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
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 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="8dabbc2e02695c9064d7fdd4b9cdf2a251007d667078458249f55d20402a8174";import{n as t,b as n}from"./zigbee-topology-CZaP3VEx.js";import{F as e}from"./houseplan-card-DEeKwv6C.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function p(t){if(!0!==t?.user?.is_admin)throw a("permission")}function f(n){const e=i(n);return e?c(e,"zha",async()=>{if(p(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(p(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,f=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{f=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const p=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&f?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof p&&b.push(p),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{f as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5f43665c1745c737721f5a2d23f5d69a0b39999ff5f7f83b1f1f3be3e7bf6bb2";import{n as t,b as n}from"./zigbee-topology-CHP6NFHf.js";import{F as e}from"./houseplan-card-C2c_QzzI.js";const o=new WeakMap;function i(t){const n=function(t){const n=t?.connection||t;return!n||"object"!=typeof n&&"function"!=typeof n?null:n}(t);if(!n)return null;let e=o.get(n);return e||(e={revision:0,topologies:[],states:{},listeners:new Set,inflight:new Map},o.set(n,e)),e}function r(t,n,e){t.states={...t.states,[n]:e},function(t){t.revision++;for(const n of t.listeners)n()}(t)}function s(t){const n=t?.code;if("permission"===n||"unsupported"===n||"timeout"===n||"invalid_topic"===n||"invalid_payload"===n)return n;const e=String(t?.message||"").toLowerCase();return e.includes("unauthor")||e.includes("permission")?"permission":e.includes("unknown_command")||e.includes("not found")?"unsupported":"provider"}function a(t){return Object.assign(new Error(t),{code:t})}function c(t,n,e){const o=t.inflight.get(n);if(o)return o;r(t,n,{phase:"loading"});const i=e().then(n=>{if(!n.nodes.length&&n.warnings.some(t=>"invalid_payload"===t.code))throw a("invalid_payload");!function(t,n){t.topologies=[...t.topologies.filter(t=>!(t.provider===n.provider&&t.instanceId===n.instanceId)),n],r(t,"zha"===n.provider?"zha":`z2m:${n.instanceId}`,{phase:"ready",obtainedAt:n.obtainedAt,partial:n.warnings.length>0})}(t,n)}).catch(e=>{r(t,n,{phase:"error",error:s(e)})}).finally(()=>t.inflight.delete(n));return t.inflight.set(n,i),i}function l(t){const n=i(t);return n?{revision:n.revision,topologies:n.topologies,states:n.states}:{revision:0,topologies:[],states:{}}}function u(t,n){const e=i(t);return e?(e.listeners.add(n),()=>e.listeners.delete(n)):()=>{}}function f(t){if(!0!==t?.user?.is_admin)throw a("permission")}function p(n){const e=i(n);return e?c(e,"zha",async()=>{if(f(n),"function"!=typeof n?.callWS)throw a("unsupported");return t(await n.callWS({type:"zha/devices"}))}):Promise.resolve()}function d(t){return null!==t&&"object"==typeof t?t:null}function h(t){const n=d(t),e=n?.payload??t;if("string"!=typeof e)return e;try{return JSON.parse(e)}catch{return null}}async function m(t,n){let e;try{return await Promise.race([t,new Promise((t,o)=>{e=globalThis.setTimeout(()=>o(a("timeout")),Math.max(1,n))})])}finally{void 0!==e&&globalThis.clearTimeout(e)}}function g(t,o,r=15e4){const s=i(t);if(!s)return Promise.resolve();const l=e(o);return c(s,`z2m:${l||String(o)}`,async()=>{if(f(t),!l)throw a("invalid_topic");const e=t.connection,o=e?.subscribeMessage;if("function"!=typeof o||"function"!=typeof t?.callService)throw a("unsupported");const i=function(){const t=globalThis.crypto;return"function"==typeof t?.randomUUID?`houseplan-${t.randomUUID()}`:`houseplan-${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}`}(),s=Date.now()+Math.max(1,r);let c=!1,u=null,p=null,g=null;const y=new Promise(t=>{u=t}),w=new Promise((t,n)=>{p=t,g=n}),b=[];try{const r=await o.call(e,t=>{!0===d(t)?.retain&&h(t)&&u?.()},{type:"mqtt/subscribe",topic:`${l}/bridge/info`});"function"==typeof r&&b.push(r);const f=await o.call(e,t=>{if(!0===d(t)?.retain)return;const n=h(t);null!==n?n&&function(t){const n=d(t),e=n?.transaction??d(n?.data)?.transaction;return"string"==typeof e||"number"==typeof e?String(e):null}(n)===i&&p?.(n):c&&g?.(a("invalid_payload"))},{type:"mqtt/subscribe",topic:`${l}/bridge/response/networkmap`});"function"==typeof f&&b.push(f),await m(y,Math.min(4e3,Math.max(1,s-Date.now()))),c=!0,await t.callService("mqtt","publish",{topic:`${l}/bridge/request/networkmap`,payload:JSON.stringify({type:"raw",routes:!1,transaction:i}),qos:0,retain:!1});const v=await m(w,s-Date.now()),_=d(v)?.status;if(_&&"ok"!==_)throw a("provider");return n(v,l)}finally{for(const t of b)try{t()}catch{}}})}export{p as readZhaTopology,g as refreshZ2mTopology,u as subscribeZigbeeTopology,l as zigbeeTopologyRuntimeSnapshot};
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="8dabbc2e02695c9064d7fdd4b9cdf2a251007d667078458249f55d20402a8174";try{await import("./houseplan-assets/houseplan-card-DEeKwv6C.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 houseplan-card.js: the implementation chunk is unavailable",e)}
|
||||
globalThis.__HOUSEPLAN_BUILD_FINGERPRINT__="5f43665c1745c737721f5a2d23f5d69a0b39999ff5f7f83b1f1f3be3e7bf6bb2";try{await import("./houseplan-assets/houseplan-card-C2c_QzzI.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 houseplan-card.js: the implementation chunk is unavailable",e)}
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
@@ -2,6 +2,12 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
- The House Plan sidebar page now shows the plan on the first open in a real
|
||||
Home Assistant install: the panel adopts the properties Home Assistant assigns
|
||||
before the element is defined and sizes itself from the viewport instead of
|
||||
its height-less container, so the page is no longer blank with a 0 px stage
|
||||
([#488](https://github.com/Matysh/houseplan-card/issues/488)).
|
||||
|
||||
## v1.73.0-beta.5 — 2026-09-08
|
||||
|
||||
- House Plan now opens directly from its own Home Assistant sidebar page, with
|
||||
|
||||
@@ -8,6 +8,12 @@
|
||||
|
||||
## Не выпущено
|
||||
|
||||
- Страница House Plan в боковом меню теперь показывает план с первого захода в
|
||||
реальном Home Assistant: панель принимает свойства, которые HA присваивает до
|
||||
определения элемента, и берёт высоту от viewport, а не от контейнера без
|
||||
высоты — страница больше не пустая со стейджем 0 px
|
||||
([#488](https://github.com/Matysh/houseplan-card/issues/488)).
|
||||
|
||||
## v1.73.0-beta.5 — 2026-09-08
|
||||
|
||||
- House Plan теперь открывается напрямую с собственной страницы в боковом меню
|
||||
|
||||
@@ -732,6 +732,29 @@ const MUTANT_DEFINITIONS = [
|
||||
replace: ' if (this._serverCanWrite !== null) return true; // mutant: read-only becomes writer',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'panel-ignores-pre-upgrade-properties',
|
||||
guard: 'node demo/smoke_houseplan_panel.mjs',
|
||||
because: 'HA assigns hass/narrow/route/panel before the top-level-await entry defines the '
|
||||
+ 'element; values left as own data properties shadow the accessors and the card never '
|
||||
+ 'receives hass, so /houseplan stays blank on first open (#488)',
|
||||
patches: [{
|
||||
file: 'src/houseplan-panel.ts',
|
||||
find: ' if (!Object.prototype.hasOwnProperty.call(this, key)) continue;',
|
||||
replace: ' continue; // mutant: pre-upgrade properties are left shadowing the accessors',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'panel-host-height-from-parent',
|
||||
guard: 'node demo/smoke_houseplan_panel.mjs',
|
||||
because: '<ha-panel-custom> has no height, so a percentage host height resolves to auto and '
|
||||
+ 'the stage collapses to 0 px; the panel must size itself from the viewport (#488)',
|
||||
patches: [{
|
||||
file: 'src/houseplan-panel.ts',
|
||||
find: ' height: calc(100dvh - var(--safe-area-inset-top, 0px) - var(--safe-area-inset-bottom, 0px));',
|
||||
replace: ' height: 100%; /* mutant: back to the parent-relative height */',
|
||||
}],
|
||||
},
|
||||
{
|
||||
id: 'version-recovery-treats-unknown-as-mismatch',
|
||||
guard: 'node --test --test-name-pattern="malformed values stay unknown" '
|
||||
|
||||
+26
-1
@@ -10,6 +10,9 @@ interface HomeAssistantPanelHost {
|
||||
localize?: (key: string) => string | undefined;
|
||||
}
|
||||
|
||||
/** Properties Home Assistant assigns to a custom panel element, in its order. */
|
||||
const PRE_UPGRADE_PROPERTIES = ['panel', 'hass', 'narrow', 'route'] as const;
|
||||
|
||||
/** Home Assistant custom-panel shell; the existing card owns all product state. */
|
||||
export class HouseplanPanel extends HTMLElement {
|
||||
private _hass?: HomeAssistantPanelHost;
|
||||
@@ -22,12 +25,29 @@ export class HouseplanPanel extends HTMLElement {
|
||||
public constructor() {
|
||||
super();
|
||||
this.attachShadow({ mode: 'open' });
|
||||
this._adoptPreUpgradeProperties();
|
||||
}
|
||||
|
||||
public connectedCallback(): void {
|
||||
this._adoptPreUpgradeProperties();
|
||||
this._ensureShell();
|
||||
}
|
||||
|
||||
/** Home Assistant creates the panel element and assigns `hass`/`narrow`/
|
||||
* `route`/`panel` as soon as the module script fires `load`; with the
|
||||
* top-level `await import('./houseplan-card.js')` in this entry the class is
|
||||
* defined a moment later, so those values land as OWN data properties that
|
||||
* shadow the accessors below for the life of the element (#488). Re-route
|
||||
* them through the accessors once, in HA's own assignment order. */
|
||||
private _adoptPreUpgradeProperties(): void {
|
||||
for (const key of PRE_UPGRADE_PROPERTIES) {
|
||||
if (!Object.prototype.hasOwnProperty.call(this, key)) continue;
|
||||
const value = (this as unknown as Record<string, unknown>)[key];
|
||||
delete (this as unknown as Record<string, unknown>)[key];
|
||||
(this as unknown as Record<string, unknown>)[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
public get hass(): HomeAssistantPanelHost | undefined { return this._hass; }
|
||||
public set hass(value: HomeAssistantPanelHost | undefined) {
|
||||
this._hass = value;
|
||||
@@ -56,7 +76,12 @@ export class HouseplanPanel extends HTMLElement {
|
||||
:host {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* HA mounts a custom panel inside <ha-panel-custom>, a block with
|
||||
* safe-area padding and NO height, so a percentage here resolves to
|
||||
* auto and the stage collapses to 0 px (#488). Take the viewport
|
||||
* like HA's own iframe panels do, minus the insets HA pads with. */
|
||||
height: 100vh;
|
||||
height: calc(100dvh - var(--safe-area-inset-top, 0px) - var(--safe-area-inset-bottom, 0px));
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
|
||||
Reference in New Issue
Block a user