monowind 0.2.7 → 0.2.9
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 +19 -4
- package/dist/cdn.js +87 -86
- package/dist/cdn.js.map +1 -1
- package/dist/element.d.ts.map +1 -1
- package/dist/glyph-box.d.ts +56 -0
- package/dist/glyph-box.d.ts.map +1 -0
- package/dist/glyphs.d.ts +7 -0
- package/dist/glyphs.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1845 -1360
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts.map +1 -1
- package/dist/metrics.d.ts.map +1 -1
- package/dist/multicol.d.ts.map +1 -1
- package/dist/paint.d.ts +17 -2
- package/dist/paint.d.ts.map +1 -1
- package/dist/plain-text.d.ts +31 -3
- package/dist/plain-text.d.ts.map +1 -1
- package/dist/pointer.d.ts +12 -0
- package/dist/pointer.d.ts.map +1 -1
- package/dist/render.d.ts.map +1 -1
- package/dist/selection.d.ts +36 -10
- package/dist/selection.d.ts.map +1 -1
- package/dist/style.d.ts.map +1 -1
- package/dist/tree.d.ts.map +1 -1
- package/dist/types.d.ts +8 -0
- package/dist/types.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 +1 -1
- package/src/styles.css +27 -40
package/README.md
CHANGED
|
@@ -47,10 +47,18 @@ defineMonoWind();
|
|
|
47
47
|
the art and copy exactly what you see. Double- and triple-click select
|
|
48
48
|
the element under the pointer — the word or the paragraph, as on any
|
|
49
49
|
page — and drag extends word by word or paragraph by paragraph.
|
|
50
|
-
`select="text"` selects
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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.
|
|
54
62
|
|
|
55
63
|
## Keyboard focus
|
|
56
64
|
|
|
@@ -103,6 +111,11 @@ registerBorderGlyphs("stars", { solid: { tl: "✧", tr: "✧", bl: "✧", br: "
|
|
|
103
111
|
}
|
|
104
112
|
```
|
|
105
113
|
|
|
114
|
+
Borders, blocks, and scrollbars tile in any font: where a font draws
|
|
115
|
+
its box-drawing or block glyphs shorter than the row (Menlo and SF
|
|
116
|
+
Mono do, and any font under a taller `leading-*`), the grid fits them
|
|
117
|
+
to it, so rows never show a seam.
|
|
118
|
+
|
|
106
119
|
## Companion packages
|
|
107
120
|
|
|
108
121
|
The core is self-contained; these are optional:
|
|
@@ -113,6 +126,8 @@ The core is self-contained; these are optional:
|
|
|
113
126
|
border characters
|
|
114
127
|
- [`@monowind/ascii`](https://www.npmjs.com/package/@monowind/ascii) —
|
|
115
128
|
`<mono-ascii>` FIGlet banner text with gradient/metal effects
|
|
129
|
+
- [`@monowind/qr-code`](https://www.npmjs.com/package/@monowind/qr-code) —
|
|
130
|
+
`<mono-qr>` scannable QR codes, packed into the grid's cells
|
|
116
131
|
- [`@monowind/vite`](https://www.npmjs.com/package/@monowind/vite) —
|
|
117
132
|
zero-config Vite plugin, Tailwind included
|
|
118
133
|
|