diff --git a/continue.md b/continue.md index 74d8a06af..482ade63a 100644 --- a/continue.md +++ b/continue.md @@ -172,6 +172,33 @@ browser: caret en heading → el panel muestra "Heading level"; el toggle refleja el nivel actual; el click convierte bidireccional (H1→H3→H2) y el toggle se actualiza. `npm run check` 0 errors. +## Rework del editor Words (2026-05-29 #2 — redirect del usuario) + +El usuario redirigió a un nuevo bloque de trabajo sobre el editor. Plan +en 3 pasos (acordado: overlays a eidos POR FASES, con revisión entre +cada una): + +- **Paso 1 — gutter izquierdo (✅ hecho):** quitado el botón "+" del + gutter; "insertar bloque" integrado en el menú del drag handle como + "Insert below" (vía `act('insertBelow')`). Gutter convertido en banda + silver estrecha: `--_words-gutter-size` 3.5rem→2.5rem, fondo + `--words-rail-bg` #ededed (muy suave) + borde derecho 1px + `--words-rail-border` #cfcfcf (un poco más fuerte), pintado como + `linear-gradient` en `[data-words-content]` (solo background, no toca + el contenteditable). Tokens del recipe actualizados + `generate:eidos-css`. + El inserter de SEAM (`words-block-inserter.svelte`, el "+" entre + bloques) NO se tocó — es otro overlay; preguntar si también debe irse. +- **Paso 2 — props de bloque (#3, pendiente):** añadir `color` (texto) + a `BlockVisual` + per-type subsets + `visualToStyle` + validador; y + sección común (margen/espaciado/fondo/color-texto) en el block panel. + Construir esos color controls con **eidos ColorPicker** y migrar los + `` nativos existentes (foreground/background marks + + panel de imagen) a ColorPicker. (Cubre #3 + la parte "color pickers → + eidos" de #4-fase1.) +- **Paso 3 — menú del drag → eidos (#4-fase1 resto) + #4-fase2:** + migrar el menú del block-handle a eidos Menu/Popover; luego link + editor / find / status a Popover+Tooltip. + ## Pendiente para mañana ### P2 — Heredados diff --git a/src/uix/eidos/components/words/words-block-handle.svelte b/src/uix/eidos/components/words/words-block-handle.svelte index 93d432518..d184d3431 100644 --- a/src/uix/eidos/components/words/words-block-handle.svelte +++ b/src/uix/eidos/components/words/words-block-handle.svelte @@ -254,10 +254,18 @@ return () => document.removeEventListener('click', onclick); }); - function act(command: 'moveUp' | 'moveDown' | 'duplicate' | 'delete') { + function act(command: 'insertBelow' | 'moveUp' | 'moveDown' | 'duplicate' | 'delete') { const idx = hoverBlockIndex; if (idx === undefined) return; - if (command === 'moveUp') { + if (command === 'insertBelow') { + // Canon Notion: "+ here adds a line below". The caret follows + // so the user can type right away. + snippet.applyCommand({ + type: 'insertBlock', + blockIndex: idx + 1, + block: { type: 'paragraph', children: [{ type: 'text', text: '' }] } + }); + } else if (command === 'moveUp') { snippet.applyCommand({ type: 'moveBlock', blockIndex: idx, direction: 'up' }); } else if (command === 'moveDown') { snippet.applyCommand({ type: 'moveBlock', blockIndex: idx, direction: 'down' }); @@ -271,23 +279,6 @@ position = null; } - /** - * "+" affordance — inserts a fresh empty paragraph immediately - * AFTER the hovered block (canon Notion behavior: "+ here adds a - * line below"). The caret follows so the user can type right - * away. Mousedown is `preventDefault`ed so the click doesn't blur - * the editor. - */ - function insertBelow() { - const idx = hoverBlockIndex; - if (idx === undefined) return; - snippet.applyCommand({ - type: 'insertBlock', - blockIndex: idx + 1, - block: { type: 'paragraph', children: [{ type: 'text', text: '' }] } - }); - } - function ondragstart(e: DragEvent) { const idx = hoverBlockIndex; if (idx === undefined) { @@ -364,16 +355,6 @@ style="top: {position.top}px; left: {position.left}px;" role="presentation" > - +