@vincemakes/kiso-tui-cells 0.21.0 → 0.21.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/approval-panel.js +13 -6
- package/dist/components.js +1 -1
- package/dist/strings.js +2 -2
- package/dist/width.d.ts +1 -1
- package/dist/width.js +2 -2
- package/package.json +1 -1
package/dist/approval-panel.js
CHANGED
|
@@ -140,7 +140,7 @@ function segmentRisk(segment) {
|
|
|
140
140
|
if (!letters.includes("r") || !letters.includes("f"))
|
|
141
141
|
return null;
|
|
142
142
|
const targets = words.slice(1).filter((w) => !/^-/.test(w));
|
|
143
|
-
return targets.length === 0 ? "
|
|
143
|
+
return targets.length === 0 ? "deletes files permanently" : `deletes files permanently (${targets.join(", ")})`;
|
|
144
144
|
}
|
|
145
145
|
if (verb !== "git")
|
|
146
146
|
return null;
|
|
@@ -149,9 +149,9 @@ function segmentRisk(segment) {
|
|
|
149
149
|
// and conflating them would put a red line on the most ordinary command
|
|
150
150
|
// in the product.
|
|
151
151
|
if (sub === "checkout" && words.includes("--"))
|
|
152
|
-
return "
|
|
152
|
+
return "discards your uncommitted changes — unrecoverable";
|
|
153
153
|
if (sub === "reset" && words.includes("--hard"))
|
|
154
|
-
return "
|
|
154
|
+
return "throws away commits and working changes";
|
|
155
155
|
// `git clean -n` is a DRY RUN and is the reason this checks for the f
|
|
156
156
|
// rather than for the command.
|
|
157
157
|
if (sub === "clean") {
|
|
@@ -160,7 +160,7 @@ function segmentRisk(segment) {
|
|
|
160
160
|
.filter((w) => /^-[a-zA-Z]+$/.test(w))
|
|
161
161
|
.join("");
|
|
162
162
|
if (letters.includes("f"))
|
|
163
|
-
return "
|
|
163
|
+
return "deletes untracked files permanently";
|
|
164
164
|
}
|
|
165
165
|
return null;
|
|
166
166
|
}
|
|
@@ -321,8 +321,15 @@ export function panelBlockLayout(view, phase, cursor, W, maxRows, note, safer) {
|
|
|
321
321
|
rows.push(...shown);
|
|
322
322
|
// TUI2-R3v2 ④: the risk hint sits directly under the args, because it
|
|
323
323
|
// is a sentence ABOUT those args — the v4 frame's placement. The warn
|
|
324
|
-
// tint is the palette's existing functional yellow (no new colour)
|
|
325
|
-
//
|
|
324
|
+
// tint is the palette's existing functional yellow (no new colour).
|
|
325
|
+
//
|
|
326
|
+
// DC-42: it used to open with a warning mark, on the argument that
|
|
327
|
+
// the mark carried the warning once NO_COLOR took the tint away. It does not
|
|
328
|
+
// carry anything the sentence does not — "deletes files permanently"
|
|
329
|
+
// IS the warning, and §1.3 gives a symbol its cell only for a fact
|
|
330
|
+
// the words lack. What separates kiso's sentence from the command's
|
|
331
|
+
// own lines survives the strip either way: the args wear the `│`
|
|
332
|
+
// gutter and this row wears the plain two-space indent.
|
|
326
333
|
const risk = view.riskHint;
|
|
327
334
|
if (risk !== undefined && risk !== "")
|
|
328
335
|
rows.push(`${gutter}${cutLine(`${p.warn}${escapeTerminal(risk)}${p.reset}`, Math.max(1, W - 2))}`);
|
package/dist/components.js
CHANGED
package/dist/strings.js
CHANGED
|
@@ -113,7 +113,7 @@ export function uncertainView(name, executionId) {
|
|
|
113
113
|
args: { kind: "text", lines: [executionId] },
|
|
114
114
|
ruleOverride: "an interrupted execution may have applied — rerun it?",
|
|
115
115
|
simpleOptions: ["rerun it", "abandon it"],
|
|
116
|
-
fallbackQuestion:
|
|
116
|
+
fallbackQuestion: `interrupted execution: ${escapeTerminal(name)} (${executionId}) — rerun it? (y)es / (n)o `,
|
|
117
117
|
};
|
|
118
118
|
}
|
|
119
119
|
/**
|
|
@@ -140,7 +140,7 @@ export function unansweredAskView(executionId) {
|
|
|
140
140
|
args: { kind: "text", lines: [executionId] },
|
|
141
141
|
ruleOverride: "an unanswered question was interrupted — ask it again?",
|
|
142
142
|
simpleOptions: ["ask it again", "drop it"],
|
|
143
|
-
fallbackQuestion:
|
|
143
|
+
fallbackQuestion: `an unanswered question was interrupted (${executionId}) — ask it again? (y)es / (n)o `,
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
146
|
/**
|
package/dist/width.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* #16e: "charWidth is the width authority"). The table covers the East
|
|
4
4
|
* Asian Wide/Fullwidth ranges and Emoji_Presentation=Yes; everything
|
|
5
5
|
* else is one column, the box-drawing/brick glyphs █▀▄▞▸ and the text-
|
|
6
|
-
* presentation marks ✓ ✗
|
|
6
|
+
* presentation marks ✓ ✗ ❯ included.
|
|
7
7
|
*
|
|
8
8
|
* This is the compositor's FLOOR, not a cosmetic detail: a glyph scored
|
|
9
9
|
* one column that a terminal draws in two makes a line whose measured
|
package/dist/width.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* #16e: "charWidth is the width authority"). The table covers the East
|
|
4
4
|
* Asian Wide/Fullwidth ranges and Emoji_Presentation=Yes; everything
|
|
5
5
|
* else is one column, the box-drawing/brick glyphs █▀▄▞▸ and the text-
|
|
6
|
-
* presentation marks ✓ ✗
|
|
6
|
+
* presentation marks ✓ ✗ ❯ included.
|
|
7
7
|
*
|
|
8
8
|
* This is the compositor's FLOOR, not a cosmetic detail: a glyph scored
|
|
9
9
|
* one column that a terminal draws in two makes a line whose measured
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
*/
|
|
20
20
|
/** TUI2-R2pre ① — the Emoji_Presentation=Yes code points inside
|
|
21
21
|
* U+2000..U+2BFF. The rest of that span is TEXT presentation and stays
|
|
22
|
-
* one column: ✓ ✗
|
|
22
|
+
* one column: ✓ ✗ ❯ ▞ ▸ and the box-drawing rails are all narrow, and
|
|
23
23
|
* widening any of them would move every card head on the screen. Listed
|
|
24
24
|
* as ranges because that is what the property is — the singles are
|
|
25
25
|
* singles in Unicode too. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vincemakes/kiso-tui-cells",
|
|
3
|
-
"version": "0.21.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"description": "kiso tui-cells — the components cell renderer (components, diff, width, the render slice). Zero runtime dependencies: input is data, output is bytes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|