@vincemakes/kiso-tui 0.24.0 → 0.24.1
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/compositor.js +22 -1
- package/package.json +2 -2
package/dist/compositor.js
CHANGED
|
@@ -3119,6 +3119,8 @@ export class Body {
|
|
|
3119
3119
|
}
|
|
3120
3120
|
/** Invariant ①: every emitted line fits the width — a violation is a
|
|
3121
3121
|
* CRASH with the diagnostic, never a silent truncate. */
|
|
3122
|
+
/** DC-48 — the field cut is announced ONCE per session. */
|
|
3123
|
+
#cutOnce = false;
|
|
3122
3124
|
#checked(line, W) {
|
|
3123
3125
|
// Invariant ①b (R3f): a ROW IS ONE PHYSICAL ROW.
|
|
3124
3126
|
//
|
|
@@ -3148,7 +3150,26 @@ export class Body {
|
|
|
3148
3150
|
}
|
|
3149
3151
|
const w = visibleWidth(line);
|
|
3150
3152
|
if (w > W) {
|
|
3151
|
-
|
|
3153
|
+
// DECLARED REVERSAL of "the crash is the contract, not a
|
|
3154
|
+
// symptom" — owner-lane ruling 2026-09-04, after the SECOND
|
|
3155
|
+
// instance of this class in two days: DC-45 in a gate, DC-48 in
|
|
3156
|
+
// the owner's hands. Under test the crash is exactly right and
|
|
3157
|
+
// keeps every tooth; in the field it costs a human the
|
|
3158
|
+
// composer's contents and the whole session, to save them a row
|
|
3159
|
+
// that is one column too wide.
|
|
3160
|
+
//
|
|
3161
|
+
// So: THROW UNDER TEST, CUT IN THE FIELD, and say so. The
|
|
3162
|
+
// notice is once per session — a defect worth reporting is
|
|
3163
|
+
// worth saying once, and a row-by-row complaint on a resize
|
|
3164
|
+
// storm would be its own defect.
|
|
3165
|
+
const why = `kiso-tui invariant ① violated: a line of visible width ${w} > ${W} was about to be emitted — ${JSON.stringify(line.slice(0, 80))}`;
|
|
3166
|
+
if (process.env.KISO_INVARIANTS === "throw")
|
|
3167
|
+
throw new Error(why);
|
|
3168
|
+
if (!this.#cutOnce) {
|
|
3169
|
+
this.#cutOnce = true;
|
|
3170
|
+
queueMicrotask(() => this.notice("kiso-tui: a row was cut to width (invariant ①) · please report"));
|
|
3171
|
+
}
|
|
3172
|
+
return cutLine(line, W);
|
|
3152
3173
|
}
|
|
3153
3174
|
return line;
|
|
3154
3175
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-tui",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.1",
|
|
4
4
|
"description": "kiso tui — the pure terminal layer (cell renderer, dock, raw editor, diff, palette). Zero runtime dependencies: input is data, output is bytes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,6 +35,6 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/vincemakes/kiso/tree/main/packages/tui#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@vincemakes/kiso-tui-cells": "0.24.
|
|
38
|
+
"@vincemakes/kiso-tui-cells": "0.24.1"
|
|
39
39
|
}
|
|
40
40
|
}
|