monowind 0.2.6 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -4
- package/dist/cdn.js +104 -93
- package/dist/cdn.js.map +1 -1
- package/dist/element.d.ts.map +1 -1
- package/dist/focus.d.ts +39 -0
- package/dist/focus.d.ts.map +1 -0
- package/dist/glyph-box.d.ts +35 -0
- package/dist/glyph-box.d.ts.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1862 -1307
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts.map +1 -1
- package/dist/multicol.d.ts.map +1 -1
- package/dist/paint.d.ts +15 -1
- package/dist/paint.d.ts.map +1 -1
- package/dist/plain-text.d.ts +44 -6
- package/dist/plain-text.d.ts.map +1 -1
- package/dist/pointer.d.ts +18 -1
- package/dist/pointer.d.ts.map +1 -1
- package/dist/render.d.ts.map +1 -1
- package/dist/selection.d.ts +19 -0
- package/dist/selection.d.ts.map +1 -1
- package/dist/style.d.ts +9 -1
- package/dist/style.d.ts.map +1 -1
- package/dist/tree.d.ts +7 -0
- package/dist/tree.d.ts.map +1 -1
- package/dist/width.d.ts +22 -0
- package/dist/width.d.ts.map +1 -0
- package/dist/wrap.d.ts +1 -1
- package/dist/wrap.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/styles.css +49 -48
package/README.md
CHANGED
|
@@ -21,6 +21,9 @@ accessibility semantics stay fully intact.
|
|
|
21
21
|
</mono-wind>
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
The host is a container like any element: `<mono-wind>hello</mono-wind>`
|
|
25
|
+
lays its own text out too.
|
|
26
|
+
|
|
24
27
|
## With your own Tailwind (v4) build
|
|
25
28
|
|
|
26
29
|
```sh
|
|
@@ -44,10 +47,27 @@ defineMonoWind();
|
|
|
44
47
|
the art and copy exactly what you see. Double- and triple-click select
|
|
45
48
|
the element under the pointer — the word or the paragraph, as on any
|
|
46
49
|
page — and drag extends word by word or paragraph by paragraph.
|
|
47
|
-
`select="text"` selects
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
50
|
+
`select="text"` selects your elements' text instead, character by
|
|
51
|
+
character, the way a page does. In both modes the highlight is drawn
|
|
52
|
+
on the grid, cell for cell, as reverse video: each cell's colors swap,
|
|
53
|
+
so colored text selects as a band of its color. A copy of element
|
|
54
|
+
text is plain text laid out by the standard `innerText` rules
|
|
55
|
+
(paragraphs separated by a blank line, table cells by tabs).
|
|
56
|
+
|
|
57
|
+
Glyph widths follow the terminal convention: CJK, Hangul, and emoji
|
|
58
|
+
take two cells, everything else one, whatever the font draws — a
|
|
59
|
+
glyph the font lacks is scaled into its cells so the grid never
|
|
60
|
+
drifts. `clusterWidth`, `clusterAdvances`, `graphemes`, and
|
|
61
|
+
`textCells` are exported for code that lays out text of its own.
|
|
62
|
+
|
|
63
|
+
## Keyboard focus
|
|
64
|
+
|
|
65
|
+
Tab moves focus as on any page. `focus="arrows"` on `<mono-wind>` adds
|
|
66
|
+
the arrow keys: from the focused element, an arrow moves focus to the
|
|
67
|
+
nearest focusable element in that direction on the grid, the way a
|
|
68
|
+
terminal form does. Controls keep the arrows they use — Left and Right
|
|
69
|
+
in a text field, all four in a textarea, a radio group's own — a
|
|
70
|
+
modifier makes any arrow native, and nothing wraps.
|
|
51
71
|
|
|
52
72
|
## Scrolling
|
|
53
73
|
|