You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
121 lines
8.6 KiB
121 lines
8.6 KiB
# float-panel — alcance de tema: análisis y propuesta
|
|
|
|
> Generado por `node --import tsx/esm scripts/theming-census.ts --report`.
|
|
> Lo **medido** y la **propuesta** se regeneran; el **Veredicto** (§5) se conserva.
|
|
> Vista de conjunto: [README](./README.md) · método y protocolo:
|
|
> [`PLAN-theming.md`](../../process/PLAN-theming.md) §1, §2, §7.
|
|
|
|
- **Medido**: 2026-08-20 · **Alcance**: **59%** — 29 de 49 knobs por token público
|
|
- **Knobs de apariencia**: 53 — público 29 · privado 3 · global 12 · literal 5 · sistema 4 _(fuera del ratio)_
|
|
- **Contrato hoy** (`lib/recipes/base.ts`): 28 pública(s) — `bg`, `border`, `border-width`, `radius`, `shadow`, `shadow-topmost`, `active-shadow`, `fg`, `font-family`, `font-size`, `line-height`, `header-bg`, `header-padding-inline`, `header-padding-block`, `header-gap`, `controls-gap`, `title-font-size`, `title-font-weight`, `title-fg`, `body-padding-inline`, `body-padding-block`, `resize-size`, `resize-edge`, `button-size`, `grip-size`, `accent`, `transition-duration`, `transition-ease` · 1 privada(s) forward — `_palette-border`
|
|
- **Eje `size`**: no · **ficheros**: `float-panel.css`
|
|
|
|
## 1. Knobs fuera de alcance
|
|
|
|
### 1.1 Directo a primitivo global (12)
|
|
|
|
| # | fichero:línea | selector | propiedad | valor |
|
|
| ---: | --- | --- | --- | --- |
|
|
| 1 | `float-panel.css:76` | `[data-float-panel-content][data-variant='outline']` | `background` | `var(--color-surface-default)` |
|
|
| 2 | `float-panel.css:77` | `[data-float-panel-content][data-variant='outline']` | `border-color` | `var(--color-border-strong)` |
|
|
| 3 | `float-panel.css:81` | `[data-float-panel-content][data-variant='ghost']` | `background` | `var(--color-surface-default)` |
|
|
| 4 | `float-panel.css:82` | `[data-float-panel-content][data-variant='ghost']` | `border-color` | `var(--color-border-subtle)` |
|
|
| 5 | `float-panel.css:83` | `[data-float-panel-content][data-variant='ghost']` | `box-shadow` | `var(--shadow-2)` |
|
|
| 6 | `float-panel.css:169` | `[data-float-panel-action], [data-float-panel-stage-trigger]` | `border-radius` | `var(--radius-sm)` |
|
|
| 7 | `float-panel.css:171` | `[data-float-panel-action], [data-float-panel-stage-trigger]` | `color` | `var(--color-content-secondary)` |
|
|
| 8 | `float-panel.css:172` | `[data-float-panel-action], [data-float-panel-stage-trigger]` | `font-size` | `var(--font-size-md)` |
|
|
| 9 | `float-panel.css:178` | `[data-float-panel-action]:hover, [data-float-panel-stage-trigger]:hover` | `background` | `var(--color-surface-muted)` |
|
|
| 10 | `float-panel.css:179` | `[data-float-panel-action]:hover, [data-float-panel-stage-trigger]:hover` | `color` | `var(--color-content-primary)` |
|
|
| 11 | `float-panel.css:227` | `[data-float-panel-resize-grip]` | `color` | `var(--color-content-tertiary, var(--color-content-secondary))` |
|
|
| 12 | `float-panel.css:262` | `[data-float-panel-resize-grip]:focus-visible` | `border-radius` | `var(--radius-sm)` |
|
|
|
|
### 1.2 A través de un privado (3)
|
|
|
|
| # | fichero:línea | selector | propiedad | valor |
|
|
| ---: | --- | --- | --- | --- |
|
|
| 1 | `float-panel.css:107` | `[data-float-panel-header]` | `border-block-end` | `var(--border-width-medium) solid var(--_float-panel-accent)` |
|
|
| 2 | `float-panel.css:184` | `[data-float-panel-action]:focus-visible, [data-float-panel-stage-trigger]:focus-visible` | `box-shadow` | `0 0 0 2px var(--_float-panel-accent)` |
|
|
| 3 | `float-panel.css:255` | `[data-float-panel-resize-grip]:hover, [data-float-panel-resize-grip][data-grabbed]` | `color` | `var(--_float-panel-accent)` |
|
|
|
|
### 1.3 Literales (5)
|
|
|
|
| # | fichero:línea | selector | propiedad | valor |
|
|
| ---: | --- | --- | --- | --- |
|
|
| 1 | `float-panel.css:173` | `[data-float-panel-action], [data-float-panel-stage-trigger]` | `line-height` | `1` |
|
|
| 2 | `float-panel.css:231` | `[data-float-panel-resize-grip]` | `background-image` | `repeating-linear-gradient( -45deg, transparent 0 3px, currentColor 3px 4.5px )` |
|
|
| 3 | `float-panel.css:248` | `[data-float-panel-resize-grip]:dir(rtl)` | `background-image` | `repeating-linear-gradient(45deg, transparent 0 3px, currentColor 3px 4.5px)` |
|
|
| 4 | `float-panel.css:254` | `[data-float-panel-resize-grip]:hover, [data-float-panel-resize-grip][data-grabbed]` | `opacity` | `1` |
|
|
| 5 | `float-panel.css:259` | `[data-float-panel-resize-grip]:focus-visible` | `opacity` | `1` |
|
|
|
|
## 2. Sistema transversal (4) — informativo, fuera del ratio
|
|
|
|
Un tema los alcanza **a nivel de sistema**, por diseño (recipe-contract §2).
|
|
|
|
| # | fichero:línea | selector | propiedad | valor |
|
|
| ---: | --- | --- | --- | --- |
|
|
| 1 | `float-panel.css:121` | `[data-float-panel-header]:focus-visible` | `box-shadow` | `inset 0 0 0 var(--ring-inset-width) var(--ring-inset-color, currentColor)` |
|
|
| 2 | `float-panel.css:125` | `[data-float-panel-header][data-grabbed]` | `box-shadow` | `inset 0 0 0 var(--ring-inset-width) var(--ring-inset-color, currentColor)` |
|
|
| 3 | `float-panel.css:239` | `[data-float-panel-resize-grip]` | `opacity` | `var(--opacity-muted)` |
|
|
| 4 | `float-panel.css:261` | `[data-float-panel-resize-grip]:focus-visible` | `box-shadow` | `inset 0 0 0 var(--ring-inset-width) var(--ring-inset-color, currentColor)` |
|
|
|
|
## 3. Privados de la receta — ¿de dónde sale su valor?
|
|
|
|
| privado | declaraciones | valor(es) | origen | ¿deriva de un público? |
|
|
| --- | ---: | --- | --- | :-: |
|
|
| `--_float-panel-accent` | 2 | `var(--float-panel-accent)`, `var(--_float-panel-palette-border)` | private, public | no |
|
|
|
|
Consumidos y **no declarados en el CSS** (vienen de `base.ts` o de un estilo inline del wrapper): `--_float-panel-palette-border`.
|
|
|
|
## 4. Propuesta de corrección
|
|
|
|
### 4.1 Tokens a declarar en `lib/recipes/base.ts` (15)
|
|
|
|
Valor **verbatim** del CSS de hoy: el default no se mueve, sólo cambia quién
|
|
puede moverlo. Nombres derivados de recipe-contract §1 (ejes lógicos, talla
|
|
al final) y theming §6.7 (slots de color, modificador delante). Un token con
|
|
DOS valores distintos es una colisión de nombre: son dos knobs, o el nombre
|
|
no distingue lo que debería — se marca `⚠`.
|
|
|
|
| token (`--float-panel-…`) | scope TSC | valor propuesto | usos |
|
|
| --- | --- | --- | ---: |
|
|
| `action-shadow` | `root` | ⚠ `var(--float-panel-accent)` / `var(--_float-panel-palette-border)` | 2 |
|
|
| `resize-grip-bg-image` | `root` | ⚠ `repeating-linear-gradient( -45deg, transparent 0 3px, currentColor 3px 4.5px )` / `repeating-linear-gradient(45deg, transparent 0 3px, currentColor 3px 4.5px)` | 2 |
|
|
| `hover-resize-grip-fg` | `root` | ⚠ `var(--float-panel-accent)` / `var(--_float-panel-palette-border)` | 2 |
|
|
| `outline-content-bg` | `root` | `var(--color-surface-default)` | 1 |
|
|
| `outline-content-border` | `root` | `var(--color-border-strong)` | 1 |
|
|
| `ghost-content-bg` | `root` | `var(--color-surface-default)` | 1 |
|
|
| `ghost-content-border` | `root` | `var(--color-border-subtle)` | 1 |
|
|
| `ghost-content-shadow` | `root` | `var(--shadow-2)` | 1 |
|
|
| `action-radius` | `root` | `var(--radius-sm)` | 1 |
|
|
| `action-fg` | `root` | `var(--color-content-secondary)` | 1 |
|
|
| `action-font-size` | `root` | `var(--font-size-md)` | 1 |
|
|
| `hover-action-bg` | `root` | `var(--color-surface-muted)` | 1 |
|
|
| `hover-action-fg` | `root` | `var(--color-content-primary)` | 1 |
|
|
| `resize-grip-fg` | `root` | `var(--color-content-tertiary, var(--color-content-secondary))` | 1 |
|
|
| `resize-grip-radius` | `root` | `var(--radius-sm)` | 1 |
|
|
|
|
### 4.2 Sin nombre mecánico (4)
|
|
|
|
- **⚠ decisión: `border-block-end` es shorthand o eje físico — hay que partirlo en ejes lógicos antes de nombrarlo (recipe-contract §1, R-4.4)** — 1: `border-block-end`.
|
|
- **⚠ decisión: `1` es un valor identidad o geometría de layout, no un knob de tema — el perímetro de «knob» es D-TH.2, sin firmar** — 3: `line-height`, `opacity`.
|
|
|
|
### 4.3 Avisos sobre los tokens propuestos (1)
|
|
|
|
- **el privado `--_float-panel-accent` debe pasar a leer este público (o desaparecer)** — `--float-panel-action-shadow`, `--float-panel-hover-resize-grip-fg`
|
|
|
|
### 4.4 Lo que hay que comprobar a mano (PLAN-theming §1.3 · §7.4)
|
|
|
|
- [ ] **Privado que no deriva de un público** — §3 lo marca; el privado debe leer el público o desaparecer.
|
|
- [ ] **Velo o acento en el nodo equivocado** (`archetype: 'item'` en un envoltorio, un `background` en shorthand que mata la capa de estado) — se mide desde el píxel hacia arriba.
|
|
- [ ] **Doble animación** al mover un sello a una superficie con animación propia — registro de `animationstart`/`animationend`.
|
|
- [ ] **Diff de computed = 0** en reposo · hover · abierto · disabled · foco, por talla, antes y después.
|
|
- [ ] **Centinela por token nuevo**: valor imposible en el root → el nodo lo sigue. Si no, el token miente.
|
|
|
|
## 5. Veredicto
|
|
|
|
<!-- veredicto:start -->
|
|
|
|
_(pendiente — lo escribe el autor; se conserva al regenerar)_
|
|
|
|
<!-- veredicto:end -->
|