From 035399e7a6dcf5b2c5af508efea7799de4983807 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 24 Sep 2026 06:50:34 +0300 Subject: [PATCH] =?UTF-8?q?feat(hooks):=20data-hp=3D"mode-tab"=20+=20data-?= =?UTF-8?q?mode=20=D0=BD=D0=B0=20=D0=B2=D0=BA=D0=BB=D0=B0=D0=B4=D0=BA?= =?UTF-8?q?=D0=B0=D1=85=20=D1=80=D0=B5=D0=B6=D0=B8=D0=BC=D0=BE=D0=B2=20?= =?UTF-8?q?=D1=80=D0=B5=D0=B4=D0=B0=D0=BA=D1=82=D0=BE=D1=80=D0=BE=D0=B2=20?= =?UTF-8?q?(#629)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Единственная дыра контракта #489 для тестового фасада харнесса: у вкладок plan/devices/decor был только data-editor-navigation, которого нет в JSON- контракте. Хук описан в docs/data-hp-contract.json (audience test, since 1.78.0-beta.2) и STYLING-HOOKS §7.4; присутствует только вместе с самими вкладками (право на редактирование). Стилями не выбирается, пикселей не меняет. Бандл пересобран. Issue: #629 User-Visible: no --- docs/STYLING-HOOKS.md | 5 +++++ docs/data-hp-contract.json | 6 ++++++ src/houseplan-card.ts | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/STYLING-HOOKS.md b/docs/STYLING-HOOKS.md index 27245f43..c66087c8 100644 --- a/docs/STYLING-HOOKS.md +++ b/docs/STYLING-HOOKS.md @@ -405,6 +405,11 @@ use `[data-hp="tool"][data-tool="…"]`; the complete `data-tool` vocabulary is in the JSON inventory. The toolbar X and the X on the active mode tab use `[data-hp="editor-close"]` while retaining `data-editor-navigation="view"`. +The three editor mode tabs are `[data-hp="mode-tab"][data-mode="plan|devices|decor"]` +(#629) and keep `data-editor-navigation`. Like the tabs themselves, the hook is +present only for a user allowed to edit. Nothing in the card's styles selects +it; its audience is `test`. + The one visible secondary/context surface uses `[data-hp="tray"]`. Its `data-kind` is the stable launcher id when a grouped launcher owns it and the broad secondary kind otherwise. A closed placeholder does not carry the hook. diff --git a/docs/data-hp-contract.json b/docs/data-hp-contract.json index 8cdc06d0..75abb945 100644 --- a/docs/data-hp-contract.json +++ b/docs/data-hp-contract.json @@ -69,6 +69,12 @@ "since": "1.73.0-beta.7", "audience": ["test"] }, + "mode-tab": { + "elements": ["button"], + "since": "1.78.0-beta.2", + "audience": ["test"], + "attributes": { "data-mode": ["plan", "devices", "decor"] } + }, "opening": { "elements": ["g"], "since": "1.59.0-beta.3", diff --git a/src/houseplan-card.ts b/src/houseplan-card.ts index 112b303b..5c890e6f 100755 --- a/src/houseplan-card.ts +++ b/src/houseplan-card.ts @@ -10803,7 +10803,7 @@ export class HouseplanCard extends LitElement { ? html`
${([['plan', 'mdi:floor-plan'], ['devices', 'mdi:tune-variant'], ['decor', 'mdi:draw']] as const).map( ([m, ic]) => html`