@promptctl/rich-js 0.18.0 → 0.19.0
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 +9 -7
- package/dist/core/anchor.d.ts +45 -0
- package/dist/core/anchor.js +39 -0
- package/dist/core/ansi.d.ts +65 -0
- package/dist/core/ansi.js +231 -0
- package/dist/core/box.d.ts +145 -0
- package/dist/core/box.js +372 -0
- package/dist/core/cells.d.ts +192 -0
- package/dist/core/cells.js +334 -0
- package/dist/core/clock.d.ts +48 -0
- package/dist/core/clock.js +42 -0
- package/dist/core/color.d.ts +326 -0
- package/dist/core/color.js +1225 -0
- package/dist/core/console.d.ts +196 -0
- package/dist/core/console.js +596 -0
- package/dist/core/easing.d.ts +86 -0
- package/dist/core/easing.js +171 -0
- package/dist/core/emoji.d.ts +24 -0
- package/dist/core/emoji.js +391 -0
- package/dist/core/env.d.ts +16 -0
- package/dist/core/env.js +16 -0
- package/dist/core/export-html.d.ts +59 -0
- package/dist/core/export-html.js +197 -0
- package/dist/core/export-lines.d.ts +130 -0
- package/dist/core/export-lines.js +159 -0
- package/dist/core/export-svg.d.ts +49 -0
- package/dist/core/export-svg.js +213 -0
- package/dist/core/fnv1a.d.ts +10 -0
- package/dist/core/fnv1a.js +17 -0
- package/dist/core/highlighter.d.ts +33 -0
- package/dist/core/highlighter.js +190 -0
- package/dist/core/json.d.ts +27 -0
- package/dist/core/json.js +53 -0
- package/dist/core/markup.d.ts +140 -0
- package/dist/core/markup.js +654 -0
- package/dist/core/measure.d.ts +27 -0
- package/dist/core/measure.js +67 -0
- package/dist/core/memo.d.ts +19 -0
- package/dist/core/memo.js +34 -0
- package/dist/core/oklch.d.ts +161 -0
- package/dist/core/oklch.js +312 -0
- package/dist/core/osc8.d.ts +68 -0
- package/dist/core/osc8.js +78 -0
- package/dist/core/paint.d.ts +107 -0
- package/dist/core/paint.js +150 -0
- package/dist/core/place.d.ts +30 -0
- package/dist/core/place.js +49 -0
- package/dist/core/pretty.d.ts +247 -0
- package/dist/core/pretty.js +906 -0
- package/dist/core/protocol.d.ts +305 -0
- package/dist/core/protocol.js +183 -0
- package/dist/core/render.d.ts +87 -0
- package/dist/core/render.js +105 -0
- package/dist/core/segment.d.ts +162 -0
- package/dist/core/segment.js +488 -0
- package/dist/core/spinnerData.d.ts +12 -0
- package/dist/core/spinnerData.js +117 -0
- package/dist/core/strip.d.ts +152 -0
- package/dist/core/strip.js +326 -0
- package/dist/core/style.d.ts +189 -0
- package/dist/core/style.js +758 -0
- package/dist/core/subscription.d.ts +12 -0
- package/dist/core/subscription.js +12 -0
- package/dist/core/text.d.ts +283 -0
- package/dist/core/text.js +1097 -0
- package/dist/core/wrap.d.ts +46 -0
- package/dist/core/wrap.js +140 -0
- package/dist/host/app.d.ts +133 -0
- package/dist/host/app.js +285 -0
- package/dist/host/host-environment.d.ts +26 -0
- package/dist/host/host-environment.js +44 -0
- package/dist/host/index.d.ts +6 -0
- package/dist/host/index.js +3 -0
- package/dist/host/terminal-host.d.ts +180 -0
- package/dist/host/terminal-host.js +186 -0
- package/dist/index.d.ts +98 -0
- package/dist/index.js +114 -0
- package/dist/node/prompt.d.ts +34 -0
- package/dist/node/prompt.js +51 -0
- package/dist/node/save.d.ts +18 -0
- package/dist/node/save.js +24 -0
- package/dist/node/terminal-host.d.ts +114 -0
- package/dist/node/terminal-host.js +227 -0
- package/dist/node/traceback.d.ts +38 -0
- package/dist/node/traceback.js +98 -0
- package/dist/renderables/align.d.ts +16 -0
- package/dist/renderables/align.js +26 -0
- package/dist/renderables/columns.d.ts +77 -0
- package/dist/renderables/columns.js +191 -0
- package/dist/renderables/constrain.d.ts +15 -0
- package/dist/renderables/constrain.js +31 -0
- package/dist/renderables/effect.d.ts +98 -0
- package/dist/renderables/effect.js +160 -0
- package/dist/renderables/embed.d.ts +107 -0
- package/dist/renderables/embed.js +160 -0
- package/dist/renderables/flexStrip.d.ts +41 -0
- package/dist/renderables/flexStrip.js +200 -0
- package/dist/renderables/group.d.ts +14 -0
- package/dist/renderables/group.js +22 -0
- package/dist/renderables/layout.d.ts +75 -0
- package/dist/renderables/layout.js +223 -0
- package/dist/renderables/live.d.ts +74 -0
- package/dist/renderables/live.js +188 -0
- package/dist/renderables/markdown.d.ts +38 -0
- package/dist/renderables/markdown.js +587 -0
- package/dist/renderables/padding.d.ts +59 -0
- package/dist/renderables/padding.js +147 -0
- package/dist/renderables/panel.d.ts +114 -0
- package/dist/renderables/panel.js +303 -0
- package/dist/renderables/progress.d.ts +178 -0
- package/dist/renderables/progress.js +362 -0
- package/dist/renderables/progressBar.d.ts +31 -0
- package/dist/renderables/progressBar.js +64 -0
- package/dist/renderables/prompt.d.ts +71 -0
- package/dist/renderables/prompt.js +165 -0
- package/dist/renderables/ratio.d.ts +123 -0
- package/dist/renderables/ratio.js +213 -0
- package/dist/renderables/rule.d.ts +26 -0
- package/dist/renderables/rule.js +86 -0
- package/dist/renderables/spinner.d.ts +57 -0
- package/dist/renderables/spinner.js +103 -0
- package/dist/renderables/status.d.ts +29 -0
- package/dist/renderables/status.js +46 -0
- package/dist/renderables/syntax.d.ts +65 -0
- package/dist/renderables/syntax.js +166 -0
- package/dist/renderables/table.d.ts +232 -0
- package/dist/renderables/table.js +973 -0
- package/dist/renderables/traceback.d.ts +32 -0
- package/dist/renderables/traceback.js +279 -0
- package/dist/renderables/tree.d.ts +76 -0
- package/dist/renderables/tree.js +177 -0
- package/dist/renderables/viewport.d.ts +114 -0
- package/dist/renderables/viewport.js +196 -0
- package/dist/template-bindings/color-funcs.d.ts +109 -0
- package/dist/template-bindings/color-funcs.js +243 -0
- package/dist/template-bindings/helpers.d.ts +26 -0
- package/dist/template-bindings/helpers.js +33 -0
- package/dist/template-bindings/index.d.ts +119 -0
- package/dist/template-bindings/index.js +162 -0
- package/dist/template-bindings/palette-funcs.d.ts +96 -0
- package/dist/template-bindings/palette-funcs.js +145 -0
- package/dist/template-bindings/style-funcs.d.ts +28 -0
- package/dist/template-bindings/style-funcs.js +157 -0
- package/dist/themes/buildPalette.d.ts +57 -0
- package/dist/themes/buildPalette.js +100 -0
- package/dist/themes/colorMath.d.ts +94 -0
- package/dist/themes/colorMath.js +280 -0
- package/dist/themes/colorRef.d.ts +36 -0
- package/dist/themes/colorRef.js +78 -0
- package/dist/themes/data/ansi-tables.d.ts +14 -0
- package/dist/themes/data/ansi-tables.js +49 -0
- package/dist/themes/data/atom-one-dark.d.ts +3 -0
- package/dist/themes/data/atom-one-dark.js +177 -0
- package/dist/themes/data/atom-one-light.d.ts +3 -0
- package/dist/themes/data/atom-one-light.js +177 -0
- package/dist/themes/data/catppuccin-frappe.d.ts +3 -0
- package/dist/themes/data/catppuccin-frappe.js +177 -0
- package/dist/themes/data/catppuccin-latte.d.ts +3 -0
- package/dist/themes/data/catppuccin-latte.js +177 -0
- package/dist/themes/data/catppuccin-macchiato.d.ts +3 -0
- package/dist/themes/data/catppuccin-macchiato.js +177 -0
- package/dist/themes/data/catppuccin-mocha.d.ts +3 -0
- package/dist/themes/data/catppuccin-mocha.js +177 -0
- package/dist/themes/data/cyberpunk.d.ts +17 -0
- package/dist/themes/data/cyberpunk.js +193 -0
- package/dist/themes/data/default.d.ts +3 -0
- package/dist/themes/data/default.js +160 -0
- package/dist/themes/data/dracula.d.ts +3 -0
- package/dist/themes/data/dracula.js +177 -0
- package/dist/themes/data/flexoki.d.ts +3 -0
- package/dist/themes/data/flexoki.js +177 -0
- package/dist/themes/data/gruvbox.d.ts +3 -0
- package/dist/themes/data/gruvbox.js +177 -0
- package/dist/themes/data/index.d.ts +35 -0
- package/dist/themes/data/index.js +64 -0
- package/dist/themes/data/monokai.d.ts +3 -0
- package/dist/themes/data/monokai.js +177 -0
- package/dist/themes/data/nord.d.ts +3 -0
- package/dist/themes/data/nord.js +177 -0
- package/dist/themes/data/rose-pine-dawn.d.ts +3 -0
- package/dist/themes/data/rose-pine-dawn.js +177 -0
- package/dist/themes/data/rose-pine-moon.d.ts +3 -0
- package/dist/themes/data/rose-pine-moon.js +177 -0
- package/dist/themes/data/rose-pine.d.ts +3 -0
- package/dist/themes/data/rose-pine.js +177 -0
- package/dist/themes/data/solarized-dark.d.ts +3 -0
- package/dist/themes/data/solarized-dark.js +177 -0
- package/dist/themes/data/solarized-light.d.ts +3 -0
- package/dist/themes/data/solarized-light.js +177 -0
- package/dist/themes/data/svg-export.d.ts +3 -0
- package/dist/themes/data/svg-export.js +177 -0
- package/dist/themes/data/textual-ansi.d.ts +3 -0
- package/dist/themes/data/textual-ansi.js +160 -0
- package/dist/themes/data/textual-dark.d.ts +3 -0
- package/dist/themes/data/textual-dark.js +160 -0
- package/dist/themes/data/textual-light.d.ts +3 -0
- package/dist/themes/data/textual-light.js +160 -0
- package/dist/themes/data/tokyo-night.d.ts +3 -0
- package/dist/themes/data/tokyo-night.js +177 -0
- package/dist/themes/data/types.d.ts +31 -0
- package/dist/themes/data/types.js +10 -0
- package/dist/themes/palette.d.ts +45 -0
- package/dist/themes/palette.js +71 -0
- package/dist/themes/ramp.d.ts +70 -0
- package/dist/themes/ramp.js +103 -0
- package/dist/themes/registry.d.ts +44 -0
- package/dist/themes/registry.js +105 -0
- package/dist/themes/terminalThemes.d.ts +49 -0
- package/dist/themes/terminalThemes.js +63 -0
- package/dist/themes/transpose.d.ts +87 -0
- package/dist/themes/transpose.js +138 -0
- package/dist/widgets/button.d.ts +45 -0
- package/dist/widgets/button.js +177 -0
- package/dist/widgets/checkbox.d.ts +38 -0
- package/dist/widgets/checkbox.js +135 -0
- package/dist/widgets/dropdown.d.ts +64 -0
- package/dist/widgets/dropdown.js +416 -0
- package/dist/widgets/event-router.d.ts +71 -0
- package/dist/widgets/event-router.js +629 -0
- package/dist/widgets/focus-manager.d.ts +45 -0
- package/dist/widgets/focus-manager.js +191 -0
- package/dist/widgets/hit.d.ts +64 -0
- package/dist/widgets/hit.js +113 -0
- package/dist/widgets/index.d.ts +20 -0
- package/dist/widgets/index.js +14 -0
- package/dist/widgets/ink.d.ts +22 -0
- package/dist/widgets/ink.js +31 -0
- package/dist/widgets/slider.d.ts +54 -0
- package/dist/widgets/slider.js +247 -0
- package/dist/widgets/static-item.d.ts +34 -0
- package/dist/widgets/static-item.js +54 -0
- package/dist/widgets/text-input.d.ts +283 -0
- package/dist/widgets/text-input.js +1174 -0
- package/dist/widgets/themed-widget.d.ts +20 -0
- package/dist/widgets/themed-widget.js +89 -0
- package/dist/widgets/toggle.d.ts +41 -0
- package/dist/widgets/toggle.js +157 -0
- package/dist/widgets/types.d.ts +87 -0
- package/dist/widgets/types.js +30 -0
- package/dist/widgets/widget-app.d.ts +65 -0
- package/dist/widgets/widget-app.js +206 -0
- package/dist/widgets/widget-base.d.ts +42 -0
- package/dist/widgets/widget-base.js +172 -0
- package/package.json +16 -2
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Table — tabular data with headers, borders, auto-sizing, and alignment.
|
|
3
|
+
*/
|
|
4
|
+
import { Segment } from "../core/segment.js";
|
|
5
|
+
import { Style } from "../core/style.js";
|
|
6
|
+
import { Box } from "../core/box.js";
|
|
7
|
+
import { RichText } from "../core/text.js";
|
|
8
|
+
import type { PaddingDimensions } from "./padding.js";
|
|
9
|
+
import type { Renderable, Measurable, OverflowMethod, RenderOptions } from "../core/protocol.js";
|
|
10
|
+
export interface ColumnOptions {
|
|
11
|
+
/** Anything a cell can hold, as Rich's `RenderableType` header is. */
|
|
12
|
+
header?: string | RichText | Renderable;
|
|
13
|
+
footer?: string | RichText | Renderable;
|
|
14
|
+
headerStyle?: string | Style;
|
|
15
|
+
footerStyle?: string | Style;
|
|
16
|
+
style?: string | Style;
|
|
17
|
+
justify?: "left" | "center" | "right" | "full";
|
|
18
|
+
width?: number;
|
|
19
|
+
minWidth?: number;
|
|
20
|
+
maxWidth?: number;
|
|
21
|
+
ratio?: number;
|
|
22
|
+
noWrap?: boolean;
|
|
23
|
+
overflow?: OverflowMethod;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the column's string cells — its header and footer among them — are
|
|
26
|
+
* drawn with the console's highlighter, as Rich's `Column(highlight=)`.
|
|
27
|
+
* `false` for a `Column` built alone; `addColumn` takes the table's.
|
|
28
|
+
*/
|
|
29
|
+
highlight?: boolean;
|
|
30
|
+
}
|
|
31
|
+
export declare class Column {
|
|
32
|
+
private _header;
|
|
33
|
+
private _footer;
|
|
34
|
+
headerStyle: string | Style;
|
|
35
|
+
footerStyle: string | Style;
|
|
36
|
+
style: string | Style;
|
|
37
|
+
justify: "left" | "center" | "right" | "full";
|
|
38
|
+
width: number | undefined;
|
|
39
|
+
minWidth: number | undefined;
|
|
40
|
+
maxWidth: number | undefined;
|
|
41
|
+
ratio: number | undefined;
|
|
42
|
+
noWrap: boolean;
|
|
43
|
+
overflow: OverflowMethod;
|
|
44
|
+
highlight: boolean;
|
|
45
|
+
private _cells;
|
|
46
|
+
constructor(options?: ColumnOptions);
|
|
47
|
+
/**
|
|
48
|
+
* The two stamped cells, stamped on assignment rather than at the constructor.
|
|
49
|
+
* `Table.columns` hands out the live column and both fields are public, so a
|
|
50
|
+
* constructor-only stamp held only until the first `columns[0].footer = mine`
|
|
51
|
+
* — which installed content still owned by the caller into a slot every
|
|
52
|
+
* reader below assumes `embed` has been through. [LAW:parse-dont-validate] The setter
|
|
53
|
+
* is the border, so the guarantee holds for the object's whole lifetime and
|
|
54
|
+
* the constructor is one caller of it rather than the one place it is true.
|
|
55
|
+
*
|
|
56
|
+
* Absent and empty are the same header, and the same footer.
|
|
57
|
+
* [LAW:types-are-the-program] Rich declares `footer: RenderableType = ""`, so
|
|
58
|
+
* a column always has one and `show_footer` alone decides whether it is
|
|
59
|
+
* drawn. Modelling the absence as `undefined` instead made "no column has a
|
|
60
|
+
* footer" a state the render path could ask about — and it did, skipping the
|
|
61
|
+
* row a caller had asked for. `embed` already maps nothing onto empty,
|
|
62
|
+
* which is why the setters take `undefined` rather than defaulting around it.
|
|
63
|
+
*/
|
|
64
|
+
get header(): Renderable & Partial<Measurable>;
|
|
65
|
+
set header(content: ColumnOptions["header"]);
|
|
66
|
+
get footer(): Renderable & Partial<Measurable>;
|
|
67
|
+
set footer(content: ColumnOptions["footer"]);
|
|
68
|
+
get flexible(): boolean;
|
|
69
|
+
/** @internal */
|
|
70
|
+
addCell(cell: Renderable): void;
|
|
71
|
+
/** @internal */
|
|
72
|
+
getCells(): Renderable[];
|
|
73
|
+
copy(): Column;
|
|
74
|
+
}
|
|
75
|
+
export interface TableOptions {
|
|
76
|
+
box?: Box | null;
|
|
77
|
+
title?: string | RichText;
|
|
78
|
+
caption?: string | RichText;
|
|
79
|
+
expand?: boolean;
|
|
80
|
+
showHeader?: boolean;
|
|
81
|
+
showFooter?: boolean;
|
|
82
|
+
showLines?: boolean;
|
|
83
|
+
showEdge?: boolean;
|
|
84
|
+
padding?: PaddingDimensions;
|
|
85
|
+
collapsePadding?: boolean;
|
|
86
|
+
padEdge?: boolean;
|
|
87
|
+
style?: string | Style;
|
|
88
|
+
headerStyle?: string | Style;
|
|
89
|
+
footerStyle?: string | Style;
|
|
90
|
+
borderStyle?: string | Style;
|
|
91
|
+
titleStyle?: string | Style;
|
|
92
|
+
captionStyle?: string | Style;
|
|
93
|
+
titleJustify?: "left" | "center" | "right" | "full";
|
|
94
|
+
captionJustify?: "left" | "center" | "right" | "full";
|
|
95
|
+
width?: number;
|
|
96
|
+
minWidth?: number;
|
|
97
|
+
rowStyles?: string[];
|
|
98
|
+
/** The `highlight` every column `addColumn` makes takes unless told otherwise (default: `false`). */
|
|
99
|
+
highlight?: boolean;
|
|
100
|
+
}
|
|
101
|
+
export declare class Table implements Renderable, Measurable {
|
|
102
|
+
private _columns;
|
|
103
|
+
private _rows;
|
|
104
|
+
readonly box: Box | null;
|
|
105
|
+
private readonly _title;
|
|
106
|
+
private readonly _caption;
|
|
107
|
+
readonly expand: boolean;
|
|
108
|
+
readonly showHeader: boolean;
|
|
109
|
+
readonly showFooter: boolean;
|
|
110
|
+
readonly showLines: boolean;
|
|
111
|
+
readonly showEdge: boolean;
|
|
112
|
+
readonly padding: [number, number, number, number];
|
|
113
|
+
readonly collapsePadding: boolean;
|
|
114
|
+
readonly padEdge: boolean;
|
|
115
|
+
readonly style: string | Style;
|
|
116
|
+
readonly headerStyle: string | Style;
|
|
117
|
+
readonly footerStyle: string | Style;
|
|
118
|
+
readonly borderStyle: string | Style;
|
|
119
|
+
readonly titleStyle: string | Style;
|
|
120
|
+
readonly captionStyle: string | Style;
|
|
121
|
+
readonly titleJustify: "left" | "center" | "right" | "full";
|
|
122
|
+
readonly captionJustify: "left" | "center" | "right" | "full";
|
|
123
|
+
readonly tableWidth: number | undefined;
|
|
124
|
+
readonly minWidth: number | undefined;
|
|
125
|
+
readonly rowStyles: string[];
|
|
126
|
+
readonly highlight: boolean;
|
|
127
|
+
get title(): (Renderable & Measurable) | undefined;
|
|
128
|
+
get caption(): (Renderable & Measurable) | undefined;
|
|
129
|
+
constructor(options?: TableOptions);
|
|
130
|
+
get columns(): Column[];
|
|
131
|
+
get rowCount(): number;
|
|
132
|
+
addColumn(header?: ColumnOptions["header"], options?: ColumnOptions): this;
|
|
133
|
+
addRow(...cells: unknown[]): this;
|
|
134
|
+
addSection(): this;
|
|
135
|
+
render(rawOptions: RenderOptions): Iterable<Segment>;
|
|
136
|
+
/**
|
|
137
|
+
* [LAW:one-source-of-truth] Both ends of the range are widths the geometry
|
|
138
|
+
* actually produced — the maximum from the demands as they stand, the
|
|
139
|
+
* minimum from the same layout with every column asking for its minimum.
|
|
140
|
+
* Neither end stretches or fills into an offer: both only spend cells an
|
|
141
|
+
* offer happens to leave over, and a renderable reports the width its content
|
|
142
|
+
* wants rather than the width it was offered. A declared `width` is not an
|
|
143
|
+
* offer, and the maximum reports it. Letting either in made the table measure
|
|
144
|
+
* `Infinity` against an unbounded offer, where `withBoundedWidth` needs a
|
|
145
|
+
* natural width to fall back on — an expanding table, and an empty
|
|
146
|
+
* `Table.grid()`.
|
|
147
|
+
* Neither can exceed the width offered and the tighter request cannot exceed
|
|
148
|
+
* the looser one, so the range cannot invert. Deriving the minimum from raw
|
|
149
|
+
* column and padding counts instead is what used to return
|
|
150
|
+
* `{minimum: 6, maximum: 1}` at `maxWidth: 1` — a floor above its own ceiling.
|
|
151
|
+
*/
|
|
152
|
+
measure(rawOptions: RenderOptions): {
|
|
153
|
+
minimum: number;
|
|
154
|
+
maximum: number;
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* A table with no frame and no header, padded between its columns and never
|
|
158
|
+
* at its edges, so an expanded grid reaches both sides of its width. The
|
|
159
|
+
* reference's `grid` defaults, but for `padding`: Rich's is 0, which runs
|
|
160
|
+
* adjacent columns together, and this port's is one cell to the right.
|
|
161
|
+
*/
|
|
162
|
+
static grid(options?: Omit<TableOptions, "box" | "showHeader" | "showEdge">): Table;
|
|
163
|
+
private _frame;
|
|
164
|
+
/**
|
|
165
|
+
* The width this table lays itself out against: what it was told to be, as a
|
|
166
|
+
* count of cells, never wider than what it was offered.
|
|
167
|
+
*
|
|
168
|
+
* [LAW:one-source-of-truth] `render` and `measure` divide the same two fields
|
|
169
|
+
* and once did it in two places. `measure` bounded the declared width by the
|
|
170
|
+
* offer and `render` preferred it outright, walking past the value
|
|
171
|
+
* `withBoundedWidth` had just resolved — so `new Table({width: Infinity})`
|
|
172
|
+
* with a `{ratio: 1}` column granted that column `UNBOUNDED` cells and threw
|
|
173
|
+
* `RangeError: Invalid string length` out of the top border, at a perfectly
|
|
174
|
+
* ordinary 80-cell offer.
|
|
175
|
+
*/
|
|
176
|
+
private _outerWidth;
|
|
177
|
+
private _geometry;
|
|
178
|
+
/**
|
|
179
|
+
* [LAW:dataflow-not-control-flow] The three ways a column can be sized —
|
|
180
|
+
* declared width, ratio, natural content — differ only in the demand they
|
|
181
|
+
* produce, and `expand` only in its `stretch`. They are resolved once, here, into uniform data, so
|
|
182
|
+
* `layoutTable` runs the same apportionment for every table and no sizing
|
|
183
|
+
* mode gets its own path through the width division.
|
|
184
|
+
*
|
|
185
|
+
* Cells are measured against the width left once the frame is paid, as the
|
|
186
|
+
* reference's `_measure_column` measures them. Padding and the floor are laid
|
|
187
|
+
* over whichever sizing the column has: they are the same for all three.
|
|
188
|
+
*/
|
|
189
|
+
private _columnDemands;
|
|
190
|
+
private _columnSizing;
|
|
191
|
+
/**
|
|
192
|
+
* The padding either side of column `index`'s content, and above and below
|
|
193
|
+
* one row of cells: the reference's `get_padding`. `collapsePadding` lets a
|
|
194
|
+
* cell's left padding and its row's bottom padding merge into the padding
|
|
195
|
+
* beside and below them; `padEdge: false` drops every side that meets the
|
|
196
|
+
* table's edge. Each side is the configured padding unless one of those two
|
|
197
|
+
* reduces it.
|
|
198
|
+
*/
|
|
199
|
+
private _columnPadding;
|
|
200
|
+
private _rowPadding;
|
|
201
|
+
/**
|
|
202
|
+
* Every cell column `index` draws, in draw order.
|
|
203
|
+
*
|
|
204
|
+
* [LAW:one-source-of-truth] The reference's `_get_cells` is the one answer to
|
|
205
|
+
* "which cells belong to this column", and both `_measure_column` and
|
|
206
|
+
* `_render` read it. Enumerating that set a second time inside the width path
|
|
207
|
+
* is how the two ends drifted: the header was measured whether or not
|
|
208
|
+
* `showHeader` drew it, and `col.footer` was never measured at all, so a
|
|
209
|
+
* footer wider than its column — a totals row, exactly — was cut to `…`.
|
|
210
|
+
* A flag is the whole membership rule; nothing here asks after content.
|
|
211
|
+
*/
|
|
212
|
+
private _columnCells;
|
|
213
|
+
/**
|
|
214
|
+
* The widest any cell in a column draws, and the narrowest the column can be
|
|
215
|
+
* without cutting one — the reference's `_measure_column` — or `undefined`
|
|
216
|
+
* when the column has no cell to measure. Zero is a column whose cells draw
|
|
217
|
+
* nothing — a gutter asks for its padding and nothing else — and is not the
|
|
218
|
+
* same answer. [LAW:types-are-the-program]
|
|
219
|
+
*/
|
|
220
|
+
private _cellRange;
|
|
221
|
+
/**
|
|
222
|
+
* A natural width held to the column's own `minWidth`/`maxWidth`.
|
|
223
|
+
*
|
|
224
|
+
* A bound is a count of cells, read by the rule every width is read by: NaN
|
|
225
|
+
* and a negative are zero cells, so a NaN floor bounds nothing and a NaN
|
|
226
|
+
* ceiling is a ceiling of zero, as `width: NaN` is. A bare `Math.max` returns
|
|
227
|
+
* NaN instead, and the column vanishes. [LAW:one-source-of-truth]
|
|
228
|
+
*/
|
|
229
|
+
private _bounded;
|
|
230
|
+
private _renderRow;
|
|
231
|
+
private _renderTitle;
|
|
232
|
+
}
|