chore: align Vue file conventions (#137)
- document Vue file authoring conventions - rename runtime/example component files to kebab-case - update imports and docs references
This commit is contained in:
@@ -1131,7 +1131,7 @@ describe("screen reader enabled mode", () => {
|
||||
// suite above did not already cover.
|
||||
describe("screen reader: Ink test/screen-reader.tsx parity (component path)", () => {
|
||||
// Ink screen-reader.tsx:78-84 — aria-label-only <Text> (no children) emits the
|
||||
// label. Component path: Text.ts substitutes ariaLabel for an absent default slot.
|
||||
// label. Component path: text.ts substitutes ariaLabel for an absent default slot.
|
||||
test("aria-label-only Text (no children) emits the label", () => {
|
||||
const output = renderToString(
|
||||
defineComponent(() => () => <Text aria-label="Screen-reader only" />),
|
||||
@@ -1141,7 +1141,7 @@ describe("screen reader: Ink test/screen-reader.tsx parity (component path)", ()
|
||||
});
|
||||
|
||||
// Ink screen-reader.tsx:86-92 — aria-label-only <Box> (no children) emits the
|
||||
// label. Component path: Box.ts builds a label text node when SR + ariaLabel and
|
||||
// label. Component path: box.ts builds a label text node when SR + ariaLabel and
|
||||
// there is no default slot.
|
||||
test("aria-label-only Box (no children) emits the label", () => {
|
||||
const output = renderToString(
|
||||
|
||||
@@ -1390,7 +1390,7 @@ test("G16: per-edge borderDimColor=false overrides general borderDimColor", asyn
|
||||
// reserved a 1-cell inset). Ink's render-border.ts has no existence check: it
|
||||
// reads box.topLeft/box.top off `cliBoxes[name]` === undefined and crashes with a
|
||||
// TypeError. We align by throwing a clear, descriptive Error — but do it in the
|
||||
// Box component's RENDER (Box.ts), so the throw is caught by vue-tui's existing
|
||||
// Box component's RENDER (box.ts), so the throw is caught by vue-tui's existing
|
||||
// error boundary (onErrorCaptured → ErrorOverview → exit), exactly like any other
|
||||
// component render error. paint.ts stays a silent `if (!chars) return` fallback
|
||||
// (a raw throw in the post-flush commit would wedge Vue's scheduler).
|
||||
|
||||
@@ -818,7 +818,7 @@ test("two separate <Static> regions both render their items (additive divergence
|
||||
// B04(a) — the render-prop's SECOND arg (`index`) is the ABSOLUTE array index,
|
||||
// stable across INCREMENTAL appends.
|
||||
//
|
||||
// Static.ts renders `items.slice(cursor)` and passes `index = cursor + i`, where
|
||||
// static.ts renders `items.slice(cursor)` and passes `index = cursor + i`, where
|
||||
// the cursor advances to items.length after each batch is written. So an item's
|
||||
// index is its position in the FULL list, never its position within the append
|
||||
// batch. This mirrors Ink's Static, which renders `items.slice(index)` and passes
|
||||
@@ -869,7 +869,7 @@ test("Static render-prop index is the absolute array index across incremental ap
|
||||
|
||||
// B04(b) — vertical padding on the <Static> container paints into the static frame.
|
||||
//
|
||||
// Static.ts merges the caller `style` onto the internal static box, and
|
||||
// static.ts merges the caller `style` onto the internal static box, and
|
||||
// static-channel.ts paints that node via its OWN yoga node (paintIsolated). So
|
||||
// paddingTop/paddingBottom resolve as real layout: they add blank rows above /
|
||||
// below the item inside the painted static frame. Confirmed against the pinned
|
||||
|
||||
@@ -565,7 +565,7 @@ test("strip complete ESC#8 (DECALN) sequence without clipping at a tight width",
|
||||
expect(stripAnsi(output)).toBe("ABC");
|
||||
});
|
||||
|
||||
// Mirrors Ink text.tsx:277-283 ("strip complete ESC control sequences with
|
||||
// Mirrors Ink Text.tsx:277-283 ("strip complete ESC control sequences with
|
||||
// intermediates"). The existing ESC#8-only test above misses the ESC-c (RIS, full
|
||||
// terminal reset) leg: sanitizeAnsi must strip BOTH the intermediate-byte ESC#8 and
|
||||
// the bare ESC c so neither leaks into the painted frame, leaving the visible "ABC".
|
||||
|
||||
Reference in New Issue
Block a user