@h-rig/cli 0.0.6-alpha.89 → 0.0.6-alpha.90
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/bin/build-rig-binaries.js +8 -40
- package/dist/bin/rig.js +12519 -26675
- package/dist/src/app/board.js +74 -693
- package/dist/src/app/drone-ui.js +1 -1
- package/dist/src/app/theme.js +0 -1
- package/dist/src/commands/_async-ui.js +1 -1
- package/dist/src/commands/_authority-runs.d.ts +1 -1
- package/dist/src/commands/_authority-runs.js +12 -2
- package/dist/src/commands/_cli-format.d.ts +1 -10
- package/dist/src/commands/_cli-format.js +2 -5
- package/dist/src/commands/_connection-state.d.ts +1 -11
- package/dist/src/commands/_connection-state.js +5 -50
- package/dist/src/commands/_doctor-checks.js +40 -501
- package/dist/src/commands/_help-catalog.js +17 -99
- package/dist/src/commands/_json-output.js +0 -4
- package/dist/src/commands/_operator-view.js +54 -575
- package/dist/src/commands/_pi-frontend.d.ts +0 -27
- package/dist/src/commands/_pi-frontend.js +52 -576
- package/dist/src/commands/_preflight.js +66 -553
- package/dist/src/commands/_server-client.d.ts +0 -33
- package/dist/src/commands/_server-client.js +46 -541
- package/dist/src/commands/_snapshot-upload.js +42 -503
- package/dist/src/commands/_spinner.js +1 -1
- package/dist/src/commands/agent.js +12 -2
- package/dist/src/commands/browser.js +1 -1
- package/dist/src/commands/connect.js +15 -626
- package/dist/src/commands/doctor.js +41 -502
- package/dist/src/commands/github.js +51 -584
- package/dist/src/commands/inbox.js +41 -502
- package/dist/src/commands/init.js +74 -561
- package/dist/src/commands/inspect.js +41 -502
- package/dist/src/commands/run.js +54 -578
- package/dist/src/commands/server.js +163 -692
- package/dist/src/commands/setup.js +46 -507
- package/dist/src/commands/stats.js +58 -601
- package/dist/src/commands/task-run-driver.js +58 -509
- package/dist/src/commands/task.js +110 -729
- package/dist/src/commands.js +237 -1112
- package/dist/src/index.js +244 -1123
- package/dist/src/launcher.js +0 -4
- package/package.json +9 -13
- package/dist/src/app-opentui/adapters/command.d.ts +0 -2
- package/dist/src/app-opentui/adapters/command.js +0 -329
- package/dist/src/app-opentui/adapters/common.d.ts +0 -56
- package/dist/src/app-opentui/adapters/common.js +0 -153
- package/dist/src/app-opentui/adapters/doctor.d.ts +0 -9
- package/dist/src/app-opentui/adapters/doctor.js +0 -1217
- package/dist/src/app-opentui/adapters/family.d.ts +0 -62
- package/dist/src/app-opentui/adapters/family.js +0 -14855
- package/dist/src/app-opentui/adapters/fleet.d.ts +0 -14
- package/dist/src/app-opentui/adapters/fleet.js +0 -1335
- package/dist/src/app-opentui/adapters/inbox.d.ts +0 -43
- package/dist/src/app-opentui/adapters/inbox.js +0 -1944
- package/dist/src/app-opentui/adapters/init.d.ts +0 -11
- package/dist/src/app-opentui/adapters/init.js +0 -2818
- package/dist/src/app-opentui/adapters/inspect.d.ts +0 -52
- package/dist/src/app-opentui/adapters/inspect.js +0 -1455
- package/dist/src/app-opentui/adapters/pi-attach.d.ts +0 -32
- package/dist/src/app-opentui/adapters/pi-attach.js +0 -2101
- package/dist/src/app-opentui/adapters/pi.d.ts +0 -23
- package/dist/src/app-opentui/adapters/pi.js +0 -363
- package/dist/src/app-opentui/adapters/plugin.d.ts +0 -84
- package/dist/src/app-opentui/adapters/plugin.js +0 -544
- package/dist/src/app-opentui/adapters/repo.d.ts +0 -37
- package/dist/src/app-opentui/adapters/repo.js +0 -186
- package/dist/src/app-opentui/adapters/run-detail.d.ts +0 -27
- package/dist/src/app-opentui/adapters/run-detail.js +0 -1441
- package/dist/src/app-opentui/adapters/server.d.ts +0 -48
- package/dist/src/app-opentui/adapters/server.js +0 -1561
- package/dist/src/app-opentui/adapters/tasks.d.ts +0 -64
- package/dist/src/app-opentui/adapters/tasks.js +0 -4524
- package/dist/src/app-opentui/adapters/workspace.d.ts +0 -49
- package/dist/src/app-opentui/adapters/workspace.js +0 -333
- package/dist/src/app-opentui/autocomplete.d.ts +0 -20
- package/dist/src/app-opentui/autocomplete.js +0 -578
- package/dist/src/app-opentui/bootstrap.d.ts +0 -11
- package/dist/src/app-opentui/bootstrap.js +0 -27833
- package/dist/src/app-opentui/command-palette.d.ts +0 -3
- package/dist/src/app-opentui/command-palette.js +0 -1038
- package/dist/src/app-opentui/command-pty-host.d.ts +0 -62
- package/dist/src/app-opentui/command-pty-host.js +0 -248
- package/dist/src/app-opentui/drone.d.ts +0 -12
- package/dist/src/app-opentui/drone.js +0 -230
- package/dist/src/app-opentui/events.d.ts +0 -7
- package/dist/src/app-opentui/events.js +0 -28
- package/dist/src/app-opentui/fleet-stats.d.ts +0 -32
- package/dist/src/app-opentui/fleet-stats.js +0 -114
- package/dist/src/app-opentui/focus-manager.d.ts +0 -14
- package/dist/src/app-opentui/focus-manager.js +0 -24
- package/dist/src/app-opentui/index.d.ts +0 -8
- package/dist/src/app-opentui/index.js +0 -5260
- package/dist/src/app-opentui/intent.d.ts +0 -3
- package/dist/src/app-opentui/intent.js +0 -365
- package/dist/src/app-opentui/keymap.d.ts +0 -21
- package/dist/src/app-opentui/keymap.js +0 -1377
- package/dist/src/app-opentui/launch-routing.d.ts +0 -16
- package/dist/src/app-opentui/launch-routing.js +0 -55
- package/dist/src/app-opentui/layout.d.ts +0 -22
- package/dist/src/app-opentui/layout.js +0 -51
- package/dist/src/app-opentui/list-search.d.ts +0 -36
- package/dist/src/app-opentui/list-search.js +0 -130
- package/dist/src/app-opentui/pi-host-child.d.ts +0 -2
- package/dist/src/app-opentui/pi-host-child.js +0 -1299
- package/dist/src/app-opentui/pi-pty-host.d.ts +0 -28
- package/dist/src/app-opentui/pi-pty-host.js +0 -10
- package/dist/src/app-opentui/react/App.d.ts +0 -9
- package/dist/src/app-opentui/react/App.js +0 -3866
- package/dist/src/app-opentui/react/Backdrop.d.ts +0 -5
- package/dist/src/app-opentui/react/Backdrop.js +0 -823
- package/dist/src/app-opentui/react/ChromeHost.d.ts +0 -5
- package/dist/src/app-opentui/react/ChromeHost.js +0 -1539
- package/dist/src/app-opentui/react/SceneFrameView.d.ts +0 -7
- package/dist/src/app-opentui/react/SceneFrameView.js +0 -579
- package/dist/src/app-opentui/react/context.d.ts +0 -17
- package/dist/src/app-opentui/react/context.js +0 -37
- package/dist/src/app-opentui/react/launch.d.ts +0 -2
- package/dist/src/app-opentui/react/launch.js +0 -4897
- package/dist/src/app-opentui/react/nav.d.ts +0 -18
- package/dist/src/app-opentui/react/nav.js +0 -54
- package/dist/src/app-opentui/react/scroll.d.ts +0 -12
- package/dist/src/app-opentui/react/scroll.js +0 -21
- package/dist/src/app-opentui/react/syntax.d.ts +0 -2
- package/dist/src/app-opentui/react/syntax.js +0 -65
- package/dist/src/app-opentui/registry.d.ts +0 -4
- package/dist/src/app-opentui/registry.js +0 -22876
- package/dist/src/app-opentui/remote-link.d.ts +0 -10
- package/dist/src/app-opentui/remote-link.js +0 -47
- package/dist/src/app-opentui/render/ascii-fleet.d.ts +0 -15
- package/dist/src/app-opentui/render/ascii-fleet.js +0 -82
- package/dist/src/app-opentui/render/constants.d.ts +0 -30
- package/dist/src/app-opentui/render/constants.js +0 -64
- package/dist/src/app-opentui/render/graphics.d.ts +0 -40
- package/dist/src/app-opentui/render/graphics.js +0 -713
- package/dist/src/app-opentui/render/hover.d.ts +0 -11
- package/dist/src/app-opentui/render/hover.js +0 -34
- package/dist/src/app-opentui/render/native-host.d.ts +0 -37
- package/dist/src/app-opentui/render/native-host.js +0 -180
- package/dist/src/app-opentui/render/panel-layout.d.ts +0 -38
- package/dist/src/app-opentui/render/panel-layout.js +0 -48
- package/dist/src/app-opentui/render/panels.d.ts +0 -12
- package/dist/src/app-opentui/render/panels.js +0 -288
- package/dist/src/app-opentui/render/preloader.d.ts +0 -10
- package/dist/src/app-opentui/render/preloader.js +0 -166
- package/dist/src/app-opentui/render/scene.d.ts +0 -68
- package/dist/src/app-opentui/render/scene.js +0 -300
- package/dist/src/app-opentui/render/terminal-handoff.d.ts +0 -16
- package/dist/src/app-opentui/render/terminal-handoff.js +0 -14
- package/dist/src/app-opentui/render/text.d.ts +0 -29
- package/dist/src/app-opentui/render/text.js +0 -177
- package/dist/src/app-opentui/render/type-bar.d.ts +0 -15
- package/dist/src/app-opentui/render/type-bar.js +0 -212
- package/dist/src/app-opentui/runtime-resources.d.ts +0 -16
- package/dist/src/app-opentui/runtime-resources.js +0 -62
- package/dist/src/app-opentui/runtime.d.ts +0 -45
- package/dist/src/app-opentui/runtime.js +0 -5232
- package/dist/src/app-opentui/scenes/command.d.ts +0 -3
- package/dist/src/app-opentui/scenes/command.js +0 -118
- package/dist/src/app-opentui/scenes/doctor.d.ts +0 -3
- package/dist/src/app-opentui/scenes/doctor.js +0 -296
- package/dist/src/app-opentui/scenes/error.d.ts +0 -2
- package/dist/src/app-opentui/scenes/error.js +0 -277
- package/dist/src/app-opentui/scenes/family-domains/agent.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/agent.js +0 -349
- package/dist/src/app-opentui/scenes/family-domains/browser.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/browser.js +0 -196
- package/dist/src/app-opentui/scenes/family-domains/dist.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/dist.js +0 -244
- package/dist/src/app-opentui/scenes/family-domains/git.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/git.js +0 -196
- package/dist/src/app-opentui/scenes/family-domains/github.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/github.js +0 -275
- package/dist/src/app-opentui/scenes/family-domains/harness.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/harness.js +0 -153
- package/dist/src/app-opentui/scenes/family-domains/index.d.ts +0 -4
- package/dist/src/app-opentui/scenes/family-domains/index.js +0 -1680
- package/dist/src/app-opentui/scenes/family-domains/kit.d.ts +0 -76
- package/dist/src/app-opentui/scenes/family-domains/kit.js +0 -306
- package/dist/src/app-opentui/scenes/family-domains/profile.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/profile.js +0 -213
- package/dist/src/app-opentui/scenes/family-domains/queue.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/queue.js +0 -147
- package/dist/src/app-opentui/scenes/family-domains/remote.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/remote.js +0 -519
- package/dist/src/app-opentui/scenes/family-domains/review.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/review.js +0 -281
- package/dist/src/app-opentui/scenes/family-domains/setup.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/setup.js +0 -268
- package/dist/src/app-opentui/scenes/family-domains/stats.d.ts +0 -2
- package/dist/src/app-opentui/scenes/family-domains/stats.js +0 -371
- package/dist/src/app-opentui/scenes/family.d.ts +0 -3
- package/dist/src/app-opentui/scenes/family.js +0 -2199
- package/dist/src/app-opentui/scenes/fleet.d.ts +0 -3
- package/dist/src/app-opentui/scenes/fleet.js +0 -766
- package/dist/src/app-opentui/scenes/handoff.d.ts +0 -2
- package/dist/src/app-opentui/scenes/handoff.js +0 -455
- package/dist/src/app-opentui/scenes/help.d.ts +0 -3
- package/dist/src/app-opentui/scenes/help.js +0 -725
- package/dist/src/app-opentui/scenes/inbox.d.ts +0 -3
- package/dist/src/app-opentui/scenes/inbox.js +0 -427
- package/dist/src/app-opentui/scenes/init.d.ts +0 -3
- package/dist/src/app-opentui/scenes/init.js +0 -181
- package/dist/src/app-opentui/scenes/inspect.d.ts +0 -3
- package/dist/src/app-opentui/scenes/inspect.js +0 -794
- package/dist/src/app-opentui/scenes/main.d.ts +0 -3
- package/dist/src/app-opentui/scenes/main.js +0 -332
- package/dist/src/app-opentui/scenes/pi.d.ts +0 -3
- package/dist/src/app-opentui/scenes/pi.js +0 -509
- package/dist/src/app-opentui/scenes/plugin.d.ts +0 -3
- package/dist/src/app-opentui/scenes/plugin.js +0 -487
- package/dist/src/app-opentui/scenes/repo.d.ts +0 -3
- package/dist/src/app-opentui/scenes/repo.js +0 -425
- package/dist/src/app-opentui/scenes/run-detail.d.ts +0 -3
- package/dist/src/app-opentui/scenes/run-detail.js +0 -467
- package/dist/src/app-opentui/scenes/server.d.ts +0 -3
- package/dist/src/app-opentui/scenes/server.js +0 -378
- package/dist/src/app-opentui/scenes/tasks.d.ts +0 -3
- package/dist/src/app-opentui/scenes/tasks.js +0 -768
- package/dist/src/app-opentui/scenes/workspace.d.ts +0 -3
- package/dist/src/app-opentui/scenes/workspace.js +0 -427
- package/dist/src/app-opentui/selectable.d.ts +0 -19
- package/dist/src/app-opentui/selectable.js +0 -80
- package/dist/src/app-opentui/state.d.ts +0 -4
- package/dist/src/app-opentui/state.js +0 -399
- package/dist/src/app-opentui/surface-catalog.d.ts +0 -20
- package/dist/src/app-opentui/surface-catalog.js +0 -542
- package/dist/src/app-opentui/theme.d.ts +0 -59
- package/dist/src/app-opentui/theme.js +0 -142
- package/dist/src/app-opentui/types.d.ts +0 -313
- package/dist/src/app-opentui/types.js +0 -1
- package/dist/src/commands/_server-events.d.ts +0 -26
- package/dist/src/commands/_server-events.js +0 -715
|
@@ -1,166 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
// packages/cli/src/app-opentui/theme.ts
|
|
3
|
-
import {
|
|
4
|
-
bold as otuiBold,
|
|
5
|
-
dim as otuiDim,
|
|
6
|
-
fg as otuiFg,
|
|
7
|
-
t,
|
|
8
|
-
TextAttributes
|
|
9
|
-
} from "@opentui/core";
|
|
10
|
-
var RIG_UI = {
|
|
11
|
-
bg: "#070809",
|
|
12
|
-
bg2: "#0b0c0e",
|
|
13
|
-
panel: "#101115",
|
|
14
|
-
panel2: "#14161b",
|
|
15
|
-
hover: "#181b24",
|
|
16
|
-
glass: "#1e2230",
|
|
17
|
-
border: "#2a2e3a",
|
|
18
|
-
ink: "#f4f5f8",
|
|
19
|
-
ink2: "#c7c9d3",
|
|
20
|
-
ink3: "#9aa0ae",
|
|
21
|
-
ink4: "#787b86",
|
|
22
|
-
lime: "#ccff4d",
|
|
23
|
-
limeDim: "#a9d63f",
|
|
24
|
-
cyan: "#56d8ff",
|
|
25
|
-
cyanDim: "#3f9fbd",
|
|
26
|
-
red: "#ff5d5d",
|
|
27
|
-
yellow: "#ffd24d",
|
|
28
|
-
magenta: "#ff79b0"
|
|
29
|
-
};
|
|
30
|
-
var styles = {
|
|
31
|
-
ink: otuiFg(RIG_UI.ink),
|
|
32
|
-
ink2: otuiFg(RIG_UI.ink2),
|
|
33
|
-
ink3: otuiFg(RIG_UI.ink3),
|
|
34
|
-
ink4: otuiFg(RIG_UI.ink4),
|
|
35
|
-
lime: otuiFg(RIG_UI.lime),
|
|
36
|
-
limeDim: otuiFg(RIG_UI.limeDim),
|
|
37
|
-
cyan: otuiFg(RIG_UI.cyan),
|
|
38
|
-
red: otuiFg(RIG_UI.red),
|
|
39
|
-
yellow: otuiFg(RIG_UI.yellow),
|
|
40
|
-
magenta: otuiFg(RIG_UI.magenta)
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
// packages/cli/src/app-opentui/render/ascii-fleet.ts
|
|
44
|
-
var LEAD_DRONE = [
|
|
45
|
-
" .-=-. .-=-. ",
|
|
46
|
-
" ( !!! ) ( !!! ) ",
|
|
47
|
-
" '-=-'._ _.'-=-' ",
|
|
48
|
-
" '._ _.' ",
|
|
49
|
-
" '=$$$$$$$=.' ",
|
|
50
|
-
" =$$$$$$$$$$$= ",
|
|
51
|
-
" $$$@@@@@@@@@@$$$ ",
|
|
52
|
-
" $$$@@ @@$$$ ",
|
|
53
|
-
" $$@ ? @$$$ ",
|
|
54
|
-
" $$$@ '-' @$$$ ",
|
|
55
|
-
" $$$@@ @@$$$ ",
|
|
56
|
-
" $$$@@@@@@@@@@$$$ ",
|
|
57
|
-
" =$$$$$$$$$$$= ",
|
|
58
|
-
" '=$$$$$$$=.' ",
|
|
59
|
-
" _.' '._ ",
|
|
60
|
-
" .-=-.' '.-=-. ",
|
|
61
|
-
" ( !!! ) ( !!! ) ",
|
|
62
|
-
" '-=-' '-=-' "
|
|
63
|
-
];
|
|
64
|
-
var MINI_DRONE = [
|
|
65
|
-
"(!!!) (!!!)",
|
|
66
|
-
" \\%==%/ ",
|
|
67
|
-
" %%?%% ",
|
|
68
|
-
" /%==%\\ ",
|
|
69
|
-
"(!!!) (!!!)"
|
|
70
|
-
];
|
|
71
|
-
var ROTORS = ["---", "\\\\\\", "|||", "///"];
|
|
72
|
-
var FLEET_GRID_WIDTH = 52;
|
|
73
|
-
var FLEET_GRID_HEIGHT = 27;
|
|
74
|
-
var FLEET = [
|
|
75
|
-
{ art: MINI_DRONE, x: 0, y: 2, amp: 1, speed: 0.05, phase: 0, dx: 1, driftSpeed: 0.02 },
|
|
76
|
-
{ art: MINI_DRONE, x: 39, y: 2, amp: 1, speed: 0.044, phase: 2.1, dx: 1, driftSpeed: 0.017 },
|
|
77
|
-
{ art: MINI_DRONE, x: 1, y: 20, amp: 1, speed: 0.048, phase: 4.2, dx: 1, driftSpeed: 0.023 },
|
|
78
|
-
{ art: MINI_DRONE, x: 38, y: 20, amp: 1, speed: 0.041, phase: 1.3, dx: 1, driftSpeed: 0.015 },
|
|
79
|
-
{ art: LEAD_DRONE, x: 10, y: 5, amp: 2, speed: 0.04, phase: 0, dx: 0, driftSpeed: 0.011 }
|
|
80
|
-
];
|
|
81
|
-
function fleetRows(tick, options = {}) {
|
|
82
|
-
const animate = options.animate ?? true;
|
|
83
|
-
const t2 = animate ? tick : 0;
|
|
84
|
-
const blade = ROTORS[Math.floor(t2 / 4) % ROTORS.length];
|
|
85
|
-
const pulse = Math.sin(t2 * 0.07);
|
|
86
|
-
const eye = pulse > 0.45 ? "@" : pulse > -0.1 ? "o" : ".";
|
|
87
|
-
const grid = Array.from({ length: FLEET_GRID_HEIGHT }, () => Array.from({ length: FLEET_GRID_WIDTH }, () => " "));
|
|
88
|
-
for (const drone of FLEET) {
|
|
89
|
-
const yOffset = drone.y + Math.round(drone.amp * Math.sin(t2 * drone.speed + drone.phase));
|
|
90
|
-
const xOffset = drone.x + Math.round(drone.dx * Math.sin(t2 * drone.driftSpeed + drone.phase));
|
|
91
|
-
for (let row = 0;row < drone.art.length; row += 1) {
|
|
92
|
-
const source = drone.art[row];
|
|
93
|
-
const targetY = yOffset + row;
|
|
94
|
-
if (targetY < 0 || targetY >= FLEET_GRID_HEIGHT)
|
|
95
|
-
continue;
|
|
96
|
-
for (let col = 0;col < source.length; col += 1) {
|
|
97
|
-
let char = source[col];
|
|
98
|
-
if (char === " ")
|
|
99
|
-
continue;
|
|
100
|
-
const targetX = xOffset + col;
|
|
101
|
-
if (targetX < 0 || targetX >= FLEET_GRID_WIDTH)
|
|
102
|
-
continue;
|
|
103
|
-
if (source.slice(col, col + 3) === "!!!") {
|
|
104
|
-
for (let rotorIndex = 0;rotorIndex < 3; rotorIndex += 1) {
|
|
105
|
-
if (targetX + rotorIndex < FLEET_GRID_WIDTH)
|
|
106
|
-
grid[targetY][targetX + rotorIndex] = blade[rotorIndex];
|
|
107
|
-
}
|
|
108
|
-
col += 2;
|
|
109
|
-
continue;
|
|
110
|
-
}
|
|
111
|
-
if (char === "?")
|
|
112
|
-
char = eye;
|
|
113
|
-
grid[targetY][targetX] = char;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
return grid.map((row) => row.join("").replace(/\s+$/, ""));
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
// packages/cli/src/app-opentui/render/preloader.ts
|
|
121
|
-
var PRELOADER_MIN_DURATION_MS = 520;
|
|
122
|
-
var PRELOADER_MAX_DURATION_MS = 5000;
|
|
123
|
-
function maybeStartPreloaderTransition(transition, scene, now = Date.now()) {
|
|
124
|
-
if (transition.scene === scene)
|
|
125
|
-
return;
|
|
126
|
-
transition.scene = scene;
|
|
127
|
-
transition.startedAtMs = now;
|
|
128
|
-
transition.minUntilMs = now + PRELOADER_MIN_DURATION_MS;
|
|
129
|
-
}
|
|
130
|
-
function isPreloaderActive(transition, targetReady, now = Date.now()) {
|
|
131
|
-
if (now < transition.minUntilMs)
|
|
132
|
-
return true;
|
|
133
|
-
if (!targetReady && now - transition.startedAtMs < PRELOADER_MAX_DURATION_MS)
|
|
134
|
-
return true;
|
|
135
|
-
return false;
|
|
136
|
-
}
|
|
137
|
-
function preloaderLine(line, options = {}) {
|
|
138
|
-
return { text: line, bg: RIG_UI.bg, ...options };
|
|
139
|
-
}
|
|
140
|
-
function blockLine(text, leftPad, fg) {
|
|
141
|
-
return preloaderLine(`${" ".repeat(Math.max(0, leftPad))}${text.padEnd(FLEET_GRID_WIDTH)}`, { fg });
|
|
142
|
-
}
|
|
143
|
-
function renderAsciiPreloaderFrame(scene, layout, tick) {
|
|
144
|
-
const sprite = fleetRows(tick);
|
|
145
|
-
const leftPad = Math.max(0, Math.floor((layout.width - FLEET_GRID_WIDTH) / 2));
|
|
146
|
-
const blank = () => preloaderLine("");
|
|
147
|
-
const body = [
|
|
148
|
-
...sprite.map((text, index) => blockLine(text, leftPad, index >= 7 && index <= 18 ? RIG_UI.lime : RIG_UI.limeDim))
|
|
149
|
-
];
|
|
150
|
-
const topPadding = Math.max(0, Math.floor((layout.height - body.length) / 2));
|
|
151
|
-
const bottomPadding = Math.max(0, layout.height - body.length - topPadding);
|
|
152
|
-
return {
|
|
153
|
-
scene,
|
|
154
|
-
title: "Preloader",
|
|
155
|
-
lines: [...Array.from({ length: topPadding }, blank), ...body, ...Array.from({ length: bottomPadding }, blank)],
|
|
156
|
-
live: true,
|
|
157
|
-
fullScreen: true,
|
|
158
|
-
hideTypeBar: true,
|
|
159
|
-
footer: { message: "" }
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
export {
|
|
163
|
-
renderAsciiPreloaderFrame,
|
|
164
|
-
maybeStartPreloaderTransition,
|
|
165
|
-
isPreloaderActive
|
|
166
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { type StageLayout } from "../layout";
|
|
2
|
-
import type { AppSceneFrame, AppSceneLine, AppState } from "../types";
|
|
3
|
-
export declare function line(text: string, options?: Omit<AppSceneLine, "text">): AppSceneLine;
|
|
4
|
-
export declare function blank(): AppSceneLine;
|
|
5
|
-
export declare function center(text: string, fg?: string, bold?: boolean): AppSceneLine;
|
|
6
|
-
export declare function deckRow(input: {
|
|
7
|
-
readonly label: string;
|
|
8
|
-
readonly detail: string;
|
|
9
|
-
readonly index?: number;
|
|
10
|
-
readonly active?: boolean;
|
|
11
|
-
readonly activateOnClick?: boolean;
|
|
12
|
-
}): AppSceneLine;
|
|
13
|
-
export declare function kv(label: string, value: string, fg?: string): AppSceneLine;
|
|
14
|
-
/**
|
|
15
|
-
* The canonical selectable row — the one selection-highlight mechanism for the
|
|
16
|
-
* whole shell (the dense tables already do this; this lifts the pattern out of
|
|
17
|
-
* each scene so they converge). A selected row gets the solid left rule
|
|
18
|
-
* (`SELECTION_MARKER`), lime+bold text, and `RIG_UI.glass` as the row `bg` so it
|
|
19
|
-
* paints a raised bar on the opaque panel ground (render/text.ts plumbs `bg` →
|
|
20
|
-
* RGBA). An idle row keeps a same-width blank marker so labels stay
|
|
21
|
-
* column-aligned whether or not a row is selected. `selectableIndex` makes the
|
|
22
|
-
* row clickable/navigable; pass the list index.
|
|
23
|
-
*/
|
|
24
|
-
export declare function selectionLine(input: {
|
|
25
|
-
readonly text: string;
|
|
26
|
-
readonly active: boolean;
|
|
27
|
-
readonly index?: number;
|
|
28
|
-
readonly activateOnClick?: boolean;
|
|
29
|
-
}): AppSceneLine;
|
|
30
|
-
/**
|
|
31
|
-
* A dense-table header row: bold ink heading text on the `RIG_UI.glass` bar, the
|
|
32
|
-
* same raised-bar treatment a selected row gets, so a table's header and its
|
|
33
|
-
* selection share one visual language. Columns are joined with the shared
|
|
34
|
-
* `COLUMN_GUTTER`; pass already-padded column labels.
|
|
35
|
-
*/
|
|
36
|
-
export declare function tableHeaderLine(columns: readonly string[]): AppSceneLine;
|
|
37
|
-
/**
|
|
38
|
-
* A `LABEL value` definition row padded to the shared `LABEL_WIDTH`, the
|
|
39
|
-
* canonical width for kv/deck rows across the shell (scenes had diverged on
|
|
40
|
-
* 10/22/26). The label is upper-cased chrome; the value carries the data tone.
|
|
41
|
-
*/
|
|
42
|
-
export declare function labeledLine(label: string, value: string, fg?: string): AppSceneLine;
|
|
43
|
-
export declare function loadingLine(message?: string): AppSceneLine;
|
|
44
|
-
export declare function emptyLine(message?: string): AppSceneLine;
|
|
45
|
-
export declare function errorLine(message: string): AppSceneLine;
|
|
46
|
-
/**
|
|
47
|
-
* Per-scene preloader shown while a scene's primary data slice is still absent
|
|
48
|
-
* during a `loading` status (#22). Uses the Rig drone mascot — the animated
|
|
49
|
-
* signal-bus fleet sized for a panel body — with a captioned drone underneath,
|
|
50
|
-
* so a slow fetch reads as a live, branded "fetching" state rather than an empty
|
|
51
|
-
* panel. `tick` (from AppState.tick) drives the animation; pass it from the
|
|
52
|
-
* scene. `compact` swaps the full fleet for a single mini drone in tight panels.
|
|
53
|
-
*/
|
|
54
|
-
export declare function loadingRows(label: string, tick?: number, compact?: boolean): AppSceneLine[];
|
|
55
|
-
/**
|
|
56
|
-
* Non-destructive failure banner for a degraded background refresh. Surfaces
|
|
57
|
-
* the error text without wiping the last-known data, and points the operator at
|
|
58
|
-
* the existing refresh/retry deck row below.
|
|
59
|
-
*/
|
|
60
|
-
export declare function errorBanner(message: string, hint?: string): AppSceneLine[];
|
|
61
|
-
/**
|
|
62
|
-
* Typed reader for the background-refresh error string the data adapters write
|
|
63
|
-
* onto `state.data.lastRefreshError` (cleared on a successful refresh).
|
|
64
|
-
*/
|
|
65
|
-
export declare function lastRefreshError(state: AppState): string | undefined;
|
|
66
|
-
export declare function fitSceneLine(input: AppSceneLine, layout: StageLayout): AppSceneLine;
|
|
67
|
-
export declare function fitSceneLines(lines: readonly AppSceneLine[], layout: StageLayout): AppSceneLine[];
|
|
68
|
-
export declare function makeSceneFrame(input: AppSceneFrame): AppSceneFrame;
|
|
@@ -1,300 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
// packages/cli/src/app-opentui/layout.ts
|
|
3
|
-
function visibleWidth(text) {
|
|
4
|
-
return [...text].length;
|
|
5
|
-
}
|
|
6
|
-
function alignText(text, width, align = "left") {
|
|
7
|
-
const length = visibleWidth(text);
|
|
8
|
-
if (length >= width)
|
|
9
|
-
return text;
|
|
10
|
-
const pad = width - length;
|
|
11
|
-
if (align === "right")
|
|
12
|
-
return `${" ".repeat(pad)}${text}`;
|
|
13
|
-
if (align === "center") {
|
|
14
|
-
const left = Math.floor(pad / 2);
|
|
15
|
-
return `${" ".repeat(left)}${text}${" ".repeat(pad - left)}`;
|
|
16
|
-
}
|
|
17
|
-
return text;
|
|
18
|
-
}
|
|
19
|
-
function truncateText(text, width) {
|
|
20
|
-
if (visibleWidth(text) <= width)
|
|
21
|
-
return text;
|
|
22
|
-
if (width <= 1)
|
|
23
|
-
return "\u2026";
|
|
24
|
-
return `${[...text].slice(0, Math.max(0, width - 1)).join("")}\u2026`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// packages/cli/src/app-opentui/theme.ts
|
|
28
|
-
import {
|
|
29
|
-
bold as otuiBold,
|
|
30
|
-
dim as otuiDim,
|
|
31
|
-
fg as otuiFg,
|
|
32
|
-
t,
|
|
33
|
-
TextAttributes
|
|
34
|
-
} from "@opentui/core";
|
|
35
|
-
var RIG_UI = {
|
|
36
|
-
bg: "#070809",
|
|
37
|
-
bg2: "#0b0c0e",
|
|
38
|
-
panel: "#101115",
|
|
39
|
-
panel2: "#14161b",
|
|
40
|
-
hover: "#181b24",
|
|
41
|
-
glass: "#1e2230",
|
|
42
|
-
border: "#2a2e3a",
|
|
43
|
-
ink: "#f4f5f8",
|
|
44
|
-
ink2: "#c7c9d3",
|
|
45
|
-
ink3: "#9aa0ae",
|
|
46
|
-
ink4: "#787b86",
|
|
47
|
-
lime: "#ccff4d",
|
|
48
|
-
limeDim: "#a9d63f",
|
|
49
|
-
cyan: "#56d8ff",
|
|
50
|
-
cyanDim: "#3f9fbd",
|
|
51
|
-
red: "#ff5d5d",
|
|
52
|
-
yellow: "#ffd24d",
|
|
53
|
-
magenta: "#ff79b0"
|
|
54
|
-
};
|
|
55
|
-
var SELECTION_MARKER = "\u258C";
|
|
56
|
-
var SELECTION_MARKER_IDLE = " ";
|
|
57
|
-
var LABEL_WIDTH = 14;
|
|
58
|
-
var COLUMN_GUTTER = " ";
|
|
59
|
-
var styles = {
|
|
60
|
-
ink: otuiFg(RIG_UI.ink),
|
|
61
|
-
ink2: otuiFg(RIG_UI.ink2),
|
|
62
|
-
ink3: otuiFg(RIG_UI.ink3),
|
|
63
|
-
ink4: otuiFg(RIG_UI.ink4),
|
|
64
|
-
lime: otuiFg(RIG_UI.lime),
|
|
65
|
-
limeDim: otuiFg(RIG_UI.limeDim),
|
|
66
|
-
cyan: otuiFg(RIG_UI.cyan),
|
|
67
|
-
red: otuiFg(RIG_UI.red),
|
|
68
|
-
yellow: otuiFg(RIG_UI.yellow),
|
|
69
|
-
magenta: otuiFg(RIG_UI.magenta)
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
// packages/cli/src/app-opentui/drone.ts
|
|
73
|
-
import { RGBA, StyledText, TextAttributes as TextAttributes2 } from "@opentui/core";
|
|
74
|
-
var MINI_DRONE = [
|
|
75
|
-
"(!!!) (!!!)",
|
|
76
|
-
" \\%==%/ ",
|
|
77
|
-
" %%?%% ",
|
|
78
|
-
" /%==%\\ ",
|
|
79
|
-
"(!!!) (!!!)"
|
|
80
|
-
];
|
|
81
|
-
var LEAD_MARK = [
|
|
82
|
-
" .-=-. ",
|
|
83
|
-
"=%%?%%=",
|
|
84
|
-
" '-=-' "
|
|
85
|
-
];
|
|
86
|
-
var BLADE_FRAMES = ["---", "\\\\\\", "|||", "///"];
|
|
87
|
-
var EYE_FRAMES = ["o", "@", "\u2022", "."];
|
|
88
|
-
var COLOR = {
|
|
89
|
-
body: RGBA.fromHex(RIG_UI.lime),
|
|
90
|
-
mini: RGBA.fromHex(RIG_UI.limeDim),
|
|
91
|
-
rotor: RGBA.fromHex(RIG_UI.cyan),
|
|
92
|
-
path: RGBA.fromHex(RIG_UI.cyan),
|
|
93
|
-
eye: RGBA.fromHex(RIG_UI.ink),
|
|
94
|
-
dim: RGBA.fromHex(RIG_UI.ink4),
|
|
95
|
-
ink: RGBA.fromHex(RIG_UI.ink2)
|
|
96
|
-
};
|
|
97
|
-
function bladeForTick(tick, phase = 0) {
|
|
98
|
-
return BLADE_FRAMES[(Math.floor(tick / 3) + phase) % BLADE_FRAMES.length];
|
|
99
|
-
}
|
|
100
|
-
function eyeForTick(tick, phase = 0) {
|
|
101
|
-
const pulse = Math.sin(tick * 0.09 + phase);
|
|
102
|
-
return pulse > 0.55 ? EYE_FRAMES[1] : pulse > 0.1 ? EYE_FRAMES[0] : pulse > -0.45 ? EYE_FRAMES[2] : EYE_FRAMES[3];
|
|
103
|
-
}
|
|
104
|
-
function chunk(text, fg, bold = false, dim = false) {
|
|
105
|
-
let attributes = TextAttributes2.NONE;
|
|
106
|
-
if (bold)
|
|
107
|
-
attributes |= TextAttributes2.BOLD;
|
|
108
|
-
if (dim)
|
|
109
|
-
attributes |= TextAttributes2.DIM;
|
|
110
|
-
return { __isChunk: true, text, fg, ...attributes !== TextAttributes2.NONE ? { attributes } : {} };
|
|
111
|
-
}
|
|
112
|
-
function styledLine(text, colorFor) {
|
|
113
|
-
const chunks = [];
|
|
114
|
-
let run = "";
|
|
115
|
-
let runColor = null;
|
|
116
|
-
const flush = () => {
|
|
117
|
-
if (!run || !runColor)
|
|
118
|
-
return;
|
|
119
|
-
chunks.push(chunk(run, COLOR[runColor], runColor === "body" || runColor === "eye", runColor === "dim"));
|
|
120
|
-
run = "";
|
|
121
|
-
};
|
|
122
|
-
for (const char of text) {
|
|
123
|
-
const next = colorFor(char);
|
|
124
|
-
if (next !== runColor) {
|
|
125
|
-
flush();
|
|
126
|
-
runColor = next;
|
|
127
|
-
}
|
|
128
|
-
run += char;
|
|
129
|
-
}
|
|
130
|
-
flush();
|
|
131
|
-
return new StyledText(chunks.length > 0 ? chunks : [chunk("", COLOR.ink)]);
|
|
132
|
-
}
|
|
133
|
-
function droneColor(char) {
|
|
134
|
-
if (char === "?" || char === "o" || char === "@" || char === "\u2022")
|
|
135
|
-
return "eye";
|
|
136
|
-
if (char === "%" || char === "=")
|
|
137
|
-
return "mini";
|
|
138
|
-
if (char === "$")
|
|
139
|
-
return "body";
|
|
140
|
-
if (char === "(" || char === ")" || char === "/" || char === "\\" || char === "|" || char === "-")
|
|
141
|
-
return "rotor";
|
|
142
|
-
if (char === "\xB7" || char === "\u2022" || char === "'" || char === ".")
|
|
143
|
-
return "path";
|
|
144
|
-
if (char.trim() === "")
|
|
145
|
-
return "dim";
|
|
146
|
-
return "ink";
|
|
147
|
-
}
|
|
148
|
-
function motionColor(char) {
|
|
149
|
-
if (char === "\u25CF" || char === "\u25C6" || char === "\u25C9")
|
|
150
|
-
return "body";
|
|
151
|
-
if (char === "\u2022" || char === "\xB7" || char === "\u2500" || char === "\u2502" || char === "\u2571" || char === "\u2572" || char === "\u256D" || char === "\u256E" || char === "\u2570" || char === "\u256F")
|
|
152
|
-
return "path";
|
|
153
|
-
if (char === "\u258C" || char === "\u2590" || char === "\u2581" || char === "\u2594")
|
|
154
|
-
return "mini";
|
|
155
|
-
return droneColor(char);
|
|
156
|
-
}
|
|
157
|
-
function materializeDrone(lines, tick, phase = 0) {
|
|
158
|
-
const blade = bladeForTick(tick, phase);
|
|
159
|
-
const eye = eyeForTick(tick, phase);
|
|
160
|
-
return lines.map((line) => line.replaceAll("!!!", blade).replaceAll("?", eye));
|
|
161
|
-
}
|
|
162
|
-
function miniDroneLines(tick, align = "left", phase = 0) {
|
|
163
|
-
return materializeDrone(MINI_DRONE, tick, phase).map((text) => ({
|
|
164
|
-
text,
|
|
165
|
-
styledText: styledLine(text, droneColor),
|
|
166
|
-
fg: RIG_UI.limeDim,
|
|
167
|
-
align
|
|
168
|
-
}));
|
|
169
|
-
}
|
|
170
|
-
function brandFleetLines(tick, align = "center") {
|
|
171
|
-
const left = materializeDrone(MINI_DRONE, tick, 0);
|
|
172
|
-
const right = materializeDrone(MINI_DRONE, tick, 2);
|
|
173
|
-
const lead = materializeDrone(LEAD_MARK, tick, 1);
|
|
174
|
-
const packet = ["\xB7", "\u2022", "\u25CF", "\u2022"][Math.floor(tick / 2) % 4];
|
|
175
|
-
const bridge = [
|
|
176
|
-
` ${left[0]} ${lead[0]} ${right[0]}`,
|
|
177
|
-
` ${left[1]} \xB7\u2500\u2500${packet}\u2500\u2500\xB7 ${lead[1]} \xB7\u2500\u2500${packet}\u2500\u2500\xB7 ${right[1]}`,
|
|
178
|
-
` ${left[2]} \xB7' '${lead[2]}' '\xB7 ${right[2]}`,
|
|
179
|
-
` ${left[3]} \u2572 signal bus \u2571 ${right[3]}`,
|
|
180
|
-
` ${left[4]} \xB7\u2500\u2500\u2500${packet}\u2500\u2500\u2500\u2500\u2500\u2500${packet}\u2500\u2500\u2500\xB7 ${right[4]}`
|
|
181
|
-
];
|
|
182
|
-
return bridge.map((text) => ({
|
|
183
|
-
text,
|
|
184
|
-
styledText: styledLine(text, motionColor),
|
|
185
|
-
fg: RIG_UI.limeDim,
|
|
186
|
-
align
|
|
187
|
-
}));
|
|
188
|
-
}
|
|
189
|
-
function actionDrone(tick, phase = 0) {
|
|
190
|
-
const blade = bladeForTick(tick, phase);
|
|
191
|
-
const eye = eyeForTick(tick, phase);
|
|
192
|
-
return `(${blade})\u2572${eye}\u2571(${blade})`;
|
|
193
|
-
}
|
|
194
|
-
function actionDroneLine(tick, text, fg = RIG_UI.ink2) {
|
|
195
|
-
const prefix = actionDrone(tick);
|
|
196
|
-
const content = `${prefix} ${text}`;
|
|
197
|
-
return { text: content, styledText: styledLine(content, motionColor), fg, align: "center" };
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
// packages/cli/src/app-opentui/render/scene.ts
|
|
201
|
-
function line(text, options = {}) {
|
|
202
|
-
return { text, ...options };
|
|
203
|
-
}
|
|
204
|
-
function blank() {
|
|
205
|
-
return { text: "" };
|
|
206
|
-
}
|
|
207
|
-
function center(text, fg = RIG_UI.ink2, bold = false) {
|
|
208
|
-
return { text, fg, bold, align: "center" };
|
|
209
|
-
}
|
|
210
|
-
function deckRow(input) {
|
|
211
|
-
const prefix = input.active ? "\u25B8" : " ";
|
|
212
|
-
const label = input.label.toUpperCase().padEnd(10);
|
|
213
|
-
return line(`${prefix} ${label} ${input.detail}`, {
|
|
214
|
-
fg: input.active ? RIG_UI.lime : RIG_UI.ink2,
|
|
215
|
-
bold: input.active,
|
|
216
|
-
selectableIndex: input.index,
|
|
217
|
-
activateOnClick: input.activateOnClick
|
|
218
|
-
});
|
|
219
|
-
}
|
|
220
|
-
function kv(label, value, fg = RIG_UI.ink2) {
|
|
221
|
-
return line(` ${label.toUpperCase().padEnd(10)} ${value}`, { fg });
|
|
222
|
-
}
|
|
223
|
-
function selectionLine(input) {
|
|
224
|
-
const marker = input.active ? SELECTION_MARKER : SELECTION_MARKER_IDLE;
|
|
225
|
-
return line(`${marker} ${input.text}`, {
|
|
226
|
-
fg: input.active ? RIG_UI.lime : RIG_UI.ink2,
|
|
227
|
-
bold: input.active,
|
|
228
|
-
bg: input.active ? RIG_UI.glass : undefined,
|
|
229
|
-
selectableIndex: input.index,
|
|
230
|
-
activateOnClick: input.activateOnClick
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
function tableHeaderLine(columns) {
|
|
234
|
-
return line(columns.join(COLUMN_GUTTER), { fg: RIG_UI.ink, bold: true, bg: RIG_UI.glass });
|
|
235
|
-
}
|
|
236
|
-
function labeledLine(label, value, fg = RIG_UI.ink2) {
|
|
237
|
-
return line(`${COLUMN_GUTTER}${label.toUpperCase().padEnd(LABEL_WIDTH)}${COLUMN_GUTTER}${value}`, { fg });
|
|
238
|
-
}
|
|
239
|
-
function loadingLine(message = "loading") {
|
|
240
|
-
return line(` \u27F2 ${message}`, { fg: RIG_UI.limeDim });
|
|
241
|
-
}
|
|
242
|
-
function emptyLine(message = "nothing here yet") {
|
|
243
|
-
return line(` ${message}`, { fg: RIG_UI.ink4 });
|
|
244
|
-
}
|
|
245
|
-
function errorLine(message) {
|
|
246
|
-
return line(` ! ${message}`, { fg: RIG_UI.magenta, bold: true });
|
|
247
|
-
}
|
|
248
|
-
function loadingRows(label, tick = 0, compact = false) {
|
|
249
|
-
const mascot = compact ? miniDroneLines(tick, "center") : brandFleetLines(tick, "center");
|
|
250
|
-
return [
|
|
251
|
-
blank(),
|
|
252
|
-
...mascot,
|
|
253
|
-
blank(),
|
|
254
|
-
{ ...actionDroneLine(tick, `loading ${label}\u2026`, RIG_UI.cyan), align: "center" }
|
|
255
|
-
];
|
|
256
|
-
}
|
|
257
|
-
function errorBanner(message, hint) {
|
|
258
|
-
return [
|
|
259
|
-
line(`\u2717 failed to load \u2014 ${message}`, { fg: RIG_UI.red, bold: true }),
|
|
260
|
-
...hint ? [line(` ${hint}`, { fg: RIG_UI.ink3 })] : [],
|
|
261
|
-
line(" select refresh/retry below", { fg: RIG_UI.ink4 }),
|
|
262
|
-
line("", { fg: RIG_UI.ink3 })
|
|
263
|
-
];
|
|
264
|
-
}
|
|
265
|
-
function lastRefreshError(state) {
|
|
266
|
-
const value = state.data.lastRefreshError;
|
|
267
|
-
return typeof value === "string" && value.trim() ? value : undefined;
|
|
268
|
-
}
|
|
269
|
-
function fitSceneLine(input, layout) {
|
|
270
|
-
const fitted = truncateText(input.text, layout.centerWidth);
|
|
271
|
-
return {
|
|
272
|
-
...input,
|
|
273
|
-
text: alignText(fitted, layout.centerWidth, input.align ?? "left")
|
|
274
|
-
};
|
|
275
|
-
}
|
|
276
|
-
function fitSceneLines(lines, layout) {
|
|
277
|
-
return lines.slice(0, layout.centerHeight).map((entry) => fitSceneLine(entry, layout));
|
|
278
|
-
}
|
|
279
|
-
function makeSceneFrame(input) {
|
|
280
|
-
return input;
|
|
281
|
-
}
|
|
282
|
-
export {
|
|
283
|
-
tableHeaderLine,
|
|
284
|
-
selectionLine,
|
|
285
|
-
makeSceneFrame,
|
|
286
|
-
loadingRows,
|
|
287
|
-
loadingLine,
|
|
288
|
-
line,
|
|
289
|
-
lastRefreshError,
|
|
290
|
-
labeledLine,
|
|
291
|
-
kv,
|
|
292
|
-
fitSceneLines,
|
|
293
|
-
fitSceneLine,
|
|
294
|
-
errorLine,
|
|
295
|
-
errorBanner,
|
|
296
|
-
emptyLine,
|
|
297
|
-
deckRow,
|
|
298
|
-
center,
|
|
299
|
-
blank
|
|
300
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { CliRenderer } from "@opentui/core";
|
|
2
|
-
/** Resume the OpenTUI renderer after an external full-screen TUI (native Pi)
|
|
3
|
-
* owned the terminal.
|
|
4
|
-
*
|
|
5
|
-
* A plain `renderer.resume()` diff-renders against a now-stale frame buffer and
|
|
6
|
-
* leaves the external program's screen content behind: OpenTUI's `resume()` only
|
|
7
|
-
* re-runs `setupTerminal` (re-enter alt-screen + clear + force a full repaint)
|
|
8
|
-
* when its internal `pendingSuspendedTerminalSetup` flag is set — and the
|
|
9
|
-
* suspend path used for shelling out does NOT set it, so a plain resume takes
|
|
10
|
-
* the `resumeRenderer` fast path and the screen stays corrupted (Pi's exit
|
|
11
|
-
* banner, a misplaced cursor, the type-bar rule painted at the top).
|
|
12
|
-
*
|
|
13
|
-
* We force the flag so `resume()` does a clean terminal re-setup, then request a
|
|
14
|
-
* full render. The `as`-casts reach two @opentui/core internals; guarded so a
|
|
15
|
-
* version that renames them degrades to a plain resume rather than throwing. */
|
|
16
|
-
export declare function resumeRendererClean(renderer: CliRenderer): void;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
// packages/cli/src/app-opentui/render/terminal-handoff.ts
|
|
3
|
-
function resumeRendererClean(renderer) {
|
|
4
|
-
try {
|
|
5
|
-
renderer.pendingSuspendedTerminalSetup = true;
|
|
6
|
-
} catch {}
|
|
7
|
-
renderer.resume();
|
|
8
|
-
try {
|
|
9
|
-
renderer.requestRender?.();
|
|
10
|
-
} catch {}
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
resumeRendererClean
|
|
14
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { RGBA, TextRenderable, type CliRenderer, type MouseEvent } from "@opentui/core";
|
|
2
|
-
import type { AppSceneLine } from "../types";
|
|
3
|
-
/** The "no background" sentinel: a line with no `bg` paints nothing and lets the
|
|
4
|
-
* opaque panel ground (render/panels.ts) show through. A line WITH a `bg` (e.g.
|
|
5
|
-
* a selected row, set via RIG_UI.glass) paints a raised bar on that ground —
|
|
6
|
-
* this is the one selection-highlight mechanism, plumbed end-to-end here so
|
|
7
|
-
* scenes only set `bg` on the AppSceneLine and never touch RGBA. */
|
|
8
|
-
export declare const TRANSPARENT: RGBA;
|
|
9
|
-
/** A line is clickable when it carries a selectable. The imperative shell stamps
|
|
10
|
-
* `selectableId`/`selectableIndex` via remapSelectableLine; the @opentui/react
|
|
11
|
-
* shell does not, so it only carries `selectable`. Check all three so clicks +
|
|
12
|
-
* hover work identically in both shells. */
|
|
13
|
-
export declare function lineIsClickable(line: AppSceneLine | undefined): boolean;
|
|
14
|
-
/** The stable id used to key hover (and click resolution): the selectable's id,
|
|
15
|
-
* falling back to the imperative-stamped selectableId. Identical in both shells
|
|
16
|
-
* (remapSelectableLine sets selectableId = selectable.id). */
|
|
17
|
-
export declare function lineSelectableId(line: AppSceneLine | undefined): string | undefined;
|
|
18
|
-
/** The bg a line paints: an explicit `bg` (a selected row) always wins;
|
|
19
|
-
* otherwise a clickable row that is currently mouse-hovered gets the hover bar;
|
|
20
|
-
* otherwise transparent so the panel ground shows through. */
|
|
21
|
-
export declare function lineBackground(line: AppSceneLine | undefined): RGBA;
|
|
22
|
-
export type TextLineRenderable = TextRenderable & {
|
|
23
|
-
setRigSceneLine?(line: AppSceneLine | undefined): void;
|
|
24
|
-
};
|
|
25
|
-
export declare function createTextLine(renderer: CliRenderer, id: string, top: number, onLineMouseDown?: (line: AppSceneLine, event: MouseEvent) => void): TextLineRenderable;
|
|
26
|
-
export declare function createFlowTextLine(renderer: CliRenderer, id: string, onLineMouseDown?: (line: AppSceneLine, event: MouseEvent) => void): TextLineRenderable;
|
|
27
|
-
export declare function applyTextLine(renderable: TextLineRenderable, line: AppSceneLine | undefined, top: number, left: number, width: number): void;
|
|
28
|
-
export declare function applyFlowTextLine(renderable: TextLineRenderable, line: AppSceneLine | undefined, width: number): void;
|
|
29
|
-
export declare function clearTextLines(renderables: readonly TextLineRenderable[], from?: number): void;
|