@kukeon/console 0.0.0-stage → 0.10.0-edge.g21af9f59
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/auth.d.ts +39 -0
- package/dist/bulk-ui.d.ts +49 -0
- package/dist/bulk.d.mts +14 -0
- package/dist/catalog-CBVxh9uQ.js +5005 -0
- package/dist/catalog-url-Dr9e92Yq.js +19 -0
- package/dist/catalog-url.d.mts +4 -0
- package/dist/catalog.d.ts +40 -0
- package/dist/cell-filter.d.ts +10 -0
- package/dist/cell-sidebar.d.ts +26 -0
- package/dist/cells.d.mts +29 -0
- package/dist/cgroup-format.d.ts +17 -0
- package/dist/cgroup.d.ts +4 -0
- package/dist/config-form.d.mts +66 -0
- package/dist/connector-ui-lYy-1M3l.js +2692 -0
- package/dist/connector-ui.d.ts +127 -0
- package/dist/connectors-page-Z7acjRvr.js +1460 -0
- package/dist/connectors-page.d.ts +14 -0
- package/dist/connectors.d.mts +153 -0
- package/dist/container-log.d.ts +11 -0
- package/dist/create.d.ts +11 -0
- package/dist/creation-schema.d.mts +15 -0
- package/dist/daemon.d.ts +24 -0
- package/dist/display-name.d.ts +10 -0
- package/dist/drift-diff.d.ts +4 -0
- package/dist/exec.d.ts +15 -0
- package/dist/extensions.d.ts +111 -0
- package/dist/get-started.d.ts +9 -0
- package/dist/health.d.ts +22 -0
- package/dist/image-format.d.ts +6 -0
- package/dist/image-inventory.d.ts +12 -0
- package/dist/images.d.ts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +5595 -0
- package/dist/initialize-CGmYWoaj.js +146 -0
- package/dist/initialize.d.ts +21 -0
- package/dist/inventory.d.ts +66 -0
- package/dist/lifecycle-policy.d.ts +11 -0
- package/dist/lifecycle.d.ts +24 -0
- package/dist/log-buffer.d.ts +8 -0
- package/dist/main.d.ts +13 -0
- package/dist/majordomo.d.ts +102 -0
- package/dist/manage-nav.d.ts +4 -0
- package/dist/manifest-diff.d.mts +11 -0
- package/dist/merged-values-BhW2-nlA.js +739 -0
- package/dist/merged-values.d.ts +24 -0
- package/dist/network-format.d.ts +30 -0
- package/dist/network.d.ts +13 -0
- package/dist/new-agent-24Fcf0PI.js +201 -0
- package/dist/new-agent.d.ts +27 -0
- package/dist/new-cell-u87hB9wV.js +1985 -0
- package/dist/new-cell.d.ts +29 -0
- package/dist/new-config-B_uf4R4e.js +1541 -0
- package/dist/new-config.d.ts +7 -0
- package/dist/notifications.d.ts +26 -0
- package/dist/onboarding-CPDpnS7K.js +395 -0
- package/dist/onboarding.d.mts +40 -0
- package/dist/panel-cells.d.mts +8 -0
- package/dist/registry-credentials.d.ts +13 -0
- package/dist/relationships.d.mts +12 -0
- package/dist/request.d.ts +16 -0
- package/dist/router.d.ts +12 -0
- package/dist/routes.d.ts +41 -0
- package/dist/schedule-B08uvsJe.js +113 -0
- package/dist/schedule-format.d.mts +9 -0
- package/dist/schedule.d.ts +16 -0
- package/dist/scope-actions.d.ts +9 -0
- package/dist/screens.d.ts +6 -0
- package/dist/secret-form.d.ts +24 -0
- package/dist/settings-nav.d.ts +5 -0
- package/dist/settings-page.d.ts +4 -0
- package/dist/settings-values.d.mts +18 -0
- package/dist/settings.d.ts +50 -0
- package/dist/sidebar-shell.d.ts +55 -0
- package/dist/sources-page-C4t29wxJ.js +423 -0
- package/dist/sources-page.d.ts +5 -0
- package/dist/space-subnets.d.ts +3 -0
- package/dist/style.css +2 -0
- package/dist/team-form.d.mts +56 -0
- package/dist/team-plan-CaBIrof0.js +735 -0
- package/dist/team-plan.d.ts +22 -0
- package/dist/team-wizard.d.ts +8 -0
- package/dist/teams-page-CLdQhhgo.js +2206 -0
- package/dist/teams-page.d.ts +9 -0
- package/dist/teams.d.mts +112 -0
- package/dist/terminal-palette.d.ts +8 -0
- package/dist/terminal.d.ts +98 -0
- package/dist/unread.d.mts +19 -0
- package/dist/use-unread.d.ts +4 -0
- package/dist/user-menu.d.ts +7 -0
- package/dist/views.d.mts +8 -0
- package/dist/workbench.d.ts +16 -0
- package/package.json +45 -4
- package/README.md +0 -3
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { O as e, S as t, St as n, bt as r, w as i } from "./connector-ui-lYy-1M3l.js";
|
|
2
|
+
import { useEffect as a, useRef as o, useSyncExternalStore as s } from "react";
|
|
3
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
var u = "/teams/init", d = {
|
|
5
|
+
phase: "idle",
|
|
6
|
+
completed: 0
|
|
7
|
+
}, f = /* @__PURE__ */ new Set();
|
|
8
|
+
function p(e) {
|
|
9
|
+
d = {
|
|
10
|
+
...d,
|
|
11
|
+
...e
|
|
12
|
+
};
|
|
13
|
+
for (let e of f) e();
|
|
14
|
+
}
|
|
15
|
+
function m(e) {
|
|
16
|
+
return f.add(e), () => {
|
|
17
|
+
f.delete(e);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function h(e) {
|
|
21
|
+
if (!e.teams.length) return "Nothing was applied.";
|
|
22
|
+
let t = (t) => new Set(e.teams.flatMap((e) => e[t])).size, n = (e, t) => `${e} ${t}${e === 1 ? "" : "s"}`, r = e.teams.map((e) => e.team);
|
|
23
|
+
return `Stored ${r.length === 1 ? "team" : "teams"} ${r.join(" and ")}: ${n(t("configs"), "Config")}, ${n(t("blueprints"), "Blueprint")}.`;
|
|
24
|
+
}
|
|
25
|
+
var g;
|
|
26
|
+
function _() {
|
|
27
|
+
return g || (p({
|
|
28
|
+
phase: "pending",
|
|
29
|
+
error: void 0,
|
|
30
|
+
result: void 0
|
|
31
|
+
}), g = (async () => {
|
|
32
|
+
try {
|
|
33
|
+
let e = await t(u, {});
|
|
34
|
+
return p({
|
|
35
|
+
phase: "done",
|
|
36
|
+
result: e,
|
|
37
|
+
completed: d.completed + 1
|
|
38
|
+
}), e;
|
|
39
|
+
} catch (e) {
|
|
40
|
+
let t = i(e);
|
|
41
|
+
p({
|
|
42
|
+
phase: t.code === "already_initialized" ? "conflict" : "idle",
|
|
43
|
+
error: t
|
|
44
|
+
});
|
|
45
|
+
return;
|
|
46
|
+
} finally {
|
|
47
|
+
g = void 0;
|
|
48
|
+
}
|
|
49
|
+
})(), g);
|
|
50
|
+
}
|
|
51
|
+
async function v() {
|
|
52
|
+
if (d.phase !== "conflict") return !1;
|
|
53
|
+
p({
|
|
54
|
+
phase: "reapplying",
|
|
55
|
+
error: void 0
|
|
56
|
+
});
|
|
57
|
+
try {
|
|
58
|
+
return await t(n(r, "reapply"), {}), p({
|
|
59
|
+
phase: "done",
|
|
60
|
+
result: void 0,
|
|
61
|
+
completed: d.completed + 1
|
|
62
|
+
}), !0;
|
|
63
|
+
} catch (e) {
|
|
64
|
+
return p({
|
|
65
|
+
phase: "conflict",
|
|
66
|
+
error: i(e)
|
|
67
|
+
}), !1;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
function y({ onChanged: t, compact: n = !1, subject: i = "the kuke and default teams" }) {
|
|
71
|
+
let u = s(m, () => d), { notify: f } = e(), p = o(u.completed);
|
|
72
|
+
a(() => {
|
|
73
|
+
p.current !== u.completed && (p.current = u.completed, t());
|
|
74
|
+
}, [u.completed, t]);
|
|
75
|
+
async function g() {
|
|
76
|
+
let e = await _();
|
|
77
|
+
e && f({
|
|
78
|
+
key: "team-init",
|
|
79
|
+
tone: "success",
|
|
80
|
+
message: `Initialized. ${h(e)}`
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
async function y() {
|
|
84
|
+
await v() && f({
|
|
85
|
+
key: "team-init",
|
|
86
|
+
tone: "success",
|
|
87
|
+
message: `Team ${r} reapplied.`
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
let { phase: b, error: x, result: S } = u, C = b === "conflict" || b === "reapplying", w = S ? [...S.notes, ...S.teams.flatMap((e) => [...e.missingSecrets, ...e.notes])] : [];
|
|
91
|
+
return /* @__PURE__ */ l("div", {
|
|
92
|
+
className: `initialize-prompt${n ? " is-compact" : ""}`,
|
|
93
|
+
children: [
|
|
94
|
+
!C && b !== "done" && /* @__PURE__ */ c("button", {
|
|
95
|
+
type: "button",
|
|
96
|
+
className: "primary-action initialize-button",
|
|
97
|
+
disabled: b === "pending",
|
|
98
|
+
"aria-busy": b === "pending" || void 0,
|
|
99
|
+
title: `Runs kuke team init: stores ${i}`,
|
|
100
|
+
onClick: () => void g(),
|
|
101
|
+
children: "Initialize"
|
|
102
|
+
}),
|
|
103
|
+
b === "pending" && /* @__PURE__ */ c("p", {
|
|
104
|
+
className: "initialize-status",
|
|
105
|
+
role: "status",
|
|
106
|
+
children: "Initializing… fetching kukeon source"
|
|
107
|
+
}),
|
|
108
|
+
C && /* @__PURE__ */ l("div", {
|
|
109
|
+
className: "initialize-conflict",
|
|
110
|
+
role: "group",
|
|
111
|
+
"aria-label": "Already initialized",
|
|
112
|
+
children: [/* @__PURE__ */ l("p", { children: [/* @__PURE__ */ c("strong", { children: "Already initialized." }), " The kuke team is stored; reapply recomposes it from its stored declaration."] }), /* @__PURE__ */ c("button", {
|
|
113
|
+
type: "button",
|
|
114
|
+
className: "initialize-button",
|
|
115
|
+
disabled: b === "reapplying",
|
|
116
|
+
"aria-busy": b === "reapplying" || void 0,
|
|
117
|
+
onClick: () => void y(),
|
|
118
|
+
children: b === "reapplying" ? "Reapplying…" : "Reapply"
|
|
119
|
+
})]
|
|
120
|
+
}),
|
|
121
|
+
b === "done" && /* @__PURE__ */ c("p", {
|
|
122
|
+
className: "initialize-status",
|
|
123
|
+
role: "status",
|
|
124
|
+
children: S ? `Initialized. ${h(S)}` : "Team kuke reapplied."
|
|
125
|
+
}),
|
|
126
|
+
b === "done" && !n && w.length > 0 && /* @__PURE__ */ c("ul", {
|
|
127
|
+
className: "initialize-notes",
|
|
128
|
+
children: w.map((e) => /* @__PURE__ */ c("li", { children: e }, e))
|
|
129
|
+
}),
|
|
130
|
+
x && b !== "pending" && b !== "reapplying" && (b !== "conflict" || x.code !== "already_initialized") && /* @__PURE__ */ l("div", {
|
|
131
|
+
className: "error",
|
|
132
|
+
role: "alert",
|
|
133
|
+
children: [/* @__PURE__ */ c("strong", { children: x.code === "git_missing" ? "git is not installed" : C ? "Reapply failed" : "Initialization failed" }), /* @__PURE__ */ c("p", { children: x.message })]
|
|
134
|
+
}),
|
|
135
|
+
!n && b !== "done" && /* @__PURE__ */ l("p", {
|
|
136
|
+
className: "description initialize-cli",
|
|
137
|
+
children: [
|
|
138
|
+
"Or run ",
|
|
139
|
+
/* @__PURE__ */ c("code", { children: C ? "kuke team init --reapply" : "kuke team init" }),
|
|
140
|
+
" on the host."
|
|
141
|
+
]
|
|
142
|
+
})
|
|
143
|
+
]
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
export { y as t };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type InitTeam = {
|
|
2
|
+
team: string;
|
|
3
|
+
resources: number;
|
|
4
|
+
configs: string[];
|
|
5
|
+
blueprints: string[];
|
|
6
|
+
missingSecrets: string[];
|
|
7
|
+
notes: string[];
|
|
8
|
+
};
|
|
9
|
+
export type InitResult = {
|
|
10
|
+
teams: InitTeam[];
|
|
11
|
+
notes: string[];
|
|
12
|
+
};
|
|
13
|
+
export declare const codeInitialized = "already_initialized";
|
|
14
|
+
export declare const codeGitMissing = "git_missing";
|
|
15
|
+
export declare const initAPI = "/teams/init";
|
|
16
|
+
export declare function initSummary(result: InitResult): string;
|
|
17
|
+
export declare function InitializePrompt({ onChanged, compact, subject }: {
|
|
18
|
+
onChanged: () => void;
|
|
19
|
+
compact?: boolean;
|
|
20
|
+
subject?: string;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { Resource } from "./request";
|
|
2
|
+
export type SetupStatus = {
|
|
3
|
+
name?: string;
|
|
4
|
+
index?: number;
|
|
5
|
+
state: string;
|
|
6
|
+
error?: string;
|
|
7
|
+
};
|
|
8
|
+
export type RuntimeStatus = {
|
|
9
|
+
state?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
id?: string;
|
|
12
|
+
cgroupReady?: boolean;
|
|
13
|
+
reason?: string;
|
|
14
|
+
message?: string;
|
|
15
|
+
outOfSync?: boolean;
|
|
16
|
+
outOfSyncReason?: string;
|
|
17
|
+
outOfSyncError?: string;
|
|
18
|
+
restartCount?: number;
|
|
19
|
+
exitCode?: number;
|
|
20
|
+
exitSignal?: string;
|
|
21
|
+
createdAt?: string;
|
|
22
|
+
updatedAt?: string;
|
|
23
|
+
startTime?: string;
|
|
24
|
+
finishTime?: string;
|
|
25
|
+
restartTime?: string;
|
|
26
|
+
containers?: RuntimeStatus[];
|
|
27
|
+
repos?: SetupStatus[];
|
|
28
|
+
stages?: SetupStatus[];
|
|
29
|
+
};
|
|
30
|
+
export type Doc = {
|
|
31
|
+
metadata: {
|
|
32
|
+
name: string;
|
|
33
|
+
labels?: Record<string, string>;
|
|
34
|
+
annotations?: Record<string, string>;
|
|
35
|
+
realm?: string;
|
|
36
|
+
space?: string;
|
|
37
|
+
stack?: string;
|
|
38
|
+
};
|
|
39
|
+
status?: RuntimeStatus;
|
|
40
|
+
apiVersion?: string;
|
|
41
|
+
kind?: string;
|
|
42
|
+
[key: string]: unknown;
|
|
43
|
+
};
|
|
44
|
+
export type Row = {
|
|
45
|
+
doc: Doc;
|
|
46
|
+
scope: string[];
|
|
47
|
+
};
|
|
48
|
+
export type Inventory = {
|
|
49
|
+
rows: Row[][];
|
|
50
|
+
failures: string[];
|
|
51
|
+
updatedAt: string;
|
|
52
|
+
configs: Doc[];
|
|
53
|
+
};
|
|
54
|
+
export type ConfigRef = {
|
|
55
|
+
name: string;
|
|
56
|
+
realm: string;
|
|
57
|
+
space?: string;
|
|
58
|
+
stack?: string;
|
|
59
|
+
};
|
|
60
|
+
export type InventoryResource = Resource<Inventory> & {
|
|
61
|
+
daemon: Resource<true>;
|
|
62
|
+
upsertCell: (doc: Doc) => void;
|
|
63
|
+
setConfigAnnotations: (config: ConfigRef, annotations: Record<string, string> | undefined) => void;
|
|
64
|
+
setCellAnnotations: (scope: string[], annotations: Record<string, string> | undefined) => void;
|
|
65
|
+
};
|
|
66
|
+
export declare function useInventory(revision: number, intervalMs: number): InventoryResource;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function availableLifecycleActions(state?: string): ("start" | "stop" | "restart")[];
|
|
2
|
+
export function canConfirmDestructiveAction(action: "kill" | "delete" | "purge", acknowledged: boolean, typedScope: string, fullScope: string): boolean;
|
|
3
|
+
export function requestedPurgeOptions(force?: boolean, cascade?: boolean): { force: boolean; cascade: boolean };
|
|
4
|
+
export function cellRemovalConfirmed(metadataDeleted: unknown, freshReadPresence: boolean | null): boolean;
|
|
5
|
+
export function deleteOperationComplete(result: { metadataDeleted?: boolean; cgroupDeleted?: boolean }): boolean;
|
|
6
|
+
export function purgeOperationComplete(result: { purgeSucceeded?: boolean; metadataDeleted?: boolean; cgroupDeleted?: boolean }): boolean;
|
|
7
|
+
export const systemRealm: string;
|
|
8
|
+
export function parentActionsAllowed(scope: string[]): boolean;
|
|
9
|
+
export function disruptsDaemon(scope: string[]): boolean;
|
|
10
|
+
export function descendantCounts(rows: { scope: string[] }[][], scope: string[]): number[];
|
|
11
|
+
export function cellsWithin(rows: { scope: string[] }[][], scope: string[]): string[][];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type LifecycleAction = "start" | "stop" | "restart" | "kill" | "delete" | "purge";
|
|
2
|
+
export type DestructiveAction = Extract<LifecycleAction, "kill" | "delete" | "purge">;
|
|
3
|
+
export type PurgeOptions = {
|
|
4
|
+
force: boolean;
|
|
5
|
+
cascade: boolean;
|
|
6
|
+
};
|
|
7
|
+
export type LifecycleFeedback = {
|
|
8
|
+
action: LifecycleAction;
|
|
9
|
+
phase: "pending" | "success" | "error";
|
|
10
|
+
message: string;
|
|
11
|
+
};
|
|
12
|
+
export declare function CellRowActions({ scope, state, operation, onAction, }: {
|
|
13
|
+
scope: string[];
|
|
14
|
+
state?: string;
|
|
15
|
+
operation?: LifecycleFeedback;
|
|
16
|
+
onAction: (scope: string[], action: LifecycleAction, state?: string, options?: PurgeOptions) => void;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
export declare function CellLifecycleControls({ scope, state, operation, onAction, compact, }: {
|
|
19
|
+
scope: string[];
|
|
20
|
+
state?: string;
|
|
21
|
+
operation?: LifecycleFeedback;
|
|
22
|
+
onAction: (scope: string[], action: LifecycleAction, state?: string, options?: PurgeOptions) => void;
|
|
23
|
+
compact?: boolean;
|
|
24
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type LogChunk = { source?: string; data?: string; start?: number; next?: number; size?: number; truncated?: boolean; more?: boolean; reset?: boolean };
|
|
2
|
+
export type LogBuffer = { lines: string[]; open: boolean; omitted: boolean; next: number | null; size: number; source: string };
|
|
3
|
+
export const MAX_LINES: number;
|
|
4
|
+
export const MAX_CHARS: number;
|
|
5
|
+
export function emptyLogBuffer(): LogBuffer;
|
|
6
|
+
export function applyChunk(buffer: LogBuffer, chunk: LogChunk, options?: { replace?: boolean; maxLines?: number; maxChars?: number }): LogBuffer;
|
|
7
|
+
export function healthLabel(status?: string): string;
|
|
8
|
+
export function healthTone(status?: string): "ok" | "warning" | "error" | "pending";
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./style.css";
|
|
2
|
+
import { type AuthAdapter } from "./auth";
|
|
3
|
+
import { type Router } from "./router";
|
|
4
|
+
import { type Transport } from "@kukeon/api-client";
|
|
5
|
+
import { type ConsoleExtension } from "./extensions";
|
|
6
|
+
export type ConsoleOptions = {
|
|
7
|
+
transport?: Partial<Transport>;
|
|
8
|
+
router?: Router;
|
|
9
|
+
auth?: AuthAdapter;
|
|
10
|
+
extensions?: ConsoleExtension[];
|
|
11
|
+
};
|
|
12
|
+
export declare function KukeonConsole({ transport, router, auth: adapter, extensions }: ConsoleOptions): import("react").JSX.Element;
|
|
13
|
+
export declare function mountConsole(element: Element, options?: ConsoleOptions): import("react-dom/client").Root;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { type Resource } from "./request";
|
|
2
|
+
import type { InventoryResource, Row, Doc, RuntimeStatus } from "./inventory";
|
|
3
|
+
import type { Schedule, ScheduleStatus } from "./schedule-format.mjs";
|
|
4
|
+
import { type TerminalManager, type Theme } from "./terminal";
|
|
5
|
+
import { type ConnectorStatus } from "./connectors.mjs";
|
|
6
|
+
export declare const harnessLabel = "kukeon.io/harness";
|
|
7
|
+
export declare const majordomoRole = "majordomo";
|
|
8
|
+
export declare const sweepTask = "health-sweep";
|
|
9
|
+
export type { ScheduleStatus } from "./schedule-format.mjs";
|
|
10
|
+
export type ConfigDoc = {
|
|
11
|
+
metadata: {
|
|
12
|
+
name: string;
|
|
13
|
+
realm?: string;
|
|
14
|
+
space?: string;
|
|
15
|
+
stack?: string;
|
|
16
|
+
labels?: Record<string, string>;
|
|
17
|
+
};
|
|
18
|
+
spec?: {
|
|
19
|
+
blueprint?: {
|
|
20
|
+
name?: string;
|
|
21
|
+
};
|
|
22
|
+
schedule?: Schedule;
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
};
|
|
25
|
+
status?: {
|
|
26
|
+
schedule?: ScheduleStatus;
|
|
27
|
+
connectors?: ConnectorStatus[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export declare function isMajordomoConfig(doc: ConfigDoc): boolean;
|
|
31
|
+
export declare function isSweepConfig(doc: ConfigDoc): boolean;
|
|
32
|
+
export declare function isMajordomoCell(doc: Doc): boolean;
|
|
33
|
+
export declare function configScope(doc: ConfigDoc): string[];
|
|
34
|
+
export type Majordomo = {
|
|
35
|
+
configs: Resource<ConfigDoc[]>;
|
|
36
|
+
pairs: ConfigDoc[];
|
|
37
|
+
sweeps: ConfigDoc[];
|
|
38
|
+
cells: Row[];
|
|
39
|
+
cell?: Row;
|
|
40
|
+
panel: Row[];
|
|
41
|
+
active?: Row;
|
|
42
|
+
candidates: Row[];
|
|
43
|
+
unused: ConfigDoc[];
|
|
44
|
+
select: (key: string) => void;
|
|
45
|
+
add: (key: string) => void;
|
|
46
|
+
remove: (key: string) => void;
|
|
47
|
+
};
|
|
48
|
+
export declare function useMajordomo(inventory: InventoryResource, revision: number): Majordomo;
|
|
49
|
+
export declare function oneLine(text: string): string;
|
|
50
|
+
export declare function cellQuestion(scope: string[], status?: RuntimeStatus): string;
|
|
51
|
+
export declare function catalogQuestion(kind: string, scope: string[], state: string): string;
|
|
52
|
+
type Ask = (question: string) => void;
|
|
53
|
+
export declare const AskProvider: import("react").Provider<Ask | null>;
|
|
54
|
+
export declare function AskMajordomo({ question, subject, prominent }: {
|
|
55
|
+
question: string;
|
|
56
|
+
subject: string;
|
|
57
|
+
prominent?: boolean;
|
|
58
|
+
}): import("react").JSX.Element | null;
|
|
59
|
+
export declare const dockWidth: {
|
|
60
|
+
min: number;
|
|
61
|
+
max: number;
|
|
62
|
+
initial: number;
|
|
63
|
+
step: number;
|
|
64
|
+
};
|
|
65
|
+
export declare const mobileMaxWidth = 760;
|
|
66
|
+
export declare const contentMinWidth = 800;
|
|
67
|
+
export declare function useViewportWidth(): number;
|
|
68
|
+
export declare function useMajordomoDock(viewport: number, sidebarWidth: number): {
|
|
69
|
+
open: boolean;
|
|
70
|
+
setOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
71
|
+
width: number;
|
|
72
|
+
effectiveWidth: number;
|
|
73
|
+
maxWidth: number;
|
|
74
|
+
overlay: boolean;
|
|
75
|
+
setWidth: (value: number) => void;
|
|
76
|
+
question: string;
|
|
77
|
+
ask: (text: string) => void;
|
|
78
|
+
clearQuestion: () => void;
|
|
79
|
+
};
|
|
80
|
+
export type MajordomoDock = ReturnType<typeof useMajordomoDock>;
|
|
81
|
+
export declare function needsInitialize(major: Majordomo): boolean;
|
|
82
|
+
export declare function MajordomoSidebarEntry({ major, dock, onChanged }: {
|
|
83
|
+
major: Majordomo;
|
|
84
|
+
dock: MajordomoDock;
|
|
85
|
+
onChanged: () => void;
|
|
86
|
+
}): import("react").JSX.Element;
|
|
87
|
+
export declare function MajordomoRailButton({ major, dock }: {
|
|
88
|
+
major: Majordomo;
|
|
89
|
+
dock: MajordomoDock;
|
|
90
|
+
}): import("react").JSX.Element;
|
|
91
|
+
export declare function MajordomoToolbarButton({ dock }: {
|
|
92
|
+
dock: MajordomoDock;
|
|
93
|
+
}): import("react").JSX.Element;
|
|
94
|
+
export declare function MajordomoPanel({ major, dock, inventory, manager, theme, revision, onChanged }: {
|
|
95
|
+
major: Majordomo;
|
|
96
|
+
dock: MajordomoDock;
|
|
97
|
+
inventory: InventoryResource;
|
|
98
|
+
manager: TerminalManager;
|
|
99
|
+
theme: Theme;
|
|
100
|
+
revision: number;
|
|
101
|
+
onChanged: () => void;
|
|
102
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type DiffRow =
|
|
2
|
+
| { kind: "same" | "changed"; left: string; right: string; leftNo: number; rightNo: number }
|
|
3
|
+
| { kind: "removed"; left: string; leftNo: number; right?: undefined; rightNo?: undefined }
|
|
4
|
+
| { kind: "added"; right: string; rightNo: number; left?: undefined; leftNo?: undefined };
|
|
5
|
+
export type FoldRow = { kind: "fold"; count: number; rows: DiffRow[] };
|
|
6
|
+
export type DisplayRow = DiffRow | FoldRow;
|
|
7
|
+
export function diffLines(left: string, right: string): DiffRow[];
|
|
8
|
+
export function hasChanges(rows: DisplayRow[]): boolean;
|
|
9
|
+
export function compact(rows: DiffRow[], context?: number): DisplayRow[];
|
|
10
|
+
export function expandFold(rows: DisplayRow[], index: number): DisplayRow[];
|
|
11
|
+
export function restartOutcome(changeType?: string): string;
|