palabras: revertir el piloto del wrapper de bloques (base limpia)

El piloto envolvia cada parrafo en <div data-words-node=block><p>, pero
el unico beneficio neto (drag vertical de raiz) ya esta cubierto por el
`dropZone` del sink, y el borde activo punteado funciona igual sobre el
elemento pelado. paragraphSpec.render vuelve a emitir un <p> plano.

Tests del render del motor en verde otra vez (engine de words 430/430).
palabras verificado en navegador: render, grip, drag y borrado intactos.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
active-uix
dev 4 months ago
parent d68d2c4513
commit 97c40d3256

@ -108,9 +108,8 @@
margin-block: 0 0.6em;
}
/* Selection marker for the active/selected block — dotted (NOT the solid focus
ring, which is suppressed above). Stamped by WordsActivate. With the block
shell, `data-words-active` now lands on the wrapper div (a real container)
instead of the bare element — SAME dashed marker as before, cleaner anchor. */
ring, which is suppressed above). Stamped by WordsActivate on the active
block element. */
[data-palabras-doc] [data-words-active] {
outline: 1.5px dashed var(--color-primary-border);
outline-offset: 6px;

@ -94,31 +94,16 @@ const paragraphSpec: WordsBlockSpec = {
},
render(block, ctx) {
const b = block as ParagraphBlock;
// Block SHELL: the block is a `<div data-words-node="block">` wrapping a
// bare presentational `<p data-words-inner>`. The shell carries the block
// identity (node / id / path / type) + visual styles; the inner `<p>` only
// holds the editable inlines. This mirrors how callout / columns already
// render (div shells) and gives the active-block marker + the gutter grip a
// real container — instead of an outline floating around the bare `<p>`.
// The caret is unaffected: selection anchors to the `[data-words-node=text]`
// spans by absolute path, so an extra wrapper above them is transparent.
return {
kind: 'element',
tag: 'div',
tag: 'p',
attrs: ctx.composeBlockAttrs(
b,
'paragraph',
ctx.path,
b.align ? { 'data-words-align': b.align } : {}
),
children: [
{
kind: 'element',
tag: 'p',
attrs: { 'data-words-inner': '' },
children: ctx.renderInlines(b.children, ctx.path)
}
]
children: ctx.renderInlines(b.children, ctx.path)
};
}
};

Loading…
Cancel
Save

Powered by TurnKey Linux.