@contentful/experience-design-system-cli 2.42.1-dev-build-b165bde7.0 → 2.42.1-dev-build-62049584.0
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/app.js +1089 -979
- package/dist/index.js +1115 -980
- package/dist/package.json +1 -1
- package/dist/src/tui/import/shared/running-step/activity-panel.d.ts +15 -0
- package/dist/src/tui/import/shared/running-step/activity.d.ts +26 -0
- package/dist/src/tui/import/shared/running-step/running-step.d.ts +3 -1
- package/dist/src/tui/import/steps/08-generation/logic.d.ts +7 -0
- package/dist/src/tui/import/steps/08-generation/types.d.ts +3 -0
- package/dist/src/tui/import/steps/10-flow/support/push-progress.d.ts +19 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -20202,47 +20202,123 @@ var init_use_elapsed = __esm({
|
|
|
20202
20202
|
}
|
|
20203
20203
|
});
|
|
20204
20204
|
|
|
20205
|
-
// packages/experience-design-system-cli/src/tui/import/shared/running-step/
|
|
20205
|
+
// packages/experience-design-system-cli/src/tui/import/shared/running-step/activity.ts
|
|
20206
|
+
function panelLayout(columns) {
|
|
20207
|
+
return columns >= BESIDE_MIN_COLUMNS ? "beside" : "below";
|
|
20208
|
+
}
|
|
20209
|
+
function visibleActivity(items, max) {
|
|
20210
|
+
if (items.length <= max) return { shown: [...items], hidden: 0 };
|
|
20211
|
+
const chosen = items.map((item, index) => ({ index, priority: PRIORITY[item.state] })).sort((a, b) => a.priority - b.priority || b.index - a.index).slice(0, Math.max(0, max)).map(({ index }) => index).sort((a, b) => a - b);
|
|
20212
|
+
return { shown: chosen.map((index) => items[index]), hidden: items.length - chosen.length };
|
|
20213
|
+
}
|
|
20214
|
+
function truncate(text, max) {
|
|
20215
|
+
return text.length <= max ? text : `${text.slice(0, Math.max(0, max - 1))}\u2026`;
|
|
20216
|
+
}
|
|
20217
|
+
var BESIDE_MIN_COLUMNS, PANEL_COLUMNS, PRIORITY;
|
|
20218
|
+
var init_activity = __esm({
|
|
20219
|
+
"packages/experience-design-system-cli/src/tui/import/shared/running-step/activity.ts"() {
|
|
20220
|
+
"use strict";
|
|
20221
|
+
BESIDE_MIN_COLUMNS = 110;
|
|
20222
|
+
PANEL_COLUMNS = 46;
|
|
20223
|
+
PRIORITY = { failed: 0, running: 1, done: 2 };
|
|
20224
|
+
}
|
|
20225
|
+
});
|
|
20226
|
+
|
|
20227
|
+
// packages/experience-design-system-cli/src/tui/import/shared/running-step/activity-panel.tsx
|
|
20206
20228
|
import { Box as Box8, Text as Text8 } from "ink";
|
|
20207
|
-
import {
|
|
20208
|
-
import { jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
20229
|
+
import { Spinner } from "@inkjs/ui";
|
|
20230
|
+
import { Fragment, jsx as jsx8, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
20231
|
+
function Row({ item, width }) {
|
|
20232
|
+
const time = item.ms !== void 0 ? formatDuration(item.ms) : "";
|
|
20233
|
+
const note = item.detail ? ` ${item.detail}` : "";
|
|
20234
|
+
const name = truncate(`${item.name}${note}`, Math.max(8, width - 12));
|
|
20235
|
+
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", children: [
|
|
20236
|
+
/* @__PURE__ */ jsxs8(Box8, { gap: 1, children: [
|
|
20237
|
+
item.state === "running" ? /* @__PURE__ */ jsx8(Spinner, {}) : /* @__PURE__ */ jsx8(Text8, { color: COLOR[item.state], children: ICON[item.state] }),
|
|
20238
|
+
/* @__PURE__ */ jsx8(Text8, { color: item.state === "failed" ? PALETTE.error : PALETTE.muted, children: name }),
|
|
20239
|
+
time && /* @__PURE__ */ jsx8(Text8, { color: PALETTE.muted, children: time })
|
|
20240
|
+
] }),
|
|
20241
|
+
item.state === "failed" && item.error && /* @__PURE__ */ jsx8(Text8, { color: PALETTE.error, children: ` ${truncate(item.error, Math.max(12, width - 6))}` })
|
|
20242
|
+
] });
|
|
20243
|
+
}
|
|
20244
|
+
function ActivityPanel({ title, items }) {
|
|
20245
|
+
const columns = useTerminalWidth();
|
|
20246
|
+
const width = panelLayout(columns) === "beside" ? PANEL_COLUMNS : Math.max(30, columns - 4);
|
|
20247
|
+
const { shown, hidden } = visibleActivity(items, MAX_ROWS);
|
|
20248
|
+
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.muted, paddingX: 1, width, children: [
|
|
20249
|
+
/* @__PURE__ */ jsx8(Text8, { bold: true, children: title }),
|
|
20250
|
+
shown.map((item, index) => /* @__PURE__ */ jsx8(Row, { item, width }, `${index}-${item.name}`)),
|
|
20251
|
+
hidden > 0 && /* @__PURE__ */ jsx8(Text8, { color: PALETTE.muted, children: `+ ${hidden} more` })
|
|
20252
|
+
] });
|
|
20253
|
+
}
|
|
20254
|
+
function AsideLayout({
|
|
20255
|
+
aside,
|
|
20256
|
+
children
|
|
20257
|
+
}) {
|
|
20258
|
+
const columns = useTerminalWidth();
|
|
20259
|
+
if (!aside) return /* @__PURE__ */ jsx8(Fragment, { children });
|
|
20260
|
+
const beside = panelLayout(columns) === "beside";
|
|
20261
|
+
return /* @__PURE__ */ jsxs8(Box8, { flexDirection: beside ? "row" : "column", alignItems: "flex-start", children: [
|
|
20262
|
+
children,
|
|
20263
|
+
/* @__PURE__ */ jsx8(Box8, { paddingX: beside ? 0 : 2, paddingBottom: 1, children: aside })
|
|
20264
|
+
] });
|
|
20265
|
+
}
|
|
20266
|
+
var MAX_ROWS, ICON, COLOR;
|
|
20267
|
+
var init_activity_panel = __esm({
|
|
20268
|
+
"packages/experience-design-system-cli/src/tui/import/shared/running-step/activity-panel.tsx"() {
|
|
20269
|
+
"use strict";
|
|
20270
|
+
init_theme();
|
|
20271
|
+
init_use_terminal_width();
|
|
20272
|
+
init_logic4();
|
|
20273
|
+
init_activity();
|
|
20274
|
+
MAX_ROWS = 8;
|
|
20275
|
+
ICON = { done: "\u2713", failed: "\u2717" };
|
|
20276
|
+
COLOR = { done: PALETTE.success, failed: PALETTE.error };
|
|
20277
|
+
}
|
|
20278
|
+
});
|
|
20279
|
+
|
|
20280
|
+
// packages/experience-design-system-cli/src/tui/import/shared/running-step/running-step.tsx
|
|
20281
|
+
import { Box as Box9, Text as Text9 } from "ink";
|
|
20282
|
+
import { ProgressBar, Spinner as Spinner2, ThemeProvider } from "@inkjs/ui";
|
|
20283
|
+
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
20209
20284
|
function Line({ line }) {
|
|
20210
20285
|
if (line.progress) {
|
|
20211
|
-
return /* @__PURE__ */
|
|
20212
|
-
/* @__PURE__ */
|
|
20213
|
-
/* @__PURE__ */
|
|
20214
|
-
/* @__PURE__ */
|
|
20286
|
+
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", gap: 1, children: [
|
|
20287
|
+
/* @__PURE__ */ jsxs9(Box9, { gap: 2, children: [
|
|
20288
|
+
/* @__PURE__ */ jsx9(Box9, { width: 40, children: /* @__PURE__ */ jsx9(ThemeProvider, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx9(ProgressBar, { value: progressPercent(line.progress) }) }) }),
|
|
20289
|
+
/* @__PURE__ */ jsxs9(Text9, { color: PALETTE.muted, children: [
|
|
20215
20290
|
line.progress.done,
|
|
20216
20291
|
"/",
|
|
20217
20292
|
line.progress.total
|
|
20218
20293
|
] })
|
|
20219
20294
|
] }),
|
|
20220
|
-
/* @__PURE__ */
|
|
20295
|
+
/* @__PURE__ */ jsx9(Text9, { color: textColor(lineState(line)), children: line.text })
|
|
20221
20296
|
] });
|
|
20222
20297
|
}
|
|
20223
20298
|
const state2 = lineState(line);
|
|
20224
|
-
return /* @__PURE__ */
|
|
20225
|
-
state2 === "running" ? /* @__PURE__ */
|
|
20226
|
-
/* @__PURE__ */
|
|
20227
|
-
line.ms !== void 0 && /* @__PURE__ */
|
|
20299
|
+
return /* @__PURE__ */ jsxs9(Box9, { gap: 1, children: [
|
|
20300
|
+
state2 === "running" ? /* @__PURE__ */ jsx9(Spinner2, {}) : /* @__PURE__ */ jsx9(Text9, { color: STATE_COLOR[state2], children: STATE_ICON[state2] }),
|
|
20301
|
+
/* @__PURE__ */ jsx9(Text9, { color: textColor(state2), children: line.text }),
|
|
20302
|
+
line.ms !== void 0 && /* @__PURE__ */ jsx9(Text9, { color: PALETTE.muted, children: formatDuration(line.ms) })
|
|
20228
20303
|
] });
|
|
20229
20304
|
}
|
|
20230
20305
|
function RunningStep({
|
|
20231
20306
|
step,
|
|
20232
20307
|
description,
|
|
20233
|
-
lines = [{ text: "Running..." }]
|
|
20308
|
+
lines = [{ text: "Running..." }],
|
|
20309
|
+
aside
|
|
20234
20310
|
}) {
|
|
20235
20311
|
const elapsed = useElapsed();
|
|
20236
|
-
return /* @__PURE__ */
|
|
20237
|
-
/* @__PURE__ */
|
|
20238
|
-
/* @__PURE__ */
|
|
20239
|
-
/* @__PURE__ */
|
|
20240
|
-
/* @__PURE__ */
|
|
20241
|
-
/* @__PURE__ */
|
|
20312
|
+
return /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", children: [
|
|
20313
|
+
/* @__PURE__ */ jsx9(StepHeader, { step }),
|
|
20314
|
+
/* @__PURE__ */ jsx9(AsideLayout, { aside, children: /* @__PURE__ */ jsxs9(Box9, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
20315
|
+
/* @__PURE__ */ jsx9(Text9, { children: description }),
|
|
20316
|
+
/* @__PURE__ */ jsx9(Box9, { marginTop: 1, flexDirection: "column", gap: 1, children: lines.map((line, index) => /* @__PURE__ */ jsx9(Line, { line }, index)) }),
|
|
20317
|
+
/* @__PURE__ */ jsx9(Box9, { marginTop: 1, children: /* @__PURE__ */ jsxs9(Text9, { color: PALETTE.muted, children: [
|
|
20242
20318
|
"Elapsed: ",
|
|
20243
20319
|
elapsed
|
|
20244
20320
|
] }) })
|
|
20245
|
-
] })
|
|
20321
|
+
] }) })
|
|
20246
20322
|
] });
|
|
20247
20323
|
}
|
|
20248
20324
|
var STATE_ICON, STATE_COLOR, textColor;
|
|
@@ -20254,6 +20330,7 @@ var init_running_step = __esm({
|
|
|
20254
20330
|
init_theme2();
|
|
20255
20331
|
init_StepHeader();
|
|
20256
20332
|
init_use_elapsed();
|
|
20333
|
+
init_activity_panel();
|
|
20257
20334
|
STATE_ICON = { done: "\u2713", warning: "!", failed: "\u2717" };
|
|
20258
20335
|
STATE_COLOR = { done: PALETTE.success, warning: PALETTE.warning, failed: PALETTE.error };
|
|
20259
20336
|
textColor = (state2) => state2 === "warning" || state2 === "failed" ? STATE_COLOR[state2] : PALETTE.muted;
|
|
@@ -20273,8 +20350,8 @@ var init_shared2 = __esm({
|
|
|
20273
20350
|
|
|
20274
20351
|
// packages/experience-design-system-cli/src/tui/import/steps/00-preflight/screen.tsx
|
|
20275
20352
|
import { useEffect as useEffect4, useRef, useState as useState4 } from "react";
|
|
20276
|
-
import { Box as
|
|
20277
|
-
import { jsx as
|
|
20353
|
+
import { Box as Box10, Text as Text10 } from "ink";
|
|
20354
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
20278
20355
|
function PreflightScreen({ onChoose, onQuit }) {
|
|
20279
20356
|
const [focus, setFocus] = useState4(0);
|
|
20280
20357
|
const viewed = useRef([optionAt(0)]).current;
|
|
@@ -20303,19 +20380,19 @@ function PreflightScreen({ onChoose, onQuit }) {
|
|
|
20303
20380
|
onQuit();
|
|
20304
20381
|
};
|
|
20305
20382
|
usePreflightControls({ focus, onFocus: moveTo, onChoose: choose, onQuit: quit });
|
|
20306
|
-
return /* @__PURE__ */
|
|
20307
|
-
/* @__PURE__ */
|
|
20308
|
-
/* @__PURE__ */
|
|
20309
|
-
/* @__PURE__ */
|
|
20310
|
-
/* @__PURE__ */
|
|
20383
|
+
return /* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", children: [
|
|
20384
|
+
/* @__PURE__ */ jsx10(StepHeader, { step: "setup" }),
|
|
20385
|
+
/* @__PURE__ */ jsxs10(Box10, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
20386
|
+
/* @__PURE__ */ jsx10(Text10, { bold: true, color: PALETTE.text, children: "What do you want to import?" }),
|
|
20387
|
+
/* @__PURE__ */ jsx10(Box10, { flexDirection: "column", children: IMPORT_TARGET_OPTIONS.map((option, index) => {
|
|
20311
20388
|
const focused = index === focus;
|
|
20312
|
-
return /* @__PURE__ */
|
|
20313
|
-
/* @__PURE__ */
|
|
20314
|
-
/* @__PURE__ */
|
|
20389
|
+
return /* @__PURE__ */ jsxs10(Box10, { gap: 1, children: [
|
|
20390
|
+
/* @__PURE__ */ jsx10(Text10, { color: PALETTE.accent, children: focused ? "\u276F" : " " }),
|
|
20391
|
+
/* @__PURE__ */ jsx10(Text10, { bold: focused, color: focused ? PALETTE.accent : void 0, children: option.label })
|
|
20315
20392
|
] }, option.target);
|
|
20316
20393
|
}) }),
|
|
20317
|
-
/* @__PURE__ */
|
|
20318
|
-
/* @__PURE__ */
|
|
20394
|
+
/* @__PURE__ */ jsx10(OverviewBox, { steps: overviewFor(optionAt(focus)) }),
|
|
20395
|
+
/* @__PURE__ */ jsx10(ControlHints, { hints: PREFLIGHT_CONTROLS })
|
|
20319
20396
|
] })
|
|
20320
20397
|
] });
|
|
20321
20398
|
}
|
|
@@ -20338,7 +20415,7 @@ var init_screen = __esm({
|
|
|
20338
20415
|
import { useRef as useRef2 } from "react";
|
|
20339
20416
|
import { useInput as useInput6 } from "ink";
|
|
20340
20417
|
import TextInput from "ink-text-input";
|
|
20341
|
-
import { jsx as
|
|
20418
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
20342
20419
|
function isClearKey(input, key) {
|
|
20343
20420
|
return key.ctrl && input === "d";
|
|
20344
20421
|
}
|
|
@@ -20352,7 +20429,7 @@ function ClearableTextInput({ onChange, ...props }) {
|
|
|
20352
20429
|
}, 0);
|
|
20353
20430
|
onChange("");
|
|
20354
20431
|
});
|
|
20355
|
-
return /* @__PURE__ */
|
|
20432
|
+
return /* @__PURE__ */ jsx11(
|
|
20356
20433
|
TextInput,
|
|
20357
20434
|
{
|
|
20358
20435
|
...props,
|
|
@@ -20404,8 +20481,8 @@ var init_controls4 = __esm({
|
|
|
20404
20481
|
|
|
20405
20482
|
// packages/experience-design-system-cli/src/tui/import/steps/01-welcome/screen.tsx
|
|
20406
20483
|
import { useEffect as useEffect5, useRef as useRef3, useState as useState5 } from "react";
|
|
20407
|
-
import { Box as
|
|
20408
|
-
import { jsx as
|
|
20484
|
+
import { Box as Box11, Text as Text11 } from "ink";
|
|
20485
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
20409
20486
|
function WelcomeScreen({ mode, onContinue, onQuit, initialPath = "" }) {
|
|
20410
20487
|
const [projectPath, setProjectPath] = useState5(initialPath);
|
|
20411
20488
|
const visit = useRef3({ emptySubmits: 0 }).current;
|
|
@@ -20447,18 +20524,18 @@ function WelcomeScreen({ mode, onContinue, onQuit, initialPath = "" }) {
|
|
|
20447
20524
|
});
|
|
20448
20525
|
onContinue(path5);
|
|
20449
20526
|
};
|
|
20450
|
-
return /* @__PURE__ */
|
|
20451
|
-
/* @__PURE__ */
|
|
20452
|
-
/* @__PURE__ */
|
|
20453
|
-
/* @__PURE__ */
|
|
20454
|
-
/* @__PURE__ */
|
|
20455
|
-
/* @__PURE__ */
|
|
20456
|
-
/* @__PURE__ */
|
|
20457
|
-
/* @__PURE__ */
|
|
20458
|
-
/* @__PURE__ */
|
|
20527
|
+
return /* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", children: [
|
|
20528
|
+
/* @__PURE__ */ jsx12(StepHeader, { step: "setup" }),
|
|
20529
|
+
/* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
20530
|
+
/* @__PURE__ */ jsxs11(Box11, { flexDirection: "column", gap: 1, children: [
|
|
20531
|
+
/* @__PURE__ */ jsx12(Text11, { color: PALETTE.text, children: "Where is your component library?" }),
|
|
20532
|
+
/* @__PURE__ */ jsxs11(Box11, { children: [
|
|
20533
|
+
/* @__PURE__ */ jsx12(Text11, { color: PALETTE.accent, children: "? " }),
|
|
20534
|
+
/* @__PURE__ */ jsx12(Text11, { children: "Project path: " }),
|
|
20535
|
+
/* @__PURE__ */ jsx12(ClearableTextInput, { value: projectPath, onChange: setProjectPath, onSubmit: submit })
|
|
20459
20536
|
] })
|
|
20460
20537
|
] }),
|
|
20461
|
-
/* @__PURE__ */
|
|
20538
|
+
/* @__PURE__ */ jsx12(Box11, { children: /* @__PURE__ */ jsx12(ControlHints, { hints: WELCOME_CONTROLS }) })
|
|
20462
20539
|
] })
|
|
20463
20540
|
] });
|
|
20464
20541
|
}
|
|
@@ -20559,8 +20636,8 @@ var init_validate_path = __esm({
|
|
|
20559
20636
|
|
|
20560
20637
|
// packages/experience-design-system-cli/src/tui/import/steps/02-token-input/screen.tsx
|
|
20561
20638
|
import { useEffect as useEffect6, useRef as useRef4, useState as useState6 } from "react";
|
|
20562
|
-
import { Box as
|
|
20563
|
-
import { jsx as
|
|
20639
|
+
import { Box as Box12, Text as Text12 } from "ink";
|
|
20640
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
20564
20641
|
function TokenInputScreen({
|
|
20565
20642
|
mode,
|
|
20566
20643
|
onConfirm,
|
|
@@ -20623,29 +20700,29 @@ function TokenInputScreen({
|
|
|
20623
20700
|
});
|
|
20624
20701
|
onConfirm(check.path);
|
|
20625
20702
|
};
|
|
20626
|
-
return /* @__PURE__ */
|
|
20627
|
-
/* @__PURE__ */
|
|
20628
|
-
/* @__PURE__ */
|
|
20629
|
-
/* @__PURE__ */
|
|
20630
|
-
/* @__PURE__ */
|
|
20631
|
-
/* @__PURE__ */
|
|
20632
|
-
/* @__PURE__ */
|
|
20633
|
-
/* @__PURE__ */
|
|
20634
|
-
/* @__PURE__ */
|
|
20635
|
-
/* @__PURE__ */
|
|
20703
|
+
return /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
|
|
20704
|
+
/* @__PURE__ */ jsx13(StepHeader, { step: "setup" }),
|
|
20705
|
+
/* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
20706
|
+
/* @__PURE__ */ jsx13(Text12, { bold: true, children: "Design tokens" }),
|
|
20707
|
+
/* @__PURE__ */ jsx13(Text12, { color: PALETTE.muted, children: "Point me to your raw token file (e.g. ~/design-tokens/tokens.json). You can use ~, relative, or absolute paths. Claude will map it to Design Token Group Format (DTCG)." }),
|
|
20708
|
+
/* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
|
|
20709
|
+
/* @__PURE__ */ jsxs12(Box12, { gap: 1, children: [
|
|
20710
|
+
/* @__PURE__ */ jsx13(Text12, { color: PALETTE.accent, children: "?" }),
|
|
20711
|
+
/* @__PURE__ */ jsx13(Text12, { children: "Token path:" }),
|
|
20712
|
+
/* @__PURE__ */ jsx13(ClearableTextInput, { value: tokenPath, onChange: change, onSubmit: submit })
|
|
20636
20713
|
] }),
|
|
20637
|
-
failure && /* @__PURE__ */
|
|
20638
|
-
/* @__PURE__ */
|
|
20714
|
+
failure && /* @__PURE__ */ jsxs12(Box12, { flexDirection: "column", children: [
|
|
20715
|
+
/* @__PURE__ */ jsxs12(Text12, { color: PALETTE.error, children: [
|
|
20639
20716
|
"\u2717 ",
|
|
20640
20717
|
failure.error
|
|
20641
20718
|
] }),
|
|
20642
|
-
failure.resolvedPath && /* @__PURE__ */
|
|
20719
|
+
failure.resolvedPath && /* @__PURE__ */ jsxs12(Text12, { color: PALETTE.muted, children: [
|
|
20643
20720
|
" Resolved to: ",
|
|
20644
20721
|
failure.resolvedPath
|
|
20645
20722
|
] })
|
|
20646
20723
|
] })
|
|
20647
20724
|
] }),
|
|
20648
|
-
/* @__PURE__ */
|
|
20725
|
+
/* @__PURE__ */ jsx13(Box12, { marginTop: 1, children: /* @__PURE__ */ jsx13(ControlHints, { hints: TOKEN_INPUT_CONTROLS }) })
|
|
20649
20726
|
] })
|
|
20650
20727
|
] });
|
|
20651
20728
|
}
|
|
@@ -20813,10 +20890,10 @@ var init_scan_files = __esm({
|
|
|
20813
20890
|
|
|
20814
20891
|
// packages/experience-design-system-cli/src/tui/import/steps/03-path-validation/screen.tsx
|
|
20815
20892
|
import { useEffect as useEffect7, useMemo, useState as useState7 } from "react";
|
|
20816
|
-
import { Box as
|
|
20817
|
-
import { jsx as
|
|
20818
|
-
function
|
|
20819
|
-
return /* @__PURE__ */
|
|
20893
|
+
import { Box as Box13, Text as Text13 } from "ink";
|
|
20894
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
20895
|
+
function Row2({ row }) {
|
|
20896
|
+
return /* @__PURE__ */ jsxs13(Text13, { color: row.tone === "accent" ? PALETTE.accent : row.tone === "muted" ? PALETTE.muted : void 0, children: [
|
|
20820
20897
|
" \u2022 ",
|
|
20821
20898
|
String(row.count).padStart(3),
|
|
20822
20899
|
" ",
|
|
@@ -20825,12 +20902,12 @@ function Row({ row }) {
|
|
|
20825
20902
|
}
|
|
20826
20903
|
function Failure({ scan, path: path5 }) {
|
|
20827
20904
|
const { headline, hints } = describeFailure(scan.failure, path5);
|
|
20828
|
-
return /* @__PURE__ */
|
|
20829
|
-
/* @__PURE__ */
|
|
20905
|
+
return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
|
|
20906
|
+
/* @__PURE__ */ jsxs13(Text13, { color: PALETTE.error, children: [
|
|
20830
20907
|
"\u2717 ",
|
|
20831
20908
|
headline
|
|
20832
20909
|
] }),
|
|
20833
|
-
hints.map((hint) => /* @__PURE__ */
|
|
20910
|
+
hints.map((hint) => /* @__PURE__ */ jsx14(Text13, { color: PALETTE.muted, children: hint }, hint))
|
|
20834
20911
|
] });
|
|
20835
20912
|
}
|
|
20836
20913
|
function Summary({
|
|
@@ -20839,24 +20916,24 @@ function Summary({
|
|
|
20839
20916
|
hasTokens
|
|
20840
20917
|
}) {
|
|
20841
20918
|
const { total, rows, warning } = summarize(scan.counts, { hasTokens });
|
|
20842
|
-
return /* @__PURE__ */
|
|
20843
|
-
/* @__PURE__ */
|
|
20919
|
+
return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", gap: 1, children: [
|
|
20920
|
+
/* @__PURE__ */ jsxs13(Text13, { children: [
|
|
20844
20921
|
"Scanned ",
|
|
20845
|
-
/* @__PURE__ */
|
|
20922
|
+
/* @__PURE__ */ jsx14(Text13, { bold: true, children: path5 })
|
|
20846
20923
|
] }),
|
|
20847
|
-
/* @__PURE__ */
|
|
20848
|
-
/* @__PURE__ */
|
|
20924
|
+
/* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
|
|
20925
|
+
/* @__PURE__ */ jsxs13(Text13, { color: PALETTE.success, children: [
|
|
20849
20926
|
"\u2713 Found ",
|
|
20850
20927
|
total,
|
|
20851
20928
|
" files:"
|
|
20852
20929
|
] }),
|
|
20853
|
-
rows.map((row) => /* @__PURE__ */
|
|
20930
|
+
rows.map((row) => /* @__PURE__ */ jsx14(Row2, { row }, row.label))
|
|
20854
20931
|
] }),
|
|
20855
|
-
warning && /* @__PURE__ */
|
|
20932
|
+
warning && /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.warning, children: [
|
|
20856
20933
|
"\u26A0 ",
|
|
20857
20934
|
warning
|
|
20858
20935
|
] }),
|
|
20859
|
-
/* @__PURE__ */
|
|
20936
|
+
/* @__PURE__ */ jsx14(Text13, { children: "Does this look right?" })
|
|
20860
20937
|
] });
|
|
20861
20938
|
}
|
|
20862
20939
|
function PathValidationScreen({
|
|
@@ -20903,17 +20980,17 @@ function PathValidationScreen({
|
|
|
20903
20980
|
onBack();
|
|
20904
20981
|
}
|
|
20905
20982
|
});
|
|
20906
|
-
return /* @__PURE__ */
|
|
20907
|
-
/* @__PURE__ */
|
|
20908
|
-
/* @__PURE__ */
|
|
20909
|
-
scan === void 0 && /* @__PURE__ */
|
|
20983
|
+
return /* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", children: [
|
|
20984
|
+
/* @__PURE__ */ jsx14(StepHeader, { step: "setup" }),
|
|
20985
|
+
/* @__PURE__ */ jsxs13(Box13, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
20986
|
+
scan === void 0 && /* @__PURE__ */ jsxs13(Text13, { color: PALETTE.muted, children: [
|
|
20910
20987
|
"Scanning ",
|
|
20911
|
-
/* @__PURE__ */
|
|
20988
|
+
/* @__PURE__ */ jsx14(Text13, { bold: true, children: resolvedPath }),
|
|
20912
20989
|
"..."
|
|
20913
20990
|
] }),
|
|
20914
|
-
scan?.ok === false && /* @__PURE__ */
|
|
20915
|
-
scan?.ok === true && /* @__PURE__ */
|
|
20916
|
-
/* @__PURE__ */
|
|
20991
|
+
scan?.ok === false && /* @__PURE__ */ jsx14(Failure, { scan, path: resolvedPath }),
|
|
20992
|
+
scan?.ok === true && /* @__PURE__ */ jsx14(Summary, { scan, path: resolvedPath, hasTokens }),
|
|
20993
|
+
/* @__PURE__ */ jsx14(Box13, { marginTop: 1, children: /* @__PURE__ */ jsx14(ControlHints, { hints: controlsFor(phase) }) })
|
|
20917
20994
|
] })
|
|
20918
20995
|
] });
|
|
20919
20996
|
}
|
|
@@ -20933,8 +21010,8 @@ var init_screen4 = __esm({
|
|
|
20933
21010
|
|
|
20934
21011
|
// packages/experience-design-system-cli/src/tui/shared/components/FieldForm.tsx
|
|
20935
21012
|
import { useState as useState8 } from "react";
|
|
20936
|
-
import { Box as
|
|
20937
|
-
import { Fragment, jsx as
|
|
21013
|
+
import { Box as Box14, Text as Text14, useInput as useInput10 } from "ink";
|
|
21014
|
+
import { Fragment as Fragment2, jsx as jsx15, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
20938
21015
|
function formLabelWidth(rows) {
|
|
20939
21016
|
return Math.max(...rows.map((row) => row.label.length));
|
|
20940
21017
|
}
|
|
@@ -20943,9 +21020,9 @@ function FormReadOnlyRow({
|
|
|
20943
21020
|
labelWidth,
|
|
20944
21021
|
children
|
|
20945
21022
|
}) {
|
|
20946
|
-
return /* @__PURE__ */
|
|
20947
|
-
/* @__PURE__ */
|
|
20948
|
-
/* @__PURE__ */
|
|
21023
|
+
return /* @__PURE__ */ jsxs14(Box14, { gap: 1, children: [
|
|
21024
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
21025
|
+
/* @__PURE__ */ jsx15(Box14, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: label }) }),
|
|
20949
21026
|
children
|
|
20950
21027
|
] });
|
|
20951
21028
|
}
|
|
@@ -21032,23 +21109,23 @@ function FieldForm({
|
|
|
21032
21109
|
setValueBeforeEdit(values[next.key]);
|
|
21033
21110
|
setActive(active + 1);
|
|
21034
21111
|
};
|
|
21035
|
-
const pointer = (isActive) => /* @__PURE__ */
|
|
21036
|
-
return /* @__PURE__ */
|
|
21112
|
+
const pointer = (isActive) => /* @__PURE__ */ jsx15(Text14, { color: isActive ? PALETTE.accent : void 0, children: isActive ? "\u276F" : " " });
|
|
21113
|
+
return /* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", children: [
|
|
21037
21114
|
header,
|
|
21038
|
-
/* @__PURE__ */
|
|
21039
|
-
/* @__PURE__ */
|
|
21040
|
-
/* @__PURE__ */
|
|
21041
|
-
subtitle && /* @__PURE__ */
|
|
21042
|
-
/* @__PURE__ */
|
|
21043
|
-
/* @__PURE__ */
|
|
21115
|
+
/* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", paddingX: 2, paddingTop: header ? 0 : 1, paddingBottom: 1, children: [
|
|
21116
|
+
/* @__PURE__ */ jsx15(Text14, { bold: true, children: title }),
|
|
21117
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
21118
|
+
subtitle && /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: subtitle }),
|
|
21119
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
21120
|
+
/* @__PURE__ */ jsxs14(Box14, { flexDirection: "column", children: [
|
|
21044
21121
|
fields2.map((field, index) => {
|
|
21045
21122
|
const isActive = index === active;
|
|
21046
21123
|
const value = values[field.key];
|
|
21047
21124
|
const display = field.masked ? "\u2022".repeat(value.length) : value;
|
|
21048
|
-
return /* @__PURE__ */
|
|
21125
|
+
return /* @__PURE__ */ jsxs14(Box14, { gap: 1, children: [
|
|
21049
21126
|
pointer(isActive),
|
|
21050
|
-
/* @__PURE__ */
|
|
21051
|
-
isActive && editing ? /* @__PURE__ */
|
|
21127
|
+
/* @__PURE__ */ jsx15(Box14, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx15(Text14, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: field.label }) }),
|
|
21128
|
+
isActive && editing ? /* @__PURE__ */ jsx15(
|
|
21052
21129
|
ClearableTextInput,
|
|
21053
21130
|
{
|
|
21054
21131
|
value,
|
|
@@ -21056,34 +21133,34 @@ function FieldForm({
|
|
|
21056
21133
|
onSubmit: submitField,
|
|
21057
21134
|
mask: field.masked ? "\u2022" : void 0
|
|
21058
21135
|
}
|
|
21059
|
-
) : display ? /* @__PURE__ */
|
|
21136
|
+
) : display ? /* @__PURE__ */ jsx15(Text14, { bold: true, children: display }) : (
|
|
21060
21137
|
// An empty value shows its hint (or "(empty)") in the value's place, not after an empty element, so the
|
|
21061
21138
|
// text starts in the same column as every other row's.
|
|
21062
|
-
/* @__PURE__ */
|
|
21139
|
+
/* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: field.hint ?? "(empty)" })
|
|
21063
21140
|
),
|
|
21064
|
-
display && field.hint && /* @__PURE__ */
|
|
21141
|
+
display && field.hint && /* @__PURE__ */ jsx15(Text14, { color: PALETTE.muted, children: field.hint })
|
|
21065
21142
|
] }, field.key);
|
|
21066
21143
|
}),
|
|
21067
21144
|
actions.map((action, index) => {
|
|
21068
21145
|
const isActive = fields2.length + index === active;
|
|
21069
|
-
return /* @__PURE__ */
|
|
21146
|
+
return /* @__PURE__ */ jsxs14(Box14, { gap: 1, children: [
|
|
21070
21147
|
pointer(isActive),
|
|
21071
|
-
/* @__PURE__ */
|
|
21072
|
-
/* @__PURE__ */
|
|
21148
|
+
/* @__PURE__ */ jsx15(Box14, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx15(Text14, { bold: isActive, color: isActive ? PALETTE.accent : PALETTE.muted, children: action.label }) }),
|
|
21149
|
+
/* @__PURE__ */ jsx15(Text14, { color: action.running ? PALETTE.accent : PALETTE.muted, children: action.running ? action.runningText ?? "running..." : action.description })
|
|
21073
21150
|
] }, action.label);
|
|
21074
21151
|
})
|
|
21075
21152
|
] }),
|
|
21076
|
-
notice && /* @__PURE__ */
|
|
21077
|
-
/* @__PURE__ */
|
|
21078
|
-
/* @__PURE__ */
|
|
21153
|
+
notice && /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
21154
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
21155
|
+
/* @__PURE__ */ jsxs14(Text14, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
21079
21156
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
21080
21157
|
" ",
|
|
21081
21158
|
notice.text
|
|
21082
21159
|
] })
|
|
21083
21160
|
] }),
|
|
21084
21161
|
children,
|
|
21085
|
-
/* @__PURE__ */
|
|
21086
|
-
/* @__PURE__ */
|
|
21162
|
+
/* @__PURE__ */ jsx15(Text14, { children: " " }),
|
|
21163
|
+
/* @__PURE__ */ jsx15(
|
|
21087
21164
|
ControlHints,
|
|
21088
21165
|
{
|
|
21089
21166
|
hints: editing ? [
|
|
@@ -21255,8 +21332,8 @@ var init_validate4 = __esm({
|
|
|
21255
21332
|
|
|
21256
21333
|
// packages/experience-design-system-cli/src/tui/import/steps/04-credentials/screen.tsx
|
|
21257
21334
|
import { useEffect as useEffect8, useRef as useRef5, useState as useState9 } from "react";
|
|
21258
|
-
import { Box as
|
|
21259
|
-
import { Fragment as
|
|
21335
|
+
import { Box as Box15, Text as Text15, useInput as useInput11 } from "ink";
|
|
21336
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
21260
21337
|
function CredentialsScreen({
|
|
21261
21338
|
mode,
|
|
21262
21339
|
onDone,
|
|
@@ -21374,24 +21451,24 @@ function CredentialsScreen({
|
|
|
21374
21451
|
});
|
|
21375
21452
|
const labelWidth = formLabelWidth([...FIELDS2, ...MENU]);
|
|
21376
21453
|
const changed = !isUnchanged(normalize(values), initialValues);
|
|
21377
|
-
return /* @__PURE__ */
|
|
21378
|
-
/* @__PURE__ */
|
|
21379
|
-
/* @__PURE__ */
|
|
21380
|
-
/* @__PURE__ */
|
|
21381
|
-
/* @__PURE__ */
|
|
21382
|
-
/* @__PURE__ */
|
|
21383
|
-
/* @__PURE__ */
|
|
21384
|
-
/* @__PURE__ */
|
|
21454
|
+
return /* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", children: [
|
|
21455
|
+
/* @__PURE__ */ jsx16(StepHeader, { step: "setup" }),
|
|
21456
|
+
/* @__PURE__ */ jsxs15(Box15, { flexDirection: "column", paddingX: 2, paddingBottom: 1, children: [
|
|
21457
|
+
/* @__PURE__ */ jsx16(Text15, { bold: true, color: PALETTE.accent, children: "Contentful Credentials" }),
|
|
21458
|
+
/* @__PURE__ */ jsx16(Text15, { children: " " }),
|
|
21459
|
+
/* @__PURE__ */ jsx16(Text15, { color: PALETTE.muted, children: prefilled ? "Credentials pre-filled from the configuration settings." : "Enter the Contentful space you want to import into." }),
|
|
21460
|
+
/* @__PURE__ */ jsx16(Text15, { children: " " }),
|
|
21461
|
+
/* @__PURE__ */ jsx16(Text15, { color: PALETTE.muted, children: "Actions" }),
|
|
21385
21462
|
MENU.map((item, index) => {
|
|
21386
21463
|
const focused = !editing && index === focus;
|
|
21387
|
-
return /* @__PURE__ */
|
|
21388
|
-
/* @__PURE__ */
|
|
21389
|
-
/* @__PURE__ */
|
|
21390
|
-
/* @__PURE__ */
|
|
21464
|
+
return /* @__PURE__ */ jsxs15(Box15, { gap: 1, children: [
|
|
21465
|
+
/* @__PURE__ */ jsx16(Text15, { color: PALETTE.accent, children: focused ? "\u276F" : " " }),
|
|
21466
|
+
/* @__PURE__ */ jsx16(Box15, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx16(Text15, { bold: focused, color: focused ? PALETTE.accent : editing ? PALETTE.muted : PALETTE.text, children: item.label }) }),
|
|
21467
|
+
/* @__PURE__ */ jsx16(Text15, { color: PALETTE.muted, children: item.description })
|
|
21391
21468
|
] }, item.choice);
|
|
21392
21469
|
}),
|
|
21393
|
-
/* @__PURE__ */
|
|
21394
|
-
|
|
21470
|
+
/* @__PURE__ */ jsxs15(
|
|
21471
|
+
Box15,
|
|
21395
21472
|
{
|
|
21396
21473
|
flexDirection: "column",
|
|
21397
21474
|
marginTop: 1,
|
|
@@ -21401,15 +21478,15 @@ function CredentialsScreen({
|
|
|
21401
21478
|
borderLeft: false,
|
|
21402
21479
|
borderRight: false,
|
|
21403
21480
|
children: [
|
|
21404
|
-
/* @__PURE__ */
|
|
21481
|
+
/* @__PURE__ */ jsx16(Text15, { color: PALETTE.muted, children: "Space" }),
|
|
21405
21482
|
FIELDS2.map((field, index) => {
|
|
21406
21483
|
const open = editing && index === active;
|
|
21407
21484
|
const value = values[field.key];
|
|
21408
21485
|
const display = field.masked ? "\u2022".repeat(value.length) : value;
|
|
21409
|
-
return /* @__PURE__ */
|
|
21410
|
-
/* @__PURE__ */
|
|
21411
|
-
/* @__PURE__ */
|
|
21412
|
-
open ? /* @__PURE__ */
|
|
21486
|
+
return /* @__PURE__ */ jsxs15(Box15, { gap: 1, children: [
|
|
21487
|
+
/* @__PURE__ */ jsx16(Text15, { color: PALETTE.accent, children: open ? "\u276F" : " " }),
|
|
21488
|
+
/* @__PURE__ */ jsx16(Box15, { width: labelWidth, flexShrink: 0, children: /* @__PURE__ */ jsx16(Text15, { bold: open, color: open ? PALETTE.accent : PALETTE.muted, children: field.label }) }),
|
|
21489
|
+
open ? /* @__PURE__ */ jsx16(
|
|
21413
21490
|
ClearableTextInput,
|
|
21414
21491
|
{
|
|
21415
21492
|
value,
|
|
@@ -21420,35 +21497,35 @@ function CredentialsScreen({
|
|
|
21420
21497
|
onSubmit: stopEditing,
|
|
21421
21498
|
mask: field.masked ? "\u2022" : void 0
|
|
21422
21499
|
}
|
|
21423
|
-
) : /* @__PURE__ */
|
|
21500
|
+
) : /* @__PURE__ */ jsx16(Text15, { color: display ? PALETTE.text : PALETTE.muted, children: display || (field.hint ?? "(empty)") })
|
|
21424
21501
|
] }, field.key);
|
|
21425
21502
|
})
|
|
21426
21503
|
]
|
|
21427
21504
|
}
|
|
21428
21505
|
),
|
|
21429
|
-
notice && /* @__PURE__ */
|
|
21430
|
-
/* @__PURE__ */
|
|
21431
|
-
/* @__PURE__ */
|
|
21506
|
+
notice && /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
21507
|
+
/* @__PURE__ */ jsx16(Text15, { children: " " }),
|
|
21508
|
+
/* @__PURE__ */ jsxs15(Text15, { color: PALETTE.error, children: [
|
|
21432
21509
|
"\u2717 ",
|
|
21433
21510
|
notice.text
|
|
21434
21511
|
] })
|
|
21435
21512
|
] }),
|
|
21436
|
-
validating && /* @__PURE__ */
|
|
21437
|
-
/* @__PURE__ */
|
|
21438
|
-
/* @__PURE__ */
|
|
21513
|
+
validating && /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
21514
|
+
/* @__PURE__ */ jsx16(Text15, { children: " " }),
|
|
21515
|
+
/* @__PURE__ */ jsx16(Text15, { color: PALETTE.accent, children: "Validating credentials..." })
|
|
21439
21516
|
] }),
|
|
21440
|
-
!prefilled && !validating && !notice && /* @__PURE__ */
|
|
21441
|
-
/* @__PURE__ */
|
|
21442
|
-
/* @__PURE__ */
|
|
21443
|
-
/* @__PURE__ */
|
|
21517
|
+
!prefilled && !validating && !notice && /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
21518
|
+
/* @__PURE__ */ jsx16(Text15, { children: " " }),
|
|
21519
|
+
/* @__PURE__ */ jsx16(Text15, { color: PALETTE.muted, children: credentialsPurpose(tokensOnly) }),
|
|
21520
|
+
/* @__PURE__ */ jsx16(Text15, { color: PALETTE.muted, children: "Tip: save these under Settings \u2192 Configuration so they pre-fill here." })
|
|
21444
21521
|
] }),
|
|
21445
|
-
changed && !validating && !notice && /* @__PURE__ */
|
|
21446
|
-
/* @__PURE__ */
|
|
21447
|
-
/* @__PURE__ */
|
|
21522
|
+
changed && !validating && !notice && /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
21523
|
+
/* @__PURE__ */ jsx16(Text15, { children: " " }),
|
|
21524
|
+
/* @__PURE__ */ jsx16(Text15, { color: PALETTE.muted, children: "Changed values are saved after they validate." })
|
|
21448
21525
|
] }),
|
|
21449
|
-
editing && /* @__PURE__ */
|
|
21450
|
-
/* @__PURE__ */
|
|
21451
|
-
/* @__PURE__ */
|
|
21526
|
+
editing && /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
21527
|
+
/* @__PURE__ */ jsx16(Text15, { children: " " }),
|
|
21528
|
+
/* @__PURE__ */ jsx16(
|
|
21452
21529
|
ControlHints,
|
|
21453
21530
|
{
|
|
21454
21531
|
hints: [
|
|
@@ -21624,9 +21701,9 @@ var init_logic9 = __esm({
|
|
|
21624
21701
|
});
|
|
21625
21702
|
|
|
21626
21703
|
// packages/experience-design-system-cli/src/tui/import/steps/06-extraction/screen.tsx
|
|
21627
|
-
import { jsx as
|
|
21704
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
21628
21705
|
function ExtractionScreen({ progress, agent, rowMs }) {
|
|
21629
|
-
return /* @__PURE__ */
|
|
21706
|
+
return /* @__PURE__ */ jsx17(
|
|
21630
21707
|
RunningStep,
|
|
21631
21708
|
{
|
|
21632
21709
|
step: "extraction",
|
|
@@ -21708,8 +21785,8 @@ var init_load = __esm({
|
|
|
21708
21785
|
|
|
21709
21786
|
// packages/experience-design-system-cli/src/tui/import/steps/05-token-review/screen.tsx
|
|
21710
21787
|
import { useEffect as useEffect9, useMemo as useMemo2, useState as useState10 } from "react";
|
|
21711
|
-
import { Box as
|
|
21712
|
-
import { jsx as
|
|
21788
|
+
import { Box as Box16, Text as Text16, useInput as useInput12 } from "ink";
|
|
21789
|
+
import { jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
21713
21790
|
function TokenReviewScreen({ tokensPath, onContinue, onQuit }) {
|
|
21714
21791
|
const loaded = useMemo2(() => loadTokenRows(tokensPath), [tokensPath]);
|
|
21715
21792
|
const rows = loaded.ok ? loaded.rows : [];
|
|
@@ -21752,22 +21829,22 @@ function TokenReviewScreen({ tokensPath, onContinue, onQuit }) {
|
|
|
21752
21829
|
const typeWidth = Math.max(4, ...rows.map((row) => row.type.length)) + COLUMN_GAP;
|
|
21753
21830
|
const valueWidth = Math.max(10, innerWidth - pathWidth - typeWidth - 2);
|
|
21754
21831
|
const clip = (text, width) => text.length > width ? `${text.slice(0, Math.max(0, width - 1))}\u2026` : text.padEnd(width);
|
|
21755
|
-
return /* @__PURE__ */
|
|
21756
|
-
/* @__PURE__ */
|
|
21757
|
-
/* @__PURE__ */
|
|
21758
|
-
/* @__PURE__ */
|
|
21759
|
-
/* @__PURE__ */
|
|
21832
|
+
return /* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", children: [
|
|
21833
|
+
/* @__PURE__ */ jsx18(StepHeader, { step: "review" }),
|
|
21834
|
+
/* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", paddingX: 2, paddingBottom: 1, children: [
|
|
21835
|
+
/* @__PURE__ */ jsx18(Text16, { bold: true, children: "Review design tokens" }),
|
|
21836
|
+
/* @__PURE__ */ jsx18(Box16, { marginTop: 1, children: loaded.ok ? /* @__PURE__ */ jsxs16(Text16, { color: PALETTE.muted, children: [
|
|
21760
21837
|
rows.length,
|
|
21761
21838
|
" ",
|
|
21762
21839
|
rows.length === 1 ? "token" : "tokens",
|
|
21763
21840
|
" generated from ",
|
|
21764
21841
|
tokensPath
|
|
21765
|
-
] }) : /* @__PURE__ */
|
|
21842
|
+
] }) : /* @__PURE__ */ jsxs16(Text16, { color: PALETTE.error, children: [
|
|
21766
21843
|
"Could not read the generated tokens: ",
|
|
21767
21844
|
loaded.message
|
|
21768
21845
|
] }) }),
|
|
21769
|
-
/* @__PURE__ */
|
|
21770
|
-
/* @__PURE__ */
|
|
21846
|
+
/* @__PURE__ */ jsxs16(Box16, { flexDirection: "column", marginTop: 1, children: [
|
|
21847
|
+
/* @__PURE__ */ jsxs16(Text16, { bold: true, color: PALETTE.muted, wrap: "truncate-end", children: [
|
|
21771
21848
|
" ",
|
|
21772
21849
|
clip("Token name", pathWidth),
|
|
21773
21850
|
" ",
|
|
@@ -21777,7 +21854,7 @@ function TokenReviewScreen({ tokensPath, onContinue, onQuit }) {
|
|
|
21777
21854
|
] }),
|
|
21778
21855
|
rows.slice(start, end).map((row, offset) => {
|
|
21779
21856
|
const active = start + offset === selected;
|
|
21780
|
-
return /* @__PURE__ */
|
|
21857
|
+
return /* @__PURE__ */ jsxs16(Text16, { color: active ? PALETTE.accent : void 0, bold: active, wrap: "truncate-end", children: [
|
|
21781
21858
|
active ? "\u203A " : " ",
|
|
21782
21859
|
clip(row.path, pathWidth),
|
|
21783
21860
|
" ",
|
|
@@ -21787,14 +21864,14 @@ function TokenReviewScreen({ tokensPath, onContinue, onQuit }) {
|
|
|
21787
21864
|
] }, row.path);
|
|
21788
21865
|
})
|
|
21789
21866
|
] }),
|
|
21790
|
-
rows.length > VISIBLE_ROWS && /* @__PURE__ */
|
|
21867
|
+
rows.length > VISIBLE_ROWS && /* @__PURE__ */ jsx18(Box16, { marginTop: 1, children: /* @__PURE__ */ jsxs16(Text16, { color: PALETTE.muted, children: [
|
|
21791
21868
|
start + 1,
|
|
21792
21869
|
"-",
|
|
21793
21870
|
end,
|
|
21794
21871
|
" of ",
|
|
21795
21872
|
rows.length
|
|
21796
21873
|
] }) }),
|
|
21797
|
-
/* @__PURE__ */
|
|
21874
|
+
/* @__PURE__ */ jsx18(Box16, { marginTop: 1, children: /* @__PURE__ */ jsx18(ControlHints, { hints: TOKEN_REVIEW_CONTROLS }) })
|
|
21798
21875
|
] })
|
|
21799
21876
|
] });
|
|
21800
21877
|
}
|
|
@@ -22119,7 +22196,7 @@ function useExtraction(input) {
|
|
|
22119
22196
|
}),
|
|
22120
22197
|
rowMs: []
|
|
22121
22198
|
});
|
|
22122
|
-
let
|
|
22199
|
+
let lastProgress2;
|
|
22123
22200
|
const startedAt = Date.now();
|
|
22124
22201
|
let rowMs = [];
|
|
22125
22202
|
startDebugRun({
|
|
@@ -22129,13 +22206,13 @@ function useExtraction(input) {
|
|
|
22129
22206
|
inputs: extractionLogInputs(input)
|
|
22130
22207
|
});
|
|
22131
22208
|
void runExtraction(input, (progress) => {
|
|
22132
|
-
|
|
22209
|
+
lastProgress2 = progress;
|
|
22133
22210
|
rowMs = trackFinished(rowMs, progressRows(progress, input.agent), Date.now() - startedAt);
|
|
22134
22211
|
if (current.current === input) setState({ status: "running", progress, rowMs });
|
|
22135
22212
|
}).then((result) => {
|
|
22136
22213
|
if (current.current !== input) return;
|
|
22137
22214
|
void finishDebugRun({
|
|
22138
|
-
...extractionLogOutputs(result,
|
|
22215
|
+
...extractionLogOutputs(result, lastProgress2, input.credentials?.cmaToken ?? ""),
|
|
22139
22216
|
exitMethod: result.ok ? "saved" : "discarded"
|
|
22140
22217
|
});
|
|
22141
22218
|
setState({ status: "done", result });
|
|
@@ -22256,8 +22333,8 @@ var init_log = __esm({
|
|
|
22256
22333
|
});
|
|
22257
22334
|
|
|
22258
22335
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/windowed-panel.tsx
|
|
22259
|
-
import { Box as
|
|
22260
|
-
import { jsx as
|
|
22336
|
+
import { Box as Box17, Text as Text17 } from "ink";
|
|
22337
|
+
import { jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
22261
22338
|
function terminalPanelHeight(rows, reservedRows = 4) {
|
|
22262
22339
|
return Math.max(MIN_TERMINAL_PANEL_HEIGHT, rows - reservedRows);
|
|
22263
22340
|
}
|
|
@@ -22272,8 +22349,8 @@ function FixedPanel({
|
|
|
22272
22349
|
clipOverflow = true,
|
|
22273
22350
|
children
|
|
22274
22351
|
}) {
|
|
22275
|
-
return /* @__PURE__ */
|
|
22276
|
-
|
|
22352
|
+
return /* @__PURE__ */ jsx19(
|
|
22353
|
+
Box17,
|
|
22277
22354
|
{
|
|
22278
22355
|
flexDirection: "column",
|
|
22279
22356
|
width,
|
|
@@ -22289,7 +22366,7 @@ function FixedPanel({
|
|
|
22289
22366
|
);
|
|
22290
22367
|
}
|
|
22291
22368
|
function WindowedPanel({ width, height, title, focused, children }) {
|
|
22292
|
-
return /* @__PURE__ */
|
|
22369
|
+
return /* @__PURE__ */ jsxs17(
|
|
22293
22370
|
FixedPanel,
|
|
22294
22371
|
{
|
|
22295
22372
|
width,
|
|
@@ -22298,7 +22375,7 @@ function WindowedPanel({ width, height, title, focused, children }) {
|
|
|
22298
22375
|
...height === void 0 ? {} : { height },
|
|
22299
22376
|
focused,
|
|
22300
22377
|
children: [
|
|
22301
|
-
title && /* @__PURE__ */
|
|
22378
|
+
title && /* @__PURE__ */ jsx19(WindowedPanelHeader, { title, width, focused }),
|
|
22302
22379
|
children
|
|
22303
22380
|
]
|
|
22304
22381
|
}
|
|
@@ -22309,9 +22386,9 @@ function WindowedPanelHeader({
|
|
|
22309
22386
|
width,
|
|
22310
22387
|
focused
|
|
22311
22388
|
}) {
|
|
22312
|
-
return /* @__PURE__ */
|
|
22313
|
-
/* @__PURE__ */
|
|
22314
|
-
/* @__PURE__ */
|
|
22389
|
+
return /* @__PURE__ */ jsxs17(Box17, { flexDirection: "column", children: [
|
|
22390
|
+
/* @__PURE__ */ jsx19(Text17, { bold: true, color: PALETTE.accent, inverse: focused, children: title }),
|
|
22391
|
+
/* @__PURE__ */ jsx19(Text17, { color: PALETTE.muted, children: "\u2500".repeat(Math.max(0, width - 2)) })
|
|
22315
22392
|
] });
|
|
22316
22393
|
}
|
|
22317
22394
|
function formatWindowIndicator(direction, count) {
|
|
@@ -22320,10 +22397,10 @@ function formatWindowIndicator(direction, count) {
|
|
|
22320
22397
|
}
|
|
22321
22398
|
function WindowFooter({ above, below }) {
|
|
22322
22399
|
const parts = [above > 0 ? `\u2191 ${above}` : "", below > 0 ? `\u2193 ${below}` : ""].filter(Boolean);
|
|
22323
|
-
return /* @__PURE__ */
|
|
22400
|
+
return /* @__PURE__ */ jsx19(Text17, { color: PALETTE.muted, children: parts.length === 0 ? " " : `${parts.join(" \xB7 ")} more` });
|
|
22324
22401
|
}
|
|
22325
22402
|
function WindowIndicator({ direction, count }) {
|
|
22326
|
-
return /* @__PURE__ */
|
|
22403
|
+
return /* @__PURE__ */ jsx19(Text17, { color: PALETTE.muted, children: formatWindowIndicator(direction, count) });
|
|
22327
22404
|
}
|
|
22328
22405
|
var MIN_TERMINAL_PANEL_HEIGHT;
|
|
22329
22406
|
var init_windowed_panel = __esm({
|
|
@@ -22335,26 +22412,26 @@ var init_windowed_panel = __esm({
|
|
|
22335
22412
|
});
|
|
22336
22413
|
|
|
22337
22414
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/tokens-column.tsx
|
|
22338
|
-
import { Box as
|
|
22415
|
+
import { Box as Box18, Text as Text18 } from "ink";
|
|
22339
22416
|
import figures2 from "figures";
|
|
22340
|
-
import { jsx as
|
|
22417
|
+
import { jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
22341
22418
|
function TokensColumn(props) {
|
|
22342
22419
|
const { title, width, height, tokens, cursor, focused, visibleCount } = props;
|
|
22343
22420
|
const nameWidth = Math.min(longestEntries(tokens).path + 2, Math.floor((width - 8) / 2));
|
|
22344
22421
|
const window = computeColumnWindow(tokens.length, cursor, Math.max(1, visibleCount));
|
|
22345
|
-
return /* @__PURE__ */
|
|
22346
|
-
/* @__PURE__ */
|
|
22422
|
+
return /* @__PURE__ */ jsxs18(WindowedPanel, { width, height, title, focused, children: [
|
|
22423
|
+
/* @__PURE__ */ jsx20(WindowIndicator, { direction: "up", count: window.above }),
|
|
22347
22424
|
tokens.slice(window.start, window.end).map((token, offset) => {
|
|
22348
22425
|
const isCursor = focused && window.start + offset === cursor;
|
|
22349
|
-
return /* @__PURE__ */
|
|
22350
|
-
/* @__PURE__ */
|
|
22351
|
-
/* @__PURE__ */
|
|
22426
|
+
return /* @__PURE__ */ jsxs18(Box18, { children: [
|
|
22427
|
+
/* @__PURE__ */ jsx20(Text18, { color: PALETTE.accent, bold: true, children: isCursor ? figures2.pointer : " " }),
|
|
22428
|
+
/* @__PURE__ */ jsxs18(Text18, { wrap: "truncate-end", color: isCursor ? PALETTE.accent : void 0, bold: isCursor, children: [
|
|
22352
22429
|
` ${token.path.padEnd(nameWidth)}`,
|
|
22353
|
-
/* @__PURE__ */
|
|
22430
|
+
/* @__PURE__ */ jsx20(Text18, { color: PALETTE.muted, children: token.value })
|
|
22354
22431
|
] })
|
|
22355
22432
|
] }, token.path);
|
|
22356
22433
|
}),
|
|
22357
|
-
/* @__PURE__ */
|
|
22434
|
+
/* @__PURE__ */ jsx20(WindowIndicator, { direction: "down", count: window.below })
|
|
22358
22435
|
] });
|
|
22359
22436
|
}
|
|
22360
22437
|
var init_tokens_column = __esm({
|
|
@@ -22367,9 +22444,9 @@ var init_tokens_column = __esm({
|
|
|
22367
22444
|
});
|
|
22368
22445
|
|
|
22369
22446
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/cycles-panel.tsx
|
|
22370
|
-
import { Box as
|
|
22447
|
+
import { Box as Box19, Text as Text19 } from "ink";
|
|
22371
22448
|
import figures3 from "figures";
|
|
22372
|
-
import { jsx as
|
|
22449
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
22373
22450
|
function cycleLabel(cycle, index) {
|
|
22374
22451
|
const parts = [];
|
|
22375
22452
|
for (let i = 0; i < cycle.edges.length; i++) {
|
|
@@ -22380,17 +22457,17 @@ function cycleLabel(cycle, index) {
|
|
|
22380
22457
|
return `Cycle ${index + 1}: ${parts.join(" \u2192 ")}`;
|
|
22381
22458
|
}
|
|
22382
22459
|
function CyclesPanel({ cycles, cursor }) {
|
|
22383
|
-
return /* @__PURE__ */
|
|
22384
|
-
/* @__PURE__ */
|
|
22385
|
-
/* @__PURE__ */
|
|
22460
|
+
return /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
|
|
22461
|
+
/* @__PURE__ */ jsx21(Text19, { bold: true, color: PALETTE.warning, children: `Cycles detected (${cycles.length}):` }),
|
|
22462
|
+
/* @__PURE__ */ jsx21(Text19, { children: " " }),
|
|
22386
22463
|
cycles.map((cycle, i) => {
|
|
22387
22464
|
const isCursor = i === cursor;
|
|
22388
|
-
return /* @__PURE__ */
|
|
22389
|
-
isCursor ? /* @__PURE__ */
|
|
22390
|
-
/* @__PURE__ */
|
|
22465
|
+
return /* @__PURE__ */ jsxs19(Text19, { children: [
|
|
22466
|
+
isCursor ? /* @__PURE__ */ jsx21(Text19, { color: PALETTE.accent, bold: true, children: figures3.pointer }) : /* @__PURE__ */ jsx21(Text19, { children: " " }),
|
|
22467
|
+
/* @__PURE__ */ jsx21(Text19, { color: PALETTE.warning, inverse: isCursor, children: " " + cycleLabel(cycle, i) })
|
|
22391
22468
|
] }, i);
|
|
22392
22469
|
}),
|
|
22393
|
-
/* @__PURE__ */
|
|
22470
|
+
/* @__PURE__ */ jsx21(Text19, { children: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [c/Esc] close" })
|
|
22394
22471
|
] });
|
|
22395
22472
|
}
|
|
22396
22473
|
var init_cycles_panel = __esm({
|
|
@@ -22401,14 +22478,14 @@ var init_cycles_panel = __esm({
|
|
|
22401
22478
|
});
|
|
22402
22479
|
|
|
22403
22480
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/panels/reject-prompt.tsx
|
|
22404
|
-
import { Box as
|
|
22405
|
-
import { jsx as
|
|
22481
|
+
import { Box as Box20, Text as Text20 } from "ink";
|
|
22482
|
+
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
22406
22483
|
function RejectPrompt({ pending }) {
|
|
22407
|
-
return /* @__PURE__ */
|
|
22408
|
-
/* @__PURE__ */
|
|
22409
|
-
pending.ancestors.length > 0 && /* @__PURE__ */
|
|
22410
|
-
pending.descendants.length > 0 && /* @__PURE__ */
|
|
22411
|
-
/* @__PURE__ */
|
|
22484
|
+
return /* @__PURE__ */ jsxs20(Box20, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.warning, paddingX: 1, marginTop: 1, children: [
|
|
22485
|
+
/* @__PURE__ */ jsx22(Text20, { bold: true, color: PALETTE.warning, children: `Rejecting ${pending.target} will:` }),
|
|
22486
|
+
pending.ancestors.length > 0 && /* @__PURE__ */ jsx22(Text20, { children: `- Reject ancestors: ${pending.ancestors.join(", ")}` }),
|
|
22487
|
+
pending.descendants.length > 0 && /* @__PURE__ */ jsx22(Text20, { children: `- Deselect descendants: ${pending.descendants.join(", ")}` }),
|
|
22488
|
+
/* @__PURE__ */ jsx22(Text20, { children: "[y] confirm \xB7 [n]/[Esc] cancel" })
|
|
22412
22489
|
] });
|
|
22413
22490
|
}
|
|
22414
22491
|
var init_reject_prompt = __esm({
|
|
@@ -22419,9 +22496,9 @@ var init_reject_prompt = __esm({
|
|
|
22419
22496
|
});
|
|
22420
22497
|
|
|
22421
22498
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CompactControlBar.tsx
|
|
22422
|
-
import { jsx as
|
|
22499
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
22423
22500
|
function CompactControlBar({ hasGroupRoots, searchActive }) {
|
|
22424
|
-
return /* @__PURE__ */
|
|
22501
|
+
return /* @__PURE__ */ jsx23(
|
|
22425
22502
|
ControlHints,
|
|
22426
22503
|
{
|
|
22427
22504
|
hints: [
|
|
@@ -22444,8 +22521,8 @@ var init_CompactControlBar = __esm({
|
|
|
22444
22521
|
});
|
|
22445
22522
|
|
|
22446
22523
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/CounterStrip.tsx
|
|
22447
|
-
import { Box as
|
|
22448
|
-
import { jsx as
|
|
22524
|
+
import { Box as Box21, Text as Text21 } from "ink";
|
|
22525
|
+
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
22449
22526
|
function CounterStrip(props) {
|
|
22450
22527
|
const { counters, totalWidth } = props;
|
|
22451
22528
|
const condensed = totalWidth < 60;
|
|
@@ -22454,31 +22531,31 @@ function CounterStrip(props) {
|
|
|
22454
22531
|
const labelRej = condensed ? "Rej" : "Rejected";
|
|
22455
22532
|
const labelUnd = condensed ? "Und" : "Undecided";
|
|
22456
22533
|
const sep = condensed ? " | " : " ";
|
|
22457
|
-
return /* @__PURE__ */
|
|
22458
|
-
/* @__PURE__ */
|
|
22534
|
+
return /* @__PURE__ */ jsx24(Box21, { children: /* @__PURE__ */ jsxs21(Text21, { children: [
|
|
22535
|
+
/* @__PURE__ */ jsxs21(Text21, { color: PALETTE.muted, children: [
|
|
22459
22536
|
labelGrp,
|
|
22460
22537
|
" "
|
|
22461
22538
|
] }),
|
|
22462
|
-
/* @__PURE__ */
|
|
22463
|
-
/* @__PURE__ */
|
|
22464
|
-
/* @__PURE__ */
|
|
22539
|
+
/* @__PURE__ */ jsx24(Text21, { bold: true, children: counters.groups }),
|
|
22540
|
+
/* @__PURE__ */ jsx24(Text21, { color: PALETTE.muted, children: sep }),
|
|
22541
|
+
/* @__PURE__ */ jsxs21(Text21, { color: PALETTE.muted, children: [
|
|
22465
22542
|
labelAcc,
|
|
22466
22543
|
" "
|
|
22467
22544
|
] }),
|
|
22468
|
-
/* @__PURE__ */
|
|
22469
|
-
/* @__PURE__ */
|
|
22470
|
-
/* @__PURE__ */
|
|
22545
|
+
/* @__PURE__ */ jsx24(Text21, { bold: true, children: `${counters.accepted}/${counters.total}` }),
|
|
22546
|
+
/* @__PURE__ */ jsx24(Text21, { color: PALETTE.muted, children: sep }),
|
|
22547
|
+
/* @__PURE__ */ jsxs21(Text21, { color: PALETTE.muted, children: [
|
|
22471
22548
|
labelRej,
|
|
22472
22549
|
" "
|
|
22473
22550
|
] }),
|
|
22474
|
-
/* @__PURE__ */
|
|
22475
|
-
/* @__PURE__ */
|
|
22476
|
-
/* @__PURE__ */
|
|
22551
|
+
/* @__PURE__ */ jsx24(Text21, { bold: true, children: counters.rejected }),
|
|
22552
|
+
/* @__PURE__ */ jsx24(Text21, { color: PALETTE.muted, children: sep }),
|
|
22553
|
+
/* @__PURE__ */ jsxs21(Text21, { color: PALETTE.muted, children: [
|
|
22477
22554
|
labelUnd,
|
|
22478
22555
|
" "
|
|
22479
22556
|
] }),
|
|
22480
|
-
/* @__PURE__ */
|
|
22481
|
-
/* @__PURE__ */
|
|
22557
|
+
/* @__PURE__ */ jsx24(Text21, { bold: true, children: counters.undecided }),
|
|
22558
|
+
/* @__PURE__ */ jsx24(Text21, { color: PALETTE.muted, children: sep })
|
|
22482
22559
|
] }) });
|
|
22483
22560
|
}
|
|
22484
22561
|
var init_CounterStrip = __esm({
|
|
@@ -22490,8 +22567,8 @@ var init_CounterStrip = __esm({
|
|
|
22490
22567
|
|
|
22491
22568
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GotoBanner.tsx
|
|
22492
22569
|
import figures4 from "figures";
|
|
22493
|
-
import { Box as
|
|
22494
|
-
import { jsx as
|
|
22570
|
+
import { Box as Box22, Text as Text22 } from "ink";
|
|
22571
|
+
import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
22495
22572
|
function windowStart(rowCount, highlightIndex, maxRows) {
|
|
22496
22573
|
if (rowCount <= maxRows) return 0;
|
|
22497
22574
|
const maxStart = rowCount - maxRows;
|
|
@@ -22501,9 +22578,9 @@ function windowStart(rowCount, highlightIndex, maxRows) {
|
|
|
22501
22578
|
return start;
|
|
22502
22579
|
}
|
|
22503
22580
|
function defaultRenderRow(row, index, isCursor) {
|
|
22504
|
-
return /* @__PURE__ */
|
|
22505
|
-
isCursor ? /* @__PURE__ */
|
|
22506
|
-
/* @__PURE__ */
|
|
22581
|
+
return /* @__PURE__ */ jsxs22(Text22, { children: [
|
|
22582
|
+
isCursor ? /* @__PURE__ */ jsx25(Text22, { color: PALETTE.accent, bold: true, children: figures4.pointer }) : /* @__PURE__ */ jsx25(Text22, { children: " " }),
|
|
22583
|
+
/* @__PURE__ */ jsx25(Text22, { inverse: isCursor, children: " " + row.label })
|
|
22507
22584
|
] }, index);
|
|
22508
22585
|
}
|
|
22509
22586
|
function GotoBanner({
|
|
@@ -22522,8 +22599,8 @@ function GotoBanner({
|
|
|
22522
22599
|
const visible = rows.slice(start, end);
|
|
22523
22600
|
const moreAbove = start;
|
|
22524
22601
|
const moreBelow = rows.length - end;
|
|
22525
|
-
return /* @__PURE__ */
|
|
22526
|
-
|
|
22602
|
+
return /* @__PURE__ */ jsxs22(
|
|
22603
|
+
Box22,
|
|
22527
22604
|
{
|
|
22528
22605
|
flexDirection: "column",
|
|
22529
22606
|
borderStyle: "single",
|
|
@@ -22534,14 +22611,14 @@ function GotoBanner({
|
|
|
22534
22611
|
width,
|
|
22535
22612
|
flexShrink: 0,
|
|
22536
22613
|
children: [
|
|
22537
|
-
/* @__PURE__ */
|
|
22538
|
-
moreAbove > 0 && /* @__PURE__ */
|
|
22614
|
+
/* @__PURE__ */ jsx25(Text22, { bold: true, children: title }),
|
|
22615
|
+
moreAbove > 0 && /* @__PURE__ */ jsx25(Text22, { color: PALETTE.muted, children: ` \u25B2 ${moreAbove} more` }),
|
|
22539
22616
|
visible.map((row, vi) => {
|
|
22540
22617
|
const i = start + vi;
|
|
22541
22618
|
return renderRow(row, i, i === highlightIndex);
|
|
22542
22619
|
}),
|
|
22543
|
-
moreBelow > 0 && /* @__PURE__ */
|
|
22544
|
-
footerHint !== void 0 && /* @__PURE__ */
|
|
22620
|
+
moreBelow > 0 && /* @__PURE__ */ jsx25(Text22, { color: PALETTE.muted, children: ` \u25BC ${moreBelow} more` }),
|
|
22621
|
+
footerHint !== void 0 && /* @__PURE__ */ jsx25(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text22, { color: PALETTE.muted, children: footerHint }) })
|
|
22545
22622
|
]
|
|
22546
22623
|
}
|
|
22547
22624
|
);
|
|
@@ -22904,8 +22981,8 @@ var init_composite_closure = __esm({
|
|
|
22904
22981
|
});
|
|
22905
22982
|
|
|
22906
22983
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/badge.tsx
|
|
22907
|
-
import { Text as
|
|
22908
|
-
import { jsx as
|
|
22984
|
+
import { Text as Text23 } from "ink";
|
|
22985
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
22909
22986
|
function previewBadge(annotation) {
|
|
22910
22987
|
switch (annotation) {
|
|
22911
22988
|
case "new":
|
|
@@ -22924,7 +23001,7 @@ function PreviewBadge({
|
|
|
22924
23001
|
badge,
|
|
22925
23002
|
highlighted = false
|
|
22926
23003
|
}) {
|
|
22927
|
-
return badge ? /* @__PURE__ */
|
|
23004
|
+
return badge ? /* @__PURE__ */ jsx26(Text23, { color: !highlighted && badge.dim ? PALETTE.muted : badge.color, bold: badge.bold, children: badge.char }) : /* @__PURE__ */ jsx26(Text23, { children: " " });
|
|
22928
23005
|
}
|
|
22929
23006
|
var init_badge = __esm({
|
|
22930
23007
|
"packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/badge.tsx"() {
|
|
@@ -22935,8 +23012,8 @@ var init_badge = __esm({
|
|
|
22935
23012
|
|
|
22936
23013
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/GroupedSidebar.tsx
|
|
22937
23014
|
import figures5 from "figures";
|
|
22938
|
-
import { Box as
|
|
22939
|
-
import { jsx as
|
|
23015
|
+
import { Box as Box23, Text as Text24 } from "ink";
|
|
23016
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
22940
23017
|
function hasDirectChild(node) {
|
|
22941
23018
|
return node.slots.some((slot) => (slot.allowedComponents ?? []).some((target) => target !== node.name));
|
|
22942
23019
|
}
|
|
@@ -23355,8 +23432,8 @@ function GroupedSidebar(props) {
|
|
|
23355
23432
|
const start = windowed ? Math.max(0, scrollOffset ?? 0) : 0;
|
|
23356
23433
|
const end = windowed ? start + (visibleCount ?? allRows.length) + 1 : allRows.length;
|
|
23357
23434
|
const rows = windowed ? allRows.slice(start, end) : allRows;
|
|
23358
|
-
return /* @__PURE__ */
|
|
23359
|
-
allRows.length === 0 && emptyMessage !== void 0 && /* @__PURE__ */
|
|
23435
|
+
return /* @__PURE__ */ jsxs23(WindowedPanel, { width, height: props.height, title, focused, children: [
|
|
23436
|
+
allRows.length === 0 && emptyMessage !== void 0 && /* @__PURE__ */ jsxs23(Text24, { color: PALETTE.warning, children: [
|
|
23360
23437
|
" ",
|
|
23361
23438
|
emptyMessage
|
|
23362
23439
|
] }),
|
|
@@ -23386,13 +23463,13 @@ function GroupedSidebar(props) {
|
|
|
23386
23463
|
isOwn: rs?.isOwn ?? false,
|
|
23387
23464
|
isCursor
|
|
23388
23465
|
});
|
|
23389
|
-
return /* @__PURE__ */
|
|
23390
|
-
isCursor ? /* @__PURE__ */
|
|
23391
|
-
/* @__PURE__ */
|
|
23392
|
-
selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */
|
|
23393
|
-
aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */
|
|
23394
|
-
/* @__PURE__ */
|
|
23395
|
-
|
|
23466
|
+
return /* @__PURE__ */ jsxs23(Box23, { children: [
|
|
23467
|
+
isCursor ? /* @__PURE__ */ jsx27(Text24, { color: PALETTE.accent, bold: true, children: figures5.pointer }) : /* @__PURE__ */ jsx27(Text24, { children: " " }),
|
|
23468
|
+
/* @__PURE__ */ jsx27(PreviewBadge, { badge, highlighted: isSelected }),
|
|
23469
|
+
selectionStateByKey !== void 0 && (selGlyph && !isSynthetic ? /* @__PURE__ */ jsx27(Text24, { color: !isSelected && selDim ? PALETTE.muted : selColor, bold: selBold, children: " " + selGlyph }) : /* @__PURE__ */ jsx27(Text24, { children: " " })),
|
|
23470
|
+
aiFlaggedByKey !== void 0 && (aiFlagged ? /* @__PURE__ */ jsx27(Text24, { color: PALETTE.warning, bold: true, children: " [\xD7]" }) : /* @__PURE__ */ jsx27(Text24, { children: " " })),
|
|
23471
|
+
/* @__PURE__ */ jsxs23(
|
|
23472
|
+
Text24,
|
|
23396
23473
|
{
|
|
23397
23474
|
color: isSelected ? PALETTE.accent : labelStyle.dim ? PALETTE.muted : labelStyle.color,
|
|
23398
23475
|
bold: isSelected || labelStyle.bold,
|
|
@@ -23405,10 +23482,10 @@ function GroupedSidebar(props) {
|
|
|
23405
23482
|
]
|
|
23406
23483
|
}
|
|
23407
23484
|
),
|
|
23408
|
-
inheritanceStyle.glyph && /* @__PURE__ */
|
|
23485
|
+
inheritanceStyle.glyph && /* @__PURE__ */ jsx27(Text24, { color: inheritanceStyle.dim ? PALETTE.muted : inheritanceStyle.color, bold: inheritanceStyle.bold, children: " " + inheritanceStyle.glyph })
|
|
23409
23486
|
] }, row.key);
|
|
23410
23487
|
}),
|
|
23411
|
-
windowed && /* @__PURE__ */
|
|
23488
|
+
windowed && /* @__PURE__ */ jsx27(WindowFooter, { above: start, below: Math.max(0, allRows.length - end) })
|
|
23412
23489
|
] });
|
|
23413
23490
|
}
|
|
23414
23491
|
var GLYPH_EXPAND_COLLAPSED, GLYPH_EXPAND_EXPANDED, GLYPH_TREE_MID, GLYPH_TREE_LAST, GLYPH_WARN, GLYPH_ERROR;
|
|
@@ -23537,8 +23614,8 @@ var init_use_terminal_size = __esm({
|
|
|
23537
23614
|
|
|
23538
23615
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/HelpOverlay.tsx
|
|
23539
23616
|
import React11 from "react";
|
|
23540
|
-
import { Box as
|
|
23541
|
-
import { Fragment as
|
|
23617
|
+
import { Box as Box24, Text as Text25 } from "ink";
|
|
23618
|
+
import { Fragment as Fragment4, jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
23542
23619
|
function HelpOverlay(props) {
|
|
23543
23620
|
const { onClose } = props;
|
|
23544
23621
|
const { columns: terminalColumns, rows: terminalRows } = useTerminalSize();
|
|
@@ -23549,8 +23626,8 @@ function HelpOverlay(props) {
|
|
|
23549
23626
|
if (input === "h" || key.escape) onClose();
|
|
23550
23627
|
}, props.handleInput !== false);
|
|
23551
23628
|
if (props.sections) {
|
|
23552
|
-
return /* @__PURE__ */
|
|
23553
|
-
|
|
23629
|
+
return /* @__PURE__ */ jsxs24(
|
|
23630
|
+
Box24,
|
|
23554
23631
|
{
|
|
23555
23632
|
flexDirection: "column",
|
|
23556
23633
|
borderStyle: "round",
|
|
@@ -23559,19 +23636,19 @@ function HelpOverlay(props) {
|
|
|
23559
23636
|
height: panelHeight,
|
|
23560
23637
|
overflowY: "hidden",
|
|
23561
23638
|
children: [
|
|
23562
|
-
/* @__PURE__ */
|
|
23563
|
-
props.sections.map((section) => /* @__PURE__ */
|
|
23564
|
-
/* @__PURE__ */
|
|
23565
|
-
/* @__PURE__ */
|
|
23566
|
-
section.entries.map((entry) => /* @__PURE__ */
|
|
23639
|
+
/* @__PURE__ */ jsx28(Text25, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
|
|
23640
|
+
props.sections.map((section) => /* @__PURE__ */ jsxs24(React11.Fragment, { children: [
|
|
23641
|
+
/* @__PURE__ */ jsx28(Text25, { children: " " }),
|
|
23642
|
+
/* @__PURE__ */ jsx28(Text25, { bold: true, children: section.title }),
|
|
23643
|
+
section.entries.map((entry) => /* @__PURE__ */ jsx28(Text25, { children: entry.keys ? " " + entry.keys.padEnd(16) + " " + entry.label : " " + entry.label }, entry.keys + entry.label))
|
|
23567
23644
|
] }, section.title))
|
|
23568
23645
|
]
|
|
23569
23646
|
}
|
|
23570
23647
|
);
|
|
23571
23648
|
}
|
|
23572
23649
|
const mode = props.mode;
|
|
23573
|
-
return /* @__PURE__ */
|
|
23574
|
-
|
|
23650
|
+
return /* @__PURE__ */ jsxs24(
|
|
23651
|
+
Box24,
|
|
23575
23652
|
{
|
|
23576
23653
|
flexDirection: "column",
|
|
23577
23654
|
borderStyle: "round",
|
|
@@ -23580,31 +23657,31 @@ function HelpOverlay(props) {
|
|
|
23580
23657
|
height: panelHeight,
|
|
23581
23658
|
overflowY: "hidden",
|
|
23582
23659
|
children: [
|
|
23583
|
-
/* @__PURE__ */
|
|
23584
|
-
/* @__PURE__ */
|
|
23585
|
-
/* @__PURE__ */
|
|
23586
|
-
/* @__PURE__ */
|
|
23587
|
-
/* @__PURE__ */
|
|
23588
|
-
/* @__PURE__ */
|
|
23589
|
-
/* @__PURE__ */
|
|
23590
|
-
mode === "review" && /* @__PURE__ */
|
|
23591
|
-
/* @__PURE__ */
|
|
23592
|
-
/* @__PURE__ */
|
|
23593
|
-
/* @__PURE__ */
|
|
23594
|
-
/* @__PURE__ */
|
|
23595
|
-
/* @__PURE__ */
|
|
23596
|
-
/* @__PURE__ */
|
|
23597
|
-
/* @__PURE__ */
|
|
23598
|
-
/* @__PURE__ */
|
|
23599
|
-
/* @__PURE__ */
|
|
23600
|
-
/* @__PURE__ */
|
|
23601
|
-
/* @__PURE__ */
|
|
23602
|
-
/* @__PURE__ */
|
|
23603
|
-
/* @__PURE__ */
|
|
23660
|
+
/* @__PURE__ */ jsx28(Text25, { bold: true, children: "\u2500".repeat(titleRule) + " Help " + "\u2500".repeat(titleRule) }),
|
|
23661
|
+
/* @__PURE__ */ jsx28(Text25, { children: " " }),
|
|
23662
|
+
/* @__PURE__ */ jsx28(Text25, { bold: true, children: "Navigation" }),
|
|
23663
|
+
/* @__PURE__ */ jsx28(Text25, { children: " \u2191 / k / PgUp Scroll up" }),
|
|
23664
|
+
/* @__PURE__ */ jsx28(Text25, { children: " \u2193 / j / PgDn Scroll down" }),
|
|
23665
|
+
/* @__PURE__ */ jsx28(Text25, { children: " g / Home Jump to top" }),
|
|
23666
|
+
/* @__PURE__ */ jsx28(Text25, { children: " G / End Jump to bottom" }),
|
|
23667
|
+
mode === "review" && /* @__PURE__ */ jsxs24(Fragment4, { children: [
|
|
23668
|
+
/* @__PURE__ */ jsx28(Text25, { children: " " }),
|
|
23669
|
+
/* @__PURE__ */ jsx28(Text25, { bold: true, children: "[Review mode only]" }),
|
|
23670
|
+
/* @__PURE__ */ jsx28(Text25, { children: " Tab Toggle sidebar/detail" }),
|
|
23671
|
+
/* @__PURE__ */ jsx28(Text25, { children: " a Accept component" }),
|
|
23672
|
+
/* @__PURE__ */ jsx28(Text25, { children: " r Reject component" }),
|
|
23673
|
+
/* @__PURE__ */ jsx28(Text25, { children: " e Edit proposal" }),
|
|
23674
|
+
/* @__PURE__ */ jsx28(Text25, { children: " s Toggle source code" }),
|
|
23675
|
+
/* @__PURE__ */ jsx28(Text25, { children: " A Approve all" }),
|
|
23676
|
+
/* @__PURE__ */ jsx28(Text25, { children: " F Open finalize dialog" }),
|
|
23677
|
+
/* @__PURE__ */ jsx28(Text25, { children: " Ctrl+S Save draft" }),
|
|
23678
|
+
/* @__PURE__ */ jsx28(Text25, { children: " Ctrl+Z Undo" }),
|
|
23679
|
+
/* @__PURE__ */ jsx28(Text25, { children: " Ctrl+Y Redo" }),
|
|
23680
|
+
/* @__PURE__ */ jsx28(Text25, { children: " Esc Exit edit / close" })
|
|
23604
23681
|
] }),
|
|
23605
|
-
/* @__PURE__ */
|
|
23606
|
-
/* @__PURE__ */
|
|
23607
|
-
/* @__PURE__ */
|
|
23682
|
+
/* @__PURE__ */ jsx28(Text25, { children: " " }),
|
|
23683
|
+
/* @__PURE__ */ jsx28(Text25, { children: " h Close help" }),
|
|
23684
|
+
/* @__PURE__ */ jsx28(Text25, { children: " q Quit" })
|
|
23608
23685
|
]
|
|
23609
23686
|
}
|
|
23610
23687
|
);
|
|
@@ -23684,8 +23761,8 @@ var init_sidebar_input = __esm({
|
|
|
23684
23761
|
});
|
|
23685
23762
|
|
|
23686
23763
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/sidebar/components/SearchMatchSummary.tsx
|
|
23687
|
-
import { Box as
|
|
23688
|
-
import { Fragment as
|
|
23764
|
+
import { Box as Box25, Text as Text26 } from "ink";
|
|
23765
|
+
import { Fragment as Fragment5, jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
23689
23766
|
function SearchMatchSummary({
|
|
23690
23767
|
open,
|
|
23691
23768
|
query,
|
|
@@ -23696,17 +23773,17 @@ function SearchMatchSummary({
|
|
|
23696
23773
|
marginTop
|
|
23697
23774
|
}) {
|
|
23698
23775
|
if (hidden) return null;
|
|
23699
|
-
return /* @__PURE__ */
|
|
23700
|
-
open && /* @__PURE__ */
|
|
23701
|
-
/* @__PURE__ */
|
|
23776
|
+
return /* @__PURE__ */ jsxs25(Fragment5, { children: [
|
|
23777
|
+
open && /* @__PURE__ */ jsxs25(Box25, { marginTop, flexDirection: "column", children: [
|
|
23778
|
+
/* @__PURE__ */ jsxs25(Text26, { children: [
|
|
23702
23779
|
`/${query}`,
|
|
23703
|
-
/* @__PURE__ */
|
|
23704
|
-
query && /* @__PURE__ */
|
|
23705
|
-
/* @__PURE__ */
|
|
23780
|
+
/* @__PURE__ */ jsx29(Text26, { color: PALETTE.accent, children: "\u258E" }),
|
|
23781
|
+
query && /* @__PURE__ */ jsx29(Text26, { color: PALETTE.muted, children: formatSearchMatchSummary(matches, total) }),
|
|
23782
|
+
/* @__PURE__ */ jsx29(Text26, { children: " \xB7 [Esc] leave" })
|
|
23706
23783
|
] }),
|
|
23707
|
-
autocompleteCandidates.length > 1 && /* @__PURE__ */
|
|
23784
|
+
autocompleteCandidates.length > 1 && /* @__PURE__ */ jsx29(Text26, { color: PALETTE.muted, children: ` possibilities: ${autocompleteCandidates.join(" \xB7 ").slice(0, 120)}` })
|
|
23708
23785
|
] }),
|
|
23709
|
-
!open && query && /* @__PURE__ */
|
|
23786
|
+
!open && query && /* @__PURE__ */ jsx29(Box25, { marginTop, children: /* @__PURE__ */ jsx29(Text26, { children: `/${query}${formatSearchMatchSummary(matches, total)} \xB7 [Esc] clear` }) })
|
|
23710
23787
|
] });
|
|
23711
23788
|
}
|
|
23712
23789
|
var init_SearchMatchSummary = __esm({
|
|
@@ -24658,7 +24735,7 @@ function useScopeGate({ components, tokenCount, tokensWidth, onConfirm, onQuit }
|
|
|
24658
24735
|
panelOpen: false,
|
|
24659
24736
|
entryCount: 0
|
|
24660
24737
|
});
|
|
24661
|
-
const
|
|
24738
|
+
const panelLayout2 = useMemo3(() => computePanelLayout(visibleCount), [visibleCount]);
|
|
24662
24739
|
useEffect13(() => {
|
|
24663
24740
|
setNav((prev) => {
|
|
24664
24741
|
const maxIdx = Math.max(0, visibleRows.length - 1);
|
|
@@ -24942,7 +25019,7 @@ function useScopeGate({ components, tokenCount, tokensWidth, onConfirm, onQuit }
|
|
|
24942
25019
|
// layout
|
|
24943
25020
|
totalWidth,
|
|
24944
25021
|
columnPlan,
|
|
24945
|
-
panelLayout,
|
|
25022
|
+
panelLayout: panelLayout2,
|
|
24946
25023
|
visibleCount,
|
|
24947
25024
|
panelMaxRows,
|
|
24948
25025
|
// sidebar
|
|
@@ -25005,8 +25082,8 @@ var init_use_scope_gate = __esm({
|
|
|
25005
25082
|
|
|
25006
25083
|
// packages/experience-design-system-cli/src/tui/import/steps/07-scope-gate/screen.tsx
|
|
25007
25084
|
import { useEffect as useEffect14, useMemo as useMemo4 } from "react";
|
|
25008
|
-
import { Box as
|
|
25009
|
-
import { Fragment as
|
|
25085
|
+
import { Box as Box26, Text as Text27 } from "ink";
|
|
25086
|
+
import { Fragment as Fragment6, jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
25010
25087
|
function ScopeGateScreen({
|
|
25011
25088
|
components,
|
|
25012
25089
|
tokensPath,
|
|
@@ -25043,24 +25120,24 @@ function ScopeGateScreen({
|
|
|
25043
25120
|
onQuit();
|
|
25044
25121
|
}
|
|
25045
25122
|
});
|
|
25046
|
-
const { search, graph, columnPlan, panelLayout, counters } = gate;
|
|
25123
|
+
const { search, graph, columnPlan, panelLayout: panelLayout2, counters } = gate;
|
|
25047
25124
|
if (gate.showHelp) {
|
|
25048
|
-
return /* @__PURE__ */
|
|
25049
|
-
}
|
|
25050
|
-
return /* @__PURE__ */
|
|
25051
|
-
/* @__PURE__ */
|
|
25052
|
-
/* @__PURE__ */
|
|
25053
|
-
/* @__PURE__ */
|
|
25054
|
-
/* @__PURE__ */
|
|
25055
|
-
gate.aiExcludedCount > 0 && /* @__PURE__ */
|
|
25125
|
+
return /* @__PURE__ */ jsx30(HelpOverlay, { sections: HELP_SECTIONS, handleInput: false, onClose: gate.closeHelp });
|
|
25126
|
+
}
|
|
25127
|
+
return /* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", children: [
|
|
25128
|
+
/* @__PURE__ */ jsx30(StepHeader, { step: "scope-gate" }),
|
|
25129
|
+
/* @__PURE__ */ jsxs26(Box26, { flexDirection: "column", paddingX: 2, children: [
|
|
25130
|
+
/* @__PURE__ */ jsxs26(Box26, { flexDirection: "row", flexWrap: "wrap", children: [
|
|
25131
|
+
/* @__PURE__ */ jsx30(CounterStrip, { counters, totalWidth: gate.totalWidth }),
|
|
25132
|
+
gate.aiExcludedCount > 0 && /* @__PURE__ */ jsxs26(Text27, { color: PALETTE.muted, children: [
|
|
25056
25133
|
`${gate.aiExcludedCount} component${gate.aiExcludedCount === 1 ? "" : "s"} flagged by AI`,
|
|
25057
|
-
gate.aiRows.length > 0 && /* @__PURE__ */
|
|
25134
|
+
gate.aiRows.length > 0 && /* @__PURE__ */ jsx30(Text27, { color: PALETTE.accent, children: " \u2014 press [x] to see why" })
|
|
25058
25135
|
] })
|
|
25059
25136
|
] }),
|
|
25060
|
-
tokens.length > 0 && columnPlan.layout === "single" && /* @__PURE__ */
|
|
25061
|
-
graph.cycles.length > 0 && /* @__PURE__ */
|
|
25062
|
-
/* @__PURE__ */
|
|
25063
|
-
gate.aiRationalePanelOpen ? /* @__PURE__ */
|
|
25137
|
+
tokens.length > 0 && columnPlan.layout === "single" && /* @__PURE__ */ jsx30(Text27, { color: PALETTE.muted, children: `${tokens.length} design token${tokens.length === 1 ? "" : "s"} will be imported. Widen the terminal to list them.` }),
|
|
25138
|
+
graph.cycles.length > 0 && /* @__PURE__ */ jsx30(Box26, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text27, { color: PALETTE.muted, children: "If you must have components with cycles, select them together into the generate step and then use the editor to fix them." }) }),
|
|
25139
|
+
/* @__PURE__ */ jsxs26(Box26, { flexDirection: "row", alignItems: "stretch", children: [
|
|
25140
|
+
gate.aiRationalePanelOpen ? /* @__PURE__ */ jsx30(
|
|
25064
25141
|
GotoBanner,
|
|
25065
25142
|
{
|
|
25066
25143
|
title: `Review flags (${gate.aiExcludedCount})`,
|
|
@@ -25070,7 +25147,7 @@ function ScopeGateScreen({
|
|
|
25070
25147
|
width: columnPlan.main,
|
|
25071
25148
|
footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [x/Esc] close"
|
|
25072
25149
|
}
|
|
25073
|
-
) : /* @__PURE__ */
|
|
25150
|
+
) : /* @__PURE__ */ jsx30(
|
|
25074
25151
|
GroupedSidebar,
|
|
25075
25152
|
{
|
|
25076
25153
|
items: gate.groupedItems,
|
|
@@ -25082,7 +25159,7 @@ function ScopeGateScreen({
|
|
|
25082
25159
|
expandedGroups: gate.expandedGroups,
|
|
25083
25160
|
onToggleExpanded: gate.toggleExpanded,
|
|
25084
25161
|
width: columnPlan.main,
|
|
25085
|
-
height:
|
|
25162
|
+
height: panelLayout2.height,
|
|
25086
25163
|
title: "Components",
|
|
25087
25164
|
wrapLabels: true,
|
|
25088
25165
|
focused: gate.focusedColumn === "main",
|
|
@@ -25098,25 +25175,25 @@ function ScopeGateScreen({
|
|
|
25098
25175
|
graph: graph.nodes
|
|
25099
25176
|
}
|
|
25100
25177
|
),
|
|
25101
|
-
columnPlan.layout === "two-column" && /* @__PURE__ */
|
|
25102
|
-
/* @__PURE__ */
|
|
25103
|
-
/* @__PURE__ */
|
|
25178
|
+
columnPlan.layout === "two-column" && /* @__PURE__ */ jsxs26(Fragment6, { children: [
|
|
25179
|
+
/* @__PURE__ */ jsx30(Box26, { width: 2, flexShrink: 0 }),
|
|
25180
|
+
/* @__PURE__ */ jsx30(
|
|
25104
25181
|
TokensColumn,
|
|
25105
25182
|
{
|
|
25106
25183
|
width: columnPlan.tokens,
|
|
25107
25184
|
tokens,
|
|
25108
25185
|
cursor: gate.safeTokensCursor,
|
|
25109
25186
|
focused: gate.focusedColumn === "tokens",
|
|
25110
|
-
height:
|
|
25187
|
+
height: panelLayout2.height,
|
|
25111
25188
|
title: `Design tokens (${tokens.length}) \xB7 read only`,
|
|
25112
|
-
visibleCount:
|
|
25189
|
+
visibleCount: panelLayout2.sideVisibleCount
|
|
25113
25190
|
}
|
|
25114
25191
|
)
|
|
25115
25192
|
] })
|
|
25116
25193
|
] }),
|
|
25117
|
-
gate.cyclesPanelOpen && /* @__PURE__ */
|
|
25118
|
-
gate.pendingRejectCascade && /* @__PURE__ */
|
|
25119
|
-
/* @__PURE__ */
|
|
25194
|
+
gate.cyclesPanelOpen && /* @__PURE__ */ jsx30(CyclesPanel, { cycles: gate.slotCycles, cursor: gate.cyclesCursor }),
|
|
25195
|
+
gate.pendingRejectCascade && /* @__PURE__ */ jsx30(RejectPrompt, { pending: gate.pendingRejectCascade }),
|
|
25196
|
+
/* @__PURE__ */ jsx30(
|
|
25120
25197
|
SearchMatchSummary,
|
|
25121
25198
|
{
|
|
25122
25199
|
open: search.searchOpen,
|
|
@@ -25127,7 +25204,7 @@ function ScopeGateScreen({
|
|
|
25127
25204
|
marginTop: 1
|
|
25128
25205
|
}
|
|
25129
25206
|
),
|
|
25130
|
-
/* @__PURE__ */
|
|
25207
|
+
/* @__PURE__ */ jsx30(
|
|
25131
25208
|
CompactControlBar,
|
|
25132
25209
|
{
|
|
25133
25210
|
hasGroupRoots: gate.hasGroupRoots,
|
|
@@ -25309,8 +25386,18 @@ function generationLogInputs(input) {
|
|
|
25309
25386
|
has_tokens: input.hasTokens
|
|
25310
25387
|
};
|
|
25311
25388
|
}
|
|
25389
|
+
function lastProgress(progress) {
|
|
25390
|
+
const { activity, ...rest } = progress;
|
|
25391
|
+
const failed = activity.filter((item) => item.state === "failed");
|
|
25392
|
+
return {
|
|
25393
|
+
final_progress: rest,
|
|
25394
|
+
...failed.length > 0 ? {
|
|
25395
|
+
failed_components: failed.slice(0, MAX_LOGGED_FAILURES).map((item) => ({ name: item.name, error: truncate(item.error ?? "", MAX_LOGGED_ERROR) }))
|
|
25396
|
+
} : {}
|
|
25397
|
+
};
|
|
25398
|
+
}
|
|
25312
25399
|
function generationLogOutputs(result, progress) {
|
|
25313
|
-
const last = progress ?
|
|
25400
|
+
const last = progress ? lastProgress(progress) : {};
|
|
25314
25401
|
if (!result.ok) {
|
|
25315
25402
|
return { outputs: { result: "failed", failed_step: result.step, error: result.message, ...last }, status: "error" };
|
|
25316
25403
|
}
|
|
@@ -25329,7 +25416,21 @@ function generationLogOutputs(result, progress) {
|
|
|
25329
25416
|
};
|
|
25330
25417
|
}
|
|
25331
25418
|
function initialProgress2() {
|
|
25332
|
-
return { components: null, mapTokens: "idle", mapTokensEligible: null };
|
|
25419
|
+
return { components: null, activity: [], mapTokens: "idle", mapTokensEligible: null };
|
|
25420
|
+
}
|
|
25421
|
+
function applyActivityEvent(event, previous, now) {
|
|
25422
|
+
if (event.kind !== "component:started" && event.kind !== "component:completed" && event.kind !== "component:cached" && event.kind !== "component:failed") {
|
|
25423
|
+
return [...previous];
|
|
25424
|
+
}
|
|
25425
|
+
const index = previous.findIndex((item2) => item2.name === event.name);
|
|
25426
|
+
const startedAt = previous[index]?.startedAt ?? now;
|
|
25427
|
+
const item = event.kind === "component:started" ? {
|
|
25428
|
+
name: event.name,
|
|
25429
|
+
state: "running",
|
|
25430
|
+
startedAt,
|
|
25431
|
+
...event.attempt > 1 ? { detail: `attempt ${event.attempt}` } : {}
|
|
25432
|
+
} : event.kind === "component:cached" ? { name: event.name, state: "done", detail: "cached", startedAt } : event.kind === "component:failed" ? { name: event.name, state: "failed", error: event.error, ms: now - startedAt, startedAt } : { name: event.name, state: "done", ms: now - startedAt, startedAt };
|
|
25433
|
+
return index >= 0 ? previous.map((existing, i) => i === index ? item : existing) : [...previous, item];
|
|
25333
25434
|
}
|
|
25334
25435
|
function shouldRunMapTokens(counts) {
|
|
25335
25436
|
return counts.mappablePropCount > 0 && counts.rawTokenCount > 0;
|
|
@@ -25373,17 +25474,20 @@ function progressRows2(progress, agent, rowMs = []) {
|
|
|
25373
25474
|
}
|
|
25374
25475
|
return withTimes(rows, rowMs);
|
|
25375
25476
|
}
|
|
25376
|
-
var capitalize;
|
|
25477
|
+
var MAX_LOGGED_FAILURES, MAX_LOGGED_ERROR, capitalize;
|
|
25377
25478
|
var init_logic11 = __esm({
|
|
25378
25479
|
"packages/experience-design-system-cli/src/tui/import/steps/08-generation/logic.ts"() {
|
|
25379
25480
|
"use strict";
|
|
25481
|
+
init_activity();
|
|
25380
25482
|
init_logic4();
|
|
25483
|
+
MAX_LOGGED_FAILURES = 10;
|
|
25484
|
+
MAX_LOGGED_ERROR = 300;
|
|
25381
25485
|
capitalize = (name) => name.charAt(0).toUpperCase() + name.slice(1);
|
|
25382
25486
|
}
|
|
25383
25487
|
});
|
|
25384
25488
|
|
|
25385
25489
|
// packages/experience-design-system-cli/src/tui/import/steps/08-generation/screen.tsx
|
|
25386
|
-
import { jsx as
|
|
25490
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
25387
25491
|
function GenerationScreen({
|
|
25388
25492
|
progress,
|
|
25389
25493
|
agent,
|
|
@@ -25391,18 +25495,20 @@ function GenerationScreen({
|
|
|
25391
25495
|
hasTokens,
|
|
25392
25496
|
rowMs
|
|
25393
25497
|
}) {
|
|
25394
|
-
return /* @__PURE__ */
|
|
25498
|
+
return /* @__PURE__ */ jsx31(
|
|
25395
25499
|
RunningStep,
|
|
25396
25500
|
{
|
|
25397
25501
|
step: "generation",
|
|
25398
25502
|
description: describeGeneration({ acceptedCount, agent, hasTokens }),
|
|
25399
|
-
lines: progressRows2(progress, agent, rowMs)
|
|
25503
|
+
lines: progressRows2(progress, agent, rowMs),
|
|
25504
|
+
aside: progress.activity.length > 0 ? /* @__PURE__ */ jsx31(ActivityPanel, { title: "Components", items: progress.activity }) : void 0
|
|
25400
25505
|
}
|
|
25401
25506
|
);
|
|
25402
25507
|
}
|
|
25403
25508
|
var init_screen9 = __esm({
|
|
25404
25509
|
"packages/experience-design-system-cli/src/tui/import/steps/08-generation/screen.tsx"() {
|
|
25405
25510
|
"use strict";
|
|
25511
|
+
init_activity_panel();
|
|
25406
25512
|
init_shared2();
|
|
25407
25513
|
init_logic11();
|
|
25408
25514
|
}
|
|
@@ -25460,7 +25566,7 @@ var init_save_decisions = __esm({
|
|
|
25460
25566
|
// packages/experience-design-system-cli/src/tui/import/steps/08-generation/run.ts
|
|
25461
25567
|
import { resolve as resolve25 } from "node:path";
|
|
25462
25568
|
async function runGeneration(input, onProgress, deps = realDeps4) {
|
|
25463
|
-
let progress = { components: null, mapTokens: "idle", mapTokensEligible: null };
|
|
25569
|
+
let progress = { components: null, activity: [], mapTokens: "idle", mapTokensEligible: null };
|
|
25464
25570
|
const update = (change) => {
|
|
25465
25571
|
progress = { ...progress, ...change };
|
|
25466
25572
|
onProgress(progress);
|
|
@@ -25488,7 +25594,10 @@ async function runGeneration(input, onProgress, deps = realDeps4) {
|
|
|
25488
25594
|
noCache: input.noCache,
|
|
25489
25595
|
existingEntitiesPath: input.existingEntitiesPath,
|
|
25490
25596
|
precomputedCachedNames: new Set(handedOverNames),
|
|
25491
|
-
onProgress: (event) => update({
|
|
25597
|
+
onProgress: (event) => update({
|
|
25598
|
+
components: applyProgressEvent2(event, progress.components, accepted.length),
|
|
25599
|
+
activity: applyActivityEvent(event, progress.activity, Date.now())
|
|
25600
|
+
})
|
|
25492
25601
|
});
|
|
25493
25602
|
} catch (error) {
|
|
25494
25603
|
return fail2("generate components", errorMessage3(error));
|
|
@@ -25580,6 +25689,7 @@ var init_run2 = __esm({
|
|
|
25580
25689
|
init_src3();
|
|
25581
25690
|
init_find_skill_path();
|
|
25582
25691
|
init_logic9();
|
|
25692
|
+
init_logic11();
|
|
25583
25693
|
init_map_tokens();
|
|
25584
25694
|
init_save_decisions();
|
|
25585
25695
|
COMPONENTS_SKILL_PATH = findSkillPath("generate-components.md");
|
|
@@ -25608,7 +25718,7 @@ function useGeneration(input) {
|
|
|
25608
25718
|
return;
|
|
25609
25719
|
}
|
|
25610
25720
|
setState({ status: "running", progress: initialProgress2(), rowMs: [] });
|
|
25611
|
-
let
|
|
25721
|
+
let lastProgress2;
|
|
25612
25722
|
const startedAt = Date.now();
|
|
25613
25723
|
let rowMs = [];
|
|
25614
25724
|
startDebugRun({
|
|
@@ -25618,13 +25728,13 @@ function useGeneration(input) {
|
|
|
25618
25728
|
inputs: generationLogInputs(input)
|
|
25619
25729
|
});
|
|
25620
25730
|
void runGeneration(input, (progress) => {
|
|
25621
|
-
|
|
25731
|
+
lastProgress2 = progress;
|
|
25622
25732
|
rowMs = trackFinished(rowMs, progressRows2(progress, input.agent), Date.now() - startedAt);
|
|
25623
25733
|
if (current.current === input) setState({ status: "running", progress, rowMs });
|
|
25624
25734
|
}).then((result) => {
|
|
25625
25735
|
if (current.current !== input) return;
|
|
25626
25736
|
void finishDebugRun({
|
|
25627
|
-
...generationLogOutputs(result,
|
|
25737
|
+
...generationLogOutputs(result, lastProgress2),
|
|
25628
25738
|
exitMethod: result.ok ? "saved" : "discarded"
|
|
25629
25739
|
});
|
|
25630
25740
|
setState({ status: "done", result });
|
|
@@ -26310,7 +26420,7 @@ var init_logic12 = __esm({
|
|
|
26310
26420
|
});
|
|
26311
26421
|
|
|
26312
26422
|
// packages/experience-design-system-cli/src/tui/import/steps/preview-validation-error/screen.tsx
|
|
26313
|
-
import { jsx as
|
|
26423
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
26314
26424
|
function PreviewValidationErrorScreen({
|
|
26315
26425
|
errors,
|
|
26316
26426
|
missingNames,
|
|
@@ -26319,7 +26429,7 @@ function PreviewValidationErrorScreen({
|
|
|
26319
26429
|
onQuit
|
|
26320
26430
|
}) {
|
|
26321
26431
|
const matchedNames = matchedComponentNames(errors, missingNames);
|
|
26322
|
-
return /* @__PURE__ */
|
|
26432
|
+
return /* @__PURE__ */ jsx32(
|
|
26323
26433
|
GateStep,
|
|
26324
26434
|
{
|
|
26325
26435
|
intent: "error",
|
|
@@ -26693,8 +26803,8 @@ var init_scroll_offset = __esm({
|
|
|
26693
26803
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FieldEditor.tsx
|
|
26694
26804
|
import React13, { useEffect as useEffect17, useLayoutEffect as useLayoutEffect2, useState as useState19 } from "react";
|
|
26695
26805
|
import figures6 from "figures";
|
|
26696
|
-
import { Box as
|
|
26697
|
-
import { Fragment as
|
|
26806
|
+
import { Box as Box27, measureElement, Text as Text28 } from "ink";
|
|
26807
|
+
import { Fragment as Fragment7, jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
26698
26808
|
function createCommonRowProps(selected, focusLevel, editingField, textCursor, valueCursor, cursorVisible, editingValue, valueText, width) {
|
|
26699
26809
|
return {
|
|
26700
26810
|
selected,
|
|
@@ -26832,14 +26942,14 @@ function serializeState(state2, originalJson) {
|
|
|
26832
26942
|
return JSON.stringify(entry, null, 2);
|
|
26833
26943
|
}
|
|
26834
26944
|
function Picker({ value, active }) {
|
|
26835
|
-
return /* @__PURE__ */
|
|
26836
|
-
active && /* @__PURE__ */
|
|
26837
|
-
/* @__PURE__ */
|
|
26838
|
-
active && /* @__PURE__ */
|
|
26945
|
+
return /* @__PURE__ */ jsxs27(Box27, { children: [
|
|
26946
|
+
active && /* @__PURE__ */ jsx33(Text28, { color: PALETTE.warning, children: "\u2039" }),
|
|
26947
|
+
/* @__PURE__ */ jsx33(Text28, { color: active ? PALETTE.warning : void 0, bold: active, children: value }),
|
|
26948
|
+
active && /* @__PURE__ */ jsx33(Text28, { color: PALETTE.warning, children: "\u203A" })
|
|
26839
26949
|
] });
|
|
26840
26950
|
}
|
|
26841
26951
|
function Toggle({ value, active }) {
|
|
26842
|
-
return /* @__PURE__ */
|
|
26952
|
+
return /* @__PURE__ */ jsx33(Box27, { children: /* @__PURE__ */ jsx33(Text28, { color: active ? PALETTE.warning : value ? PALETTE.success : PALETTE.border, children: value ? "[\u2713]" : "[ ]" }) });
|
|
26843
26953
|
}
|
|
26844
26954
|
function InlinePropField({
|
|
26845
26955
|
label,
|
|
@@ -26848,8 +26958,8 @@ function InlinePropField({
|
|
|
26848
26958
|
flexible = false,
|
|
26849
26959
|
width
|
|
26850
26960
|
}) {
|
|
26851
|
-
return /* @__PURE__ */
|
|
26852
|
-
/* @__PURE__ */
|
|
26961
|
+
return /* @__PURE__ */ jsxs27(Box27, { width, gap: 1, flexShrink: flexible ? 1 : 0, flexGrow: flexible ? 1 : 0, flexWrap: "wrap", children: [
|
|
26962
|
+
/* @__PURE__ */ jsxs27(Text28, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, wrap: "truncate-end", children: [
|
|
26853
26963
|
focused ? "\u203A " : " ",
|
|
26854
26964
|
label
|
|
26855
26965
|
] }),
|
|
@@ -26862,19 +26972,19 @@ function RequiredField({
|
|
|
26862
26972
|
editingField,
|
|
26863
26973
|
activeField
|
|
26864
26974
|
}) {
|
|
26865
|
-
return /* @__PURE__ */
|
|
26975
|
+
return /* @__PURE__ */ jsx33(InlinePropField, { label: "req:", focused, children: /* @__PURE__ */ jsx33(Toggle, { value, active: editingField && activeField === "required" }) });
|
|
26866
26976
|
}
|
|
26867
26977
|
function DefaultValueRow({
|
|
26868
26978
|
display,
|
|
26869
26979
|
active,
|
|
26870
26980
|
focused
|
|
26871
26981
|
}) {
|
|
26872
|
-
return /* @__PURE__ */
|
|
26873
|
-
/* @__PURE__ */
|
|
26982
|
+
return /* @__PURE__ */ jsxs27(Box27, { gap: 1, flexWrap: "wrap", flexShrink: 0, children: [
|
|
26983
|
+
/* @__PURE__ */ jsxs27(Text28, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
26874
26984
|
focused ? "\u203A " : " ",
|
|
26875
26985
|
"default:"
|
|
26876
26986
|
] }),
|
|
26877
|
-
active ? /* @__PURE__ */
|
|
26987
|
+
active ? /* @__PURE__ */ jsx33(Picker, { value: display, active: true }) : /* @__PURE__ */ jsx33(Text28, { wrap: "wrap", children: display })
|
|
26878
26988
|
] });
|
|
26879
26989
|
}
|
|
26880
26990
|
function RowLabel({
|
|
@@ -26882,8 +26992,8 @@ function RowLabel({
|
|
|
26882
26992
|
selected,
|
|
26883
26993
|
trailing = true
|
|
26884
26994
|
}) {
|
|
26885
|
-
return /* @__PURE__ */
|
|
26886
|
-
|
|
26995
|
+
return /* @__PURE__ */ jsxs27(
|
|
26996
|
+
Text28,
|
|
26887
26997
|
{
|
|
26888
26998
|
color: selected ? PALETTE.onAccent : PALETTE.accent,
|
|
26889
26999
|
bold: selected,
|
|
@@ -26902,10 +27012,10 @@ function ValueInputRow({
|
|
|
26902
27012
|
valueText,
|
|
26903
27013
|
cursorVisible
|
|
26904
27014
|
}) {
|
|
26905
|
-
return /* @__PURE__ */
|
|
26906
|
-
/* @__PURE__ */
|
|
26907
|
-
/* @__PURE__ */
|
|
26908
|
-
/* @__PURE__ */
|
|
27015
|
+
return /* @__PURE__ */ jsxs27(Box27, { paddingLeft: 2, children: [
|
|
27016
|
+
/* @__PURE__ */ jsx33(Text28, { color: PALETTE.accent, children: mode === "edit" ? "\u270E " : "+ " }),
|
|
27017
|
+
/* @__PURE__ */ jsx33(Text28, { children: valueText }),
|
|
27018
|
+
/* @__PURE__ */ jsx33(Text28, { inverse: cursorVisible, children: " " })
|
|
26909
27019
|
] });
|
|
26910
27020
|
}
|
|
26911
27021
|
function EditableListItem({
|
|
@@ -26918,9 +27028,9 @@ function EditableListItem({
|
|
|
26918
27028
|
}) {
|
|
26919
27029
|
const isBeingEdited = editingValue?.mode === "edit" && editingValue.index === index;
|
|
26920
27030
|
if (isBeingEdited) {
|
|
26921
|
-
return /* @__PURE__ */
|
|
27031
|
+
return /* @__PURE__ */ jsx33(ValueInputRow, { mode: "edit", valueText, cursorVisible });
|
|
26922
27032
|
}
|
|
26923
|
-
return /* @__PURE__ */
|
|
27033
|
+
return /* @__PURE__ */ jsx33(Box27, { gap: 1, paddingLeft: 2, children: /* @__PURE__ */ jsx33(Text28, { color: active ? PALETTE.accent : void 0, children: active ? `${figures6.pointer} ${value}` : ` ${value}` }) });
|
|
26924
27034
|
}
|
|
26925
27035
|
function EditableValueList({
|
|
26926
27036
|
values,
|
|
@@ -26933,9 +27043,9 @@ function EditableValueList({
|
|
|
26933
27043
|
emptyPaddingLeft,
|
|
26934
27044
|
showAddInput
|
|
26935
27045
|
}) {
|
|
26936
|
-
return /* @__PURE__ */
|
|
26937
|
-
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */
|
|
26938
|
-
values.map((value, index) => /* @__PURE__ */
|
|
27046
|
+
return /* @__PURE__ */ jsxs27(Fragment7, { children: [
|
|
27047
|
+
values.length === 0 && !editingValue && (emptyPaddingLeft === void 0 ? /* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: emptyMessage }) : /* @__PURE__ */ jsx33(Box27, { paddingLeft: emptyPaddingLeft, children: /* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: emptyMessage }) })),
|
|
27048
|
+
values.map((value, index) => /* @__PURE__ */ jsx33(
|
|
26939
27049
|
EditableListItem,
|
|
26940
27050
|
{
|
|
26941
27051
|
value,
|
|
@@ -26947,7 +27057,7 @@ function EditableValueList({
|
|
|
26947
27057
|
},
|
|
26948
27058
|
index
|
|
26949
27059
|
)),
|
|
26950
|
-
showAddInput && editingValue?.mode === "add" && /* @__PURE__ */
|
|
27060
|
+
showAddInput && editingValue?.mode === "add" && /* @__PURE__ */ jsx33(ValueInputRow, { mode: "add", valueText, cursorVisible })
|
|
26951
27061
|
] });
|
|
26952
27062
|
}
|
|
26953
27063
|
function DefaultSubRow({
|
|
@@ -26959,51 +27069,51 @@ function DefaultSubRow({
|
|
|
26959
27069
|
}) {
|
|
26960
27070
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
26961
27071
|
if (prop.type === "richtext" || prop.type === "media" || prop.type === "link") {
|
|
26962
|
-
return /* @__PURE__ */
|
|
26963
|
-
/* @__PURE__ */
|
|
27072
|
+
return /* @__PURE__ */ jsxs27(Box27, { gap: 1, flexShrink: 0, children: [
|
|
27073
|
+
/* @__PURE__ */ jsxs27(Text28, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
26964
27074
|
focused ? "\u203A " : " ",
|
|
26965
27075
|
"default:"
|
|
26966
27076
|
] }),
|
|
26967
|
-
/* @__PURE__ */
|
|
27077
|
+
/* @__PURE__ */ jsx33(Text28, { color: focused ? void 0 : PALETTE.muted, children: "(not applicable)" })
|
|
26968
27078
|
] });
|
|
26969
27079
|
}
|
|
26970
27080
|
if (prop.type === "boolean") {
|
|
26971
27081
|
const display = prop.default === true ? "true" : prop.default === false ? "false" : "(unset)";
|
|
26972
|
-
return /* @__PURE__ */
|
|
27082
|
+
return /* @__PURE__ */ jsx33(DefaultValueRow, { display, active, focused });
|
|
26973
27083
|
}
|
|
26974
27084
|
if (prop.type === "enum") {
|
|
26975
27085
|
if (prop.values.length === 0) {
|
|
26976
|
-
return /* @__PURE__ */
|
|
26977
|
-
/* @__PURE__ */
|
|
27086
|
+
return /* @__PURE__ */ jsxs27(Box27, { gap: 1, flexShrink: 0, children: [
|
|
27087
|
+
/* @__PURE__ */ jsxs27(Text28, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
26978
27088
|
focused ? "\u203A " : " ",
|
|
26979
27089
|
"default:"
|
|
26980
27090
|
] }),
|
|
26981
|
-
/* @__PURE__ */
|
|
27091
|
+
/* @__PURE__ */ jsx33(Text28, { color: focused ? void 0 : PALETTE.muted, children: "(no values defined)" })
|
|
26982
27092
|
] });
|
|
26983
27093
|
}
|
|
26984
27094
|
const display = typeof prop.default === "string" && prop.default !== "" ? prop.default : "(unset)";
|
|
26985
|
-
return /* @__PURE__ */
|
|
27095
|
+
return /* @__PURE__ */ jsx33(DefaultValueRow, { display, active, focused });
|
|
26986
27096
|
}
|
|
26987
27097
|
const value = typeof prop.default === "string" ? prop.default : "";
|
|
26988
27098
|
if (active) {
|
|
26989
|
-
return /* @__PURE__ */
|
|
26990
|
-
/* @__PURE__ */
|
|
27099
|
+
return /* @__PURE__ */ jsxs27(Box27, { flexDirection: "row", flexShrink: 0, children: [
|
|
27100
|
+
/* @__PURE__ */ jsxs27(Text28, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
26991
27101
|
focused ? "\u203A " : " ",
|
|
26992
27102
|
"default:"
|
|
26993
27103
|
] }),
|
|
26994
|
-
/* @__PURE__ */
|
|
26995
|
-
/* @__PURE__ */
|
|
26996
|
-
/* @__PURE__ */
|
|
26997
|
-
/* @__PURE__ */
|
|
27104
|
+
/* @__PURE__ */ jsxs27(Box27, { flexGrow: 1, borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
27105
|
+
/* @__PURE__ */ jsx33(Text28, { children: value.slice(0, textCursor) }),
|
|
27106
|
+
/* @__PURE__ */ jsx33(Text28, { inverse: cursorVisible, children: value[textCursor] ?? cursor }),
|
|
27107
|
+
/* @__PURE__ */ jsx33(Text28, { children: value.slice(textCursor + 1) })
|
|
26998
27108
|
] })
|
|
26999
27109
|
] });
|
|
27000
27110
|
}
|
|
27001
|
-
return /* @__PURE__ */
|
|
27002
|
-
/* @__PURE__ */
|
|
27111
|
+
return /* @__PURE__ */ jsxs27(Box27, { gap: 1, flexShrink: 0, children: [
|
|
27112
|
+
/* @__PURE__ */ jsxs27(Text28, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
27003
27113
|
focused ? "\u203A " : " ",
|
|
27004
27114
|
"default:"
|
|
27005
27115
|
] }),
|
|
27006
|
-
/* @__PURE__ */
|
|
27116
|
+
/* @__PURE__ */ jsx33(Text28, { color: focused || value ? void 0 : PALETTE.muted, children: value || "(none)" })
|
|
27007
27117
|
] });
|
|
27008
27118
|
}
|
|
27009
27119
|
function DescriptionField({
|
|
@@ -27018,20 +27128,20 @@ function DescriptionField({
|
|
|
27018
27128
|
paddingLeft = 2
|
|
27019
27129
|
}) {
|
|
27020
27130
|
if (compact) {
|
|
27021
|
-
return /* @__PURE__ */
|
|
27022
|
-
/* @__PURE__ */
|
|
27131
|
+
return /* @__PURE__ */ jsxs27(Box27, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
27132
|
+
/* @__PURE__ */ jsxs27(Text28, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
27023
27133
|
focused ? "\u203A " : " ",
|
|
27024
27134
|
label
|
|
27025
27135
|
] }),
|
|
27026
|
-
/* @__PURE__ */
|
|
27136
|
+
/* @__PURE__ */ jsx33(Text28, { wrap: "truncate-end", color: value ? void 0 : PALETTE.muted, children: value || "\u2014" })
|
|
27027
27137
|
] });
|
|
27028
27138
|
}
|
|
27029
|
-
return /* @__PURE__ */
|
|
27030
|
-
/* @__PURE__ */
|
|
27139
|
+
return /* @__PURE__ */ jsxs27(Box27, { paddingLeft, flexDirection: "column", width, flexShrink: 0, children: [
|
|
27140
|
+
/* @__PURE__ */ jsxs27(Text28, { color: focused ? PALETTE.warning : PALETTE.muted, bold: focused, children: [
|
|
27031
27141
|
focused ? "\u203A " : " ",
|
|
27032
27142
|
label
|
|
27033
27143
|
] }),
|
|
27034
|
-
editing ? /* @__PURE__ */
|
|
27144
|
+
editing ? /* @__PURE__ */ jsx33(EditableDescription, { cursorVisible, value, textCursor }) : /* @__PURE__ */ jsx33(Text28, { wrap: "wrap", children: value || "\u2014" })
|
|
27035
27145
|
] });
|
|
27036
27146
|
}
|
|
27037
27147
|
function EditableDescription({
|
|
@@ -27039,9 +27149,9 @@ function EditableDescription({
|
|
|
27039
27149
|
value,
|
|
27040
27150
|
textCursor
|
|
27041
27151
|
}) {
|
|
27042
|
-
return /* @__PURE__ */
|
|
27152
|
+
return /* @__PURE__ */ jsxs27(Text28, { wrap: "wrap", children: [
|
|
27043
27153
|
value.slice(0, textCursor),
|
|
27044
|
-
/* @__PURE__ */
|
|
27154
|
+
/* @__PURE__ */ jsx33(Text28, { inverse: cursorVisible, children: value[textCursor] ?? " " }),
|
|
27045
27155
|
value.slice(textCursor + 1)
|
|
27046
27156
|
] });
|
|
27047
27157
|
}
|
|
@@ -27062,9 +27172,9 @@ function PropRow({
|
|
|
27062
27172
|
}) {
|
|
27063
27173
|
const descFocused = activeField === "description";
|
|
27064
27174
|
const descActive = editingField && descFocused;
|
|
27065
|
-
return /* @__PURE__ */
|
|
27066
|
-
/* @__PURE__ */
|
|
27067
|
-
/* @__PURE__ */
|
|
27175
|
+
return /* @__PURE__ */ jsxs27(Box27, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
27176
|
+
/* @__PURE__ */ jsx33(Box27, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx33(RowLabel, { name: prop.name, selected }) }),
|
|
27177
|
+
/* @__PURE__ */ jsx33(
|
|
27068
27178
|
DescriptionField,
|
|
27069
27179
|
{
|
|
27070
27180
|
value: prop.description,
|
|
@@ -27077,8 +27187,8 @@ function PropRow({
|
|
|
27077
27187
|
paddingLeft: 0
|
|
27078
27188
|
}
|
|
27079
27189
|
),
|
|
27080
|
-
/* @__PURE__ */
|
|
27081
|
-
/* @__PURE__ */
|
|
27190
|
+
/* @__PURE__ */ jsxs27(Box27, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
27191
|
+
/* @__PURE__ */ jsx33(
|
|
27082
27192
|
RequiredField,
|
|
27083
27193
|
{
|
|
27084
27194
|
value: prop.required,
|
|
@@ -27087,21 +27197,21 @@ function PropRow({
|
|
|
27087
27197
|
activeField
|
|
27088
27198
|
}
|
|
27089
27199
|
),
|
|
27090
|
-
/* @__PURE__ */
|
|
27200
|
+
/* @__PURE__ */ jsx33(InlinePropField, { label: "type:", focused: activeField === "type", children: editingField && activeField === "type" ? /* @__PURE__ */ jsx33(Picker, { value: prop.type, active: true }) : /* @__PURE__ */ jsx33(Text28, { children: prop.type }) })
|
|
27091
27201
|
] }),
|
|
27092
|
-
prop.type === "token" && /* @__PURE__ */
|
|
27093
|
-
prop.type === "enum" && /* @__PURE__ */
|
|
27094
|
-
/* @__PURE__ */
|
|
27202
|
+
prop.type === "token" && /* @__PURE__ */ jsx33(InlinePropField, { label: "kind:", focused: activeField === "tokenKind", width, children: editingField && activeField === "tokenKind" ? /* @__PURE__ */ jsx33(Picker, { value: prop.tokenKind || DESIGN_TOKEN_TYPES2[0], active: true }) : /* @__PURE__ */ jsx33(Text28, { wrap: "wrap", children: prop.tokenKind || "\u2014" }) }),
|
|
27203
|
+
prop.type === "enum" && /* @__PURE__ */ jsxs27(Box27, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
27204
|
+
/* @__PURE__ */ jsxs27(Text28, { color: activeField === "values" ? PALETTE.warning : PALETTE.muted, bold: activeField === "values", children: [
|
|
27095
27205
|
activeField === "values" ? "\u203A " : " ",
|
|
27096
27206
|
"values:"
|
|
27097
27207
|
] }),
|
|
27098
|
-
/* @__PURE__ */
|
|
27208
|
+
/* @__PURE__ */ jsxs27(Text28, { wrap: "wrap", children: [
|
|
27099
27209
|
"[",
|
|
27100
27210
|
prop.values.join(", "),
|
|
27101
27211
|
"]"
|
|
27102
27212
|
] })
|
|
27103
27213
|
] }),
|
|
27104
|
-
/* @__PURE__ */
|
|
27214
|
+
/* @__PURE__ */ jsx33(
|
|
27105
27215
|
DefaultSubRow,
|
|
27106
27216
|
{
|
|
27107
27217
|
prop,
|
|
@@ -27111,13 +27221,13 @@ function PropRow({
|
|
|
27111
27221
|
cursorVisible
|
|
27112
27222
|
}
|
|
27113
27223
|
),
|
|
27114
|
-
prop.type === "token" && prop.category === "design" && /* @__PURE__ */
|
|
27115
|
-
/* @__PURE__ */
|
|
27224
|
+
prop.type === "token" && prop.category === "design" && /* @__PURE__ */ jsxs27(Box27, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
27225
|
+
/* @__PURE__ */ jsxs27(Text28, { color: activeField === "allowed" ? PALETTE.warning : PALETTE.muted, bold: activeField === "allowed", children: [
|
|
27116
27226
|
activeField === "allowed" ? "\u203A " : " ",
|
|
27117
27227
|
"allowed:"
|
|
27118
27228
|
] }),
|
|
27119
|
-
editingField && activeField === "allowed" ? /* @__PURE__ */
|
|
27120
|
-
|
|
27229
|
+
editingField && activeField === "allowed" ? /* @__PURE__ */ jsx33(Box27, { width: Math.max(1, width - 4), borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: /* @__PURE__ */ jsx33(Text28, { children: "press [t] to edit allowed tokens" }) }) : /* @__PURE__ */ jsx33(
|
|
27230
|
+
Text28,
|
|
27121
27231
|
{
|
|
27122
27232
|
color: activeField !== "allowed" && prop.allowed.length === 0 ? PALETTE.muted : void 0,
|
|
27123
27233
|
wrap: "wrap",
|
|
@@ -27125,17 +27235,17 @@ function PropRow({
|
|
|
27125
27235
|
}
|
|
27126
27236
|
)
|
|
27127
27237
|
] }),
|
|
27128
|
-
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */
|
|
27238
|
+
selected && showRationale && rationale && rationale.trim().length > 0 && /* @__PURE__ */ jsx33(Box27, { paddingLeft: 2, children: /* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: (() => {
|
|
27129
27239
|
const max = Math.max(8, width - 8);
|
|
27130
27240
|
const text = `~ ${rationale}`;
|
|
27131
27241
|
return text.length > max ? text.slice(0, max - 1) + "\u2026" : text;
|
|
27132
27242
|
})() }) }, rowKey ? `rationale-${rowKey}` : void 0),
|
|
27133
|
-
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */
|
|
27134
|
-
/* @__PURE__ */
|
|
27135
|
-
/* @__PURE__ */
|
|
27136
|
-
activeField === "values" && /* @__PURE__ */
|
|
27243
|
+
selected && prop.type === "enum" && activeField === "values" && /* @__PURE__ */ jsxs27(Box27, { paddingLeft: 2, flexDirection: "column", children: [
|
|
27244
|
+
/* @__PURE__ */ jsxs27(Box27, { children: [
|
|
27245
|
+
/* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: "values:" }),
|
|
27246
|
+
activeField === "values" && /* @__PURE__ */ jsx33(Text28, { children: " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
|
|
27137
27247
|
] }),
|
|
27138
|
-
/* @__PURE__ */
|
|
27248
|
+
/* @__PURE__ */ jsx33(
|
|
27139
27249
|
EditableValueList,
|
|
27140
27250
|
{
|
|
27141
27251
|
values: prop.values,
|
|
@@ -27165,9 +27275,9 @@ function SlotRow({
|
|
|
27165
27275
|
pickerCandidates,
|
|
27166
27276
|
pickerCursor
|
|
27167
27277
|
}) {
|
|
27168
|
-
return /* @__PURE__ */
|
|
27169
|
-
/* @__PURE__ */
|
|
27170
|
-
/* @__PURE__ */
|
|
27278
|
+
return /* @__PURE__ */ jsxs27(Box27, { flexDirection: "column", width, flexShrink: 0, children: [
|
|
27279
|
+
/* @__PURE__ */ jsx33(Box27, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx33(RowLabel, { name: slot.name, selected, trailing: false }) }),
|
|
27280
|
+
/* @__PURE__ */ jsx33(
|
|
27171
27281
|
DescriptionField,
|
|
27172
27282
|
{
|
|
27173
27283
|
value: slot.description,
|
|
@@ -27180,7 +27290,7 @@ function SlotRow({
|
|
|
27180
27290
|
paddingLeft: 0
|
|
27181
27291
|
}
|
|
27182
27292
|
),
|
|
27183
|
-
/* @__PURE__ */
|
|
27293
|
+
/* @__PURE__ */ jsx33(Box27, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: /* @__PURE__ */ jsx33(
|
|
27184
27294
|
RequiredField,
|
|
27185
27295
|
{
|
|
27186
27296
|
value: slot.required,
|
|
@@ -27189,9 +27299,9 @@ function SlotRow({
|
|
|
27189
27299
|
activeField
|
|
27190
27300
|
}
|
|
27191
27301
|
) }),
|
|
27192
|
-
!(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */
|
|
27193
|
-
/* @__PURE__ */
|
|
27194
|
-
|
|
27302
|
+
!(selected && editingField && activeField === "allowedComponents") && /* @__PURE__ */ jsxs27(Box27, { gap: 1, flexWrap: "wrap", width, flexShrink: 0, children: [
|
|
27303
|
+
/* @__PURE__ */ jsxs27(
|
|
27304
|
+
Text28,
|
|
27195
27305
|
{
|
|
27196
27306
|
color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
|
|
27197
27307
|
bold: activeField === "allowedComponents",
|
|
@@ -27201,12 +27311,12 @@ function SlotRow({
|
|
|
27201
27311
|
]
|
|
27202
27312
|
}
|
|
27203
27313
|
),
|
|
27204
|
-
slot.allowedComponents.length === 0 ? /* @__PURE__ */
|
|
27314
|
+
slot.allowedComponents.length === 0 ? /* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: "(any)" }) : /* @__PURE__ */ jsx33(Text28, { wrap: "wrap", children: slot.allowedComponents.join(", ") })
|
|
27205
27315
|
] }),
|
|
27206
|
-
selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */
|
|
27207
|
-
/* @__PURE__ */
|
|
27208
|
-
/* @__PURE__ */
|
|
27209
|
-
|
|
27316
|
+
selected && editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsxs27(Box27, { flexDirection: "column", children: [
|
|
27317
|
+
/* @__PURE__ */ jsxs27(Box27, { children: [
|
|
27318
|
+
/* @__PURE__ */ jsxs27(
|
|
27319
|
+
Text28,
|
|
27210
27320
|
{
|
|
27211
27321
|
color: activeField === "allowedComponents" ? PALETTE.warning : PALETTE.muted,
|
|
27212
27322
|
bold: activeField === "allowedComponents",
|
|
@@ -27216,9 +27326,9 @@ function SlotRow({
|
|
|
27216
27326
|
]
|
|
27217
27327
|
}
|
|
27218
27328
|
),
|
|
27219
|
-
editingField && activeField === "allowedComponents" && /* @__PURE__ */
|
|
27329
|
+
editingField && activeField === "allowedComponents" && /* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: slot.allowedComponents.length > 0 ? " [a] add [e] edit [r] remove [\u2190\u2192] cycle [\u2191\u2193] navigate [K/J] reorder" : " [a] add [e] edit [r] remove [\u2191\u2193] navigate [K/J] reorder" })
|
|
27220
27330
|
] }),
|
|
27221
|
-
/* @__PURE__ */
|
|
27331
|
+
/* @__PURE__ */ jsx33(
|
|
27222
27332
|
EditableValueList,
|
|
27223
27333
|
{
|
|
27224
27334
|
values: slot.allowedComponents,
|
|
@@ -27232,21 +27342,21 @@ function SlotRow({
|
|
|
27232
27342
|
showAddInput: editingField && activeField === "allowedComponents"
|
|
27233
27343
|
}
|
|
27234
27344
|
),
|
|
27235
|
-
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */
|
|
27345
|
+
editingField && editingValue?.mode === "add" && activeField === "allowedComponents" && pickerCandidates !== null && /* @__PURE__ */ jsx33(Box27, { paddingLeft: 2, flexDirection: "column", children: pickerCandidates.length === 0 ? /* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: "(no valid components to add \u2014 all remaining candidates would create cycles)" }) : (() => {
|
|
27236
27346
|
const filtered = valueText.length === 0 ? pickerCandidates : pickerCandidates.filter((n) => n.toLowerCase().includes(valueText.toLowerCase()));
|
|
27237
27347
|
if (filtered.length === 0) {
|
|
27238
|
-
return /* @__PURE__ */
|
|
27348
|
+
return /* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: "(no candidates match \u2014 Enter to add as free text)" });
|
|
27239
27349
|
}
|
|
27240
27350
|
const cursor = pickerCursor % filtered.length;
|
|
27241
27351
|
const MAX_VISIBLE = 5;
|
|
27242
27352
|
const start = Math.max(0, Math.min(filtered.length - MAX_VISIBLE, cursor - 2));
|
|
27243
27353
|
const slice = filtered.slice(start, start + MAX_VISIBLE);
|
|
27244
|
-
return /* @__PURE__ */
|
|
27245
|
-
/* @__PURE__ */
|
|
27354
|
+
return /* @__PURE__ */ jsxs27(Box27, { flexDirection: "column", children: [
|
|
27355
|
+
/* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: " candidates (\u2191\u2193 cycle, Enter to add):" }),
|
|
27246
27356
|
slice.map((name, i) => {
|
|
27247
27357
|
const absIdx = start + i;
|
|
27248
27358
|
const isCursor = absIdx === cursor;
|
|
27249
|
-
return /* @__PURE__ */
|
|
27359
|
+
return /* @__PURE__ */ jsx33(Text28, { color: isCursor ? PALETTE.accent : PALETTE.muted, children: isCursor ? ` ${figures6.pointer} ${name}` : ` ${name}` }, name);
|
|
27250
27360
|
})
|
|
27251
27361
|
] });
|
|
27252
27362
|
})() })
|
|
@@ -28125,18 +28235,18 @@ function FieldEditor({
|
|
|
28125
28235
|
});
|
|
28126
28236
|
const innerWidth = Math.max(1, width - 2);
|
|
28127
28237
|
if (parseErr) {
|
|
28128
|
-
return /* @__PURE__ */
|
|
28129
|
-
/* @__PURE__ */
|
|
28130
|
-
/* @__PURE__ */
|
|
28131
|
-
/* @__PURE__ */
|
|
28238
|
+
return /* @__PURE__ */ jsxs27(Box27, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.error, children: [
|
|
28239
|
+
/* @__PURE__ */ jsx33(Text28, { bold: true, color: PALETTE.error, children: "FIELD EDITOR \u2014 parse error" }),
|
|
28240
|
+
/* @__PURE__ */ jsx33(Text28, { color: PALETTE.error, children: parseErr }),
|
|
28241
|
+
/* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: "Cannot display structured editor. Fix the JSON first." })
|
|
28132
28242
|
] });
|
|
28133
28243
|
}
|
|
28134
28244
|
if (props.length === 0 && slots.length === 0) {
|
|
28135
|
-
return /* @__PURE__ */
|
|
28136
|
-
/* @__PURE__ */
|
|
28137
|
-
/* @__PURE__ */
|
|
28138
|
-
/* @__PURE__ */
|
|
28139
|
-
/* @__PURE__ */
|
|
28245
|
+
return /* @__PURE__ */ jsxs27(Box27, { flexDirection: "column", width, borderStyle: "single", borderColor: PALETTE.warning, children: [
|
|
28246
|
+
/* @__PURE__ */ jsx33(Text28, { bold: true, color: PALETTE.warning, children: "FIELD EDITOR \u2014 no fields" }),
|
|
28247
|
+
/* @__PURE__ */ jsx33(Text28, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify." }),
|
|
28248
|
+
/* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: "You can add fields manually below or reject this component." }),
|
|
28249
|
+
/* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: "Enter to save \xB7 Esc to discard" })
|
|
28140
28250
|
] });
|
|
28141
28251
|
}
|
|
28142
28252
|
const hasEmptyProperties = props.length === 0 && slots.length === 0;
|
|
@@ -28269,12 +28379,12 @@ function FieldEditor({
|
|
|
28269
28379
|
const renderRow = (row, index) => {
|
|
28270
28380
|
const key = rowKey(row, index);
|
|
28271
28381
|
if (row.kind === "header") {
|
|
28272
|
-
return /* @__PURE__ */
|
|
28382
|
+
return /* @__PURE__ */ jsx33(Box27, { flexDirection: "column", paddingTop: 1, children: /* @__PURE__ */ jsx33(Text28, { bold: true, color: PALETTE.success, children: row.label }) }, key);
|
|
28273
28383
|
}
|
|
28274
28384
|
if (row.kind === "component-description") {
|
|
28275
28385
|
const isSelected2 = inComponentDesc && active;
|
|
28276
28386
|
const isEditing = isSelected2 && focusLevel === "field" && editingField && activeField === "description";
|
|
28277
|
-
return /* @__PURE__ */
|
|
28387
|
+
return /* @__PURE__ */ jsx33(
|
|
28278
28388
|
DescriptionField,
|
|
28279
28389
|
{
|
|
28280
28390
|
value: editorState.componentDescription,
|
|
@@ -28305,7 +28415,7 @@ function FieldEditor({
|
|
|
28305
28415
|
valueText,
|
|
28306
28416
|
innerWidth
|
|
28307
28417
|
);
|
|
28308
|
-
return /* @__PURE__ */
|
|
28418
|
+
return /* @__PURE__ */ jsx33(
|
|
28309
28419
|
PropRow,
|
|
28310
28420
|
{
|
|
28311
28421
|
prop: p,
|
|
@@ -28332,7 +28442,7 @@ function FieldEditor({
|
|
|
28332
28442
|
valueText,
|
|
28333
28443
|
innerWidth
|
|
28334
28444
|
);
|
|
28335
|
-
return /* @__PURE__ */
|
|
28445
|
+
return /* @__PURE__ */ jsx33(
|
|
28336
28446
|
SlotRow,
|
|
28337
28447
|
{
|
|
28338
28448
|
slot: s,
|
|
@@ -28344,7 +28454,7 @@ function FieldEditor({
|
|
|
28344
28454
|
key
|
|
28345
28455
|
);
|
|
28346
28456
|
};
|
|
28347
|
-
return /* @__PURE__ */
|
|
28457
|
+
return /* @__PURE__ */ jsxs27(
|
|
28348
28458
|
FixedPanel,
|
|
28349
28459
|
{
|
|
28350
28460
|
width,
|
|
@@ -28353,9 +28463,9 @@ function FieldEditor({
|
|
|
28353
28463
|
borderStyle: "single",
|
|
28354
28464
|
borderColor: hasEmptyProperties ? PALETTE.warning : active ? PALETTE.accent : PALETTE.border,
|
|
28355
28465
|
children: [
|
|
28356
|
-
hasEmptyProperties && /* @__PURE__ */
|
|
28466
|
+
hasEmptyProperties && /* @__PURE__ */ jsx33(Text28, { color: PALETTE.warning, children: "\u26A0 No properties classified for this component. The LLM didn't find anything to classify. Reject this component or add fields manually." }),
|
|
28357
28467
|
header,
|
|
28358
|
-
/* @__PURE__ */
|
|
28468
|
+
/* @__PURE__ */ jsx33(Box27, { flexDirection: "column", width: innerWidth, flexShrink: 0, children: focusLevel === "field" && !inComponentDesc && currentProp ? /* @__PURE__ */ jsx33(
|
|
28359
28469
|
PropRow,
|
|
28360
28470
|
{
|
|
28361
28471
|
prop: currentProp,
|
|
@@ -28371,7 +28481,7 @@ function FieldEditor({
|
|
|
28371
28481
|
rationale: metadata?.props?.[currentProp.name]?.rationale ?? null,
|
|
28372
28482
|
showRationale: showInlineRationales
|
|
28373
28483
|
}
|
|
28374
|
-
) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */
|
|
28484
|
+
) : focusLevel === "field" && inSlots && currentSlot ? /* @__PURE__ */ jsx33(
|
|
28375
28485
|
SlotRow,
|
|
28376
28486
|
{
|
|
28377
28487
|
slot: currentSlot,
|
|
@@ -28390,8 +28500,8 @@ function FieldEditor({
|
|
|
28390
28500
|
) : visibleRowSlice.map((row, index) => {
|
|
28391
28501
|
const absoluteIndex = scrollStart + index;
|
|
28392
28502
|
const key = rowKey(row, absoluteIndex);
|
|
28393
|
-
return /* @__PURE__ */
|
|
28394
|
-
|
|
28503
|
+
return /* @__PURE__ */ jsx33(
|
|
28504
|
+
Box27,
|
|
28395
28505
|
{
|
|
28396
28506
|
ref: (node) => {
|
|
28397
28507
|
if (node) rowMeasureRefs.current.set(key, node);
|
|
@@ -28404,7 +28514,7 @@ function FieldEditor({
|
|
|
28404
28514
|
`visible-${key}`
|
|
28405
28515
|
);
|
|
28406
28516
|
}) }),
|
|
28407
|
-
categoryBelow && /* @__PURE__ */
|
|
28517
|
+
categoryBelow && /* @__PURE__ */ jsx33(Text28, { color: PALETTE.success, bold: true, children: `(${categoryBelow} below)` }),
|
|
28408
28518
|
sourceOpen && !onToggleSourceExternal && (() => {
|
|
28409
28519
|
const propMeta = !inSlots && !inComponentDesc && currentProp ? metadata?.props?.[currentProp.name] : void 0;
|
|
28410
28520
|
const start = propMeta?.sourceStartLine ?? null;
|
|
@@ -28413,50 +28523,50 @@ function FieldEditor({
|
|
|
28413
28523
|
const src = metadata?.componentSource ?? null;
|
|
28414
28524
|
const headerPath = path5 ?? "<unknown source path>";
|
|
28415
28525
|
if (!start || !end2 || !src) {
|
|
28416
|
-
return /* @__PURE__ */
|
|
28417
|
-
/* @__PURE__ */
|
|
28418
|
-
/* @__PURE__ */
|
|
28419
|
-
/* @__PURE__ */
|
|
28526
|
+
return /* @__PURE__ */ jsxs27(Box27, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
28527
|
+
/* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, bold: true, children: `source: ${headerPath}` }),
|
|
28528
|
+
/* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: "(no source location captured for this prop)" }),
|
|
28529
|
+
/* @__PURE__ */ jsx33(Text28, { children: "[s] close" })
|
|
28420
28530
|
] });
|
|
28421
28531
|
}
|
|
28422
28532
|
const lines = src.split("\n").slice(Math.max(0, start - 1), end2);
|
|
28423
|
-
return /* @__PURE__ */
|
|
28424
|
-
/* @__PURE__ */
|
|
28425
|
-
lines.map((ln, i) => /* @__PURE__ */
|
|
28426
|
-
/* @__PURE__ */
|
|
28533
|
+
return /* @__PURE__ */ jsxs27(Box27, { flexDirection: "column", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [
|
|
28534
|
+
/* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, bold: true, children: `${headerPath}: lines ${start}\u2013${end2}` }),
|
|
28535
|
+
lines.map((ln, i) => /* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: ln }, `source-line-${i}`)),
|
|
28536
|
+
/* @__PURE__ */ jsx33(Text28, { children: "[s] close \xB7 [Esc] close" })
|
|
28427
28537
|
] });
|
|
28428
28538
|
})(),
|
|
28429
|
-
showHelp && /* @__PURE__ */
|
|
28430
|
-
/* @__PURE__ */
|
|
28431
|
-
/* @__PURE__ */
|
|
28432
|
-
/* @__PURE__ */
|
|
28433
|
-
/* @__PURE__ */
|
|
28434
|
-
/* @__PURE__ */
|
|
28435
|
-
/* @__PURE__ */
|
|
28436
|
-
/* @__PURE__ */
|
|
28437
|
-
/* @__PURE__ */
|
|
28438
|
-
/* @__PURE__ */
|
|
28439
|
-
/* @__PURE__ */
|
|
28440
|
-
/* @__PURE__ */
|
|
28441
|
-
/* @__PURE__ */
|
|
28442
|
-
/* @__PURE__ */
|
|
28443
|
-
/* @__PURE__ */
|
|
28444
|
-
/* @__PURE__ */
|
|
28445
|
-
/* @__PURE__ */
|
|
28446
|
-
/* @__PURE__ */
|
|
28447
|
-
/* @__PURE__ */
|
|
28448
|
-
/* @__PURE__ */
|
|
28449
|
-
/* @__PURE__ */
|
|
28450
|
-
/* @__PURE__ */
|
|
28451
|
-
/* @__PURE__ */
|
|
28452
|
-
/* @__PURE__ */
|
|
28453
|
-
/* @__PURE__ */
|
|
28454
|
-
/* @__PURE__ */
|
|
28455
|
-
/* @__PURE__ */
|
|
28456
|
-
/* @__PURE__ */
|
|
28539
|
+
showHelp && /* @__PURE__ */ jsxs27(Box27, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.accent, paddingX: 1, children: [
|
|
28540
|
+
/* @__PURE__ */ jsx33(Text28, { bold: true, color: PALETTE.accent, children: "Keybindings" }),
|
|
28541
|
+
/* @__PURE__ */ jsx33(Text28, { children: " " }),
|
|
28542
|
+
/* @__PURE__ */ jsx33(Text28, { bold: true, children: "Row navigation" }),
|
|
28543
|
+
/* @__PURE__ */ jsx33(Text28, { children: " \u2191/\u2193 move between rows" }),
|
|
28544
|
+
/* @__PURE__ */ jsx33(Text28, { children: " Enter edit fields on the current row" }),
|
|
28545
|
+
/* @__PURE__ */ jsx33(Text28, { children: " d delete the current prop or slot (asks to confirm)" }),
|
|
28546
|
+
/* @__PURE__ */ jsx33(Text28, { children: " Esc exit the panel" }),
|
|
28547
|
+
/* @__PURE__ */ jsx33(Text28, { children: " " }),
|
|
28548
|
+
/* @__PURE__ */ jsx33(Text28, { bold: true, children: "Field editing" }),
|
|
28549
|
+
/* @__PURE__ */ jsx33(Text28, { children: " \u2191/\u2193/\u2190\u2192 cycle through fields" }),
|
|
28550
|
+
/* @__PURE__ */ jsx33(Text28, { children: " \u2190/\u2192 cycle picker values \xB7 move cursor in text inputs" }),
|
|
28551
|
+
/* @__PURE__ */ jsx33(Text28, { children: " Space/Enter toggle required" }),
|
|
28552
|
+
/* @__PURE__ */ jsx33(Text28, { children: " Type edit description / string default" }),
|
|
28553
|
+
/* @__PURE__ */ jsx33(Text28, { children: " Esc exit field-edit back to the row" }),
|
|
28554
|
+
/* @__PURE__ */ jsx33(Text28, { children: " " }),
|
|
28555
|
+
/* @__PURE__ */ jsx33(Text28, { bold: true, children: "Values / allowedComponents" }),
|
|
28556
|
+
/* @__PURE__ */ jsx33(Text28, { children: " a / e / r add \xB7 edit \xB7 remove" }),
|
|
28557
|
+
/* @__PURE__ */ jsx33(Text28, { children: " \u2191\u2193 navigate the list" }),
|
|
28558
|
+
/* @__PURE__ */ jsx33(Text28, { children: " K / J reorder up \xB7 down" }),
|
|
28559
|
+
/* @__PURE__ */ jsx33(Text28, { children: " " }),
|
|
28560
|
+
/* @__PURE__ */ jsx33(Text28, { bold: true, children: "Panels" }),
|
|
28561
|
+
/* @__PURE__ */ jsx33(Text28, { children: " s toggle source-view for the current prop" }),
|
|
28562
|
+
/* @__PURE__ */ jsx33(Text28, { children: " " + propRationaleKey.padEnd(16) + " toggle prop rationale panel" }),
|
|
28563
|
+
/* @__PURE__ */ jsx33(Text28, { children: " " + componentRationaleKey.padEnd(16) + " toggle component rationale panel" }),
|
|
28564
|
+
/* @__PURE__ */ jsx33(Text28, { children: " ? toggle this overlay" }),
|
|
28565
|
+
/* @__PURE__ */ jsx33(Text28, { children: " " }),
|
|
28566
|
+
/* @__PURE__ */ jsx33(Text28, { color: PALETTE.muted, children: "press ? or Esc to close" })
|
|
28457
28567
|
] }),
|
|
28458
|
-
validationError && /* @__PURE__ */
|
|
28459
|
-
/* @__PURE__ */
|
|
28568
|
+
validationError && /* @__PURE__ */ jsx33(Text28, { color: PALETTE.error, children: "\u2717 " + validationError }),
|
|
28569
|
+
/* @__PURE__ */ jsx33(Box27, { paddingTop: 1, children: /* @__PURE__ */ jsx33(Text28, { color: pendingDelete ? PALETTE.text : PALETTE.muted, children: modeLabel }) })
|
|
28460
28570
|
]
|
|
28461
28571
|
}
|
|
28462
28572
|
);
|
|
@@ -28513,23 +28623,23 @@ var init_wrap_text = __esm({
|
|
|
28513
28623
|
});
|
|
28514
28624
|
|
|
28515
28625
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx
|
|
28516
|
-
import { Box as
|
|
28517
|
-
import { jsx as
|
|
28626
|
+
import { Box as Box28, Text as Text29 } from "ink";
|
|
28627
|
+
import { jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
28518
28628
|
function RationaleLine({ line, active }) {
|
|
28519
28629
|
if (line.kind === "blank") {
|
|
28520
|
-
return /* @__PURE__ */
|
|
28630
|
+
return /* @__PURE__ */ jsx34(Box28, { children: /* @__PURE__ */ jsx34(Text29, { children: " " }) });
|
|
28521
28631
|
}
|
|
28522
28632
|
if (line.kind === "heading") {
|
|
28523
|
-
return /* @__PURE__ */
|
|
28633
|
+
return /* @__PURE__ */ jsx34(Box28, { children: /* @__PURE__ */ jsx34(Text29, { bold: true, color: active ? PALETTE.accent : PALETTE.muted, children: line.text }) });
|
|
28524
28634
|
}
|
|
28525
28635
|
if (line.kind === "label") {
|
|
28526
|
-
return /* @__PURE__ */
|
|
28527
|
-
line.prefix && /* @__PURE__ */
|
|
28528
|
-
/* @__PURE__ */
|
|
28529
|
-
line.suffix && /* @__PURE__ */
|
|
28636
|
+
return /* @__PURE__ */ jsxs28(Box28, { children: [
|
|
28637
|
+
line.prefix && /* @__PURE__ */ jsx34(Text29, { children: line.prefix }),
|
|
28638
|
+
/* @__PURE__ */ jsx34(Text29, { bold: true, color: active ? line.color : PALETTE.muted, children: line.text }),
|
|
28639
|
+
line.suffix && /* @__PURE__ */ jsx34(Text29, { color: PALETTE.muted, children: line.suffix })
|
|
28530
28640
|
] });
|
|
28531
28641
|
}
|
|
28532
|
-
return /* @__PURE__ */
|
|
28642
|
+
return /* @__PURE__ */ jsx34(Box28, { children: /* @__PURE__ */ jsx34(Text29, { color: !active || line.dim ? PALETTE.muted : void 0, children: line.text }) });
|
|
28533
28643
|
}
|
|
28534
28644
|
var init_RationaleLine = __esm({
|
|
28535
28645
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationaleLine.tsx"() {
|
|
@@ -28539,8 +28649,8 @@ var init_RationaleLine = __esm({
|
|
|
28539
28649
|
});
|
|
28540
28650
|
|
|
28541
28651
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ComponentRationalePanel.tsx
|
|
28542
|
-
import { Box as
|
|
28543
|
-
import { jsx as
|
|
28652
|
+
import { Box as Box29, Text as Text30 } from "ink";
|
|
28653
|
+
import { jsx as jsx35, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
28544
28654
|
function renderComponentRationaleLines(data, innerWidth) {
|
|
28545
28655
|
const out = [];
|
|
28546
28656
|
const pushSection = (heading, body) => {
|
|
@@ -28607,8 +28717,8 @@ function ComponentRationalePanel({
|
|
|
28607
28717
|
const overflowed = totalLines > contentHeight;
|
|
28608
28718
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
28609
28719
|
const visibleEnd = Math.min(totalLines, scrollOffset + contentHeight);
|
|
28610
|
-
return /* @__PURE__ */
|
|
28611
|
-
|
|
28720
|
+
return /* @__PURE__ */ jsxs29(
|
|
28721
|
+
Box29,
|
|
28612
28722
|
{
|
|
28613
28723
|
flexDirection: "column",
|
|
28614
28724
|
width,
|
|
@@ -28616,9 +28726,9 @@ function ComponentRationalePanel({
|
|
|
28616
28726
|
borderStyle: "single",
|
|
28617
28727
|
borderColor: active ? PALETTE.text : void 0,
|
|
28618
28728
|
children: [
|
|
28619
|
-
/* @__PURE__ */
|
|
28620
|
-
visible.map((line, i) => /* @__PURE__ */
|
|
28621
|
-
/* @__PURE__ */
|
|
28729
|
+
/* @__PURE__ */ jsx35(Box29, { children: /* @__PURE__ */ jsx35(Text30, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Component rationale: ${data.name}` }) }),
|
|
28730
|
+
visible.map((line, i) => /* @__PURE__ */ jsx35(RationaleLine, { line, active }, i)),
|
|
28731
|
+
/* @__PURE__ */ jsx35(Box29, { children: overflowed ? /* @__PURE__ */ jsx35(Text30, { children: `${visibleStart}-${visibleEnd}/${totalLines} [\u2191\u2193] scroll [I/Esc] close` }) : /* @__PURE__ */ jsx35(Text30, { children: "[I/Esc] close" }) })
|
|
28622
28732
|
]
|
|
28623
28733
|
}
|
|
28624
28734
|
);
|
|
@@ -28635,10 +28745,10 @@ var init_ComponentRationalePanel = __esm({
|
|
|
28635
28745
|
});
|
|
28636
28746
|
|
|
28637
28747
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx
|
|
28638
|
-
import { Text as
|
|
28639
|
-
import { Fragment as
|
|
28748
|
+
import { Text as Text31 } from "ink";
|
|
28749
|
+
import { Fragment as Fragment8, jsx as jsx36 } from "react/jsx-runtime";
|
|
28640
28750
|
function HighlightedLine({ parts }) {
|
|
28641
|
-
return /* @__PURE__ */
|
|
28751
|
+
return /* @__PURE__ */ jsx36(Fragment8, { children: parts.map((part, i) => /* @__PURE__ */ jsx36(Text31, { color: part.dim ? PALETTE.muted : part.color, children: part.text }, i)) });
|
|
28642
28752
|
}
|
|
28643
28753
|
var init_HighlightedLine = __esm({
|
|
28644
28754
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/components/HighlightedLine.tsx"() {
|
|
@@ -28648,8 +28758,8 @@ var init_HighlightedLine = __esm({
|
|
|
28648
28758
|
});
|
|
28649
28759
|
|
|
28650
28760
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ScrollablePanel.tsx
|
|
28651
|
-
import { Box as
|
|
28652
|
-
import { Fragment as
|
|
28761
|
+
import { Box as Box30, Text as Text32 } from "ink";
|
|
28762
|
+
import { Fragment as Fragment9, jsx as jsx37, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
28653
28763
|
function ScrollablePanel({
|
|
28654
28764
|
title,
|
|
28655
28765
|
width,
|
|
@@ -28662,12 +28772,12 @@ function ScrollablePanel({
|
|
|
28662
28772
|
children
|
|
28663
28773
|
}) {
|
|
28664
28774
|
const overflowed = totalLines > height;
|
|
28665
|
-
return /* @__PURE__ */
|
|
28666
|
-
/* @__PURE__ */
|
|
28667
|
-
/* @__PURE__ */
|
|
28668
|
-
overflowed && /* @__PURE__ */
|
|
28669
|
-
/* @__PURE__ */
|
|
28670
|
-
/* @__PURE__ */
|
|
28775
|
+
return /* @__PURE__ */ jsxs30(Box30, { flexDirection: "column", width, height: height + 2, borderStyle: "single", borderColor, children: [
|
|
28776
|
+
/* @__PURE__ */ jsxs30(Box30, { children: [
|
|
28777
|
+
/* @__PURE__ */ jsx37(Text32, { bold: true, color: active ? void 0 : PALETTE.muted, children: title }),
|
|
28778
|
+
overflowed && /* @__PURE__ */ jsxs30(Fragment9, { children: [
|
|
28779
|
+
/* @__PURE__ */ jsx37(Box30, { flexGrow: 1 }),
|
|
28780
|
+
/* @__PURE__ */ jsx37(Text32, { color: active ? void 0 : PALETTE.muted, children: `\u2195 ${visibleStart}-${visibleEnd}/${totalLines}` })
|
|
28671
28781
|
] })
|
|
28672
28782
|
] }),
|
|
28673
28783
|
children
|
|
@@ -28681,8 +28791,8 @@ var init_ScrollablePanel = __esm({
|
|
|
28681
28791
|
});
|
|
28682
28792
|
|
|
28683
28793
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/JsonPanel.tsx
|
|
28684
|
-
import { Box as
|
|
28685
|
-
import { jsx as
|
|
28794
|
+
import { Box as Box31 } from "ink";
|
|
28795
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
28686
28796
|
function highlightJson(line) {
|
|
28687
28797
|
const parts = [];
|
|
28688
28798
|
let remaining = line;
|
|
@@ -28720,7 +28830,7 @@ function highlightJson(line) {
|
|
|
28720
28830
|
parts.push({ text: remaining[0] });
|
|
28721
28831
|
remaining = remaining.slice(1);
|
|
28722
28832
|
}
|
|
28723
|
-
return /* @__PURE__ */
|
|
28833
|
+
return /* @__PURE__ */ jsx38(HighlightedLine, { parts });
|
|
28724
28834
|
}
|
|
28725
28835
|
function truncateLine(line, maxWidth) {
|
|
28726
28836
|
if (line.length <= maxWidth) return line;
|
|
@@ -28733,7 +28843,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
28733
28843
|
const totalLines = allLines.length;
|
|
28734
28844
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
28735
28845
|
const visibleEnd = Math.min(totalLines, scrollOffset + height);
|
|
28736
|
-
return /* @__PURE__ */
|
|
28846
|
+
return /* @__PURE__ */ jsx38(
|
|
28737
28847
|
ScrollablePanel,
|
|
28738
28848
|
{
|
|
28739
28849
|
title: label,
|
|
@@ -28746,7 +28856,7 @@ function JsonPanel({ label, value, scrollOffset, width, height, active }) {
|
|
|
28746
28856
|
borderColor: active ? "white" : void 0,
|
|
28747
28857
|
children: visibleLines.map((line, i) => {
|
|
28748
28858
|
const truncated = truncateLine(line, innerWidth);
|
|
28749
|
-
return /* @__PURE__ */
|
|
28859
|
+
return /* @__PURE__ */ jsx38(Box31, { children: highlightJson(truncated) }, i);
|
|
28750
28860
|
})
|
|
28751
28861
|
}
|
|
28752
28862
|
);
|
|
@@ -28760,7 +28870,7 @@ var init_JsonPanel = __esm({
|
|
|
28760
28870
|
});
|
|
28761
28871
|
|
|
28762
28872
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/RationalePanel.tsx
|
|
28763
|
-
import { jsx as
|
|
28873
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
28764
28874
|
function renderRationaleLines(rows, innerWidth) {
|
|
28765
28875
|
const out = [];
|
|
28766
28876
|
rows.forEach((row, idx) => {
|
|
@@ -28793,7 +28903,7 @@ function RationalePanel({
|
|
|
28793
28903
|
const visible = allLines.slice(scrollOffset, scrollOffset + height);
|
|
28794
28904
|
const visibleStart = totalLines === 0 ? 0 : scrollOffset + 1;
|
|
28795
28905
|
const visibleEnd = Math.min(totalLines, scrollOffset + height);
|
|
28796
|
-
return /* @__PURE__ */
|
|
28906
|
+
return /* @__PURE__ */ jsx39(
|
|
28797
28907
|
ScrollablePanel,
|
|
28798
28908
|
{
|
|
28799
28909
|
title: `RATIONALE \u2014 ${componentName}`,
|
|
@@ -28804,7 +28914,7 @@ function RationalePanel({
|
|
|
28804
28914
|
visibleStart,
|
|
28805
28915
|
visibleEnd,
|
|
28806
28916
|
borderColor: active ? PALETTE.text : void 0,
|
|
28807
|
-
children: visible.map((line, i) => /* @__PURE__ */
|
|
28917
|
+
children: visible.map((line, i) => /* @__PURE__ */ jsx39(RationaleLine, { line, active }, i))
|
|
28808
28918
|
}
|
|
28809
28919
|
);
|
|
28810
28920
|
}
|
|
@@ -28820,8 +28930,8 @@ var init_RationalePanel = __esm({
|
|
|
28820
28930
|
|
|
28821
28931
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/TokenReviewPanel.tsx
|
|
28822
28932
|
import figures7 from "figures";
|
|
28823
|
-
import { Box as
|
|
28824
|
-
import { jsx as
|
|
28933
|
+
import { Box as Box32, Text as Text33 } from "ink";
|
|
28934
|
+
import { jsx as jsx40, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
28825
28935
|
function TokenReviewPanel({
|
|
28826
28936
|
componentName,
|
|
28827
28937
|
suggestions,
|
|
@@ -28840,8 +28950,8 @@ function TokenReviewPanel({
|
|
|
28840
28950
|
const scrollStart = Math.max(0, Math.min(editCursor - Math.floor(visibleCount / 2), maxStart));
|
|
28841
28951
|
const visiblePaths = current.paths.slice(scrollStart, scrollStart + visibleCount);
|
|
28842
28952
|
const rangeLabel = current.paths.length === 0 ? "no compatible tokens" : `${scrollStart + 1}-${scrollStart + visiblePaths.length} of ${current.paths.length}`;
|
|
28843
|
-
return /* @__PURE__ */
|
|
28844
|
-
|
|
28953
|
+
return /* @__PURE__ */ jsxs31(
|
|
28954
|
+
Box32,
|
|
28845
28955
|
{
|
|
28846
28956
|
flexDirection: "column",
|
|
28847
28957
|
width,
|
|
@@ -28849,16 +28959,16 @@ function TokenReviewPanel({
|
|
|
28849
28959
|
borderStyle: "single",
|
|
28850
28960
|
borderColor: active ? PALETTE.text : void 0,
|
|
28851
28961
|
children: [
|
|
28852
|
-
/* @__PURE__ */
|
|
28853
|
-
/* @__PURE__ */
|
|
28854
|
-
/* @__PURE__ */
|
|
28855
|
-
current.paths.length === 0 && /* @__PURE__ */
|
|
28962
|
+
/* @__PURE__ */ jsx40(Text33, { bold: true, color: active ? void 0 : PALETTE.muted, wrap: "truncate", children: `Review mapped tokens \u2014 ${componentName} \xB7 ${current.propName}${current.kinds.length > 0 ? ` (${current.kinds.join(", ")})` : ""}` }),
|
|
28963
|
+
/* @__PURE__ */ jsx40(Text33, { color: PALETTE.muted, wrap: "truncate", children: `Tick the tokens this property may use (${rangeLabel}).` }),
|
|
28964
|
+
/* @__PURE__ */ jsx40(Text33, { children: " " }),
|
|
28965
|
+
current.paths.length === 0 && /* @__PURE__ */ jsx40(Text33, { color: PALETTE.muted, children: "(no compatible tokens found for this token kind)" }),
|
|
28856
28966
|
visiblePaths.map((path5, i) => {
|
|
28857
28967
|
const pathIndex = scrollStart + i;
|
|
28858
28968
|
const checked = editSelection.has(path5);
|
|
28859
28969
|
const focused = pathIndex === editCursor;
|
|
28860
|
-
return /* @__PURE__ */
|
|
28861
|
-
|
|
28970
|
+
return /* @__PURE__ */ jsx40(Box32, { children: /* @__PURE__ */ jsx40(
|
|
28971
|
+
Text33,
|
|
28862
28972
|
{
|
|
28863
28973
|
color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted,
|
|
28864
28974
|
bold: focused,
|
|
@@ -28867,15 +28977,15 @@ function TokenReviewPanel({
|
|
|
28867
28977
|
}
|
|
28868
28978
|
) }, path5);
|
|
28869
28979
|
}),
|
|
28870
|
-
/* @__PURE__ */
|
|
28871
|
-
/* @__PURE__ */
|
|
28872
|
-
/* @__PURE__ */
|
|
28980
|
+
/* @__PURE__ */ jsx40(Text33, { children: " " }),
|
|
28981
|
+
/* @__PURE__ */ jsx40(Text33, { color: PALETTE.muted, wrap: "truncate", children: "[\u2191/\u2193] move [Space] toggle" }),
|
|
28982
|
+
/* @__PURE__ */ jsx40(Text33, { color: PALETTE.muted, wrap: "truncate", children: "[Ctrl+S] save [Esc] cancel" })
|
|
28873
28983
|
]
|
|
28874
28984
|
}
|
|
28875
28985
|
);
|
|
28876
28986
|
}
|
|
28877
|
-
return /* @__PURE__ */
|
|
28878
|
-
|
|
28987
|
+
return /* @__PURE__ */ jsxs31(
|
|
28988
|
+
Box32,
|
|
28879
28989
|
{
|
|
28880
28990
|
flexDirection: "column",
|
|
28881
28991
|
width,
|
|
@@ -28883,33 +28993,33 @@ function TokenReviewPanel({
|
|
|
28883
28993
|
borderStyle: "single",
|
|
28884
28994
|
borderColor: active ? PALETTE.text : void 0,
|
|
28885
28995
|
children: [
|
|
28886
|
-
/* @__PURE__ */
|
|
28887
|
-
/* @__PURE__ */
|
|
28888
|
-
/* @__PURE__ */
|
|
28889
|
-
/* @__PURE__ */
|
|
28890
|
-
suggestions.length === 0 && /* @__PURE__ */
|
|
28996
|
+
/* @__PURE__ */ jsx40(Text33, { bold: true, color: active ? void 0 : PALETTE.muted, children: `Review mapped tokens \u2014 ${componentName}` }),
|
|
28997
|
+
/* @__PURE__ */ jsx40(Text33, { color: PALETTE.muted, wrap: "truncate", children: `${componentName} has ${suggestions.length} design ${suggestions.length === 1 ? "prop" : "props"} of type token. Select which tokens are allowed for each property.` }),
|
|
28998
|
+
/* @__PURE__ */ jsx40(Text33, { color: PALETTE.muted, wrap: "truncate", children: "Suggested tokens come from the agent. Allowed tokens are what editors can pick in Contentful." }),
|
|
28999
|
+
/* @__PURE__ */ jsx40(Text33, { children: " " }),
|
|
29000
|
+
suggestions.length === 0 && /* @__PURE__ */ jsx40(Text33, { color: PALETTE.muted, children: "(no token suggestions for this component)" }),
|
|
28891
29001
|
suggestions.map((s, i) => {
|
|
28892
29002
|
const focused = i === selectedRow;
|
|
28893
|
-
return /* @__PURE__ */
|
|
28894
|
-
/* @__PURE__ */
|
|
28895
|
-
/* @__PURE__ */
|
|
28896
|
-
|
|
29003
|
+
return /* @__PURE__ */ jsxs31(Box32, { flexDirection: "column", children: [
|
|
29004
|
+
/* @__PURE__ */ jsx40(Box32, { children: /* @__PURE__ */ jsx40(Text33, { color: focused ? PALETTE.accent : active ? void 0 : PALETTE.muted, bold: focused, children: `${focused ? figures7.pointer : " "} ${s.propName}${s.kinds.length > 0 ? ` (${s.kinds.join(", ")})` : ""}` }) }),
|
|
29005
|
+
/* @__PURE__ */ jsx40(
|
|
29006
|
+
Text33,
|
|
28897
29007
|
{
|
|
28898
29008
|
color: PALETTE.muted,
|
|
28899
29009
|
children: ` suggested: ${s.suggested.length > 0 ? s.suggested.join(", ") : "none"}`
|
|
28900
29010
|
}
|
|
28901
29011
|
),
|
|
28902
|
-
/* @__PURE__ */
|
|
28903
|
-
|
|
29012
|
+
/* @__PURE__ */ jsx40(
|
|
29013
|
+
Text33,
|
|
28904
29014
|
{
|
|
28905
29015
|
color: PALETTE.muted,
|
|
28906
29016
|
children: ` allowed: ${s.allowed.length > 0 ? s.allowed.join(", ") : "none (any token)"}`
|
|
28907
29017
|
}
|
|
28908
29018
|
),
|
|
28909
|
-
/* @__PURE__ */
|
|
29019
|
+
/* @__PURE__ */ jsx40(Text33, { children: " " })
|
|
28910
29020
|
] }, s.propName);
|
|
28911
29021
|
}),
|
|
28912
|
-
/* @__PURE__ */
|
|
29022
|
+
/* @__PURE__ */ jsx40(Text33, { color: PALETTE.muted, children: "[\u2191/\u2193] move [Enter] edit allowed tokens [Esc] close" })
|
|
28913
29023
|
]
|
|
28914
29024
|
}
|
|
28915
29025
|
);
|
|
@@ -28922,8 +29032,8 @@ var init_TokenReviewPanel = __esm({
|
|
|
28922
29032
|
});
|
|
28923
29033
|
|
|
28924
29034
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/review-details-panel.tsx
|
|
28925
|
-
import { Text as
|
|
28926
|
-
import { Fragment as
|
|
29035
|
+
import { Text as Text34 } from "ink";
|
|
29036
|
+
import { Fragment as Fragment10, jsx as jsx41, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
28927
29037
|
function ReviewDetailsPanel({
|
|
28928
29038
|
selectedKey,
|
|
28929
29039
|
panelOpen,
|
|
@@ -28958,7 +29068,7 @@ function ReviewDetailsPanel({
|
|
|
28958
29068
|
rationale: s.rationale ?? ""
|
|
28959
29069
|
}))
|
|
28960
29070
|
];
|
|
28961
|
-
return /* @__PURE__ */
|
|
29071
|
+
return /* @__PURE__ */ jsx41(
|
|
28962
29072
|
RationalePanel,
|
|
28963
29073
|
{
|
|
28964
29074
|
componentName: componentRationale?.name ?? selectedKey,
|
|
@@ -28971,7 +29081,7 @@ function ReviewDetailsPanel({
|
|
|
28971
29081
|
);
|
|
28972
29082
|
}
|
|
28973
29083
|
if (panelOpen === "component-rationale") {
|
|
28974
|
-
return /* @__PURE__ */
|
|
29084
|
+
return /* @__PURE__ */ jsx41(
|
|
28975
29085
|
ComponentRationalePanel,
|
|
28976
29086
|
{
|
|
28977
29087
|
data: componentRationale ?? {
|
|
@@ -28996,14 +29106,14 @@ function ReviewDetailsPanel({
|
|
|
28996
29106
|
const headerPath = path5 ?? "<unknown source path>";
|
|
28997
29107
|
const sourceLineCount = Math.max(1, height - 4);
|
|
28998
29108
|
const lines = source ? source.split("\n").slice(panelScrollOffset, panelScrollOffset + sourceLineCount) : [];
|
|
28999
|
-
return /* @__PURE__ */
|
|
29000
|
-
/* @__PURE__ */
|
|
29001
|
-
source ? lines.map((line, index) => /* @__PURE__ */
|
|
29002
|
-
/* @__PURE__ */
|
|
29109
|
+
return /* @__PURE__ */ jsxs32(FixedPanel, { width, height, borderStyle: "single", borderColor: sourceBorderColor, paddingLeft: 1, children: [
|
|
29110
|
+
/* @__PURE__ */ jsx41(Text34, { color: PALETTE.muted, bold: true, wrap: "truncate-end", children: `source: ${headerPath}` }),
|
|
29111
|
+
source ? lines.map((line, index) => /* @__PURE__ */ jsx41(Text34, { color: PALETTE.muted, wrap: "truncate-end", children: line }, `source-line-${index}`)) : /* @__PURE__ */ jsx41(Text34, { color: PALETTE.muted, children: "(no source captured)" }),
|
|
29112
|
+
/* @__PURE__ */ jsx41(Text34, { color: PALETTE.muted, wrap: "truncate-end", children: "[s/Esc] close" })
|
|
29003
29113
|
] });
|
|
29004
29114
|
}
|
|
29005
29115
|
if (panelOpen === "token-review") {
|
|
29006
|
-
return /* @__PURE__ */
|
|
29116
|
+
return /* @__PURE__ */ jsx41(
|
|
29007
29117
|
TokenReviewPanel,
|
|
29008
29118
|
{
|
|
29009
29119
|
componentName: selectedKey,
|
|
@@ -29019,7 +29129,7 @@ function ReviewDetailsPanel({
|
|
|
29019
29129
|
);
|
|
29020
29130
|
}
|
|
29021
29131
|
if (showJson) {
|
|
29022
|
-
return /* @__PURE__ */
|
|
29132
|
+
return /* @__PURE__ */ jsx41(
|
|
29023
29133
|
JsonPanel,
|
|
29024
29134
|
{
|
|
29025
29135
|
label: "GENERATED DEFINITION (read-only)",
|
|
@@ -29031,7 +29141,7 @@ function ReviewDetailsPanel({
|
|
|
29031
29141
|
}
|
|
29032
29142
|
);
|
|
29033
29143
|
}
|
|
29034
|
-
return /* @__PURE__ */
|
|
29144
|
+
return /* @__PURE__ */ jsx41(Fragment10, { children: editor });
|
|
29035
29145
|
}
|
|
29036
29146
|
var init_review_details_panel = __esm({
|
|
29037
29147
|
"packages/experience-design-system-cli/src/tui/import/steps/09-review/review-details-panel.tsx"() {
|
|
@@ -29046,7 +29156,7 @@ var init_review_details_panel = __esm({
|
|
|
29046
29156
|
});
|
|
29047
29157
|
|
|
29048
29158
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDetailsEditor.tsx
|
|
29049
|
-
import { jsx as
|
|
29159
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
29050
29160
|
import { createElement } from "react";
|
|
29051
29161
|
function toFieldEditorMetadata(reviewMetadata) {
|
|
29052
29162
|
if (!reviewMetadata) return void 0;
|
|
@@ -29080,7 +29190,7 @@ function ReviewDetailsEditor({
|
|
|
29080
29190
|
jsonScrollOffset,
|
|
29081
29191
|
currentTokenSuggestions
|
|
29082
29192
|
} = reviewEditor;
|
|
29083
|
-
return /* @__PURE__ */
|
|
29193
|
+
return /* @__PURE__ */ jsx42(
|
|
29084
29194
|
ReviewDetailsPanel,
|
|
29085
29195
|
{
|
|
29086
29196
|
selectedKey,
|
|
@@ -29127,8 +29237,8 @@ var init_ReviewDetailsEditor = __esm({
|
|
|
29127
29237
|
});
|
|
29128
29238
|
|
|
29129
29239
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewComponentPanel.tsx
|
|
29130
|
-
import { Box as
|
|
29131
|
-
import { Fragment as
|
|
29240
|
+
import { Box as Box33, Text as Text35 } from "ink";
|
|
29241
|
+
import { Fragment as Fragment11, jsx as jsx43, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
29132
29242
|
function buildReviewFieldEditor(reviewEditor, selectedJson, onExit, overrides = {}) {
|
|
29133
29243
|
return {
|
|
29134
29244
|
value: reviewEditor.draftValue || selectedJson,
|
|
@@ -29168,24 +29278,24 @@ function ReviewEmptyComponentsWarning({
|
|
|
29168
29278
|
hidden
|
|
29169
29279
|
}) {
|
|
29170
29280
|
if (hidden || count === 0) return null;
|
|
29171
|
-
return /* @__PURE__ */
|
|
29281
|
+
return /* @__PURE__ */ jsx43(Text35, { color: PALETTE.warning, children: `\u26A0 ${count} component${count === 1 ? "" : "s"} had no classifiable props \u2014 review with care` });
|
|
29172
29282
|
}
|
|
29173
29283
|
function ReviewNoSelection() {
|
|
29174
|
-
return /* @__PURE__ */
|
|
29284
|
+
return /* @__PURE__ */ jsx43(Box33, { flexGrow: 1, paddingLeft: 1, flexDirection: "column", children: /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, children: "No component selected" }) });
|
|
29175
29285
|
}
|
|
29176
29286
|
function ReviewFinalizeError({
|
|
29177
29287
|
message,
|
|
29178
29288
|
hidden
|
|
29179
29289
|
}) {
|
|
29180
29290
|
if (hidden || !message) return null;
|
|
29181
|
-
return /* @__PURE__ */
|
|
29291
|
+
return /* @__PURE__ */ jsx43(Text35, { color: PALETTE.error, children: `\u26A0 ${message}` });
|
|
29182
29292
|
}
|
|
29183
29293
|
function ReviewPanelFooter({
|
|
29184
29294
|
reviewEditor,
|
|
29185
29295
|
sidebarFocused,
|
|
29186
29296
|
sidebarFooter
|
|
29187
29297
|
}) {
|
|
29188
|
-
return /* @__PURE__ */
|
|
29298
|
+
return /* @__PURE__ */ jsx43(Fragment11, { children: reviewEditor.panelOpen === "token-review" ? "" : sidebarFocused ? sidebarFooter : reviewEditor.showJson ? " [\u2191\u2193] scroll [Ctrl+u/d] half-page [gg/G] top/bottom [Tab] focus list" : " [Tab] focus list [Enter] edit fields" + (reviewEditor.currentTokenSuggestions().length > 0 ? " [t] review mapped tokens" : "") });
|
|
29189
29299
|
}
|
|
29190
29300
|
function ReviewComponentTitle({
|
|
29191
29301
|
selectedKey,
|
|
@@ -29193,10 +29303,10 @@ function ReviewComponentTitle({
|
|
|
29193
29303
|
slotCount,
|
|
29194
29304
|
sidebarFocused
|
|
29195
29305
|
}) {
|
|
29196
|
-
return /* @__PURE__ */
|
|
29197
|
-
/* @__PURE__ */
|
|
29198
|
-
/* @__PURE__ */
|
|
29199
|
-
/* @__PURE__ */
|
|
29306
|
+
return /* @__PURE__ */ jsxs33(Box33, { paddingLeft: 2, paddingBottom: 1, children: [
|
|
29307
|
+
/* @__PURE__ */ jsx43(Text35, { bold: true, wrap: "truncate-end", children: selectedKey }),
|
|
29308
|
+
/* @__PURE__ */ jsx43(Box33, { flexGrow: 1 }),
|
|
29309
|
+
/* @__PURE__ */ jsxs33(Text35, { color: PALETTE.muted, wrap: "truncate-end", children: [
|
|
29200
29310
|
propCount,
|
|
29201
29311
|
" prop",
|
|
29202
29312
|
propCount !== 1 ? "s" : "",
|
|
@@ -29225,8 +29335,8 @@ function ReviewComponentPanel({
|
|
|
29225
29335
|
const slotCount = selectedEntry.$slots ? Object.keys(selectedEntry.$slots).length : 0;
|
|
29226
29336
|
const contentHeight = Math.max(1, height - 2);
|
|
29227
29337
|
const contentWidth = Math.max(1, width - 1);
|
|
29228
|
-
return /* @__PURE__ */
|
|
29229
|
-
/* @__PURE__ */
|
|
29338
|
+
return /* @__PURE__ */ jsx43(FixedPanel, { width, height, borderStyle: void 0, paddingLeft: 1, children: /* @__PURE__ */ jsxs33(Box33, { flexDirection: "column", width: contentWidth, height, flexShrink: 0, overflowY: "hidden", children: [
|
|
29339
|
+
/* @__PURE__ */ jsx43(Box33, { width: contentWidth, height: contentHeight, flexShrink: 0, overflowY: "hidden", children: /* @__PURE__ */ jsx43(
|
|
29230
29340
|
ReviewDetailsEditor,
|
|
29231
29341
|
{
|
|
29232
29342
|
selectedKey,
|
|
@@ -29239,7 +29349,7 @@ function ReviewComponentPanel({
|
|
|
29239
29349
|
jsonValue,
|
|
29240
29350
|
sidebarFocused,
|
|
29241
29351
|
fieldEditor,
|
|
29242
|
-
header: /* @__PURE__ */
|
|
29352
|
+
header: /* @__PURE__ */ jsx43(
|
|
29243
29353
|
ReviewComponentTitle,
|
|
29244
29354
|
{
|
|
29245
29355
|
selectedKey,
|
|
@@ -29250,8 +29360,8 @@ function ReviewComponentPanel({
|
|
|
29250
29360
|
)
|
|
29251
29361
|
}
|
|
29252
29362
|
) }),
|
|
29253
|
-
/* @__PURE__ */
|
|
29254
|
-
/* @__PURE__ */
|
|
29363
|
+
/* @__PURE__ */ jsx43(Box33, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx43(Text35, { color: saveError ? PALETTE.error : void 0, wrap: "truncate-end", children: saveError ? "\u2717 " + saveError : " " }) }),
|
|
29364
|
+
/* @__PURE__ */ jsx43(Box33, { width: contentWidth, height: 1, flexShrink: 0, children: /* @__PURE__ */ jsx43(Text35, { color: PALETTE.muted, wrap: "truncate-end", children: /* @__PURE__ */ jsx43(
|
|
29255
29365
|
ReviewPanelFooter,
|
|
29256
29366
|
{
|
|
29257
29367
|
reviewEditor,
|
|
@@ -29272,8 +29382,8 @@ var init_ReviewComponentPanel = __esm({
|
|
|
29272
29382
|
});
|
|
29273
29383
|
|
|
29274
29384
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewStatus.tsx
|
|
29275
|
-
import { Box as
|
|
29276
|
-
import { jsx as
|
|
29385
|
+
import { Box as Box34, Text as Text36 } from "ink";
|
|
29386
|
+
import { jsx as jsx44, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
29277
29387
|
function countReviewStatuses(entries) {
|
|
29278
29388
|
return entries.reduce(
|
|
29279
29389
|
(counts, entry) => {
|
|
@@ -29286,13 +29396,13 @@ function countReviewStatuses(entries) {
|
|
|
29286
29396
|
);
|
|
29287
29397
|
}
|
|
29288
29398
|
function ReviewLoadingState() {
|
|
29289
|
-
return /* @__PURE__ */
|
|
29399
|
+
return /* @__PURE__ */ jsx44(Box34, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx44(Text36, { color: PALETTE.muted, children: "Loading generated definitions..." }) });
|
|
29290
29400
|
}
|
|
29291
29401
|
function ReviewLoadError({ message }) {
|
|
29292
|
-
return /* @__PURE__ */
|
|
29293
|
-
/* @__PURE__ */
|
|
29294
|
-
/* @__PURE__ */
|
|
29295
|
-
/* @__PURE__ */
|
|
29402
|
+
return /* @__PURE__ */ jsxs34(Box34, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
29403
|
+
/* @__PURE__ */ jsx44(Text36, { color: PALETTE.error, children: message }),
|
|
29404
|
+
/* @__PURE__ */ jsx44(Text36, { children: " " }),
|
|
29405
|
+
/* @__PURE__ */ jsx44(ControlHints, { hints: [{ keys: "q / Enter / Esc", label: "Quit" }] })
|
|
29296
29406
|
] });
|
|
29297
29407
|
}
|
|
29298
29408
|
var init_ReviewStatus = __esm({
|
|
@@ -29516,8 +29626,8 @@ var init_run_live_preview = __esm({
|
|
|
29516
29626
|
});
|
|
29517
29627
|
|
|
29518
29628
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/FinalizeDialog.tsx
|
|
29519
|
-
import { Box as
|
|
29520
|
-
import { Fragment as
|
|
29629
|
+
import { Box as Box35, Text as Text37 } from "ink";
|
|
29630
|
+
import { Fragment as Fragment12, jsx as jsx45, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
29521
29631
|
function FinalizeDialog({
|
|
29522
29632
|
accepted,
|
|
29523
29633
|
rejected,
|
|
@@ -29545,51 +29655,51 @@ function FinalizeDialog({
|
|
|
29545
29655
|
const windowed = removed.slice(offset, offset + FINALIZE_REMOVED_WINDOW);
|
|
29546
29656
|
const hasMoreBelow = offset + FINALIZE_REMOVED_WINDOW < removed.length;
|
|
29547
29657
|
const hasMoreAbove = offset > 0;
|
|
29548
|
-
return /* @__PURE__ */
|
|
29549
|
-
/* @__PURE__ */
|
|
29550
|
-
/* @__PURE__ */
|
|
29551
|
-
/* @__PURE__ */
|
|
29552
|
-
/* @__PURE__ */
|
|
29658
|
+
return /* @__PURE__ */ jsx45(Box35, { width: "100%", paddingX: 2, children: /* @__PURE__ */ jsxs35(Box35, { flexDirection: "column", alignItems: "flex-start", children: [
|
|
29659
|
+
/* @__PURE__ */ jsx45(Text37, { bold: true, children: "Finalize" }),
|
|
29660
|
+
/* @__PURE__ */ jsx45(Text37, { children: " " }),
|
|
29661
|
+
/* @__PURE__ */ jsxs35(Text37, { children: [
|
|
29662
|
+
/* @__PURE__ */ jsxs35(Text37, { color: PALETTE.success, children: [
|
|
29553
29663
|
accepted,
|
|
29554
29664
|
" accepted"
|
|
29555
29665
|
] }),
|
|
29556
|
-
/* @__PURE__ */
|
|
29557
|
-
/* @__PURE__ */
|
|
29666
|
+
/* @__PURE__ */ jsx45(Text37, { children: " \xB7 " }),
|
|
29667
|
+
/* @__PURE__ */ jsxs35(Text37, { color: PALETTE.error, children: [
|
|
29558
29668
|
rejected,
|
|
29559
29669
|
" rejected"
|
|
29560
29670
|
] }),
|
|
29561
|
-
/* @__PURE__ */
|
|
29562
|
-
/* @__PURE__ */
|
|
29671
|
+
/* @__PURE__ */ jsx45(Text37, { children: " \xB7 " }),
|
|
29672
|
+
/* @__PURE__ */ jsxs35(Text37, { color: PALETTE.muted, children: [
|
|
29563
29673
|
needsReview,
|
|
29564
29674
|
" unresolved"
|
|
29565
29675
|
] })
|
|
29566
29676
|
] }),
|
|
29567
|
-
/* @__PURE__ */
|
|
29568
|
-
noneAccepted && /* @__PURE__ */
|
|
29569
|
-
/* @__PURE__ */
|
|
29570
|
-
/* @__PURE__ */
|
|
29571
|
-
/* @__PURE__ */
|
|
29677
|
+
/* @__PURE__ */ jsx45(Text37, { children: " " }),
|
|
29678
|
+
noneAccepted && /* @__PURE__ */ jsxs35(Fragment12, { children: [
|
|
29679
|
+
/* @__PURE__ */ jsx45(Text37, { bold: true, color: PALETTE.warning, children: "\u26A0 No components are accepted \u2014 nothing will be pushed." }),
|
|
29680
|
+
/* @__PURE__ */ jsx45(Text37, { color: PALETTE.warning, children: "Accept at least one component ([a] a row, [A] accept all) to push." }),
|
|
29681
|
+
/* @__PURE__ */ jsx45(Text37, { children: " " })
|
|
29572
29682
|
] }),
|
|
29573
|
-
!allResolved && /* @__PURE__ */
|
|
29574
|
-
/* @__PURE__ */
|
|
29575
|
-
/* @__PURE__ */
|
|
29576
|
-
/* @__PURE__ */
|
|
29683
|
+
!allResolved && /* @__PURE__ */ jsxs35(Fragment12, { children: [
|
|
29684
|
+
/* @__PURE__ */ jsx45(Text37, { color: PALETTE.warning, children: "\u26A0 " + needsReview + " unresolved component" + (needsReview === 1 ? "" : "s") + " will not be pushed." }),
|
|
29685
|
+
/* @__PURE__ */ jsx45(Text37, { color: PALETTE.warning, children: "Only explicitly accepted components ship." }),
|
|
29686
|
+
/* @__PURE__ */ jsx45(Text37, { children: " " })
|
|
29577
29687
|
] }),
|
|
29578
|
-
/* @__PURE__ */
|
|
29579
|
-
previewStatus === "running" ? /* @__PURE__ */
|
|
29580
|
-
/* @__PURE__ */
|
|
29688
|
+
/* @__PURE__ */ jsxs35(Box35, { flexDirection: "column", height: 2, children: [
|
|
29689
|
+
previewStatus === "running" ? /* @__PURE__ */ jsx45(Text37, { color: PALETTE.muted, children: "Previewing deletions against the target space\u2026" }) : previewStatus === "error" ? /* @__PURE__ */ jsx45(Text37, { color: PALETTE.warning, children: "\u26A0 Could not preview deletions (the push will still proceed)." }) : /* @__PURE__ */ jsx45(Text37, { children: " " }),
|
|
29690
|
+
/* @__PURE__ */ jsx45(Text37, { children: " " })
|
|
29581
29691
|
] }),
|
|
29582
|
-
previewStatus === "done" && removed.length > 0 && /* @__PURE__ */
|
|
29583
|
-
/* @__PURE__ */
|
|
29584
|
-
hasMoreAbove && /* @__PURE__ */
|
|
29585
|
-
windowed.map((rc) => /* @__PURE__ */
|
|
29586
|
-
hasMoreBelow && /* @__PURE__ */
|
|
29587
|
-
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */
|
|
29588
|
-
/* @__PURE__ */
|
|
29692
|
+
previewStatus === "done" && removed.length > 0 && /* @__PURE__ */ jsxs35(Fragment12, { children: [
|
|
29693
|
+
/* @__PURE__ */ jsx45(Text37, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removed.length, false) }),
|
|
29694
|
+
hasMoreAbove && /* @__PURE__ */ jsx45(Text37, { color: PALETTE.muted, children: "\u2191 more above" }),
|
|
29695
|
+
windowed.map((rc) => /* @__PURE__ */ jsx45(Text37, { color: PALETTE.error, children: removedComponentLine(rc) }, rc.id)),
|
|
29696
|
+
hasMoreBelow && /* @__PURE__ */ jsx45(Text37, { color: PALETTE.muted, children: "\u2193 more below" }),
|
|
29697
|
+
removed.length > FINALIZE_REMOVED_WINDOW && /* @__PURE__ */ jsx45(Text37, { children: "[\u2191\u2193] scroll deletions" }),
|
|
29698
|
+
/* @__PURE__ */ jsx45(Text37, { children: " " })
|
|
29589
29699
|
] }),
|
|
29590
|
-
/* @__PURE__ */
|
|
29591
|
-
/* @__PURE__ */
|
|
29592
|
-
/* @__PURE__ */
|
|
29700
|
+
/* @__PURE__ */ jsx45(Text37, { children: noneAccepted ? "Confirm exit with nothing accepted?" : allResolved ? "Save decisions and exit? All components resolved." : "Save decisions and exit?" }),
|
|
29701
|
+
/* @__PURE__ */ jsx45(Text37, { children: " " }),
|
|
29702
|
+
/* @__PURE__ */ jsx45(
|
|
29593
29703
|
ControlHints,
|
|
29594
29704
|
{
|
|
29595
29705
|
hints: [
|
|
@@ -30057,8 +30167,8 @@ var init_use_review_surface_state = __esm({
|
|
|
30057
30167
|
});
|
|
30058
30168
|
|
|
30059
30169
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/QuitDialog.tsx
|
|
30060
|
-
import { Box as
|
|
30061
|
-
import { Fragment as
|
|
30170
|
+
import { Box as Box36, Text as Text38 } from "ink";
|
|
30171
|
+
import { Fragment as Fragment13, jsx as jsx46, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
30062
30172
|
function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
30063
30173
|
useImmediateInput((input, key) => {
|
|
30064
30174
|
if (input === "y" || key.return) {
|
|
@@ -30067,16 +30177,16 @@ function QuitDialog({ hasUnsavedDrafts, onConfirm, onCancel }) {
|
|
|
30067
30177
|
onCancel();
|
|
30068
30178
|
}
|
|
30069
30179
|
});
|
|
30070
|
-
return /* @__PURE__ */
|
|
30071
|
-
/* @__PURE__ */
|
|
30072
|
-
/* @__PURE__ */
|
|
30073
|
-
hasUnsavedDrafts ? /* @__PURE__ */
|
|
30074
|
-
/* @__PURE__ */
|
|
30075
|
-
/* @__PURE__ */
|
|
30076
|
-
/* @__PURE__ */
|
|
30077
|
-
] }) : /* @__PURE__ */
|
|
30078
|
-
/* @__PURE__ */
|
|
30079
|
-
/* @__PURE__ */
|
|
30180
|
+
return /* @__PURE__ */ jsxs36(Box36, { flexDirection: "column", borderStyle: "round", padding: 1, width: 50, children: [
|
|
30181
|
+
/* @__PURE__ */ jsx46(Text38, { bold: true, children: "\u2500".repeat(19) + " Quit " + "\u2500".repeat(19) }),
|
|
30182
|
+
/* @__PURE__ */ jsx46(Text38, { children: " " }),
|
|
30183
|
+
hasUnsavedDrafts ? /* @__PURE__ */ jsxs36(Fragment13, { children: [
|
|
30184
|
+
/* @__PURE__ */ jsx46(Text38, { children: "You have unsaved draft edits." }),
|
|
30185
|
+
/* @__PURE__ */ jsx46(Text38, { children: "Session state is preserved \u2014 you can resume" }),
|
|
30186
|
+
/* @__PURE__ */ jsx46(Text38, { children: "by running the same review command again." })
|
|
30187
|
+
] }) : /* @__PURE__ */ jsx46(Text38, { children: "Session is saved. Quit without finalizing?" }),
|
|
30188
|
+
/* @__PURE__ */ jsx46(Text38, { children: " " }),
|
|
30189
|
+
/* @__PURE__ */ jsx46(
|
|
30080
30190
|
ControlHints,
|
|
30081
30191
|
{
|
|
30082
30192
|
hints: [
|
|
@@ -30096,8 +30206,8 @@ var init_QuitDialog = __esm({
|
|
|
30096
30206
|
});
|
|
30097
30207
|
|
|
30098
30208
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/ReviewDialogs.tsx
|
|
30099
|
-
import { Box as
|
|
30100
|
-
import { Fragment as
|
|
30209
|
+
import { Box as Box37, Text as Text39 } from "ink";
|
|
30210
|
+
import { Fragment as Fragment14, jsx as jsx47, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
30101
30211
|
function ReviewFinalizeDialogs({
|
|
30102
30212
|
showFinalize,
|
|
30103
30213
|
showQuit,
|
|
@@ -30111,8 +30221,8 @@ function ReviewFinalizeDialogs({
|
|
|
30111
30221
|
onQuitCancel
|
|
30112
30222
|
}) {
|
|
30113
30223
|
const { accepted, rejected, needsReview } = countReviewStatuses(components);
|
|
30114
|
-
return /* @__PURE__ */
|
|
30115
|
-
showFinalize && /* @__PURE__ */
|
|
30224
|
+
return /* @__PURE__ */ jsxs37(Fragment14, { children: [
|
|
30225
|
+
showFinalize && /* @__PURE__ */ jsx47(
|
|
30116
30226
|
FinalizeDialog,
|
|
30117
30227
|
{
|
|
30118
30228
|
accepted,
|
|
@@ -30125,7 +30235,7 @@ function ReviewFinalizeDialogs({
|
|
|
30125
30235
|
onCancel: onFinalizeCancel
|
|
30126
30236
|
}
|
|
30127
30237
|
),
|
|
30128
|
-
showQuit && /* @__PURE__ */
|
|
30238
|
+
showQuit && /* @__PURE__ */ jsx47(QuitDialog, { hasUnsavedDrafts: false, onConfirm: onQuitConfirm, onCancel: onQuitCancel })
|
|
30129
30239
|
] });
|
|
30130
30240
|
}
|
|
30131
30241
|
function ReviewStepDialogs({
|
|
@@ -30135,7 +30245,7 @@ function ReviewStepDialogs({
|
|
|
30135
30245
|
onFinalize,
|
|
30136
30246
|
onQuit
|
|
30137
30247
|
}) {
|
|
30138
|
-
return /* @__PURE__ */
|
|
30248
|
+
return /* @__PURE__ */ jsx47(
|
|
30139
30249
|
ReviewFinalizeDialogs,
|
|
30140
30250
|
{
|
|
30141
30251
|
showFinalize: surfaceState.showFinalize,
|
|
@@ -30153,12 +30263,12 @@ function ReviewStepDialogs({
|
|
|
30153
30263
|
}
|
|
30154
30264
|
function ReviewReloadDialog({ open }) {
|
|
30155
30265
|
if (!open) return null;
|
|
30156
|
-
return /* @__PURE__ */
|
|
30157
|
-
/* @__PURE__ */
|
|
30158
|
-
/* @__PURE__ */
|
|
30159
|
-
/* @__PURE__ */
|
|
30160
|
-
/* @__PURE__ */
|
|
30161
|
-
/* @__PURE__ */
|
|
30266
|
+
return /* @__PURE__ */ jsxs37(Box37, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
30267
|
+
/* @__PURE__ */ jsx47(Text39, { bold: true, color: PALETTE.warning, children: "Reload from saved state?" }),
|
|
30268
|
+
/* @__PURE__ */ jsx47(Text39, { children: "Unsaved in-memory changes will be lost." }),
|
|
30269
|
+
/* @__PURE__ */ jsx47(Text39, { children: " " }),
|
|
30270
|
+
/* @__PURE__ */ jsx47(Text39, { children: " [Enter] Confirm" }),
|
|
30271
|
+
/* @__PURE__ */ jsx47(Text39, { children: " [Esc] Cancel" })
|
|
30162
30272
|
] });
|
|
30163
30273
|
}
|
|
30164
30274
|
var init_ReviewDialogs = __esm({
|
|
@@ -30681,8 +30791,8 @@ var init_use_review_log = __esm({
|
|
|
30681
30791
|
});
|
|
30682
30792
|
|
|
30683
30793
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/components/LivePreviewSummary.tsx
|
|
30684
|
-
import { Box as
|
|
30685
|
-
import { jsx as
|
|
30794
|
+
import { Box as Box38, Text as Text40 } from "ink";
|
|
30795
|
+
import { jsx as jsx48, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
30686
30796
|
function LivePreviewSummary({
|
|
30687
30797
|
enabled,
|
|
30688
30798
|
previewAnnotations,
|
|
@@ -30696,19 +30806,19 @@ function LivePreviewSummary({
|
|
|
30696
30806
|
const counts = { new: 0, changed: 0, removed: 0, breaking: 0 };
|
|
30697
30807
|
for (const annotation of previewAnnotations.values()) counts[annotation] += 1;
|
|
30698
30808
|
const hasCounts = counts.new + counts.changed + counts.removed + counts.breaking > 0;
|
|
30699
|
-
if (disabled) return /* @__PURE__ */
|
|
30700
|
-
if (status === "running" && !hasCounts) return /* @__PURE__ */
|
|
30809
|
+
if (disabled) return /* @__PURE__ */ jsx48(Text40, { color: PALETTE.muted, children: "Preview: disabled (creds rejected)" });
|
|
30810
|
+
if (status === "running" && !hasCounts) return /* @__PURE__ */ jsx48(Text40, { color: PALETTE.muted, children: `Preview: ${spinner} running...` });
|
|
30701
30811
|
if (!hasCounts) return null;
|
|
30702
|
-
return /* @__PURE__ */
|
|
30703
|
-
/* @__PURE__ */
|
|
30704
|
-
/* @__PURE__ */
|
|
30705
|
-
/* @__PURE__ */
|
|
30706
|
-
/* @__PURE__ */
|
|
30707
|
-
/* @__PURE__ */
|
|
30708
|
-
/* @__PURE__ */
|
|
30709
|
-
showRemovedListHint && removedCount > 0 && /* @__PURE__ */
|
|
30710
|
-
/* @__PURE__ */
|
|
30711
|
-
/* @__PURE__ */
|
|
30812
|
+
return /* @__PURE__ */ jsxs38(Box38, { children: [
|
|
30813
|
+
/* @__PURE__ */ jsx48(Text40, { children: "Preview: " }),
|
|
30814
|
+
/* @__PURE__ */ jsx48(Text40, { color: PALETTE.success, children: `${counts.new} new` }),
|
|
30815
|
+
/* @__PURE__ */ jsx48(Text40, { children: " \xB7 " }),
|
|
30816
|
+
/* @__PURE__ */ jsx48(Text40, { color: PALETTE.warning, children: `${counts.changed} changed` }),
|
|
30817
|
+
/* @__PURE__ */ jsx48(Text40, { children: " \xB7 " }),
|
|
30818
|
+
/* @__PURE__ */ jsx48(Text40, { color: PALETTE.muted, children: `${counts.removed} removed` }),
|
|
30819
|
+
showRemovedListHint && removedCount > 0 && /* @__PURE__ */ jsx48(Text40, { children: " ([d] removed list)" }),
|
|
30820
|
+
/* @__PURE__ */ jsx48(Text40, { children: " \xB7 " }),
|
|
30821
|
+
/* @__PURE__ */ jsx48(Text40, { color: PALETTE.error, bold: true, children: `${counts.breaking} breaking` })
|
|
30712
30822
|
] });
|
|
30713
30823
|
}
|
|
30714
30824
|
var init_LivePreviewSummary = __esm({
|
|
@@ -30721,8 +30831,8 @@ var init_LivePreviewSummary = __esm({
|
|
|
30721
30831
|
// packages/experience-design-system-cli/src/tui/import/steps/09-review/generate-review-step.tsx
|
|
30722
30832
|
import { useCallback as useCallback5, useEffect as useEffect24, useMemo as useMemo6, useRef as useRef17, useState as useState26 } from "react";
|
|
30723
30833
|
import figures8 from "figures";
|
|
30724
|
-
import { Box as
|
|
30725
|
-
import { Fragment as
|
|
30834
|
+
import { Box as Box39, Text as Text41 } from "ink";
|
|
30835
|
+
import { Fragment as Fragment15, jsx as jsx49, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
30726
30836
|
function sortComponentsForSidebar(components, cycleParticipants) {
|
|
30727
30837
|
const isEmpty2 = (entry) => Object.keys(entry.$properties ?? {}).length === 0 && Object.keys(entry.$slots ?? {}).length === 0;
|
|
30728
30838
|
const tier = (c2) => {
|
|
@@ -30763,10 +30873,10 @@ function CyclePathLine({
|
|
|
30763
30873
|
highlightComponents = false,
|
|
30764
30874
|
highlightLine = false
|
|
30765
30875
|
}) {
|
|
30766
|
-
return /* @__PURE__ */
|
|
30876
|
+
return /* @__PURE__ */ jsxs39(Text41, { color: highlightLine ? PALETTE.warning : void 0, children: [
|
|
30767
30877
|
prefix,
|
|
30768
30878
|
segments.map(
|
|
30769
|
-
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */
|
|
30879
|
+
(segment, index) => segment.kind === "slot" ? /* @__PURE__ */ jsx49(Text41, { color: PALETTE.accent, children: segment.text }, index) : segment.kind === "arrow" ? /* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: segment.text }, index) : /* @__PURE__ */ jsx49(Text41, { color: highlightComponents ? PALETTE.warning : void 0, children: segment.text }, index)
|
|
30770
30880
|
)
|
|
30771
30881
|
] });
|
|
30772
30882
|
}
|
|
@@ -30778,31 +30888,31 @@ function CycleDetailPanel({
|
|
|
30778
30888
|
height
|
|
30779
30889
|
}) {
|
|
30780
30890
|
const lines = [
|
|
30781
|
-
/* @__PURE__ */
|
|
30782
|
-
/* @__PURE__ */
|
|
30783
|
-
/* @__PURE__ */
|
|
30784
|
-
/* @__PURE__ */
|
|
30891
|
+
/* @__PURE__ */ jsx49(Text41, { bold: true, color: PALETTE.warning, children: `SLOT DEPENDENCY CYCLES (${cycles.length})` }, "cyc-title"),
|
|
30892
|
+
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "push will fail until these are resolved" }, "cyc-sub"),
|
|
30893
|
+
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "Reject a cycle member or remove a slot edge to break the cycle." }, "cyc-guidance"),
|
|
30894
|
+
/* @__PURE__ */ jsx49(Text41, { children: " " }, "cyc-space")
|
|
30785
30895
|
];
|
|
30786
30896
|
cycles.forEach((cycle, index) => {
|
|
30787
30897
|
const nodeCount = new Set(cycle.path).size;
|
|
30788
30898
|
const isCursor = index === cursor;
|
|
30789
30899
|
lines.push(
|
|
30790
|
-
/* @__PURE__ */
|
|
30791
|
-
/* @__PURE__ */
|
|
30900
|
+
/* @__PURE__ */ jsx49(Text41, { bold: true, inverse: isCursor, children: `${isCursor ? figures8.pointer : " "} Cycle ${index + 1} (${nodeCount} component${nodeCount === 1 ? "" : "s"}):` }, `cyc-h-${index}`),
|
|
30901
|
+
/* @__PURE__ */ jsx49(CyclePathLine, { segments: formatCyclePathSegments2(cycle, 16), prefix: " " }, `cyc-p-${index}`)
|
|
30792
30902
|
);
|
|
30793
30903
|
if (cycle.suggestedBreak) {
|
|
30794
30904
|
lines.push(
|
|
30795
|
-
/* @__PURE__ */
|
|
30905
|
+
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: ` Suggested fix: remove [${cycle.suggestedBreak.slotName}] from ${cycle.suggestedBreak.fromComponent}` }, `cyc-fix-${index}`)
|
|
30796
30906
|
);
|
|
30797
30907
|
}
|
|
30798
|
-
lines.push(/* @__PURE__ */
|
|
30908
|
+
lines.push(/* @__PURE__ */ jsx49(Text41, { children: " " }, `cyc-s-${index}`));
|
|
30799
30909
|
});
|
|
30800
30910
|
const footer = "[\u2191\u2193] move [Enter] fix cycle [c/q/Esc] close";
|
|
30801
30911
|
const viewportHeight = Math.max(1, height - 3);
|
|
30802
30912
|
const visible = lines.slice(scrollOffset, scrollOffset + viewportHeight - 1);
|
|
30803
|
-
return /* @__PURE__ */
|
|
30913
|
+
return /* @__PURE__ */ jsxs39(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
|
|
30804
30914
|
visible,
|
|
30805
|
-
/* @__PURE__ */
|
|
30915
|
+
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: footer })
|
|
30806
30916
|
] });
|
|
30807
30917
|
}
|
|
30808
30918
|
function BreakCyclePanel({
|
|
@@ -30813,14 +30923,14 @@ function BreakCyclePanel({
|
|
|
30813
30923
|
width,
|
|
30814
30924
|
height
|
|
30815
30925
|
}) {
|
|
30816
|
-
return /* @__PURE__ */
|
|
30817
|
-
/* @__PURE__ */
|
|
30818
|
-
cycle && /* @__PURE__ */
|
|
30819
|
-
/* @__PURE__ */
|
|
30820
|
-
/* @__PURE__ */
|
|
30821
|
-
edges.length > 0 && /* @__PURE__ */
|
|
30822
|
-
edges.map((edge, index) => /* @__PURE__ */
|
|
30823
|
-
confirming ? /* @__PURE__ */
|
|
30926
|
+
return /* @__PURE__ */ jsxs39(FixedPanel, { width, height, borderStyle: "round", borderColor: PALETTE.warning, paddingLeft: 1, children: [
|
|
30927
|
+
/* @__PURE__ */ jsx49(Text41, { bold: true, color: PALETTE.warning, children: "BREAK CYCLE \u2014 remove a slot edge" }),
|
|
30928
|
+
cycle && /* @__PURE__ */ jsx49(CyclePathLine, { segments: formatCyclePathSegments2(cycle), prefix: " ", highlightComponents: true }),
|
|
30929
|
+
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: cycle ? "Deleting an edge removes it from $allowedComponents (undo with Ctrl+Z)." : "No cycle highlighted." }),
|
|
30930
|
+
/* @__PURE__ */ jsx49(Text41, { children: " " }),
|
|
30931
|
+
edges.length > 0 && /* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: "remove slot edge:" }),
|
|
30932
|
+
edges.map((edge, index) => /* @__PURE__ */ jsx49(Text41, { inverse: index === cursor, children: `${index === cursor ? figures8.pointer : " "} remove '${edge.toComponent}' from ${edge.fromComponent}.$slots.${edge.slotName}.$allowedComponents` }, `${edge.fromComponent}-${edge.slotName}-${edge.toComponent}`)),
|
|
30933
|
+
confirming ? /* @__PURE__ */ jsx49(Text41, { bold: true, color: PALETTE.warning, children: "Delete this slot edge? [y] confirm [n] cancel" }) : /* @__PURE__ */ jsx49(Text41, { children: "[\u2191\u2193] move [Enter] delete [x/Esc] close" })
|
|
30824
30934
|
] });
|
|
30825
30935
|
}
|
|
30826
30936
|
function buildBreakingRows(breakingChanges) {
|
|
@@ -30866,9 +30976,9 @@ function deriveBreakingChanges(response) {
|
|
|
30866
30976
|
}
|
|
30867
30977
|
function GenerateReviewStep(props) {
|
|
30868
30978
|
if (!props.extractSessionId) {
|
|
30869
|
-
return /* @__PURE__ */
|
|
30979
|
+
return /* @__PURE__ */ jsx49(Box39, { paddingX: 2, paddingY: 1, children: /* @__PURE__ */ jsx49(Text41, { color: PALETTE.error, children: "Error: no session ID \u2014 cannot load generated definitions." }) });
|
|
30870
30980
|
}
|
|
30871
|
-
return /* @__PURE__ */
|
|
30981
|
+
return /* @__PURE__ */ jsx49(GenerateReviewStepView, { ...props, extractSessionId: props.extractSessionId });
|
|
30872
30982
|
}
|
|
30873
30983
|
function GenerateReviewStepView({
|
|
30874
30984
|
extractSessionId,
|
|
@@ -31730,13 +31840,13 @@ function GenerateReviewStepView({
|
|
|
31730
31840
|
}
|
|
31731
31841
|
});
|
|
31732
31842
|
if (loading) {
|
|
31733
|
-
return /* @__PURE__ */
|
|
31843
|
+
return /* @__PURE__ */ jsx49(ReviewLoadingState, {});
|
|
31734
31844
|
}
|
|
31735
31845
|
if (loadError) {
|
|
31736
|
-
return /* @__PURE__ */
|
|
31846
|
+
return /* @__PURE__ */ jsx49(ReviewLoadError, { message: loadError });
|
|
31737
31847
|
}
|
|
31738
31848
|
if (showHelp) {
|
|
31739
|
-
return /* @__PURE__ */
|
|
31849
|
+
return /* @__PURE__ */ jsx49(HelpOverlay, { sections: HELP_SECTIONS2, handleInput: false, onClose: () => setShowHelp(false) });
|
|
31740
31850
|
}
|
|
31741
31851
|
const { selected, selectedJson, visibleJsonPanelValue } = getReviewSelectionState(
|
|
31742
31852
|
components,
|
|
@@ -31776,9 +31886,9 @@ function GenerateReviewStepView({
|
|
|
31776
31886
|
for (const c2 of closures.values()) if (c2.nodes.length > 1) return true;
|
|
31777
31887
|
return false;
|
|
31778
31888
|
})();
|
|
31779
|
-
return /* @__PURE__ */
|
|
31780
|
-
/* @__PURE__ */
|
|
31781
|
-
/* @__PURE__ */
|
|
31889
|
+
return /* @__PURE__ */ jsxs39(Box39, { flexDirection: "column", children: [
|
|
31890
|
+
/* @__PURE__ */ jsx49(StepHeader, { step: "review" }),
|
|
31891
|
+
/* @__PURE__ */ jsx49(
|
|
31782
31892
|
ReviewStepDialogs,
|
|
31783
31893
|
{
|
|
31784
31894
|
surfaceState: reviewSurface,
|
|
@@ -31788,16 +31898,16 @@ function GenerateReviewStepView({
|
|
|
31788
31898
|
onQuit
|
|
31789
31899
|
}
|
|
31790
31900
|
),
|
|
31791
|
-
/* @__PURE__ */
|
|
31792
|
-
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */
|
|
31793
|
-
/* @__PURE__ */
|
|
31794
|
-
!removedBannerCollapsed && /* @__PURE__ */
|
|
31795
|
-
/* @__PURE__ */
|
|
31796
|
-
removedComponents.map((rc) => /* @__PURE__ */
|
|
31901
|
+
/* @__PURE__ */ jsx49(ReviewReloadDialog, { open: showReloadDialog && !dialogOpen }),
|
|
31902
|
+
removedComponents.length > 0 && !dialogOpen && /* @__PURE__ */ jsxs39(Box39, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
31903
|
+
/* @__PURE__ */ jsx49(Text41, { bold: true, color: PALETTE.error, children: removedComponentsHeader(removedComponents.length, true) }),
|
|
31904
|
+
!removedBannerCollapsed && /* @__PURE__ */ jsxs39(Fragment15, { children: [
|
|
31905
|
+
/* @__PURE__ */ jsx49(Text41, { children: " " }),
|
|
31906
|
+
removedComponents.map((rc) => /* @__PURE__ */ jsx49(Text41, { children: removedComponentLine(rc) }, rc.id))
|
|
31797
31907
|
] })
|
|
31798
31908
|
] }),
|
|
31799
|
-
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */
|
|
31800
|
-
|
|
31909
|
+
breakingChanges.length > 0 && !dialogOpen && /* @__PURE__ */ jsx49(Box39, { paddingX: 1, children: /* @__PURE__ */ jsx49(
|
|
31910
|
+
Text41,
|
|
31801
31911
|
{
|
|
31802
31912
|
color: PALETTE.warning,
|
|
31803
31913
|
children: `[b] ${breakingChanges.length} breaking change${breakingChanges.length === 1 ? "" : "s"}`
|
|
@@ -31807,14 +31917,14 @@ function GenerateReviewStepView({
|
|
|
31807
31917
|
const row = breakingRows[breakingCursor];
|
|
31808
31918
|
const comp = row ? breakingChanges.find((b) => b.componentName === row.componentName) : void 0;
|
|
31809
31919
|
if (!comp) return null;
|
|
31810
|
-
return /* @__PURE__ */
|
|
31811
|
-
/* @__PURE__ */
|
|
31812
|
-
comp.impact && /* @__PURE__ */
|
|
31813
|
-
comp.changes.length === 0 ? /* @__PURE__ */
|
|
31814
|
-
/* @__PURE__ */
|
|
31920
|
+
return /* @__PURE__ */ jsxs39(Box39, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
31921
|
+
/* @__PURE__ */ jsx49(Text41, { bold: true, color: PALETTE.warning, children: `Breaking changes \u2014 ${comp.componentName}` }),
|
|
31922
|
+
comp.impact && /* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: ` affects ${comp.impact.affectedExperiences} experience${comp.impact.affectedExperiences === 1 ? "" : "s"}, ${comp.impact.affectedFragments} fragment${comp.impact.affectedFragments === 1 ? "" : "s"}` }),
|
|
31923
|
+
comp.changes.length === 0 ? /* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: " (no enumerated changes)" }) : comp.changes.map((change, ci) => /* @__PURE__ */ jsx49(Text41, { children: ` \u2022 ${formatBreakingChange(change, comp.current)}` }, `bd-detail-${ci}`)),
|
|
31924
|
+
/* @__PURE__ */ jsx49(Text41, { children: "[D/Esc] close detail" })
|
|
31815
31925
|
] });
|
|
31816
31926
|
})(),
|
|
31817
|
-
!dialogOpen && /* @__PURE__ */
|
|
31927
|
+
!dialogOpen && /* @__PURE__ */ jsx49(
|
|
31818
31928
|
LivePreviewSummary,
|
|
31819
31929
|
{
|
|
31820
31930
|
enabled: livePreview,
|
|
@@ -31833,16 +31943,16 @@ function GenerateReviewStepView({
|
|
|
31833
31943
|
const participantSet = cycleView.structural;
|
|
31834
31944
|
const members = stillRejected.filter((n) => participantSet.has(n)).sort();
|
|
31835
31945
|
const ancestors = stillRejected.filter((n) => !participantSet.has(n)).sort();
|
|
31836
|
-
return /* @__PURE__ */
|
|
31837
|
-
/* @__PURE__ */
|
|
31838
|
-
members.length > 0 && /* @__PURE__ */
|
|
31839
|
-
ancestors.length > 0 && /* @__PURE__ */
|
|
31840
|
-
/* @__PURE__ */
|
|
31946
|
+
return /* @__PURE__ */ jsxs39(Box39, { flexDirection: "column", borderStyle: "single", borderColor: PALETTE.error, paddingX: 1, children: [
|
|
31947
|
+
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.error, bold: true, children: `Cyclic component graph \u2014 auto-rejected ${stillRejected.length} component${stillRejected.length === 1 ? "" : "s"}:` }),
|
|
31948
|
+
members.length > 0 && /* @__PURE__ */ jsx49(Text41, { color: PALETTE.error, children: ` Cycle members: ${members.join(", ")}` }),
|
|
31949
|
+
ancestors.length > 0 && /* @__PURE__ */ jsx49(Text41, { color: PALETTE.error, children: ` Ancestors: ${ancestors.join(", ")}` }),
|
|
31950
|
+
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.muted, children: undoSnapshot ? " [Ctrl+Z] undo \xB7 [r]/[a] manually toggle \xB7 [F] continue" : " [r]/[a] manually toggle \xB7 [F] continue" })
|
|
31841
31951
|
] });
|
|
31842
31952
|
})(),
|
|
31843
|
-
/* @__PURE__ */
|
|
31844
|
-
/* @__PURE__ */
|
|
31845
|
-
!dialogOpen && breakPanel.isOpen && /* @__PURE__ */
|
|
31953
|
+
/* @__PURE__ */ jsx49(ReviewEmptyComponentsWarning, { count: emptyCount, hidden: dialogOpen }),
|
|
31954
|
+
/* @__PURE__ */ jsx49(ReviewFinalizeError, { message: finalizeError, hidden: dialogOpen }),
|
|
31955
|
+
!dialogOpen && breakPanel.isOpen && /* @__PURE__ */ jsx49(
|
|
31846
31956
|
BreakCyclePanel,
|
|
31847
31957
|
{
|
|
31848
31958
|
cycle: cycleRows[cyclesCursor],
|
|
@@ -31853,7 +31963,7 @@ function GenerateReviewStepView({
|
|
|
31853
31963
|
height: panelHeight
|
|
31854
31964
|
}
|
|
31855
31965
|
),
|
|
31856
|
-
!dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */
|
|
31966
|
+
!dialogOpen && cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsx49(
|
|
31857
31967
|
CycleDetailPanel,
|
|
31858
31968
|
{
|
|
31859
31969
|
cycles: cycleRows,
|
|
@@ -31863,8 +31973,8 @@ function GenerateReviewStepView({
|
|
|
31863
31973
|
height: panelHeight
|
|
31864
31974
|
}
|
|
31865
31975
|
),
|
|
31866
|
-
!dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */
|
|
31867
|
-
breakingPanel.isOpen ? /* @__PURE__ */
|
|
31976
|
+
!dialogOpen && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs39(Box39, { children: [
|
|
31977
|
+
breakingPanel.isOpen ? /* @__PURE__ */ jsx49(
|
|
31868
31978
|
GotoBanner,
|
|
31869
31979
|
{
|
|
31870
31980
|
title: `Breaking changes \u2014 ${breakingRows[breakingCursor]?.componentName ?? "unknown component"}`,
|
|
@@ -31877,7 +31987,7 @@ function GenerateReviewStepView({
|
|
|
31877
31987
|
width: sidebarWidth,
|
|
31878
31988
|
footerHint: "[\u2191/\u2193] move \xB7 [Enter] jump \xB7 [D] detail \xB7 [Esc] close"
|
|
31879
31989
|
}
|
|
31880
|
-
) : /* @__PURE__ */
|
|
31990
|
+
) : /* @__PURE__ */ jsx49(
|
|
31881
31991
|
GroupedSidebar,
|
|
31882
31992
|
{
|
|
31883
31993
|
items: groupedItems,
|
|
@@ -31918,7 +32028,7 @@ function GenerateReviewStepView({
|
|
|
31918
32028
|
graph: sidebarGraph
|
|
31919
32029
|
}
|
|
31920
32030
|
),
|
|
31921
|
-
selected ? /* @__PURE__ */
|
|
32031
|
+
selected ? /* @__PURE__ */ jsx49(
|
|
31922
32032
|
ReviewComponentPanel,
|
|
31923
32033
|
{
|
|
31924
32034
|
selectedKey: selected.key,
|
|
@@ -31948,12 +32058,12 @@ function GenerateReviewStepView({
|
|
|
31948
32058
|
),
|
|
31949
32059
|
saveError: reviewEditor.saveError
|
|
31950
32060
|
}
|
|
31951
|
-
) : /* @__PURE__ */
|
|
32061
|
+
) : /* @__PURE__ */ jsx49(ReviewNoSelection, {})
|
|
31952
32062
|
] }),
|
|
31953
|
-
!dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */
|
|
31954
|
-
/* @__PURE__ */
|
|
32063
|
+
!dialogOpen && cycleRows.length > 0 && !cyclePanel.isOpen && !breakPanel.isOpen && /* @__PURE__ */ jsxs39(Box39, { flexDirection: "column", children: [
|
|
32064
|
+
/* @__PURE__ */ jsx49(Text41, { color: PALETTE.warning, children: `\u26A0 ${cycleRows.length} slot dependency cycle${cycleRows.length === 1 ? "" : "s"} detected \u2014 push will fail` }),
|
|
31955
32065
|
cycleRows.slice(0, 3).map((cycle, idx) => {
|
|
31956
|
-
return /* @__PURE__ */
|
|
32066
|
+
return /* @__PURE__ */ jsx49(
|
|
31957
32067
|
CyclePathLine,
|
|
31958
32068
|
{
|
|
31959
32069
|
segments: formatCyclePathSegments2(cycle),
|
|
@@ -31964,10 +32074,10 @@ function GenerateReviewStepView({
|
|
|
31964
32074
|
`cyc-banner-${idx}`
|
|
31965
32075
|
);
|
|
31966
32076
|
}),
|
|
31967
|
-
cycleRows.length > 3 && /* @__PURE__ */
|
|
31968
|
-
/* @__PURE__ */
|
|
32077
|
+
cycleRows.length > 3 && /* @__PURE__ */ jsx49(Text41, { color: PALETTE.warning, children: ` \u2026${cycleRows.length - 3} more` }),
|
|
32078
|
+
/* @__PURE__ */ jsx49(Text41, { children: " press [c] for detail" })
|
|
31969
32079
|
] }),
|
|
31970
|
-
/* @__PURE__ */
|
|
32080
|
+
/* @__PURE__ */ jsx49(
|
|
31971
32081
|
SearchMatchSummary,
|
|
31972
32082
|
{
|
|
31973
32083
|
open: searchOpen,
|
|
@@ -31978,7 +32088,7 @@ function GenerateReviewStepView({
|
|
|
31978
32088
|
hidden: dialogOpen
|
|
31979
32089
|
}
|
|
31980
32090
|
),
|
|
31981
|
-
!dialogOpen && sidebarFocused && reviewEditor.panelOpen !== "token-review" && /* @__PURE__ */
|
|
32091
|
+
!dialogOpen && sidebarFocused && reviewEditor.panelOpen !== "token-review" && /* @__PURE__ */ jsx49(CompactControlBar, { hasGroupRoots, searchActive: searchOpen || searchQuery.length > 0 })
|
|
31982
32092
|
] });
|
|
31983
32093
|
}
|
|
31984
32094
|
var HELP_SECTIONS2;
|
|
@@ -32095,17 +32205,17 @@ var init_generate_review_step = __esm({
|
|
|
32095
32205
|
});
|
|
32096
32206
|
|
|
32097
32207
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/CustomPromptBanner.tsx
|
|
32098
|
-
import { Box as
|
|
32099
|
-
import { jsx as
|
|
32208
|
+
import { Box as Box40, Text as Text42 } from "ink";
|
|
32209
|
+
import { jsx as jsx50, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
32100
32210
|
function CustomPromptBanner({ generatePromptPath }) {
|
|
32101
32211
|
if (!generatePromptPath) return null;
|
|
32102
|
-
return /* @__PURE__ */
|
|
32103
|
-
/* @__PURE__ */
|
|
32104
|
-
generatePromptPath ? /* @__PURE__ */
|
|
32212
|
+
return /* @__PURE__ */ jsxs40(Box40, { flexDirection: "column", borderStyle: "round", borderColor: PALETTE.warning, paddingX: 1, children: [
|
|
32213
|
+
/* @__PURE__ */ jsx50(Text42, { color: PALETTE.warning, bold: true, children: "WARNING: Custom prompt active" }),
|
|
32214
|
+
generatePromptPath ? /* @__PURE__ */ jsxs40(Text42, { color: PALETTE.warning, children: [
|
|
32105
32215
|
"components: ",
|
|
32106
32216
|
generatePromptPath
|
|
32107
32217
|
] }) : null,
|
|
32108
|
-
/* @__PURE__ */
|
|
32218
|
+
/* @__PURE__ */ jsx50(Text42, { color: PALETTE.warning, children: "Bundled invariants (utility-wrapper rejection, description content rules) do NOT apply." })
|
|
32109
32219
|
] });
|
|
32110
32220
|
}
|
|
32111
32221
|
var init_CustomPromptBanner = __esm({
|
|
@@ -32134,15 +32244,15 @@ var init_contentful_urls2 = __esm({
|
|
|
32134
32244
|
});
|
|
32135
32245
|
|
|
32136
32246
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/components/SpaceEnvironment.tsx
|
|
32137
|
-
import { Box as
|
|
32138
|
-
import { jsx as
|
|
32247
|
+
import { Box as Box41, Text as Text43 } from "ink";
|
|
32248
|
+
import { jsx as jsx51, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
32139
32249
|
function SpaceEnvironment({ spaceId, environmentId }) {
|
|
32140
|
-
return /* @__PURE__ */
|
|
32141
|
-
/* @__PURE__ */
|
|
32142
|
-
/* @__PURE__ */
|
|
32143
|
-
/* @__PURE__ */
|
|
32144
|
-
/* @__PURE__ */
|
|
32145
|
-
/* @__PURE__ */
|
|
32250
|
+
return /* @__PURE__ */ jsxs41(Box41, { gap: 1, marginTop: 1, children: [
|
|
32251
|
+
/* @__PURE__ */ jsx51(Text43, { color: PALETTE.muted, children: "Space:" }),
|
|
32252
|
+
/* @__PURE__ */ jsx51(Text43, { children: spaceId }),
|
|
32253
|
+
/* @__PURE__ */ jsx51(Text43, { color: PALETTE.muted, children: "/" }),
|
|
32254
|
+
/* @__PURE__ */ jsx51(Text43, { color: PALETTE.muted, children: "Environment:" }),
|
|
32255
|
+
/* @__PURE__ */ jsx51(Text43, { children: environmentId })
|
|
32146
32256
|
] });
|
|
32147
32257
|
}
|
|
32148
32258
|
var init_SpaceEnvironment = __esm({
|
|
@@ -32153,19 +32263,19 @@ var init_SpaceEnvironment = __esm({
|
|
|
32153
32263
|
});
|
|
32154
32264
|
|
|
32155
32265
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/DoneStep.tsx
|
|
32156
|
-
import { Box as
|
|
32157
|
-
import { Fragment as
|
|
32266
|
+
import { Box as Box42, Text as Text44 } from "ink";
|
|
32267
|
+
import { Fragment as Fragment16, jsx as jsx52, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
32158
32268
|
function EntityRows({ entity, label }) {
|
|
32159
32269
|
const plural3 = (n) => `${n} ${label}${n !== 1 ? "s" : ""}`;
|
|
32160
|
-
return /* @__PURE__ */
|
|
32161
|
-
ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */
|
|
32162
|
-
/* @__PURE__ */
|
|
32270
|
+
return /* @__PURE__ */ jsxs42(Fragment16, { children: [
|
|
32271
|
+
ACTIONS.filter((action) => entity[action] > 0).map((action) => /* @__PURE__ */ jsxs42(Text44, { children: [
|
|
32272
|
+
/* @__PURE__ */ jsx52(Text44, { color: PALETTE.success, children: "\u2713" }),
|
|
32163
32273
|
" ",
|
|
32164
32274
|
plural3(entity[action]),
|
|
32165
32275
|
" ",
|
|
32166
32276
|
action
|
|
32167
32277
|
] }, action)),
|
|
32168
|
-
entity.failed > 0 && /* @__PURE__ */
|
|
32278
|
+
entity.failed > 0 && /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.error, children: [
|
|
32169
32279
|
"\u2717 ",
|
|
32170
32280
|
plural3(entity.failed),
|
|
32171
32281
|
" failed \u2014 check logs above"
|
|
@@ -32173,9 +32283,9 @@ function EntityRows({ entity, label }) {
|
|
|
32173
32283
|
] });
|
|
32174
32284
|
}
|
|
32175
32285
|
function LinkRow({ title, url }) {
|
|
32176
|
-
return /* @__PURE__ */
|
|
32177
|
-
/* @__PURE__ */
|
|
32178
|
-
/* @__PURE__ */
|
|
32286
|
+
return /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", children: [
|
|
32287
|
+
/* @__PURE__ */ jsx52(Text44, { color: PALETTE.muted, children: title }),
|
|
32288
|
+
/* @__PURE__ */ jsx52(Text44, { color: PALETTE.accent, children: url })
|
|
32179
32289
|
] });
|
|
32180
32290
|
}
|
|
32181
32291
|
function DoneStep({
|
|
@@ -32199,29 +32309,29 @@ function DoneStep({
|
|
|
32199
32309
|
const totalPushed = componentTypes.created + componentTypes.updated + componentTypes.removed + designTokens.created + designTokens.updated + designTokens.removed;
|
|
32200
32310
|
const success = totalFailed === 0;
|
|
32201
32311
|
const urlArgs = { host: host ?? "api.contentful.com", spaceId, environmentId };
|
|
32202
|
-
return /* @__PURE__ */
|
|
32203
|
-
/* @__PURE__ */
|
|
32204
|
-
/* @__PURE__ */
|
|
32205
|
-
success ? /* @__PURE__ */
|
|
32206
|
-
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */
|
|
32207
|
-
/* @__PURE__ */
|
|
32208
|
-
/* @__PURE__ */
|
|
32209
|
-
summary && /* @__PURE__ */
|
|
32312
|
+
return /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", children: [
|
|
32313
|
+
/* @__PURE__ */ jsx52(StepHeader, { step: "done" }),
|
|
32314
|
+
/* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
32315
|
+
success ? /* @__PURE__ */ jsx52(Text44, { bold: true, color: PALETTE.success, children: "Done!" }) : /* @__PURE__ */ jsx52(Text44, { bold: true, color: PALETTE.warning, children: "\u26A0 Finished with errors" }),
|
|
32316
|
+
totalPushed === 0 && totalFailed === 0 && !summary ? /* @__PURE__ */ jsx52(Text44, { color: PALETTE.muted, children: credentialsSkipped ? "Nothing was pushed \u2014 you skipped the Contentful credentials, so the files were only saved locally." : "Nothing was pushed \u2014 everything was already up to date." }) : /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", children: [
|
|
32317
|
+
/* @__PURE__ */ jsx52(EntityRows, { entity: componentTypes, label: "Component" }),
|
|
32318
|
+
/* @__PURE__ */ jsx52(EntityRows, { entity: designTokens, label: "Design Token" }),
|
|
32319
|
+
summary && /* @__PURE__ */ jsx52(Box42, { marginTop: 1, children: /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.muted, children: [
|
|
32210
32320
|
"Push result: ",
|
|
32211
32321
|
summary.succeeded,
|
|
32212
32322
|
"/",
|
|
32213
32323
|
summary.total,
|
|
32214
32324
|
" succeeded",
|
|
32215
|
-
summary.failed > 0 && /* @__PURE__ */
|
|
32325
|
+
summary.failed > 0 && /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.error, children: [
|
|
32216
32326
|
", ",
|
|
32217
32327
|
summary.failed,
|
|
32218
32328
|
" failed"
|
|
32219
32329
|
] })
|
|
32220
32330
|
] }) })
|
|
32221
32331
|
] }),
|
|
32222
|
-
failures.length > 0 && /* @__PURE__ */
|
|
32223
|
-
/* @__PURE__ */
|
|
32224
|
-
failures.map((failure) => /* @__PURE__ */
|
|
32332
|
+
failures.length > 0 && /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", children: [
|
|
32333
|
+
/* @__PURE__ */ jsx52(Text44, { bold: true, color: PALETTE.error, children: "Failure details" }),
|
|
32334
|
+
failures.map((failure) => /* @__PURE__ */ jsxs42(Text44, { color: PALETTE.error, children: [
|
|
32225
32335
|
failure.entityType,
|
|
32226
32336
|
" ",
|
|
32227
32337
|
failure.entityId,
|
|
@@ -32229,11 +32339,11 @@ function DoneStep({
|
|
|
32229
32339
|
failure.message
|
|
32230
32340
|
] }, `${failure.entityType}:${failure.entityId}`))
|
|
32231
32341
|
] }),
|
|
32232
|
-
/* @__PURE__ */
|
|
32233
|
-
success && totalPushed > 0 && /* @__PURE__ */
|
|
32234
|
-
/* @__PURE__ */
|
|
32235
|
-
produced.components && /* @__PURE__ */
|
|
32236
|
-
produced.tokens && /* @__PURE__ */
|
|
32342
|
+
/* @__PURE__ */ jsx52(SpaceEnvironment, { spaceId, environmentId }),
|
|
32343
|
+
success && totalPushed > 0 && /* @__PURE__ */ jsxs42(Box42, { flexDirection: "column", gap: 1, children: [
|
|
32344
|
+
/* @__PURE__ */ jsx52(Text44, { color: PALETTE.success, children: "Your design system is now in Contentful Experiences." }),
|
|
32345
|
+
produced.components && /* @__PURE__ */ jsx52(LinkRow, { title: "View your components here:", url: buildPostPushUrl2(urlArgs) }),
|
|
32346
|
+
produced.tokens && /* @__PURE__ */ jsx52(
|
|
32237
32347
|
LinkRow,
|
|
32238
32348
|
{
|
|
32239
32349
|
title: "View your design tokens here:",
|
|
@@ -32241,7 +32351,7 @@ function DoneStep({
|
|
|
32241
32351
|
}
|
|
32242
32352
|
)
|
|
32243
32353
|
] }),
|
|
32244
|
-
/* @__PURE__ */
|
|
32354
|
+
/* @__PURE__ */ jsx52(ControlHints, { hints: [{ keys: "Enter / q", label: "Exit" }] })
|
|
32245
32355
|
] })
|
|
32246
32356
|
] });
|
|
32247
32357
|
}
|
|
@@ -32300,10 +32410,10 @@ var init_use_blinking_cursor = __esm({
|
|
|
32300
32410
|
|
|
32301
32411
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PathPrompt.tsx
|
|
32302
32412
|
import { useState as useState28 } from "react";
|
|
32303
|
-
import { Box as
|
|
32413
|
+
import { Box as Box43, Text as Text45 } from "ink";
|
|
32304
32414
|
import { readdirSync as readdirSync4 } from "node:fs";
|
|
32305
32415
|
import { dirname as dirname17, basename as basename6, join as join23 } from "node:path";
|
|
32306
|
-
import { jsx as
|
|
32416
|
+
import { jsx as jsx53, jsxs as jsxs43 } from "react/jsx-runtime";
|
|
32307
32417
|
function autocomplete(partial) {
|
|
32308
32418
|
if (!partial) return null;
|
|
32309
32419
|
const normalized = normalizePath(partial);
|
|
@@ -32361,20 +32471,20 @@ function PathPrompt({
|
|
|
32361
32471
|
const shown = input || defaultPath;
|
|
32362
32472
|
const isPlaceholder = input === "";
|
|
32363
32473
|
const cursor = cursorVisible ? "\u2588" : " ";
|
|
32364
|
-
return /* @__PURE__ */
|
|
32365
|
-
/* @__PURE__ */
|
|
32366
|
-
/* @__PURE__ */
|
|
32367
|
-
summary && /* @__PURE__ */
|
|
32368
|
-
/* @__PURE__ */
|
|
32369
|
-
/* @__PURE__ */
|
|
32370
|
-
/* @__PURE__ */
|
|
32474
|
+
return /* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", children: [
|
|
32475
|
+
/* @__PURE__ */ jsx53(StepHeader, { step: "push" }),
|
|
32476
|
+
/* @__PURE__ */ jsxs43(Box43, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
32477
|
+
summary && /* @__PURE__ */ jsx53(Text45, { color: PALETTE.muted, children: summary }),
|
|
32478
|
+
/* @__PURE__ */ jsxs43(Box43, { gap: 1, children: [
|
|
32479
|
+
/* @__PURE__ */ jsx53(Text45, { color: PALETTE.accent, children: "?" }),
|
|
32480
|
+
/* @__PURE__ */ jsxs43(Text45, { bold: true, children: [
|
|
32371
32481
|
label,
|
|
32372
32482
|
":"
|
|
32373
32483
|
] }),
|
|
32374
|
-
/* @__PURE__ */
|
|
32375
|
-
/* @__PURE__ */
|
|
32484
|
+
/* @__PURE__ */ jsx53(Text45, { color: isPlaceholder ? PALETTE.muted : void 0, children: shown }),
|
|
32485
|
+
/* @__PURE__ */ jsx53(Text45, { children: cursor })
|
|
32376
32486
|
] }),
|
|
32377
|
-
/* @__PURE__ */
|
|
32487
|
+
/* @__PURE__ */ jsx53(
|
|
32378
32488
|
ControlHints,
|
|
32379
32489
|
{
|
|
32380
32490
|
hints: [
|
|
@@ -32424,8 +32534,8 @@ var init_produced = __esm({
|
|
|
32424
32534
|
|
|
32425
32535
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/use-timed-spinner.tsx
|
|
32426
32536
|
import { useEffect as useEffect26, useState as useState29 } from "react";
|
|
32427
|
-
import { Spinner as
|
|
32428
|
-
import { jsx as
|
|
32537
|
+
import { Spinner as Spinner3 } from "@inkjs/ui";
|
|
32538
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
32429
32539
|
function useTimedSpinner() {
|
|
32430
32540
|
const [elapsedSeconds, setElapsedSeconds] = useState29(0);
|
|
32431
32541
|
useEffect26(() => {
|
|
@@ -32437,7 +32547,7 @@ function useTimedSpinner() {
|
|
|
32437
32547
|
const mins = Math.floor(elapsedSeconds / 60);
|
|
32438
32548
|
const secs = elapsedSeconds % 60;
|
|
32439
32549
|
return {
|
|
32440
|
-
spinner: /* @__PURE__ */
|
|
32550
|
+
spinner: /* @__PURE__ */ jsx54(Spinner3, {}),
|
|
32441
32551
|
elapsed: mins > 0 ? `${mins}m ${secs}s` : `${secs}s`
|
|
32442
32552
|
};
|
|
32443
32553
|
}
|
|
@@ -32448,51 +32558,52 @@ var init_use_timed_spinner = __esm({
|
|
|
32448
32558
|
});
|
|
32449
32559
|
|
|
32450
32560
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/PushingStep.tsx
|
|
32451
|
-
import { Box as
|
|
32561
|
+
import { Box as Box44, Text as Text46 } from "ink";
|
|
32452
32562
|
import { ProgressBar as ProgressBar2, ThemeProvider as ThemeProvider2 } from "@inkjs/ui";
|
|
32453
|
-
import { jsx as
|
|
32563
|
+
import { jsx as jsx55, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
32454
32564
|
function PushingStep({ progress, produced, counts }) {
|
|
32455
32565
|
const { spinner, elapsed } = useTimedSpinner();
|
|
32456
32566
|
const operationId = progress && progress.kind === "queued" ? progress.operationId : null;
|
|
32457
32567
|
const showGlobal = progress && progress.kind === "progress";
|
|
32458
32568
|
const showCurrent = progress && progress.kind === "progress" && progress.current ? progress.current : null;
|
|
32459
|
-
|
|
32460
|
-
|
|
32461
|
-
/* @__PURE__ */
|
|
32462
|
-
|
|
32569
|
+
const items = progress && progress.kind === "progress" ? progress.items : [];
|
|
32570
|
+
return /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", children: [
|
|
32571
|
+
/* @__PURE__ */ jsx55(StepHeader, { step: "push" }),
|
|
32572
|
+
/* @__PURE__ */ jsx55(AsideLayout, { aside: items.length > 0 ? /* @__PURE__ */ jsx55(ActivityPanel, { title: "Entities", items }) : void 0, children: /* @__PURE__ */ jsxs44(Box44, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 1, children: [
|
|
32573
|
+
/* @__PURE__ */ jsxs44(Box44, { gap: 1, children: [
|
|
32463
32574
|
spinner,
|
|
32464
|
-
/* @__PURE__ */
|
|
32575
|
+
/* @__PURE__ */ jsxs44(Text46, { children: [
|
|
32465
32576
|
"Writing ",
|
|
32466
32577
|
countedThings(produced, counts),
|
|
32467
32578
|
" to your Contentful space..."
|
|
32468
32579
|
] })
|
|
32469
32580
|
] }),
|
|
32470
|
-
operationId && /* @__PURE__ */
|
|
32471
|
-
/* @__PURE__ */
|
|
32472
|
-
/* @__PURE__ */
|
|
32581
|
+
operationId && /* @__PURE__ */ jsxs44(Box44, { gap: 1, children: [
|
|
32582
|
+
/* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: "Operation:" }),
|
|
32583
|
+
/* @__PURE__ */ jsx55(Text46, { children: operationId })
|
|
32473
32584
|
] }),
|
|
32474
|
-
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */
|
|
32475
|
-
/* @__PURE__ */
|
|
32476
|
-
/* @__PURE__ */
|
|
32585
|
+
showGlobal && progress && progress.kind === "progress" && /* @__PURE__ */ jsx55(Box44, { gap: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs44(Box44, { gap: 2, children: [
|
|
32586
|
+
/* @__PURE__ */ jsx55(Box44, { width: 40, children: /* @__PURE__ */ jsx55(ThemeProvider2, { theme: PROGRESS_THEME, children: /* @__PURE__ */ jsx55(ProgressBar2, { value: Math.round(progress.processed / progress.total * 100) }) }) }),
|
|
32587
|
+
/* @__PURE__ */ jsxs44(Text46, { color: PALETTE.muted, children: [
|
|
32477
32588
|
progress.processed,
|
|
32478
32589
|
"/",
|
|
32479
32590
|
progress.total,
|
|
32480
32591
|
" entities"
|
|
32481
32592
|
] }),
|
|
32482
|
-
progress.failed > 0 && /* @__PURE__ */
|
|
32593
|
+
progress.failed > 0 && /* @__PURE__ */ jsxs44(Text46, { color: PALETTE.error, children: [
|
|
32483
32594
|
progress.failed,
|
|
32484
32595
|
" failed"
|
|
32485
32596
|
] })
|
|
32486
32597
|
] }) }),
|
|
32487
|
-
showCurrent && /* @__PURE__ */
|
|
32488
|
-
/* @__PURE__ */
|
|
32489
|
-
/* @__PURE__ */
|
|
32598
|
+
showCurrent && /* @__PURE__ */ jsxs44(Box44, { gap: 1, children: [
|
|
32599
|
+
/* @__PURE__ */ jsx55(Text46, { color: PALETTE.muted, children: "Now processing:" }),
|
|
32600
|
+
/* @__PURE__ */ jsx55(Text46, { children: showCurrent })
|
|
32490
32601
|
] }),
|
|
32491
|
-
/* @__PURE__ */
|
|
32602
|
+
/* @__PURE__ */ jsx55(Box44, { marginTop: 1, children: /* @__PURE__ */ jsxs44(Text46, { color: PALETTE.muted, children: [
|
|
32492
32603
|
"Elapsed: ",
|
|
32493
32604
|
elapsed
|
|
32494
32605
|
] }) })
|
|
32495
|
-
] })
|
|
32606
|
+
] }) })
|
|
32496
32607
|
] });
|
|
32497
32608
|
}
|
|
32498
32609
|
var init_PushingStep = __esm({
|
|
@@ -32501,6 +32612,7 @@ var init_PushingStep = __esm({
|
|
|
32501
32612
|
init_StepHeader();
|
|
32502
32613
|
init_produced();
|
|
32503
32614
|
init_use_timed_spinner();
|
|
32615
|
+
init_activity_panel();
|
|
32504
32616
|
init_theme2();
|
|
32505
32617
|
init_theme();
|
|
32506
32618
|
}
|
|
@@ -32702,8 +32814,8 @@ var init_preview_confirmation_input = __esm({
|
|
|
32702
32814
|
|
|
32703
32815
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/screens/WizardPreviewStep.tsx
|
|
32704
32816
|
import { useEffect as useEffect27, useState as useState30, useMemo as useMemo7 } from "react";
|
|
32705
|
-
import { Box as
|
|
32706
|
-
import { Fragment as
|
|
32817
|
+
import { Box as Box45, Text as Text47 } from "ink";
|
|
32818
|
+
import { Fragment as Fragment17, jsx as jsx56, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
32707
32819
|
function buildPreviewSummaryLines(preview) {
|
|
32708
32820
|
const lines = [];
|
|
32709
32821
|
const { components, tokens } = preview;
|
|
@@ -32955,12 +33067,12 @@ function WizardPreviewStep({
|
|
|
32955
33067
|
return;
|
|
32956
33068
|
}
|
|
32957
33069
|
});
|
|
32958
|
-
return /* @__PURE__ */
|
|
32959
|
-
/* @__PURE__ */
|
|
32960
|
-
/* @__PURE__ */
|
|
32961
|
-
hasAnything ? /* @__PURE__ */
|
|
32962
|
-
/* @__PURE__ */
|
|
32963
|
-
/* @__PURE__ */
|
|
33070
|
+
return /* @__PURE__ */ jsxs45(Box45, { flexDirection: "column", children: [
|
|
33071
|
+
/* @__PURE__ */ jsx56(StepHeader, { step: "push" }),
|
|
33072
|
+
/* @__PURE__ */ jsxs45(Box45, { flexDirection: "column", gap: 1, paddingX: 2, paddingBottom: 2, children: [
|
|
33073
|
+
hasAnything ? /* @__PURE__ */ jsxs45(Fragment17, { children: [
|
|
33074
|
+
/* @__PURE__ */ jsx56(Text47, { children: "Here's what will happen in your space:" }),
|
|
33075
|
+
/* @__PURE__ */ jsxs45(
|
|
32964
33076
|
WindowedPanel,
|
|
32965
33077
|
{
|
|
32966
33078
|
width: Math.max(20, terminalColumns - 4),
|
|
@@ -32968,15 +33080,15 @@ function WizardPreviewStep({
|
|
|
32968
33080
|
title: diffExpanded ? `Diff (${diffLines.length} lines)` : "",
|
|
32969
33081
|
focused: false,
|
|
32970
33082
|
children: [
|
|
32971
|
-
activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */
|
|
32972
|
-
/* @__PURE__ */
|
|
33083
|
+
activeLines.slice(boundedScrollOffset, boundedScrollOffset + viewportHeight).map((line) => /* @__PURE__ */ jsx56(Text47, { color: line.color, wrap: "truncate-end", children: line.text }, line.key)),
|
|
33084
|
+
/* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, wrap: "truncate-end", children: formatPreviewScrollIndicator(activeLines.length, boundedScrollOffset, viewportHeight) })
|
|
32973
33085
|
]
|
|
32974
33086
|
}
|
|
32975
33087
|
)
|
|
32976
|
-
] }) : /* @__PURE__ */
|
|
32977
|
-
breakingWithImpact && /* @__PURE__ */
|
|
32978
|
-
/* @__PURE__ */
|
|
32979
|
-
/* @__PURE__ */
|
|
33088
|
+
] }) : /* @__PURE__ */ jsx56(Text47, { color: PALETTE.muted, children: "Nothing to push \u2014 everything is already up to date." }),
|
|
33089
|
+
breakingWithImpact && /* @__PURE__ */ jsx56(Box45, { marginTop: 1, children: /* @__PURE__ */ jsx56(Text47, { color: PALETTE.error, bold: true, children: "\u26A0 Breaking changes will affect downstream entities. Press Enter to acknowledge and apply." }) }),
|
|
33090
|
+
/* @__PURE__ */ jsx56(SpaceEnvironment, { spaceId, environmentId }),
|
|
33091
|
+
/* @__PURE__ */ jsx56(Box45, { marginTop: 1, children: /* @__PURE__ */ jsx56(
|
|
32980
33092
|
ControlHints,
|
|
32981
33093
|
{
|
|
32982
33094
|
hints: [
|
|
@@ -33223,8 +33335,8 @@ var init_use_flow_log = __esm({
|
|
|
33223
33335
|
});
|
|
33224
33336
|
|
|
33225
33337
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/screen.tsx
|
|
33226
|
-
import { Box as
|
|
33227
|
-
import { jsx as
|
|
33338
|
+
import { Box as Box46 } from "ink";
|
|
33339
|
+
import { jsx as jsx57, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
33228
33340
|
function canEditFromPreview(cdf) {
|
|
33229
33341
|
if (!cdf) return false;
|
|
33230
33342
|
return parseCDFComponents(cdf).components.length > 0;
|
|
@@ -33244,7 +33356,7 @@ function FlowScreen({
|
|
|
33244
33356
|
const content = (() => {
|
|
33245
33357
|
switch (state2.step) {
|
|
33246
33358
|
case "final-review":
|
|
33247
|
-
return /* @__PURE__ */
|
|
33359
|
+
return /* @__PURE__ */ jsx57(
|
|
33248
33360
|
GenerateReviewStep,
|
|
33249
33361
|
{
|
|
33250
33362
|
extractSessionId: state2.extractSessionId,
|
|
@@ -33261,10 +33373,10 @@ function FlowScreen({
|
|
|
33261
33373
|
}
|
|
33262
33374
|
);
|
|
33263
33375
|
case "previewing":
|
|
33264
|
-
return /* @__PURE__ */
|
|
33376
|
+
return /* @__PURE__ */ jsx57(RunningStep, { step: "push", description: `Computing diff for ${things} against your Contentful space...` });
|
|
33265
33377
|
case "preview-gate":
|
|
33266
33378
|
if (!state2.serverPreview) return null;
|
|
33267
|
-
return /* @__PURE__ */
|
|
33379
|
+
return /* @__PURE__ */ jsx57(
|
|
33268
33380
|
WizardPreviewStep,
|
|
33269
33381
|
{
|
|
33270
33382
|
preview: state2.serverPreview,
|
|
@@ -33276,9 +33388,9 @@ function FlowScreen({
|
|
|
33276
33388
|
}
|
|
33277
33389
|
);
|
|
33278
33390
|
case "pushing":
|
|
33279
|
-
return /* @__PURE__ */
|
|
33391
|
+
return /* @__PURE__ */ jsx57(PushingStep, { progress: state2.pushProgress, produced, counts });
|
|
33280
33392
|
case "path-prompt":
|
|
33281
|
-
return /* @__PURE__ */
|
|
33393
|
+
return /* @__PURE__ */ jsx57(
|
|
33282
33394
|
PathPrompt,
|
|
33283
33395
|
{
|
|
33284
33396
|
summary: `Saving ${things}${state2.credentialsSkipped ? "" : " and pushing them to your Contentful space"}.`,
|
|
@@ -33288,10 +33400,10 @@ function FlowScreen({
|
|
|
33288
33400
|
}
|
|
33289
33401
|
);
|
|
33290
33402
|
case "printing":
|
|
33291
|
-
return /* @__PURE__ */
|
|
33403
|
+
return /* @__PURE__ */ jsx57(RunningStep, { step: "push", description: "Writing output files to disk..." });
|
|
33292
33404
|
case "print-gate": {
|
|
33293
33405
|
const teaser = buildRunTeaserLine(state2.lastRunId);
|
|
33294
|
-
return /* @__PURE__ */
|
|
33406
|
+
return /* @__PURE__ */ jsx57(
|
|
33295
33407
|
GateStep,
|
|
33296
33408
|
{
|
|
33297
33409
|
step: "push",
|
|
@@ -33306,7 +33418,7 @@ function FlowScreen({
|
|
|
33306
33418
|
}
|
|
33307
33419
|
case "done": {
|
|
33308
33420
|
const totalFailed = state2.pushResult.componentTypes.failed + state2.pushResult.designTokens.failed;
|
|
33309
|
-
return /* @__PURE__ */
|
|
33421
|
+
return /* @__PURE__ */ jsx57(
|
|
33310
33422
|
DoneStep,
|
|
33311
33423
|
{
|
|
33312
33424
|
componentTypes: state2.pushResult.componentTypes,
|
|
@@ -33323,7 +33435,7 @@ function FlowScreen({
|
|
|
33323
33435
|
);
|
|
33324
33436
|
}
|
|
33325
33437
|
case "preview-validation-error":
|
|
33326
|
-
return /* @__PURE__ */
|
|
33438
|
+
return /* @__PURE__ */ jsx57(
|
|
33327
33439
|
PreviewValidationErrorScreen,
|
|
33328
33440
|
{
|
|
33329
33441
|
errors: state2.previewValidationErrors,
|
|
@@ -33334,7 +33446,7 @@ function FlowScreen({
|
|
|
33334
33446
|
}
|
|
33335
33447
|
);
|
|
33336
33448
|
case "error":
|
|
33337
|
-
return /* @__PURE__ */
|
|
33449
|
+
return /* @__PURE__ */ jsx57(
|
|
33338
33450
|
ErrorStep,
|
|
33339
33451
|
{
|
|
33340
33452
|
stepName: state2.errorStep,
|
|
@@ -33345,8 +33457,8 @@ function FlowScreen({
|
|
|
33345
33457
|
);
|
|
33346
33458
|
}
|
|
33347
33459
|
})();
|
|
33348
|
-
return /* @__PURE__ */
|
|
33349
|
-
/* @__PURE__ */
|
|
33460
|
+
return /* @__PURE__ */ jsxs46(Box46, { flexDirection: "column", children: [
|
|
33461
|
+
/* @__PURE__ */ jsx57(CustomPromptBanner, { generatePromptPath }),
|
|
33350
33462
|
content
|
|
33351
33463
|
] });
|
|
33352
33464
|
}
|
|
@@ -33558,6 +33670,21 @@ var init_preview2 = __esm({
|
|
|
33558
33670
|
}
|
|
33559
33671
|
});
|
|
33560
33672
|
|
|
33673
|
+
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/push-progress.ts
|
|
33674
|
+
function activityFromItems(items) {
|
|
33675
|
+
return items.filter((item) => item.status !== "queued").map((item) => ({
|
|
33676
|
+
name: item.id,
|
|
33677
|
+
state: item.status === "failed" ? "failed" : "done",
|
|
33678
|
+
detail: `${item.action} ${item.entityType === "DesignToken" ? "token" : "component"}`,
|
|
33679
|
+
...item.error ? { error: typeof item.error === "string" ? item.error : item.error.message } : {}
|
|
33680
|
+
}));
|
|
33681
|
+
}
|
|
33682
|
+
var init_push_progress = __esm({
|
|
33683
|
+
"packages/experience-design-system-cli/src/tui/import/steps/10-flow/support/push-progress.ts"() {
|
|
33684
|
+
"use strict";
|
|
33685
|
+
}
|
|
33686
|
+
});
|
|
33687
|
+
|
|
33561
33688
|
// packages/experience-design-system-cli/src/tui/import/steps/10-flow/flow/push.ts
|
|
33562
33689
|
async function runPush(input, deps, onPatch) {
|
|
33563
33690
|
if (shouldRefusePush(input.state)) return buildSkippedPushTransition();
|
|
@@ -33611,7 +33738,14 @@ async function runPush(input, deps, onPatch) {
|
|
|
33611
33738
|
const lastDone = items.length > 0 ? items[items.length - 1] : null;
|
|
33612
33739
|
const current = lastDone && lastDone.status === "succeeded" ? lastDone.id : null;
|
|
33613
33740
|
onPatch({
|
|
33614
|
-
pushProgress: {
|
|
33741
|
+
pushProgress: {
|
|
33742
|
+
kind: "progress",
|
|
33743
|
+
processed: done,
|
|
33744
|
+
total: summary.total,
|
|
33745
|
+
failed: summary.failed,
|
|
33746
|
+
current,
|
|
33747
|
+
items: activityFromItems(items)
|
|
33748
|
+
}
|
|
33615
33749
|
});
|
|
33616
33750
|
}
|
|
33617
33751
|
safeLog(deps, { pollTick: { attempt: pollCount, status: op.sys.status, summary: op.summary } });
|
|
@@ -33723,6 +33857,7 @@ var init_push = __esm({
|
|
|
33723
33857
|
init_src3();
|
|
33724
33858
|
init_src4();
|
|
33725
33859
|
init_user_agent();
|
|
33860
|
+
init_push_progress();
|
|
33726
33861
|
init_wizard_state_transitions();
|
|
33727
33862
|
realPushDeps = (log) => ({
|
|
33728
33863
|
createClient: (options) => new ApiClient({ ...options, userAgent: cliUserAgent() }),
|
|
@@ -34268,14 +34403,14 @@ var init_help_info = __esm({
|
|
|
34268
34403
|
|
|
34269
34404
|
// packages/experience-design-system-cli/src/tui/help/PageContainer.tsx
|
|
34270
34405
|
import { useEffect as useEffect30, useState as useState31 } from "react";
|
|
34271
|
-
import { Box as
|
|
34272
|
-
import { Fragment as
|
|
34406
|
+
import { Box as Box47, Text as Text48, useInput as useInput13 } from "ink";
|
|
34407
|
+
import { Fragment as Fragment18, jsx as jsx58, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
34273
34408
|
function Section({ title, rows }) {
|
|
34274
|
-
return /* @__PURE__ */
|
|
34275
|
-
/* @__PURE__ */
|
|
34276
|
-
rows.map((row) => /* @__PURE__ */
|
|
34277
|
-
/* @__PURE__ */
|
|
34278
|
-
/* @__PURE__ */
|
|
34409
|
+
return /* @__PURE__ */ jsxs47(Box47, { flexDirection: "column", children: [
|
|
34410
|
+
/* @__PURE__ */ jsx58(Text48, { bold: true, color: PALETTE.accent, children: title }),
|
|
34411
|
+
rows.map((row) => /* @__PURE__ */ jsxs47(Box47, { gap: 1, children: [
|
|
34412
|
+
/* @__PURE__ */ jsx58(Box47, { width: 16, flexShrink: 0, children: /* @__PURE__ */ jsx58(Text48, { color: PALETTE.muted, children: row.label }) }),
|
|
34413
|
+
/* @__PURE__ */ jsx58(Text48, { children: row.value })
|
|
34279
34414
|
] }, row.label))
|
|
34280
34415
|
] });
|
|
34281
34416
|
}
|
|
@@ -34299,14 +34434,14 @@ function HelpScreen({ onDone }) {
|
|
|
34299
34434
|
return;
|
|
34300
34435
|
}
|
|
34301
34436
|
});
|
|
34302
|
-
return /* @__PURE__ */
|
|
34303
|
-
/* @__PURE__ */
|
|
34304
|
-
info ? /* @__PURE__ */
|
|
34305
|
-
/* @__PURE__ */
|
|
34306
|
-
/* @__PURE__ */
|
|
34307
|
-
/* @__PURE__ */
|
|
34308
|
-
] }) : /* @__PURE__ */
|
|
34309
|
-
/* @__PURE__ */
|
|
34437
|
+
return /* @__PURE__ */ jsxs47(Box47, { flexDirection: "column", paddingX: 2, paddingY: 1, gap: 1, children: [
|
|
34438
|
+
/* @__PURE__ */ jsx58(Text48, { bold: true, children: "Help" }),
|
|
34439
|
+
info ? /* @__PURE__ */ jsxs47(Fragment18, { children: [
|
|
34440
|
+
/* @__PURE__ */ jsx58(Section, { title: "Where things are stored", rows: info.storage }),
|
|
34441
|
+
/* @__PURE__ */ jsx58(Section, { title: "Troubleshooting", rows: info.troubleshooting }),
|
|
34442
|
+
/* @__PURE__ */ jsx58(Text48, { color: PALETTE.muted, children: "Hit a problem? Turn on Debug Mode in Settings, reproduce it, then share the session folder above. The CMA token is redacted from those logs." })
|
|
34443
|
+
] }) : /* @__PURE__ */ jsx58(Text48, { color: PALETTE.accent, children: "Loading..." }),
|
|
34444
|
+
/* @__PURE__ */ jsx58(
|
|
34310
34445
|
ControlHints,
|
|
34311
34446
|
{
|
|
34312
34447
|
hints: [
|
|
@@ -34329,8 +34464,8 @@ var init_PageContainer2 = __esm({
|
|
|
34329
34464
|
|
|
34330
34465
|
// packages/experience-design-system-cli/src/tui/settings/PageContainer.tsx
|
|
34331
34466
|
import { useState as useState32 } from "react";
|
|
34332
|
-
import { Box as
|
|
34333
|
-
import { jsx as
|
|
34467
|
+
import { Box as Box48, Text as Text49, useInput as useInput14 } from "ink";
|
|
34468
|
+
import { jsx as jsx59, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
34334
34469
|
function SettingsScreen({
|
|
34335
34470
|
onNavigate,
|
|
34336
34471
|
onBack
|
|
@@ -34361,15 +34496,15 @@ function SettingsScreen({
|
|
|
34361
34496
|
onBack();
|
|
34362
34497
|
}
|
|
34363
34498
|
});
|
|
34364
|
-
return /* @__PURE__ */
|
|
34365
|
-
/* @__PURE__ */
|
|
34366
|
-
/* @__PURE__ */
|
|
34367
|
-
items.map((item, i) => /* @__PURE__ */
|
|
34499
|
+
return /* @__PURE__ */ jsxs48(Box48, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
34500
|
+
/* @__PURE__ */ jsx59(Text49, { bold: true, children: "Settings" }),
|
|
34501
|
+
/* @__PURE__ */ jsx59(Text49, { color: PALETTE.muted, children: " " }),
|
|
34502
|
+
items.map((item, i) => /* @__PURE__ */ jsxs48(Text49, { color: i === focusIdx ? PALETTE.accent : void 0, children: [
|
|
34368
34503
|
i === focusIdx ? "> " : " ",
|
|
34369
34504
|
item.label
|
|
34370
34505
|
] }, item.label)),
|
|
34371
|
-
/* @__PURE__ */
|
|
34372
|
-
/* @__PURE__ */
|
|
34506
|
+
/* @__PURE__ */ jsx59(Text49, { children: " " }),
|
|
34507
|
+
/* @__PURE__ */ jsx59(
|
|
34373
34508
|
ControlHints,
|
|
34374
34509
|
{
|
|
34375
34510
|
hints: [
|
|
@@ -34638,15 +34773,15 @@ var init_agent_debug = __esm({
|
|
|
34638
34773
|
});
|
|
34639
34774
|
|
|
34640
34775
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentStatusBadge.tsx
|
|
34641
|
-
import { Text as
|
|
34642
|
-
import { jsx as
|
|
34776
|
+
import { Text as Text50 } from "ink";
|
|
34777
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
34643
34778
|
function AgentStatusBadge({
|
|
34644
34779
|
name,
|
|
34645
34780
|
checks,
|
|
34646
34781
|
binary
|
|
34647
34782
|
}) {
|
|
34648
34783
|
const { symbol, text, tone } = LIST_STATUS[checks ? statusFromChecks(name, checks, binary) : "checking"];
|
|
34649
|
-
return /* @__PURE__ */
|
|
34784
|
+
return /* @__PURE__ */ jsx60(Text50, { color: TONE_COLOR[tone], children: `${symbol} ${text}` });
|
|
34650
34785
|
}
|
|
34651
34786
|
var TONE_COLOR;
|
|
34652
34787
|
var init_AgentStatusBadge = __esm({
|
|
@@ -34664,12 +34799,12 @@ var init_AgentStatusBadge = __esm({
|
|
|
34664
34799
|
|
|
34665
34800
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentDetail.tsx
|
|
34666
34801
|
import { useEffect as useEffect31, useState as useState33 } from "react";
|
|
34667
|
-
import { Box as
|
|
34668
|
-
import { jsx as
|
|
34802
|
+
import { Box as Box49, Text as Text51 } from "ink";
|
|
34803
|
+
import { jsx as jsx61, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
34669
34804
|
function StatusHeading() {
|
|
34670
|
-
return /* @__PURE__ */
|
|
34671
|
-
/* @__PURE__ */
|
|
34672
|
-
/* @__PURE__ */
|
|
34805
|
+
return /* @__PURE__ */ jsxs49(Box49, { gap: 1, children: [
|
|
34806
|
+
/* @__PURE__ */ jsx61(Text51, { bold: true, color: PALETTE.muted, children: "STATUS" }),
|
|
34807
|
+
/* @__PURE__ */ jsx61(Text51, { color: PALETTE.muted, children: "\xB7 read only" })
|
|
34673
34808
|
] });
|
|
34674
34809
|
}
|
|
34675
34810
|
function AgentDetail({
|
|
@@ -34732,7 +34867,7 @@ function AgentDetail({
|
|
|
34732
34867
|
};
|
|
34733
34868
|
const formFields = fields(name);
|
|
34734
34869
|
const labelWidth = formLabelWidth([...formFields, action]);
|
|
34735
|
-
return /* @__PURE__ */
|
|
34870
|
+
return /* @__PURE__ */ jsx61(
|
|
34736
34871
|
FieldForm,
|
|
34737
34872
|
{
|
|
34738
34873
|
title: `Settings \u203A Configuration \u203A Agents \u203A ${AGENT_LABELS[name]}`,
|
|
@@ -34749,9 +34884,9 @@ function AgentDetail({
|
|
|
34749
34884
|
actions: [action],
|
|
34750
34885
|
notice: testing ? null : notice,
|
|
34751
34886
|
busy: saving || testing,
|
|
34752
|
-
children: /* @__PURE__ */
|
|
34753
|
-
/* @__PURE__ */
|
|
34754
|
-
statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */
|
|
34887
|
+
children: /* @__PURE__ */ jsxs49(Box49, { flexDirection: "column", marginTop: 1, children: [
|
|
34888
|
+
/* @__PURE__ */ jsx61(StatusHeading, {}),
|
|
34889
|
+
statusRows(name, checks, settings.binary).map((row) => /* @__PURE__ */ jsx61(FormReadOnlyRow, { label: row.label, labelWidth, children: /* @__PURE__ */ jsx61(Text51, { color: TONE_COLOR[row.tone], children: row.value }) }, row.label))
|
|
34755
34890
|
] })
|
|
34756
34891
|
}
|
|
34757
34892
|
);
|
|
@@ -34777,8 +34912,8 @@ var init_AgentDetail = __esm({
|
|
|
34777
34912
|
|
|
34778
34913
|
// packages/experience-design-system-cli/src/tui/settings/configuration/agents/AgentsScreen.tsx
|
|
34779
34914
|
import { useEffect as useEffect32, useRef as useRef20, useState as useState34 } from "react";
|
|
34780
|
-
import { Box as
|
|
34781
|
-
import { Fragment as
|
|
34915
|
+
import { Box as Box50, Text as Text52, useInput as useInput15 } from "ink";
|
|
34916
|
+
import { Fragment as Fragment19, jsx as jsx62, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
34782
34917
|
function AgentsScreen({ onDone }) {
|
|
34783
34918
|
const [config, setConfig] = useState34(null);
|
|
34784
34919
|
const [focus, setFocus] = useState34(0);
|
|
@@ -34886,21 +35021,21 @@ function AgentsScreen({ onDone }) {
|
|
|
34886
35021
|
}
|
|
34887
35022
|
});
|
|
34888
35023
|
if (!config) {
|
|
34889
|
-
return /* @__PURE__ */
|
|
34890
|
-
/* @__PURE__ */
|
|
34891
|
-
/* @__PURE__ */
|
|
34892
|
-
loadError ? /* @__PURE__ */
|
|
34893
|
-
/* @__PURE__ */
|
|
35024
|
+
return /* @__PURE__ */ jsxs50(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
35025
|
+
/* @__PURE__ */ jsx62(Text52, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
|
|
35026
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
35027
|
+
loadError ? /* @__PURE__ */ jsxs50(Fragment19, { children: [
|
|
35028
|
+
/* @__PURE__ */ jsxs50(Text52, { color: PALETTE.error, children: [
|
|
34894
35029
|
"\u2717 Could not read the settings: ",
|
|
34895
35030
|
loadError
|
|
34896
35031
|
] }),
|
|
34897
|
-
/* @__PURE__ */
|
|
34898
|
-
/* @__PURE__ */
|
|
34899
|
-
] }) : /* @__PURE__ */
|
|
35032
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
35033
|
+
/* @__PURE__ */ jsx62(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
|
|
35034
|
+
] }) : /* @__PURE__ */ jsx62(Text52, { color: PALETTE.accent, children: "Loading..." })
|
|
34900
35035
|
] });
|
|
34901
35036
|
}
|
|
34902
35037
|
if (open) {
|
|
34903
|
-
return /* @__PURE__ */
|
|
35038
|
+
return /* @__PURE__ */ jsx62(
|
|
34904
35039
|
AgentDetail,
|
|
34905
35040
|
{
|
|
34906
35041
|
name: open,
|
|
@@ -34921,48 +35056,48 @@ function AgentsScreen({ onDone }) {
|
|
|
34921
35056
|
);
|
|
34922
35057
|
}
|
|
34923
35058
|
const focusedAgent = AGENT_NAMES[focus];
|
|
34924
|
-
return /* @__PURE__ */
|
|
34925
|
-
/* @__PURE__ */
|
|
34926
|
-
/* @__PURE__ */
|
|
34927
|
-
/* @__PURE__ */
|
|
34928
|
-
/* @__PURE__ */
|
|
34929
|
-
/* @__PURE__ */
|
|
34930
|
-
/* @__PURE__ */
|
|
34931
|
-
/* @__PURE__ */
|
|
34932
|
-
saving && /* @__PURE__ */
|
|
35059
|
+
return /* @__PURE__ */ jsxs50(Box50, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
35060
|
+
/* @__PURE__ */ jsx62(Text52, { bold: true, children: "Settings \u203A Configuration \u203A Agents" }),
|
|
35061
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
35062
|
+
/* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: "The coding agent the CLI runs, and what was found for each one." }),
|
|
35063
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
35064
|
+
/* @__PURE__ */ jsxs50(Box50, { gap: 1, children: [
|
|
35065
|
+
/* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: "Default agent" }),
|
|
35066
|
+
/* @__PURE__ */ jsx62(Text52, { bold: true, children: AGENT_LABELS[config.defaultAgent] }),
|
|
35067
|
+
saving && /* @__PURE__ */ jsx62(Text52, { color: PALETTE.accent, children: "\u2026 saving" })
|
|
34933
35068
|
] }),
|
|
34934
|
-
/* @__PURE__ */
|
|
34935
|
-
/* @__PURE__ */
|
|
34936
|
-
/* @__PURE__ */
|
|
34937
|
-
/* @__PURE__ */
|
|
34938
|
-
/* @__PURE__ */
|
|
35069
|
+
/* @__PURE__ */ jsxs50(Box50, { marginTop: 1, gap: 1, children: [
|
|
35070
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
35071
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
35072
|
+
/* @__PURE__ */ jsx62(Box50, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: "AGENT" }) }),
|
|
35073
|
+
/* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: "STATUS" })
|
|
34939
35074
|
] }),
|
|
34940
35075
|
AGENT_NAMES.map((name) => {
|
|
34941
35076
|
const isFocused = focusedAgent === name;
|
|
34942
|
-
return /* @__PURE__ */
|
|
34943
|
-
/* @__PURE__ */
|
|
34944
|
-
/* @__PURE__ */
|
|
34945
|
-
/* @__PURE__ */
|
|
34946
|
-
/* @__PURE__ */
|
|
35077
|
+
return /* @__PURE__ */ jsxs50(Box50, { gap: 1, children: [
|
|
35078
|
+
/* @__PURE__ */ jsx62(Text52, { color: isFocused ? PALETTE.accent : void 0, children: isFocused ? "\u276F" : " " }),
|
|
35079
|
+
/* @__PURE__ */ jsx62(Text52, { color: PALETTE.success, children: name === config.defaultAgent ? "\u2605" : " " }),
|
|
35080
|
+
/* @__PURE__ */ jsx62(Box50, { width: NAME_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text52, { bold: isFocused, color: isFocused ? PALETTE.accent : void 0, children: AGENT_LABELS[name] }) }),
|
|
35081
|
+
/* @__PURE__ */ jsx62(AgentStatusBadge, { name, checks: checks[name], binary: config.agents[name].binary })
|
|
34947
35082
|
] }, name);
|
|
34948
35083
|
}),
|
|
34949
|
-
/* @__PURE__ */
|
|
34950
|
-
/* @__PURE__ */
|
|
34951
|
-
panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */
|
|
34952
|
-
/* @__PURE__ */
|
|
34953
|
-
/* @__PURE__ */
|
|
35084
|
+
/* @__PURE__ */ jsxs50(Box50, { flexDirection: "column", marginTop: 1, children: [
|
|
35085
|
+
/* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: `\u2500 ${AGENT_LABELS[focusedAgent]} ${"\u2500".repeat(30)}` }),
|
|
35086
|
+
panelRows(focusedAgent, checks[focusedAgent], config.agents[focusedAgent]).map((row) => /* @__PURE__ */ jsxs50(Box50, { gap: 1, paddingLeft: 1, children: [
|
|
35087
|
+
/* @__PURE__ */ jsx62(Box50, { width: PANEL_LABEL_WIDTH, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text52, { color: PALETTE.muted, children: row.label }) }),
|
|
35088
|
+
/* @__PURE__ */ jsx62(Text52, { color: TONE_COLOR[row.tone], children: row.value })
|
|
34954
35089
|
] }, row.label))
|
|
34955
35090
|
] }),
|
|
34956
|
-
notice && /* @__PURE__ */
|
|
34957
|
-
/* @__PURE__ */
|
|
34958
|
-
/* @__PURE__ */
|
|
35091
|
+
notice && /* @__PURE__ */ jsxs50(Fragment19, { children: [
|
|
35092
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
35093
|
+
/* @__PURE__ */ jsxs50(Text52, { bold: true, color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
34959
35094
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
34960
35095
|
" ",
|
|
34961
35096
|
notice.text
|
|
34962
35097
|
] })
|
|
34963
35098
|
] }),
|
|
34964
|
-
/* @__PURE__ */
|
|
34965
|
-
/* @__PURE__ */
|
|
35099
|
+
/* @__PURE__ */ jsx62(Text52, { children: " " }),
|
|
35100
|
+
/* @__PURE__ */ jsx62(
|
|
34966
35101
|
ControlHints,
|
|
34967
35102
|
{
|
|
34968
35103
|
hints: [
|
|
@@ -35027,8 +35162,8 @@ var init_project_store = __esm({
|
|
|
35027
35162
|
|
|
35028
35163
|
// packages/experience-design-system-cli/src/tui/settings/configuration/project/ProjectScreen.tsx
|
|
35029
35164
|
import { useEffect as useEffect33, useRef as useRef21, useState as useState35 } from "react";
|
|
35030
|
-
import { Box as
|
|
35031
|
-
import { Fragment as
|
|
35165
|
+
import { Box as Box51, Text as Text53, useInput as useInput16 } from "ink";
|
|
35166
|
+
import { Fragment as Fragment20, jsx as jsx63, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
35032
35167
|
function debugFields(config) {
|
|
35033
35168
|
return {
|
|
35034
35169
|
space_id: config?.spaceId ?? "",
|
|
@@ -35097,17 +35232,17 @@ function ProjectScreen({ onDone }) {
|
|
|
35097
35232
|
}
|
|
35098
35233
|
});
|
|
35099
35234
|
if (!config) {
|
|
35100
|
-
return /* @__PURE__ */
|
|
35101
|
-
/* @__PURE__ */
|
|
35102
|
-
/* @__PURE__ */
|
|
35103
|
-
loadError ? /* @__PURE__ */
|
|
35104
|
-
/* @__PURE__ */
|
|
35235
|
+
return /* @__PURE__ */ jsxs51(Box51, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
35236
|
+
/* @__PURE__ */ jsx63(Text53, { bold: true, children: "Settings \u203A Configuration \u203A Project" }),
|
|
35237
|
+
/* @__PURE__ */ jsx63(Text53, { children: " " }),
|
|
35238
|
+
loadError ? /* @__PURE__ */ jsxs51(Fragment20, { children: [
|
|
35239
|
+
/* @__PURE__ */ jsxs51(Text53, { color: PALETTE.error, children: [
|
|
35105
35240
|
"\u2717 Could not read the settings: ",
|
|
35106
35241
|
loadError
|
|
35107
35242
|
] }),
|
|
35108
|
-
/* @__PURE__ */
|
|
35109
|
-
/* @__PURE__ */
|
|
35110
|
-
] }) : /* @__PURE__ */
|
|
35243
|
+
/* @__PURE__ */ jsx63(Text53, { children: " " }),
|
|
35244
|
+
/* @__PURE__ */ jsx63(ControlHints, { hints: [{ keys: "Esc/q", label: "back" }] })
|
|
35245
|
+
] }) : /* @__PURE__ */ jsx63(Text53, { color: PALETTE.accent, children: "Loading..." })
|
|
35111
35246
|
] });
|
|
35112
35247
|
}
|
|
35113
35248
|
const save = () => {
|
|
@@ -35128,7 +35263,7 @@ function ProjectScreen({ onDone }) {
|
|
|
35128
35263
|
endVisit(config);
|
|
35129
35264
|
onDone();
|
|
35130
35265
|
};
|
|
35131
|
-
return /* @__PURE__ */
|
|
35266
|
+
return /* @__PURE__ */ jsx63(
|
|
35132
35267
|
FieldForm,
|
|
35133
35268
|
{
|
|
35134
35269
|
title: "Settings \u203A Configuration \u203A Project",
|
|
@@ -35174,8 +35309,8 @@ var init_ProjectScreen = __esm({
|
|
|
35174
35309
|
|
|
35175
35310
|
// packages/experience-design-system-cli/src/tui/settings/configuration/ConfigurationScreen.tsx
|
|
35176
35311
|
import { useState as useState36 } from "react";
|
|
35177
|
-
import { Box as
|
|
35178
|
-
import { jsx as
|
|
35312
|
+
import { Box as Box52, Text as Text54, useInput as useInput17 } from "ink";
|
|
35313
|
+
import { jsx as jsx64, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
35179
35314
|
function ConfigurationScreen({ onDone }) {
|
|
35180
35315
|
const [focus, setFocus] = useState36(0);
|
|
35181
35316
|
const [open, setOpen] = useState36(null);
|
|
@@ -35196,18 +35331,18 @@ function ConfigurationScreen({ onDone }) {
|
|
|
35196
35331
|
}
|
|
35197
35332
|
if (key.escape || input === "q") onDone();
|
|
35198
35333
|
});
|
|
35199
|
-
if (open === "project") return /* @__PURE__ */
|
|
35200
|
-
if (open === "agents") return /* @__PURE__ */
|
|
35201
|
-
return /* @__PURE__ */
|
|
35202
|
-
/* @__PURE__ */
|
|
35203
|
-
/* @__PURE__ */
|
|
35204
|
-
SECTIONS.map((section, index) => /* @__PURE__ */
|
|
35205
|
-
/* @__PURE__ */
|
|
35206
|
-
/* @__PURE__ */
|
|
35207
|
-
/* @__PURE__ */
|
|
35334
|
+
if (open === "project") return /* @__PURE__ */ jsx64(ProjectScreen, { onDone: close });
|
|
35335
|
+
if (open === "agents") return /* @__PURE__ */ jsx64(AgentsScreen, { onDone: close });
|
|
35336
|
+
return /* @__PURE__ */ jsxs52(Box52, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
35337
|
+
/* @__PURE__ */ jsx64(Text54, { bold: true, children: "Settings \u203A Configuration" }),
|
|
35338
|
+
/* @__PURE__ */ jsx64(Text54, { children: " " }),
|
|
35339
|
+
SECTIONS.map((section, index) => /* @__PURE__ */ jsxs52(Box52, { gap: 1, children: [
|
|
35340
|
+
/* @__PURE__ */ jsx64(Text54, { color: index === focus ? PALETTE.accent : void 0, children: index === focus ? "\u276F" : " " }),
|
|
35341
|
+
/* @__PURE__ */ jsx64(Box52, { width: 9, flexShrink: 0, children: /* @__PURE__ */ jsx64(Text54, { bold: index === focus, color: index === focus ? PALETTE.accent : void 0, children: section.label }) }),
|
|
35342
|
+
/* @__PURE__ */ jsx64(Text54, { color: PALETTE.muted, children: section.description })
|
|
35208
35343
|
] }, section.id)),
|
|
35209
|
-
/* @__PURE__ */
|
|
35210
|
-
/* @__PURE__ */
|
|
35344
|
+
/* @__PURE__ */ jsx64(Text54, { children: " " }),
|
|
35345
|
+
/* @__PURE__ */ jsx64(
|
|
35211
35346
|
ControlHints,
|
|
35212
35347
|
{
|
|
35213
35348
|
hints: [
|
|
@@ -35240,8 +35375,8 @@ var init_ConfigurationScreen = __esm({
|
|
|
35240
35375
|
|
|
35241
35376
|
// packages/experience-design-system-cli/src/tui/settings/opt-in-analytics/screen.tsx
|
|
35242
35377
|
import { useEffect as useEffect34, useState as useState37 } from "react";
|
|
35243
|
-
import { Box as
|
|
35244
|
-
import { Fragment as
|
|
35378
|
+
import { Box as Box53, Text as Text55, useInput as useInput18 } from "ink";
|
|
35379
|
+
import { Fragment as Fragment21, jsx as jsx65, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
35245
35380
|
function OptInAnalyticsScreen({ onDone }) {
|
|
35246
35381
|
const [loading, setLoading] = useState37(true);
|
|
35247
35382
|
const [enabled, setEnabled] = useState37(true);
|
|
@@ -35272,21 +35407,21 @@ function OptInAnalyticsScreen({ onDone }) {
|
|
|
35272
35407
|
onDone();
|
|
35273
35408
|
}
|
|
35274
35409
|
});
|
|
35275
|
-
return /* @__PURE__ */
|
|
35276
|
-
/* @__PURE__ */
|
|
35277
|
-
/* @__PURE__ */
|
|
35278
|
-
loading ? /* @__PURE__ */
|
|
35279
|
-
/* @__PURE__ */
|
|
35410
|
+
return /* @__PURE__ */ jsxs53(Box53, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
35411
|
+
/* @__PURE__ */ jsx65(Text55, { bold: true, children: "Settings \u203A Opt-in Analytics" }),
|
|
35412
|
+
/* @__PURE__ */ jsx65(Text55, { children: " " }),
|
|
35413
|
+
loading ? /* @__PURE__ */ jsx65(Text55, { color: PALETTE.muted, children: "Loading\u2026" }) : /* @__PURE__ */ jsxs53(Fragment21, { children: [
|
|
35414
|
+
/* @__PURE__ */ jsxs53(Text55, { children: [
|
|
35280
35415
|
"Share anonymous usage data:",
|
|
35281
35416
|
" ",
|
|
35282
|
-
/* @__PURE__ */
|
|
35417
|
+
/* @__PURE__ */ jsx65(Text55, { bold: true, color: enabled ? PALETTE.success : PALETTE.muted, children: enabled ? "On" : "Off" })
|
|
35283
35418
|
] }),
|
|
35284
|
-
/* @__PURE__ */
|
|
35285
|
-
/* @__PURE__ */
|
|
35286
|
-
/* @__PURE__ */
|
|
35419
|
+
/* @__PURE__ */ jsx65(Text55, { children: " " }),
|
|
35420
|
+
/* @__PURE__ */ jsx65(Text55, { color: PALETTE.muted, children: "Shares which CLI commands are used and where imports succeed or fail." }),
|
|
35421
|
+
/* @__PURE__ */ jsx65(Text55, { color: PALETTE.muted, children: "Never includes source code, file paths, credentials, or authored content." })
|
|
35287
35422
|
] }),
|
|
35288
|
-
/* @__PURE__ */
|
|
35289
|
-
/* @__PURE__ */
|
|
35423
|
+
/* @__PURE__ */ jsx65(Text55, { children: " " }),
|
|
35424
|
+
/* @__PURE__ */ jsx65(
|
|
35290
35425
|
ControlHints,
|
|
35291
35426
|
{
|
|
35292
35427
|
hints: [
|
|
@@ -35309,8 +35444,8 @@ var init_screen12 = __esm({
|
|
|
35309
35444
|
|
|
35310
35445
|
// packages/experience-design-system-cli/src/tui/settings/debug-mode/screen.tsx
|
|
35311
35446
|
import { useEffect as useEffect35, useRef as useRef22, useState as useState38 } from "react";
|
|
35312
|
-
import { Box as
|
|
35313
|
-
import { Fragment as
|
|
35447
|
+
import { Box as Box54, Text as Text56, useInput as useInput19 } from "ink";
|
|
35448
|
+
import { Fragment as Fragment22, jsx as jsx66, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
35314
35449
|
function DebugModeScreen({ onDone }) {
|
|
35315
35450
|
const [setting, setSetting] = useState38(null);
|
|
35316
35451
|
const [focus, setFocus] = useState38("enabled");
|
|
@@ -35386,25 +35521,25 @@ function DebugModeScreen({ onDone }) {
|
|
|
35386
35521
|
onDone();
|
|
35387
35522
|
}
|
|
35388
35523
|
});
|
|
35389
|
-
const marker = (row) => /* @__PURE__ */
|
|
35390
|
-
const label = (row, text) => /* @__PURE__ */
|
|
35391
|
-
return /* @__PURE__ */
|
|
35392
|
-
/* @__PURE__ */
|
|
35393
|
-
/* @__PURE__ */
|
|
35394
|
-
setting ? /* @__PURE__ */
|
|
35395
|
-
/* @__PURE__ */
|
|
35524
|
+
const marker = (row) => /* @__PURE__ */ jsx66(Text56, { color: focus === row ? PALETTE.accent : void 0, children: focus === row ? "\u276F" : " " });
|
|
35525
|
+
const label = (row, text) => /* @__PURE__ */ jsx66(Text56, { bold: focus === row, color: focus === row ? PALETTE.accent : PALETTE.muted, children: text });
|
|
35526
|
+
return /* @__PURE__ */ jsxs54(Box54, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [
|
|
35527
|
+
/* @__PURE__ */ jsx66(Text56, { bold: true, children: "Settings \u203A Debug Mode" }),
|
|
35528
|
+
/* @__PURE__ */ jsx66(Text56, { children: " " }),
|
|
35529
|
+
setting ? /* @__PURE__ */ jsxs54(Fragment22, { children: [
|
|
35530
|
+
/* @__PURE__ */ jsxs54(Box54, { gap: 1, children: [
|
|
35396
35531
|
marker("enabled"),
|
|
35397
35532
|
label("enabled", "Debug logging:"),
|
|
35398
|
-
/* @__PURE__ */
|
|
35533
|
+
/* @__PURE__ */ jsx66(Text56, { bold: true, color: setting.enabled ? PALETTE.success : PALETTE.muted, children: setting.enabled ? "On" : "Off" })
|
|
35399
35534
|
] }),
|
|
35400
|
-
/* @__PURE__ */
|
|
35535
|
+
/* @__PURE__ */ jsxs54(Box54, { gap: 1, children: [
|
|
35401
35536
|
marker("retentionDays"),
|
|
35402
35537
|
label("retentionDays", "Delete logs after:"),
|
|
35403
35538
|
RETENTION_CHOICES.map((days) => {
|
|
35404
35539
|
const highlighted = focus === "retentionDays" && days === pending;
|
|
35405
35540
|
const saved = days === setting.retentionDays;
|
|
35406
|
-
return /* @__PURE__ */
|
|
35407
|
-
|
|
35541
|
+
return /* @__PURE__ */ jsx66(
|
|
35542
|
+
Text56,
|
|
35408
35543
|
{
|
|
35409
35544
|
bold: highlighted || saved,
|
|
35410
35545
|
underline: highlighted,
|
|
@@ -35415,15 +35550,15 @@ function DebugModeScreen({ onDone }) {
|
|
|
35415
35550
|
);
|
|
35416
35551
|
})
|
|
35417
35552
|
] }),
|
|
35418
|
-
/* @__PURE__ */
|
|
35419
|
-
notice ? /* @__PURE__ */
|
|
35553
|
+
/* @__PURE__ */ jsx66(Text56, { children: " " }),
|
|
35554
|
+
notice ? /* @__PURE__ */ jsxs54(Text56, { color: notice.kind === "success" ? PALETTE.success : PALETTE.error, children: [
|
|
35420
35555
|
notice.kind === "success" ? "\u2713" : "\u2717",
|
|
35421
35556
|
" ",
|
|
35422
35557
|
notice.text
|
|
35423
|
-
] }) : /* @__PURE__ */
|
|
35424
|
-
] }) : /* @__PURE__ */
|
|
35425
|
-
/* @__PURE__ */
|
|
35426
|
-
/* @__PURE__ */
|
|
35558
|
+
] }) : /* @__PURE__ */ jsx66(Text56, { color: PALETTE.muted, children: "\u2713 marks what is saved. Older logs are deleted the next time the CLI starts." })
|
|
35559
|
+
] }) : /* @__PURE__ */ jsx66(Text56, { color: PALETTE.muted, children: "Loading\u2026" }),
|
|
35560
|
+
/* @__PURE__ */ jsx66(Text56, { children: " " }),
|
|
35561
|
+
/* @__PURE__ */ jsx66(
|
|
35427
35562
|
ControlHints,
|
|
35428
35563
|
{
|
|
35429
35564
|
hints: [
|
|
@@ -35461,7 +35596,7 @@ __export(app_exports, {
|
|
|
35461
35596
|
runApp: () => runApp
|
|
35462
35597
|
});
|
|
35463
35598
|
import { useEffect as useEffect36, useState as useState39 } from "react";
|
|
35464
|
-
import { Fragment as
|
|
35599
|
+
import { Fragment as Fragment23, jsx as jsx67 } from "react/jsx-runtime";
|
|
35465
35600
|
function App({ importOptions, inkClear }) {
|
|
35466
35601
|
const [screen, setScreen] = useState39("start");
|
|
35467
35602
|
const [importExitCode, setImportExitCode] = useState39();
|
|
@@ -35662,9 +35797,9 @@ function App({ importOptions, inkClear }) {
|
|
|
35662
35797
|
const content = (() => {
|
|
35663
35798
|
switch (screen) {
|
|
35664
35799
|
case "import":
|
|
35665
|
-
if (showImportResult) return /* @__PURE__ */
|
|
35800
|
+
if (showImportResult) return /* @__PURE__ */ jsx67(ImportScreen, { exitCode: importExitCode, onDone: finishImportResult });
|
|
35666
35801
|
if (flow && flowStart) {
|
|
35667
|
-
return /* @__PURE__ */
|
|
35802
|
+
return /* @__PURE__ */ jsx67(
|
|
35668
35803
|
FlowScreen,
|
|
35669
35804
|
{
|
|
35670
35805
|
state: flow.state,
|
|
@@ -35675,7 +35810,7 @@ function App({ importOptions, inkClear }) {
|
|
|
35675
35810
|
);
|
|
35676
35811
|
}
|
|
35677
35812
|
if (tokenReview) {
|
|
35678
|
-
return /* @__PURE__ */
|
|
35813
|
+
return /* @__PURE__ */ jsx67(
|
|
35679
35814
|
TokenReviewScreen,
|
|
35680
35815
|
{
|
|
35681
35816
|
tokensPath: tokenReview.tokensPath,
|
|
@@ -35684,15 +35819,15 @@ function App({ importOptions, inkClear }) {
|
|
|
35684
35819
|
}
|
|
35685
35820
|
);
|
|
35686
35821
|
}
|
|
35687
|
-
if (importDefaults === void 0) return /* @__PURE__ */
|
|
35822
|
+
if (importDefaults === void 0) return /* @__PURE__ */ jsx67(Fragment23, {});
|
|
35688
35823
|
if (target === void 0) {
|
|
35689
|
-
return /* @__PURE__ */
|
|
35824
|
+
return /* @__PURE__ */ jsx67(PreflightScreen, { onChoose: setTarget, onQuit: leaveImport });
|
|
35690
35825
|
}
|
|
35691
35826
|
const inputStep = currentInputStep(target, answers);
|
|
35692
35827
|
if (!extractionRun && !tokensOnlyRun && inputStep !== "credentials") {
|
|
35693
35828
|
switch (inputStep) {
|
|
35694
35829
|
case "project":
|
|
35695
|
-
return /* @__PURE__ */
|
|
35830
|
+
return /* @__PURE__ */ jsx67(
|
|
35696
35831
|
WelcomeScreen,
|
|
35697
35832
|
{
|
|
35698
35833
|
mode: target,
|
|
@@ -35702,7 +35837,7 @@ function App({ importOptions, inkClear }) {
|
|
|
35702
35837
|
}
|
|
35703
35838
|
);
|
|
35704
35839
|
case "token-file":
|
|
35705
|
-
return /* @__PURE__ */
|
|
35840
|
+
return /* @__PURE__ */ jsx67(
|
|
35706
35841
|
TokenInputScreen,
|
|
35707
35842
|
{
|
|
35708
35843
|
mode: target,
|
|
@@ -35712,7 +35847,7 @@ function App({ importOptions, inkClear }) {
|
|
|
35712
35847
|
}
|
|
35713
35848
|
);
|
|
35714
35849
|
case "path-validation":
|
|
35715
|
-
return /* @__PURE__ */
|
|
35850
|
+
return /* @__PURE__ */ jsx67(
|
|
35716
35851
|
PathValidationScreen,
|
|
35717
35852
|
{
|
|
35718
35853
|
mode: target,
|
|
@@ -35727,9 +35862,9 @@ function App({ importOptions, inkClear }) {
|
|
|
35727
35862
|
}
|
|
35728
35863
|
if (tokensOnlyRun) {
|
|
35729
35864
|
if (tokensOnly?.status === "done" && !tokensOnly.result.ok) {
|
|
35730
|
-
return /* @__PURE__ */
|
|
35865
|
+
return /* @__PURE__ */ jsx67(ErrorStep, { stepName: tokensOnly.result.step, message: tokensOnly.result.message, onExit: leaveImport });
|
|
35731
35866
|
}
|
|
35732
|
-
return /* @__PURE__ */
|
|
35867
|
+
return /* @__PURE__ */ jsx67(
|
|
35733
35868
|
RunningStep,
|
|
35734
35869
|
{
|
|
35735
35870
|
step: "generation",
|
|
@@ -35740,10 +35875,10 @@ function App({ importOptions, inkClear }) {
|
|
|
35740
35875
|
}
|
|
35741
35876
|
if (extractionRun) {
|
|
35742
35877
|
if (extraction?.status === "done" && !extraction.result.ok) {
|
|
35743
|
-
return /* @__PURE__ */
|
|
35878
|
+
return /* @__PURE__ */ jsx67(ErrorStep, { stepName: extraction.result.step, message: extraction.result.message, onExit: leaveImport });
|
|
35744
35879
|
}
|
|
35745
35880
|
if (extraction?.status === "running") {
|
|
35746
|
-
return /* @__PURE__ */
|
|
35881
|
+
return /* @__PURE__ */ jsx67(
|
|
35747
35882
|
ExtractionScreen,
|
|
35748
35883
|
{
|
|
35749
35884
|
progress: extraction.progress,
|
|
@@ -35752,14 +35887,14 @@ function App({ importOptions, inkClear }) {
|
|
|
35752
35887
|
}
|
|
35753
35888
|
);
|
|
35754
35889
|
}
|
|
35755
|
-
return /* @__PURE__ */
|
|
35890
|
+
return /* @__PURE__ */ jsx67(Fragment23, {});
|
|
35756
35891
|
}
|
|
35757
35892
|
if (scopeRun && scopeFlow) {
|
|
35758
35893
|
if (scopeFlow.status === "failed") {
|
|
35759
|
-
return /* @__PURE__ */
|
|
35894
|
+
return /* @__PURE__ */ jsx67(ErrorStep, { stepName: "scope gate", message: scopeFlow.message, onExit: leaveImport });
|
|
35760
35895
|
}
|
|
35761
35896
|
if (scopeFlow.status === "deciding") {
|
|
35762
|
-
return /* @__PURE__ */
|
|
35897
|
+
return /* @__PURE__ */ jsx67(
|
|
35763
35898
|
ScopeGateScreen,
|
|
35764
35899
|
{
|
|
35765
35900
|
components: scopeFlow.load.components,
|
|
@@ -35770,10 +35905,10 @@ function App({ importOptions, inkClear }) {
|
|
|
35770
35905
|
);
|
|
35771
35906
|
}
|
|
35772
35907
|
if (generation?.status === "done" && !generation.result.ok) {
|
|
35773
|
-
return /* @__PURE__ */
|
|
35908
|
+
return /* @__PURE__ */ jsx67(ErrorStep, { stepName: generation.result.step, message: generation.result.message, onExit: leaveImport });
|
|
35774
35909
|
}
|
|
35775
35910
|
if (generation?.status === "running") {
|
|
35776
|
-
return /* @__PURE__ */
|
|
35911
|
+
return /* @__PURE__ */ jsx67(
|
|
35777
35912
|
GenerationScreen,
|
|
35778
35913
|
{
|
|
35779
35914
|
progress: generation.progress,
|
|
@@ -35784,9 +35919,9 @@ function App({ importOptions, inkClear }) {
|
|
|
35784
35919
|
}
|
|
35785
35920
|
);
|
|
35786
35921
|
}
|
|
35787
|
-
return /* @__PURE__ */
|
|
35922
|
+
return /* @__PURE__ */ jsx67(Fragment23, {});
|
|
35788
35923
|
}
|
|
35789
|
-
return /* @__PURE__ */
|
|
35924
|
+
return /* @__PURE__ */ jsx67(
|
|
35790
35925
|
CredentialsScreen,
|
|
35791
35926
|
{
|
|
35792
35927
|
mode: target,
|
|
@@ -35797,27 +35932,27 @@ function App({ importOptions, inkClear }) {
|
|
|
35797
35932
|
}
|
|
35798
35933
|
);
|
|
35799
35934
|
case "help":
|
|
35800
|
-
return /* @__PURE__ */
|
|
35935
|
+
return /* @__PURE__ */ jsx67(HelpScreen, { onDone: goToStart });
|
|
35801
35936
|
case "settings":
|
|
35802
|
-
return /* @__PURE__ */
|
|
35937
|
+
return /* @__PURE__ */ jsx67(SettingsScreen, { onNavigate: setScreen, onBack: goToStart });
|
|
35803
35938
|
case "settings-configuration":
|
|
35804
|
-
return /* @__PURE__ */
|
|
35939
|
+
return /* @__PURE__ */ jsx67(ConfigurationScreen, { onDone: goToSettings });
|
|
35805
35940
|
case "settings-opt-in-analytics":
|
|
35806
|
-
return /* @__PURE__ */
|
|
35941
|
+
return /* @__PURE__ */ jsx67(OptInAnalyticsScreen, { onDone: goToSettings });
|
|
35807
35942
|
case "settings-debug-mode":
|
|
35808
|
-
return /* @__PURE__ */
|
|
35943
|
+
return /* @__PURE__ */ jsx67(DebugModeScreen, { onDone: goToSettings });
|
|
35809
35944
|
case "start":
|
|
35810
|
-
return /* @__PURE__ */
|
|
35945
|
+
return /* @__PURE__ */ jsx67(HomeScreen, { onNavigate: setScreen });
|
|
35811
35946
|
}
|
|
35812
35947
|
})();
|
|
35813
|
-
return /* @__PURE__ */
|
|
35948
|
+
return /* @__PURE__ */ jsx67(HiddenStepsContext.Provider, { value: target === "tokens" ? TOKENS_ONLY_HIDDEN_STEPS : [], children: content });
|
|
35814
35949
|
}
|
|
35815
35950
|
async function runApp(renderApp, importOptions) {
|
|
35816
35951
|
const inkClear = () => {
|
|
35817
35952
|
instance.clear?.();
|
|
35818
35953
|
process.stdout.write("\x1B[H\x1B[0J");
|
|
35819
35954
|
};
|
|
35820
|
-
const instance = renderApp(/* @__PURE__ */
|
|
35955
|
+
const instance = renderApp(/* @__PURE__ */ jsx67(App, { importOptions, inkClear }));
|
|
35821
35956
|
await instance.waitUntilExit();
|
|
35822
35957
|
}
|
|
35823
35958
|
var TOKENS_ONLY_HIDDEN_STEPS;
|