monowind 0.1.4 → 0.1.6
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/dist/borders.d.ts +36 -7
- package/dist/borders.d.ts.map +1 -1
- package/dist/cdn.js +46 -43
- package/dist/cdn.js.map +1 -1
- package/dist/element.d.ts +1 -1
- package/dist/element.d.ts.map +1 -1
- package/dist/flex.d.ts +2 -0
- package/dist/flex.d.ts.map +1 -1
- package/dist/grid.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1641 -949
- package/dist/index.js.map +1 -1
- package/dist/layout.d.ts +32 -8
- package/dist/layout.d.ts.map +1 -1
- package/dist/metrics.d.ts.map +1 -1
- package/dist/multicol.d.ts +77 -0
- package/dist/multicol.d.ts.map +1 -0
- package/dist/paint.d.ts +3 -0
- package/dist/paint.d.ts.map +1 -0
- package/dist/plain-text.d.ts +19 -7
- package/dist/plain-text.d.ts.map +1 -1
- package/dist/render.d.ts +12 -5
- package/dist/render.d.ts.map +1 -1
- package/dist/sort.d.ts +2 -0
- package/dist/sort.d.ts.map +1 -0
- package/dist/sort.js +548 -0
- package/dist/sort.js.map +1 -0
- package/dist/style.d.ts +6 -0
- package/dist/style.d.ts.map +1 -1
- package/dist/tree.d.ts +16 -1
- package/dist/tree.d.ts.map +1 -1
- package/dist/types.d.ts +105 -9
- package/dist/types.d.ts.map +1 -1
- package/dist/wrap.d.ts +4 -0
- package/dist/wrap.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/styles.css +236 -22
package/dist/style.d.ts
CHANGED
|
@@ -11,6 +11,12 @@ import type { CellMetrics, CellStyle, GridAreas, GridLine, GridTemplate } from "
|
|
|
11
11
|
* the font size and the root letter-spacing to 0.
|
|
12
12
|
*/
|
|
13
13
|
export declare function readCellStyle(el: Element, rootFontSizePx: number, metrics?: CellMetrics): CellStyle;
|
|
14
|
+
/** True for a computed `background-color` that shouldn't trigger the
|
|
15
|
+
* bg-occludes-decorations fill. Real browsers resolve transparent to
|
|
16
|
+
* `rgba(0, 0, 0, 0)`; the empty-string and `currentcolor` branches
|
|
17
|
+
* cover happy-dom (test env), which leaves some computed values
|
|
18
|
+
* unresolved. */
|
|
19
|
+
export declare function isTransparentColor(value: string): boolean;
|
|
14
20
|
/** Extra cells after each character: floor((letter-spacing − root
|
|
15
21
|
* letter-spacing) ÷ 0.025em), never negative (specs/cell-model.md). The
|
|
16
22
|
* root's own letter-spacing is part of the cell, so only the excess over
|
package/dist/style.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIV,WAAW,EACX,SAAS,EAIT,SAAS,EAET,QAAQ,EACR,YAAY,EAUb,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,OAAO,EACX,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,WAAW,GACpB,SAAS,
|
|
1
|
+
{"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../src/style.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAIV,WAAW,EACX,SAAS,EAIT,SAAS,EAET,QAAQ,EACR,YAAY,EAUb,MAAM,YAAY,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAC3B,EAAE,EAAE,OAAO,EACX,cAAc,EAAE,MAAM,EACtB,OAAO,CAAC,EAAE,WAAW,GACpB,SAAS,CAiSX;AA8BD;;;;iBAIiB;AACjB,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CASzD;AAsPD;;;uCAGuC;AACvC,wBAAgB,aAAa,CAC3B,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,EAClB,mBAAmB,EAAE,MAAM,GAC1B,MAAM,CAKR;AA2VD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,YAAY,CAsDtF;AAgCD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAoCtE;AA8GD;;yEAEyE;AACzE,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CA0BrD"}
|
package/dist/tree.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import type { CellMetrics, LayoutNode } from "./types.ts";
|
|
2
|
+
/** Per-textarea content width in cells, captured by the host BEFORE
|
|
3
|
+
* the measuring attribute goes on — the engine's width rule is off
|
|
4
|
+
* during measuring, so `textarea.clientWidth` read then would reflect
|
|
5
|
+
* the browser-default width instead of our engine-assigned one (which
|
|
6
|
+
* may itself be constrained by max-width / flex parent). */
|
|
7
|
+
export type TextareaWidths = Map<HTMLTextAreaElement, number>;
|
|
2
8
|
/**
|
|
3
9
|
* Build a LayoutNode tree from an element subtree.
|
|
4
10
|
*
|
|
@@ -20,5 +26,14 @@ import type { CellMetrics, LayoutNode } from "./types.ts";
|
|
|
20
26
|
* `cellMetrics` (measured by the host) is the basis for leading and
|
|
21
27
|
* tracking; absent in headless tests (see readCellStyle).
|
|
22
28
|
*/
|
|
23
|
-
export declare function buildTree(root: Element, rootFontSizePx: number, cellMetrics?: CellMetrics): LayoutNode | null;
|
|
29
|
+
export declare function buildTree(root: Element, rootFontSizePx: number, cellMetrics?: CellMetrics, textareaWidths?: TextareaWidths): LayoutNode | null;
|
|
30
|
+
/** True if `el` has any direct text child that isn't just whitespace. */
|
|
31
|
+
export declare function hasDirectText(el: Element): boolean;
|
|
32
|
+
/** Author-facing warning when direct text can't be laid out alongside
|
|
33
|
+
* block children — shared by the nested-container path here and the
|
|
34
|
+
* host-level path in element.ts. */
|
|
35
|
+
export declare const DIRECT_TEXT_DROPPED: string;
|
|
36
|
+
/** True for tags whose value/caret/selection are handled by the browser
|
|
37
|
+
* natively — the tree builder treats them as empty leaves. */
|
|
38
|
+
export declare function isFormControlTag(tag: string): boolean;
|
|
24
39
|
//# sourceMappingURL=tree.d.ts.map
|
package/dist/tree.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../src/tree.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tree.d.ts","sourceRoot":"","sources":["../src/tree.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAW,MAAM,YAAY,CAAC;AAEnE;;;;4DAI4D;AAC5D,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC,mBAAmB,EAAE,MAAM,CAAC,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,OAAO,EACb,cAAc,EAAE,MAAM,EACtB,WAAW,CAAC,EAAE,WAAW,EACzB,cAAc,CAAC,EAAE,cAAc,GAC9B,UAAU,GAAG,IAAI,CA4JnB;AA6UD,yEAAyE;AACzE,wBAAgB,aAAa,CAAC,EAAE,EAAE,OAAO,GAAG,OAAO,CAIlD;AAED;;oCAEoC;AACpC,eAAO,MAAM,mBAAmB,QAE6B,CAAC;AAE9D;8DAC8D;AAC9D,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAErD"}
|
package/dist/types.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export type Size = {
|
|
|
38
38
|
} | {
|
|
39
39
|
kind: "fit-content";
|
|
40
40
|
};
|
|
41
|
-
export type Display = "block" | "flex" | "grid" | "table" | "none";
|
|
41
|
+
export type Display = "block" | "flex" | "grid" | "table" | "multicol" | "none";
|
|
42
42
|
/** Table-internal role from the computed display (specs/table.md).
|
|
43
43
|
* `"none"` on everything that isn't table-internal. Cells and captions
|
|
44
44
|
* keep `display: "block"` — they ARE block containers; the table
|
|
@@ -206,6 +206,12 @@ export interface GapRule {
|
|
|
206
206
|
style: BorderStyle;
|
|
207
207
|
color: string | undefined;
|
|
208
208
|
}
|
|
209
|
+
/** Where rule segments break at gap intersections (css-gaps-1
|
|
210
|
+
* rule-break; specs/gap-decorations.md "Segments"). */
|
|
211
|
+
export type RuleBreak = "none" | "normal" | "intersection";
|
|
212
|
+
/** Which segments paint next to empty grid areas (css-gaps-1
|
|
213
|
+
* rule-visibility-items; `normal` acts as `all` in grid). */
|
|
214
|
+
export type RuleVisibilityItems = "normal" | "all" | "around" | "between";
|
|
209
215
|
/** A collapsed table participant's authored border, moved out of
|
|
210
216
|
* `CellStyle.border` at read time (`border-collapse` inherits, so every
|
|
211
217
|
* internal element knows): geometry and painting then treat the element
|
|
@@ -321,18 +327,29 @@ export interface CellStyle {
|
|
|
321
327
|
*/
|
|
322
328
|
color: string | undefined;
|
|
323
329
|
backgroundColor: string | undefined;
|
|
330
|
+
/** `bg-clear` marker (`--mw-bg-clear: 1`): occlude ancestor decoration
|
|
331
|
+
* glyphs under this element's border box WITHOUT painting a bg color.
|
|
332
|
+
* `backgroundColor` stays undefined; the renderer fills with plain
|
|
333
|
+
* spaces instead of colored spaces. */
|
|
334
|
+
backgroundClear: boolean;
|
|
324
335
|
/** Paint-only text styling, passed through to the browser and
|
|
325
336
|
* mirrored per-segment by the plain-text mode's spans. */
|
|
326
337
|
fontWeight: string;
|
|
327
338
|
fontStyle: string;
|
|
328
339
|
textDecorationLine: string;
|
|
329
|
-
/** True when text-align is
|
|
330
|
-
* per-line
|
|
340
|
+
/** True when text-align is `justify` — forced back to `start` (its
|
|
341
|
+
* extra per-line word spacing is fractional). See cell-model spec. */
|
|
331
342
|
textAlignBlocked: boolean;
|
|
332
|
-
/** Computed text-align, normalized LTR
|
|
333
|
-
* `
|
|
334
|
-
*
|
|
335
|
-
|
|
343
|
+
/** Computed text-align, normalized LTR. `end` offsets each line by
|
|
344
|
+
* W − line, `center` by floor((W − line) / 2) — whole cells, painted
|
|
345
|
+
* by the grid (the browser's own fractional centering only touches
|
|
346
|
+
* the invisible light-DOM copy). */
|
|
347
|
+
textAlign: "start" | "center" | "end";
|
|
348
|
+
/** First-line indent in cells (per CSS: applies once to the first
|
|
349
|
+
* formatted line of the block; `<br>` doesn't re-indent). Charged
|
|
350
|
+
* against the wrap width of the first line and offsets that line's
|
|
351
|
+
* paint x. Percentages resolve to 0 (unsupported). */
|
|
352
|
+
textIndent: number;
|
|
336
353
|
tableRole: TableRole;
|
|
337
354
|
tableLayout: "auto" | "fixed";
|
|
338
355
|
/** True for `border-collapse: collapse` (Tailwind preflight's default
|
|
@@ -360,6 +377,28 @@ export interface CellStyle {
|
|
|
360
377
|
* rule width (deviation: rules take layout space — ink needs cells). */
|
|
361
378
|
ruleX: GapRule | null;
|
|
362
379
|
ruleY: GapRule | null;
|
|
380
|
+
ruleBreak: RuleBreak;
|
|
381
|
+
/** Cells retracted from every rule-segment endpoint (rule-inset,
|
|
382
|
+
* quantized like border widths) — or `overlap-join`, which instead
|
|
383
|
+
* extends junction endpoints into the crossing gap so meeting rules
|
|
384
|
+
* connect. */
|
|
385
|
+
ruleInset: number | "overlap-join";
|
|
386
|
+
ruleVisibilityItems: RuleVisibilityItems;
|
|
387
|
+
/** Multicol container inputs (specs/multicol.md): authored
|
|
388
|
+
* column-count / column-width (cells), null = auto. A container is
|
|
389
|
+
* multicol (display "multicol") when either is set on a block. */
|
|
390
|
+
columnCount: number | null;
|
|
391
|
+
columnWidth: number | null;
|
|
392
|
+
columnFill: "auto" | "balance";
|
|
393
|
+
/** column-span: all on a child — closes the column row, spans the
|
|
394
|
+
* container's full content width (specs/multicol.md "Spanners"). */
|
|
395
|
+
columnSpan: boolean;
|
|
396
|
+
/** Forced column breaks (`break-before/after-column`). */
|
|
397
|
+
breakBeforeColumn: boolean;
|
|
398
|
+
breakAfterColumn: boolean;
|
|
399
|
+
/** `break-inside: avoid` / `avoid-column` — a paragraph-flow child
|
|
400
|
+
* fragments as one unbreakable unit (specs/multicol.md). */
|
|
401
|
+
breakInsideAvoid: boolean;
|
|
363
402
|
}
|
|
364
403
|
export interface LayoutNode {
|
|
365
404
|
source: Element;
|
|
@@ -413,9 +452,11 @@ export interface LayoutNode {
|
|
|
413
452
|
padLeft: number;
|
|
414
453
|
padRight: number;
|
|
415
454
|
insets: PerSide<number | null> | null;
|
|
416
|
-
/** Paint-only
|
|
417
|
-
*
|
|
455
|
+
/** Paint-only styling mirrored into the grid (the browser's own
|
|
456
|
+
* ink is transparent-locked). `backgroundColor` fills the run's
|
|
457
|
+
* cells — how a focus-inverted inline link shows its highlight. */
|
|
418
458
|
color: string | undefined;
|
|
459
|
+
backgroundColor: string | undefined;
|
|
419
460
|
fontWeight: string;
|
|
420
461
|
fontStyle: string;
|
|
421
462
|
textDecorationLine: string;
|
|
@@ -474,6 +515,56 @@ export interface LayoutNode {
|
|
|
474
515
|
* (percent resolves against the containing block width, which only
|
|
475
516
|
* layout knows); the renderers read this, never `style.padding`. */
|
|
476
517
|
resolvedPadding: Insets;
|
|
518
|
+
/** Fragmented line map of a multicol text leaf (specs/multicol.md):
|
|
519
|
+
* text wrapped at the column width, each line assigned a column and
|
|
520
|
+
* column-local rows. Written by layout; the plain-text renderer reads
|
|
521
|
+
* it back so both place lines identically. A paragraph-flow container
|
|
522
|
+
* carries a spanless one for its rules, height fold, and native
|
|
523
|
+
* column vars; its children carry their own line maps in
|
|
524
|
+
* container-content coordinates. */
|
|
525
|
+
multicolGeometry?: MulticolLeafGeometry;
|
|
526
|
+
/** Paragraph-flow multicol child (specs/multicol.md "Fragmenting
|
|
527
|
+
* text-leaf children"): stays IN FLOW in the browser inside the
|
|
528
|
+
* container's native columns so the browser fragments it itself.
|
|
529
|
+
* Carries the engine-resolved margins the companion re-applies
|
|
530
|
+
* quantized. */
|
|
531
|
+
multicolFlow?: NullableInsets;
|
|
532
|
+
/** In-flow multicol SPANNER (specs/multicol.md): a normally laid-out
|
|
533
|
+
* box that stays in the native flow with `column-span: all`, its
|
|
534
|
+
* geometry forced like a laid-out element's. Carries the quantized
|
|
535
|
+
* native margins (`left` = the engine's cross offset). */
|
|
536
|
+
multicolFlowSpan?: NullableInsets;
|
|
537
|
+
}
|
|
538
|
+
/** A multicol text leaf's per-line fragmentation. `lineY`/`textY` are
|
|
539
|
+
* COLUMN-local rows; `lineX` is the line's column's content-relative x.
|
|
540
|
+
* Leaf columns are all `columnWidth` wide (the division remainder is
|
|
541
|
+
* folded into the engine-owned right padding so the browser's equal
|
|
542
|
+
* fractional columns land on the same whole cells). */
|
|
543
|
+
export interface MulticolLeafGeometry {
|
|
544
|
+
spans: {
|
|
545
|
+
start: number;
|
|
546
|
+
end: number;
|
|
547
|
+
}[];
|
|
548
|
+
lineY: number[];
|
|
549
|
+
textY: number[];
|
|
550
|
+
lineX: number[];
|
|
551
|
+
totalRows: number;
|
|
552
|
+
columnCount: number;
|
|
553
|
+
columnWidth: number;
|
|
554
|
+
gap: number;
|
|
555
|
+
/** Columns holding at least one line — overflow columns included. */
|
|
556
|
+
columnsUsed: number;
|
|
557
|
+
/** Spanner-split flow: one rule extent per SEGMENT (content-relative
|
|
558
|
+
* rows and its occupied columns); absent = one full-height segment. */
|
|
559
|
+
ruleSegments?: {
|
|
560
|
+
start: number;
|
|
561
|
+
end: number;
|
|
562
|
+
columns: number;
|
|
563
|
+
}[];
|
|
564
|
+
/** Spanner-split flow relies on the NATIVE balancer per segment (the
|
|
565
|
+
* companion keeps `column-fill: balance` and the natural height)
|
|
566
|
+
* instead of the fill-to-computed-height reconstruction. */
|
|
567
|
+
nativeBalance?: boolean;
|
|
477
568
|
}
|
|
478
569
|
/** The root's cell, in px: width = glyph advance + the root's
|
|
479
570
|
* letter-spacing, height = the root's line box (specs/cell-model.md).
|
|
@@ -483,6 +574,11 @@ export interface CellMetrics {
|
|
|
483
574
|
width: number;
|
|
484
575
|
height: number;
|
|
485
576
|
letterSpacing: number;
|
|
577
|
+
/** How far a glyph's ink extends past the cell's line box, in px
|
|
578
|
+
* (some fonts' ascent + descent exceed their `normal` line box).
|
|
579
|
+
* WebKit breaks columns at ink bottoms, so multicol leaves get this
|
|
580
|
+
* much extra native column height (see styles.css). */
|
|
581
|
+
inkOverhang?: number;
|
|
486
582
|
}
|
|
487
583
|
export declare function defaultCellStyle(): CellStyle;
|
|
488
584
|
export declare function zeroInsets(): Insets;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACnB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED,+EAA+E;AAC/E,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,MAAM,IAAI,GACZ;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE;AAClB;;;;8CAI8C;GAC5C;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,GACvB;IAAE,IAAI,EAAE,aAAa,CAAA;CAAE,CAAC;AAE5B,MAAM,MAA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AAgB,CAAC,EAAE,oBAAoB,CAAC;IACxC;;;;oBAIgB;IAChB,YAAY,CAAC,EAAE,cAAc,CAAC;IAC9B;;;8DAG0D;IAC1D,gBAAgB,CAAC,EAAE,cAAc,CAAC;CACnC;AAED;;;;uDAIuD;AACvD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACxC,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,qEAAqE;IACrE,WAAW,EAAE,MAAM,CAAC;IACpB;2EACuE;IACvE,YAAY,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACjE;;gEAE4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED;;;qBAGqB;AACrB,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,MAAM,CAAC;IACtB;;;2DAGuD;IACvD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,gBAAgB,IAAI,SAAS,CAiF5C;AAED,wBAAgB,UAAU,IAAI,MAAM,CAEnC;AAED,iEAAiE;AACjE,wBAAgB,SAAS,IAAI,SAAS,CAErC"}
|
package/dist/wrap.d.ts
CHANGED
|
@@ -33,6 +33,10 @@ export interface LineSpan {
|
|
|
33
33
|
export interface WrapOptions {
|
|
34
34
|
advances?: number[] | undefined;
|
|
35
35
|
tracking?: number;
|
|
36
|
+
/** `text-indent` in cells: reduces the first hard line's usable width
|
|
37
|
+
* (the paint layer offsets that line's x by the same amount). Per CSS,
|
|
38
|
+
* subsequent hard lines (`<br>`-separated) don't re-indent. */
|
|
39
|
+
firstLineIndent?: number | undefined;
|
|
36
40
|
}
|
|
37
41
|
export declare function wrapLines(text: string, width: number, options?: WrapOptions): string[];
|
|
38
42
|
/** Number of rows `text` occupies at `width` (see wrapLines). */
|
package/dist/wrap.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wrap.d.ts","sourceRoot":"","sources":["../src/wrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wEAAwE;AACxE,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"wrap.d.ts","sourceRoot":"","sources":["../src/wrap.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,wEAAwE;AACxE,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;;;;GAKG;AACH,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;mEAE+D;IAC/D,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,GAAE,WAAgB,GAAG,MAAM,EAAE,CAE1F;AAED,iEAAiE;AACjE,wBAAgB,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Text-based user interfaces (TUI) on the web, from ordinary HTML and Tailwind utility classes",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ascii",
|
|
@@ -37,13 +37,14 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@tailwindcss/browser": "^4.3.3",
|
|
39
39
|
"@vitest/coverage-v8": "4.1.11",
|
|
40
|
-
"happy-dom": "^20.
|
|
40
|
+
"happy-dom": "^20.12.0",
|
|
41
|
+
"tailwindcss": "^4.3.3",
|
|
41
42
|
"typescript": "^7.0.2",
|
|
42
43
|
"vite": "^8.2.2",
|
|
43
44
|
"vitest": "^4.1.11"
|
|
44
45
|
},
|
|
45
46
|
"scripts": {
|
|
46
|
-
"build": "vite build && vite build -c vite.cdn.config.ts && tsc -p tsconfig.build.json",
|
|
47
|
+
"build": "vite build && vite build -c vite.cdn.config.ts && vite build -c vite.sort.config.ts && tsc -p tsconfig.build.json",
|
|
47
48
|
"typecheck": "tsc --noEmit",
|
|
48
49
|
"test": "vitest run",
|
|
49
50
|
"test:watch": "vitest",
|
package/src/styles.css
CHANGED
|
@@ -21,18 +21,16 @@
|
|
|
21
21
|
isolation: isolate;
|
|
22
22
|
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
23
23
|
font-size: 14px;
|
|
24
|
-
line
|
|
24
|
+
/* `normal` picks a line box tall enough for the font's ascent +
|
|
25
|
+
* descent so inline span backgrounds fit within a row instead of
|
|
26
|
+
* bleeding into the next. Cell height derives from the probe, so
|
|
27
|
+
* this stays deterministic — just taller. */
|
|
28
|
+
line-height: normal;
|
|
25
29
|
letter-spacing: 0;
|
|
26
|
-
/*
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
/* UA `th`/`caption { text-align: center }` (preflight leaves them):
|
|
31
|
-
* center can't land on whole cells, and the engine renders start
|
|
32
|
-
* (specs/table.md). Base layer, so alignment utilities still override
|
|
33
|
-
* (into the blocked path for center/justify, as anywhere else). */
|
|
34
|
-
mono-wind :is(th, caption) {
|
|
35
|
-
text-align: start;
|
|
30
|
+
/* Themable fg / bg pair for the focus-invert default. System
|
|
31
|
+
* colors honor the viewer's color scheme; authors override. */
|
|
32
|
+
--mw-fg: canvastext;
|
|
33
|
+
--mw-bg: canvas;
|
|
36
34
|
}
|
|
37
35
|
|
|
38
36
|
/* Normalize native form controls so they don't borrow browser chrome that
|
|
@@ -49,16 +47,83 @@
|
|
|
49
47
|
appearance: none;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
|
-
/*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
50
|
+
/* Form controls render their value/caret/selection natively — the
|
|
51
|
+
* color-transparent rule below excludes them via `:not()`, so this
|
|
52
|
+
* visible color and themed caret actually stick. */
|
|
53
|
+
mono-wind :is(input, textarea, select) {
|
|
54
|
+
color: var(--mw-fg);
|
|
55
|
+
caret-color: var(--mw-fg);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/* Placeholder at half the element's own color, so it tracks both the
|
|
59
|
+
* theme and the focus-invert. Explicit opacity: Firefox dims its UA
|
|
60
|
+
* placeholder with opacity, which would double with the color mix. */
|
|
61
|
+
mono-wind :is(input, textarea)::placeholder {
|
|
62
|
+
color: color-mix(in srgb, currentcolor 50%, transparent);
|
|
63
|
+
opacity: 1;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* A required <select> still on its empty placeholder option matches
|
|
67
|
+
* :invalid — same placeholder treatment (the :invalid specificity
|
|
68
|
+
* beats the form-control color above; the pair below beats the
|
|
69
|
+
* focus-invert). currentcolor would self-refer here, so the themed
|
|
70
|
+
* colors are spelled out. */
|
|
71
|
+
mono-wind select:invalid {
|
|
72
|
+
color: color-mix(in srgb, var(--mw-fg) 50%, transparent);
|
|
73
|
+
}
|
|
74
|
+
mono-wind select:invalid:focus-visible {
|
|
75
|
+
color: color-mix(in srgb, var(--mw-bg) 50%, transparent);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Single-line controls: never wrap, clip overflow. The one-row
|
|
79
|
+
* floor lives in the tree builder (a CSS min-height on the outer
|
|
80
|
+
* box gives no content-area guarantee once border + padding exceed
|
|
81
|
+
* it). */
|
|
82
|
+
mono-wind :is(input, select) {
|
|
83
|
+
white-space: nowrap;
|
|
84
|
+
overflow: hidden;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/* Textarea: engine controls the size (it auto-grows to fit the
|
|
88
|
+
* value, so scrolling never has anything to reveal) — the native
|
|
89
|
+
* resize handle and scrollbars would drag the box off-grid. `clip`
|
|
90
|
+
* (not `hidden`) so the caret can't scroll the box either: under
|
|
91
|
+
* `leading-*` the last line's half-leading is a phantom scroll
|
|
92
|
+
* range that would shift every line off its row. */
|
|
93
|
+
mono-wind textarea {
|
|
94
|
+
resize: none;
|
|
95
|
+
overflow: clip;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* :focus-visible on ANY element: TUI-native invert. Outlines off
|
|
99
|
+
* (they'd clip against grid glyphs). Where each declaration lands:
|
|
100
|
+
* bg only shows via the grid (engine reads it during [measuring];
|
|
101
|
+
* the light-DOM bg is transparent-locked below); color/caret-color
|
|
102
|
+
* paint on editables (they're the ones exempted from the
|
|
103
|
+
* color-transparent lock), and get grid-mirrored by the engine for
|
|
104
|
+
* everyone else. */
|
|
105
|
+
mono-wind :focus-visible {
|
|
106
|
+
outline: none;
|
|
107
|
+
background-color: var(--mw-fg);
|
|
108
|
+
color: var(--mw-bg);
|
|
109
|
+
caret-color: var(--mw-bg);
|
|
59
110
|
}
|
|
60
111
|
}
|
|
61
112
|
|
|
113
|
+
/* === Modes and selection (engine-owned from here down) =============== */
|
|
114
|
+
|
|
115
|
+
/* select="grid": pass pointer events through non-interactive light-DOM
|
|
116
|
+
* elements so drag lands on the grid <pre> (native drag-selection of
|
|
117
|
+
* the ASCII); interactives opt back into `auto` so clicks still work.
|
|
118
|
+
* (The slot itself is pointer-events: none in the shadow CSS.) */
|
|
119
|
+
mono-wind[select="grid"] * {
|
|
120
|
+
pointer-events: none !important;
|
|
121
|
+
}
|
|
122
|
+
mono-wind[select="grid"]
|
|
123
|
+
:is(a, button, input, select, textarea, label, [tabindex], [role="button"]) {
|
|
124
|
+
pointer-events: auto !important;
|
|
125
|
+
}
|
|
126
|
+
|
|
62
127
|
/* Hide the host until the first layout completes to avoid the flash of raw
|
|
63
128
|
* browser-rendered content (flex without our decorations, elements at their
|
|
64
129
|
* natural sizes). `visibility: hidden` preserves layout & measurability so
|
|
@@ -67,6 +132,24 @@ mono-wind:not([data-mw-ready]) {
|
|
|
67
132
|
visibility: hidden !important;
|
|
68
133
|
}
|
|
69
134
|
|
|
135
|
+
/* Full invert on selection. Both fields spelled out — setting only
|
|
136
|
+
* `color` makes some engines drop the OS default background. Native
|
|
137
|
+
* copy still yields the real text (the DOM the browser reads). The
|
|
138
|
+
* shadow grid mirrors this rule inside element.ts. */
|
|
139
|
+
mono-wind:not([measuring]) *::selection {
|
|
140
|
+
color: var(--mw-bg, canvas) !important;
|
|
141
|
+
background: var(--mw-fg, canvastext) !important;
|
|
142
|
+
}
|
|
143
|
+
/* Focus-invert already flipped the element's colors, so re-flipping in
|
|
144
|
+
* ::selection would land on the same colors as the focused bg and hide
|
|
145
|
+
* the selection. Swap them back for the focused element. */
|
|
146
|
+
mono-wind:not([measuring]) :focus-visible::selection {
|
|
147
|
+
color: var(--mw-fg, canvastext) !important;
|
|
148
|
+
background: var(--mw-bg, canvas) !important;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* === Typography locks and measuring gates ============================ */
|
|
152
|
+
|
|
70
153
|
/* Lock the font on descendants so the grid metrics stay consistent —
|
|
71
154
|
* `!important` because user classes (`.text-2xl` etc.) would otherwise beat
|
|
72
155
|
* these element-selector rules on specificity. */
|
|
@@ -106,6 +189,14 @@ mono-wind:not([measuring]) * {
|
|
|
106
189
|
overflow-wrap: anywhere !important;
|
|
107
190
|
letter-spacing: calc(var(--mw-rls, 0px) + var(--mw-ls) * var(--mw-cw, 1px)) !important;
|
|
108
191
|
line-height: inherit !important;
|
|
192
|
+
/* Backgrounds paint in the grid too, so the light DOM's own bg goes
|
|
193
|
+
* transparent — otherwise it would cover the grid (light DOM sits
|
|
194
|
+
* ON TOP of the grid in the shadow tree so native selection
|
|
195
|
+
* highlights can show through). The engine still reads authored
|
|
196
|
+
* background-color during [measuring] (this rule is off then), so
|
|
197
|
+
* bg-* and focus-invert both make it into the grid paint. */
|
|
198
|
+
background-color: transparent !important;
|
|
199
|
+
text-shadow: none !important;
|
|
109
200
|
/* Inline-element horizontal padding, quantized: the engine writes
|
|
110
201
|
* `--mw-ipl`/`--mw-ipr` (whole cells) on inline elements whose authored
|
|
111
202
|
* padding it reserved in the run; everything else gets 0, so raw
|
|
@@ -117,6 +208,14 @@ mono-wind:not([measuring]) * {
|
|
|
117
208
|
padding-right: calc(var(--mw-ipr, 0) * var(--mw-cw, 1px)) !important;
|
|
118
209
|
}
|
|
119
210
|
|
|
211
|
+
/* Light-DOM text goes invisible so the grid is the only visible copy;
|
|
212
|
+
* form controls opt out because they render their value/caret/selection
|
|
213
|
+
* natively (the tree builder skips their content so the grid doesn't
|
|
214
|
+
* double-render). Events, ARIA, focus, selection all still work. */
|
|
215
|
+
mono-wind:not([measuring]) *:not(input):not(textarea):not(select) {
|
|
216
|
+
color: transparent !important;
|
|
217
|
+
}
|
|
218
|
+
|
|
120
219
|
/* Author-requested `white-space: nowrap` (or `pre`) — the engine sized this
|
|
121
220
|
* box for unwrapped hard lines, so the browser must not wrap either. Wins
|
|
122
221
|
* over the lock above on specificity. */
|
|
@@ -142,6 +241,8 @@ mono-wind:not([measuring]) [data-mw-nowrap][data-mw-clip] {
|
|
|
142
241
|
overflow: hidden !important;
|
|
143
242
|
}
|
|
144
243
|
|
|
244
|
+
/* === Engine-owned geometry =========================================== */
|
|
245
|
+
|
|
145
246
|
/* Every CSS property the engine has taken over on laid-out elements.
|
|
146
247
|
* Gated on the `measuring` attribute so the style reader still sees the
|
|
147
248
|
* authored values during its read pass. Being unlayered already beats all
|
|
@@ -153,7 +254,7 @@ mono-wind:not([measuring]) [data-mw-nowrap][data-mw-clip] {
|
|
|
153
254
|
* Geometry: position/box-sizing/left/top/width/height + min/max — set from
|
|
154
255
|
* the engine-owned --mw-x/y/w/h custom properties.
|
|
155
256
|
*
|
|
156
|
-
* Neutralized: border-width (painted as glyphs by the
|
|
257
|
+
* Neutralized: border-width (painted as glyphs by the shadow grid),
|
|
157
258
|
* margin (position:absolute + margin still nudges the element off-grid).
|
|
158
259
|
*
|
|
159
260
|
* Owned via `--mw-p{t,r,b,l}` (padding) and `--mw-b{t,r,b,l}` (border cells):
|
|
@@ -189,10 +290,12 @@ mono-wind:not([measuring]) [data-mw-laid-out] {
|
|
|
189
290
|
translate: 0 calc(var(--mw-lhs, 0) * var(--mw-ch, 1px)) !important;
|
|
190
291
|
}
|
|
191
292
|
|
|
192
|
-
/* Shared cell geometry for engine-sized boxes —
|
|
193
|
-
* elements
|
|
293
|
+
/* Shared cell geometry for engine-sized boxes — engine-POSITIONED
|
|
294
|
+
* elements, in-flow atomic inline boxes, and in-flow multicol spanners
|
|
295
|
+
* (below). */
|
|
194
296
|
mono-wind:not([measuring]) [data-mw-laid-out],
|
|
195
|
-
mono-wind:not([measuring]) [data-mw-inline-box]
|
|
297
|
+
mono-wind:not([measuring]) [data-mw-inline-box],
|
|
298
|
+
mono-wind:not([measuring]) [data-mw-multicol-flow-span] {
|
|
196
299
|
box-sizing: border-box !important;
|
|
197
300
|
/* Trailing-gap allowance: a tracked box's lines end with a phantom
|
|
198
301
|
* `--mw-ls`-cell gap the engine doesn't count. Give the content box that
|
|
@@ -248,6 +351,10 @@ mono-wind:not([measuring]) [data-mw-inline-box] {
|
|
|
248
351
|
mono-wind:not([measuring]) [data-mw-inline-box] {
|
|
249
352
|
position: relative !important;
|
|
250
353
|
vertical-align: top !important;
|
|
354
|
+
/* Same half-leading cancellation as laid-out elements — without it
|
|
355
|
+
* an inline box's NATIVE ink (a textarea's value under leading-*)
|
|
356
|
+
* sits centered in its line boxes instead of on its rows. */
|
|
357
|
+
translate: 0 calc(var(--mw-lhs, 0) * var(--mw-ch, 1px)) !important;
|
|
251
358
|
}
|
|
252
359
|
|
|
253
360
|
/* Authored `vertical-align: bottom` on an atomic inline box: grid-exact
|
|
@@ -258,6 +365,111 @@ mono-wind:not([measuring]) [data-mw-inline-box][data-mw-vbottom] {
|
|
|
258
365
|
vertical-align: bottom !important;
|
|
259
366
|
}
|
|
260
367
|
|
|
368
|
+
/* Multicol TEXT LEAF (specs/multicol.md "Browser agreement"): native
|
|
369
|
+
* columns driven by the engine's used values — quantized count and gap,
|
|
370
|
+
* sequential fill into the engine-quantized content height — so the
|
|
371
|
+
* browser breaks on exactly the engine's lines and the native text,
|
|
372
|
+
* caret, and selection sit under the grid's glyphs. The orphans/widows
|
|
373
|
+
* initial value of 2 vetoes single-line column endings the engine's
|
|
374
|
+
* model allows (probed: Chromium then breaks [3, 2, 2] where the engine
|
|
375
|
+
* says [3, 3, 1]), so both reset to 1. */
|
|
376
|
+
mono-wind:not([measuring]) [data-mw-multicol] {
|
|
377
|
+
column-count: var(--mw-colc, 1) !important;
|
|
378
|
+
column-width: auto !important;
|
|
379
|
+
column-gap: calc(var(--mw-colg, 0) * var(--mw-cw, 1px)) !important;
|
|
380
|
+
column-fill: auto !important;
|
|
381
|
+
orphans: 1 !important;
|
|
382
|
+
widows: 1 !important;
|
|
383
|
+
/* No trailing-gap carve-out here: it would widen only the LAST column
|
|
384
|
+
* (native columns split the content box equally), so tracked multicol
|
|
385
|
+
* text instead wraps at `width − tracking` engine-side — the exact
|
|
386
|
+
* fit rule the browser applies per column. */
|
|
387
|
+
width: calc(var(--mw-w, 0) * var(--mw-cw, 1px) + 0.03125px) !important;
|
|
388
|
+
padding-right: calc((var(--mw-pr, 0) + var(--mw-br, 0)) * var(--mw-cw, 1px)) !important;
|
|
389
|
+
/* Column-axis reconstruction: the engine's box is TIGHT (each
|
|
390
|
+
* column's last trailing leading trimmed, like single-column leaves),
|
|
391
|
+
* but browsers count FULL line boxes when fragmenting — re-extend by
|
|
392
|
+
* the `--mw-lh − 1` leading rows so every column fits its lines.
|
|
393
|
+
* `--mw-ink` (the host-measured ink overhang — WebKit breaks at ink
|
|
394
|
+
* bottoms, and some fonts draw taller than their line box) plus one
|
|
395
|
+
* layout unit of calc-rounding slack keep the last line's ink inside
|
|
396
|
+
* its column. The extension is under one line box, so no engine fits
|
|
397
|
+
* an extra line, and the extra rows are blank leading — nothing
|
|
398
|
+
* visible moves. */
|
|
399
|
+
height: calc(
|
|
400
|
+
(var(--mw-h, 0) + var(--mw-lh, 1) - 1) * var(--mw-ch, 1px) + var(--mw-ink, 0px) + 0.03125px
|
|
401
|
+
) !important;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/* Paragraph-flow multicol children (specs/multicol.md "Fragmenting
|
|
405
|
+
* text-leaf children"): chrome-less text leaves stay IN FLOW inside the
|
|
406
|
+
* container's native columns so the browser fragments them itself, with
|
|
407
|
+
* engine-quantized margins (native sibling collapsing IS the engine's
|
|
408
|
+
* collapse rule). Width and height stay natural — a chrome-less block's
|
|
409
|
+
* natural height is full line boxes, exactly what fragmentation counts;
|
|
410
|
+
* typography quantization and the color/background locks come from the
|
|
411
|
+
* universal rules, and line-height inherits from the container. */
|
|
412
|
+
mono-wind:not([measuring]) [data-mw-multicol-flow] {
|
|
413
|
+
position: static !important;
|
|
414
|
+
display: block !important;
|
|
415
|
+
box-sizing: border-box !important;
|
|
416
|
+
width: auto !important;
|
|
417
|
+
height: auto !important;
|
|
418
|
+
min-width: 0 !important;
|
|
419
|
+
min-height: 0 !important;
|
|
420
|
+
max-width: none !important;
|
|
421
|
+
max-height: none !important;
|
|
422
|
+
border-width: 0 !important;
|
|
423
|
+
margin-top: calc(var(--mw-mt, 0) * var(--mw-ch, 1px)) !important;
|
|
424
|
+
margin-right: calc(var(--mw-mr, 0) * var(--mw-cw, 1px)) !important;
|
|
425
|
+
margin-bottom: calc(var(--mw-mb, 0) * var(--mw-ch, 1px)) !important;
|
|
426
|
+
margin-left: calc(var(--mw-ml, 0) * var(--mw-cw, 1px)) !important;
|
|
427
|
+
column-span: none !important;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
/* text-indent (specs/cell-model.md): native px would resolve to the
|
|
431
|
+
* root font size, not the cell width, so the transparent light-DOM
|
|
432
|
+
* text drifts out from under the grid's paint. Rewrite it in cells so
|
|
433
|
+
* the two agree — selection ranges land exactly where the glyphs are. */
|
|
434
|
+
mono-wind:not([measuring]) [data-mw-laid-out],
|
|
435
|
+
mono-wind:not([measuring]) [data-mw-multicol-flow] {
|
|
436
|
+
text-indent: calc(var(--mw-ti, 0) * var(--mw-cw, 1px)) !important;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
/* Centered text with uniform odd leftover (specs/cell-model.md "Text
|
|
440
|
+
* alignment"): the browser's fractional centering sits half a cell
|
|
441
|
+
* right of the grid's floor()'d paint — nudge the native copy onto the
|
|
442
|
+
* glyphs. `transform`, not `translate`: the spanner rule owns the
|
|
443
|
+
* latter, and the two compose. */
|
|
444
|
+
mono-wind:not([measuring]) [data-mw-center-nudge] {
|
|
445
|
+
transform: translateX(calc(-0.5 * var(--mw-cw, 1px))) !important;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/* In-flow multicol SPANNER (specs/multicol.md): a normally laid-out box
|
|
449
|
+
* that stays in the native flow so paragraphs fragment around it —
|
|
450
|
+
* engine-forced geometry (the shared rule above), quantized margins,
|
|
451
|
+
* `column-span: all`. The half-leading translate doubles as the
|
|
452
|
+
* containing block for its absolutized descendants (a transformed box
|
|
453
|
+
* contains them like a positioned one). */
|
|
454
|
+
mono-wind:not([measuring]) [data-mw-multicol-flow-span] {
|
|
455
|
+
position: static !important;
|
|
456
|
+
column-span: all !important;
|
|
457
|
+
margin-top: calc(var(--mw-mt, 0) * var(--mw-ch, 1px)) !important;
|
|
458
|
+
margin-right: 0 !important;
|
|
459
|
+
margin-bottom: calc(var(--mw-mb, 0) * var(--mw-ch, 1px)) !important;
|
|
460
|
+
margin-left: calc(var(--mw-ml, 0) * var(--mw-cw, 1px)) !important;
|
|
461
|
+
translate: 0 calc(var(--mw-lhs, 0) * var(--mw-ch, 1px)) !important;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/* Spanner-split paragraph flow trusts the NATIVE balancer per segment
|
|
465
|
+
* (probed pixel-exact in all three engines under quantized inputs):
|
|
466
|
+
* `column-fill: balance` and the natural height replace the
|
|
467
|
+
* fill-to-computed-height reconstruction of the base multicol rule. */
|
|
468
|
+
mono-wind:not([measuring]) [data-mw-multicol][data-mw-multicol-balance] {
|
|
469
|
+
column-fill: balance !important;
|
|
470
|
+
height: auto !important;
|
|
471
|
+
}
|
|
472
|
+
|
|
261
473
|
/* Author-requested `overflow: hidden` or `overflow: clip` — both keep
|
|
262
474
|
* content inside the engine-allocated box. Uses `clip` (no scroll
|
|
263
475
|
* container, cheaper, more precise semantic for what we're doing). */
|
|
@@ -281,6 +493,8 @@ mono-wind:not([measuring]) [data-mw-inline-inset] {
|
|
|
281
493
|
left: calc(var(--mw-il) * var(--mw-cw, 1px)) !important;
|
|
282
494
|
}
|
|
283
495
|
|
|
496
|
+
/* === Engine state attributes (warnings, hiding, alignment) =========== */
|
|
497
|
+
|
|
284
498
|
/* A container whose direct text was dropped (mixed text + block children,
|
|
285
499
|
* cell-model deviation): the browser would paint that text unpositioned
|
|
286
500
|
* over the laid-out children, so hide it. `visibility` is inherited AND
|