Commit 15ab9c8
refactor(painter-dom): rename rtl-paragraph feature to inline-direction (SD-2779) (superdoc-dev#3307)
* refactor(painter-dom): rename rtl-paragraph feature to inline-direction (SD-2779)
The painter-dom feature module previously called `features/rtl-paragraph/`
handles two related but distinct OOXML elements: w:pPr/w:bidi
(paragraph inline direction) and w:rPr/w:rtl (run inline direction).
Both belong to the inline-direction axis. Table visual direction
(w:bidiVisual) and writing mode (w:textDirection) are separate
orthogonal axes owned elsewhere.
Rename the folder + import path + feature-registry entry to
`inline-direction` so the module name matches the axis, and add an
explicit note (registry comment + index.ts JSDoc) calling out the
two orthogonal axes the module does NOT own.
Internal file (`rtl-styles.ts`) and exported function names
(`applyRtlStyles`, `shouldUseSegmentPositioning`, `isRtlParagraph`,
`resolveTextAlign`) keep their RTL framing because they describe RTL
detection and styling specifically. Only the feature folder name
changes.
Tests: painter-dom 1070 pass. Build sweep
(`pnpm --filter @superdoc/painter-dom... build`) clean.
* docs(direction): correct OOXML spec citations on the orthogonal-axis note
§17.18.93 is ST_TextDirection (the enum values), not the element location.
w:textDirection lives at §17.3.1.41 (paragraph) and §17.4.72 (cell).
Also soften the "inline direction" framing to "paragraph/run inline bidi
handling": w:rPr/w:rtl is a run-level bidi/RTL/CS trigger, not strictly a
paragraph base-direction signal.
Comment-only; no code change.1 parent c1bd82d commit 15ab9c8
5 files changed
Lines changed: 29 additions & 19 deletions
File tree
- packages/layout-engine/painters/dom/src
- features
- inline-direction
- rtl-paragraph
Lines changed: 6 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | | - | |
39 | | - | |
| 41 | + | |
| 42 | + | |
40 | 43 | | |
41 | 44 | | |
42 | 45 | | |
| |||
Lines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
Lines changed: 0 additions & 15 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| |||
0 commit comments