monowind 0.2.11 → 0.2.12

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 CHANGED
@@ -111,11 +111,49 @@ registerBorderGlyphs("stars", { solid: { tl: "✧", tr: "✧", bl: "✧", br: "
111
111
  }
112
112
  ```
113
113
 
114
+ A set can also register corner glyphs by `border-radius` — a corner
115
+ draws the registration nearest its radius in cells, the plain corner
116
+ counting at 0 (the defaults round light-line corners to `╭ ╮ ╰ ╯`
117
+ from `rounded-xs` up) — and the shade ramp box shadows step through,
118
+ densest first (default `█ ▓ ▒ ░`):
119
+
120
+ ```js
121
+ registerBorderGlyphs("soft", {
122
+ solid: {
123
+ rounded: [{ radius: 2, tl: "◜", tr: "◝", bl: "◟", br: "◞" }],
124
+ shadow: ["▓", "▒", "░", "·"],
125
+ },
126
+ });
127
+ ```
128
+
114
129
  Borders, blocks, and scrollbars tile in any font: where a font draws
115
130
  its box-drawing or block glyphs shorter than the row (Menlo and SF
116
131
  Mono do, and any font under a taller `leading-*`), the grid fits them
117
132
  to it, so rows never show a seam.
118
133
 
134
+ ## Shadows and rounded corners
135
+
136
+ `shadow-*` paints a box's silhouette behind it in shade glyphs from
137
+ the glyph set: offsets in whole cells (a `4px` offset is one cell, the
138
+ classic DOS shadow), blur as rings that fade outward, spread in cells,
139
+ a translucent color as a lighter shade leaning on the theme's
140
+ foreground. Tailwind's presets are pixel recipes, and their blur and
141
+ spread convert on the spacing scale (4px to a cell), so `shadow-2xl`
142
+ is a six-ring halo. For presets tuned to the grid, redefine them in
143
+ your Tailwind theme:
144
+
145
+ ```css
146
+ @theme {
147
+ --shadow-sm: 4px 4px 0 0 rgb(0 0 0 / 0.1);
148
+ --shadow-md: 4px 4px 8px 0 rgb(0 0 0 / 0.1);
149
+ --shadow-lg: 4px 4px 16px 0 rgb(0 0 0 / 0.1);
150
+ }
151
+ ```
152
+
153
+ `rounded-*` picks the corner glyphs a set registers nearest the radius
154
+ — the defaults' `╭ ╮ ╰ ╯` for light-line borders — while double
155
+ borders stay square.
156
+
119
157
  ## Companion packages
120
158
 
121
159
  The core is self-contained; these are optional:
package/dist/borders.d.ts CHANGED
@@ -12,6 +12,14 @@ export type { BorderRun } from "./types.ts";
12
12
  * only vertical/horizontal runs and skip corners that would overlap.
13
13
  */
14
14
  export declare function collectBorderRuns(style: CellStyle, box: Rect, out: BorderRun[]): void;
15
+ /**
16
+ * Emit a box's outer shadows (specs/box-shadow.md): each the border box
17
+ * moved by its offsets and grown by its spread, blurred into
18
+ * `round(blur / 2)` rings of the owner's shade ramp fading outward,
19
+ * the cells under the box left out — the last declared first, so the
20
+ * first paints on top.
21
+ */
22
+ export declare function collectShadowRuns(style: CellStyle, box: Rect, out: BorderRun[]): void;
15
23
  /** Whether the child paints in the positioned step (Appendix E step
16
24
  * 8+): positioned elements, and flex/grid items with an explicit
17
25
  * z-index (z-index applies there per CSS, but `auto` items paint as
@@ -1 +1 @@
1
- {"version":3,"file":"borders.d.ts","sourceRoot":"","sources":["../src/borders.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,KAAK,EACV,SAAS,EACT,mBAAmB,EACnB,SAAS,EACT,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,UAAU,EACV,OAAO,EACP,IAAI,EACL,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAkB5C;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,SAAS,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,IAAI,CA2BrF;AAgGD;;;;uCAIuC;AACvC,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAMrF;AAED;;;;;0DAK0D;AAC1D,wBAAgB,oBAAoB,CAAC,IAAI,E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